Program: 99662
Project: 99662
Buggy source:
public ExceptionHandler[][] getHandlers() throws InvalidClassFileException {
  if (handlers != null)   return handlers;
  TryItem[] tries=eMethod.codeItem.getTries();
  this.handlers=new ExceptionHandler[instructions().size()][];
  if (tries == null) {
    return handlers;
  }
  ArrayList<ArrayList<ExceptionHandler>> temp_array=new ArrayList<ArrayList<ExceptionHandler>>();
  for (int i=0; i < instructions().size(); i++) {
    temp_array.add(new ArrayList<ExceptionHandler>());
  }
  for (  TryItem tryItem : tries) {
    int startAddress=tryItem.getStartCodeAddress();
    int endAddress=tryItem.getStartCodeAddress() + tryItem.getTryLength();
    int startInst=getInstructionIndex(startAddress);
    int endInst;
    if (endAddress > getAddressFromIndex(instructions().size() - 1)) {
      endInst=instructions().size() - 1;
      if (endAddress != (getAddressFromIndex(endInst) + (eMethod.codeItem.getInstructions())[endInst].getSize(getAddressFromIndex(endInst))))       throw new RuntimeException("String_Node_Str" + endAddress + "String_Node_Str");
    }
 else {
      endInst=getInstructionIndex(endAddress) - 1;
    }
    int catchAllAddress=tryItem.encodedCatchHandler.getCatchAllHandlerAddress();
    if (catchAllAddress != -1) {
      for (int i=startInst; i <= endInst; i++) {
        temp_array.get(i).add(new ExceptionHandler(getInstructionIndex(catchAllAddress),null));
      }
    }
    for (int i=startInst; i <= endInst; i++) {
      for (      EncodedTypeAddrPair etaps : tryItem.encodedCatchHandler.handlers) {
        temp_array.get(i).add(new ExceptionHandler(getInstructionIndex(etaps.getHandlerAddress()),etaps.exceptionType.getTypeDescriptor()));
      }
    }
  }
  for (int i=0; i < instructions().size(); i++) {
    handlers[i]=(ExceptionHandler[])temp_array.get(i).toArray(new ExceptionHandler[temp_array.get(i).size()]);
  }
  return handlers;
}

Fixed version (ground truth):
public ExceptionHandler[][] getHandlers() throws InvalidClassFileException {
  if (handlers != null)   return handlers;
  TryItem[] tries=eMethod.codeItem.getTries();
  this.handlers=new ExceptionHandler[instructions().size()][];
  if (tries == null) {
    return handlers;
  }
  ArrayList<ArrayList<ExceptionHandler>> temp_array=new ArrayList<ArrayList<ExceptionHandler>>();
  for (int i=0; i < instructions().size(); i++) {
    temp_array.add(new ArrayList<ExceptionHandler>());
  }
  for (  TryItem tryItem : tries) {
    int startAddress=tryItem.getStartCodeAddress();
    int endAddress=tryItem.getStartCodeAddress() + tryItem.getTryLength();
    int startInst=getInstructionIndex(startAddress);
    int endInst;
    if (endAddress > getAddressFromIndex(instructions().size() - 1)) {
      endInst=instructions().size() - 1;
      if (endAddress != (getAddressFromIndex(endInst) + (eMethod.codeItem.getInstructions())[endInst].getSize(getAddressFromIndex(endInst))))       throw new RuntimeException("String_Node_Str" + endAddress + "String_Node_Str");
    }
 else {
      endInst=getInstructionIndex(endAddress) - 1;
    }
    for (int i=startInst; i <= endInst; i++) {
      for (      EncodedTypeAddrPair etaps : tryItem.encodedCatchHandler.handlers) {
        temp_array.get(i).add(new ExceptionHandler(getInstructionIndex(etaps.getHandlerAddress()),etaps.exceptionType.getTypeDescriptor()));
      }
    }
    int catchAllAddress=tryItem.encodedCatchHandler.getCatchAllHandlerAddress();
    if (catchAllAddress != -1) {
      for (int i=startInst; i <= endInst; i++) {
        temp_array.get(i).add(new ExceptionHandler(getInstructionIndex(catchAllAddress),null));
      }
    }
  }
  for (int i=0; i < instructions().size(); i++) {
    handlers[i]=(ExceptionHandler[])temp_array.get(i).toArray(new ExceptionHandler[temp_array.get(i).size()]);
  }
  return handlers;
}