Program: 112488
Project: 112488
Buggy source:
/** 
 * Draws stored hit results and removes them from the list as necessary.
 * @param trackPosition the current track position (in ms)
 */
public void drawHitResults(int trackPosition){
  Iterator<HitObjectResult> iter=hitResultList.iterator();
  while (iter.hasNext()) {
    HitObjectResult hitResult=iter.next();
    if (hitResult.time + HITRESULT_TIME > trackPosition) {
      if (hitResult.hitResultType == HitObjectType.SPINNER && hitResult.result != HIT_MISS) {
        Image spinnerOsu=GameImage.SPINNER_OSU.getImage();
        spinnerOsu.setAlpha(hitResult.alpha);
        spinnerOsu.drawCentered(width / 2,height / 4);
        spinnerOsu.setAlpha(1f);
      }
 else       if (Options.isHitLightingEnabled() && hitResult.result != HIT_MISS && hitResult.result != HIT_SLIDER30 && hitResult.result != HIT_SLIDER10) {
        Image lighting=GameImage.LIGHTING.getImage();
        lighting.setAlpha(hitResult.alpha);
        lighting.drawCentered(hitResult.x,hitResult.y,hitResult.color);
      }
      if (hitResult.result != HIT_MISS && (hitResult.hitResultType == HitObjectType.CIRCLE || hitResult.hitResultType == HitObjectType.SLIDER_FIRST || hitResult.hitResultType == HitObjectType.SLIDER_LAST)) {
        float scale=(!hitResult.expand) ? 1f : Utils.easeOut(Utils.clamp(trackPosition - hitResult.time,0,HITCIRCLE_FADE_TIME),1f,HITCIRCLE_ANIM_SCALE - 1f,HITCIRCLE_FADE_TIME);
        float alpha=Utils.easeOut(Utils.clamp(trackPosition - hitResult.time,0,HITCIRCLE_FADE_TIME),1f,-1f,HITCIRCLE_FADE_TIME);
        if (hitResult.curve != null) {
          float oldWhiteAlpha=Utils.COLOR_WHITE_FADE.a;
          float oldColorAlpha=hitResult.color.a;
          Utils.COLOR_WHITE_FADE.a=alpha;
          hitResult.color.a=alpha;
          hitResult.curve.draw(hitResult.color);
          Utils.COLOR_WHITE_FADE.a=oldWhiteAlpha;
          hitResult.color.a=oldColorAlpha;
        }
        Image scaledHitCircle=GameImage.HITCIRCLE.getImage().getScaledCopy(scale);
        Image scaledHitCircleOverlay=GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(scale);
        scaledHitCircle.setAlpha(alpha);
        scaledHitCircleOverlay.setAlpha(alpha);
        scaledHitCircle.drawCentered(hitResult.x,hitResult.y,hitResult.color);
        scaledHitCircleOverlay.drawCentered(hitResult.x,hitResult.y);
      }
      if (hitResult.hitResultType == HitObjectType.CIRCLE || hitResult.hitResultType == HitObjectType.SPINNER || hitResult.curve != null) {
        float scale=Utils.easeBounce(Utils.clamp(trackPosition - hitResult.time,0,HITCIRCLE_TEXT_BOUNCE_TIME),1f,HITCIRCLE_TEXT_ANIM_SCALE - 1f,HITCIRCLE_TEXT_BOUNCE_TIME);
        float alpha=Utils.easeOut(Utils.clamp((trackPosition - hitResult.time) - HITCIRCLE_FADE_TIME,0,HITCIRCLE_TEXT_FADE_TIME),1f,-1f,HITCIRCLE_TEXT_FADE_TIME);
        Image scaledHitResult=hitResults[hitResult.result].getScaledCopy(scale);
        scaledHitResult.setAlpha(alpha);
        scaledHitResult.drawCentered(hitResult.x,hitResult.y);
      }
      hitResult.alpha=1 - ((float)(trackPosition - hitResult.time) / HITRESULT_FADE_TIME);
    }
 else {
      if (hitResult.curve != null)       hitResult.curve.discardCache();
      iter.remove();
    }
  }
}

Fixed version (ground truth):
/** 
 * Draws stored hit results and removes them from the list as necessary.
 * @param trackPosition the current track position (in ms)
 */
