Program: 112478
Project: 112478
Buggy source:
/** 
 * Creates the options overlay.
 * @param container the game container
 * @param groups the option groups
 * @param listener the event listener
 */
public OptionsOverlay(GameContainer container,OptionGroup[] groups,OptionsOverlayListener listener){
  super(container);
  this.container=container;
  this.groups=groups;
  this.listener=listener;
  this.input=container.getInput();
  this.containerWidth=container.getWidth();
  this.containerHeight=container.getHeight();
  this.iconSize=(int)(18 * GameImage.getUIscale());
  this.sliderBallImg=GameImage.CONTROL_SLIDER_BALL.getImage().getScaledCopy(iconSize,iconSize);
  this.checkOnImg=GameImage.CONTROL_CHECK_ON.getImage().getScaledCopy(iconSize,iconSize);
  this.checkOffImg=GameImage.CONTROL_CHECK_OFF.getImage().getScaledCopy(iconSize,iconSize);
  int chevronSize=iconSize - 4;
  this.chevronDownImg=GameImage.CHEVRON_DOWN.getImage().getScaledCopy(chevronSize,chevronSize);
  this.chevronRightImg=GameImage.CHEVRON_RIGHT.getImage().getScaledCopy(chevronSize,chevronSize);
  int searchImgSize=(int)(Fonts.LARGE.getLineHeight() * 0.75f);
  searchImg=GameImage.SEARCH.getImage().getScaledCopy(searchImgSize,searchImgSize);
  this.x=0;
  this.y=0;
  this.targetWidth=(int)(containerWidth * 0.42f);
  this.height=containerHeight;
  this.paddingRight=(int)(containerWidth * 0.009375f);
  this.paddingLeft=(int)(containerWidth * 0.0180f);
  this.paddingTextLeft=paddingLeft + LINEWIDTH + (int)(containerWidth * 0.00625f);
  this.optionStartX=paddingTextLeft;
  this.textOptionsY=Fonts.LARGE.getLineHeight() * 2;
  this.textChangeY=textOptionsY + Fonts.LARGE.getLineHeight();
  this.posSearchY=textChangeY + Fonts.MEDIUM.getLineHeight() * 2;
  this.textSearchYOffset=Fonts.MEDIUM.getLineHeight() / 2;
  this.optionStartY=posSearchY + Fonts.MEDIUM.getLineHeight() + Fonts.LARGE.getLineHeight();
  int paddingX=24;
  this.optionWidth=targetWidth - paddingX * 2;
  this.optionHeight=(int)(Fonts.MEDIUM.getLineHeight() * 1.3f);
  this.optionGroupPadding=(int)(Fonts.LARGE.getLineHeight() * 1.5f);
  this.optionTextOffsetY=(int)((optionHeight - Fonts.MEDIUM.getLineHeight()) / 2f);
  this.listItemHeight=(int)(optionHeight * 4f / 5f);
  this.controlImageSize=(int)(Fonts.MEDIUM.getLineHeight() * 0.7f);
  this.controlImagePadding=(optionHeight - controlImageSize) / 2;
  int backSize=Fonts.XLARGE.getLineHeight() * 2 / 3;
  Image backArrow=GameImage.CHEVRON_LEFT.getImage().getScaledCopy(backSize,backSize);
  this.backButton=new MenuButton(backArrow,0,0);
  backButton.setHoverExpand(1.5f);
  Image restartImg=GameImage.UPDATE.getImage().getScaledCopy(backSize,backSize);
  this.restartButton=new MenuButton(restartImg,0,0);
  restartButton.setHoverAnimationDuration(2000);
  restartButton.setHoverRotate(360);
  searchField=new TextField(container,null,0,0,0,0);
  searchField.setFocus(true);
  this.scrolling=new KineticScrolling();
  scrolling.setMinMax(0f,maxScrollOffset);
}

Fixed version (ground truth):
/** 
 * Creates the options overlay.
 * @param container the game container
 * @param groups the option groups
 * @param listener the event listener
 */
public OptionsOverlay(GameContainer container,OptionGroup[] groups,OptionsOverlayListener listener){
  super(container);
  this.container=container;
  this.groups=groups;
  this.listener=listener;
  this.input=container.getInput();
  this.containerWidth=container.getWidth();
  this.containerHeight=container.getHeight();
  this.iconSize=(int)(18 * GameImage.getUIscale());
  this.sliderBallImg=GameImage.CONTROL_SLIDER_BALL.getImage().getScaledCopy(iconSize,iconSize);
  this.checkOnImg=GameImage.CONTROL_CHECK_ON.getImage().getScaledCopy(iconSize,iconSize);
  this.checkOffImg=GameImage.CONTROL_CHECK_OFF.getImage().getScaledCopy(iconSize,iconSize);
  int chevronSize=iconSize - 4;
  this.chevronDownImg=GameImage.CHEVRON_DOWN.getImage().getScaledCopy(chevronSize,chevronSize);
  this.chevronRightImg=GameImage.CHEVRON_RIGHT.getImage().getScaledCopy(chevronSize,chevronSize);
  int searchImgSize=(int)(Fonts.LARGE.getLineHeight() * 0.75f);
  searchImg=GameImage.SEARCH.getImage().getScaledCopy(searchImgSize,searchImgSize);
  this.x=0;
  this.y=0;
  this.targetWidth=(int)(containerWidth * 0.42f);
  this.height=containerHeight;
  this.paddingRight=(int)(containerWidth * 0.009375f);
  this.paddingLeft=(int)(containerWidth * 0.0180f);
  this.paddingTextLeft=paddingLeft + LINEWIDTH + (int)(containerWidth * 0.00625f);
  this.optionStartX=paddingTextLeft;
  this.textOptionsY=Fonts.LARGE.getLineHeight() * 2;
  this.textChangeY=textOptionsY + Fonts.LARGE.getLineHeight();
  this.posSearchY=textChangeY + Fonts.MEDIUM.getLineHeight() * 2;
  this.textSearchYOffset=Fonts.MEDIUM.getLineHeight() / 2;
  this.optionStartY=posSearchY + Fonts.MEDIUM.getLineHeight() + Fonts.LARGE.getLineHeight();
  int paddingX=24;
  this.optionWidth=targetWidth - paddingX * 2;
  this.optionHeight=(int)(Fonts.MEDIUM.getLineHeight() * 1.3f);
  this.optionGroupPadding=(int)(Fonts.LARGE.getLineHeight() * 1.5f);
  this.optionTextOffsetY=(int)((optionHeight - Fonts.MEDIUM.getLineHeight()) / 2f);
  this.listItemHeight=(int)(optionHeight * 4f / 5f);
  this.controlImageSize=(int)(Fonts.MEDIUM.getLineHeight() * 0.7f);
  this.controlImagePadding=(optionHeight - controlImageSize) / 2;
  int backSize=Fonts.XLARGE.getLineHeight() * 2 / 3;
  Image backArrow=GameImage.CHEVRON_LEFT.getImage().getScaledCopy(backSize,backSize);
  this.backButton=new MenuButton(backArrow,0,0);
  backButton.setHoverExpand(1.5f);
  Image restartImg=GameImage.UPDATE.getImage().getScaledCopy(backSize,backSize);
  this.restartButton=new MenuButton(restartImg,0,0);
  restartButton.setHoverAnimationDuration(2000);
  restartButton.setHoverRotate(360);
  searchField=new TextField(container,null,0,0,0,0);
  searchField.setFocus(true);
  this.scrolling=new KineticScrolling();
}