Program: 76071
Project: 76071
Buggy source:
private void testDimensionCreateAndFind7(IDocumentManager documentManager) throws IOException, BirtException {
  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");
  Dimension realDimension=(Dimension)dimension;
  IDiskArray indexArray=new BufferedPrimitiveDiskArray();
  indexArray.add(new Integer(2));
  indexArray.add(new Integer(5));
  indexArray.add(new Integer(8));
  indexArray.add(new Integer(9));
  indexArray.add(new Integer(10));
  indexArray.add(new Integer(11));
  indexArray.add(new Integer(14));
  IDiskArray result=realDimension.getDimensionRowByPositions(indexArray);
  assertEquals(((DimensionRow)(result.get(0))).members[3].keyValues[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(1))).members[3].keyValues[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(2))).members[3].keyValues[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(3))).members[3].keyValues[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(4))).members[3].keyValues[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(5))).members[3].keyValues[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(6))).members[3].keyValues[0],"String_Node_Str");
}

Fixed version (ground truth):
private void testDimensionCreateAndFind7(IDocumentManager documentManager) throws IOException, BirtException {
  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");
  Dimension realDimension=(Dimension)dimension;
  IDiskArray indexArray=new BufferedPrimitiveDiskArray();
  indexArray.add(new Integer(2));
  indexArray.add(new Integer(5));
  indexArray.add(new Integer(8));
  indexArray.add(new Integer(9));
  indexArray.add(new Integer(10));
  indexArray.add(new Integer(11));
  indexArray.add(new Integer(14));
  IDiskArray result=realDimension.getDimensionRowByPositions(indexArray);
  assertEquals(((DimensionRow)(result.get(0))).getMembers()[3].getKeyValues()[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(1))).getMembers()[3].getKeyValues()[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(2))).getMembers()[3].getKeyValues()[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(3))).getMembers()[3].getKeyValues()[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(4))).getMembers()[3].getKeyValues()[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(5))).getMembers()[3].getKeyValues()[0],"String_Node_Str");
  assertEquals(((DimensionRow)(result.get(6))).getMembers()[3].getKeyValues()[0],"String_Node_Str");
}