Program: 92883
Project: 92883
Buggy source:
/** 
 * Performs the IPTC data extraction, adding found values to the specified instance of   {@link Metadata}.
 */
public void extract(@NotNull final SequentialReader reader,@NotNull final Metadata metadata,long length,@Nullable Directory parentDirectory){
  IptcDirectory directory=new IptcDirectory();
  metadata.addDirectory(directory);
  if (parentDirectory != null)   directory.setParent(parentDirectory);
  int offset=0;
  while (offset < length) {
    short startByte;
    try {
      startByte=reader.getUInt8();
      offset++;
    }
 catch (    IOException e) {
      directory.addError("String_Node_Str");
      return;
    }
    if (startByte != 0x1c) {
      if (offset != length)       directory.addError("String_Node_Str" + (offset - 1) + "String_Node_Str"+ Integer.toHexString(startByte)+ "String_Node_Str");
      return;
    }
    if (offset + 5 >= length) {
      directory.addError("String_Node_Str");
      return;
    }
    int directoryType;
    int tagType;
    int tagByteCount;
    try {
      directoryType=reader.getUInt8();
      tagType=reader.getUInt8();
      tagByteCount=reader.getUInt16();
      offset+=4;
    }
 catch (    IOException e) {
      directory.addError("String_Node_Str");
      return;
    }
    if (offset + tagByteCount > length) {
      directory.addError("String_Node_Str");
      return;
    }
    try {
      processTag(reader,directory,directoryType,tagType,tagByteCount);
    }
 catch (    IOException e) {
      directory.addError("String_Node_Str");
      return;
    }
    offset+=tagByteCount;
  }
}

Fixed version (ground truth):
/** 
 * Performs the IPTC data extraction, adding found values to the specified instance of   {@link Metadata}.
 */
public void extract(@NotNull final SequentialReader reader,@NotNull final Metadata metadata,long length,@Nullable Directory parentDirectory){
  IptcDirectory directory=new IptcDirectory();
  metadata.addDirectory(directory);
  if (parentDirectory != null)   directory.setParent(parentDirectory);
  int offset=0;
  while (offset < length) {
    short startByte;
    try {
      startByte=reader.getUInt8();
      offset++;
    }
 catch (    IOException e) {
      directory.addError("String_Node_Str");
      return;
    }
    if (startByte != 0x1c) {
      if (offset != length)       directory.addError("String_Node_Str" + (offset - 1) + "String_Node_Str"+ Integer.toHexString(startByte)+ "String_Node_Str");
      return;
    }
    if (offset + 4 >= length) {
      directory.addError("String_Node_Str");
      return;
    }
    int directoryType;
    int tagType;
    int tagByteCount;
    try {
      directoryType=reader.getUInt8();
      tagType=reader.getUInt8();
      tagByteCount=reader.getUInt16();
      offset+=4;
    }
 catch (    IOException e) {
      directory.addError("String_Node_Str");
      return;
    }
    if (offset + tagByteCount > length) {
      directory.addError("String_Node_Str");
      return;
    }
    try {
      processTag(reader,directory,directoryType,tagType,tagByteCount);
    }
 catch (    IOException e) {
      directory.addError("String_Node_Str");
      return;
    }
    offset+=tagByteCount;
  }
}