Program: 37993
Project: 37993
Buggy source:
public void countNodeLicenses(ArrayList<TimeRange> timeRanges,HashMap<String,ArrayList<Node>> dotNetMap,ArrayList<String> dotNetKeys){
  logger.log(Level.INFO,new StringBuilder().append("String_Node_Str").append(name).toString());
  for (  NodeLicenseCount nodeL : nodeLicenseCount) {
    nodeL.countNodeLicenseRange(s.percentageThreshold);
  }
  for (int i=0; i < timeRanges.size(); i++) {
    TierLicenseRange tRange=new TierLicenseRange();
    tRange.setStart(timeRanges.get(i).getStart());
    tRange.setEnd(timeRanges.get(i).getEnd());
    tRange.setName(tRange.createName());
    HashMap<String,ArrayList<Node>> dotNetMapTemp=new HashMap<String,ArrayList<Node>>(dotNetMap);
    ArrayList<String> found=new ArrayList<String>();
    for (    NodeLicenseCount node : nodeLicenseCount) {
      if (node.getRangeValues().size() > i && node.getRangeValues().get(i).isCountAsLicense()) {
switch (node.getType()) {
case 1:
          StringBuilder bud=new StringBuilder();
        bud.append("String_Node_Str").append(node.getNode().getName()).append("String_Node_Str").append(tRange.iisCount);
      if (dotNetMapTemp.containsKey(node.getMachineName()) && !found.contains(node.getMachineName()) && !dotNetKeys.contains(getNodeKey(tRange,node.getMachineName()))) {
        tRange.iisCount++;
        tRange.totalCount++;
        found.add(node.getMachineName());
        dotNetKeys.add(getNodeKey(tRange,node.getMachineName()));
        bud.append("String_Node_Str").append(tRange.getStart()).append("String_Node_Str").append(tRange.getEnd());
        bud.append("String_Node_Str").append(node.getNode().getTierName());
      }
    bud.append("String_Node_Str").append(tRange.iisInternalCount);
  tRange.iisInternalCount++;
bud.append("String_Node_Str").append(tRange.iisCount).append("String_Node_Str").append(tRange.iisInternalCount);
break;
case 2:
tRange.phpCount++;
tRange.totalCount++;
break;
case 3:
tRange.nodeJSCount++;
tRange.totalCount++;
break;
case 4:
tRange.machineCount++;
tRange.totalCount++;
break;
default :
tRange.javaCount++;
tRange.totalCount++;
break;
}
}
}
tierLicenseRange.add(tRange);
}
for (TierLicenseRange tRange : tierLicenseRange) {
totalRangeValue.iisCount+=tRange.iisCount;
totalRangeValue.javaCount+=tRange.javaCount;
totalRangeValue.phpCount+=tRange.phpCount;
totalRangeValue.nodeJSCount+=tRange.nodeJSCount;
totalRangeValue.machineCount+=tRange.machineCount;
totalRangeValue.totalCount+=tRange.totalCount;
totalRangeValue.iisInternalCount+=tRange.iisInternalCount;
}
}

Fixed version (ground truth):
public void countNodeLicenses(ArrayList<TimeRange> timeRanges,HashMap<String,ArrayList<Node>> dotNetMap,ArrayList<String> dotNetKeys){
  logger.log(Level.INFO,new StringBuilder().append("String_Node_Str").append(name).toString());
  for (  NodeLicenseCount nodeL : nodeLicenseCount) {
    nodeL.countNodeLicenseRange(s.percentageThreshold);
  }
  for (int i=0; i < timeRanges.size(); i++) {
    TierLicenseRange tRange=new TierLicenseRange();
    tRange.setStart(timeRanges.get(i).getStart());
    tRange.setEnd(timeRanges.get(i).getEnd());
    tRange.setName(tRange.createName());
    HashMap<String,ArrayList<Node>> dotNetMapTemp=new HashMap<String,ArrayList<Node>>(dotNetMap);
    ArrayList<String> found=new ArrayList<String>();
    for (    NodeLicenseCount node : nodeLicenseCount) {
      if (node.getRangeValues().size() > i && node.getRangeValues().get(i).isCountAsLicense()) {
switch (node.getType()) {
case 1:
          StringBuilder bud=new StringBuilder();
        bud.append("String_Node_Str").append(node.getNode().getName()).append("String_Node_Str").append(tRange.iisCount);
      if (dotNetMapTemp.containsKey(node.getMachineName()) && !found.contains(node.getMachineName()) && !dotNetKeys.contains(getNodeKey(tRange,node.getMachineName()))) {
        tRange.iisCount++;
        tRange.totalCount++;
        found.add(node.getMachineName());
        dotNetKeys.add(getNodeKey(tRange,node.getMachineName()));
        bud.append("String_Node_Str").append(tRange.getStart()).append("String_Node_Str").append(tRange.getEnd());
        bud.append("String_Node_Str").append(node.getNode().getTierName());
      }
    bud.append("String_Node_Str").append(tRange.iisInternalCount);
  tRange.iisInternalCount++;
bud.append("String_Node_Str").append(tRange.iisCount).append("String_Node_Str").append(tRange.iisInternalCount);
break;
case 2:
tRange.phpCount++;
tRange.totalCount++;
break;
case 3:
tRange.nodeJSCount++;
tRange.totalCount++;
break;
case 4:
tRange.machineCount++;
tRange.totalCount++;
break;
case 6:
tRange.webserverCount++;
tRange.totalCount++;
default :
tRange.javaCount++;
tRange.totalCount++;
break;
}
}
}
tierLicenseRange.add(tRange);
}
for (TierLicenseRange tRange : tierLicenseRange) {
totalRangeValue.iisCount+=tRange.iisCount;
totalRangeValue.javaCount+=tRange.javaCount;
totalRangeValue.phpCount+=tRange.phpCount;
totalRangeValue.nodeJSCount+=tRange.nodeJSCount;
totalRangeValue.machineCount+=tRange.machineCount;
totalRangeValue.totalCount+=tRange.totalCount;
totalRangeValue.iisInternalCount+=tRange.iisInternalCount;
totalRangeValue.webserverCount+=tRange.webserverCount;
}
}