Program: 77781
Project: 77781
Buggy source:
protected IResultSet doExecuteQuery(DteResultSet parentResult,IQueryDefinition query){
  String queryID=(String)queryIDMap.get(query);
  try {
    IQueryResults parentQueryResults=null;
    if (parentResult != null) {
      parentQueryResults=parentResult.getQueryResults();
    }
    String resultSetID=null;
    if (parentQueryResults == null) {
      resultSetID=getResultID(null,-1,queryID);
    }
 else {
      String pRsetId=parentResult.getBaseRSetID();
      long rowid=parentResult.getRawID();
      resultSetID=getResultID(pRsetId,rowid,queryID);
    }
    if (resultSetID == null) {
      logger.log(Level.SEVERE,"String_Node_Str");
      return null;
    }
    ((QueryDefinition)query).setQueryResultsID(resultSetID);
    IPreparedQuery pQuery=dteEngine.prepare(query);
    Scriptable scope=context.getSharedScope();
    String pRsetId=null;
    long rowId=-1;
    IQueryResults dteResults;
    DteResultSet resultSet=null;
    if (parentQueryResults == null) {
      dteResults=pQuery.execute(scope);
      resultSet=new DteResultSet(this,context,dteResults);
    }
 else {
      pRsetId=parentResult.getQueryResults().getID();
      rowId=parentResult.getRawID();
      dteResults=pQuery.execute(parentQueryResults,scope);
      resultSet=new DteResultSet(parentResult,dteResults);
    }
    resultSet.setBaseRSetID(resultSetID);
    rsets.addFirst(resultSet);
    storeDteMetaInfo(pRsetId,rowId,queryID,dteResults.getID());
    return resultSet;
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
    return null;
  }
}

Fixed version (ground truth):
protected IResultSet doExecuteQuery(DteResultSet parentResult,IQueryDefinition query){
  String queryID=(String)queryIDMap.get(query);
  try {
    IQueryResults parentQueryResults=null;
    if (parentResult != null) {
      parentQueryResults=parentResult.getQueryResults();
    }
    String resultSetID=null;
    if (parentQueryResults == null) {
      resultSetID=getResultID(null,-1,queryID);
    }
 else {
      String pRsetId=parentResult.getBaseRSetID();
      long rowid=parentResult.getRawID();
      resultSetID=getResultID(pRsetId,rowid,queryID);
    }
    if (resultSetID == null) {
      logger.log(Level.SEVERE,"String_Node_Str");
      return null;
    }
    ((QueryDefinition)query).setQueryResultsID(resultSetID);
    IPreparedQuery pQuery=dteEngine.prepare(query);
    Scriptable scope=context.getSharedScope();
    String pRsetId=null;
    long rowId=-1;
    IQueryResults dteResults;
    DteResultSet resultSet=null;
    if (parentQueryResults == null) {
      dteResults=pQuery.execute(scope);
      resultSet=new DteResultSet(this,context,dteResults);
    }
 else {
      pRsetId=parentResult.getQueryResults().getID();
      rowId=parentResult.getRawID();
      dteResults=pQuery.execute(parentQueryResults,scope);
      resultSet=new DteResultSet(parentResult,dteResults);
    }
    resultSet.setBaseRSetID(resultSetID);
    storeDteMetaInfo(pRsetId,rowId,queryID,dteResults.getID());
    return resultSet;
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
    return null;
  }
}