Program: 88466
Project: 88466
Buggy source:
/** 
 * Reads the instance types configured in the config file. The config file needs to contain a key <code>clustermgr.nrtypes</code> that indicates the number of instance types that are supported by the cluster. This is followed by entries <code>clustermgr.instancetype.X</code> where X is a number from 1 to the specified number of entries. Each entry follows the format: "instancename,numComputeUnits,numCores,memorySize,diskCapacity,pricePerHour" (see   {@link InstanceType}).
 * @return list of available instance types sorted by price (cheapest tomost expensive)
 */
private InstanceType[] populateInstanceTypeArray(){
  final List<InstanceType> instanceTypes=Lists.newArrayList();
  int count=1;
  while (true) {
    final String key=INSTANCE_TYPE_PREFIX_KEY + Integer.toString(count);
    String descr=GlobalConfiguration.getString(key,null);
    if (descr == null) {
      if (count == 1) {
        LOG.error("String_Node_Str" + DEFAULT_INSTANCE_TYPE);
        descr=DEFAULT_INSTANCE_TYPE;
      }
 else {
        break;
      }
    }
    try {
      instanceTypes.add(InstanceType.getTypeFromString(descr));
    }
 catch (    Throwable t) {
      LOG.error("String_Node_Str" + key + "String_Node_Str"+ descr,t);
    }
    ++count;
  }
  Collections.sort(instanceTypes,new Comparator<InstanceType>(){
    @Override public int compare(    InstanceType o1,    InstanceType o2){
      return o1.getPricePerHour() - o2.getPricePerHour();
    }
  }
);
  return instanceTypes.toArray(new InstanceType[0]);
}

Fixed version (ground truth):
/** 
 * Reads the instance types configured in the config file. The config file needs to contain a key <code>clustermgr.nrtypes</code> that indicates the number of instance types that are supported by the cluster. This is followed by entries <code>clustermgr.instancetype.X</code> where X is a number from 1 to the specified number of entries. Each entry follows the format: "instancename,numComputeUnits,numCores,memorySize,diskCapacity,pricePerHour" (see   {@link InstanceType}).
 * @return list of available instance types sorted by price (cheapest tomost expensive)
 */
public static InstanceType[] populateInstanceTypeArray(Log log){
  final List<InstanceType> instanceTypes=new ArrayList<InstanceType>();
  int count=1;
  while (true) {
    final String key=ConfigConstants.INSTANCE_MANAGER_INSTANCE_TYPE_PREFIX_KEY + Integer.toString(count);
    String descr=GlobalConfiguration.getString(key,null);
    if (descr == null) {
      if (count == 1) {
        if (log != null) {
          LOG.error("String_Node_Str" + "String_Node_Str" + ConfigConstants.DEFAULT_INSTANCE_TYPE);
        }
        descr=ConfigConstants.DEFAULT_INSTANCE_TYPE;
      }
 else {
        break;
      }
    }
    try {
      instanceTypes.add(InstanceType.getTypeFromString(descr));
    }
 catch (    Throwable t) {
      if (log != null) {
        LOG.error("String_Node_Str" + key + "String_Node_Str"+ descr+ "String_Node_Str"+ ConfigConstants.DEFAULT_INSTANCE_TYPE+ "String_Node_Str"+ count+ "String_Node_Str",t);
      }
      instanceTypes.add(InstanceType.getTypeFromString(ConfigConstants.DEFAULT_INSTANCE_TYPE));
    }
    ++count;
  }
  return instanceTypes.toArray(new InstanceType[instanceTypes.size()]);
}