Program: 13902
Project: 13902
Buggy source:
private void addChangeLevelButtons(){
  screenCount=(levelInfos.size() / 12) + 1;
  currentScreen=0;
  rightArrow=new ButtonSprite(camera.getWidth() * 0.93f - LEVEL_SELECT_ICON_WIDTH,camera.getHeight() * 0.8f,resourcesManager.levelChoiceArrowRightRegion,vbom,new ButtonSprite.OnClickListener(){
    @Override public void onClick(    ButtonSprite pButtonSprite,    float pTouchAreaLocalX,    float pTouchAreaLocalY){
      if (currentScreen < screenCount - 1) {
        currentScreen++;
        entityToFollow.registerEntityModifier(new MoveXModifier(0.5f,entityToFollow.getX(),currentScreen * camera.getWidth() + camera.getWidth() / 2,EaseQuartInOut.getInstance()));
        if (currentScreen == screenCount - 1) {
          rightArrow.setVisible(false);
        }
        leftArrow.setVisible(true);
      }
    }
  }
);
  leftArrow=new ButtonSprite(camera.getWidth() * 0.07f,camera.getHeight() * 0.8f,resourcesManager.levelChoiceArrowLeftRegion,vbom,new ButtonSprite.OnClickListener(){
    @Override public void onClick(    ButtonSprite pButtonSprite,    float pTouchAreaLocalX,    float pTouchAreaLocalY){
      if (currentScreen > 0) {
        currentScreen--;
        entityToFollow.registerEntityModifier(new MoveXModifier(0.5f,entityToFollow.getX(),currentScreen * camera.getWidth() + camera.getWidth() / 2,EaseQuartInOut.getInstance()));
        if (currentScreen == 0) {
          leftArrow.setVisible(false);
        }
        rightArrow.setVisible(true);
      }
    }
  }
);
  leftArrow.setVisible(false);
  if (screenCount == 1) {
    rightArrow.setVisible(false);
  }
  arrowHud=new HUD();
  arrowHud.attachChild(leftArrow);
  arrowHud.attachChild(rightArrow);
  arrowHud.registerTouchArea(leftArrow);
  arrowHud.registerTouchArea(rightArrow);
  camera.setHUD(arrowHud);
  entityToFollow=new Entity(camera.getWidth() / 2,camera.getHeight() / 2);
  attachChild(entityToFollow);
  camera.setChaseEntity(entityToFollow);
}

Fixed version (ground truth):
private void addChangeLevelButtons(){
  screenCount=(((int)(levelInfos.size() - 0.1) / 12)) + 1;
  currentScreen=0;
  rightArrow=new ButtonSprite(camera.getWidth() * 0.93f - LEVEL_SELECT_ICON_WIDTH,camera.getHeight() * 0.8f,resourcesManager.levelChoiceArrowRightRegion,vbom,new ButtonSprite.OnClickListener(){
    @Override public void onClick(    ButtonSprite pButtonSprite,    float pTouchAreaLocalX,    float pTouchAreaLocalY){
      if (currentScreen < screenCount - 1) {
        currentScreen++;
        entityToFollow.registerEntityModifier(new MoveXModifier(0.5f,entityToFollow.getX(),currentScreen * camera.getWidth() + camera.getWidth() / 2,EaseQuartInOut.getInstance()));
        if (currentScreen == screenCount - 1) {
          rightArrow.setVisible(false);
        }
        leftArrow.setVisible(true);
      }
    }
  }
);
  leftArrow=new ButtonSprite(camera.getWidth() * 0.07f,camera.getHeight() * 0.8f,resourcesManager.levelChoiceArrowLeftRegion,vbom,new ButtonSprite.OnClickListener(){
    @Override public void onClick(    ButtonSprite pButtonSprite,    float pTouchAreaLocalX,    float pTouchAreaLocalY){
      if (currentScreen > 0) {
        currentScreen--;
        entityToFollow.registerEntityModifier(new MoveXModifier(0.5f,entityToFollow.getX(),currentScreen * camera.getWidth() + camera.getWidth() / 2,EaseQuartInOut.getInstance()));
        if (currentScreen == 0) {
          leftArrow.setVisible(false);
        }
        rightArrow.setVisible(true);
      }
    }
  }
);
  leftArrow.setVisible(false);
  if (screenCount == 1) {
    rightArrow.setVisible(false);
  }
  arrowHud=new HUD();
  arrowHud.attachChild(leftArrow);
  arrowHud.attachChild(rightArrow);
  arrowHud.registerTouchArea(leftArrow);
  arrowHud.registerTouchArea(rightArrow);
  camera.setHUD(arrowHud);
  entityToFollow=new Entity(camera.getWidth() / 2,camera.getHeight() / 2);
  attachChild(entityToFollow);
  camera.setChaseEntity(entityToFollow);
}