Program: 150586
Project: 150586
Buggy source:
public static void processYuv(Image yuv,byte work[],ProcessorYuv processor){
  int width=yuv.getWidth();
  int height=yuv.getHeight();
  Image.Plane planes[]=yuv.getPlanes();
  int strideY=planes[0].getRowStride();
  int strideUV=planes[1].getRowStride();
  int workLength=strideY + strideUV + strideUV;
  if (work.length < workLength)   throw new IllegalArgumentException("String_Node_Str" + workLength);
  ByteBuffer bufferY=planes[0].getBuffer();
  ByteBuffer bufferU=planes[2].getBuffer();
  ByteBuffer bufferV=planes[1].getBuffer();
  bufferY.position(0);
  bufferU.position(0);
  bufferV.position(0);
  int offsetU=strideY;
  int offsetV=strideY + strideUV;
  int stridePixelUV=planes[1].getPixelStride();
  if (bufferU.remaining() % strideUV != 0) {
    int extra=bufferU.remaining() % strideUV;
    extra=extra / stridePixelUV + ((extra % stridePixelUV) != 0 ? 1 : 0);
    if (extra < width / stridePixelUV) {
      throw new RuntimeException("String_Node_Str" + bufferU.slice() + "String_Node_Str"+ strideUV+ "String_Node_Str"+ stridePixelUV+ "String_Node_Str"+ width);
    }
  }
  if (bufferV.remaining() % strideUV != 0) {
    int extra=bufferV.remaining() % strideUV;
    extra=extra / stridePixelUV + ((extra % stridePixelUV) != 0 ? 1 : 0);
    if (extra < width / stridePixelUV) {
      throw new RuntimeException("String_Node_Str" + bufferV.slice() + "String_Node_Str"+ strideUV+ "String_Node_Str"+ stridePixelUV+ "String_Node_Str"+ width);
    }
  }
  for (int y=0; y < height; y++) {
    bufferY.get(work,0,strideY);
    if (y % stridePixelUV == 0) {
      bufferU.get(work,offsetU,Math.min(bufferU.remaining(),strideUV));
      bufferV.get(work,offsetV,Math.min(bufferV.remaining(),strideUV));
    }
    int indexY=0;
    int indexU=offsetU;
    int indexV=offsetV;
    for (int x=0; x < width; x++, indexY++) {
      processor.processYUV(work[indexY] & 0xFF,work[indexU] & 0xFF,work[indexV] & 0xFF);
      int stepUV=stridePixelUV * ((x + 1) % stridePixelUV == 0 ? 1 : 0);
      indexU+=stepUV;
      indexV+=stepUV;
    }
  }
}

Fixed version (ground truth):
public static void processYuv(Image yuv,byte work[],ProcessorYuv processor){
  int width=yuv.getWidth();
  int height=yuv.getHeight();
  Image.Plane planes[]=yuv.getPlanes();
  int strideY=planes[0].getRowStride();
  int strideUV=planes[1].getRowStride();
  int stridePixelUV=planes[1].getPixelStride();
  int periodUV=(int)Math.round(width / (strideUV / (double)stridePixelUV));
  int workLength=strideY + strideUV + strideUV;
  if (work.length < workLength)   throw new IllegalArgumentException("String_Node_Str" + workLength);
  ByteBuffer bufferY=planes[0].getBuffer();
  ByteBuffer bufferU=planes[2].getBuffer();
  ByteBuffer bufferV=planes[1].getBuffer();
  bufferY.position(0);
  bufferU.position(0);
  bufferV.position(0);
  int offsetU=strideY;
  int offsetV=strideY + strideUV;
  if (ImageFormat.YUV_420_888 != yuv.getFormat())   throw new RuntimeException("String_Node_Str");
  int totalBytesY=bufferY.remaining();
  int totalBytesU=bufferU.remaining();
  int totalBytesV=bufferV.remaining();
  int x=-1, y=-1, indexY=-1, indexU=-1, indexV=-1;
  try {
    for (y=0; y < height; y++) {
      bufferY.get(work,0,strideY);
      if (y % periodUV == 0) {
        bufferU.get(work,offsetU,Math.min(bufferU.remaining(),strideUV));
        bufferV.get(work,offsetV,Math.min(bufferV.remaining(),strideUV));
      }
      indexY=0;
      indexU=offsetU;
      indexV=offsetV;
      for (x=0; x < width; x++, indexY++) {
        processor.processYUV(work[indexY] & 0xFF,work[indexU] & 0xFF,work[indexV] & 0xFF);
        int stepUV=stridePixelUV * ((x + 1) % periodUV == 0 ? 1 : 0);
        indexU+=stepUV;
        indexV+=stepUV;
      }
    }
  }
 catch (  RuntimeException e) {
    e.printStackTrace();
    String message="String_Node_Str" + e.getMessage() + "String_Node_Str"+ totalBytesY+ "String_Node_Str"+ totalBytesU+ "String_Node_Str"+ totalBytesV+ "String_Node_Str"+ width+ "String_Node_Str"+ height+ "String_Node_Str"+ work.length+ "String_Node_Str"+ strideY+ "String_Node_Str"+ strideUV+ "String_Node_Str"+ stridePixelUV+ "String_Node_Str"+ periodUV+ "String_Node_Str"+ x+ "String_Node_Str"+ y+ "String_Node_Str"+ indexY+ "String_Node_Str"+ indexU+ "String_Node_Str"+ indexV;
    throw new RuntimeException(message);
  }
}