Program: 6252
Project: 6252
Buggy source:
public int getExecutionTime(MethodInfo context,InstructionHandle ih){
  int opcode=ih.getInstruction().getOpcode();
  if (opcode == Constants.NEW) {
    NEW insn=(NEW)ih.getInstruction();
    ObjectType type=insn.getLoadClassType(context.getConstantPoolGen());
    return computeObjectSize(getFieldSize(getObjectFields(type.getClassName())));
  }
 else   if (opcode == Constants.NEWARRAY || opcode == Constants.ANEWARRAY) {
    int srcLine=context.getMethod().getLineNumberTable().getSourceLine(ih.getPosition());
    LoopBound annotated=null;
    try {
      Map<Integer,LoopBound> annots=project.getAnnotations(context.getCli());
      annotated=annots.get(new Integer(srcLine));
      if (annotated == null) {
        Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
      }
    }
 catch (    Exception exc) {
      Project.logger.warn("String_Node_Str" + context + "String_Node_Str"+ srcLine);
    }
    Interval analyzed=null;
    if (sizes == null && project.getDfaLoopBounds() != null) {
      sizes=project.getDfaLoopBounds().getArraySizes();
    }
    if (sizes == null) {
      Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
    }
 else {
      List<HashedString> callString=new LinkedList<HashedString>();
      analyzed=sizes.get(ih).get(callString);
      if (analyzed == null) {
        Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
      }
    }
    if (analyzed.hasUb()) {
      if (annotated != null) {
        if (annotated.getUpperBound() > analyzed.getUb()) {
          Project.logger.warn("String_Node_Str" + context + "String_Node_Str"+ srcLine);
        }
        if (annotated.getUpperBound() < analyzed.getUb()) {
          Project.logger.warn("String_Node_Str" + context + "String_Node_Str"+ srcLine);
        }
        if (annotated.getUpperBound() == analyzed.getUb()) {
          Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
        }
        return computeArraySize(Math.max(annotated.getUpperBound(),analyzed.getUb()));
      }
 else {
        return computeArraySize(analyzed.getUb());
      }
    }
 else {
      if (annotated != null) {
        return computeArraySize(annotated.getUpperBound());
      }
 else {
        Project.logger.error("String_Node_Str" + context + "String_Node_Str"+ srcLine+ "String_Node_Str");
        return computeArraySize(4096);
      }
    }
  }
 else {
    return 0;
  }
}

Fixed version (ground truth):
public int getExecutionTime(MethodInfo context,InstructionHandle ih){
  int opcode=ih.getInstruction().getOpcode();
  if (opcode == Constants.NEW) {
    NEW insn=(NEW)ih.getInstruction();
    ObjectType type=insn.getLoadClassType(context.getConstantPoolGen());
    return computeObjectSize(getFieldSize(getObjectFields(type.getClassName())));
  }
 else   if (opcode == Constants.NEWARRAY || opcode == Constants.ANEWARRAY) {
    int srcLine=context.getMethod().getLineNumberTable().getSourceLine(ih.getPosition());
    LoopBound annotated=null;
    try {
      Map<Integer,LoopBound> annots=project.getAnnotations(context.getCli());
      annotated=annots.get(new Integer(srcLine));
      if (annotated == null) {
        Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
      }
    }
 catch (    Exception exc) {
      Project.logger.warn("String_Node_Str" + context + "String_Node_Str"+ srcLine);
    }
    Interval analyzed=null;
    if (sizes == null && project.getDfaLoopBounds() != null) {
      sizes=project.getDfaLoopBounds().getArraySizes();
    }
    if (sizes == null) {
      Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
    }
 else {
      List<HashedString> callString=new LinkedList<HashedString>();
      ContextMap<List<HashedString>,Interval> t=sizes.get(ih);
      if (t == null) {
        Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
      }
 else {
        analyzed=t.get(callString);
        if (analyzed == null) {
          Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
        }
      }
    }
    if (analyzed != null && analyzed.hasUb()) {
      if (annotated != null) {
        if (annotated.getUpperBound() > analyzed.getUb()) {
          Project.logger.warn("String_Node_Str" + context + "String_Node_Str"+ srcLine);
        }
        if (annotated.getUpperBound() < analyzed.getUb()) {
          Project.logger.warn("String_Node_Str" + context + "String_Node_Str"+ srcLine);
        }
        if (annotated.getUpperBound() == analyzed.getUb()) {
          Project.logger.info("String_Node_Str" + context + "String_Node_Str"+ srcLine);
        }
        return computeArraySize(Math.max(annotated.getUpperBound(),analyzed.getUb()));
      }
 else {
        return computeArraySize(analyzed.getUb());
      }
    }
 else {
      if (annotated != null) {
        return computeArraySize(annotated.getUpperBound());
      }
 else {
        Project.logger.error("String_Node_Str" + context + "String_Node_Str"+ srcLine+ "String_Node_Str");
        return computeArraySize(4096);
      }
    }
  }
 else {
    return 0;
  }
}