Program: 136569
Project: 136569
Buggy source:
/** 
 * DOC zshen Comment method "initFolder". init the folder which contain ana and rep files
 * @param folderName
 * @return
 */
public IFolder initFolder(String folderName){
  IProject rootProject=ReponsitoryContextBridge.getRootProject();
  if (!rootProject.exists()) {
    initProxyRepository(rootProject);
  }
  if (DQStructureManager.getInstance().isNeedCreateStructure()) {
    DQStructureManager.getInstance().createDQStructure();
  }
  IFolder aa=rootProject.getFolder(folderName);
  if (!aa.exists()) {
    try {
      aa.create(true,true,null);
    }
 catch (    CoreException e) {
      Assert.fail(e.getMessage());
    }
  }
  if (anaFolderName.equals(folderName)) {
    IFolder subfolder1=createFolder(aa,"String_Node_Str");
    IFolder subfolder2=createFolder(aa,"String_Node_Str");
    createAnalysis("String_Node_Str",null,true);
    createAnalysis("String_Node_Str",null,false);
    createAnalysis("String_Node_Str",subfolder2,false);
    createAnalysis("String_Node_Str",subfolder1,false);
  }
  if (repFolderName.equals(folderName)) {
    IFolder subfolder1=createFolder(aa,"String_Node_Str");
    IFolder subfolder2=createFolder(aa,"String_Node_Str");
    createReport("String_Node_Str",null,true);
    createReport("String_Node_Str",null,false);
    createReport("String_Node_Str",subfolder2,false);
    createReport("String_Node_Str",subfolder1,false);
  }
  return aa;
}

Fixed version (ground truth):
/** 
 * DOC zshen Comment method "initFolder". init the folder which contain ana and rep files
 * @param folderName
 * @return
 */
public IFolder initFolder(String folderName){
  IProject rootProject=ReponsitoryContextBridge.getRootProject();
  if (!rootProject.exists()) {
    log.debug("String_Node_Str");
    initProxyRepository(rootProject);
  }
  if (DQStructureManager.getInstance().isNeedCreateStructure()) {
    DQStructureManager.getInstance().createDQStructure();
  }
  IFolder elementRootFolder=rootProject.getFolder(folderName);
  if (!elementRootFolder.exists()) {
    try {
      elementRootFolder.create(true,true,null);
    }
 catch (    CoreException e) {
      Assert.fail(e.getMessage());
    }
  }
  if (anaFolderName.equals(folderName)) {
    IFolder analysisFolder=createFolder(elementRootFolder,"String_Node_Str");
    IFolder subfolder1=createFolder(analysisFolder,"String_Node_Str");
    IFolder subfolder2=createFolder(analysisFolder,"String_Node_Str");
    elementRootFolder=analysisFolder;
    createAnalysis("String_Node_Str",new Path(analysisFolder.getFullPath().lastSegment()),true);
    createAnalysis("String_Node_Str",new Path(analysisFolder.getFullPath().lastSegment()),false);
    createAnalysis("String_Node_Str",new Path(analysisFolder.getFullPath().lastSegment()).append(subfolder2.getFullPath().lastSegment()),false);
    createAnalysis("String_Node_Str",new Path(analysisFolder.getFullPath().lastSegment()).append(subfolder1.getFullPath().lastSegment()),false);
  }
  if (repFolderName.equals(folderName)) {
    IFolder reportFolder=createFolder(elementRootFolder,"String_Node_Str");
    IFolder subfolder1=createFolder(reportFolder,"String_Node_Str");
    IFolder subfolder2=createFolder(reportFolder,"String_Node_Str");
    elementRootFolder=reportFolder;
    createReport("String_Node_Str",new Path(reportFolder.getFullPath().lastSegment()),true);
    createReport("String_Node_Str",new Path(reportFolder.getFullPath().lastSegment()),false);
    createReport("String_Node_Str",new Path(reportFolder.getFullPath().lastSegment()).append(subfolder2.getFullPath().lastSegment()),false);
    createReport("String_Node_Str",new Path(reportFolder.getFullPath().lastSegment()).append(subfolder1.getFullPath().lastSegment()),false);
  }
  return elementRootFolder;
}