Program: 50609
Project: 50609
Buggy source:
@Override public void populateFromConfig(HierarchicalConfiguration config){
  super.populateFromConfig(config);
  hostname=StringUtils.trimToEmpty(config.getString(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME));
  username=config.getString(REPOSITORY_GERRIT_USERNAME);
  userEmail=config.getString(REPOSITORY_GERRIT_EMAIL);
  sshKey=config.getString(REPOSITORY_GERRIT_SSH_KEY,"String_Node_Str");
  sshPassphrase=encryptionService.decrypt(config.getString(REPOSITORY_GERRIT_SSH_PASSPHRASE));
  port=config.getInt(REPOSITORY_GERRIT_REPOSITORY_PORT,29418);
  project=config.getString(REPOSITORY_GERRIT_PROJECT);
  String strBranch=config.getString(REPOSITORY_GERRIT_BRANCH,"String_Node_Str");
  if (StringUtils.isEmpty(strBranch)) {
    vcsBranch=DEFAULT_BRANCH;
  }
 else {
    vcsBranch=new VcsBranchImpl(strBranch);
  }
  useShallowClones=config.getBoolean(REPOSITORY_GERRIT_USE_SHALLOW_CLONES);
  useSubmodules=config.getBoolean(REPOSITORY_GERRIT_USE_SUBMODULES);
  commandTimeout=config.getInt(REPOSITORY_GERRIT_COMMAND_TIMEOUT,DEFAULT_COMMAND_TIMEOUT_IN_MINUTES);
  verboseLogs=config.getBoolean(REPOSITORY_GERRIT_VERBOSE_LOGS,false);
  String gitRepoUrl="String_Node_Str" + username + "String_Node_Str"+ hostname+ "String_Node_Str"+ port+ "String_Node_Str"+ project;
  String tmpCP=config.getString(REPOSITORY_GERRIT_CONFIG_DIR);
  if (tmpCP == null || tmpCP.isEmpty()) {
    tmpCP=GerritService.SYSTEM_DIRECTORY + File.separator + GerritService.CONFIG_DIRECTORY;
  }
  relativeConfigPath=tmpCP.replace("String_Node_Str","String_Node_Str");
  absConfigPath=prepareConfigDir(relativeConfigPath).getAbsolutePath();
  String tmpSSHKFP=config.getString(REPOSITORY_GERRIT_SSH_KEY_FILE);
  if (tmpSSHKFP == null || tmpSSHKFP.isEmpty()) {
    tmpSSHKFP=GerritService.SYSTEM_DIRECTORY + File.separator + GerritService.CONFIG_DIRECTORY;
  }
  relativeSSHKeyFilePath=tmpSSHKFP.replace("String_Node_Str","String_Node_Str");
  String decryptedKey=encryptionService.decrypt(sshKey);
  sshKeyFile=prepareSSHKeyFile(relativeSSHKeyFilePath,decryptedKey);
  gc.setHost(hostname);
  gc.setPort(port);
  gc.setRepositoryUrl(gitRepoUrl);
  gc.setWorkingDirectory(absConfigPath);
  gc.setSshKeyFile(sshKeyFile);
  gc.setSshKey(decryptedKey);
  gc.setSshPassphrase(sshPassphrase);
  gc.setUsername(username);
  gc.setUserEmail(userEmail);
  gc.setUseShallowClones(useShallowClones);
  gc.setUseSubmodules(useSubmodules);
  gc.setVerboseLogs(verboseLogs);
  gc.setCommandTimeout(commandTimeout);
  try {
    initializeGerritService();
  }
 catch (  RepositoryException e) {
    log.error(e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void populateFromConfig(HierarchicalConfiguration config){
  super.populateFromConfig(config);
  hostname=StringUtils.trimToEmpty(config.getString(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME));
  username=config.getString(REPOSITORY_GERRIT_USERNAME);
  userEmail=config.getString(REPOSITORY_GERRIT_EMAIL);
  sshKey=config.getString(REPOSITORY_GERRIT_SSH_KEY,"String_Node_Str");
  sshPassphrase=encryptionService.decrypt(config.getString(REPOSITORY_GERRIT_SSH_PASSPHRASE));
  port=config.getInt(REPOSITORY_GERRIT_REPOSITORY_PORT,29418);
  project=config.getString(REPOSITORY_GERRIT_PROJECT);
  String strDefBranch=config.getString(REPOSITORY_GERRIT_DEFAULT_BRANCH,"String_Node_Str");
  String strCustBranch=config.getString(REPOSITORY_GERRIT_CUSTOM_BRANCH,"String_Node_Str");
  if (strDefBranch.equals(MASTER_BRANCH.getName()) || strDefBranch.equals(ALL_BRANCH.getName())) {
    vcsBranch=new VcsBranchImpl(strDefBranch);
  }
 else {
    vcsBranch=new VcsBranchImpl(strCustBranch);
  }
  useShallowClones=config.getBoolean(REPOSITORY_GERRIT_USE_SHALLOW_CLONES);
  useSubmodules=config.getBoolean(REPOSITORY_GERRIT_USE_SUBMODULES);
  commandTimeout=config.getInt(REPOSITORY_GERRIT_COMMAND_TIMEOUT,DEFAULT_COMMAND_TIMEOUT_IN_MINUTES);
  verboseLogs=config.getBoolean(REPOSITORY_GERRIT_VERBOSE_LOGS,false);
  String gitRepoUrl="String_Node_Str" + username + "String_Node_Str"+ hostname+ "String_Node_Str"+ port+ "String_Node_Str"+ project;
  String tmpCP=config.getString(REPOSITORY_GERRIT_CONFIG_DIR);
  if (tmpCP == null || tmpCP.isEmpty()) {
    tmpCP=GerritService.SYSTEM_DIRECTORY + File.separator + GerritService.CONFIG_DIRECTORY;
  }
  relativeConfigPath=tmpCP.replace("String_Node_Str","String_Node_Str");
  absConfigPath=prepareConfigDir(relativeConfigPath).getAbsolutePath();
  String tmpSSHKFP=config.getString(REPOSITORY_GERRIT_SSH_KEY_FILE);
  if (tmpSSHKFP == null || tmpSSHKFP.isEmpty()) {
    tmpSSHKFP=GerritService.SYSTEM_DIRECTORY + File.separator + GerritService.CONFIG_DIRECTORY;
  }
  relativeSSHKeyFilePath=tmpSSHKFP.replace("String_Node_Str","String_Node_Str");
  String decryptedKey=encryptionService.decrypt(sshKey);
  sshKeyFile=prepareSSHKeyFile(relativeSSHKeyFilePath,decryptedKey);
  gc.setHost(hostname);
  gc.setPort(port);
  gc.setRepositoryUrl(gitRepoUrl);
  gc.setWorkingDirectory(absConfigPath);
  gc.setSshKeyFile(sshKeyFile);
  gc.setSshKey(decryptedKey);
  gc.setSshPassphrase(sshPassphrase);
  gc.setUsername(username);
  gc.setUserEmail(userEmail);
  gc.setUseShallowClones(useShallowClones);
  gc.setUseSubmodules(useSubmodules);
  gc.setVerboseLogs(verboseLogs);
  gc.setCommandTimeout(commandTimeout);
  try {
    initializeGerritService();
  }
 catch (  RepositoryException e) {
    log.error(e.getMessage());
  }
}