Program: 69435
Project: 69435
Buggy source:
public ICubeQueryResults execute(IBaseQueryResults outerResults,Scriptable scope) throws DataException {
  Scriptable cubeScope=null;
  try {
    cubeScope=((IDataScriptEngine)session.getEngineContext().getScriptContext().getScriptEngine(IDataScriptEngine.ENGINE_NAME)).getJSContext(session.getEngineContext().getScriptContext()).newObject(scope == null ? this.session.getSharedScope() : scope);
    cubeScope.setParentScope(scope == null ? this.session.getSharedScope() : scope);
    cubeScope.setPrototype(scope == null ? this.session.getSharedScope() : scope);
  }
 catch (  BirtException e) {
    throw DataException.wrap(e);
  }
  Object delegateObject=null;
  try {
    delegateObject=Thread.currentThread().getContextClassLoader().loadClass("String_Node_Str").getConstructor(ICubeQueryDefinition.class,DataEngineSession.class,DataEngineContext.class,Map.class).newInstance(cubeQueryDefn,session,context,appContext);
  }
 catch (  ClassNotFoundException e) {
  }
catch (  InstantiationException e) {
  }
catch (  IllegalAccessException e) {
  }
catch (  SecurityException e) {
  }
catch (  IllegalArgumentException e) {
  }
catch (  InvocationTargetException e) {
  }
catch (  NoSuchMethodException e) {
  }
  if (delegateObject != null) {
    try {
      Method method=delegateObject.getClass().getMethod("String_Node_Str",new Class[]{IBaseQueryResults.class,Scriptable.class});
      return (ICubeQueryResults)method.invoke(delegateObject,new Object[]{outerResults,scope});
    }
 catch (    SecurityException e) {
    }
catch (    NoSuchMethodException e) {
    }
catch (    IllegalArgumentException e) {
    }
catch (    IllegalAccessException e) {
    }
catch (    InvocationTargetException e) {
    }
  }
  return new CubeQueryResults(outerResults,this,this.session,cubeScope,this.context,appContext);
}

Fixed version (ground truth):
public ICubeQueryResults execute(IBaseQueryResults outerResults,Scriptable scope) throws DataException {
  Scriptable cubeScope=null;
  try {
    cubeScope=((IDataScriptEngine)session.getEngineContext().getScriptContext().getScriptEngine(IDataScriptEngine.ENGINE_NAME)).getJSContext(session.getEngineContext().getScriptContext()).initStandardObjects();
    cubeScope.setParentScope(scope == null ? this.session.getSharedScope() : scope);
    cubeScope.setPrototype(scope == null ? this.session.getSharedScope() : scope);
  }
 catch (  BirtException e) {
    throw DataException.wrap(e);
  }
  Object delegateObject=null;
  try {
    delegateObject=Thread.currentThread().getContextClassLoader().loadClass("String_Node_Str").getConstructor(ICubeQueryDefinition.class,DataEngineSession.class,DataEngineContext.class,Map.class).newInstance(cubeQueryDefn,session,context,appContext);
  }
 catch (  ClassNotFoundException e) {
  }
catch (  InstantiationException e) {
  }
catch (  IllegalAccessException e) {
  }
catch (  SecurityException e) {
  }
catch (  IllegalArgumentException e) {
  }
catch (  InvocationTargetException e) {
  }
catch (  NoSuchMethodException e) {
  }
  if (delegateObject != null) {
    try {
      Method method=delegateObject.getClass().getMethod("String_Node_Str",new Class[]{IBaseQueryResults.class,Scriptable.class});
      return (ICubeQueryResults)method.invoke(delegateObject,new Object[]{outerResults,scope});
    }
 catch (    SecurityException e) {
    }
catch (    NoSuchMethodException e) {
    }
catch (    IllegalArgumentException e) {
    }
catch (    IllegalAccessException e) {
    }
catch (    InvocationTargetException e) {
    }
  }
  return new CubeQueryResults(outerResults,this,this.session,cubeScope,this.context,appContext);
}