Program: 67760
Project: 67760
Buggy source:
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[2];
  String[] levelNames=new String[7];
  levelNames[0]="String_Node_Str";
  levelNames[1]="String_Node_Str";
  levelNames[2]="String_Node_Str";
  levelNames[3]="String_Node_Str";
  levelNames[4]="String_Node_Str";
  levelNames[5]="String_Node_Str";
  levelNames[6]="String_Node_Str";
  DimensionForTest iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,DateFactTable.DIM0_L1Col);
  iterator.setLevelMember(1,DateFactTable.DIM1_YEAR_Col);
  iterator.setLevelMember(2,DateFactTable.ATTRIBUTE_Col);
  iterator.setLevelMember(3,DateFactTable.DIM1_QUARTER_Col);
  iterator.setLevelMember(4,DateFactTable.ATTRIBUTE_Col);
  iterator.setLevelMember(5,DateFactTable.DIM1_MONTH_Col);
  iterator.setLevelMember(6,DateFactTable.ATTRIBUTE_Col);
  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"},new String[]{"String_Node_Str"});
  levelDefs[2]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  levelDefs[3]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  dimensions[0]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false,new StopSign());
  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,DateFactTable.DIM2_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,new StopSign());
  hierarchy=dimensions[1].getHierarchy();
  allRow=dimensions[1].getAllRows(new StopSign());
  DateFactTable factTable2=new DateFactTable();
  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[2];
  String[] levelNames=new String[7];
  levelNames[0]="String_Node_Str";
  levelNames[1]="String_Node_Str";
  levelNames[2]="String_Node_Str";
  levelNames[3]="String_Node_Str";
  levelNames[4]="String_Node_Str";
  levelNames[5]="String_Node_Str";
  levelNames[6]="String_Node_Str";
  DimensionForTest iterator=new DimensionForTest(levelNames);
  iterator.setLevelMember(0,DateFactTable.DIM0_L1Col);
  iterator.setLevelMember(1,DateFactTable.DIM1_YEAR_Col);
  iterator.setLevelMember(2,DateFactTable.ATTRIBUTE_Col);
  iterator.setLevelMember(3,DateFactTable.DIM1_QUARTER_Col);
  iterator.setLevelMember(4,DateFactTable.ATTRIBUTE_Col);
  iterator.setLevelMember(5,DateFactTable.DIM1_MONTH_Col);
  iterator.setLevelMember(6,DateFactTable.ATTRIBUTE_Col);
  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"},new String[]{"String_Node_Str"});
  levelDefs[1].setTimeType("String_Node_Str");
  levelDefs[2]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  levelDefs[2].setTimeType("String_Node_Str");
  levelDefs[3]=new LevelDefinition("String_Node_Str",new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  levelDefs[3].setTimeType("String_Node_Str");
  dimensions[0]=(Dimension)DimensionFactory.createDimension("String_Node_Str",documentManager,iterator,levelDefs,false,new StopSign());
  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,DateFactTable.DIM2_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,new StopSign());
  hierarchy=dimensions[1].getHierarchy();
  allRow=dimensions[1].getAllRows(new StopSign());
  DateFactTable factTable2=new DateFactTable();
  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();
}