Program: 80038
Project: 80038
Buggy source:
/** 
 * @see java.sql.ResultSet#next
 * @exception SQLException If database access error occurs.
 */
public boolean next() throws SQLException {
  if (!gotFile) {
    gotFile=true;
    try {
      inputFileStreamReader=new InputStreamReader(new FileInputStream(inputFileName));
      bufferedReader=new BufferedReader(inputFileStreamReader,32 * 1024);
    }
 catch (    FileNotFoundException ex) {
      throw new SQLException(ex.getMessage());
    }
    hashTable=new Hashtable();
  }
  while (true) {
    try {
      line=bufferedReader.readLine();
    }
 catch (    java.io.IOException ioe) {
      throw new SQLException(ioe.getMessage());
    }
    if (line == null) {
      return false;
    }
    gmtIndex=line.indexOf(GMT_STRING);
    threadIndex=line.indexOf(BEGIN_THREAD_STRING);
    xidIndex=line.indexOf(BEGIN_XID_STRING);
    lccidIndex=line.indexOf(BEGIN_XID_STRING,xidIndex + 1);
    if (gmtIndex != -1 && threadIndex != -1) {
      String[] newRow=new String[6];
      for (int index=1; index <= 5; index++) {
        newRow[index - 1]=setupColumn(index);
      }
      Object previousRow=hashTable.put(newRow[3],newRow);
      if (previousRow == null) {
        continue;
      }
      currentRow=(String[])previousRow;
      Timestamp endTs=Timestamp.valueOf(newRow[0]);
      long end=endTs.getTime() + endTs.getNanos() / 1000000;
      Timestamp startTs=Timestamp.valueOf(currentRow[0]);
      long start=startTs.getTime() + startTs.getNanos() / 1000000;
      currentRow[5]=Long.toString(end - start);
      return true;
    }
  }
}

Fixed version (ground truth):
/** 
 * @see java.sql.ResultSet#next
 * @exception SQLException If database access error occurs.
 */
public boolean next() throws SQLException {
  if (!gotFile) {
    gotFile=true;
    try {
      inputFileStreamReader=new InputStreamReader(new FileInputStream(inputFileName));
      bufferedReader=new BufferedReader(inputFileStreamReader,32 * 1024);
    }
 catch (    FileNotFoundException ex) {
      throw new SQLException(ex.getMessage());
    }
    hashTable=new Hashtable();
  }
  while (true) {
    try {
      line=bufferedReader.readLine();
    }
 catch (    java.io.IOException ioe) {
      throw new SQLException(ioe.getMessage());
    }
    if (line == null) {
      return false;
    }
    endTimestampIndex=line.indexOf(END_TIMESTAMP);
    threadIndex=line.indexOf(BEGIN_THREAD_STRING);
    xidIndex=line.indexOf(BEGIN_XID_STRING);
    lccidIndex=line.indexOf(BEGIN_XID_STRING,xidIndex + 1);
    if (endTimestampIndex != -1 && threadIndex != -1 && xidIndex != -1) {
      String[] newRow=new String[6];
      for (int index=1; index <= 5; index++) {
        newRow[index - 1]=setupColumn(index);
      }
      Object previousRow=hashTable.put(newRow[3],newRow);
      if (previousRow == null) {
        continue;
      }
      currentRow=(String[])previousRow;
      Timestamp endTs=stringToTimestamp(newRow[0]);
      long end=endTs.getTime() + endTs.getNanos() / 1000000;
      Timestamp startTs=stringToTimestamp(currentRow[0]);
      long start=startTs.getTime() + startTs.getNanos() / 1000000;
      currentRow[5]=Long.toString(end - start);
      return true;
    }
  }
}