Program: 66419
Project: 66419
Buggy source:
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);
    }
  }
  Locale locale=getLocale();
  if (locale != null) {
    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",Long.valueOf(pageNumber));
  scriptContext.setAttribute("String_Node_Str",Long.valueOf(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.setAttribute("String_Node_Str",Long.valueOf(pageNumber));
  scriptContext.setAttribute("String_Node_Str",Long.valueOf(totalPage));
  if (task != null) {
    IStatusHandler handler=task.getStatusHandler();
    if (handler != null) {
      handler.initialize();
    }
    if (handler == null) {
      handler=engine.getConfig().getStatusHandler();
    }
    if (handler != null) {
      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());
    }
  }
  if (applicationClassLoader != null) {
    scriptContext.setApplicationClassLoader(applicationClassLoader);
  }
}

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);
    }
  }
  Locale locale=getLocale();
  if (locale != null) {
    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",Long.valueOf(pageNumber));
  scriptContext.setAttribute("String_Node_Str",Long.valueOf(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.setAttribute("String_Node_Str",Long.valueOf(pageNumber));
  scriptContext.setAttribute("String_Node_Str",Long.valueOf(totalPage));
  if (task != null) {
    IStatusHandler handler=task.getStatusHandler();
    if (handler != null) {
      handler.initialize();
    }
    if (handler == null) {
      handler=engine.getConfig().getStatusHandler();
    }
    if (handler != null) {
      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());
}