Program: 40860
Project: 40860
Buggy source:
private final int[] decode(final GifFrame fr,final int[] activeColTbl){
  final CodeTable codes=new CodeTable(fr,activeColTbl);
  in.init(fr.data);
  final int clearCode=fr.clearCode, endCode=fr.endOfInfoCode;
  final int numPixels=fr.width * fr.height;
  final int[] out=new int[numPixels];
  final int[][] tbl=codes.tbl;
  int pixelPos=0;
  int currCodeSize=codes.clear();
  in.read(currCodeSize);
  int code=in.read(currCodeSize);
  int[] pixels=tbl[code];
  System.arraycopy(pixels,0,out,pixelPos,pixels.length);
  pixelPos+=pixels.length;
  while (pixelPos < numPixels) {
    final int prevCode=code;
    try {
      code=in.read(currCodeSize);
    }
 catch (    final ArrayIndexOutOfBoundsException e) {
      break;
    }
    if (code == clearCode) {
      currCodeSize=codes.clear();
      code=in.read(currCodeSize);
      pixels=tbl[code];
      System.arraycopy(pixels,0,out,pixelPos,pixels.length);
      pixelPos+=pixels.length;
      continue;
    }
 else     if (code == endCode) {
      break;
    }
    final int[] prevVals=tbl[prevCode];
    final int[] prevValsAndK=new int[prevVals.length + 1];
    System.arraycopy(prevVals,0,prevValsAndK,0,prevVals.length);
    if (code < codes.nextCode) {
      pixels=tbl[code];
      System.arraycopy(pixels,0,out,pixelPos,pixels.length);
      pixelPos+=pixels.length;
      prevValsAndK[prevVals.length]=tbl[code][0];
    }
 else {
      prevValsAndK[prevVals.length]=prevVals[0];
      System.arraycopy(prevValsAndK,0,out,pixelPos,prevValsAndK.length);
      pixelPos+=prevValsAndK.length;
    }
    currCodeSize=codes.add(prevValsAndK);
  }
  return out;
}

Fixed version (ground truth):
private final int[] decode(final GifFrame fr,final int[] activeColTbl){
  final CodeTable codes=codeTable;
  codes.init(fr,activeColTbl);
  in.init(fr.data);
  final int clearCode=fr.clearCode, endCode=fr.endOfInfoCode;
  final int numPixels=fr.width * fr.height;
  final int[] out=new int[numPixels];
  final int[][] tbl=codes.tbl;
  int pixelPos=0;
  int currCodeSize=codes.clear();
  in.read(currCodeSize);
  int code=in.read(currCodeSize);
  int[] pixels=tbl[code];
  System.arraycopy(pixels,0,out,pixelPos,pixels.length);
  pixelPos+=pixels.length;
  while (pixelPos < numPixels) {
    final int prevCode=code;
    try {
      code=in.read(currCodeSize);
    }
 catch (    final ArrayIndexOutOfBoundsException e) {
      break;
    }
    if (code == clearCode) {
      currCodeSize=codes.clear();
      code=in.read(currCodeSize);
      pixels=tbl[code];
      System.arraycopy(pixels,0,out,pixelPos,pixels.length);
      pixelPos+=pixels.length;
      continue;
    }
 else     if (code == endCode) {
      break;
    }
    final int[] prevVals=tbl[prevCode];
    final int[] prevValsAndK=new int[prevVals.length + 1];
    System.arraycopy(prevVals,0,prevValsAndK,0,prevVals.length);
    if (code < codes.nextCode) {
      pixels=tbl[code];
      System.arraycopy(pixels,0,out,pixelPos,pixels.length);
      pixelPos+=pixels.length;
      prevValsAndK[prevVals.length]=tbl[code][0];
    }
 else {
      prevValsAndK[prevVals.length]=prevVals[0];
      System.arraycopy(prevValsAndK,0,out,pixelPos,prevValsAndK.length);
      pixelPos+=prevValsAndK.length;
    }
    currCodeSize=codes.add(prevValsAndK);
  }
  return out;
}