Program: 66721
Project: 66721
Buggy source:
public IResultIterator getResultIterator() throws DataException {
  this.session.getStopSign().start();
  if (queryService == null)   throw new DataException(ResourceConstants.RESULT_CLOSED);
  try {
    if (iterator == null) {
      this.queryService.initAutoBinding();
      this.queryService.validateQuery();
      org.eclipse.birt.data.engine.odi.IResultIterator odiIterator=queryService.executeQuery();
      if (queryService.getQueryDefn() instanceof IQueryDefinition && !((QueryDefinition)queryService.getQueryDefn()).isTempQuery()) {
        iterator=QueryResultsUtil.processOdiResult(session,this,(IQueryDefinition)queryService.getQueryDefn(),odiIterator,((IQueryDefinition)queryService.getQueryDefn()).getDataSetName());
        if (iterator != null)         return iterator;
      }
      if (isDummyQuery(odiIterator)) {
        iterator=new DummyResultIterator(new ResultService(session,this),odiIterator,this.queryScope,this.queryService.getStartingRawID());
      }
 else {
        if (queryService.getQueryDefn() instanceof IQueryDefinition && ((IQueryDefinition)queryService.getQueryDefn()).isSummaryQuery()) {
          iterator=new ResultIterator2(new ResultService(session,this),odiIterator,this.queryScope,this.queryService.getStartingRawID());
        }
 else         if (queryService.getQueryDefn().usesDetails() == true || queryService.getQueryDefn().cacheQueryResults()) {
          iterator=new ResultIterator(new ResultService(session,this),odiIterator,this.queryScope,this.queryService.getStartingRawID());
        }
 else {
          iterator=new ResultIterator2(new ResultService(session,this),odiIterator,this.queryScope,this.queryService.getStartingRawID());
        }
      }
    }
  }
 catch (  BirtException e) {
    throw DataException.wrap(e);
  }
  logger.logp(Level.FINE,QueryResults.class.getName(),"String_Node_Str","String_Node_Str");
  return iterator;
}

Fixed version (ground truth):
public IResultIterator getResultIterator() throws DataException {
  if (this.session.getStopSign().isStopped())   return null;
  if (queryService == null)   throw new DataException(ResourceConstants.RESULT_CLOSED);
  try {
    if (iterator == null) {
      this.queryService.initAutoBinding();
      this.queryService.validateQuery();
      org.eclipse.birt.data.engine.odi.IResultIterator odiIterator=queryService.executeQuery();
      if (queryService.getQueryDefn() instanceof IQueryDefinition && !((QueryDefinition)queryService.getQueryDefn()).isTempQuery()) {
        iterator=QueryResultsUtil.processOdiResult(session,this,(IQueryDefinition)queryService.getQueryDefn(),odiIterator,((IQueryDefinition)queryService.getQueryDefn()).getDataSetName());
        if (iterator != null)         return iterator;
      }
      if (isDummyQuery(odiIterator)) {
        iterator=new DummyResultIterator(new ResultService(session,this),odiIterator,this.queryScope,this.queryService.getStartingRawID());
      }
 else {
        if (queryService.getQueryDefn() instanceof IQueryDefinition && ((IQueryDefinition)queryService.getQueryDefn()).isSummaryQuery()) {
          iterator=new ResultIterator2(new ResultService(session,this),odiIterator,this.queryScope,this.queryService.getStartingRawID());
        }
 else         if (queryService.getQueryDefn().usesDetails() == true || queryService.getQueryDefn().cacheQueryResults()) {
          iterator=new ResultIterator(new ResultService(session,this),odiIterator,this.queryScope,this.queryService.getStartingRawID());
        }
 else {
          iterator=new ResultIterator2(new ResultService(session,this),odiIterator,this.queryScope,this.queryService.getStartingRawID());
        }
      }
    }
  }
 catch (  BirtException e) {
    throw DataException.wrap(e);
  }
  logger.logp(Level.FINE,QueryResults.class.getName(),"String_Node_Str","String_Node_Str");
  return iterator;
}