Program: 74045
Project: 74045
Buggy source:
protected IBaseResultSet doExecuteCube(IBaseResultSet parentResult,ICubeQueryDefinition query,boolean useCache){
  String queryID=(String)queryIDMap.get(query);
  try {
    IBaseQueryResults parentQueryResults=null;
    if (parentResult != null) {
      parentQueryResults=parentResult.getQueryResults();
    }
    String resultSetID=loadResultSetID(parentResult,queryID);
    if (resultSetID == null) {
      logger.log(Level.SEVERE,"String_Node_Str");
      return null;
    }
    if (useCache) {
      String rsetId=String.valueOf(cachedQueryToResults.get(query));
      query.setQueryResultsID(rsetId);
    }
 else {
      query.setQueryResultsID(null);
    }
    query.setQueryResultsID(resultSetID);
    IBasePreparedQuery pQuery=dteSession.prepare(query,appContext);
    Scriptable scope=context.getSharedScope();
    String pRsetId=null;
    String rowId="String_Node_Str";
    IBaseQueryResults dteResults;
    CubeResultSet resultSet=null;
    if (parentQueryResults == null) {
      dteResults=dteSession.execute(pQuery,null,scope);
      resultSet=new CubeResultSet(this,context,query,(ICubeQueryResults)dteResults);
    }
 else {
      pRsetId=parentResult.getQueryResults().getID();
      rowId=parentResult.getRawID();
      dteResults=dteSession.execute(pQuery,parentQueryResults,scope);
      resultSet=new CubeResultSet(this,context,resultSet,query,(ICubeQueryResults)dteResults);
    }
    storeDteMetaInfo(pRsetId,rowId,queryID,dteResults.getID());
    if (query.cacheQueryResults()) {
      cachedQueryToResults.put(query,dteResults.getID());
    }
    return resultSet;
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
    return null;
  }
}

Fixed version (ground truth):
protected IBaseResultSet doExecuteCube(IBaseResultSet parentResult,ICubeQueryDefinition query,boolean useCache){
  String queryID=(String)queryIDMap.get(query);
  try {
    IBaseQueryResults parentQueryResults=null;
    if (parentResult != null) {
      parentQueryResults=parentResult.getQueryResults();
    }
    String resultSetID=loadResultSetID(parentResult,queryID);
    if (resultSetID == null) {
      logger.log(Level.SEVERE,"String_Node_Str");
      return null;
    }
    if (useCache) {
      String rsetId=String.valueOf(cachedQueryToResults.get(query));
      query.setQueryResultsID(rsetId);
    }
 else {
      query.setQueryResultsID(null);
    }
    query.setQueryResultsID(resultSetID);
    IBasePreparedQuery pQuery=dteSession.prepare(query,appContext);
    Scriptable scope=context.getSharedScope();
    String pRsetId=null;
    String rowId="String_Node_Str";
    IBaseQueryResults dteResults;
    CubeResultSet resultSet=null;
    if (parentQueryResults == null) {
      dteResults=dteSession.execute(pQuery,null,scope);
      resultSet=new CubeResultSet(this,context,query,(ICubeQueryResults)dteResults);
    }
 else {
      pRsetId=parentResult.getQueryResults().getID();
      rowId=parentResult.getRawID();
      dteResults=dteSession.execute(pQuery,parentQueryResults,scope);
      resultSet=new CubeResultSet(this,context,parentResult,query,(ICubeQueryResults)dteResults);
    }
    storeDteMetaInfo(pRsetId,rowId,queryID,dteResults.getID());
    if (query.cacheQueryResults()) {
      cachedQueryToResults.put(query,dteResults.getID());
    }
    return resultSet;
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
    return null;
  }
}