Program: 172085
Project: 172085
Buggy source:
/** 
 * Cleans the WAR file of all files relating to the currently installed version of the the Module.
 * @param warFileLocation    the war file location
 * @param moduleId          the module id
 * @param preview           indicates whether this is a preview installation
 * @param purge             Fully delete all files (including those marked "PRESERVED")
 * @throws IOException 
 */
public void uninstallModule(String moduleId,String warFileLocation,boolean preview,boolean purge) throws IOException {
  InstalledFiles installedFiles=new InstalledFiles(warFileLocation,moduleId);
  installedFiles.load();
  for (  String add : installedFiles.getAdds()) {
    removeFile(warFileLocation,add,preview);
  }
  for (  String mkdir : installedFiles.getMkdirs()) {
    removeFile(warFileLocation,mkdir,preview);
  }
  for (  Map.Entry<String,String> update : installedFiles.getUpdates().entrySet()) {
    if (preview == false) {
      TFile modified=new TFile(warFileLocation + update.getKey());
      TFile backup=new TFile(warFileLocation + update.getValue());
      backup.cp_rp(modified);
      backup.deleteOnExit();
    }
    outputVerboseMessage("String_Node_Str" + update.getKey() + "String_Node_Str"+ update.getValue()+ "String_Node_Str",true);
  }
  String installedFilesPathInWar=installedFiles.getFilePathInWar();
  removeFile(warFileLocation,installedFilesPathInWar,preview);
  String modulePropertiesFileLocationInWar=ModuleDetailsHelper.getModulePropertiesFilePathInWar(moduleId);
  removeFile(warFileLocation,modulePropertiesFileLocationInWar,preview);
}

Fixed version (ground truth):
/** 
 * Cleans the WAR file of all files relating to the currently installed version of the the Module.
 * @param warFileLocation    the war file location
 * @param moduleId          the module id
 * @param preview           indicates whether this is a preview installation
 * @param purge             Fully delete all files (including those marked "PRESERVED")
 * @throws IOException 
 */
public void uninstallModule(String moduleId,String warFileLocation,boolean preview,boolean purge) throws IOException {
  InstalledFiles installedFiles=new InstalledFiles(warFileLocation,moduleId);
  installedFiles.load();
  for (  String add : installedFiles.getAdds()) {
    removeFile(warFileLocation,add,preview);
  }
  for (  String mkdir : installedFiles.getMkdirs()) {
    removeFile(warFileLocation,mkdir,preview);
  }
  for (  Map.Entry<String,String> update : installedFiles.getUpdates().entrySet()) {
    if (preview == false) {
      TFile modified=new TFile(warFileLocation + update.getKey());
      TFile backup=new TFile(warFileLocation + update.getValue());
      backup.cp_rp(modified);
      backup.rm();
    }
    outputVerboseMessage("String_Node_Str" + update.getKey() + "String_Node_Str"+ update.getValue()+ "String_Node_Str",true);
  }
  String installedFilesPathInWar=installedFiles.getFilePathInWar();
  removeFile(warFileLocation,installedFilesPathInWar,preview);
  String modulePropertiesFileLocationInWar=ModuleDetailsHelper.getModulePropertiesFilePathInWar(moduleId);
  removeFile(warFileLocation,modulePropertiesFileLocationInWar,preview);
}