Program: 74102
Project: 74102
Buggy source:
private void createCube(DataEngine engine) throws BirtException, IOException {
  IDocumentManager documentManager=DocumentManagerFactory.createFileDocumentManager(documentPath + engine.hashCode(),cubeName);
  DocManagerMap.getDocManagerMap().set(String.valueOf(engine.hashCode()),documentPath + engine.hashCode() + cubeName,documentManager);
  engine.addShutdownListener(new DocManagerReleaser(engine));
  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[]{"String_Node_Str","String_Node_Str"};
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,distinct(TestFactTable.DIM1_L1Col));
  iterator.setLevelMember(1,TestFactTable.ATTRIBUTE_Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  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.flush();
}

Fixed version (ground truth):
private void createCube(org.eclipse.birt.data.engine.impl.DataEngineImpl engine) throws BirtException, IOException {
  IDocumentManager documentManager=DocumentManagerFactory.createFileDocumentManager(engine.getSession().getTempDir(),cubeName);
  DocManagerMap.getDocManagerMap().set(String.valueOf(engine.hashCode()),engine.getSession().getTempDir() + cubeName,documentManager);
  engine.addShutdownListener(new DocManagerReleaser(engine));
  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[]{"String_Node_Str","String_Node_Str"};
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,distinct(TestFactTable.DIM1_L1Col));
  iterator.setLevelMember(1,TestFactTable.ATTRIBUTE_Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  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.flush();
}