Program: 16227
Project: 16227
Buggy source:
/** 
 * Sets up all of the initial pointers to the important records in TraceData.
 */
private void setIndex(){
  int DataCounter, PBASCounter, PLOCCounter, PCONCounter, NumRecords;
  byte[] RecNameArray=new byte[4];
  String RecName;
  DataCounter=0;
  PBASCounter=0;
  PLOCCounter=0;
  PCONCounter=0;
  IndexBase=getIntAt(absIndexBase + macJunk);
  NumRecords=getIntAt(absIndexBase - 8 + macJunk);
  for (int record=0; record <= NumRecords - 1; record++) {
    getSubArray(RecNameArray,(IndexBase + (record * 28)));
    RecName=new String(RecNameArray);
    if (RecName.equals("String_Node_Str"))     FWO=IndexBase + (record * 28) + 20;
    if (RecName.equals("String_Node_Str")) {
      ++DataCounter;
      if (DataCounter == 9)       DATA9=IndexBase + (record * 28) + 20;
      if (DataCounter == 10)       DATA10=IndexBase + (record * 28) + 20;
      if (DataCounter == 11)       DATA11=IndexBase + (record * 28) + 20;
      if (DataCounter == 12)       DATA12=IndexBase + (record * 28) + 20;
    }
    if (RecName.equals("String_Node_Str")) {
      ++PBASCounter;
      if (PBASCounter == 2)       PBAS2=IndexBase + (record * 28) + 20;
    }
    if (RecName.equals("String_Node_Str")) {
      ++PLOCCounter;
      if (PLOCCounter == 2)       PLOC=IndexBase + (record * 28) + 20;
    }
    if (RecName.equals("String_Node_Str")) {
      ++PCONCounter;
      if (PCONCounter == 2)       PCON=IndexBase + (record * 28) + 20;
    }
  }
  traceLength=getIntAt(DATA12 - 8);
  seqLength=getIntAt(PBAS2 - 4);
  PLOC=getIntAt(PLOC) + macJunk;
  DATA9=getIntAt(DATA9) + macJunk;
  DATA10=getIntAt(DATA10) + macJunk;
  DATA11=getIntAt(DATA11) + macJunk;
  DATA12=getIntAt(DATA12) + macJunk;
  PBAS2=getIntAt(PBAS2) + macJunk;
  PCON=getIntAt(PCON) + macJunk;
}

Fixed version (ground truth):
/** 
 * Sets up all of the initial pointers to the important records in TraceData.
 */
private void setIndex(){
  int DataCounter, PBASCounter, PLOCCounter, PCONCounter, NumRecords, indexBase;
  byte[] RecNameArray=new byte[4];
  String RecName;
  DataCounter=0;
  PBASCounter=0;
  PLOCCounter=0;
  PCONCounter=0;
  indexBase=getIntAt(absIndexBase + macJunk);
  NumRecords=getIntAt(absIndexBase - 8 + macJunk);
  for (int record=0; record <= NumRecords - 1; record++) {
    getSubArray(RecNameArray,(indexBase + (record * 28)));
    RecName=new String(RecNameArray);
    if (RecName.equals("String_Node_Str"))     FWO=indexBase + (record * 28) + 20;
    if (RecName.equals("String_Node_Str")) {
      ++DataCounter;
      if (DataCounter == 9)       DATA9=indexBase + (record * 28) + 20;
      if (DataCounter == 10)       DATA10=indexBase + (record * 28) + 20;
      if (DataCounter == 11)       DATA11=indexBase + (record * 28) + 20;
      if (DataCounter == 12)       DATA12=indexBase + (record * 28) + 20;
    }
    if (RecName.equals("String_Node_Str")) {
      ++PBASCounter;
      if (PBASCounter == 2)       PBAS2=indexBase + (record * 28) + 20;
    }
    if (RecName.equals("String_Node_Str")) {
      ++PLOCCounter;
      if (PLOCCounter == 2)       PLOC=indexBase + (record * 28) + 20;
    }
    if (RecName.equals("String_Node_Str")) {
      ++PCONCounter;
      if (PCONCounter == 2)       PCON=indexBase + (record * 28) + 20;
    }
  }
  traceLength=getIntAt(DATA12 - 8);
  seqLength=getIntAt(PBAS2 - 4);
  PLOC=getIntAt(PLOC) + macJunk;
  DATA9=getIntAt(DATA9) + macJunk;
  DATA10=getIntAt(DATA10) + macJunk;
  DATA11=getIntAt(DATA11) + macJunk;
  DATA12=getIntAt(DATA12) + macJunk;
  PBAS2=getIntAt(PBAS2) + macJunk;
  PCON=getIntAt(PCON) + macJunk;
}