public void drawHitResults(int trackPosition){
  Iterator<HitObjectResult> iter=hitResultList.iterator();
  while (iter.hasNext()) {
    HitObjectResult hitResult=iter.next();
    if (hitResult.time + HITRESULT_TIME > trackPosition) {
      if (hitResult.hitResultType == HitObjectType.SPINNER && hitResult.result != HIT_MISS) {
        Image spinnerOsu=GameImage.SPINNER_OSU.getImage();
        spinnerOsu.setAlpha(hitResult.alpha);
        spinnerOsu.drawCentered(width / 2,height / 4);
        spinnerOsu.setAlpha(1f);
      }
 else       if (Options.isHitLightingEnabled() && !hitResult.hideResult && hitResult.result != HIT_MISS && hitResult.result != HIT_SLIDER30 && hitResult.result != HIT_SLIDER10) {
        Image lighting=GameImage.LIGHTING.getImage();
        lighting.setAlpha(hitResult.alpha);
        lighting.drawCentered(hitResult.x,hitResult.y,hitResult.color);
      }
      if (hitResult.result != HIT_MISS && (hitResult.hitResultType == HitObjectType.CIRCLE || hitResult.hitResultType == HitObjectType.SLIDER_FIRST || hitResult.hitResultType == HitObjectType.SLIDER_LAST)) {
        float progress=AnimationEquation.OUT_CUBIC.calc((float)Utils.clamp(trackPosition - hitResult.time,0,HITCIRCLE_FADE_TIME) / HITCIRCLE_FADE_TIME);
        float scale=(!hitResult.expand) ? 1f : 1f + (HITCIRCLE_ANIM_SCALE - 1f) * progress;
        float alpha=1f - progress;
        if (hitResult.curve != null) {
          float oldWhiteAlpha=Utils.COLOR_WHITE_FADE.a;
          float oldColorAlpha=hitResult.color.a;
          Utils.COLOR_WHITE_FADE.a=alpha;
          hitResult.color.a=alpha;
          hitResult.curve.draw(hitResult.color);
          Utils.COLOR_WHITE_FADE.a=oldWhiteAlpha;
          hitResult.color.a=oldColorAlpha;
        }
        if (!(hitResult.hitResultType == HitObjectType.CIRCLE && GameMod.HIDDEN.isActive())) {
          Image scaledHitCircle=GameImage.HITCIRCLE.getImage().getScaledCopy(scale);
          Image scaledHitCircleOverlay=GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(scale);
          scaledHitCircle.setAlpha(alpha);
          scaledHitCircleOverlay.setAlpha(alpha);
          scaledHitCircle.drawCentered(hitResult.x,hitResult.y,hitResult.color);
          scaledHitCircleOverlay.drawCentered(hitResult.x,hitResult.y);
        }
      }
      if (!hitResult.hideResult && (hitResult.hitResultType == HitObjectType.CIRCLE || hitResult.hitResultType == HitObjectType.SPINNER || hitResult.curve != null)) {
        float scaleProgress=AnimationEquation.IN_OUT_BOUNCE.calc((float)Utils.clamp(trackPosition - hitResult.time,0,HITCIRCLE_TEXT_BOUNCE_TIME) / HITCIRCLE_TEXT_BOUNCE_TIME);
        float scale=1f + (HITCIRCLE_TEXT_ANIM_SCALE - 1f) * scaleProgress;
        float fadeProgress=AnimationEquation.OUT_CUBIC.calc((float)Utils.clamp((trackPosition - hitResult.time) - HITCIRCLE_FADE_TIME,0,HITCIRCLE_TEXT_FADE_TIME) / HITCIRCLE_TEXT_FADE_TIME);
        float alpha=1f - fadeProgress;
        Image scaledHitResult=hitResults[hitResult.result].getScaledCopy(scale);
        scaledHitResult.setAlpha(alpha);
        scaledHitResult.drawCentered(hitResult.x,hitResult.y);
      }
      hitResult.alpha=1 - ((float)(trackPosition - hitResult.time) / HITRESULT_FADE_TIME);
    }
 else {
      if (hitResult.curve != null)       hitResult.curve.discardCache();
      iter.remove();
    }
  }
}