Program: 45283
Project: 45283
Buggy source:
public void init(){
  if (_name == null) {
    _logger.warning("String_Node_Str");
    return;
  }
  _daemonDir=_config.getString("String_Node_Str",getDefaultDaemonDir());
  File daemonDir=new File(_daemonDir);
  if (!daemonDir.exists() || !daemonDir.isDirectory()) {
    _logger.warning("String_Node_Str" + _daemonDir + "String_Node_Str");
    return;
  }
  _pidDir=_config.getString("String_Node_Str",Constants.DEFAULT_DAEMON_PID_DIR);
  File pidDir=new File(_pidDir);
  if (!pidDir.exists() || !pidDir.isDirectory()) {
    _logger.warning("String_Node_Str" + _pidDir + "String_Node_Str");
    return;
  }
  String wrapperJar=WrapperLoader.getWrapperJar().trim();
  String wrapperHome="String_Node_Str";
  try {
    wrapperHome=new File(wrapperJar).getParentFile().getCanonicalPath();
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  String confFile=_config.getString("String_Node_Str");
  String confDir=null;
  if (confFile != null) {
    File f=new File(confFile);
    if (f.exists())     try {
      confDir=f.getParentFile().getCanonicalPath();
    }
 catch (    IOException e) {
    }
  }
  if (confDir == null)   confDir=wrapperHome + "String_Node_Str";
  if (confFile == null) {
    _logger.warning("String_Node_Str");
    return;
  }
  try {
    _confFile=new File(confFile).getCanonicalPath();
  }
 catch (  IOException e) {
    _logger.throwing(this.getClass().getName(),"String_Node_Str",e);
  }
  _daemonTemplate=_config.getString("String_Node_Str",wrapperHome + "String_Node_Str");
  File daemonTemplate=new File(_daemonTemplate);
  if (!daemonTemplate.exists() || !daemonTemplate.isFile()) {
    if (_logger != null)     _logger.warning("String_Node_Str" + _daemonTemplate + "String_Node_Str");
    return;
  }
  File daemonScript=getDaemonScript();
  if (daemonScript.exists())   if (_logger != null)   _logger.info(daemonScript.getAbsolutePath() + "String_Node_Str");
  String pidName=null;
  try {
    pidName=_config.getString("String_Node_Str",new File(pidDir,"String_Node_Str" + getName() + "String_Node_Str").getCanonicalPath());
  }
 catch (  IOException e) {
    if (_logger != null)     _logger.throwing(this.getClass().getName(),"String_Node_Str",e);
  }
  File pidFile=new File(pidName);
  String apidName=null;
  try {
    apidName=_config.getString("String_Node_Str",new File(pidDir,"String_Node_Str" + getName() + "String_Node_Str").getCanonicalPath());
  }
 catch (  IOException e) {
    if (_logger != null)     _logger.throwing(this.getClass().getName(),"String_Node_Str",e);
  }
  File apidFile=new File(apidName);
  try {
    _daemonTemplate=daemonTemplate.getCanonicalPath();
    _wrapperPidFile=pidFile.getCanonicalPath();
    _appPidFile=apidFile.getCanonicalPath();
    _daemonScript=daemonScript.getCanonicalPath();
  }
 catch (  Exception ex) {
    if (_logger != null)     _logger.throwing(this.getClass().getName(),"String_Node_Str",ex);
  }
  JavaHome javaHome=OperatingSystem.instance().getJavaHome(_config);
  String java=javaHome.findJava();
  _startCmd=new String[10];
  _startCmd[0]=java;
  _startCmd[1]="String_Node_Str" + _wrapperPidFile;
  _startCmd[2]="String_Node_Str";
  _startCmd[3]="String_Node_Str";
  _startCmd[4]=null;
  _startCmd[5]=null;
  _startCmd[6]="String_Node_Str";
  _startCmd[7]=wrapperJar;
  _startCmd[8]="String_Node_Str";
  _startCmd[9]=_confFile;
  _execCmd=_startCmd.clone();
  _execCmd[4]="String_Node_Str";
  _execCmd[8]="String_Node_Str";
  if (_config.getBoolean("String_Node_Str",false)) {
    _execCmd[4]="String_Node_Str";
    _execCmd[5]="String_Node_Str";
  }
  _stopCmd=_startCmd.clone();
  _stopCmd[8]="String_Node_Str";
  _statusCmd=_startCmd.clone();
  _statusCmd[8]="String_Node_Str";
  String defaultRunLevelDir=_daemonDir + "String_Node_Str" + DEFAULT_DAEMON_RUN_LEVEL_DIR;
  String runLevelDir=_config.getString("String_Node_Str",defaultRunLevelDir);
  _updateRcParser=new UpdateRcParser(_config.getString("String_Node_Str",null),runLevelDir,getName());
  _ksLinks.addAll(_updateRcParser.getStartLinks());
  _ksLinks.addAll(_updateRcParser.getStopLinks());
  _stopTimeout=_config.getInt("String_Node_Str",Constants.DEFAULT_SHUTDOWN_TIMEOUT) * 1000;
}

Fixed version (ground truth):
public void init(){
  if (_name == null) {
    _logger.warning("String_Node_Str");
    return;
  }
  _daemonDir=_config.getString("String_Node_Str",getDefaultDaemonDir());
  File daemonDir=new File(_daemonDir);
  if (!daemonDir.exists() || !daemonDir.isDirectory()) {
    _logger.warning("String_Node_Str" + _daemonDir + "String_Node_Str");
    return;
  }
  _pidDir=_config.getString("String_Node_Str",Constants.DEFAULT_DAEMON_PID_DIR);
  File pidDir=new File(_pidDir);
  if (!pidDir.exists() || !pidDir.isDirectory()) {
    _logger.warning("String_Node_Str" + _pidDir + "String_Node_Str");
    return;
  }
  String wrapperJar=WrapperLoader.getWrapperJar().trim();
  String wrapperHome="String_Node_Str";
  try {
    wrapperHome=new File(wrapperJar).getParentFile().getCanonicalPath();
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  String confFile=_config.getString("String_Node_Str");
  String confDir=null;
  if (confFile != null) {
    File f=new File(confFile);
    if (f.exists())     try {
      confDir=f.getParentFile().getCanonicalPath();
    }
 catch (    IOException e) {
    }
  }
  if (confDir == null)   confDir=wrapperHome + "String_Node_Str";
  if (confFile == null) {
    _logger.warning("String_Node_Str");
    return;
  }
  try {
    _confFile=new File(confFile).getCanonicalPath();
  }
 catch (  IOException e) {
    _logger.throwing(this.getClass().getName(),"String_Node_Str",e);
  }
  _daemonTemplate=_config.getString("String_Node_Str",wrapperHome + "String_Node_Str");
  File daemonTemplate=new File(_daemonTemplate);
  if (!daemonTemplate.exists() || !daemonTemplate.isFile()) {
    if (_logger != null)     _logger.warning("String_Node_Str" + _daemonTemplate + "String_Node_Str");
    return;
  }
  File daemonScript=getDaemonScript();
  if (daemonScript.exists())   if (_logger != null)   _logger.info(daemonScript.getAbsolutePath() + "String_Node_Str");
  String pidName=null;
  try {
    pidName=_config.getString("String_Node_Str",new File(pidDir,"String_Node_Str" + getName() + "String_Node_Str").getCanonicalPath());
  }
 catch (  IOException e) {
    if (_logger != null)     _logger.throwing(this.getClass().getName(),"String_Node_Str",e);
  }
  File pidFile=new File(pidName);
  String apidName=null;
  try {
    apidName=_config.getString("String_Node_Str",new File(pidDir,"String_Node_Str" + getName() + "String_Node_Str").getCanonicalPath());
  }
 catch (  IOException e) {
    if (_logger != null)     _logger.throwing(this.getClass().getName(),"String_Node_Str",e);
  }
  File apidFile=new File(apidName);
  try {
    _daemonTemplate=daemonTemplate.getCanonicalPath();
    _wrapperPidFile=pidFile.getCanonicalPath();
    _appPidFile=apidFile.getCanonicalPath();
    _daemonScript=daemonScript.getCanonicalPath();
  }
 catch (  Exception ex) {
    if (_logger != null)     _logger.throwing(this.getClass().getName(),"String_Node_Str",ex);
  }
  JavaHome javaHome=OperatingSystem.instance().getJavaHome(_config);
  String java=javaHome.findJava();
  _startCmd=new String[10];
  _startCmd[0]=java;
  _startCmd[1]="String_Node_Str" + _wrapperPidFile;
  _startCmd[2]="String_Node_Str";
  _startCmd[3]="String_Node_Str";
  _startCmd[4]=null;
  _startCmd[5]=null;
  _startCmd[6]="String_Node_Str";
  _startCmd[7]=wrapperJar;
  _startCmd[8]="String_Node_Str";
  _startCmd[9]=_confFile;
  _execCmd=_startCmd.clone();
  _execCmd[4]="String_Node_Str";
  _execCmd[8]="String_Node_Str";
  if (_config.getBoolean("String_Node_Str",false)) {
    _execCmd[4]="String_Node_Str";
    _execCmd[5]="String_Node_Str";
  }
  _stopCmd=_startCmd.clone();
  _stopCmd[8]="String_Node_Str";
  _statusCmd=_startCmd.clone();
  _statusCmd[8]="String_Node_Str";
  String defaultRunLevelDir=_daemonDir + "String_Node_Str" + DEFAULT_DAEMON_RUN_LEVEL_DIR;
  if (!new File(defaultRunLevelDir).exists()) {
    defaultRunLevelDir="String_Node_Str" + (isDebian() ? DEFAULT_DAEMON_RUN_LEVEL_DIR_DEBIAN : DEFAULT_DAEMON_RUN_LEVEL_DIR);
  }
  String runLevelDir=_config.getString("String_Node_Str",defaultRunLevelDir);
  _updateRcParser=new UpdateRcParser(_config.getString("String_Node_Str",null),runLevelDir,getName());
  _ksLinks.addAll(_updateRcParser.getStartLinks());
  _ksLinks.addAll(_updateRcParser.getStopLinks());
  _stopTimeout=_config.getInt("String_Node_Str",Constants.DEFAULT_SHUTDOWN_TIMEOUT) * 1000;
}