Program: 66676
Project: 66676
Buggy source:
public static List<FieldInfo> getFieldInfo(String packageName,String methodName,String methodNo,int sequence,SqlReflector reflector) throws SQLException {
  int data_level=-1;
  int next_rec_sequence=-1;
  ViewCache viewCache=reflector.getViewCache();
  Iterator<ViewRow> iter=viewCache.getRows(ALL_ARGUMENTS,new String[0],new String[]{PACKAGE_NAME,OBJECT_NAME,OVERLOAD},new Object[]{packageName,methodName,methodNo},new String[]{SEQUENCE});
  ArrayList<ViewRow> viewRows=new ArrayList<ViewRow>();
  while (iter.hasNext()) {
    UserArguments item=(UserArguments)iter.next();
    viewRows.add(item);
  }
  PlsqlTypeInfo[] info=PlsqlTypeInfo.getPlsqlTypeInfo(viewRows);
  if (info != null) {
    for (int i=0; i < info.length; i++) {
      if (data_level == -1 && (sequence == -1 || sequence == info[i].sequence)) {
        data_level=info[i].dataLevel;
      }
      if (data_level > -1 && data_level == info[i].dataLevel && next_rec_sequence == -1 && sequence < info[i].sequence) {
        next_rec_sequence=info[i].sequence;
        break;
      }
    }
  }
  data_level++;
  iter=viewCache.getRows(ALL_ARGUMENTS,new String[0],new String[]{PACKAGE_NAME,OBJECT_NAME,OVERLOAD,DATA_LEVEL},new Object[]{packageName,methodName,methodNo,new Integer(data_level)},new String[]{SEQUENCE});
  viewRows=new ArrayList<ViewRow>();
  while (iter.hasNext()) {
    UserArguments item=(UserArguments)iter.next();
    if ((sequence == -1 || item.sequence > sequence) && (next_rec_sequence == -1 || item.sequence < next_rec_sequence)) {
      viewRows.add(item);
    }
  }
  return FieldInfo.getFieldInfo(viewRows);
}

Fixed version (ground truth):
public static List<FieldInfo> getFieldInfo(String packageName,String methodName,String methodNo,int sequence,SqlReflector reflector) throws SQLException {
  int data_level=-1;
  int next_rec_sequence=-1;
  ViewCache viewCache=reflector.getViewCache();
  Iterator<ViewRow> iter=viewCache.getRows(ALL_ARGUMENTS,new String[0],new String[]{PACKAGE_NAME,OBJECT_NAME,OVERLOAD},new Object[]{packageName,methodName,methodNo},new String[]{SEQUENCE});
  ArrayList<ViewRow> viewRows=new ArrayList<ViewRow>();
  while (iter.hasNext()) {
    UserArguments item=(UserArguments)iter.next();
    viewRows.add(item);
  }
  PlsqlTypeInfo[] info=PlsqlTypeInfo.getPlsqlTypeInfo(viewRows);
  if (info != null) {
    for (int i=0; i < info.length; i++) {
      if (data_level == -1 && (sequence == -1 || sequence == info[i].sequence)) {
        data_level=info[i].dataLevel;
      }
      if (data_level > -1 && data_level == info[i].dataLevel && next_rec_sequence == -1 && sequence < info[i].sequence) {
        next_rec_sequence=info[i].sequence;
        break;
      }
    }
  }
  data_level++;
  iter=viewCache.getRows(ALL_ARGUMENTS,new String[0],new String[]{PACKAGE_NAME,OBJECT_NAME,OVERLOAD,DATA_LEVEL},new Object[]{packageName,methodName,methodNo,Integer.valueOf(data_level)},new String[]{SEQUENCE});
  viewRows=new ArrayList<ViewRow>();
  while (iter.hasNext()) {
    UserArguments item=(UserArguments)iter.next();
    if ((sequence == -1 || item.sequence > sequence) && (next_rec_sequence == -1 || item.sequence < next_rec_sequence)) {
      viewRows.add(item);
    }
  }
  return FieldInfo.getFieldInfo(viewRows);
}