Program: 112481
Project: 112481
Buggy source:
@Override public void enter(GameContainer container,StateBasedGame game) throws SlickException {
  UI.enter();
  if (beatmap == null || beatmap.objects == null)   throw new RuntimeException("String_Node_Str");
  previousScores=ScoreDB.getMapScores(beatmap);
  lastRankUpdateTime=-1000;
  if (previousScores != null)   currentRank=previousScores.length;
  scoreboardVisible=true;
  currentScoreboardAlpha=0f;
  FrameBufferCache.getInstance().freeMap();
  if (restart != Restart.FALSE) {
    if (isReplay) {
      previousMods=GameMod.getModState();
      GameMod.loadModState(replay.mods);
    }
    data.setGameplay(true);
    if (restart == Restart.NEW) {
      loadImages();
      setMapModifiers();
      retries=0;
    }
 else     if (restart == Restart.MANUAL) {
      retries++;
    }
 else     if (restart == Restart.REPLAY)     retries=0;
    gameObjects=new GameObject[beatmap.objects.length];
    playbackSpeed=PlaybackSpeed.NORMAL;
    resetGameData();
    if (!beatmap.timingPoints.isEmpty()) {
      TimingPoint timingPoint=beatmap.timingPoints.get(0);
      if (!timingPoint.isInherited()) {
        setBeatLength(timingPoint,true);
        timingPointIndex++;
      }
    }
    Color[] combo=beatmap.getComboColors();
    for (int i=0; i < beatmap.objects.length; i++) {
      HitObject hitObject=beatmap.objects[i];
      boolean comboEnd=false;
      if (i + 1 >= beatmap.objects.length || beatmap.objects[i + 1].isNewCombo())       comboEnd=true;
      Color color=combo[hitObject.getComboIndex()];
      int hitObjectTime=hitObject.getTime();
      while (timingPointIndex < beatmap.timingPoints.size()) {
        TimingPoint timingPoint=beatmap.timingPoints.get(timingPointIndex);
        if (timingPoint.getTime() > hitObjectTime)         break;
        setBeatLength(timingPoint,false);
        timingPointIndex++;
      }
      try {
        if (hitObject.isCircle())         gameObjects[i]=new Circle(hitObject,this,data,color,comboEnd);
 else         if (hitObject.isSlider())         gameObjects[i]=new Slider(hitObject,this,data,color,comboEnd);
 else         if (hitObject.isSpinner())         gameObjects[i]=new Spinner(hitObject,this,data);
      }
 catch (      Exception e) {
        ErrorHandler.error(String.format("String_Node_Str",hitObject.getTypeName(),i,hitObject.toString()),e,true);
        gameObjects[i]=new DummyObject(hitObject);
        continue;
      }
    }
    calculateStacks();
    timingPointIndex=0;
    beatLengthBase=beatLength=1;
    if (!beatmap.timingPoints.isEmpty()) {
      TimingPoint timingPoint=beatmap.timingPoints.get(0);
      if (!timingPoint.isInherited()) {
        setBeatLength(timingPoint,true);
        timingPointIndex++;
      }
    }
    if (GameMod.AUTO.isActive() || isReplay)     UI.getCursor().show();
    if (isReplay) {
      replayX=container.getWidth() / 2;
      replayY=container.getHeight() / 2;
      replayKeyPressed=false;
      replaySkipTime=-1;
      for (replayIndex=0; replayIndex < replay.frames.length; replayIndex++) {
        ReplayFrame frame=replay.frames[replayIndex];
        if (frame.getY() < 0) {
          if (frame.getTime() >= 0 && replayIndex > 0)           replaySkipTime=frame.getTime();
        }
 else         if (frame.getTime() == 0) {
          replayX=frame.getScaledX();
          replayY=frame.getScaledY();
          replayKeyPressed=frame.isKeyPressed();
        }
 else         break;
      }
    }
 else {
      lastKeysPressed=ReplayFrame.KEY_NONE;
      replaySkipTime=-1;
      replayFrames=new LinkedList<ReplayFrame>();
      replayFrames.add(new ReplayFrame(0,0,input.getMouseX(),input.getMouseY(),0));
    }
    leadInTime=beatmap.audioLeadIn + approachTime;
    restart=Restart.FALSE;
    MusicController.play(false);
    MusicController.setPosition(0);
    MusicController.setPitch(GameMod.getSpeedMultiplier());
    MusicController.pause();
    SoundController.mute(false);
  }
  skipButton.resetHover();
  if (isReplay || GameMod.AUTO.isActive())   playbackSpeed.getButton().resetHover();
  MusicController.setPitch(GameMod.getSpeedMultiplier() * playbackSpeed.getModifier());
}

