Program: 161890
Project: 161890
Buggy source:
public void replaceAll() throws LawenaException {
  Path tfpath=cfg.getTfPath();
  Path customBackupPath=tfpath.resolve("String_Node_Str");
  Path customPath=tfpath.resolve("String_Node_Str");
  Path configBackupPath=tfpath.resolve("String_Node_Str");
  Path configPath=tfpath.resolve("String_Node_Str");
  if (Files.exists(configBackupPath) || Files.exists(customBackupPath)) {
    log.info("String_Node_Str");
    log.info("String_Node_Str");
    log.info("String_Node_Str");
    throw new LawenaException("String_Node_Str");
  }
  try {
    log.fine("String_Node_Str");
    configPath.toFile().setWritable(true);
    Files.move(configPath,configBackupPath);
    mkdirs(configPath);
    copy(Paths.get("String_Node_Str"),configPath);
    if (cfg.getBoolean(Key.CopyUserConfig)) {
      Path configCfg=configBackupPath.resolve("String_Node_Str");
      if (Files.exists(configCfg)) {
        log.fine("String_Node_Str");
        Files.copy(configCfg,configPath.resolve("String_Node_Str"),StandardCopyOption.COPY_ATTRIBUTES,StandardCopyOption.REPLACE_EXISTING);
      }
    }
  }
 catch (  IOException e) {
    log.log(Level.INFO,"String_Node_Str",e);
    throw new LawenaException("String_Node_Str",e);
  }
  try {
    log.fine("String_Node_Str");
    if (!Files.exists(customPath) || !Files.isDirectory(customPath)) {
      mkdir(customPath);
    }
    customPath.toFile().setWritable(true);
    Files.move(customPath,customBackupPath);
  }
 catch (  IOException e) {
    log.log(Level.INFO,"String_Node_Str",e);
    throw new LawenaException("String_Node_Str",e);
  }
  try {
    log.fine("String_Node_Str");
    Path resourcePath=tfpath.resolve("String_Node_Str");
    Path scriptsPath=tfpath.resolve("String_Node_Str");
    mkdirs(resourcePath);
    mkdirs(scriptsPath);
    String hudName=cfg.getHud();
    if (!hudName.equals("String_Node_Str")) {
      copyReadOnly(Paths.get("String_Node_Str",hudName,"String_Node_Str"),resourcePath);
      copyReadOnly(Paths.get("String_Node_Str",hudName,"String_Node_Str"),scriptsPath);
      Files.copy(Paths.get("String_Node_Str",hudName,"String_Node_Str"),tfpath.resolve("String_Node_Str"));
    }
  }
 catch (  IOException e) {
    log.log(Level.INFO,"String_Node_Str",e);
    throw new LawenaException("String_Node_Str",e);
  }
  Path skyboxPath=tfpath.resolve("String_Node_Str");
  try {
    String sky=cfg.getSkybox();
    if (sky != null && !sky.isEmpty() && !sky.equals(Key.Skybox.defValue())) {
      log.fine("String_Node_Str");
      mkdirs(skyboxPath);
      replaceSkybox();
    }
  }
 catch (  IOException e) {
    log.log(Level.INFO,"String_Node_Str",e);
    try {
      delete(skyboxPath);
      log.fine("String_Node_Str");
    }
 catch (    IOException e1) {
      log.info("String_Node_Str" + e1);
    }
    throw new LawenaException("String_Node_Str",e);
  }
  if (customPathList != null) {
    copyCustomFiles();
  }
}

Fixed version (ground truth):
public void replaceAll() throws LawenaException {
  Path tfpath=cfg.getTfPath();
  Path customBackupPath=tfpath.resolve("String_Node_Str");
  Path customPath=tfpath.resolve("String_Node_Str");
  Path configBackupPath=tfpath.resolve("String_Node_Str");
  Path configPath=tfpath.resolve("String_Node_Str");
  if (Files.exists(configBackupPath) || Files.exists(customBackupPath)) {
    log.info("String_Node_Str");
    log.info("String_Node_Str");
    log.info("String_Node_Str");
    throw new LawenaException("String_Node_Str");
  }
  try {
    log.fine("String_Node_Str");
    configPath.toFile().setWritable(true);
    Files.move(configPath,configBackupPath);
    mkdirs(configPath);
    copy(Paths.get("String_Node_Str"),configPath);
    if (cfg.getBoolean(Key.CopyUserConfig)) {
      Path configCfg=configBackupPath.resolve("String_Node_Str");
      if (Files.exists(configCfg)) {
        log.fine("String_Node_Str");
        Files.copy(configCfg,configPath.resolve("String_Node_Str"),StandardCopyOption.COPY_ATTRIBUTES,StandardCopyOption.REPLACE_EXISTING);
      }
    }
  }
 catch (  IOException e) {
    log.log(Level.INFO,"String_Node_Str",e);
    throw new LawenaException("String_Node_Str",e);
  }
  try {
    log.fine("String_Node_Str");
    if (!Files.exists(customPath) || !Files.isDirectory(customPath)) {
      mkdir(customPath);
    }
    customPath.toFile().setWritable(true);
    Files.move(customPath,customBackupPath);
  }
 catch (  IOException e) {
    log.log(Level.INFO,"String_Node_Str",e);
    throw new LawenaException("String_Node_Str",e);
  }
  try {
    log.fine("String_Node_Str");
    Path resourcePath=tfpath.resolve("String_Node_Str");
    Path scriptsPath=tfpath.resolve("String_Node_Str");
    mkdirs(resourcePath);
    mkdirs(scriptsPath);
    String hudName=cfg.getHud();
    if (!hudName.equals("String_Node_Str")) {
      copyReadOnly(Paths.get("String_Node_Str",hudName,"String_Node_Str"),resourcePath);
      copyReadOnly(Paths.get("String_Node_Str",hudName,"String_Node_Str"),scriptsPath);
      if (!hudName.equals("String_Node_Str")) {
        Files.copy(Paths.get("String_Node_Str",hudName,"String_Node_Str"),tfpath.resolve("String_Node_Str"));
      }
    }
  }
 catch (  IOException e) {
    log.log(Level.INFO,"String_Node_Str",e);
    throw new LawenaException("String_Node_Str",e);
  }
  Path skyboxPath=tfpath.resolve("String_Node_Str");
  try {
    String sky=cfg.getSkybox();
    if (sky != null && !sky.isEmpty() && !sky.equals(Key.Skybox.defValue())) {
      log.fine("String_Node_Str");
      mkdirs(skyboxPath);
      replaceSkybox();
    }
  }
 catch (  IOException e) {
    log.log(Level.INFO,"String_Node_Str",e);
    try {
      delete(skyboxPath);
      log.fine("String_Node_Str");
    }
 catch (    IOException e1) {
      log.info("String_Node_Str" + e1);
    }
    throw new LawenaException("String_Node_Str",e);
  }
  if (customPathList != null) {
    copyCustomFiles();
  }
}