Program: 50608
Project: 50608
Buggy source:
@Override public void prepareConfigObject(@NotNull BuildConfiguration buildConfiguration){
  super.prepareConfigObject(buildConfiguration);
  log.debug("String_Node_Str");
  String strHostName=buildConfiguration.getString(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME,"String_Node_Str").trim();
  buildConfiguration.setProperty(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME,strHostName);
  String strPort=buildConfiguration.getString(REPOSITORY_GERRIT_REPOSITORY_PORT,"String_Node_Str").trim();
  buildConfiguration.setProperty(REPOSITORY_GERRIT_REPOSITORY_PORT,strPort);
  String strProject=buildConfiguration.getString(REPOSITORY_GERRIT_PROJECT,"String_Node_Str").trim();
  buildConfiguration.setProperty(REPOSITORY_GERRIT_PROJECT,strProject);
  String strUserName=buildConfiguration.getString(REPOSITORY_GERRIT_USERNAME,"String_Node_Str").trim();
  buildConfiguration.setProperty(REPOSITORY_GERRIT_USERNAME,strUserName);
  String strPhrase=buildConfiguration.getString(TEMPORARY_GERRIT_SSH_PASSPHRASE);
  if (buildConfiguration.getBoolean(TEMPORARY_GERRIT_SSH_PASSPHRASE_CHANGE)) {
    buildConfiguration.setProperty(REPOSITORY_GERRIT_SSH_PASSPHRASE,encryptionService.encrypt(strPhrase));
  }
  String decryptedKey="String_Node_Str";
  if (buildConfiguration.getBoolean(TEMPORARY_GERRIT_SSH_KEY_CHANGE)) {
    final Object o=buildConfiguration.getProperty(TEMPORARY_GERRIT_SSH_KEY_FROM_FILE);
    if (o instanceof File) {
      File f=(File)o;
      try {
        decryptedKey=FileUtils.readFileToString(f);
      }
 catch (      IOException e) {
        log.error(textProvider.getText("String_Node_Str"),e);
        return;
      }
      buildConfiguration.setProperty(REPOSITORY_GERRIT_SSH_KEY,encryptionService.encrypt(decryptedKey));
    }
 else {
      buildConfiguration.clearProperty(REPOSITORY_GERRIT_SSH_KEY);
    }
  }
 else {
    decryptedKey=encryptionService.decrypt(buildConfiguration.getString(REPOSITORY_GERRIT_SSH_KEY,"String_Node_Str"));
  }
  relativeConfigPath=this.getRelativeConfigDirectory(buildConfiguration);
  buildConfiguration.setProperty(REPOSITORY_GERRIT_CONFIG_DIR,relativeConfigPath);
  relativeSSHKeyFilePath=getRelativeRepoPath(buildConfiguration);
  File f=prepareSSHKeyFile(relativeSSHKeyFilePath,decryptedKey);
  if (f != null) {
    buildConfiguration.setProperty(REPOSITORY_GERRIT_SSH_KEY_FILE,relativeSSHKeyFilePath);
  }
}

Fixed version (ground truth):
@Override public void prepareConfigObject(@NotNull BuildConfiguration buildConfiguration){
  super.prepareConfigObject(buildConfiguration);
  log.debug("String_Node_Str");
  String strHostName=buildConfiguration.getString(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME,"String_Node_Str").trim();
  buildConfiguration.setProperty(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME,strHostName);
  String strPort=buildConfiguration.getString(REPOSITORY_GERRIT_REPOSITORY_PORT,"String_Node_Str").trim();
  buildConfiguration.setProperty(REPOSITORY_GERRIT_REPOSITORY_PORT,strPort);
  String strProject=buildConfiguration.getString(REPOSITORY_GERRIT_PROJECT,"String_Node_Str").trim();
  buildConfiguration.setProperty(REPOSITORY_GERRIT_PROJECT,strProject);
  String strUserName=buildConfiguration.getString(REPOSITORY_GERRIT_USERNAME,"String_Node_Str").trim();
  buildConfiguration.setProperty(REPOSITORY_GERRIT_USERNAME,strUserName);
  String strPhrase=buildConfiguration.getString(TEMPORARY_GERRIT_SSH_PASSPHRASE);
  if (buildConfiguration.getBoolean(TEMPORARY_GERRIT_SSH_PASSPHRASE_CHANGE)) {
    buildConfiguration.setProperty(REPOSITORY_GERRIT_SSH_PASSPHRASE,encryptionService.encrypt(strPhrase));
  }
  String decryptedKey="String_Node_Str";
  if (buildConfiguration.getBoolean(TEMPORARY_GERRIT_SSH_KEY_CHANGE)) {
    final Object o=buildConfiguration.getProperty(TEMPORARY_GERRIT_SSH_KEY_FROM_FILE);
    if (o instanceof File) {
      File f=(File)o;
      try {
        decryptedKey=FileUtils.readFileToString(f);
      }
 catch (      IOException e) {
        log.error(textProvider.getText("String_Node_Str"),e);
        return;
      }
      buildConfiguration.setProperty(REPOSITORY_GERRIT_SSH_KEY,encryptionService.encrypt(decryptedKey));
    }
 else {
      buildConfiguration.clearProperty(REPOSITORY_GERRIT_SSH_KEY);
    }
  }
 else {
    decryptedKey=encryptionService.decrypt(buildConfiguration.getString(REPOSITORY_GERRIT_SSH_KEY,"String_Node_Str"));
  }
  relativeConfigPath=this.getRelativeConfigDirectory(buildConfiguration);
  buildConfiguration.setProperty(REPOSITORY_GERRIT_CONFIG_DIR,relativeConfigPath);
  relativeSSHKeyFilePath=getRelativeRepoPath(buildConfiguration);
  File f=prepareSSHKeyFile(relativeSSHKeyFilePath,decryptedKey);
  if (f != null) {
    buildConfiguration.setProperty(REPOSITORY_GERRIT_SSH_KEY_FILE,relativeSSHKeyFilePath);
  }
  String strDefBranch=buildConfiguration.getString(REPOSITORY_GERRIT_DEFAULT_BRANCH,"String_Node_Str");
  String strCustBranch=buildConfiguration.getString(REPOSITORY_GERRIT_CUSTOM_BRANCH,"String_Node_Str");
  if (strDefBranch.equals(MASTER_BRANCH.getName()) || strDefBranch.equals(ALL_BRANCH.getName())) {
    buildConfiguration.setProperty(REPOSITORY_GERRIT_DEFAULT_BRANCH,strDefBranch);
    buildConfiguration.setProperty(REPOSITORY_GERRIT_CUSTOM_BRANCH,strDefBranch);
    buildConfiguration.setProperty(REPOSITORY_GERRIT_BRANCH,strDefBranch);
  }
 else {
    buildConfiguration.setProperty(REPOSITORY_GERRIT_DEFAULT_BRANCH,CUSTOM_BRANCH_SET);
    buildConfiguration.setProperty(REPOSITORY_GERRIT_CUSTOM_BRANCH,strCustBranch);
    buildConfiguration.setProperty(REPOSITORY_GERRIT_BRANCH,strCustBranch);
  }
}