Program: 138565
Project: 138565
Buggy source:
@Override protected boolean doExecute() throws Exception {
  boolean returnFlag=true;
  List<File> mergeFolders=new ArrayList<File>();
  mergeFolders.add(getWorkspacePath().append(DB_CONNECTION).toFile());
  mergeFolders.add(getWorkspacePath().append(MDM_CONNECTION).toFile());
  List<File> resources=new ArrayList<File>();
  for (  File theFile : mergeFolders) {
    if (theFile != null && theFile.exists() && (DB_CONNECTION.endsWith(theFile.getName()) || MDM_CONNECTION.endsWith(theFile.getName()))) {
      for (      File newFile : theFile.listFiles()) {
        if (newFile.isDirectory()) {
          resources.addAll(iteratorResource(newFile));
        }
 else         if (newFile.getName().toLowerCase().endsWith(FactoriesUtil.PROPERTIES_EXTENSION.toLowerCase())) {
          resources.add(newFile);
        }
      }
    }
  }
  if (resources.size() > 0) {
    for (    File resource : resources) {
      if (resource.isFile() && resource.getName().toLowerCase().endsWith(FactoriesUtil.PROPERTIES_EXTENSION.toLowerCase())) {
        try {
          handlePropertiesFile(resource);
        }
 catch (        Exception e) {
          returnFlag=false;
          log.warn("String_Node_Str" + resource.getAbsolutePath(),e);
        }
      }
    }
    File fileAnalysis=new File(ResourceManager.getAnalysisFolder().getRawLocationURI());
    File fileRule=new File(ResourceManager.getRulesFolder().getRawLocationURI());
    try {
      String[] anaFileExtentionNames={FactoriesUtil.ANA};
      String[] rulesFileEctentionNames={FactoriesUtil.DQRULE};
      returnFlag&=FilesUtils.migrateFolder(fileAnalysis,anaFileExtentionNames,this.getReplaceStringMap(),log) && FilesUtils.migrateFolder(fileRule,rulesFileEctentionNames,this.getReplaceStringMap(),log);
      AnaResourceFileHelper.getInstance().clear();
    }
 catch (    Exception e) {
      returnFlag=false;
      log.error(e,e);
    }
  }
  return returnFlag;
}

Fixed version (ground truth):
@Override protected boolean doExecute() throws Exception {
  boolean returnFlag=true;
  List<File> mergeFolders=new ArrayList<File>();
  mergeFolders.add(getWorkspacePath().append(DB_CONNECTION).toFile());
  mergeFolders.add(getWorkspacePath().append(MDM_CONNECTION).toFile());
  List<File> resources=new ArrayList<File>();
  for (  File theFile : mergeFolders) {
    if (theFile != null && theFile.exists() && (DB_CONNECTION.endsWith(theFile.getName()) || MDM_CONNECTION.endsWith(theFile.getName()))) {
      for (      File newFile : theFile.listFiles()) {
        if (newFile.isDirectory()) {
          resources.addAll(iteratorResource(newFile));
        }
 else         if (newFile.getName().toLowerCase().endsWith(FactoriesUtil.PROPERTIES_EXTENSION.toLowerCase())) {
          resources.add(newFile);
        }
      }
    }
  }
  if (resources.size() > 0) {
    for (    File resource : resources) {
      if (resource.isFile() && resource.getName().toLowerCase().endsWith(FactoriesUtil.PROPERTIES_EXTENSION.toLowerCase())) {
        try {
          handlePropertiesFile(resource);
        }
 catch (        Exception e) {
          returnFlag=false;
          log.warn("String_Node_Str" + resource.getAbsolutePath(),e);
        }
      }
    }
    File fileAnalysis=new File(ResourceManager.getAnalysisFolder().getRawLocationURI());
    File fileRule=new File(ResourceManager.getRulesFolder().getRawLocationURI());
    try {
      String[] anaFileExtentionNames={FactoriesUtil.ANA};
      String[] rulesFileEctentionNames={FactoriesUtil.DQRULE};
      returnFlag&=FilesUtils.migrateFolder(fileAnalysis,anaFileExtentionNames,this.getReplaceStringMap(),log) && FilesUtils.migrateFolder(fileRule,rulesFileEctentionNames,this.getReplaceStringMap(),log);
      AnaResourceFileHelper.getInstance().clear();
      AnaResourceFileHelper.getInstance().getAllAnalysis();
    }
 catch (    Exception e) {
      returnFlag=false;
      log.error(e,e);
    }
  }
  return returnFlag;
}