Program: 89951
Project: 89951
Buggy source:
protected ReformedMetaData reform(ProcessorConfig config,Product product,boolean reservationUsage,String operationStr,String usageTypeStr,String description,double cost){
  Operation operation=null;
  UsageType usageType=null;
  InstanceOs os=null;
  int index=usageTypeStr.indexOf("String_Node_Str");
  String regionShortName=index > 0 ? usageTypeStr.substring(0,index) : "String_Node_Str";
  Region region=regionShortName.isEmpty() ? null : Region.getRegionByShortName(regionShortName);
  if (region != null) {
    usageTypeStr=usageTypeStr.substring(index + 1);
  }
 else {
    region=Region.US_EAST_1;
  }
  if (operationStr.equals("String_Node_Str")) {
    product=Product.ebs;
  }
  if (usageTypeStr.startsWith("String_Node_Str")) {
    product=Product.eip;
  }
 else   if (usageTypeStr.startsWith("String_Node_Str"))   product=Product.ebs;
 else   if (usageTypeStr.startsWith("String_Node_Str"))   product=Product.ebs;
 else   if (usageTypeStr.startsWith("String_Node_Str"))   product=Product.cloudwatch;
 else   if (usageTypeStr.startsWith("String_Node_Str") && operationStr.startsWith("String_Node_Str")) {
    index=usageTypeStr.indexOf("String_Node_Str");
    usageTypeStr=index < 0 ? "String_Node_Str" : usageTypeStr.substring(index + 1);
    if (reservationUsage && product == Product.ec2 && cost == 0)     operation=Operation.reservedInstancesFixed;
 else     if (reservationUsage && product == Product.ec2)     operation=Operation.getReservedInstances(config.reservationService.getDefaultReservationUtilization());
 else     operation=Operation.ondemandInstances;
    os=getInstanceOs(operationStr);
  }
 else   if (usageTypeStr.startsWith("String_Node_Str") && operationStr.startsWith("String_Node_Str")) {
    index=usageTypeStr.indexOf("String_Node_Str");
    usageTypeStr=index < 0 ? "String_Node_Str" : usageTypeStr.substring(index + 1);
    operation=getOperation(operationStr,reservationUsage,null);
    os=getInstanceOs(operationStr);
  }
 else   if (usageTypeStr.startsWith("String_Node_Str") || usageTypeStr.startsWith("String_Node_Str") || usageTypeStr.startsWith("String_Node_Str")) {
    index=usageTypeStr.indexOf("String_Node_Str");
    String offeringType;
    if (index < 0) {
      offeringType=usageTypeStr;
      usageTypeStr="String_Node_Str";
    }
 else {
      offeringType=usageTypeStr;
      usageTypeStr=usageTypeStr.substring(index + 1);
    }
    operation=getOperation(operationStr,reservationUsage,Ec2InstanceReservationPrice.ReservationUtilization.get(offeringType));
    os=getInstanceOs(operationStr);
  }
  if (usageTypeStr.equals("String_Node_Str") || usageTypeStr.equals("String_Node_Str")) {
    usageTypeStr=product.name;
  }
  if (operation == null) {
    operation=Operation.getOperation(operationStr);
  }
  if (product == Product.ec2 && operation instanceof Operation.ReservationOperation) {
    product=Product.ec2_instance;
    if (operation instanceof Operation.ReservationOperation) {
      if (os != InstanceOs.linux) {
        usageTypeStr=usageTypeStr + "String_Node_Str" + os;
        operation=operation.name.startsWith("String_Node_Str") ? operation : Operation.ondemandInstances;
      }
    }
  }
  if (usageType == null) {
    usageType=UsageType.getUsageType(usageTypeStr,operation,description);
  }
  return new ReformedMetaData(region,product,operation,usageType);
}

Fixed version (ground truth):
protected ReformedMetaData reform(long millisStart,ProcessorConfig config,Product product,boolean reservationUsage,String operationStr,String usageTypeStr,String description,double cost){
  Operation operation=null;
  UsageType usageType=null;
  InstanceOs os=null;
  int index=usageTypeStr.indexOf("String_Node_Str");
  String regionShortName=index > 0 ? usageTypeStr.substring(0,index) : "String_Node_Str";
  Region region=regionShortName.isEmpty() ? null : Region.getRegionByShortName(regionShortName);
  if (region != null) {
    usageTypeStr=usageTypeStr.substring(index + 1);
  }
 else {
    region=Region.US_EAST_1;
  }
  if (operationStr.equals("String_Node_Str")) {
    product=Product.ebs;
  }
  if (usageTypeStr.startsWith("String_Node_Str")) {
    product=Product.eip;
  }
 else   if (usageTypeStr.startsWith("String_Node_Str"))   product=Product.ebs;
 else   if (usageTypeStr.startsWith("String_Node_Str"))   product=Product.ebs;
 else   if (usageTypeStr.startsWith("String_Node_Str"))   product=Product.cloudwatch;
 else   if (usageTypeStr.startsWith("String_Node_Str") && operationStr.startsWith("String_Node_Str")) {
    index=usageTypeStr.indexOf("String_Node_Str");
    usageTypeStr=index < 0 ? "String_Node_Str" : usageTypeStr.substring(index + 1);
    if (reservationUsage && product == Product.ec2 && cost == 0)     operation=Operation.reservedInstancesFixed;
 else     if (reservationUsage && product == Product.ec2)     operation=Operation.getReservedInstances(config.reservationService.getDefaultReservationUtilization(millisStart));
 else     operation=Operation.ondemandInstances;
    os=getInstanceOs(operationStr);
  }
 else   if (usageTypeStr.startsWith("String_Node_Str") && operationStr.startsWith("String_Node_Str")) {
    index=usageTypeStr.indexOf("String_Node_Str");
    usageTypeStr=index < 0 ? "String_Node_Str" : usageTypeStr.substring(index + 1);
    operation=getOperation(operationStr,reservationUsage,null);
    os=getInstanceOs(operationStr);
  }
 else   if (usageTypeStr.startsWith("String_Node_Str") || usageTypeStr.startsWith("String_Node_Str") || usageTypeStr.startsWith("String_Node_Str")) {
    index=usageTypeStr.indexOf("String_Node_Str");
    String offeringType;
    if (index < 0) {
      offeringType=usageTypeStr;
      usageTypeStr="String_Node_Str";
    }
 else {
      offeringType=usageTypeStr;
      usageTypeStr=usageTypeStr.substring(index + 1);
    }
    operation=getOperation(operationStr,reservationUsage,Ec2InstanceReservationPrice.ReservationUtilization.get(offeringType));
    os=getInstanceOs(operationStr);
  }
  if (usageTypeStr.equals("String_Node_Str") || usageTypeStr.equals("String_Node_Str")) {
    usageTypeStr=product.name;
  }
  if (operation == null) {
    operation=Operation.getOperation(operationStr);
  }
  if (product == Product.ec2 && operation instanceof Operation.ReservationOperation) {
    product=Product.ec2_instance;
    if (operation instanceof Operation.ReservationOperation) {
      if (os != InstanceOs.linux) {
        usageTypeStr=usageTypeStr + "String_Node_Str" + os;
        operation=operation.name.startsWith("String_Node_Str") ? operation : Operation.ondemandInstances;
      }
    }
  }
  if (usageType == null) {
    usageType=UsageType.getUsageType(usageTypeStr,operation,description);
  }
  return new ReformedMetaData(region,product,operation,usageType);
}