Program: 24596
Project: 24596
Buggy source:
/** 
 * Change routing settings
 */
public void updateRouting(Period per){
  if (this.open == true) {
    if (Alfred.run) {
      if (checkRouting()) {
        JsonObject newAllocation=new JsonObject();
        JsonObject newRouting=new JsonObject();
        JsonObject newIndex=new JsonObject();
        for (        String route : Alfred.allocation) {
          try {
            String[] sRoute=route.split("String_Node_Str");
            String routeValue=sRoute[1];
            String[] routeKey=sRoute[0].split("String_Node_Str");
            String routeType=routeKey[0];
            String routeItem=routeKey[1];
            if (newAllocation.has(routeType)) {
              newAllocation.getAsJsonObject(routeType).addProperty(routeItem,routeValue);
            }
 else {
              JsonObject newTypeEntry=new JsonObject();
              newTypeEntry.addProperty(routeItem,routeValue);
              newAllocation.add(routeType,newTypeEntry);
            }
          }
 catch (          Exception e) {
            Alfred.println("String_Node_Str","String_Node_Str" + e.getMessage());
          }
        }
        newRouting.add("String_Node_Str",newAllocation);
        newIndex.add("String_Node_Str",newRouting);
        newIndex.toString();
        Alfred.println("String_Node_Str","String_Node_Str" + newIndex.toString());
        try {
          Alfred.putURL("String_Node_Str" + this.name + "String_Node_Str",newIndex.toString());
        }
 catch (        Exception e) {
          Alfred.println("String_Node_Str","String_Node_Str" + e.getMessage());
          if (Alfred.retries > 1) {
            int r=1;
            while (r != Alfred.retries) {
              try {
                Alfred.putURL("String_Node_Str" + this.name + "String_Node_Str",newIndex.toString());
                r=Alfred.retries;
              }
 catch (              Exception ce) {
                Alfred.println("String_Node_Str","String_Node_Str" + ce.getMessage());
                r++;
              }
            }
          }
        }
      }
    }
 else {
      if (checkRouting()) {
        if (this.timeunit.equalsIgnoreCase("String_Node_Str")) {
          String expireTime=(per.getYears() != 0 ? "String_Node_Str" + Math.abs(per.getYears()) + "String_Node_Str" : "String_Node_Str") + (per.getDays() != 0 ? "String_Node_Str" + Math.abs(per.getDays()) + "String_Node_Str" : "String_Node_Str") + Math.abs(per.getHours())+ "String_Node_Str";
          Alfred.println("String_Node_Str","String_Node_Str" + this.name + "String_Node_Str"+ expireTime+ "String_Node_Str");
        }
 else         if (this.timeunit.equalsIgnoreCase("String_Node_Str")) {
          String expireTime=Math.abs(per.getDays()) + "String_Node_Str";
          Alfred.println("String_Node_Str","String_Node_Str" + this.name + "String_Node_Str"+ expireTime+ "String_Node_Str");
        }
 else {
          Alfred.println("String_Node_Str","String_Node_Str" + this.name + "String_Node_Str");
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Change routing settings
 */
public void updateRouting(Period per){
  if (this.open == true) {
    if (Alfred.run) {
      if (checkRouting()) {
        JsonObject newAllocation=new JsonObject();
        JsonObject newRouting=new JsonObject();
        JsonObject newIndex=new JsonObject();
        for (        String route : Alfred.allocation) {
          try {
            String[] sRoute=route.split("String_Node_Str");
            String routeValue=sRoute[1];
            String[] routeKey=sRoute[0].split("String_Node_Str");
            String routeType=routeKey[0];
            String routeItem=routeKey[1];
            if (newAllocation.has(routeType)) {
              newAllocation.getAsJsonObject(routeType).addProperty(routeItem,routeValue);
            }
 else {
              JsonObject newTypeEntry=new JsonObject();
              newTypeEntry.addProperty(routeItem,routeValue);
              newAllocation.add(routeType,newTypeEntry);
            }
          }
 catch (          Exception e) {
            e.printStackTrace();
            Alfred.println("String_Node_Str","String_Node_Str" + e.getMessage());
          }
        }
        newRouting.add("String_Node_Str",newAllocation);
        newIndex.add("String_Node_Str",newRouting);
        newIndex.toString();
        Alfred.println("String_Node_Str","String_Node_Str" + newIndex.toString());
        try {
          Alfred.putURL("String_Node_Str" + this.name + "String_Node_Str",newIndex.toString());
        }
 catch (        Exception e) {
          Alfred.println("String_Node_Str","String_Node_Str" + e.getMessage());
          if (Alfred.retries > 1) {
            int r=1;
            while (r != Alfred.retries) {
              try {
                Alfred.putURL("String_Node_Str" + this.name + "String_Node_Str",newIndex.toString());
                r=Alfred.retries;
              }
 catch (              Exception ce) {
                Alfred.println("String_Node_Str","String_Node_Str" + ce.getMessage());
                r++;
              }
            }
          }
        }
      }
    }
 else {
      if (checkRouting()) {
        if (this.timeunit.equalsIgnoreCase("String_Node_Str")) {
          String expireTime=(per.getYears() != 0 ? "String_Node_Str" + Math.abs(per.getYears()) + "String_Node_Str" : "String_Node_Str") + (per.getDays() != 0 ? "String_Node_Str" + Math.abs(per.getDays()) + "String_Node_Str" : "String_Node_Str") + Math.abs(per.getHours())+ "String_Node_Str";
          Alfred.println("String_Node_Str","String_Node_Str" + this.name + "String_Node_Str"+ expireTime+ "String_Node_Str");
        }
 else         if (this.timeunit.equalsIgnoreCase("String_Node_Str")) {
          String expireTime=Math.abs(per.getDays()) + "String_Node_Str";
          Alfred.println("String_Node_Str","String_Node_Str" + this.name + "String_Node_Str"+ expireTime+ "String_Node_Str");
        }
 else {
          Alfred.println("String_Node_Str","String_Node_Str" + this.name + "String_Node_Str");
        }
      }
    }
  }
}