Program: 67758
Project: 67758
Buggy source:
public void testNavigatorOnPage() throws Exception {
  ICubeQueryDefinition cqd=creator.createQueryDefintionWithPage1();
  IBinding rowGrandTotal=new Binding("String_Node_Str");
  rowGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);
  rowGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  rowGrandTotal.addAggregateOn("String_Node_Str");
  rowGrandTotal.addAggregateOn("String_Node_Str");
  rowGrandTotal.addAggregateOn("String_Node_Str");
  IBinding columnGrandTotal=new Binding("String_Node_Str");
  columnGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_AVE_FUNC);
  columnGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  columnGrandTotal.addAggregateOn("String_Node_Str");
  columnGrandTotal.addAggregateOn("String_Node_Str");
  columnGrandTotal.addAggregateOn("String_Node_Str");
  columnGrandTotal.addAggregateOn("String_Node_Str");
  IBinding totalGrandTotal=new Binding("String_Node_Str");
  totalGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);
  totalGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  totalGrandTotal.addAggregateOn("String_Node_Str");
  cqd.addBinding(rowGrandTotal);
  cqd.addBinding(columnGrandTotal);
  cqd.addBinding(totalGrandTotal);
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()),null);
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  EdgeCursor pageCursor=(EdgeCursor)dataCursor.getPageEdge().toArray()[0];
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  List rowGrandTotalNames=new ArrayList();
  rowGrandTotalNames.add("String_Node_Str");
  pageCursor.setPosition(0);
  dataCursor.synchronizePages();
  String output="String_Node_Str" + pageCursor.getPosition() + "String_Node_Str";
  for (int i=0; i < pageCursor.getDimensionCursor().size(); i++) {
    output+=((DimensionCursor)pageCursor.getDimensionCursor().get(i)).getObject(0);
  }
  output+="String_Node_Str";
  output+=this.creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,rowGrandTotalNames,"String_Node_Str","String_Node_Str",null);
  output+="String_Node_Str";
  pageCursor.setPosition(3);
  dataCursor.synchronizePages();
  output+="String_Node_Str" + pageCursor.getPosition() + "String_Node_Str";
  for (int i=0; i < pageCursor.getDimensionCursor().size(); i++) {
    output+=((DimensionCursor)pageCursor.getDimensionCursor().get(i)).getObject(0);
  }
  output+="String_Node_Str";
  output+=this.creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,rowGrandTotalNames,"String_Node_Str","String_Node_Str",null);
  output+="String_Node_Str";
  pageCursor.setPosition(1);
  dataCursor.synchronizePages();
  output+="String_Node_Str" + pageCursor.getPosition() + "String_Node_Str";
  for (int i=0; i < pageCursor.getDimensionCursor().size(); i++) {
    output+=((DimensionCursor)pageCursor.getDimensionCursor().get(i)).getObject(0);
  }
  output+="String_Node_Str";
  output+=this.creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,rowGrandTotalNames,"String_Node_Str","String_Node_Str",null);
  output+="String_Node_Str";
  pageCursor.last();
  dataCursor.synchronizePages();
  output+="String_Node_Str" + pageCursor.getPosition() + "String_Node_Str";
  for (int i=0; i < pageCursor.getDimensionCursor().size(); i++) {
    output+=((DimensionCursor)pageCursor.getDimensionCursor().get(i)).getObject(0);
  }
  output+="String_Node_Str";
  output+=this.creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,rowGrandTotalNames,"String_Node_Str","String_Node_Str",null);
  output+="String_Node_Str";
  testOut.print(output);
  checkOutputFile();
  close(dataCursor);
}

Fixed version (ground truth):
public void testNavigatorOnPage() throws Exception {
  ICubeQueryDefinition cqd=creator.createQueryDefintionWithPage1();
  IBinding rowGrandTotal=new Binding("String_Node_Str");
  rowGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);
  rowGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  rowGrandTotal.addAggregateOn("String_Node_Str");
  rowGrandTotal.addAggregateOn("String_Node_Str");
  rowGrandTotal.addAggregateOn("String_Node_Str");
  IBinding columnGrandTotal=new Binding("String_Node_Str");
  columnGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_AVE_FUNC);
  columnGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  columnGrandTotal.addAggregateOn("String_Node_Str");
  columnGrandTotal.addAggregateOn("String_Node_Str");
  columnGrandTotal.addAggregateOn("String_Node_Str");
  columnGrandTotal.addAggregateOn("String_Node_Str");
  IBinding totalGrandTotal=new Binding("String_Node_Str");
  totalGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);
  totalGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  totalGrandTotal.addAggregateOn("String_Node_Str");
  cqd.addBinding(rowGrandTotal);
  cqd.addBinding(columnGrandTotal);
  cqd.addBinding(totalGrandTotal);
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()),cube,null);
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  EdgeCursor pageCursor=(EdgeCursor)dataCursor.getPageEdge().toArray()[0];
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  List rowGrandTotalNames=new ArrayList();
  rowGrandTotalNames.add("String_Node_Str");
  pageCursor.setPosition(0);
  dataCursor.synchronizePages();
  String output="String_Node_Str" + pageCursor.getPosition() + "String_Node_Str";
  for (int i=0; i < pageCursor.getDimensionCursor().size(); i++) {
    output+=((DimensionCursor)pageCursor.getDimensionCursor().get(i)).getObject(0);
  }
  output+="String_Node_Str";
  output+=this.creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,rowGrandTotalNames,"String_Node_Str","String_Node_Str",null);
  output+="String_Node_Str";
  pageCursor.setPosition(3);
  dataCursor.synchronizePages();
  output+="String_Node_Str" + pageCursor.getPosition() + "String_Node_Str";
  for (int i=0; i < pageCursor.getDimensionCursor().size(); i++) {
    output+=((DimensionCursor)pageCursor.getDimensionCursor().get(i)).getObject(0);
  }
  output+="String_Node_Str";
  output+=this.creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,rowGrandTotalNames,"String_Node_Str","String_Node_Str",null);
  output+="String_Node_Str";
  pageCursor.setPosition(1);
  dataCursor.synchronizePages();
  output+="String_Node_Str" + pageCursor.getPosition() + "String_Node_Str";
  for (int i=0; i < pageCursor.getDimensionCursor().size(); i++) {
    output+=((DimensionCursor)pageCursor.getDimensionCursor().get(i)).getObject(0);
  }
  output+="String_Node_Str";
  output+=this.creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,rowGrandTotalNames,"String_Node_Str","String_Node_Str",null);
  output+="String_Node_Str";
  pageCursor.last();
  dataCursor.synchronizePages();
  output+="String_Node_Str" + pageCursor.getPosition() + "String_Node_Str";
  for (int i=0; i < pageCursor.getDimensionCursor().size(); i++) {
    output+=((DimensionCursor)pageCursor.getDimensionCursor().get(i)).getObject(0);
  }
  output+="String_Node_Str";
  output+=this.creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,rowGrandTotalNames,"String_Node_Str","String_Node_Str",null);
  output+="String_Node_Str";
  testOut.print(output);
  checkOutputFile();
  close(dataCursor);
}