Program: 83583
Project: 83583
Buggy source:
public void RentAbility(Player player,String abilityname){
  DebugPrint("String_Node_Str" + abilityname);
  for (  Ability ab : Abilities.keySet()) {
    DebugPrint("String_Node_Str" + abilityname + "String_Node_Str"+ ab.name);
    if (ab.name.equalsIgnoreCase(abilityname)) {
      DebugPrint(abilityname + "String_Node_Str" + ab.rentCost);
      if (ab.rentCost >= 0) {
        if (ab.rentCost == 0) {
          DebugPrint(abilityname + "String_Node_Str");
          if (Method.getAccount(player.getName()).hasEnough(ab.rentAmount)) {
            DebugPrint("String_Node_Str");
switch (AddPlayerNode(player,ab)) {
case 0:
              Method.getAccount(player.getName()).subtract(ab.rentAmount);
            RentedAbilities.add(new PurchasedAbility(player.getName(),ab));
          Map<String,String> replace=new HashMap<String,String>();
        replace.putAll(ProcessMsgVars(player));
      replace.putAll(ProcessMsgVars(ab));
    String msg=ProcessMsg(ab.rentGainedMsg,replace);
  if (ab.broadcast)   getServer().broadcastMessage(msg);
 else   player.sendMessage(msg);
break;
case 1:
player.sendMessage("String_Node_Str" + ab.name);
break;
case 2:
player.sendMessage("String_Node_Str" + ab.name + "String_Node_Str");
break;
}
}
 else {
player.sendMessage("String_Node_Str" + Method.format(ab.rentAmount));
}
}
 else {
DebugPrint(abilityname + "String_Node_Str" + ab.rentCost+ "String_Node_Str");
ItemStack item=new ItemStack(ab.rentCost,(int)ab.rentAmount);
if (CheckItems(player,item)) {
DebugPrint("String_Node_Str");
switch (AddPlayerNode(player,ab)) {
case 0:
ConsumeItems(player,item);
Map<String,String> replace=new HashMap<String,String>();
replace.putAll(ProcessMsgVars(player));
replace.putAll(ProcessMsgVars(ab));
String msg=ProcessMsg(ab.rentGainedMsg,replace);
if (ab.broadcast) getServer().broadcastMessage(msg);
 else player.sendMessage(msg);
break;
case 1:
player.sendMessage("String_Node_Str" + ab.name);
break;
case 2:
player.sendMessage("String_Node_Str" + ab.name + "String_Node_Str");
break;
}
}
 else {
player.sendMessage("String_Node_Str" + ab.rentAmount + "String_Node_Str"+ Material.getMaterial(ab.rentCost));
}
}
}
}
}
}

Fixed version (ground truth):
public void RentAbility(Player player,String abilityname){
  DebugPrint("String_Node_Str" + abilityname);
  for (  Ability ab : Abilities.keySet()) {
    DebugPrint("String_Node_Str" + abilityname + "String_Node_Str"+ ab.name);
    if (ab.name.equalsIgnoreCase(abilityname)) {
      DebugPrint(abilityname + "String_Node_Str" + ab.rentCost);
      if (ab.rentCost >= 0) {
        if (ab.rentCost == 0) {
          DebugPrint(abilityname + "String_Node_Str");
          if (Method.getAccount(player.getName()).hasEnough(ab.rentAmount)) {
            DebugPrint("String_Node_Str");
switch (AddPlayerNode(player,ab)) {
case 0:
              Method.getAccount(player.getName()).subtract(ab.rentAmount);
            RentedAbilities.add(new PurchasedAbility(player.getName(),ab));
          Map<String,String> replace=new HashMap<String,String>();
        replace.putAll(ProcessMsgVars(player));
      replace.putAll(ProcessMsgVars(ab));
    String msg=ProcessMsg(ab.rentGainedMsg,replace);
  if (ab.broadcast)   getServer().broadcastMessage(msg);
 else   player.sendMessage(msg);
break;
case 1:
player.sendMessage("String_Node_Str" + ab.name);
break;
case 2:
player.sendMessage("String_Node_Str" + ab.name + "String_Node_Str");
break;
}
}
 else {
player.sendMessage("String_Node_Str" + Method.format(ab.rentAmount));
}
}
 else {
DebugPrint(abilityname + "String_Node_Str" + ab.rentCost+ "String_Node_Str");
ItemStack item=new ItemStack(ab.rentCost,(int)ab.rentAmount);
if (CheckItems(player,item)) {
DebugPrint("String_Node_Str");
switch (AddPlayerNode(player,ab)) {
case 0:
ConsumeItems(player,item);
Map<String,String> replace=new HashMap<String,String>();
replace.putAll(ProcessMsgVars(player));
replace.putAll(ProcessMsgVars(ab));
String msg=ProcessMsg(ab.rentGainedMsg,replace);
if (ab.broadcast) getServer().broadcastMessage(msg);
 else player.sendMessage(msg);
break;
case 1:
player.sendMessage("String_Node_Str" + ab.name);
break;
case 2:
player.sendMessage("String_Node_Str" + ab.name + "String_Node_Str");
break;
}
}
 else {
player.sendMessage("String_Node_Str" + ab.rentAmount + "String_Node_Str"+ Material.getMaterial(ab.rentCost));
}
}
}
}
}
saveRent();
}