Program: 76059
Project: 76059
Buggy source:
private void testDimensionCreate5(IDocumentManager documentManager) throws IOException, BirtException, DataException {
  ILevelDefn[] levelDefs=new ILevelDefn[4];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  levelDefs[1]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  levelDefs[2]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  levelDefs[3]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  IDimension dimension=DimensionFactory.createDimension("String_Node_Str",documentManager,new FourLevelDataset(),levelDefs,false);
  IHierarchy hierarchy=dimension.getHierarchy();
  assertEquals(hierarchy.getName(),"String_Node_Str");
  ILevel[] level=hierarchy.getLevels();
  Dimension realDimension=(Dimension)dimension;
  IndexKey indexKey=realDimension.findFirst((Level)level[0],new Object[]{"String_Node_Str"});
  Member levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[0];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[0],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[0];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[0],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[0];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[1],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[1],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[1],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[2],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[2];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[2],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[2];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[2],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[2];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[3],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[3];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[3],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[3];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[3],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[3];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[3],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.offset).getMembers()[3];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
}

Fixed version (ground truth):
private void testDimensionCreate5(IDocumentManager documentManager) throws IOException, BirtException, DataException {
  ILevelDefn[] levelDefs=new ILevelDefn[4];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  levelDefs[1]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  levelDefs[2]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  levelDefs[3]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  IDimension dimension=DimensionFactory.createDimension("String_Node_Str",documentManager,new FourLevelDataset(),levelDefs,false);
  IHierarchy hierarchy=dimension.getHierarchy();
  assertEquals(hierarchy.getName(),"String_Node_Str");
  ILevel[] level=hierarchy.getLevels();
  Dimension realDimension=(Dimension)dimension;
  IndexKey indexKey=realDimension.findFirst((Level)level[0],new Object[]{"String_Node_Str"});
  Member levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[0];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[0],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[0];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[0],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[0];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[1],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[1],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[1],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[1];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[2],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[2];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[2],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[2];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[2],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[2];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[3],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[3];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[3],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[3];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[3],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[3];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
  indexKey=realDimension.findFirst((Level)level[3],new Object[]{"String_Node_Str"});
  levelMember=realDimension.getDimensionRowByOffset(indexKey.getOffset()).getMembers()[3];
  assertEquals(levelMember.getKeyValues()[0],"String_Node_Str");
}