Program: 178663
Project: 178663
Buggy source:
public void perform(Run<?,?> build,EnvVars envVars,FilePath workspace,Launcher launcher,TaskListener listener) throws AbortException {
  KlocworkLogger logger=new KlocworkLogger("String_Node_Str",listener.getLogger());
  if (gatewayConfig.getEnableServerGateway()) {
    logger.logMessage("String_Node_Str");
    for (    KlocworkGatewayServerConfig pfConfig : gatewayConfig.getGatewayServerConfigs()) {
      String request="String_Node_Str" + envVars.get(KlocworkConstants.KLOCWORK_PROJECT);
      if (!StringUtils.isEmpty(pfConfig.getQuery())) {
        try {
          request+="String_Node_Str" + URLEncoder.encode(pfConfig.getQuery(),"String_Node_Str");
        }
 catch (        UnsupportedEncodingException ex) {
          throw new AbortException(ex.getMessage());
        }
      }
      logger.logMessage("String_Node_Str" + pfConfig.getConditionName());
      logger.logMessage("String_Node_Str" + request);
      JSONArray response;
      try {
        String[] ltokenLine=KlocworkUtil.getLtokenValues(envVars,launcher);
        KlocworkApiConnection kwService=new KlocworkApiConnection(envVars.get(KlocworkConstants.KLOCWORK_URL),ltokenLine[KlocworkConstants.LTOKEN_USER_INDEX],ltokenLine[KlocworkConstants.LTOKEN_HASH_INDEX]);
        response=kwService.sendRequest(request);
      }
 catch (      IOException ex) {
        throw new AbortException("String_Node_Str" + "String_Node_Str" + ex.getMessage());
      }
      logger.logMessage("String_Node_Str" + Integer.toString(response.size()));
      logger.logMessage("String_Node_Str" + pfConfig.getThreshold());
      if (response.size() >= Integer.parseInt(pfConfig.getThreshold())) {
        logger.logMessage("String_Node_Str");
        build.setResult(pfConfig.getResultValue());
      }
      for (int i=0; i < response.size(); i++) {
        JSONObject jObj=response.getJSONObject(i);
        logger.logMessage(jObj.toString());
      }
    }
  }
  if (gatewayConfig.getEnableDesktopGateway()) {
    logger.logMessage("String_Node_Str");
    String xmlReport=envVars.expand(KlocworkUtil.getDefaultKwcheckReportFile(gatewayConfig.getGatewayDesktopConfig().getReportFile()));
    logger.logMessage("String_Node_Str" + xmlReport);
    try {
      int totalIssueCount=launcher.getChannel().call(new KlocworkXMLReportParser(workspace.getRemote(),xmlReport));
      logger.logMessage("String_Node_Str" + Integer.toString(totalIssueCount));
      logger.logMessage("String_Node_Str" + gatewayConfig.getGatewayDesktopConfig().getThreshold());
      if (totalIssueCount >= Integer.parseInt(gatewayConfig.getGatewayDesktopConfig().getThreshold())) {
        logger.logMessage("String_Node_Str");
        build.setResult(Result.FAILURE);
      }
    }
 catch (    InterruptedException|IOException ex) {
      throw new AbortException(ex.getMessage());
    }
  }
}

Fixed version (ground truth):
public void perform(Run<?,?> build,EnvVars envVars,FilePath workspace,Launcher launcher,TaskListener listener) throws AbortException {
  KlocworkLogger logger=new KlocworkLogger("String_Node_Str",listener.getLogger());
  if (gatewayConfig.getEnableServerGateway()) {
    logger.logMessage("String_Node_Str");
    for (    KlocworkGatewayServerConfig pfConfig : gatewayConfig.getGatewayServerConfigs()) {
      String request="String_Node_Str" + envVars.get(KlocworkConstants.KLOCWORK_PROJECT);
      if (!StringUtils.isEmpty(pfConfig.getQuery())) {
        try {
          request+="String_Node_Str";
          if (!pfConfig.getQuery().toLowerCase().contains("String_Node_Str") && !pfConfig.getQuery().toLowerCase().contains("String_Node_Str")) {
            request+="String_Node_Str";
          }
          request+=URLEncoder.encode(pfConfig.getQuery(),"String_Node_Str");
        }
 catch (        UnsupportedEncodingException ex) {
          throw new AbortException(ex.getMessage());
        }
      }
      logger.logMessage("String_Node_Str" + pfConfig.getConditionName());
      logger.logMessage("String_Node_Str" + request);
      JSONArray response;
      try {
        String[] ltokenLine=KlocworkUtil.getLtokenValues(envVars,launcher);
        KlocworkApiConnection kwService=new KlocworkApiConnection(envVars.get(KlocworkConstants.KLOCWORK_URL),ltokenLine[KlocworkConstants.LTOKEN_USER_INDEX],ltokenLine[KlocworkConstants.LTOKEN_HASH_INDEX]);
        response=kwService.sendRequest(request);
      }
 catch (      IOException ex) {
        throw new AbortException("String_Node_Str" + "String_Node_Str" + ex.getMessage());
      }
      logger.logMessage("String_Node_Str" + Integer.toString(response.size()));
      logger.logMessage("String_Node_Str" + pfConfig.getThreshold());
      if (response.size() >= Integer.parseInt(pfConfig.getThreshold())) {
        logger.logMessage("String_Node_Str");
        build.setResult(pfConfig.getResultValue());
      }
      for (int i=0; i < response.size(); i++) {
        JSONObject jObj=response.getJSONObject(i);
        logger.logMessage(jObj.toString());
      }
    }
  }
  if (gatewayConfig.getEnableDesktopGateway()) {
    logger.logMessage("String_Node_Str");
    String xmlReport=envVars.expand(KlocworkUtil.getDefaultKwcheckReportFile(gatewayConfig.getGatewayDesktopConfig().getReportFile()));
    logger.logMessage("String_Node_Str" + xmlReport);
    try {
      int totalIssueCount=launcher.getChannel().call(new KlocworkXMLReportParser(workspace.getRemote(),xmlReport));
      logger.logMessage("String_Node_Str" + Integer.toString(totalIssueCount));
      logger.logMessage("String_Node_Str" + gatewayConfig.getGatewayDesktopConfig().getThreshold());
      if (totalIssueCount >= Integer.parseInt(gatewayConfig.getGatewayDesktopConfig().getThreshold())) {
        logger.logMessage("String_Node_Str");
        build.setResult(Result.FAILURE);
      }
    }
 catch (    InterruptedException|IOException ex) {
      throw new AbortException(ex.getMessage());
    }
  }
}