Program: 105989
Project: 105989
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public String handleRequest(Map params,String responseType,StringBuffer auditTrailSb) throws ServerApiException {
  String response=null;
  String[] command=null;
  try {
    command=(String[])params.get("String_Node_Str");
    if (command == null) {
      s_logger.error("String_Node_Str");
      if (s_logger.isTraceEnabled()) {
        s_logger.trace("String_Node_Str");
        for (        Object key : params.keySet()) {
          String keyStr=(String)key;
          String[] value=(String[])params.get(key);
          s_logger.trace("String_Node_Str" + keyStr + "String_Node_Str"+ ((value == null) ? "String_Node_Str" : value[0]));
        }
      }
      throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR,"String_Node_Str");
    }
 else {
      Map<String,String> paramMap=new HashMap<String,String>();
      Set keys=params.keySet();
      Iterator keysIter=keys.iterator();
      while (keysIter.hasNext()) {
        String key=(String)keysIter.next();
        if ("String_Node_Str".equalsIgnoreCase(key)) {
          continue;
        }
        String[] value=(String[])params.get(key);
        if (value[0] != null) {
          Pattern pattern=Pattern.compile(controlCharacters);
          Matcher matcher=pattern.matcher(value[0]);
          if (matcher.find()) {
            throw new ServerApiException(ApiErrorCode.PARAM_ERROR,"String_Node_Str" + value[0] + "String_Node_Str"+ key+ "String_Node_Str");
          }
        }
        paramMap.put(key,value[0]);
      }
      Class<?> cmdClass=getCmdClass(command[0]);
      if (cmdClass != null) {
        BaseCmd cmdObj=(BaseCmd)cmdClass.newInstance();
        cmdObj=ComponentContext.inject(cmdObj);
        cmdObj.configure();
        cmdObj.setFullUrlParams(paramMap);
        cmdObj.setResponseType(responseType);
        cmdObj.setHttpMethod(paramMap.get("String_Node_Str").toString());
        response=queueCommand(cmdObj,paramMap);
        buildAuditTrail(auditTrailSb,command[0],response);
      }
 else {
        if (!command[0].equalsIgnoreCase("String_Node_Str") && !command[0].equalsIgnoreCase("String_Node_Str")) {
          String errorString="String_Node_Str" + ((command == null) ? "String_Node_Str" : command[0]);
          s_logger.warn(errorString);
          auditTrailSb.append("String_Node_Str" + errorString);
          throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR,errorString);
        }
      }
    }
  }
 catch (  InvalidParameterValueException ex) {
    s_logger.info(ex.getMessage());
    throw new ServerApiException(ApiErrorCode.PARAM_ERROR,ex.getMessage(),ex);
  }
catch (  IllegalArgumentException ex) {
    s_logger.info(ex.getMessage());
    throw new ServerApiException(ApiErrorCode.PARAM_ERROR,ex.getMessage(),ex);
  }
catch (  PermissionDeniedException ex) {
    ArrayList<ExceptionProxyObject> idList=ex.getIdProxyList();
    if (idList != null) {
      StringBuffer buf=new StringBuffer();
      for (      ExceptionProxyObject obj : idList) {
        buf.append(obj.getDescription());
        buf.append("String_Node_Str");
        buf.append(obj.getUuid());
        buf.append("String_Node_Str");
      }
      s_logger.info("String_Node_Str" + ex.getMessage() + "String_Node_Str"+ buf.toString()+ "String_Node_Str");
    }
 else {
      s_logger.info("String_Node_Str" + ex.getMessage());
    }
    throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR,ex.getMessage(),ex);
  }
catch (  AccountLimitException ex) {
    s_logger.info(ex.getMessage());
    throw new ServerApiException(ApiErrorCode.ACCOUNT_RESOURCE_LIMIT_ERROR,ex.getMessage(),ex);
  }
catch (  InsufficientCapacityException ex) {
    s_logger.info(ex.getMessage());
    String errorMsg=ex.getMessage();
    if (CallContext.current().getCallingAccount().getType() != Account.ACCOUNT_TYPE_ADMIN) {
      errorMsg=BaseCmd.USER_ERROR_MESSAGE;
    }
    throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR,errorMsg,ex);
  }
catch (  ResourceAllocationException ex) {
    s_logger.info(ex.getMessage());
    throw new ServerApiException(ApiErrorCode.RESOURCE_ALLOCATION_ERROR,ex.getMessage(),ex);
  }
catch (  ResourceUnavailableException ex) {
    s_logger.info(ex.getMessage());
    String errorMsg=ex.getMessage();
    if (CallContext.current().getCallingAccount().getType() != Account.ACCOUNT_TYPE_ADMIN) {
      errorMsg=BaseCmd.USER_ERROR_MESSAGE;
    }
    throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR,errorMsg,ex);
  }
catch (  ServerApiException ex) {
    s_logger.info(ex.getDescription());
    throw ex;
  }
