Program: 5458
Project: 5458
Buggy source:
private void infoPanel(Creature creature,Item item,int left){
  int panelWidth=20;
  if (left < 0)   left=panel.getWidthInCharacters() - panelWidth + left;
  int diffHp=0;
  int diffAtk=0;
  int diffDef=0;
  if (creature != null) {
    if (item.glyph == ')' && creature.weapon != null) {
      diffHp=item.modHp - creature.weapon.modHp;
      diffAtk=item.modAttack - creature.weapon.modAttack;
      diffDef=item.modDefence - creature.weapon.modDefence;
    }
 else     if (item.glyph == ']' && creature.armor != null) {
      diffHp=item.modHp - creature.armor.modHp;
      diffAtk=item.modAttack - creature.armor.modAttack;
      diffDef=item.modDefence - creature.armor.modDefence;
    }
 else {
      diffHp=item.modHp;
      diffAtk=item.modAttack;
      diffDef=item.modDefence;
    }
  }
  char up=(char)24;
  char down=(char)25;
  String diffHpStr=diffHp == 0 ? "String_Node_Str" : (diffHp > 0 ? "String_Node_Str" + up + diffHp : "String_Node_Str" + down + Math.abs(diffHp));
  String diffAtkStr=diffAtk == 0 ? "String_Node_Str" : (diffAtk > 0 ? "String_Node_Str" + up + diffAtk : "String_Node_Str" + down + Math.abs(diffAtk));
  String diffDefStr=diffDef == 0 ? "String_Node_Str" : (diffDef > 0 ? "String_Node_Str" + up + diffDef : "String_Node_Str" + down + Math.abs(diffDef));
  panel.write(pad("String_Node_Str" + item.name,panelWidth),left,1);
  panel.write(pad("String_Node_Str" + item.modHp + diffHpStr,panelWidth),left,2);
  panel.write(pad("String_Node_Str" + item.modAttack + diffAtkStr,panelWidth),left,3);
  panel.write(pad("String_Node_Str" + item.modDefence + diffDefStr,panelWidth),left,4);
}

Fixed version (ground truth):
private void infoPanel(Creature creature,Item item,int left){
  int panelWidth=20;
  if (left < 0)   left=panel.getWidthInCharacters() - panelWidth + left;
  int diffHp=0;
  int diffAtk=0;
  int diffDef=0;
  if (creature != null) {
    if (item.glyph == ')' && creature.weapon != null) {
      diffHp=item.modHp - creature.weapon.modHp;
      diffAtk=item.modAttack - creature.weapon.modAttack;
      diffDef=item.modDefence - creature.weapon.modDefence;
    }
 else     if (item.glyph == ']' && creature.armor != null) {
      diffHp=item.modHp - creature.armor.modHp;
      diffAtk=item.modAttack - creature.armor.modAttack;
      diffDef=item.modDefence - creature.armor.modDefence;
    }
 else {
      diffHp=item.modHp;
      diffAtk=item.modAttack;
      diffDef=item.modDefence;
    }
  }
  char up=(char)24;
  char down=(char)25;
  String diffHpStr=diffHp == 0 ? "String_Node_Str" : (diffHp > 0 ? "String_Node_Str" + up + diffHp : "String_Node_Str" + down + Math.abs(diffHp));
  String diffAtkStr=diffAtk == 0 ? "String_Node_Str" : (diffAtk > 0 ? "String_Node_Str" + up + diffAtk : "String_Node_Str" + down + Math.abs(diffAtk));
  String diffDefStr=diffDef == 0 ? "String_Node_Str" : (diffDef > 0 ? "String_Node_Str" + up + diffDef : "String_Node_Str" + down + Math.abs(diffDef));
  panel.write(pad("String_Node_Str" + item.name,panelWidth),left,1);
  panel.write("String_Node_Str" + item.modHp,left,2);
  panel.write(pad(diffHpStr,(panelWidth + left) - panel.getCursorX()),diffHp > 0 ? AsciiPanel.green : AsciiPanel.red);
  panel.write("String_Node_Str" + item.modAttack,left,3);
  panel.write(pad(diffAtkStr,(panelWidth + left) - panel.getCursorX()),diffAtk > 0 ? AsciiPanel.green : AsciiPanel.red);
  panel.write("String_Node_Str" + item.modDefence,left,4);
  panel.write(pad(diffDefStr,(panelWidth + left) - panel.getCursorX()),diffDef > 0 ? AsciiPanel.green : AsciiPanel.red);
}