Program: 42477
Project: 42477
Buggy source:
public JSONArray getKieServerStasus() throws ApsSystemException {
  Map<String,String> headersMap=new HashMap<>();
  JSONArray ServersStatus=new JSONArray();
  String result=null;
  JSONObject json=null;
  HashMap<String,KieBpmConfig> ServerConfigurations=super.getKieServerConfigurations();
  for (  String key : ServerConfigurations.keySet()) {
    this.setKieBpmConfig(ServerConfigurations.get(key));
    try {
      Endpoint ep=KieEndpointDictionary.create().get(API_GET_SERVER_STATUS);
      headersMap.put(HEADER_KEY_ACCEPT,HEADER_VALUE_JSON);
      KieClient client=super.getCurrentClient();
      result=(String)new KieRequestBuilder(client).setEndpoint(ep).setHeaders(headersMap).setDebug(this.getKieBpmConfig().getDebug()).doRequest();
      if (!result.isEmpty()) {
        json=new JSONObject(result);
        JSONObject serverStatusJson=new JSONObject();
        serverStatusJson.put("String_Node_Str",this.getKieBpmConfig().getId());
        serverStatusJson.put("String_Node_Str",json);
        JSONObject serverConfJson=new JSONObject();
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getActive());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getId());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getName());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getUsername());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getPassword());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getHostname());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getPort());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getSchema());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getWebapp());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getTimeoutMsec());
        serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getDebug());
        serverStatusJson.put("String_Node_Str",serverConfJson);
        ServersStatus.put(serverStatusJson);
        logger.debug("String_Node_Str",result);
      }
 else {
        logger.debug("String_Node_Str");
      }
    }
 catch (    Throwable t) {
      JSONObject serverStatusJson=new JSONObject();
      serverStatusJson.put("String_Node_Str",this.getKieBpmConfig().getId());
      serverStatusJson.put("String_Node_Str","String_Node_Str");
      JSONObject serverConfJson=new JSONObject();
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getActive());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getId());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getName());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getUsername());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getPassword());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getHostname());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getPort());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getSchema());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getWebapp());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getTimeoutMsec());
      serverConfJson.put("String_Node_Str",this.getKieBpmConfig().getDebug());
      serverStatusJson.put("String_Node_Str",serverConfJson);
      ServersStatus.put(serverStatusJson);
      logger.debug("String_Node_Str" + t);
    }
  }
  return ServersStatus;
}

Fixed version (ground truth):
public JSONArray getKieServerStasus() throws ApsSystemException {
  KieBpmConfig setKieBpmConfig=super.getConfig();
  Map<String,String> headersMap=new HashMap<>();
  JSONArray ServersStatus=new JSONArray();
  String result=null;
  JSONObject json=null;
  HashMap<String,KieBpmConfig> ServerConfigurations=super.getKieServerConfigurations();
  for (  String key : ServerConfigurations.keySet()) {
    super.setConfig(ServerConfigurations.get(key));
    try {
      Endpoint ep=KieEndpointDictionary.create().get(API_GET_SERVER_STATUS);
      headersMap.put(HEADER_KEY_ACCEPT,HEADER_VALUE_JSON);
      KieClient client=super.getCurrentClient();
      result=(String)new KieRequestBuilder(client).setEndpoint(ep).setHeaders(headersMap).setDebug(super.getConfig().getDebug()).doRequest();
      if (!result.isEmpty()) {
        json=new JSONObject(result);
        JSONObject serverStatusJson=new JSONObject();
        serverStatusJson.put("String_Node_Str",super.getConfig().getId());
        serverStatusJson.put("String_Node_Str",json);
        JSONObject serverConfJson=new JSONObject();
        serverConfJson.put("String_Node_Str",super.getConfig().getActive());
        serverConfJson.put("String_Node_Str",super.getConfig().getId());
        serverConfJson.put("String_Node_Str",super.getConfig().getName());
        serverConfJson.put("String_Node_Str",super.getConfig().getUsername());
        serverConfJson.put("String_Node_Str",super.getConfig().getPassword());
        serverConfJson.put("String_Node_Str",super.getConfig().getHostname());
        serverConfJson.put("String_Node_Str",super.getConfig().getPort());
        serverConfJson.put("String_Node_Str",super.getConfig().getSchema());
        serverConfJson.put("String_Node_Str",super.getConfig().getWebapp());
        serverConfJson.put("String_Node_Str",super.getConfig().getTimeoutMsec());
        serverConfJson.put("String_Node_Str",super.getConfig().getDebug());
        serverStatusJson.put("String_Node_Str",serverConfJson);
        ServersStatus.put(serverStatusJson);
        logger.debug("String_Node_Str",result);
      }
 else {
        logger.debug("String_Node_Str");
      }
    }
 catch (    Throwable t) {
      JSONObject serverStatusJson=new JSONObject();
      serverStatusJson.put("String_Node_Str",super.getConfig().getId());
      serverStatusJson.put("String_Node_Str","String_Node_Str");
      JSONObject serverConfJson=new JSONObject();
      serverConfJson.put("String_Node_Str",super.getConfig().getActive());
      serverConfJson.put("String_Node_Str",super.getConfig().getId());
      serverConfJson.put("String_Node_Str",super.getConfig().getName());
      serverConfJson.put("String_Node_Str",super.getConfig().getUsername());
      serverConfJson.put("String_Node_Str",super.getConfig().getPassword());
      serverConfJson.put("String_Node_Str",super.getConfig().getHostname());
      serverConfJson.put("String_Node_Str",super.getConfig().getPort());
      serverConfJson.put("String_Node_Str",super.getConfig().getSchema());
      serverConfJson.put("String_Node_Str",super.getConfig().getWebapp());
      serverConfJson.put("String_Node_Str",super.getConfig().getTimeoutMsec());
      serverConfJson.put("String_Node_Str",super.getConfig().getDebug());
      serverStatusJson.put("String_Node_Str",serverConfJson);
      ServersStatus.put(serverStatusJson);
      logger.debug("String_Node_Str" + t);
    }
  }
  super.setConfig(setKieBpmConfig);
  return ServersStatus;
}