Program: 76406
Project: 76406
Buggy source:
/** 
 * without column edge
 * @throws OLAPException
 * @throws BirtException 
 */
public void testCursorModel3() throws OLAPException, BirtException {
  ICubeQueryDefinition cqd=new CubeQueryDefinition("String_Node_Str");
  cqd.createMeasure("String_Node_Str");
  cqd.createMeasure("String_Node_Str");
  IEdgeDefinition columnEdge=cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);
  IDimensionDefinition timeDim=columnEdge.createDimension("String_Node_Str");
  IHierarchyDefinition timeHier=timeDim.createHierarchy("String_Node_Str");
  timeHier.createLevel("String_Node_Str");
  IBinding rowGrandTotal=new Binding("String_Node_Str");
  rowGrandTotal.setAggrFunction(BuiltInAggregationFactory.TOTAL_SUM_FUNC);
  rowGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  rowGrandTotal.addAggregateOn("String_Node_Str");
  IBinding columnGrandTotal=new Binding("String_Node_Str");
  columnGrandTotal.setAggrFunction(BuiltInAggregationFactory.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");
  cqd.addBinding(rowGrandTotal);
  cqd.addBinding(columnGrandTotal);
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(cqd,this.scope,DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION,scope,null,null)));
  CubeCursor dataCursor=cubeView.getCubeCursor();
  EdgeCursor rowCursor=cubeView.getRowEdgeView().getEdgeCursor();
  DimensionCursor timeCursor=(DimensionCursor)rowCursor.getDimensionCursor().get(0);
  rowCursor.beforeFirst();
  while (rowCursor.next()) {
    print(timeCursor.getObject("String_Node_Str"));
    print(dataCursor.getObject("String_Node_Str"));
    print(dataCursor.getObject("String_Node_Str"));
  }
  System.out.println("String_Node_Str");
  timeCursor.beforeFirst();
  while (timeCursor.next()) {
    print(timeCursor.getString(0));
    print(dataCursor.getObject(0));
    print(dataCursor.getObject(1));
  }
}

Fixed version (ground truth):
/** 
 * without column edge
 * @throws OLAPException
 * @throws BirtException 
 */
public void testCursorModel3() throws OLAPException, BirtException {
  ICubeQueryDefinition cqd=new CubeQueryDefinition(CubeCreator.cubeName);
  cqd.createMeasure("String_Node_Str");
  cqd.createMeasure("String_Node_Str");
  IEdgeDefinition columnEdge=cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);
  IDimensionDefinition timeDim=columnEdge.createDimension("String_Node_Str");
  IHierarchyDefinition timeHier=timeDim.createHierarchy("String_Node_Str");
  timeHier.createLevel("String_Node_Str");
  IBinding rowGrandTotal=new Binding("String_Node_Str");
  rowGrandTotal.setAggrFunction(BuiltInAggregationFactory.TOTAL_SUM_FUNC);
  rowGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  rowGrandTotal.addAggregateOn("String_Node_Str");
  IBinding columnGrandTotal=new Binding("String_Node_Str");
  columnGrandTotal.setAggrFunction(BuiltInAggregationFactory.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");
  cqd.addBinding(rowGrandTotal);
  cqd.addBinding(columnGrandTotal);
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(cqd,this.scope,DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION,scope,null,null)));
  CubeCursor dataCursor=cubeView.getCubeCursor();
  EdgeCursor rowCursor=cubeView.getRowEdgeView().getEdgeCursor();
  DimensionCursor timeCursor=(DimensionCursor)rowCursor.getDimensionCursor().get(0);
  rowCursor.beforeFirst();
  while (rowCursor.next()) {
    print(timeCursor.getObject("String_Node_Str"));
    print(dataCursor.getObject("String_Node_Str"));
    print(dataCursor.getObject("String_Node_Str"));
  }
  System.out.println("String_Node_Str");
  timeCursor.beforeFirst();
  while (timeCursor.next()) {
    print(timeCursor.getString(0));
    print(dataCursor.getObject(0));
    print(dataCursor.getObject(1));
  }
}