Program: 74124
Project: 74124
Buggy source:
void createCube(DataEngine engine) throws IOException, BirtException, OLAPException {
  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[6];
  String[] levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  DimensionForTest iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM0_L1Col);
  ILevelDefn[] levelDefs=new ILevelDefn[1];
  levelDefs[0]=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();
  IDiskArray allRow=dimensions[0].getAllRows(new StopSign());
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM0_L2Col);
  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();
  allRow=dimensions[1].getAllRows(new StopSign());
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM0_L3Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  dimensions[2]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[2].getHierarchy();
  allRow=dimensions[2].getAllRows(new StopSign());
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM0_L4Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  dimensions[3]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[3].getHierarchy();
  allRow=dimensions[3].getAllRows(new StopSign());
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM1_L1Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  dimensions[4]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[4].getHierarchy();
  allRow=dimensions[4].getAllRows(new StopSign());
  levelNames=new String[]{"String_Node_Str","String_Node_Str"};
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM1_L2Col);
  iterator.setLevelMember(1,TestFactTable1.ATTRIBUTE_Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  dimensions[5]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[5].getHierarchy();
  allRow=dimensions[5].getAllRows(new StopSign());
  TestFactTable1 factTable2=new TestFactTable1();
  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):
void createCube(DataEngineImpl engine) throws IOException, BirtException, OLAPException {
  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[6];
  String[] levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  DimensionForTest iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM0_L1Col);
  ILevelDefn[] levelDefs=new ILevelDefn[1];
  levelDefs[0]=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();
  IDiskArray allRow=dimensions[0].getAllRows(new StopSign());
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM0_L2Col);
  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();
  allRow=dimensions[1].getAllRows(new StopSign());
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM0_L3Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  dimensions[2]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[2].getHierarchy();
  allRow=dimensions[2].getAllRows(new StopSign());
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM0_L4Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  dimensions[3]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[3].getHierarchy();
  allRow=dimensions[3].getAllRows(new StopSign());
  levelNames=new String[1];
  levelNames[0]="String_Node_Str";
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM1_L1Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},null);
  dimensions[4]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[4].getHierarchy();
  allRow=dimensions[4].getAllRows(new StopSign());
  levelNames=new String[]{"String_Node_Str","String_Node_Str"};
  iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,TestFactTable1.DIM1_L2Col);
  iterator.setLevelMember(1,TestFactTable1.ATTRIBUTE_Col);
  levelDefs=new ILevelDefn[1];
  levelDefs[0]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  dimensions[5]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false);
  hierarchy=dimensions[5].getHierarchy();
  allRow=dimensions[5].getAllRows(new StopSign());
  TestFactTable1 factTable2=new TestFactTable1();
  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();
}