Program: 107268
Project: 107268
Buggy source:
@SuppressWarnings("String_Node_Str") public String handleRequest(Map params,boolean decode,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(BaseCmd.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);
        String decodedValue=null;
        if (decode) {
          try {
            decodedValue=URLDecoder.decode(value[0],"String_Node_Str");
          }
 catch (          UnsupportedEncodingException usex) {
            s_logger.warn(key + "String_Node_Str" + value[0]);
            throw new ServerApiException(BaseCmd.PARAM_ERROR,key + "String_Node_Str" + value[0]);
          }
        }
 else {
          decodedValue=value[0];
        }
        paramMap.put(key,decodedValue);
      }
      String cmdClassName=_apiCommands.getProperty(command[0]);
      if (cmdClassName != null) {
        Class<?> cmdClass=Class.forName(cmdClassName);
        BaseCmd cmdObj=(BaseCmd)cmdClass.newInstance();
        cmdObj.setResponseType(responseType);
        response=queueCommand(cmdObj,paramMap);
        buildAuditTrail(auditTrailSb,command[0],response);
      }
 else {
        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(BaseCmd.UNSUPPORTED_ACTION_ERROR,errorString);
      }
    }
  }
 catch (  Exception ex) {
    if (ex instanceof ServerApiException) {
      throw (ServerApiException)ex;
    }
 else {
      s_logger.error("String_Node_Str" + ((command == null) ? "String_Node_Str" : command[0]),ex);
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
    }
  }
  return response;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public String handleRequest(Map params,boolean decode,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(BaseCmd.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);
        String decodedValue=null;
        if (decode) {
          try {
            decodedValue=URLDecoder.decode(value[0],"String_Node_Str");
          }
 catch (          UnsupportedEncodingException usex) {
            s_logger.warn(key + "String_Node_Str" + value[0]);
            throw new ServerApiException(BaseCmd.PARAM_ERROR,key + "String_Node_Str" + value[0]);
          }
catch (          IllegalArgumentException iae) {
            s_logger.warn(key + "String_Node_Str" + value[0]);
            throw new ServerApiException(BaseCmd.PARAM_ERROR,key + "String_Node_Str" + value[0]+ "String_Node_Str");
          }
        }
 else {
          decodedValue=value[0];
        }
        paramMap.put(key,decodedValue);
      }
      String cmdClassName=_apiCommands.getProperty(command[0]);
      if (cmdClassName != null) {
        Class<?> cmdClass=Class.forName(cmdClassName);
        BaseCmd cmdObj=(BaseCmd)cmdClass.newInstance();
        cmdObj.setResponseType(responseType);
        response=queueCommand(cmdObj,paramMap);
        buildAuditTrail(auditTrailSb,command[0],response);
      }
 else {
        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(BaseCmd.UNSUPPORTED_ACTION_ERROR,errorString);
      }
    }
  }
 catch (  Exception ex) {
    if (ex instanceof ServerApiException) {
      throw (ServerApiException)ex;
    }
 else {
      s_logger.error("String_Node_Str" + ((command == null) ? "String_Node_Str" : command[0]),ex);
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
    }
  }
  return response;
}