catch (  Exception ex) {
    s_logger.error("String_Node_Str" + ((command == null) ? "String_Node_Str" : command[0]),ex);
    String errorMsg=ex.getMessage();
    if (CallContext.current().getCallingAccount().getType() != Account.ACCOUNT_TYPE_ADMIN) {
      errorMsg=BaseCmd.USER_ERROR_MESSAGE;
    }
    throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,errorMsg,ex);
  }
  return response;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public String handleRequest(Map params,String responseType,StringBuffer auditTrailSb) throws ServerApiException {
  String response=null;
  String[] command=null;
  try {
    command=(String[])params.get("String_Node_Str");
    if (command == null) {
      s_logger.error("String_Node_Str");
      if (s_logger.isTraceEnabled()) {
        s_logger.trace("String_Node_Str");
        for (        Object key : params.keySet()) {
          String keyStr=(String)key;
          String[] value=(String[])params.get(key);
          s_logger.trace("String_Node_Str" + keyStr + "String_Node_Str"+ ((value == null) ? "String_Node_Str" : value[0]));
        }
      }
      throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR,"String_Node_Str");
    }
 else {
      Map<String,String> paramMap=new HashMap<String,String>();
      Set keys=params.keySet();
      Iterator keysIter=keys.iterator();
      while (keysIter.hasNext()) {
        String key=(String)keysIter.next();
        if ("String_Node_Str".equalsIgnoreCase(key)) {
          continue;
        }
        String[] value=(String[])params.get(key);
        if (value[0] != null) {
          Pattern pattern=Pattern.compile(controlCharacters);
          Matcher matcher=pattern.matcher(value[0]);
          if (matcher.find()) {
            throw new ServerApiException(ApiErrorCode.PARAM_ERROR,"String_Node_Str" + value[0] + "String_Node_Str"+ key+ "String_Node_Str");
          }
        }
        paramMap.put(key,value[0]);
      }
      Class<?> cmdClass=getCmdClass(command[0]);
      if (cmdClass != null) {
        BaseCmd cmdObj=(BaseCmd)cmdClass.newInstance();
        cmdObj=ComponentContext.inject(cmdObj);
        cmdObj.configure();
        cmdObj.setFullUrlParams(paramMap);
        cmdObj.setResponseType(responseType);
        cmdObj.setHttpMethod(paramMap.get("String_Node_Str").toString());
        response=queueCommand(cmdObj,paramMap);
        buildAuditTrail(auditTrailSb,command[0],response);
      }
 else {
        if (!command[0].equalsIgnoreCase("String_Node_Str") && !command[0].equalsIgnoreCase("String_Node_Str")) {
          String errorString="String_Node_Str" + command[0];
          s_logger.warn(errorString);
          auditTrailSb.append("String_Node_Str" + errorString);
          throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR,errorString);
        }
      }
    }
  }
 catch (  InvalidParameterValueException ex) {
    s_logger.info(ex.getMessage());
    throw new ServerApiException(ApiErrorCode.PARAM_ERROR,ex.getMessage(),ex);
  }
catch (  IllegalArgumentException ex) {
    s_logger.info(ex.getMessage());
    throw new ServerApiException(ApiErrorCode.PARAM_ERROR,ex.getMessage(),ex);
  }
catch (  PermissionDeniedException ex) {
    ArrayList<ExceptionProxyObject> idList=ex.getIdProxyList();
    if (idList != null) {
      StringBuffer buf=new StringBuffer();
      for (      ExceptionProxyObject obj : idList) {
        buf.append(obj.getDescription());
        buf.append("String_Node_Str");
        buf.append(obj.getUuid());
        buf.append("String_Node_Str");
      }
      s_logger.info("String_Node_Str" + ex.getMessage() + "String_Node_Str"+ buf.toString()+ "String_Node_Str");
    }
 else {
      s_logger.info("String_Node_Str" + ex.getMessage());
    }
    throw new ServerApiException(ApiErrorCode.ACCOUNT_ERROR,ex.getMessage(),ex);
  }
catch (  AccountLimitException ex) {
    s_logger.info(ex.getMessage());
    throw new ServerApiException(ApiErrorCode.ACCOUNT_RESOURCE_LIMIT_ERROR,ex.getMessage(),ex);
  }
catch (  InsufficientCapacityException ex) {
    s_logger.info(ex.getMessage());
    String errorMsg=ex.getMessage();
    if (CallContext.current().getCallingAccount().getType() != Account.ACCOUNT_TYPE_ADMIN) {
      errorMsg=BaseCmd.USER_ERROR_MESSAGE;
    }
    throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR,errorMsg,ex);
  }
catch (  ResourceAllocationException ex) {
    s_logger.info(ex.getMessage());
    throw new ServerApiException(ApiErrorCode.RESOURCE_ALLOCATION_ERROR,ex.getMessage(),ex);
  }
catch (  ResourceUnavailableException ex) {
    s_logger.info(ex.getMessage());
    String errorMsg=ex.getMessage();
    if (CallContext.current().getCallingAccount().getType() != Account.ACCOUNT_TYPE_ADMIN) {
      errorMsg=BaseCmd.USER_ERROR_MESSAGE;
    }
    throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR,errorMsg,ex);
  }
catch (  ServerApiException ex) {
    s_logger.info(ex.getDescription());
    throw ex;
  }
catch (  Exception ex) {
    s_logger.error("String_Node_Str" + ((command == null) ? "String_Node_Str" : command[0]),ex);
    String errorMsg=ex.getMessage();
    if (CallContext.current().getCallingAccount().getType() != Account.ACCOUNT_TYPE_ADMIN) {
      errorMsg=BaseCmd.USER_ERROR_MESSAGE;
    }
    throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,errorMsg,ex);
  }
  return response;
}