Program: 68450
Project: 68450
Buggy source:
public void testNavigatorOnSubCursor() throws DataException, OLAPException, IOException {
  ICubeQueryDefinition cqd=creator.createQueryDefinition();
  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");
  IBinding columnGrandTotal=new Binding("String_Node_Str");
  columnGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_SUM_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");
  cqd.addBinding(rowGrandTotal);
  cqd.addBinding(columnGrandTotal);
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube);
  EdgeCursor rowCursor=cubeView.getRowEdgeView().getEdgeCursor();
  EdgeCursor columnCursor=cubeView.getColumnEdgeView().getEdgeCursor();
  BirtCubeView subCubeView=new BirtCubeView(cubeView.getCubeQueryExecutor(),null);
  columnCursor.beforeFirst();
  rowCursor.next();
  columnCursor.setPosition(8);
  CubeCursor subCursor=subCubeView.getCubeCursor(new StopSign(),"String_Node_Str","String_Node_Str",cubeView);
  EdgeCursor subRowCursor=subCubeView.getRowEdgeView().getEdgeCursor();
  EdgeCursor subColumnCursor=subCubeView.getColumnEdgeView().getEdgeCursor();
  subRowCursor.beforeFirst();
  subColumnCursor.beforeFirst();
  assertTrue(subRowCursor.isBeforeFirst());
  assertTrue(subColumnCursor.isBeforeFirst());
  subRowCursor.first();
  subColumnCursor.first();
  assertTrue(subRowCursor.isFirst());
  assertTrue(subColumnCursor.isFirst());
  assertTrue(subRowCursor.getPosition() == 0);
  assertTrue(subColumnCursor.getPosition() == 0);
  subColumnCursor.setPosition(3);
  assertTrue(subColumnCursor.getPosition() == 3);
  subRowCursor.beforeFirst();
  subRowCursor.next();
  subColumnCursor.setPosition(3);
  DimensionCursor c1=(DimensionCursor)subColumnCursor.getDimensionCursor().get(0);
  DimensionCursor c2=(DimensionCursor)subColumnCursor.getDimensionCursor().get(1);
  DimensionCursor c3=(DimensionCursor)subColumnCursor.getDimensionCursor().get(2);
  DimensionCursor c4=(DimensionCursor)subColumnCursor.getDimensionCursor().get(3);
  assertTrue(c1.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c2.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c3.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c4.getObject(0).toString().equals("String_Node_Str"));
  columnCursor.setPosition(5);
  subCursor=subCubeView.getCubeCursor(new StopSign(),"String_Node_Str","String_Node_Str",cubeView);
  subRowCursor=subCubeView.getRowEdgeView().getEdgeCursor();
  subColumnCursor=subCubeView.getColumnEdgeView().getEdgeCursor();
  subColumnCursor.setPosition(7);
  c1=(DimensionCursor)subColumnCursor.getDimensionCursor().get(0);
  c2=(DimensionCursor)subColumnCursor.getDimensionCursor().get(1);
  c3=(DimensionCursor)subColumnCursor.getDimensionCursor().get(2);
  c4=(DimensionCursor)subColumnCursor.getDimensionCursor().get(3);
  assertTrue(c1.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c2.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c3.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c4.getObject(0).toString().equals("String_Node_Str"));
  close(dataCursor);
}

Fixed version (ground truth):
public void testNavigatorOnSubCursor() throws DataException, OLAPException, IOException {
  ICubeQueryDefinition cqd=creator.createQueryDefinition();
  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");
  IBinding columnGrandTotal=new Binding("String_Node_Str");
  columnGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_SUM_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");
  cqd.addBinding(rowGrandTotal);
  cqd.addBinding(columnGrandTotal);
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  EdgeCursor rowCursor=cubeView.getRowEdgeView().getEdgeCursor();
  EdgeCursor columnCursor=cubeView.getColumnEdgeView().getEdgeCursor();
  BirtCubeView subCubeView=new BirtCubeView(cubeView.getCubeQueryExecutor(),null);
  columnCursor.beforeFirst();
  rowCursor.next();
  columnCursor.setPosition(8);
  CubeCursor subCursor=subCubeView.getCubeCursor(new StopSign(),"String_Node_Str","String_Node_Str",cubeView);
  EdgeCursor subRowCursor=subCubeView.getRowEdgeView().getEdgeCursor();
  EdgeCursor subColumnCursor=subCubeView.getColumnEdgeView().getEdgeCursor();
  subRowCursor.beforeFirst();
  subColumnCursor.beforeFirst();
  assertTrue(subRowCursor.isBeforeFirst());
  assertTrue(subColumnCursor.isBeforeFirst());
  subRowCursor.first();
  subColumnCursor.first();
  assertTrue(subRowCursor.isFirst());
  assertTrue(subColumnCursor.isFirst());
  assertTrue(subRowCursor.getPosition() == 0);
  assertTrue(subColumnCursor.getPosition() == 0);
  subColumnCursor.setPosition(3);
  assertTrue(subColumnCursor.getPosition() == 3);
  subRowCursor.beforeFirst();
  subRowCursor.next();
  subColumnCursor.setPosition(3);
  DimensionCursor c1=(DimensionCursor)subColumnCursor.getDimensionCursor().get(0);
  DimensionCursor c2=(DimensionCursor)subColumnCursor.getDimensionCursor().get(1);
  DimensionCursor c3=(DimensionCursor)subColumnCursor.getDimensionCursor().get(2);
  DimensionCursor c4=(DimensionCursor)subColumnCursor.getDimensionCursor().get(3);
  assertTrue(c1.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c2.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c3.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c4.getObject(0).toString().equals("String_Node_Str"));
  columnCursor.setPosition(5);
  subCursor=subCubeView.getCubeCursor(new StopSign(),"String_Node_Str","String_Node_Str",cubeView);
  subRowCursor=subCubeView.getRowEdgeView().getEdgeCursor();
  subColumnCursor=subCubeView.getColumnEdgeView().getEdgeCursor();
  subColumnCursor.setPosition(7);
  c1=(DimensionCursor)subColumnCursor.getDimensionCursor().get(0);
  c2=(DimensionCursor)subColumnCursor.getDimensionCursor().get(1);
  c3=(DimensionCursor)subColumnCursor.getDimensionCursor().get(2);
  c4=(DimensionCursor)subColumnCursor.getDimensionCursor().get(3);
  assertTrue(c1.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c2.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c3.getObject(0).toString().equals("String_Node_Str"));
  assertTrue(c4.getObject(0).toString().equals("String_Node_Str"));
  close(dataCursor);
}