Program: 89710
Project: 89710
Buggy source:
/** 
 * Create FTPClient and log on to ftp-server, if not already connected to ftp-server.  Attempts to set binary mode and passive mode.
 */
private void logOn(){
  if (currentFTPClient != null && currentFTPClient.isConnected()) {
    return;
  }
 else {
    currentFTPClient=new FTPClient();
  }
  log.trace("String_Node_Str" + ftpUserName + "String_Node_Str"+ ftpUserPassword.replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ ftpServerName+ "String_Node_Str"+ ftpServerPort);
  try {
    currentFTPClient.connect(ftpServerName,ftpServerPort);
    if (!currentFTPClient.login(ftpUserName,ftpUserPassword)) {
      final String message="String_Node_Str" + SystemUtils.getLocalHostName() + "String_Node_Str"+ ftpServerName+ "String_Node_Str"+ ftpServerPort+ "String_Node_Str"+ ftpUserName+ "String_Node_Str"+ ftpUserPassword.replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ getFtpErrorMessage();
      log.warn(message);
      throw new IOFailure(message);
    }
    if (!currentFTPClient.setFileType(FTPClient.BINARY_FILE_TYPE)) {
      final String message="String_Node_Str" + ftpServerName + "String_Node_Str"+ getFtpErrorMessage();
      log.warn(message);
      throw new IOFailure(message);
    }
    currentFTPClient.enterLocalPassiveMode();
  }
 catch (  IOException e) {
    final String msg="String_Node_Str" + ftpServerName + "String_Node_Str"+ SystemUtils.getLocalHostName()+ "String_Node_Str";
    log.warn(msg,e);
    throw new IOFailure(msg,e);
  }
  log.debug("String_Node_Str" + ftpUserName + "String_Node_Str"+ ftpUserPassword.replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ ftpServerName+ "String_Node_Str"+ ftpServerPort);
}

Fixed version (ground truth):
/** 
 * Create FTPClient and log on to ftp-server, if not already connected to ftp-server.  Attempts to set binary mode and passive mode.
 */
private void logOn(){
  if (currentFTPClient != null && currentFTPClient.isConnected()) {
    return;
  }
 else {
    currentFTPClient=new FTPClient();
  }
  log.trace("String_Node_Str" + ftpUserName + "String_Node_Str"+ ftpUserPassword.replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ ftpServerName+ "String_Node_Str"+ ftpServerPort);
  try {
    currentFTPClient.connect(ftpServerName,ftpServerPort);
    if (!currentFTPClient.login(ftpUserName,ftpUserPassword)) {
      final String message="String_Node_Str" + SystemUtils.getLocalHostName() + "String_Node_Str"+ ftpServerName+ "String_Node_Str"+ ftpServerPort+ "String_Node_Str"+ ftpUserName+ "String_Node_Str"+ ftpUserPassword.replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ getFtpErrorMessage();
      log.warn(message);
      throw new IOFailure(message);
    }
    if (!currentFTPClient.setFileType(FTPClient.BINARY_FILE_TYPE)) {
      final String message="String_Node_Str" + ftpServerName + "String_Node_Str"+ getFtpErrorMessage();
      log.warn(message);
      throw new IOFailure(message);
    }
    currentFTPClient.enterLocalPassiveMode();
    log.debug("String_Node_Str" + currentFTPClient.getDefaultTimeout());
    log.debug("String_Node_Str" + currentFTPClient.getConnectTimeout());
  }
 catch (  IOException e) {
    final String msg="String_Node_Str" + ftpServerName + "String_Node_Str"+ SystemUtils.getLocalHostName()+ "String_Node_Str";
    log.warn(msg,e);
    throw new IOFailure(msg,e);
  }
  log.debug("String_Node_Str" + ftpUserName + "String_Node_Str"+ ftpUserPassword.replaceAll("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ ftpServerName+ "String_Node_Str"+ ftpServerPort);
}