nus-yam/ex-repair huggingface dataset:
Program: 139518
Project: 139518
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.jface.viewers.ContentViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
 */
@Override protected void handleDispose(DisposeEvent event){
  super.handleDispose(event);
  exportMenu.dispose();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.jface.viewers.ContentViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
 */
@Override protected void handleDispose(DisposeEvent event){
  super.handleDispose(event);
  if (exportMenu != null)   exportMenu.dispose();
}
Program: 139520
Project: 139520
Buggy source:
/** 
 * DOC xqliu Comment method "removeDependency".
 * @param analysis
 * @param unit
 */
protected void removeDependency(Analysis analysis,IndicatorUnit unit){
  List<ModelElement> reomveElements=new ArrayList<ModelElement>();
  Indicator indicator=unit.getIndicator();
  if (indicator instanceof UserDefIndicator) {
    reomveElements.add(indicator.getIndicatorDefinition());
    if (IndicatorCategoryHelper.isUserDefMatching(UDIHelper.getUDICategory(indicator))) {
      reomveElements.addAll(indicator.getParameters().getDataValidDomain().getPatterns());
    }
  }
 else   if (indicator instanceof PatternMatchingIndicator) {
    reomveElements.addAll(indicator.getParameters().getDataValidDomain().getPatterns());
  }
  DependenciesHandler.getInstance().removeDependenciesBetweenModels(analysis,reomveElements);
  for (  ModelElement me : reomveElements) {
    EMFUtil.saveSingleResource(me.eResource());
  }
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "removeDependency".
 * @param analysis
 * @param unit
 */
protected void removeDependency(Analysis analysis,IndicatorUnit unit){
  List<ModelElement> reomveElements=new ArrayList<ModelElement>();
  Indicator indicator=unit.getIndicator();
  if (indicator instanceof UserDefIndicator) {
    reomveElements.add(indicator.getIndicatorDefinition());
  }
 else   if (indicator instanceof PatternMatchingIndicator) {
    reomveElements.addAll(indicator.getParameters().getDataValidDomain().getPatterns());
  }
  DependenciesHandler.getInstance().removeDependenciesBetweenModels(analysis,reomveElements);
  for (  ModelElement me : reomveElements) {
    EMFUtil.saveSingleResource(me.eResource());
  }
}
Program: 139521
Project: 139521
Buggy source:
public static IndicatorUnit[] createIndicatorUnit(IFile pfile,ColumnIndicator columnIndicator,Analysis analysis){
  List<IndicatorUnit> addIndicatorUnits=new ArrayList<IndicatorUnit>();
  IndicatorDefinition udid=UDIResourceFileHelper.getInstance().findUDI(pfile);
  IndicatorCategory ic=UDIHelper.getUDICategory(udid);
  for (  Indicator indicator : columnIndicator.getIndicators()) {
    if (udid.getName().equals(indicator.getName())) {
      MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str") + udid.getName());
      return null;
    }
  }
  Indicator udi=UDIFactory.createUserDefIndicator(udid);
  udi.setIndicatorDefinition(udid);
  IndicatorEnum indicatorType=IndicatorEnum.findIndicatorEnum(udi.eClass());
  if (DefinitionHandler.getInstance().getUserDefinedMatchIndicatorCategory().equals(ic)) {
    IFolder libProject=ResourceManager.getLibrariesFolder();
    CheckedTreeSelectionDialog dialog=PatternUtilities.createPatternCheckedTreeSelectionDialog(libProject);
    if (dialog.open() == Window.OK) {
      for (      Object obj : dialog.getResult()) {
        if (obj instanceof IFile) {
          IFile file=(IFile)obj;
          IndicatorUnit addIndicatorUnit=PatternUtilities.createIndicatorUnit(file,columnIndicator,analysis,udid);
          if (addIndicatorUnit == null) {
            Pattern pattern=PatternResourceFileHelper.getInstance().findPattern(file);
            MessageUI.openError(DefaultMessagesImpl.getString("String_Node_Str") + pattern.getName());
          }
 else {
            addIndicatorUnits.add(addIndicatorUnit);
          }
        }
      }
    }
  }
 else {
    addIndicatorUnits.add(columnIndicator.addSpecialIndicator(indicatorType,udi));
  }
  DependenciesHandler.getInstance().setUsageDependencyOn(analysis,udid);
  return addIndicatorUnits.toArray(new IndicatorUnit[addIndicatorUnits.size()]);
}

Fixed version (ground truth):
public static IndicatorUnit[] createIndicatorUnit(IFile pfile,ColumnIndicator columnIndicator,Analysis analysis){
  List<IndicatorUnit> addIndicatorUnits=new ArrayList<IndicatorUnit>();
  IndicatorDefinition udid=UDIResourceFileHelper.getInstance().findUDI(pfile);
  IndicatorCategory ic=UDIHelper.getUDICategory(udid);
  for (  Indicator indicator : columnIndicator.getIndicators()) {
    if (udid.getName().equals(indicator.getName())) {
      MessageUI.openWarning(DefaultMessagesImpl.getString("String_Node_Str") + udid.getName());
      return null;
    }
  }
  Indicator udi=UDIFactory.createUserDefIndicator(udid);
  udi.setIndicatorDefinition(udid);
  IndicatorEnum indicatorType=IndicatorEnum.findIndicatorEnum(udi.eClass());
  addIndicatorUnits.add(columnIndicator.addSpecialIndicator(indicatorType,udi));
  DependenciesHandler.getInstance().setUsageDependencyOn(analysis,udid);
  return addIndicatorUnits.toArray(new IndicatorUnit[addIndicatorUnits.size()]);
}
Program: 139522
Project: 139522
Buggy source:
public static int getCurrentFolding(){
  return currentFolding == 0 ? FOLDING_1 : currentFolding;
}

Fixed version (ground truth):
public static int getCurrentFolding(){
  int sectionFoldState=ResourcesPlugin.getPlugin().getPluginPreferences().getInt(EDITOR_MASTER_PAGE_FOLDING);
  if (currentFolding == 0 && sectionFoldState != 0) {
    currentFolding=sectionFoldState;
  }
  if (currentFolding == 0 && sectionFoldState == 0) {
    currentFolding=FOLDING_1;
  }
  return currentFolding;
}
Program: 139523
Project: 139523
Buggy source:
public static boolean isCurrentAnalyzedElements(){
  return currentAnalyzedElements;
}

Fixed version (ground truth):
public static Boolean isCurrentAnalyzedElements(){
  return currentAnalyzedElements == null ? true : currentAnalyzedElements;
}
Program: 139524
Project: 139524
Buggy source:
public static void setCurrentAnalyzedElements(boolean currentAnalyzedElements){
  EditorPreferencePage.currentAnalyzedElements=currentAnalyzedElements;
}

Fixed version (ground truth):
public static void setCurrentAnalyzedElements(Boolean currentAnalyzedElements){
  EditorPreferencePage.currentAnalyzedElements=currentAnalyzedElements;
}
Program: 139525
Project: 139525
Buggy source:
public static boolean isCurrentIndicators(){
  return currentIndicators;
}

Fixed version (ground truth):
public static Boolean isCurrentIndicators(){
  return currentIndicators == null ? true : currentIndicators;
}
Program: 139527
Project: 139527
Buggy source:
public static void setCurrentIndicators(boolean currentIndicators){
  EditorPreferencePage.currentIndicators=currentIndicators;
}

Fixed version (ground truth):
public static void setCurrentIndicators(Boolean currentIndicators){
  EditorPreferencePage.currentIndicators=currentIndicators;
}
Program: 139528
Project: 139528
Buggy source:
public static String getString(String key){
  return null == MESSAGEMAP.get(key) ? key : DefaultMessagesImpl.getString(MESSAGEMAP.get(key));
}

Fixed version (ground truth):
public static String getString(String key){
  String message=key;
  String messageKey=MESSAGEMAP.get(key);
  if (null != messageKey && !DefaultMessagesImpl.getString(messageKey).startsWith(KEY_NOT_FOUND_PREFIX) && !DefaultMessagesImpl.getString(messageKey).endsWith(KEY_NOT_FOUND_SUFFIX)) {
    message=DefaultMessagesImpl.getString(messageKey);
  }
  return message;
}
Program: 139529
Project: 139529
Buggy source:
public Collection<Analysis> getAllAnalysis(IFolder analysesFolder){
  if (resourcesNumberChanged) {
    try {
      allAnalysisMap.clear();
      searchAllAnalysis(analysesFolder);
    }
 catch (    CoreException e) {
      log.error(e,e);
    }
    resourcesNumberChanged=false;
  }
  return allAnalysisMap.values();
}

Fixed version (ground truth):
public Collection<Analysis> getAllAnalysis(){
  IFolder analysisFolder=ResourceManager.getDataProfilingFolder().getFolder("String_Node_Str");
  return getAllAnalysis(analysisFolder);
}
Program: 139530
Project: 139530
Buggy source:
public Collection<WhereRule> getAllDQRules(IFolder patternFodler){
  return Collections.EMPTY_LIST;
}

Fixed version (ground truth):
public Collection<WhereRule> getAllDQRules(){
  IFolder rulesFolder=ResourceManager.getLibrariesFolder().getFolder("String_Node_Str");
  return getAllDQRules(rulesFolder);
}
Program: 139531
Project: 139531
Buggy source:
/** 
 * DOC zqin Comment method "getAllAnalysis".
 * @return
 */
public Collection<Pattern> getAllPatternes(IFolder patternFodler){
  if (resourcesNumberChanged) {
    try {
      searchAllPatternes(patternFodler);
    }
 catch (    CoreException e) {
      log.error(e,e);
    }
    resourcesNumberChanged=false;
  }
  return patternsMap.values();
}

Fixed version (ground truth):
public Collection<Pattern> getAllPatternes(){
  IFolder patternFolder=ResourceManager.getLibrariesFolder().getFolder("String_Node_Str");
  return getAllPatternes(patternFolder);
}
Program: 139532
Project: 139532
Buggy source:
public List<TdDataProvider> getAllDataProviders(IFolder folder){
  List<IFile> allPRVFiles=new ArrayList<IFile>();
  searchAllDataProvider(folder,allPRVFiles);
  List<TdDataProvider> allDataProviders=new ArrayList<TdDataProvider>();
  if (!allPRVFiles.isEmpty()) {
    for (    IFile file : allPRVFiles) {
      TypedReturnCode<TdDataProvider> rc=readFromFile(file);
      if (rc.isOk()) {
        TdDataProvider dataProvider=rc.getObject();
        allDataProviders.add(dataProvider);
      }
    }
  }
  return allDataProviders;
}

Fixed version (ground truth):
public List<TdDataProvider> getAllDataProviders(){
  return getAllDataProviders(ResourceManager.getMetadataFolder());
}
Program: 139533
Project: 139533
Buggy source:
public Collection<TdReport> getAllReports(IFolder reportsFolder){
  try {
    searchAllReports(reportsFolder);
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  return allRepMap.values();
}

Fixed version (ground truth):
public Collection<TdReport> getAllReports(){
  IFolder reportFolder=ResourceManager.getDataProfilingFolder().getFolder("String_Node_Str");
  return getAllReports(reportFolder);
}
Program: 139534
Project: 139534
Buggy source:
public Collection<IndicatorDefinition> getAllUDIs(IFolder patternFodler){
  if (resourcesNumberChanged) {
    try {
      searchAllUDIs(patternFodler);
    }
 catch (    CoreException e) {
      log.error(e,e);
    }
    resourcesNumberChanged=false;
  }
  return idsMap.values();
}

Fixed version (ground truth):
public Collection<IndicatorDefinition> getAllUDIs(){
  IFolder udiFolder=ResourceManager.getLibrariesFolder().getFolder("String_Node_Str");
  return getAllUDIs(udiFolder);
}
Program: 139535
Project: 139535
Buggy source:
public ReturnCode save(ModelElement element){
  ReturnCode rc=new ReturnCode();
  addResourceContent(element);
  addDependencies(element);
  Property property=savePerperties(element);
  String propertyPath=property.eResource().getURI().toPlatformString(true);
  TaggedValueHelper.setTaggedValue(element,TaggedValueHelper.PROPERTY_FILE,propertyPath);
  rc.setOk(util.saveResource(element.eResource()));
  if (rc.isOk()) {
    rc.setMessage("String_Node_Str" + element.getName() + "String_Node_Str");
    ProxyRepositoryManager.getInstance().save();
  }
 else {
    rc.setMessage(util.getLastErrorMessage());
  }
  return rc;
}

Fixed version (ground truth):
public ReturnCode save(ModelElement element){
  ReturnCode rc=new ReturnCode();
  addResourceContent(element);
  addDependencies(element);
  savePerperties(element);
  rc.setOk(util.saveResource(element.eResource()));
  if (rc.isOk()) {
    rc.setMessage("String_Node_Str" + element.getName() + "String_Node_Str");
    ProxyRepositoryManager.getInstance().save();
  }
 else {
    rc.setMessage(util.getLastErrorMessage());
  }
  return rc;
}
Program: 139536
Project: 139536
Buggy source:
public TypedReturnCode<IFile> create(ModelElement element,IFolder folder){
  TypedReturnCode<IFile> trc=new TypedReturnCode<IFile>();
  if (getFileExtension() == null) {
    trc.setMessage("String_Node_Str");
    log.error("String_Node_Str");
  }
 else {
    String fname=DqRepositoryViewService.createLogicalFileNmae(element,getFileExtension());
    IFile file=folder.getFile(fname);
    if (file.exists()) {
      trc.setReturnCode("String_Node_Str",false);
    }
 else {
      ReturnCode rc=save(element,file);
      trc.setReturnCode(rc.getMessage(),rc.isOk(),file);
    }
  }
  return trc;
}

Fixed version (ground truth):
public TypedReturnCode<IFile> create(ModelElement element,IFolder folder){
  TypedReturnCode<IFile> trc=new TypedReturnCode<IFile>();
  if (getFileExtension() == null) {
    trc.setMessage("String_Node_Str");
    log.error("String_Node_Str");
  }
 else {
    String fname=DqRepositoryViewService.createLogicalFileName(element,getFileExtension());
    IFile file=folder.getFile(fname);
    if (file.exists()) {
      trc.setReturnCode("String_Node_Str",false);
    }
 else {
      ReturnCode rc=save(element,file);
      trc.setReturnCode(rc.getMessage(),rc.isOk(),file);
    }
  }
  return trc;
}
Program: 139537
Project: 139537
Buggy source:
/** 
 * DOC bZhou Comment method "savePerperties".
 * @param element
 * @return
 */
public Property savePerperties(ModelElement element){
  Resource resource=element.eResource();
  String fileName=resource.getURI().lastSegment();
  Property property=initProperty(element);
  TDQItem item=initItem(element,property);
  item.setFilename(fileName);
  URI uri=element.eResource().getURI();
  serialize(property,uri);
  return property;
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "savePerperties".
 * @param element
 */
public void savePerperties(ModelElement element){
  Resource resource=element.eResource();
  String fileName=resource.getURI().lastSegment();
  Property property=initProperty(element);
  TDQItem item=initItem(element,property);
  item.setFilename(fileName);
  URI uri=element.eResource().getURI();
  serialize(property,uri);
  String propertyPath=property.eResource().getURI().toPlatformString(true);
  TaggedValueHelper.setTaggedValue(element,TaggedValueHelper.PROPERTY_FILE,propertyPath);
}
Program: 139538
Project: 139538
Buggy source:
public static IChartTypeStates getChartState(EIndicatorChartType type,List<IndicatorUnit> units){
switch (type) {
case SIMPLE_STATISTICS:
case UDI_COUNT:
    return new SimpleStatisticsState(units);
case TEXT_STATISTICS:
  return new TextStatisticsState(units);
case MODE_INDICATOR:
return new ModeStatisticsState(units);
case FREQUENCE_STATISTICS:
case UDI_FREQUENCY:
return new FrequencyStatisticsState(units);
case LOW_FREQUENCE_STATISTICS:
return new LowFrequencyStatisticsState(units);
case PATTERN_FREQUENCE_STATISTICS:
return new PatternFrequencyStatisticsState(units);
case PATTERN_LOW_FREQUENCE_STATISTICS:
return new PatternLowFrequencyStatisticsState(units);
case PATTERN_MATCHING:
case UDI_MATCHING:
return new REGEXPatternStatisticsState(units);
case SQL_PATTERN_MATCHING:
return new SQLPatternStatisticsState(units);
case SUMMARY_STATISTICS:
return new SummaryStatisticsState(units);
case SOUNDEX_FREQUENCY_TABLE:
return new SoundexFrequencyTableState(units);
case SOUNDEX_LOW_FREQUENCY_TABLE:
return new SoundexLowFrequencyTableState(units);
default :
return null;
}
}

Fixed version (ground truth):
public static IChartTypeStates getChartState(EIndicatorChartType type,List<IndicatorUnit> units){
switch (type) {
case SIMPLE_STATISTICS:
    return new SimpleStatisticsState(units);
case UDI_COUNT:
  return new UDISimpleStatisticsState(units);
case TEXT_STATISTICS:
return new TextStatisticsState(units);
case MODE_INDICATOR:
return new ModeStatisticsState(units);
case FREQUENCE_STATISTICS:
return new FrequencyStatisticsState(units);
case UDI_FREQUENCY:
return new UDIFrequencyStatisticsState(units);
case LOW_FREQUENCE_STATISTICS:
return new LowFrequencyStatisticsState(units);
case PATTERN_FREQUENCE_STATISTICS:
return new PatternFrequencyStatisticsState(units);
case PATTERN_LOW_FREQUENCE_STATISTICS:
return new PatternLowFrequencyStatisticsState(units);
case PATTERN_MATCHING:
return new REGEXPatternStatisticsState(units);
case UDI_MATCHING:
return new UDIMatchStatisticsState(units);
case SQL_PATTERN_MATCHING:
return new SQLPatternStatisticsState(units);
case SUMMARY_STATISTICS:
return new SummaryStatisticsState(units);
case SOUNDEX_FREQUENCY_TABLE:
return new SoundexFrequencyTableState(units);
case SOUNDEX_LOW_FREQUENCY_TABLE:
return new SoundexLowFrequencyTableState(units);
default :
return null;
}
}
Program: 139539
Project: 139539
Buggy source:
protected void handleDiffPackageElement(DiffElement difElement){
  AddModelElement addElement=addModelSwitch.doSwitch(difElement);
  if (addElement != null) {
    handleAddElement(addElement);
    return;
  }
  RemoveModelElement removeElement=removeModelSwitch.doSwitch(difElement);
  if (removeElement != null) {
    handleRemoveElement(removeElement);
  }
  if (difElement instanceof UpdateAttribute) {
    handleUpdateElement((UpdateAttribute)difElement);
    return;
  }
}

Fixed version (ground truth):
protected void handleDiffPackageElement(DiffElement difElement){
  AddModelElement addElement=addModelSwitch.doSwitch(difElement);
  if (addElement != null) {
    handleAddElement(addElement);
    return;
  }
  RemoveModelElement removeElement=removeModelSwitch.doSwitch(difElement);
  if (removeElement != null) {
    handleRemoveElement(removeElement);
  }
  RemoveReferenceValue refValue=removeReferenceValue.doSwitch(difElement);
  if (refValue != null) {
    handleRemoveRefElement(refValue);
  }
  if (difElement instanceof UpdateAttribute) {
    handleUpdateElement((UpdateAttribute)difElement);
    return;
  }
}
Program: 139540
Project: 139540
Buggy source:
private void initSwitchValue(){
  addModelSwitch=new DiffSwitch<AddModelElement>(){
    public AddModelElement caseAddModelElement(    AddModelElement object){
      return object;
    }
  }
;
  updateModelSwitch=new DiffSwitch<UpdateModelElement>(){
    public UpdateModelElement caseUpdateModelElement(    UpdateModelElement object){
      return object;
    }
  }
;
  removeModelSwitch=new DiffSwitch<RemoveModelElement>(){
    public RemoveModelElement caseRemoveModelElement(    RemoveModelElement object){
      return object;
    }
  }
;
  packageSwitch=new RelationalSwitch<Package>(){
    public Package casePackage(    Package object){
      return object;
    }
  }
;
}

Fixed version (ground truth):
private void initSwitchValue(){
  addModelSwitch=new DiffSwitch<AddModelElement>(){
    public AddModelElement caseAddModelElement(    AddModelElement object){
      return object;
    }
  }
;
  updateModelSwitch=new DiffSwitch<UpdateModelElement>(){
    public UpdateModelElement caseUpdateModelElement(    UpdateModelElement object){
      return object;
    }
  }
;
  removeModelSwitch=new DiffSwitch<RemoveModelElement>(){
    public RemoveModelElement caseRemoveModelElement(    RemoveModelElement object){
      return object;
    }
  }
;
  removeReferenceValue=new DiffSwitch<RemoveReferenceValue>(){
    public RemoveReferenceValue caseRemoveReferenceValue(    RemoveReferenceValue object){
      return object;
    }
  }
;
  packageSwitch=new RelationalSwitch<Package>(){
    public Package casePackage(    Package object){
      return object;
    }
  }
;
}
Program: 139541
Project: 139541
Buggy source:
public void pack(){
  composite.layout();
  composite.pack();
  pageNavComp.layout();
}

Fixed version (ground truth):
public void pack(){
  composite.layout();
  pageNavComp.layout();
}
Program: 139542
Project: 139542
Buggy source:
public TypedReturnCode<IFile> create(ModelElement element,IFolder folder){
  TypedReturnCode<IFile> trc=new TypedReturnCode<IFile>();
  if (getFileExtension() == null) {
    trc.setMessage("String_Node_Str");
    log.error("String_Node_Str");
  }
 else {
    String fname=DqRepositoryViewService.createLogicalFileName(element,getFileExtension());
    IFile file=folder.getFile(fname);
    if (file.exists()) {
      trc.setReturnCode("String_Node_Str",false);
    }
 else {
      ReturnCode rc=save(element,file);
      trc.setReturnCode(rc.getMessage(),rc.isOk(),file);
    }
  }
  return trc;
}

Fixed version (ground truth):
public TypedReturnCode<IFile> create(ModelElement element,IFolder folder){
  TypedReturnCode<IFile> trc=new TypedReturnCode<IFile>();
  if (getFileExtension() == null) {
    trc.setMessage("String_Node_Str");
    log.error("String_Node_Str");
  }
 else {
    String fname=DqRepositoryViewService.createLogicalFileName(element,getFileExtension());
    IFile file=folder.getFile(fname);
    if (file.exists()) {
      String oriName=element.getName();
      element.setName(element.getName() + DateFormatUtils.format(new Date(),"String_Node_Str"));
      fname=DqRepositoryViewService.createLogicalFileName(element,getFileExtension());
      file=folder.getFile(fname);
      element.setName(oriName);
      ReturnCode rc=save(element,file);
      trc.setReturnCode(rc.getMessage(),rc.isOk(),file);
    }
 else {
      ReturnCode rc=save(element,file);
      trc.setReturnCode(rc.getMessage(),rc.isOk(),file);
    }
  }
  return trc;
}
Program: 139543
Project: 139543
Buggy source:
@Override public boolean checkFieldsValue(){
  if (nameText.getText().trim() == "String_Node_Str") {
    updateStatus(IStatus.ERROR,MSG_EMPTY);
    return false;
  }
  if (nameText.getText().contains("String_Node_Str")) {
    updateStatus(IStatus.ERROR,MSG_INVALID);
    return false;
  }
  if (!checkDuplicateModelName()) {
    return false;
  }
  updateStatus(IStatus.OK,MSG_OK);
  return super.checkFieldsValue();
}

Fixed version (ground truth):
@Override public boolean checkFieldsValue(){
  if (nameText.getText().trim() == "String_Node_Str") {
    updateStatus(IStatus.ERROR,MSG_EMPTY);
    return false;
  }
  if (nameText.getText().contains("String_Node_Str")) {
    updateStatus(IStatus.ERROR,MSG_INVALID);
    return false;
  }
  updateStatus(IStatus.OK,MSG_OK);
  return super.checkFieldsValue();
}
Program: 139545
Project: 139545
Buggy source:
/** 
 * Creates a new project resource with the special name.MOD mzhao 2009-03-18 make this method as public.For  {@link org.talend.dataprofiler.core.migration.impl.TDCPFolderMergeTask} use.
 * @return the created project resource, or <code>null</code> if the project was not created
 * @throws InterruptedException
 * @throws InvocationTargetException
 * @throws CoreException
 */
public IProject createNewProject(String projectName) throws InvocationTargetException, InterruptedException, CoreException {
  final IProject newProjectHandle=ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
  IWorkspace workspace=ResourcesPlugin.getWorkspace();
  final IProjectDescription description=workspace.newProjectDescription(newProjectHandle.getName());
  IRunnableWithProgress op=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException {
      CreateProjectOperation op=new CreateProjectOperation(description,DefaultMessagesImpl.getString("String_Node_Str"));
      try {
        PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op,monitor,WorkspaceUndoUtil.getUIInfoAdapter(null));
      }
 catch (      ExecutionException e) {
        throw new InvocationTargetException(e);
      }
    }
  }
;
  if (!newProjectHandle.exists()) {
    ProgressUI.popProgressDialog(op);
  }
  TdqPropertieManager.getInstance().addFolderProperties(newProjectHandle,PROJECT_TDQ_KEY,PROJECT_TDQ_PROPERTY);
  return newProjectHandle;
}

Fixed version (ground truth):
/** 
 * Creates a new project resource with the special name.MOD mzhao 2009-03-18 make this method as public.For  {@link org.talend.dataprofiler.core.migration.impl.TDCPFolderMergeTask} use.
 * @return the created project resource, or <code>null</code> if the project was not created
 * @throws InterruptedException
 * @throws InvocationTargetException
 * @throws CoreException
 */
public IProject createNewProject(String projectName) throws InvocationTargetException, InterruptedException, CoreException {
  final IProject newProjectHandle=ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
  IWorkspace workspace=ResourcesPlugin.getWorkspace();
  final IProjectDescription description=workspace.newProjectDescription(newProjectHandle.getName());
  IRunnableWithProgress op=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException {
      CreateProjectOperation createProjOp=new CreateProjectOperation(description,DefaultMessagesImpl.getString("String_Node_Str"));
      try {
        PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(createProjOp,monitor,WorkspaceUndoUtil.getUIInfoAdapter(null));
      }
 catch (      ExecutionException e) {
        throw new InvocationTargetException(e);
      }
    }
  }
;
  if (!newProjectHandle.exists()) {
    ProgressUI.popProgressDialog(op);
  }
  TdqPropertieManager.getInstance().addFolderProperties(newProjectHandle,PROJECT_TDQ_KEY,PROJECT_TDQ_PROPERTY);
  return newProjectHandle;
}
Program: 139546
Project: 139546
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException {
  CreateProjectOperation op=new CreateProjectOperation(description,DefaultMessagesImpl.getString("String_Node_Str"));
  try {
    PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op,monitor,WorkspaceUndoUtil.getUIInfoAdapter(null));
  }
 catch (  ExecutionException e) {
    throw new InvocationTargetException(e);
  }
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException {
  CreateProjectOperation createProjOp=new CreateProjectOperation(description,DefaultMessagesImpl.getString("String_Node_Str"));
  try {
    PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(createProjOp,monitor,WorkspaceUndoUtil.getUIInfoAdapter(null));
  }
 catch (  ExecutionException e) {
    throw new InvocationTargetException(e);
  }
}
Program: 139548
Project: 139548
Buggy source:
public static void copyConfigFiles(IProject project,Plugin plugin){
  Enumeration paths=null;
  paths=plugin.getBundle().getEntryPaths(CONFIG_PATH);
  if (paths == null) {
    return;
  }
  while (paths.hasMoreElements()) {
    String nextElement=(String)paths.nextElement();
    String currentPath="String_Node_Str" + nextElement;
    URL resourceURL=plugin.getBundle().getEntry(currentPath);
    URL fileURL=null;
    File srcFile=null;
    File destFile=null;
    try {
      fileURL=FileLocator.toFileURL(resourceURL);
      srcFile=new File(fileURL.getFile());
      if (!srcFile.getName().endsWith(FactoriesUtil.XML)) {
        continue;
      }
      destFile=new File(project.getLocation().toOSString() + File.separator + srcFile.getName());
      FileUtils.copyFile(srcFile,destFile);
    }
 catch (    IOException e) {
      log.error(e,e);
    }
  }
}

Fixed version (ground truth):
public static void copyConfigFiles(IProject project,Plugin plugin){
  Enumeration paths=plugin.getBundle().getEntryPaths(CONFIG_PATH);
  if (paths == null) {
    return;
  }
  while (paths.hasMoreElements()) {
    String nextElement=(String)paths.nextElement();
    String currentPath="String_Node_Str" + nextElement;
    URL resourceURL=plugin.getBundle().getEntry(currentPath);
    URL fileURL=null;
    File srcFile=null;
    File destFile=null;
    try {
      fileURL=FileLocator.toFileURL(resourceURL);
      srcFile=new File(fileURL.getFile());
      if (!srcFile.getName().endsWith(FactoriesUtil.XML)) {
        continue;
      }
      destFile=new File(project.getLocation().toOSString() + File.separator + srcFile.getName());
      FileUtils.copyFile(srcFile,destFile);
    }
 catch (    IOException e) {
      log.error(e,e);
    }
  }
}
Program: 139549
Project: 139549
Buggy source:
/** 
 * DOC mzhao Create new folder by project or folder.
 * @param parentFolder
 * @param folderName
 * @return
 * @throws CoreException
 */
public IFolder createNewFoler(IContainer parent,String folderName) throws CoreException {
  IFolder desFolder=null;
  if (parent instanceof IProject) {
    desFolder=((IProject)parent).getFolder(folderName);
  }
 else   if (parent instanceof IFolder) {
    desFolder=((IFolder)parent).getFolder(folderName);
  }
  if (!desFolder.exists()) {
    desFolder.create(false,true,null);
  }
  TdqPropertieManager.getInstance().addFolderProperties(desFolder,FOLDER_READONLY_KEY,FOLDER_READONLY_PROPERTY);
  return desFolder;
}

Fixed version (ground truth):
/** 
 * DOC mzhao Create new folder by project or folder.
 * @param parentFolder
 * @param folderName
 * @return
 * @throws CoreException
 */
public IFolder createNewFoler(IContainer parent,String folderName) throws CoreException {
}
Program: 139550
Project: 139550
Buggy source:
/** 
 * DOC bZhou Comment method "getPropertiesURL".
 * @param propFileStr
 * @return
 * @throws MalformedURLException
 */
private URL getPropertiesURL(String propFileStr) throws MalformedURLException {
  Bundle bundle=Platform.getBundle("String_Node_Str");
  URL[] findEntries=FileLocator.findEntries(bundle,new Path("String_Node_Str" + propFileStr));
  return findEntries[0];
}

Fixed version (ground truth):
private URL getPropertiesURL(String propFileStr) throws MalformedURLException {
  IProject rootProject=ResourceManager.getRootProject();
  IFile file=rootProject.getFile(propFileStr);
  return file.getLocationURI().toURL();
}
Program: 139551
Project: 139551
Buggy source:
private void searchAllWhereRules(IFolder folder) throws CoreException {
  for (  IResource resource : folder.members()) {
    if (resource.getType() == IResource.FOLDER) {
      searchAllWhereRules(folder.getFolder(resource.getName()));
      continue;
    }
    IFile file=(IFile)resource;
    findWhereRule(file);
  }
}

Fixed version (ground truth):
private void searchAllWhereRules(IFolder folder) throws CoreException {
  for (  IResource resource : folder.members()) {
    if (resource.getType() == IResource.FOLDER) {
      searchAllWhereRules(folder.getFolder(resource.getName()));
      continue;
    }
    IFile file=(IFile)resource;
    if (FactoriesUtil.DQRULE.equals(file.getFileExtension())) {
      findWhereRule(file);
    }
  }
}
Program: 139552
Project: 139552
Buggy source:
/** 
 * DOC zqin Comment method "searchAllPatternes".
 * @param folder
 * @throws CoreException
 */
private void searchAllPatternes(IFolder folder) throws CoreException {
  for (  IResource resource : folder.members()) {
    if (resource.getType() == IResource.FOLDER) {
      searchAllPatternes(folder.getFolder(resource.getName()));
      continue;
    }
    IFile file=(IFile)resource;
    findPattern(file);
  }
}

Fixed version (ground truth):
/** 
 * DOC zqin Comment method "searchAllPatternes".
 * @param folder
 * @throws CoreException
 */
private void searchAllPatternes(IFolder folder) throws CoreException {
  for (  IResource resource : folder.members()) {
    if (resource.getType() == IResource.FOLDER) {
      searchAllPatternes(folder.getFolder(resource.getName()));
      continue;
    }
    IFile file=(IFile)resource;
    if (FactoriesUtil.PATTERN.equals(file.getFileExtension())) {
      findPattern(file);
    }
  }
}
Program: 139553
Project: 139553
Buggy source:
private void searchAllReports(IFolder folder) throws CoreException {
  for (  IResource resource : folder.members()) {
    if (resource instanceof IFolder) {
      continue;
    }
    if (resource.getType() == IResource.FOLDER) {
      searchAllReports(folder.getFolder(resource.getName()));
    }
    IFile file=(IFile)resource;
    findReport(file);
  }
}

Fixed version (ground truth):
private void searchAllReports(IFolder folder) throws CoreException {
  for (  IResource resource : folder.members()) {
    if (resource instanceof IFolder) {
      continue;
    }
    if (resource.getType() == IResource.FOLDER) {
      searchAllReports(folder.getFolder(resource.getName()));
    }
    IFile file=(IFile)resource;
    if (FactoriesUtil.REP.equals(file.getFileExtension())) {
      findReport(file);
    }
  }
}
Program: 139554
Project: 139554
Buggy source:
private void searchAllUDIs(IFolder folder) throws CoreException {
  for (  IResource resource : folder.members()) {
    if (resource.getType() == IResource.FOLDER) {
      searchAllUDIs(folder.getFolder(resource.getName()));
      continue;
    }
    IFile file=(IFile)resource;
    findUDI(file);
  }
}

Fixed version (ground truth):
private void searchAllUDIs(IFolder folder) throws CoreException {
  for (  IResource resource : folder.members()) {
    if (resource.getType() == IResource.FOLDER) {
      searchAllUDIs(folder.getFolder(resource.getName()));
      continue;
    }
    IFile file=(IFile)resource;
    if (FactoriesUtil.UDI.equals(file.getFileExtension())) {
      findUDI(file);
    }
  }
}
Program: 139555
Project: 139555
Buggy source:
private URL getPropertiesURL(String propFileStr) throws MalformedURLException {
  IProject rootProject=ResourceManager.getRootProject();
  IFile file=rootProject.getFile(propFileStr);
  return file.getLocationURI().toURL();
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "getPropertiesURL".
 * @param propFileStr
 * @return
 * @throws MalformedURLException
 */
private URL getPropertiesURL(String propFileStr) throws MalformedURLException {
  Bundle bundle=Platform.getBundle("String_Node_Str");
  URL[] findEntries=FileLocator.findEntries(bundle,new Path("String_Node_Str" + propFileStr));
  return findEntries[0];
}
Program: 139556
Project: 139556
Buggy source:
/** 
 * DOC qzhang Comment method "getPatternFile".
 * @param pattern
 */
public IFile getPatternFile(Pattern pattern,IFolder[] folders){
  IFile file=null;
  if (resourcesNumberChanged) {
    try {
      for (int i=0; i < folders.length; i++) {
        searchAllPatternes(folders[i]);
      }
    }
 catch (    CoreException e) {
      log.error(e,e);
    }
    resourcesNumberChanged=false;
  }
  Set<IFile> keySet=patternsMap.keySet();
  for (  IFile file2 : keySet) {
    Pattern pattern2=patternsMap.get(file2);
    RegularExpression e2=(RegularExpression)pattern.getComponents().get(0);
    RegularExpression e=(RegularExpression)pattern2.getComponents().get(0);
    String et=e.getExpressionType();
    String et2=e2.getExpressionType();
    if (pattern2.getName().equals(pattern.getName())) {
      boolean b=et == null && et2 == null;
      b=b || (et != null && et.equals(et2));
      if (b) {
        file=file2;
      }
    }
  }
  return file;
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "getPatternFile".
 * @param pattern
 */
public IFile getPatternFile(Pattern pattern,IFolder[] folders){
  IFile file=null;
  if (resourcesNumberChanged) {
    try {
      for (int i=0; i < folders.length; i++) {
        searchAllPatternes(folders[i]);
      }
    }
 catch (    CoreException e) {
      log.error(e,e);
    }
    resourcesNumberChanged=false;
  }
  Set<IFile> keySet=patternsMap.keySet();
  for (  IFile file2 : keySet) {
    Pattern pattern2=patternsMap.get(file2);
    EList<PatternComponent> components=pattern.getComponents();
    EList<PatternComponent> components2=pattern2.getComponents();
    if (!components.isEmpty() && !components2.isEmpty()) {
      RegularExpression e2=(RegularExpression)components.get(0);
      RegularExpression e=(RegularExpression)components2.get(0);
      String et=e.getExpressionType();
      String et2=e2.getExpressionType();
      if (pattern2.getName().equals(pattern.getName())) {
        boolean b=et == null && et2 == null;
        b=b || (et != null && et.equals(et2));
        if (b) {
          file=file2;
        }
      }
    }
  }
  return file;
}
Program: 139557
Project: 139557
Buggy source:
/** 
 * DOC qzhang Comment method "isPatternValid".
 * @param pattern
 * @return
 */
public static boolean isPatternValid(Pattern pattern){
  boolean valid=true;
  EList<PatternComponent> components=pattern.getComponents();
  for (int i=0; i < components.size(); i++) {
    RegularExpressionImpl regularExpress=(RegularExpressionImpl)components.get(i);
    String body=regularExpress.getExpression().getBody();
    valid=((body != null) && body.matches("String_Node_Str"));
    if (!valid) {
      break;
    }
  }
  return valid;
}

Fixed version (ground truth):
/** 
 * DOC qzhang Comment method "isPatternValid".
 * @param pattern
 * @return
 */
public static boolean isPatternValid(Pattern pattern){
  boolean valid=false;
  EList<PatternComponent> components=pattern.getComponents();
  for (int i=0; i < components.size(); i++) {
    RegularExpressionImpl regularExpress=(RegularExpressionImpl)components.get(i);
    String body=regularExpress.getExpression().getBody();
    valid=((body != null) && body.matches("String_Node_Str"));
    if (!valid) {
      break;
    }
  }
  return valid;
}
Program: 139559
Project: 139559
Buggy source:
@Override public boolean performFinish(){
  IPath absolutePath=new Path(parameter.getFolderProvider().getFolder().getAbsolutePath());
  String portableString=absolutePath.append(parameter.getFileName()).addFileExtension("String_Node_Str").toPortableString();
  sqlFile=new File(portableString);
  try {
    sqlFile.createNewFile();
    return true;
  }
 catch (  IOException e) {
    log.error(e,e);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  IPath absolutePath=new Path(parameter.getFolderProvider().getFolder().getAbsolutePath());
  String portableString=absolutePath.append(parameter.getFileName()).addFileExtension("String_Node_Str").toPortableString();
  sqlFile=new File(portableString);
  try {
    sqlFile.createNewFile();
    ProxyRepositoryManager.getInstance().save();
    return true;
  }
 catch (  IOException e) {
    log.error(e,e);
  }
  return false;
}
Program: 139560
Project: 139560
Buggy source:
/** 
 * DOC xqliu Comment method "createAndStoreUDI".
 * @param parameters
 * @param selectionFolder
 */
private static void createAndStoreUDI(UDIParameters parameters,IFolder selectionFolder){
  IndicatorDefinition id=UDIHelper.createUDI(parameters.name,parameters.auther,parameters.description,parameters.purpose,parameters.status,parameters.category);
  for (  String key : parameters.regex.keySet()) {
    Expression expression=BooleanExpressionHelper.createExpression(key,parameters.regex.get(key));
    id.getSqlGenericExpression().add(expression);
  }
  String fname=DqRepositoryViewService.createFilename(parameters.name,FactoriesUtil.UDI);
  try {
    String[] folderNames=parameters.relativePath.split("String_Node_Str");
    for (    String folderName : folderNames) {
      IFolder folder=selectionFolder.getFolder(folderName);
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      TdqPropertieManager.getInstance().addFolderProperties(folder,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.UDI_FOLDER_PROPERTY);
      selectionFolder=folder;
    }
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  IFile pfile=selectionFolder.getFile(fname);
  EMFSharedResources.getInstance().addEObjectToResourceSet(pfile.getFullPath().toString(),id);
  EMFSharedResources.getInstance().saveLastResource();
}

Fixed version (ground truth):
/** 
 * DOC xqliu Comment method "createAndStoreUDI".
 * @param parameters
 * @param selectionFolder
 */
private static void createAndStoreUDI(UDIParameters parameters,IFolder selectionFolder){
  IndicatorDefinition id=UDIHelper.createUDI(parameters.name,parameters.auther,parameters.description,parameters.purpose,parameters.status,parameters.category);
  for (  String key : parameters.regex.keySet()) {
    Expression expression=BooleanExpressionHelper.createExpression(key,parameters.regex.get(key));
    id.getSqlGenericExpression().add(expression);
  }
  boolean validStatus=UDIHelper.isUDIValid(id);
  TaggedValueHelper.setValidStatus(validStatus,id);
  String fname=DqRepositoryViewService.createFilename(parameters.name,FactoriesUtil.UDI);
  try {
    String[] folderNames=parameters.relativePath.split("String_Node_Str");
    for (    String folderName : folderNames) {
      IFolder folder=selectionFolder.getFolder(folderName);
      if (!folder.exists()) {
        folder.create(false,true,null);
      }
      TdqPropertieManager.getInstance().addFolderProperties(folder,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.UDI_FOLDER_PROPERTY);
      selectionFolder=folder;
    }
  }
 catch (  CoreException e) {
    log.error(e,e);
  }
  IFile pfile=selectionFolder.getFile(fname);
  EMFSharedResources.getInstance().addEObjectToResourceSet(pfile.getFullPath().toString(),id);
  EMFSharedResources.getInstance().saveLastResource();
}
Program: 139562
Project: 139562
Buggy source:
protected IFile getPropertyFile(IEditorPart editor){
  if (isCommonFormEditor(editor)) {
    IFileEditorInput fileInput=(IFileEditorInput)editor.getEditorInput();
    URI uri=URI.createPlatformResourceURI(fileInput.getFile().getFullPath().toString(),false);
    Resource resource=EMFSharedResources.getInstance().getResource(uri,true);
    if (resource != null) {
      ModelElement modelElement=null;
      EList<EObject> modelElements=resource.getContents();
      for (      EObject obj : modelElements) {
        if (obj instanceof ModelElement) {
          modelElement=(ModelElement)obj;
          TaggedValue taggedvalue=TaggedValueHelper.getTaggedValue(TaggedValueHelper.PROPERTY_FILE,modelElement.getTaggedValue());
          if (taggedvalue != null) {
            String propertyPath=taggedvalue.getValue();
            propertyFile=(IFile)ResourcesPlugin.getWorkspace().getRoot().findMember(propertyPath);
            break;
          }
        }
      }
    }
  }
  return propertyFile;
}

Fixed version (ground truth):
protected IFile getPropertyFile(IEditorPart editor){
  if (isCommonFormEditor(editor)) {
    if (!(editor.getEditorInput() instanceof IFileEditorInput)) {
      return null;
    }
    IFileEditorInput fileInput=(IFileEditorInput)editor.getEditorInput();
    URI uri=URI.createPlatformResourceURI(fileInput.getFile().getFullPath().toString(),false);
    Resource resource=EMFSharedResources.getInstance().getResource(uri,true);
    if (resource != null) {
      ModelElement modelElement=null;
      EList<EObject> modelElements=resource.getContents();
      for (      EObject obj : modelElements) {
        if (obj instanceof ModelElement) {
          modelElement=(ModelElement)obj;
          TaggedValue taggedvalue=TaggedValueHelper.getTaggedValue(TaggedValueHelper.PROPERTY_FILE,modelElement.getTaggedValue());
          if (taggedvalue != null) {
            String propertyPath=taggedvalue.getValue();
            propertyFile=(IFile)ResourcesPlugin.getWorkspace().getRoot().findMember(propertyPath);
            break;
          }
        }
      }
    }
  }
  return propertyFile;
}
Program: 139563
Project: 139563
Buggy source:
/** 
 * DOC bZhou Comment method "savePerperties".
 * @param element
 * @return
 */
public Property savePerperties(ModelElement element){
  Resource resource=element.eResource();
  String fileName=resource.getURI().lastSegment();
  Property property=initProperty(element);
  TDQItem item=initItem(element,property);
  item.setFilename(fileName);
  URI uri=element.eResource().getURI();
  serialize(item,uri);
  serialize(property,uri);
  return property;
}

Fixed version (ground truth):
/** 
 * DOC bZhou Comment method "savePerperties".
 * @param element
 * @return
 */
public Property savePerperties(ModelElement element){
  Resource resource=element.eResource();
  String fileName=resource.getURI().lastSegment();
  Property property=initProperty(element);
  TDQItem item=initItem(element,property);
  item.setFilename(fileName);
  URI uri=element.eResource().getURI();
  serialize(property,uri);
  return property;
}
Program: 139565
Project: 139565
Buggy source:
public boolean execute(){
  try {
    DQStructureManager manager=DQStructureManager.getInstance();
    IFolder createNewFoler=manager.createNewFoler(ResourceManager.getLibrariesFolder(),DQStructureManager.DQ_RULES);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.DQRULES_FOLDER_PROPERTY);
    manager.copyFilesToFolder(CorePlugin.getDefault(),DQStructureManager.DQ_RULES_PATH,true,createNewFoler,null);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean execute(){
  try {
    DQStructureManager manager=DQStructureManager.getInstance();
    IFolder createNewFoler=manager.createNewReadOnlyFolder(ResourceManager.getLibrariesFolder(),DQStructureManager.DQ_RULES);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.DQRULES_FOLDER_PROPERTY);
    manager.copyFilesToFolder(CorePlugin.getDefault(),DQStructureManager.DQ_RULES_PATH,true,createNewFoler,null);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return false;
  }
  return true;
}
Program: 139566
Project: 139566
Buggy source:
public boolean execute(){
  try {
    DQStructureManager manager=DQStructureManager.getInstance();
    IFolder createNewFoler=manager.createNewFoler(ResourceManager.getLibrariesFolder(),DQStructureManager.EXCHANGE);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.EXCHANGE_FOLDER_PROPERTY);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean execute(){
  try {
    DQStructureManager manager=DQStructureManager.getInstance();
    IFolder createNewFoler=manager.createNewReadOnlyFolder(ResourceManager.getLibrariesFolder(),DQStructureManager.EXCHANGE);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.EXCHANGE_FOLDER_PROPERTY);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return false;
  }
  return true;
}
Program: 139567
Project: 139567
Buggy source:
public boolean execute(){
  try {
    DQStructureManager manager=DQStructureManager.getInstance();
    IFolder createNewFoler=manager.createNewFoler(ResourceManager.getLibrariesFolder(),DQStructureManager.INDICATORS);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.INDICATORS_FOLDER_PROPERTY);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.NO_SUBFOLDER_KEY,DQStructureManager.NO_SUBFOLDER_PROPERTY);
    createNewFoler=manager.createNewFoler(createNewFoler,DQStructureManager.USER_DEFINED_INDICATORS);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.UDI_FOLDER_PROPERTY);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean execute(){
  try {
    DQStructureManager manager=DQStructureManager.getInstance();
    IFolder createNewFoler=manager.createNewReadOnlyFolder(ResourceManager.getLibrariesFolder(),DQStructureManager.INDICATORS);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.INDICATORS_FOLDER_PROPERTY);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.NO_SUBFOLDER_KEY,DQStructureManager.NO_SUBFOLDER_PROPERTY);
    createNewFoler=manager.createNewReadOnlyFolder(createNewFoler,DQStructureManager.USER_DEFINED_INDICATORS);
    TdqPropertieManager.getInstance().addFolderProperties(createNewFoler,DQStructureManager.FOLDER_CLASSIFY_KEY,DQStructureManager.UDI_FOLDER_PROPERTY);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
    return false;
  }
  return true;
}