Program: 34616
Project: 34616
Buggy source:
@Override protected void mouseClicked(int mouseX,int mouseY,int buttonId){
  if (buttonId == 0 && achievements != null && screenType == 0) {
    if (mouseX < width / 2 - 113 || mouseX > width / 2 + 113 || mouseY < height / 2 - 84 || mouseY > height / 2 + 68) {
      super.mouseClicked(mouseX,mouseY,buttonId);
      return;
    }
    int offsetX=MathUtil.clamp(MathUtil.floor(field_146567_u),AchievementList.minDisplayColumn * 24 - 112,AchievementList.maxDisplayColumn * 24 - 78);
    int offsetY=MathUtil.clamp(MathUtil.floor(field_146566_v),AchievementList.minDisplayRow * 24 - 112,AchievementList.maxDisplayRow * 24 - 78);
    int centerX=(width - field_146555_f) / 2 + 16;
    int centerY=(height - field_146557_g) / 2 + 17;
    float realMouseX=(mouseX - centerX) * field_146570_r;
    float realMouseY=(mouseY - centerY) * field_146570_r;
    for (    Achievement achievement : achievements.getAchievements()) {
      int x=achievement.displayColumn * 24 - offsetX;
      int y=achievement.displayRow * 24 - offsetY;
      if (x >= -24 && y >= -24 && x <= 224F * field_146570_r && y <= 155F * field_146570_r && realMouseX >= x && realMouseX <= x + 22 && realMouseY >= y && realMouseY <= y + 22) {
        KnowledgeObject<? extends IKnowledgeObjectInstance<?>> obj=((HeeAchievement)achievement).getKnowledgeObj();
        if (obj == null)         obj=KnowledgeUtils.tryGetFromItemStack(achievement.theItemStack);
        if (obj != null)         CompendiumEventsClient.openCompendium(obj);
      }
    }
  }
 else   if (buttonId == 1) {
    mc.displayGuiScreen(field_146562_a);
  }
  super.mouseClicked(mouseX,mouseY,buttonId);
}

Fixed version (ground truth):
@Override protected void mouseClicked(int mouseX,int mouseY,int buttonId){
  if (buttonId == 0 && achievements != null && screenType == 0) {
    if (mouseX < width / 2 - 113 || mouseX > width / 2 + 113 || mouseY < height / 2 - 84 || mouseY > height / 2 + 68) {
      super.mouseClicked(mouseX,mouseY,buttonId);
      return;
    }
    int offsetX=MathUtil.clamp(MathUtil.floor(field_146567_u),AchievementList.minDisplayColumn * 24 - 112,AchievementList.maxDisplayColumn * 24 - 78);
    int offsetY=MathUtil.clamp(MathUtil.floor(field_146566_v),AchievementList.minDisplayRow * 24 - 112,AchievementList.maxDisplayRow * 24 - 78);
    int centerX=(width - field_146555_f) / 2 + 16;
    int centerY=(height - field_146557_g) / 2 + 17;
    float realMouseX=(mouseX - centerX) * field_146570_r;
    float realMouseY=(mouseY - centerY) * field_146570_r;
    for (    Achievement achievement : achievements.getAchievements()) {
      int x=achievement.displayColumn * 24 - offsetX;
      int y=achievement.displayRow * 24 - offsetY;
      if (x >= -24 && y >= -24 && x <= 224F * field_146570_r && y <= 155F * field_146570_r && realMouseX >= x && realMouseX <= x + 22 && realMouseY >= y && realMouseY <= y + 22) {
        KnowledgeObject<? extends IObjectHolder<?>> obj=((HeeAchievement)achievement).getKnowledgeObj();
        if (obj == null)         obj=KnowledgeUtils.tryGetFromItemStack(achievement.theItemStack);
        if (obj != null)         CompendiumEventsClient.openCompendium(obj);
      }
    }
  }
 else   if (buttonId == 1) {
    mc.displayGuiScreen(field_146562_a);
  }
  super.mouseClicked(mouseX,mouseY,buttonId);
}