Program: 75682
Project: 75682
Buggy source:
private void createCube(DataEngine engine) throws BirtException, IOException {
  IDocumentManager documentManager=DocumentManagerFactory.createFileDocumentManager(documentPath + engine.hashCode(),cubeName);
  Dimension[] dimensions=new Dimension[2];
  String[] levelNames=new String[3];
  levelNames[0]="String_Node_Str";
  levelNames[1]="String_Node_Str";
  levelNames[2]="String_Node_Str";
  DimensionForTest iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable.DIM0_L1Col);
  iterator.setLevelMember(1,TestFactTable.DIM0_L2Col);
  iterator.setLevelMember(2,TestFactTable.DIM0_L3Col);
  ILevelDefn[] levelDefs=new ILevelDefn[3];
  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);
  dimensions[0]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  IHierarchy hierarchy=dimensions[0].getHierarchy();
  assertEquals(hierarchy.getName(),"String_Node_Str");
  assertEquals(dimensions[0].length(),13);
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,distinct(TestFactTable.DIM1_L1Col));
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  dimensions[1]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[1].getHierarchy();
  assertEquals(hierarchy.getName(),"String_Node_Str");
  assertEquals(dimensions[1].length(),5);
  TestFactTable factTable2=new TestFactTable();
  String[] measureColumnName=new String[1];
  measureColumnName[0]="String_Node_Str";
  Cube cube=new Cube(cubeName,documentManager);
  cube.create(dimensions,factTable2,measureColumnName,new StopSign());
  cube.close();
  documentManager.close();
}

Fixed version (ground truth):
private void createCube(DataEngine engine) throws BirtException, IOException {
  IDocumentManager documentManager=DocumentManagerFactory.createFileDocumentManager(documentPath + engine.hashCode(),cubeName);
  Dimension[] dimensions=new Dimension[2];
  String[] levelNames=new String[3];
  levelNames[0]="String_Node_Str";
  levelNames[1]="String_Node_Str";
  levelNames[2]="String_Node_Str";
  DimensionForTest iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable.DIM0_L1Col);
  iterator.setLevelMember(1,TestFactTable.DIM0_L2Col);
  iterator.setLevelMember(2,TestFactTable.DIM0_L3Col);
  ILevelDefn[] levelDefs=new ILevelDefn[3];
  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);
  dimensions[0]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  IHierarchy hierarchy=dimensions[0].getHierarchy();
  assertEquals(hierarchy.getName(),"String_Node_Str");
  assertEquals(dimensions[0].length(),13);
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,distinct(TestFactTable.DIM1_L1Col));
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  dimensions[1]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[1].getHierarchy();
  assertEquals(hierarchy.getName(),"String_Node_Str");
  assertEquals(dimensions[1].length(),5);
  TestFactTable factTable2=new TestFactTable();
  String[] measureColumnName=new String[1];
  measureColumnName[0]="String_Node_Str";
  Cube cube=new Cube(cubeName,documentManager);
  cube.create(getKeyColNames(dimensions),dimensions,factTable2,measureColumnName,new StopSign());
  cube.close();
  documentManager.close();
}