Program: 67624
Project: 67624
Buggy source:
/** 
 * Show ProgressMonitorDialog
 */
private void updateResultsProcess(){
  needsUpdateUI=true;
  clearResultSetTable();
  IRunnableWithProgress runnable=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
      if (resultSetTable != null && !resultSetTable.isDisposed()) {
        ClassLoader oldContextLoader=Thread.currentThread().getContextClassLoader();
        ClassLoader parentLoader=oldContextLoader;
        if (parentLoader == null)         parentLoader=this.getClass().getClassLoader();
        ModuleHandle handle;
        DataSetHandle dsHandle=((DataSetEditor)getContainer()).getHandle();
        handle=dsHandle.getModuleHandle();
        Map dataSetBindingMap=new HashMap();
        Map dataSourceBindingMap=new HashMap();
        try {
          if (handle instanceof ReportDesignHandle) {
            ReportDesignHandle copiedReport=(ReportDesignHandle)(handle.copy().getHandle(null));
            ClassLoader newContextLoader=DataSetProvider.getCustomScriptClassLoader(parentLoader,copiedReport);
            Thread.currentThread().setContextClassLoader(newContextLoader);
            EngineConfig ec=new EngineConfig();
            ec.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,newContextLoader);
            ReportEngine engine=(ReportEngine)new ReportEngineFactory().createReportEngine(ec);
            DataSetUIUtil.clearPropertyBindingMap(dsHandle,dataSetBindingMap,dataSourceBindingMap);
            DummyEngineTask engineTask=new DummyEngineTask(engine,new ReportEngineHelper(engine).openReportDesign(copiedReport),copiedReport);
            Map appContext=new HashMap();
            appContext.put(DataEngine.MEMORY_DATA_SET_CACHE,new Integer(((DataSetHandle)getContainer().getModel()).getRowFetchLimit()));
            engineTask.setAppContext(appContext);
            engineTask.run();
            DataRequestSession session=engineTask.getDataSession();
            session.getDataSessionContext().getAppContext().put(ResourceIdentifiers.ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS,DTPUtil.getInstance().createResourceIdentifiers());
            IQueryResults resultSet=executeProcess(session,engineTask.getExecutionContext());
            populateRecords(resultSet);
            engineTask.close();
            engine.destroy();
            monitor.done();
          }
 else {
            DataSessionContext context;
            context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,((DataSetEditor)getContainer()).getHandle().getModuleHandle());
            DataRequestSession session=DataRequestSession.newSession(context);
            Map appContext=new HashMap();
            appContext.put(DataEngine.MEMORY_DATA_SET_CACHE,new Integer(((DataSetHandle)getContainer().getModel()).getRowFetchLimit()));
            appContext.put(ResourceIdentifiers.ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS,DTPUtil.getInstance().createResourceIdentifiers());
            if (context.getAppContext() != null) {
              appContext.putAll(context.getAppContext());
            }
            context.setAppContext(appContext);
            IQueryResults resultSet=executeProcess(session,null);
            populateRecords(resultSet);
            session.shutdown();
          }
        }
 catch (        BirtException e) {
          ExceptionHandler.handle(e);
        }
 finally {
          try {
            DataSetUIUtil.resetPropertyBinding(dsHandle,dataSetBindingMap,dataSourceBindingMap);
          }
 catch (          SemanticException e) {
          }
        }
        Thread.currentThread().setContextClassLoader(oldContextLoader);
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell()){
      protected void cancelPressed(){
        super.cancelPressed();
        needsUpdateUI=false;
      }
    }
.run(true,true,runnable);
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.handle(e);
  }
catch (  InterruptedException e) {
    ExceptionHandler.handle(e);
  }
  updateResultSetTableUI();
}

Fixed version (ground truth):
/** 
 * Show ProgressMonitorDialog
 */
private void updateResultsProcess(){
  needsUpdateUI=true;
  clearResultSetTable();
  IRunnableWithProgress runnable=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      monitor.beginTask("String_Node_Str",IProgressMonitor.UNKNOWN);
      if (resultSetTable != null && !resultSetTable.isDisposed()) {
        ClassLoader oldContextLoader=Thread.currentThread().getContextClassLoader();
        ClassLoader parentLoader=oldContextLoader;
        if (parentLoader == null)         parentLoader=this.getClass().getClassLoader();
        ModuleHandle handle;
        DataSetHandle dsHandle=((DataSetEditor)getContainer()).getHandle();
        handle=dsHandle.getModuleHandle();
        Map dataSetBindingMap=new HashMap();
        Map dataSourceBindingMap=new HashMap();
        try {
          if (handle instanceof ReportDesignHandle) {
            ReportDesignHandle copiedReport=(ReportDesignHandle)(handle.copy().getHandle(null));
            ClassLoader newContextLoader=DataSetProvider.getCustomScriptClassLoader(parentLoader,copiedReport);
            Thread.currentThread().setContextClassLoader(newContextLoader);
            EngineConfig ec=new EngineConfig();
            ec.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,newContextLoader);
            ReportEngine engine=(ReportEngine)new ReportEngineFactory().createReportEngine(ec);
            clearProperyBindingMap(dataSetBindingMap,dataSourceBindingMap);
            DummyEngineTask engineTask=new DummyEngineTask(engine,new ReportEngineHelper(engine).openReportDesign(copiedReport),copiedReport);
            Map appContext=new HashMap();
            appContext.put(DataEngine.MEMORY_DATA_SET_CACHE,new Integer(((DataSetHandle)getContainer().getModel()).getRowFetchLimit()));
            engineTask.setAppContext(appContext);
            engineTask.run();
            DataRequestSession session=engineTask.getDataSession();
            session.getDataSessionContext().getAppContext().put(ResourceIdentifiers.ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS,DTPUtil.getInstance().createResourceIdentifiers());
            IQueryResults resultSet=executeProcess(session,engineTask.getExecutionContext());
            populateRecords(resultSet);
            engineTask.close();
            engine.destroy();
            monitor.done();
          }
 else {
            DataSessionContext context;
            context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,((DataSetEditor)getContainer()).getHandle().getModuleHandle());
            DataRequestSession session=DataRequestSession.newSession(context);
            Map appContext=new HashMap();
            appContext.put(DataEngine.MEMORY_DATA_SET_CACHE,new Integer(((DataSetHandle)getContainer().getModel()).getRowFetchLimit()));
            appContext.put(ResourceIdentifiers.ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS,DTPUtil.getInstance().createResourceIdentifiers());
            if (context.getAppContext() != null) {
              appContext.putAll(context.getAppContext());
            }
            context.setAppContext(appContext);
            IQueryResults resultSet=executeProcess(session,null);
            populateRecords(resultSet);
            session.shutdown();
          }
        }
 catch (        BirtException e) {
          ExceptionHandler.handle(e);
        }
 finally {
          resetPropertyBinding(dataSetBindingMap,dataSourceBindingMap);
        }
        Thread.currentThread().setContextClassLoader(oldContextLoader);
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell()){
      protected void cancelPressed(){
        super.cancelPressed();
        needsUpdateUI=false;
      }
    }
.run(true,true,runnable);
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.handle(e);
  }
catch (  InterruptedException e) {
    ExceptionHandler.handle(e);
  }
  updateResultSetTableUI();
}