Program: 69464
Project: 69464
Buggy source:
private void initializeScriptContext(){
  scriptContext=new ScriptContext();
  if (engine != null) {
    EngineConfig config=engine.getConfig();
    registerBeans(config.getConfigMap());
    registerBeans(config.getScriptObjects());
    scriptContext.setAttribute("String_Node_Str",config.getStatusHandler());
  }
  scriptContext.setLocale(locale);
  scriptContext.setAttribute("String_Node_Str",new ReportObject());
  scriptContext.setAttribute("String_Node_Str",params);
  scriptContext.setAttribute("String_Node_Str",configs);
  scriptContext.setAttribute("String_Node_Str",new Long(pageNumber));
  scriptContext.setAttribute("String_Node_Str",new Long(totalPage));
  scriptContext.setAttribute("String_Node_Str",this);
  scriptContext.setAttribute("String_Node_Str",pageVariables);
  if (runnable != null) {
    registerDesign(runnable);
  }
  if (reportContext != null) {
    scriptContext.setAttribute("String_Node_Str",reportContext);
  }
  scriptContext.setLocale(locale);
  scriptContext.setAttribute("String_Node_Str",new Long(pageNumber));
  scriptContext.setAttribute("String_Node_Str",new Long(totalPage));
  if (task != null) {
    IStatusHandler handler=task.getStatusHandler();
    if (handler != null) {
      handler.initialize();
      scriptContext.setAttribute("String_Node_Str",handler);
    }
  }
  if (transientBeans != null) {
    Iterator entries=transientBeans.entrySet().iterator();
    while (entries.hasNext()) {
      Map.Entry entry=(Map.Entry)entries.next();
      scriptContext.setAttribute((String)entry.getKey(),entry.getValue());
    }
  }
  if (persistentBeans != null) {
    Iterator entries=persistentBeans.entrySet().iterator();
    while (entries.hasNext()) {
      Map.Entry entry=(Map.Entry)entries.next();
      registerInRoot((String)entry.getKey(),entry.getValue());
    }
  }
  scriptContext.setApplicationClassLoader(getApplicationClassLoader());
}

Fixed version (ground truth):
private void initializeScriptContext(){
  scriptContext=new ScriptContext();
  if (engine != null) {
    EngineConfig config=engine.getConfig();
    IStatusHandler statusHandler=config.getStatusHandler();
    if (statusHandler != null) {
      scriptContext.setAttribute("String_Node_Str",statusHandler);
    }
  }
  scriptContext.setLocale(locale);
  scriptContext.setAttribute("String_Node_Str",new ReportObject());
  scriptContext.setAttribute("String_Node_Str",params);
  scriptContext.setAttribute("String_Node_Str",configs);
  scriptContext.setAttribute("String_Node_Str",new Long(pageNumber));
  scriptContext.setAttribute("String_Node_Str",new Long(totalPage));
  scriptContext.setAttribute("String_Node_Str",this);
  scriptContext.setAttribute("String_Node_Str",pageVariables);
  if (runnable != null) {
    registerDesign(runnable);
  }
  if (reportContext != null) {
    scriptContext.setAttribute("String_Node_Str",reportContext);
  }
  scriptContext.setLocale(locale);
  scriptContext.setAttribute("String_Node_Str",new Long(pageNumber));
  scriptContext.setAttribute("String_Node_Str",new Long(totalPage));
  if (task != null) {
    IStatusHandler handler=task.getStatusHandler();
    if (handler != null) {
      handler.initialize();
      scriptContext.setAttribute("String_Node_Str",handler);
    }
  }
  if (transientBeans != null) {
    Iterator entries=transientBeans.entrySet().iterator();
    while (entries.hasNext()) {
      Map.Entry entry=(Map.Entry)entries.next();
      scriptContext.setAttribute((String)entry.getKey(),entry.getValue());
    }
  }
  if (persistentBeans != null) {
    Iterator entries=persistentBeans.entrySet().iterator();
    while (entries.hasNext()) {
      Map.Entry entry=(Map.Entry)entries.next();
      registerInRoot((String)entry.getKey(),entry.getValue());
    }
  }
  scriptContext.setApplicationClassLoader(getApplicationClassLoader());
}