Program: 106182
Project: 106182
Buggy source:
public static void pidCheck(String pidDir,String run) throws ConfigurationException {
  String dir=pidDir == null ? "String_Node_Str" : pidDir;
  try {
    final File propsFile=PropertiesUtil.findConfigFile("String_Node_Str");
    if (propsFile == null) {
      s_logger.debug("String_Node_Str");
    }
 else {
      final FileInputStream finputstream=new FileInputStream(propsFile);
      final Properties props=new Properties();
      props.load(finputstream);
      finputstream.close();
      dir=props.getProperty("String_Node_Str");
      if (dir == null) {
        dir="String_Node_Str";
      }
    }
  }
 catch (  IOException e) {
    s_logger.debug("String_Node_Str");
  }
  final File pidFile=new File(dir + File.separator + run);
  try {
    if (!pidFile.createNewFile()) {
      if (!pidFile.exists()) {
        throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath() + "String_Node_Str");
      }
      final String pidLine=FileUtils.readFileToString(pidFile).trim();
      if (pidLine.isEmpty()) {
        throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
      }
      try {
        final long pid=Long.parseLong(pidLine);
        final Script script=new Script("String_Node_Str",120000,s_logger);
        script.add("String_Node_Str","String_Node_Str" + pid);
        final String result=script.execute();
        if (result == null) {
          throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
        }
        if (!pidFile.delete()) {
          throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
        }
        if (!pidFile.createNewFile()) {
          throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
        }
      }
 catch (      final NumberFormatException e) {
        throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
      }
    }
    pidFile.deleteOnExit();
    final Script script=new Script("String_Node_Str",120000,s_logger);
    script.add("String_Node_Str","String_Node_Str");
    final OutputInterpreter.OneLineParser parser=new OutputInterpreter.OneLineParser();
    script.execute(parser);
    final String pid=parser.getLine();
    FileUtils.writeStringToFile(pidFile,pid + "String_Node_Str");
  }
 catch (  final IOException e) {
    throw new CloudRuntimeException("String_Node_Str" + pidFile.getAbsolutePath() + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
public static void pidCheck(String pidDir,String run) throws ConfigurationException {
  String dir=pidDir == null ? "String_Node_Str" : pidDir;
  try {
    final File propsFile=PropertiesUtil.findConfigFile("String_Node_Str");
    if (propsFile == null) {
      s_logger.debug("String_Node_Str");
    }
 else {
      final FileInputStream finputstream=new FileInputStream(propsFile);
      final Properties props=new Properties();
      props.load(finputstream);
      finputstream.close();
      dir=props.getProperty("String_Node_Str");
      if (dir == null) {
        dir=pidDir == null ? "String_Node_Str" : pidDir;
      }
    }
  }
 catch (  IOException e) {
    s_logger.debug("String_Node_Str");
  }
  final File pidFile=new File(dir + File.separator + run);
  try {
    if (!pidFile.createNewFile()) {
      if (!pidFile.exists()) {
        throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath() + "String_Node_Str");
      }
      final String pidLine=FileUtils.readFileToString(pidFile).trim();
      if (pidLine.isEmpty()) {
        throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
      }
      try {
        final long pid=Long.parseLong(pidLine);
        final Script script=new Script("String_Node_Str",120000,s_logger);
        script.add("String_Node_Str","String_Node_Str" + pid);
        final String result=script.execute();
        if (result == null) {
          throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
        }
        if (!pidFile.delete()) {
          throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
        }
        if (!pidFile.createNewFile()) {
          throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
        }
      }
 catch (      final NumberFormatException e) {
        throw new ConfigurationException("String_Node_Str" + pidFile.getAbsolutePath());
      }
    }
    pidFile.deleteOnExit();
    final Script script=new Script("String_Node_Str",120000,s_logger);
    script.add("String_Node_Str","String_Node_Str");
    final OutputInterpreter.OneLineParser parser=new OutputInterpreter.OneLineParser();
    script.execute(parser);
    final String pid=parser.getLine();
    FileUtils.writeStringToFile(pidFile,pid + "String_Node_Str");
  }
 catch (  final IOException e) {
    throw new CloudRuntimeException("String_Node_Str" + pidFile.getAbsolutePath() + "String_Node_Str",e);
  }
}