Program: 68818
Project: 68818
Buggy source:
/** 
 * Loads scripts that are stored in an external file. Used to support include-script. Each script file should be load only once. and the script in the file must be encoded in UTF-8.
 * @param fileName script file name
 */
public void loadScript(String language,String fileName){
  ReportDesignHandle reportDesign=this.getDesign();
  URL url=null;
  if (reportDesign != null) {
    url=reportDesign.findResource(fileName,IResourceLocator.LIBRARY,appContext);
  }
  if (url == null) {
    log.log(Level.SEVERE,"String_Node_Str" + fileName + "String_Node_Str");
    addException(new EngineException(MessageConstants.SCRIPT_FILE_LOAD_ERROR,fileName));
    return;
  }
  InputStream in=null;
  try {
    in=url.openStream();
    ByteArrayOutputStream out=new ByteArrayOutputStream();
    byte[] buffer=new byte[1024];
    int size=in.read(buffer);
    while (size != -1) {
      out.write(buffer,0,size);
      size=in.read(buffer);
    }
    byte[] script=out.toByteArray();
    ICompiledScript compiledScript=scriptContext.compile(language,fileName,1,new String(script,"String_Node_Str"));
    execute(compiledScript);
  }
 catch (  IOException ex) {
    log.log(Level.SEVERE,"String_Node_Str" + fileName + "String_Node_Str",ex);
    addException(new EngineException(MessageConstants.SCRIPT_FILE_LOAD_ERROR,url.toString(),ex));
  }
catch (  BirtException e) {
    log.log(Level.SEVERE,"String_Node_Str" + fileName + "String_Node_Str",e);
    addException(new EngineException(MessageConstants.SCRIPT_EVALUATION_ERROR,url.toString(),e));
  }
 finally {
    try {
      if (in != null)       in.close();
    }
 catch (    IOException e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Loads scripts that are stored in an external file. Used to support include-script. Each script file should be load only once. and the script in the file must be encoded in UTF-8.
 * @param fileName script file name
 */
public void loadScript(String language,String fileName){
  ReportDesignHandle reportDesign=this.getDesign();
  URL url=null;
  if (reportDesign != null) {
    url=reportDesign.findResource(fileName,IResourceLocator.LIBRARY,appContext);
  }
  if (url == null) {
    log.log(Level.SEVERE,"String_Node_Str" + fileName + "String_Node_Str");
    addException(new EngineException(MessageConstants.SCRIPT_FILE_LOAD_ERROR,fileName));
    return;
  }
  InputStream in=null;
  try {
    in=url.openStream();
    ByteArrayOutputStream out=new ByteArrayOutputStream();
    byte[] buffer=new byte[1024];
    int size=in.read(buffer);
    while (size != -1) {
      out.write(buffer,0,size);
      size=in.read(buffer);
    }
    byte[] script=out.toByteArray();
    ICompiledScript compiledScript=getScriptContext().compile(language,fileName,1,new String(script,"String_Node_Str"));
    execute(compiledScript);
  }
 catch (  IOException ex) {
    log.log(Level.SEVERE,"String_Node_Str" + fileName + "String_Node_Str",ex);
    addException(new EngineException(MessageConstants.SCRIPT_FILE_LOAD_ERROR,url.toString(),ex));
  }
catch (  BirtException e) {
    log.log(Level.SEVERE,"String_Node_Str" + fileName + "String_Node_Str",e);
    addException(new EngineException(MessageConstants.SCRIPT_EVALUATION_ERROR,url.toString(),e));
  }
 finally {
    try {
      if (in != null)       in.close();
    }
 catch (    IOException e) {
    }
  }
}