Program: 76404
Project: 76404
Buggy source:
/** 
 * without row edge
 * @throws OLAPException
 * @throws BirtException 
 */
public void testCursorModel2() 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.COLUMN_EDGE);
  IDimensionDefinition geographyDim=columnEdge.createDimension("String_Node_Str");
  IHierarchyDefinition geographyHier=geographyDim.createHierarchy("String_Node_Str");
  geographyHier.createLevel("String_Node_Str");
  geographyHier.createLevel("String_Node_Str");
  geographyHier.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 columnCursor=cubeView.getColumnEdgeView().getEdgeCursor();
  DimensionCursor countryCursor=(DimensionCursor)columnCursor.getDimensionCursor().get(0);
  DimensionCursor cityCursor=(DimensionCursor)columnCursor.getDimensionCursor().get(1);
  DimensionCursor productCursor=(DimensionCursor)columnCursor.getDimensionCursor().get(2);
  columnCursor.beforeFirst();
  Object obj1, obj2, obj3;
  while (columnCursor.next()) {
    obj1=countryCursor.getObject("String_Node_Str");
    print(obj1);
    obj2=cityCursor.getObject("String_Node_Str");
    print(obj2);
    obj3=productCursor.getObject("String_Node_Str");
    print(obj3);
  }
  columnCursor.beforeFirst();
  while (columnCursor.next()) {
    print(dataCursor.getObject("String_Node_Str"));
    print(dataCursor.getObject("String_Node_Str"));
  }
  System.out.println("String_Node_Str");
  countryCursor.beforeFirst();
  while (countryCursor.next()) {
    cityCursor.beforeFirst();
    while (cityCursor.next()) {
      productCursor.beforeFirst();
      while (productCursor.next()) {
        print(countryCursor.getObject("String_Node_Str"));
        print(cityCursor.getObject("String_Node_Str"));
        print(productCursor.getObject("String_Node_Str"));
      }
    }
  }
  countryCursor.beforeFirst();
  while (countryCursor.next()) {
    cityCursor.beforeFirst();
    while (cityCursor.next()) {
      productCursor.beforeFirst();
      while (productCursor.next()) {
        print(dataCursor.getObject(0));
        print(dataCursor.getObject(1));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * without row edge
 * @throws OLAPException
 * @throws BirtException 
 */
public void testCursorModel2() throws OLAPException, BirtException {
  ICubeQueryDefinition cqd=new CubeQueryDefinition(CubeCreator.cubeName);
  cqd.createMeasure("String_Node_Str");
  cqd.createMeasure("String_Node_Str");
  IEdgeDefinition columnEdge=cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);
  IDimensionDefinition geographyDim=columnEdge.createDimension("String_Node_Str");
  IHierarchyDefinition geographyHier=geographyDim.createHierarchy("String_Node_Str");
  geographyHier.createLevel("String_Node_Str");
  geographyHier.createLevel("String_Node_Str");
  geographyHier.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 columnCursor=cubeView.getColumnEdgeView().getEdgeCursor();
  DimensionCursor countryCursor=(DimensionCursor)columnCursor.getDimensionCursor().get(0);
  DimensionCursor cityCursor=(DimensionCursor)columnCursor.getDimensionCursor().get(1);
  DimensionCursor productCursor=(DimensionCursor)columnCursor.getDimensionCursor().get(2);
  columnCursor.beforeFirst();
  Object obj1, obj2, obj3;
  while (columnCursor.next()) {
    obj1=countryCursor.getObject("String_Node_Str");
    print(obj1);
    obj2=cityCursor.getObject("String_Node_Str");
    print(obj2);
    obj3=productCursor.getObject("String_Node_Str");
    print(obj3);
  }
  columnCursor.beforeFirst();
  while (columnCursor.next()) {
    print(dataCursor.getObject("String_Node_Str"));
    print(dataCursor.getObject("String_Node_Str"));
  }
  System.out.println("String_Node_Str");
  countryCursor.beforeFirst();
  while (countryCursor.next()) {
    cityCursor.beforeFirst();
    while (cityCursor.next()) {
      productCursor.beforeFirst();
      while (productCursor.next()) {
        print(countryCursor.getObject("String_Node_Str"));
        print(cityCursor.getObject("String_Node_Str"));
        print(productCursor.getObject("String_Node_Str"));
      }
    }
  }
  countryCursor.beforeFirst();
  while (countryCursor.next()) {
    cityCursor.beforeFirst();
    while (cityCursor.next()) {
      productCursor.beforeFirst();
      while (productCursor.next()) {
        print(dataCursor.getObject(0));
        print(dataCursor.getObject(1));
      }
    }
  }
}