Program: 178667
Project: 178667
Buggy source:
@Override public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener) throws AbortException {
  KlocworkLogger logger=new KlocworkLogger("String_Node_Str",listener.getLogger());
  EnvVars envVars=null;
  try {
    envVars=build.getEnvironment(listener);
  }
 catch (  IOException|InterruptedException ex) {
    throw new AbortException(ex.getMessage());
  }
  if (enableServerGateway) {
    logger.logMessage("String_Node_Str");
    for (    KlocworkPassFailConfig pfConfig : passFailConfigs) {
      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(KlocworkUtil.getAndExpandEnvVar(envVars,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()));
      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 (enableDesktopGateway) {
    logger.logMessage("String_Node_Str");
    KlocworkDesktopBuilder desktopBuilder=(KlocworkDesktopBuilder)KlocworkUtil.getInstanceOfBuilder(KlocworkDesktopBuilder.class,build);
    if (desktopBuilder == null) {
      throw new AbortException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    String xmlReport=desktopBuilder.getDesktopConfig().getKwcheckReportFile(envVars);
    logger.logMessage("String_Node_Str" + xmlReport);
    try {
      int totalIssueCount=launcher.getChannel().call(new KlocworkXMLReportParser(build.getWorkspace().getRemote(),xmlReport));
      logger.logMessage("String_Node_Str" + Integer.toString(totalIssueCount));
      logger.logMessage("String_Node_Str" + desktopGateway.getThreshold());
      if (totalIssueCount >= Integer.parseInt(desktopGateway.getThreshold())) {
        logger.logMessage("String_Node_Str");
        build.setResult(Result.FAILURE);
      }
    }
 catch (    InterruptedException|IOException ex) {
      throw new AbortException(ex.getMessage());
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener) throws AbortException {
  KlocworkLogger logger=new KlocworkLogger("String_Node_Str",listener.getLogger());
  EnvVars envVars=null;
  try {
    envVars=build.getEnvironment(listener);
  }
 catch (  IOException|InterruptedException ex) {
    throw new AbortException(ex.getMessage());
  }
  if (enableServerGateway) {
    logger.logMessage("String_Node_Str");
    for (    KlocworkPassFailConfig pfConfig : passFailConfigs) {
      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(KlocworkUtil.getAndExpandEnvVar(envVars,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()));
      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 (enableDesktopGateway) {
    logger.logMessage("String_Node_Str");
    KlocworkDesktopBuilder desktopBuilder=(KlocworkDesktopBuilder)KlocworkUtil.getInstanceOfBuilder(KlocworkDesktopBuilder.class,build);
    if (desktopBuilder == null) {
      throw new AbortException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    }
    if (desktopBuilder.isAnalysisSkipped()) {
      return true;
    }
    String xmlReport=desktopBuilder.getDesktopConfig().getKwcheckReportFile(envVars);
    logger.logMessage("String_Node_Str" + xmlReport);
    try {
      int totalIssueCount=launcher.getChannel().call(new KlocworkXMLReportParser(build.getWorkspace().getRemote(),xmlReport));
      logger.logMessage("String_Node_Str" + Integer.toString(totalIssueCount));
      logger.logMessage("String_Node_Str" + desktopGateway.getThreshold());
      if (totalIssueCount >= Integer.parseInt(desktopGateway.getThreshold())) {
        logger.logMessage("String_Node_Str");
        build.setResult(Result.FAILURE);
      }
    }
 catch (    InterruptedException|IOException ex) {
      throw new AbortException(ex.getMessage());
    }
  }
  return true;
}