Program: 76061
Project: 76061
Buggy source:
private void testDimensionCreateAndFind(IDocumentManager documentManager) throws IOException, BirtException, DataException {
  Dimension dimension=createDimension(documentManager);
  ILevel[] level=dimension.getHierarchy().getLevels();
  IDiskArray indexKeys=dimension.find((Level)level[0],new Object[]{new Integer(1)});
  assertEquals(indexKeys.size(),4);
  IndexKey indexKey;
  Member levelMember;
  for (int i=0; i < 4; i++) {
    indexKey=(IndexKey)indexKeys.get(i);
    assertEquals(indexKey.key[0],new Integer(1));
    assertEquals(indexKey.dimensionPos,i);
    levelMember=dimension.getRowByPosition(indexKey.dimensionPos).getMembers()[0];
    assertEquals(levelMember.getKeyValues()[0],new Integer(1));
    levelMember=dimension.getDimensionRowByOffset(indexKey.offset).getMembers()[0];
    assertEquals(levelMember.getKeyValues()[0],new Integer(1));
  }
  dimension=(Dimension)DimensionFactory.loadDimension("String_Node_Str",documentManager);
  indexKeys=dimension.find((Level)level[1],new Object[]{new Integer(1)});
  assertEquals(indexKeys.size(),4);
  indexKey=(IndexKey)indexKeys.get(0);
  assertEquals(indexKey.key[0],new Integer(1));
  assertEquals(indexKey.dimensionPos,0);
  levelMember=dimension.getDimensionRowByOffset(indexKey.offset).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],new Integer(1));
  indexKey=(IndexKey)indexKeys.get(1);
  assertEquals(indexKey.key[0],new Integer(1));
  assertEquals(indexKey.dimensionPos,1);
  levelMember=dimension.getDimensionRowByOffset(indexKey.offset).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],new Integer(1));
  indexKey=(IndexKey)indexKeys.get(2);
  assertEquals(indexKey.key[0],new Integer(1));
  assertEquals(indexKey.dimensionPos,4);
  levelMember=dimension.getDimensionRowByOffset(indexKey.offset).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],new Integer(1));
  indexKey=(IndexKey)indexKeys.get(3);
  assertEquals(indexKey.key[0],new Integer(1));
  assertEquals(indexKey.dimensionPos,5);
  levelMember=dimension.getDimensionRowByOffset(indexKey.offset).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],new Integer(1));
}

Fixed version (ground truth):
private void testDimensionCreateAndFind(IDocumentManager documentManager) throws IOException, BirtException, DataException {
  Dimension dimension=createDimension(documentManager);
  ILevel[] level=dimension.getHierarchy().getLevels();
  IDiskArray indexKeys=dimension.find((Level)level[0],new Object[]{new Integer(1)});
  assertEquals(indexKeys.size(),4);
  IndexKey indexKey;
  Member levelMember;
  for (int i=0; i < 4; i++) {
    indexKey=(IndexKey)indexKeys.get(i);
    assertEquals(indexKey.getKey()[0],new Integer(1));
    assertEquals(indexKey.getDimensionPos(),i);
    levelMember=dimension.getRowByPosition(indexKey.getDimensionPos()).getMembers()[0];
    assertEquals(levelMember.getKeyValues()[0],new Integer(1));
    levelMember=dimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[0];
    assertEquals(levelMember.getKeyValues()[0],new Integer(1));
  }
  dimension=(Dimension)DimensionFactory.loadDimension("String_Node_Str",documentManager);
  indexKeys=dimension.find((Level)level[1],new Object[]{new Integer(1)});
  assertEquals(indexKeys.size(),4);
  indexKey=(IndexKey)indexKeys.get(0);
  assertEquals(indexKey.getKey()[0],new Integer(1));
  assertEquals(indexKey.getDimensionPos(),0);
  levelMember=dimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],new Integer(1));
  indexKey=(IndexKey)indexKeys.get(1);
  assertEquals(indexKey.getKey()[0],new Integer(1));
  assertEquals(indexKey.getDimensionPos(),1);
  levelMember=dimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],new Integer(1));
  indexKey=(IndexKey)indexKeys.get(2);
  assertEquals(indexKey.getKey()[0],new Integer(1));
  assertEquals(indexKey.getDimensionPos(),4);
  levelMember=dimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],new Integer(1));
  indexKey=(IndexKey)indexKeys.get(3);
  assertEquals(indexKey.getKey()[0],new Integer(1));
  assertEquals(indexKey.getDimensionPos(),5);
  levelMember=dimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],new Integer(1));
}