Program: 105523
Project: 105523
Buggy source:
@Override public FormatInfo process(String templatePath,ImageFormat format,String templateName) throws InternalErrorException {
  if (format != null) {
    s_logger.debug("String_Node_Str" + format + "String_Node_Str");
    return null;
  }
  String vhdPath=templatePath + File.separator + templateName+ "String_Node_Str"+ ImageFormat.VHD.getFileExtension();
  if (!_storage.exists(vhdPath)) {
    s_logger.debug("String_Node_Str" + vhdPath);
    return null;
  }
  FormatInfo info=new FormatInfo();
  info.format=ImageFormat.VHD;
  info.filename=templateName + "String_Node_Str" + ImageFormat.VHD.getFileExtension();
  File vhdFile=_storage.getFile(vhdPath);
  info.size=_storage.getSize(vhdPath);
  FileInputStream strm=null;
  byte[] currentSize=new byte[8];
  byte[] creatorApp=new byte[4];
  try {
    strm=new FileInputStream(vhdFile);
    strm.skip(info.size - vhdFooterSize + vhdFooterCreatorAppOffset);
    strm.read(creatorApp);
    strm.skip(vhdFooterCurrentSizeOffset - vhdFooterCreatorVerOffset);
    strm.read(currentSize);
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str" + vhdPath,e);
    throw new InternalErrorException("String_Node_Str" + vhdPath + "String_Node_Str"+ e);
  }
 finally {
    if (strm != null) {
      try {
        strm.close();
      }
 catch (      IOException e) {
      }
    }
  }
  long templateSize=NumbersUtil.bytesToLong(currentSize);
  info.virtualSize=templateSize;
  return info;
}

Fixed version (ground truth):
@Override public FormatInfo process(String templatePath,ImageFormat format,String templateName) throws InternalErrorException {
  if (format != null) {
    s_logger.debug("String_Node_Str" + format + "String_Node_Str");
    return null;
  }
  String vhdPath=templatePath + File.separator + templateName+ "String_Node_Str"+ ImageFormat.VHD.getFileExtension();
  if (!_storage.exists(vhdPath)) {
    s_logger.debug("String_Node_Str" + vhdPath);
    return null;
  }
  FormatInfo info=new FormatInfo();
  info.format=ImageFormat.VHD;
  info.filename=templateName + "String_Node_Str" + ImageFormat.VHD.getFileExtension();
  File vhdFile=_storage.getFile(vhdPath);
  info.size=_storage.getSize(vhdPath);
  FileInputStream strm=null;
  byte[] currentSize=new byte[8];
  byte[] creatorApp=new byte[4];
  try {
    strm=new FileInputStream(vhdFile);
    long skipped=strm.skip(info.size - vhdFooterSize + vhdFooterCreatorAppOffset);
    if (skipped == -1) {
      throw new InternalErrorException("String_Node_Str");
    }
    long read=strm.read(creatorApp);
    if (read == -1) {
      throw new InternalErrorException("String_Node_Str");
    }
    skipped=strm.skip(vhdFooterCurrentSizeOffset - vhdFooterCreatorVerOffset);
    if (skipped == -1) {
      throw new InternalErrorException("String_Node_Str");
    }
    read=strm.read(currentSize);
    if (read == -1) {
      throw new InternalErrorException("String_Node_Str");
    }
  }
 catch (  IOException e) {
    s_logger.warn("String_Node_Str" + vhdPath,e);
    throw new InternalErrorException("String_Node_Str" + vhdPath + "String_Node_Str"+ e,e);
  }
 finally {
    if (strm != null) {
      try {
        strm.close();
      }
 catch (      IOException e) {
      }
    }
  }
  long templateSize=NumbersUtil.bytesToLong(currentSize);
  info.virtualSize=templateSize;
  return info;
}