Despite the overall success of the generic drug market, sudden price hikes are becoming more common, according to a new study.