Program: 67096
Project: 67096
Buggy source:
protected void initCubeCursor() throws OLAPException, BirtException {
  if (cubeCursor == null) {
    cubeCursor=getCubeCursor();
    List<EdgeCursor> edges=cubeCursor.getOrdinateEdge();
    if (edges.size() == 0) {
      throw new ChartException(ChartReportItemPlugin.ID,ChartException.DATA_BINDING,Messages.getString("String_Node_Str"));
    }
 else     if (edges.size() == 1) {
      this.mainEdgeCursor=(EdgeCursor)edges.get(0);
      this.subEdgeCursor=null;
    }
 else {
      this.mainEdgeCursor=(EdgeCursor)edges.get(0);
      this.subEdgeCursor=(EdgeCursor)edges.get(1);
    }
  }
  if (fRowInnerLevelIndex >= 0 && fColInnerLevelIndex < 0 && subEdgeCursor != null) {
    if (!fIsColEdgeAsMainCursor) {
      mainEdgeCursor=subEdgeCursor;
    }
    subEdgeCursor=null;
  }
  if (subEdgeCursor == null) {
    List dimCursors=mainEdgeCursor.getDimensionCursor();
    if (fRowInnerLevelIndex >= 0) {
      fMainPositionNodes=initCursorPositionsNodes(dimCursors,fRowInnerLevelIndex);
    }
 else     if (fColInnerLevelIndex >= 0) {
      fMainPositionNodes=initCursorPositionsNodes(dimCursors,fColInnerLevelIndex);
    }
  }
 else {
    if (fRowInnerLevelIndex >= 0) {
      List dimCursors=subEdgeCursor.getDimensionCursor();
      fSubPositionNodes=initCursorPositionsNodes(dimCursors,fRowInnerLevelIndex);
    }
    if (fColInnerLevelIndex >= 0) {
      List dimCursors=mainEdgeCursor.getDimensionCursor();
      fMainPositionNodes=initCursorPositionsNodes(dimCursors,fColInnerLevelIndex);
    }
  }
}

Fixed version (ground truth):
protected void initCubeCursor() throws OLAPException, BirtException {
  if (cubeCursor == null) {
    cubeCursor=getCubeCursor();
    List<EdgeCursor> edges=cubeCursor.getOrdinateEdge();
    if (edges.size() == 0) {
      throw new ChartException(ChartReportItemPlugin.ID,ChartException.DATA_BINDING,Messages.getString("String_Node_Str"));
    }
 else     if (edges.size() == 1) {
      this.mainEdgeCursor=(EdgeCursor)edges.get(0);
      this.subEdgeCursor=null;
    }
 else {
      this.mainEdgeCursor=(EdgeCursor)edges.get(0);
      this.subEdgeCursor=(EdgeCursor)edges.get(1);
    }
  }
  if (fCategoryInnerLevelIndex >= 0 && fYOptionalInnerLevelIndex < 0 && subEdgeCursor != null) {
    if (!fIsColEdgeAsCategoryCursor) {
      mainEdgeCursor=subEdgeCursor;
    }
    subEdgeCursor=null;
  }
 else   if (fCategoryInnerLevelIndex >= 0 && fYOptionalInnerLevelIndex >= 0 && fIsColEdgeAsCategoryCursor) {
    EdgeCursor tmp=mainEdgeCursor;
    mainEdgeCursor=subEdgeCursor;
    subEdgeCursor=tmp;
  }
  if (subEdgeCursor == null) {
    List dimCursors=mainEdgeCursor.getDimensionCursor();
    if (fCategoryInnerLevelIndex >= 0) {
      fMainPositionNodes=initCursorPositionsNodes(dimCursors,fCategoryInnerLevelIndex);
    }
 else     if (fYOptionalInnerLevelIndex >= 0) {
      fMainPositionNodes=initCursorPositionsNodes(dimCursors,fYOptionalInnerLevelIndex);
    }
  }
 else {
    if (fCategoryInnerLevelIndex >= 0) {
      List dimCursors=subEdgeCursor.getDimensionCursor();
      fSubPositionNodes=initCursorPositionsNodes(dimCursors,fCategoryInnerLevelIndex);
    }
    if (fYOptionalInnerLevelIndex >= 0) {
      List dimCursors=mainEdgeCursor.getDimensionCursor();
      fMainPositionNodes=initCursorPositionsNodes(dimCursors,fYOptionalInnerLevelIndex);
    }
  }
}