Program: 72302
Project: 72302
Buggy source:
/** 
 * Run nested query.
 */
private void runNestedQuery() throws Exception {
  IPreparedQuery preparedQueryCustomer=dataEngine.prepare(queryDefnCustomer,this.getAppContext());
  IPreparedQuery preparedQueryCall=dataEngine.prepare(queryDefnCall,this.getAppContext());
  ScriptContext scriptContext=new ScriptContext();
  IQueryResults queryResultsCustomer=preparedQueryCustomer.execute(scriptContext.getScope());
  IResultIterator resultItCustomer=queryResultsCustomer.getResultIterator();
  testPrintln("String_Node_Str");
  while (resultItCustomer.next()) {
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[1],resultItCustomer));
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[2],resultItCustomer));
    testPrintln("String_Node_Str");
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[3],resultItCustomer));
    testPrintln("String_Node_Str");
    scriptContext.enterScope();
    IQueryResults queryResultsCalls=preparedQueryCall.execute(queryResultsCustomer,scriptContext.getScope());
    IResultIterator resultItCalls=queryResultsCalls.getResultIterator();
    while (resultItCalls.next()) {
      for (int i=1; i < expressionsCall.length; i++) {
        testPrint(evalAsString(bindingNameCall[i],resultItCalls));
        testPrint("String_Node_Str");
      }
      testPrintln("String_Node_Str");
    }
    scriptContext.exitScope();
    testPrintln("String_Node_Str");
  }
  scriptContext.exit();
  checkOutputFile();
}

Fixed version (ground truth):
/** 
 * Run nested query.
 */
private void runNestedQuery() throws Exception {
  IPreparedQuery preparedQueryCustomer=dataEngine.prepare(queryDefnCustomer,this.getAppContext());
  IPreparedQuery preparedQueryCall=dataEngine.prepare(queryDefnCall,this.getAppContext());
  ScriptContext scriptContext=new ScriptContext();
  IQueryResults queryResultsCustomer=preparedQueryCustomer.execute(scriptContext.getScope());
  IResultIterator resultItCustomer=queryResultsCustomer.getResultIterator();
  testPrintln("String_Node_Str");
  while (resultItCustomer.next()) {
    resultItCustomer.getStartingGroupLevel();
    resultItCustomer.getEndingGroupLevel();
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[1],resultItCustomer));
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[2],resultItCustomer));
    testPrintln("String_Node_Str");
    testPrint("String_Node_Str");
    testPrint(evalAsString(bindingNameCustomer[3],resultItCustomer));
    testPrintln("String_Node_Str");
    scriptContext.enterScope();
    IQueryResults queryResultsCalls=preparedQueryCall.execute(queryResultsCustomer,scriptContext.getScope());
    IResultIterator resultItCalls=queryResultsCalls.getResultIterator();
    while (resultItCalls.next()) {
      for (int i=1; i < expressionsCall.length; i++) {
        testPrint(evalAsString(bindingNameCall[i],resultItCalls));
        testPrint("String_Node_Str");
      }
      testPrintln("String_Node_Str");
    }
    scriptContext.exitScope();
    testPrintln("String_Node_Str");
  }
  scriptContext.exit();
  checkOutputFile();
}