Fixed version (ground truth):
@Override public void enter(GameContainer container,StateBasedGame game) throws SlickException {
  UI.enter();
  if (beatmap == null || beatmap.objects == null)   throw new RuntimeException("String_Node_Str");
  previousScores=ScoreDB.getMapScores(beatmap,replay == null ? null : replay.getReplayFilename());
  lastRankUpdateTime=-1000;
  if (previousScores != null)   currentRank=previousScores.length;
  scoreboardVisible=true;
  currentScoreboardAlpha=0f;
  FrameBufferCache.getInstance().freeMap();
  if (restart != Restart.FALSE) {
    if (isReplay) {
      previousMods=GameMod.getModState();
      GameMod.loadModState(replay.mods);
    }
    data.setGameplay(true);
    if (restart == Restart.NEW) {
      loadImages();
      setMapModifiers();
      retries=0;
    }
 else     if (restart == Restart.MANUAL) {
      retries++;
    }
 else     if (restart == Restart.REPLAY)     retries=0;
    gameObjects=new GameObject[beatmap.objects.length];
    playbackSpeed=PlaybackSpeed.NORMAL;
    resetGameData();
    if (!beatmap.timingPoints.isEmpty()) {
      TimingPoint timingPoint=beatmap.timingPoints.get(0);
      if (!timingPoint.isInherited()) {
        setBeatLength(timingPoint,true);
        timingPointIndex++;
      }
    }
    Color[] combo=beatmap.getComboColors();
    for (int i=0; i < beatmap.objects.length; i++) {
      HitObject hitObject=beatmap.objects[i];
      boolean comboEnd=false;
      if (i + 1 >= beatmap.objects.length || beatmap.objects[i + 1].isNewCombo())       comboEnd=true;
      Color color=combo[hitObject.getComboIndex()];
      int hitObjectTime=hitObject.getTime();
      while (timingPointIndex < beatmap.timingPoints.size()) {
        TimingPoint timingPoint=beatmap.timingPoints.get(timingPointIndex);
        if (timingPoint.getTime() > hitObjectTime)         break;
        setBeatLength(timingPoint,false);
        timingPointIndex++;
      }
      try {
        if (hitObject.isCircle())         gameObjects[i]=new Circle(hitObject,this,data,color,comboEnd);
 else         if (hitObject.isSlider())         gameObjects[i]=new Slider(hitObject,this,data,color,comboEnd);
 else         if (hitObject.isSpinner())         gameObjects[i]=new Spinner(hitObject,this,data);
      }
 catch (      Exception e) {
        ErrorHandler.error(String.format("String_Node_Str",hitObject.getTypeName(),i,hitObject.toString()),e,true);
        gameObjects[i]=new DummyObject(hitObject);
        continue;
      }
    }
    calculateStacks();
    timingPointIndex=0;
    beatLengthBase=beatLength=1;
    if (!beatmap.timingPoints.isEmpty()) {
      TimingPoint timingPoint=beatmap.timingPoints.get(0);
      if (!timingPoint.isInherited()) {
        setBeatLength(timingPoint,true);
        timingPointIndex++;
      }
    }
    if (GameMod.AUTO.isActive() || isReplay)     UI.getCursor().show();
    if (isReplay) {
      replayX=container.getWidth() / 2;
      replayY=container.getHeight() / 2;
      replayKeyPressed=false;
      replaySkipTime=-1;
      for (replayIndex=0; replayIndex < replay.frames.length; replayIndex++) {
        ReplayFrame frame=replay.frames[replayIndex];
        if (frame.getY() < 0) {
          if (frame.getTime() >= 0 && replayIndex > 0)           replaySkipTime=frame.getTime();
        }
 else         if (frame.getTime() == 0) {
          replayX=frame.getScaledX();
          replayY=frame.getScaledY();
          replayKeyPressed=frame.isKeyPressed();
        }
 else         break;
      }
    }
 else {
      lastKeysPressed=ReplayFrame.KEY_NONE;
      replaySkipTime=-1;
      replayFrames=new LinkedList<ReplayFrame>();
      replayFrames.add(new ReplayFrame(0,0,input.getMouseX(),input.getMouseY(),0));
    }
    leadInTime=beatmap.audioLeadIn + approachTime;
    restart=Restart.FALSE;
    MusicController.play(false);
    MusicController.setPosition(0);
    MusicController.setPitch(GameMod.getSpeedMultiplier());
    MusicController.pause();
    SoundController.mute(false);
  }
  skipButton.resetHover();
  if (isReplay || GameMod.AUTO.isActive())   playbackSpeed.getButton().resetHover();
  MusicController.setPitch(GameMod.getSpeedMultiplier() * playbackSpeed.getModifier());
}