CPD Results

The following document contains the results of PMD's CPD 7.17.0.

Duplications

File Line
com\randomnoun\common\spring\StructuredListResultSetExtractor.java 291
com\randomnoun\common\spring\StructuredMapCallbackHandlerResultSetExtractor.java 159
}
    
    
    /**
     * Used by the ResultReader interface to return the results read by this class
     * 
     * @see org.springframework.jdbc.core.ResultReader#getResults()
     *
    public List getResults() {
        return results;
    }
    */

    /**
     * Used by the ResultReader interface to process a single row from the database.
     * 
     * <p>The row is read and matched against the 'levels' specified in the 
     * object constructor. As values change, tree branches are created in the returned
     * structured List. 
     * 
     * @see org.springframework.jdbc.core.RowCallbackHandler#processRow(java.sql.ResultSet)
     */
    @SuppressWarnings("unchecked")
	public void processRow(ResultSet rs)
        throws SQLException {
        Map<String, Object> row = (Map<String, Object>) rowMapper.mapRow(rs, this.rowNum++); // ClobRowMapper always returns a Map.
		// System.out.println("Processing row " + Struct.structuredMapToString("row", row));

        // logger.debug("row is " + Struct.structuredMapToJson(row));
        
        int createLevel = 0;
        List<Map<String, Object>> createList = results;
        Map<String, Object> createRow = new HashMap<String, Object>();
        String createPrefix = "";

        // determine highest level that we can create at
        if (lastResultRow != null) {
            // System.out.println("lastResultRow processing");
            createLevel = levels.size() + 1;

            // find lowest level that has a different value
            for (Iterator<Map.Entry<String, String>> i = columnMapping.entrySet().iterator(); i.hasNext();) {
                Map.Entry<String, String> entry = (Map.Entry<String, String>) i.next();
                String column = (String) entry.getKey();
                String columnTarget = (String) entry.getValue();

                List<Map<String,Object>> containerList = results;
                Map<String, Object> containerMap = lastResultRow;

                String component;
                int pos = columnTarget.indexOf('.');
                int level = 0;

                while (pos != -1) {
                    component = columnTarget.substring(0, pos);
                    columnTarget = columnTarget.substring(pos + 1);

                    if (!containerMap.containsKey(component)) {
                        throw new IllegalStateException("Missing field '" + component + "' in " + Struct.structuredMapToString("containerMap", containerMap) + "; last result row is " + Struct.structuredMapToString("lastResultRow", lastResultRow));
                    }

                    if (component.equals(levels.get(level))) {
                        level++;
                        containerList = (List<Map<String,Object>>) containerMap.get(component);
                        containerMap = (Map<String, Object>) containerList.get(containerList.size() - 1);
                        if (containerMap==null) {
                        	logger.error("null containerMap");
                        }
                    } else {
                        containerMap = (Map<String, Object>) containerMap.get(component);
                        if (containerMap==null) {
                        	logger.error("null containerMap");
                        }

                    }

                    pos = columnTarget.indexOf('.');
                }

                Object thisValue = row.get(column);
                Object lastValue = containerMap.get(columnTarget);
                // System.out.println("Comparing thisValue '" + thisValue + "' to lastValue '" + lastValue + "'");

                if ((thisValue == null && lastValue != null) || (thisValue != null && !thisValue.equals(lastValue))) {
                    // values are different; create row
                    if (createLevel > level) {
                        createList = containerList;

                        // System.out.println("Reducing level to '" + level + "' because of " +
                        //   "column '" + columnTarget + "' differing (" + thisValue + " instead of previous: " + lastValue);
                        createLevel = level;
                    }
                }
            }
        }

        if (createLevel > levels.size()) {
            // rows are completely identical -- don't add it to the list
            return;
        }

        for (int i = 0; i < createLevel; i++) {
            createPrefix = createPrefix + levels.get(i) + ".";
        }

        // generate 'createRow'
        for (Iterator<Map.Entry<String, String>> i = columnMapping.entrySet().iterator(); i.hasNext(); ) {
        	Map.Entry<String, String> entry = i.next();
            String column = (String) entry.getKey();
            String columnTarget = (String) entry.getValue();
            if (!columnTarget.startsWith(createPrefix)) {
                continue;
            }
            Object value = row.get(column); 

            //logger.debug("About to add column '" + columnTarget + "' from rs column '" + column + "'; createPrefix = '" + createPrefix + "' with value '" + value + "'");
            
            columnTarget = columnTarget.substring(createPrefix.length());
            //logger.debug("  columnTarget '" + columnTarget + "'");

            List<Map<String, Object>> containerList = createList;
            Map<String, Object> containerMap = createRow;
            int level = createLevel;  // ** was 0 ?
            String component;
            int pos = columnTarget.indexOf('.');

            while (pos != -1) {
                component = columnTarget.substring(0, pos);
                columnTarget = columnTarget.substring(pos + 1);

                /* if (!containerMap.containsKey(component)) {
                   containerMap.put(component, new HashMap());
                   } */

                // System.out.println("Setting component '" + component + "' in " + 
                //   Codec.structuredMapToString("containerMap", containerMap));
                if (component.equals(levels.get(level))) {
                    level++;
                    containerList = (List<Map<String, Object>>) containerMap.get(component);

                    if (containerList == null) {
                        containerList = new ArrayList<Map<String,Object>>();
                        containerMap.put(component, containerList);
                        containerList.add(new HashMap<String, Object>());
                    }

                    containerMap = (Map<String, Object>) containerList.get(containerList.size() - 1);
                    if (containerMap==null) {
                    	logger.error("C null containerMap");
                    }

                } else {
                    containerMap = (Map<String, Object>) containerMap.get(component);
                    if (containerMap==null) {
                    	logger.error("D null containerMap");
                    }

                }

                pos = columnTarget.indexOf('.');
            }

            containerMap.put(columnTarget, value);
        }
File Line
com\randomnoun\common\Base64.java 267
com\randomnoun\common\Base64.java 328
-9,-9,-9,-9,-9,-9,                          // Decimal 91 - 96
        26,27,28,29,30,31,32,33,34,35,36,37,38,     // Letters 'a' through 'm'
        39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
        -9,-9,-9,-9,-9                              // Decimal 123 - 127
        ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,       // Decimal 128 - 139
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 
    };
	
	
/* ********  U R L   S A F E   B A S E 6 4   A L P H A B E T  ******** */
	
    /**
     * Used in the URL- and Filename-safe dialect described in Section 4 of RFC3548: 
     * <a href="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>.
     * Notice that the last two bytes become "hyphen" and "underscore" instead of "plus" and "slash."
     */
    private final static byte[] _URL_SAFE_ALPHABET = {
File Line
com\randomnoun\common\Base64.java 269
com\randomnoun\common\Base64.java 397
39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
        -9,-9,-9,-9,-9                              // Decimal 123 - 127
        ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,       // Decimal 128 - 139
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 
    };
	
	
/* ********  U R L   S A F E   B A S E 6 4   A L P H A B E T  ******** */
	
    /**
     * Used in the URL- and Filename-safe dialect described in Section 4 of RFC3548: 
     * <a href="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>.
     * Notice that the last two bytes become "hyphen" and "underscore" instead of "plus" and "slash."
     */
    private final static byte[] _URL_SAFE_ALPHABET = {
File Line
com\randomnoun\common\Base64.java 331
com\randomnoun\common\Base64.java 397
39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
      -9,-9,-9,-9,-9                              // Decimal 123 - 127
      ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 128 - 139
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 
    };



/* ********  O R D E R E D   B A S E 6 4   A L P H A B E T  ******** */

    /**
     * I don't get the point of this technique, but someone requested it,
     * and it is described here:
     * <a href="http://www.faqs.org/qa/rfcc-1940.html">http://www.faqs.org/qa/rfcc-1940.html</a>.
     */
    private final static byte[] _ORDERED_ALPHABET = {
File Line
com\randomnoun\common\Base64.java 269
com\randomnoun\common\Base64.java 396
39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
        -9,-9,-9,-9,-9                              // Decimal 123 - 127
        ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,       // Decimal 128 - 139
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255
File Line
com\randomnoun\common\Base64.java 269
com\randomnoun\common\Base64.java 332
com\randomnoun\common\Base64.java 397
39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
        -9,-9,-9,-9,-9                              // Decimal 123 - 127
        ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,       // Decimal 128 - 139
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255
File Line
com\randomnoun\common\spring\StructuredListResultSetExtractor.java 204
com\randomnoun\common\spring\StructuredMapCallbackHandlerResultSetExtractor.java 73
this.results = (rowsExpected > 0) ? new ArrayList<Map<String, Object>>(rowsExpected) : new LinkedList<Map<String, Object>>();
        this.rowMapper = rowMapper;
        this.columnMapping = new HashMap<String, String>();
        this.levels = new ArrayList<String>(3); // we're not going to go higher than this too often

        StringTokenizer st = new StringTokenizer(mappings, ",");
        StringTokenizer st2;
        StringTokenizer st3;
        String column = null;
        String columnTarget = null;
        String token;
        String mapping;

        while (st.hasMoreTokens()) {
            mapping = st.nextToken().trim();

            if (mapping.indexOf(' ') == -1) {
                column = mapping;
                columnTarget = mapping;
            } else {
                // parse state (note that this uses a StringTokenizer, 
                // rather than a character-based parser)
                // 
                // 0 = start of parse
                // 1 = consumed column name
                // 2 = consumed 'as'
                // 3 = consumed mapping
                int state = 0; // 0=initial, 1=got column name, 2=got 'as', 3=got mapping
                st2 = new StringTokenizer(mapping, " ");
                while (st2.hasMoreTokens()) {
                    token = st2.nextToken().trim();
                    if (token.equals("")) { continue; }

                    if (state == 0) {
                        column = token;
                        state = 1;
                    } else if (state == 1) {
                        if (!token.equalsIgnoreCase("as")) {
                            throw new IllegalArgumentException("Invalid mapping '" + mapping + "'; expected AS");
                        }
                        state = 2;
                    } else if (state == 2) {
                        columnTarget = token;
                        state = 3;
                    } else if (state == 3) {
                        throw new IllegalArgumentException("Invalid mapping '" + mapping + "'; too many tokens");
                    }
                }
            }

            // check target for levels
            int levelIdx = 0;
            st3 = new StringTokenizer(columnTarget, ".");
            if (st3.hasMoreTokens()) {
                String level = st3.nextToken();

                while (st3.hasMoreTokens()) {
                    if (levelIdx < levels.size()) {
                        if (!levels.get(levelIdx).equals(level)) {
                            throw new IllegalArgumentException("Multiple lists in mapping at level " + levelIdx + ": '" + levels.get(levelIdx) + "' and '" + level + "'");
                        }
                    } else {
                        levels.add(level);
                        // System.out.println("Levels now: " + levels);
                    }
                    level = st3.nextToken();
                    levelIdx++;
                }
            }
            columnMapping.put(column.toUpperCase(), columnTarget);
        }
    }

	/** Required to support ResultSetExtractor interface
	 * 
	 * @param rs resultSet to process
	 * 
	 * @return a List of structured Maps, as described in the class javadoc
	 */
    public Object extractData(ResultSet rs) throws SQLException, DataAccessException 
	{
		// int rowNum = 0;
		while (rs.next()) {
			// results.add(this.rowMapper.mapRow(rs, rowNum++));
			processRow(rs);
		}
File Line
com\randomnoun\common\Base64.java 231
com\randomnoun\common\Base64.java 291
private final static byte[] _STANDARD_ALPHABET = {
        (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
        (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
        (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', 
        (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
        (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
        (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',
        (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', 
        (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z',
        (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', 
        (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'
File Line
com\randomnoun\common\Base64.java 273
com\randomnoun\common\Base64.java 331
com\randomnoun\common\Base64.java 396
com\randomnoun\common\Base64.java 400
-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255
File Line
com\randomnoun\common\Base64.java 335
com\randomnoun\common\Base64.java 396
-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255
File Line
com\randomnoun\common\webapp\taglib\ExtendJavascriptVarTag.java 187
com\randomnoun\common\webapp\taglib\SetJavascriptVarTag.java 208
out.print("})(" + baseName + ", "); 
        	
	        if (value == null) {
	        	out.append("null");
	        } else if (value instanceof String) {
	        	out.append("\"");
	        	out.append(Text.escapeJavascript((String) value));
	        	out.append("\"");
	        } else if (value instanceof List) {
	        	// out.append(Struct.structuredListToJson((List) value, jsonFormat));
	        	Struct.structuredListToJson(out, (List) value, jsonFormat);
	        } else if (value instanceof Map) {
	        	// out.append(Struct.structuredMapToJson((Map) value, jsonFormat));
	        	Struct.structuredMapToJson(out, (Map) value, jsonFormat);
	        } else if (value instanceof Number) {
	        	out.append(String.valueOf(value));
	        } else if (value instanceof Boolean) {
	        	out.append(String.valueOf(value));
	        } else if (value instanceof java.util.Date) {
            	// MS-compatible JSON encoding of Dates:
            	// see http://weblogs.asp.net/bleroy/archive/2008/01/18/dates-and-json.aspx
                // javascript += "\"\\/Date(" + ((java.util.Date)value).getTime() +  ")\\/\"";
	        	out.append(Struct.toDate((java.util.Date) value, jsonFormat));
	        } else if (value instanceof Struct.WriteJsonFormat) {
	        	((Struct.WriteJsonFormat) value).writeJsonFormat(out, jsonFormat); 
	        } else if (value instanceof Struct.ToJsonFormat) {
	        	out.append(((Struct.ToJsonFormat) value).toJson(jsonFormat));
	        } else if (value instanceof Struct.ToJson) {
	        	out.append(((Struct.ToJson) value).toJson());
	        } else {
	        	throw new RuntimeException("Cannot translate Java object " + value.getClass().getName() + " to javascript variable");
	        }
	        out.append(");");
File Line
com\randomnoun\common\jexl\eval\Evaluator.java 635
com\randomnoun\common\jexl\sql\SqlGenerator.java 1024
for (Enumeration<Node> e = n.nodeListOptional.elements(); e.hasMoreElements();) {
            seq = (NodeSequence) e.nextElement();
            arguments.add(seq.elementAt(1).accept(this, context));
        }

        return arguments;
    }

    /** Evaluate a Literal node.
     *
     * <PRE>
     * nodeChoice -> &lt;INTEGER_LITERAL&gt;
     *       | &lt;FLOATING_POINT_LITERAL&gt;
     *       | &lt;CHARACTER_LITERAL&gt;
     *       | &lt;STRING_LITERAL&gt;
     *       | BooleanLiteral()
     *       | NullLiteral()
     * </PRE>
     *
     */
    public Object visit(Literal n, EvalContext context) {
        String token = null;

        if (n.nodeChoice.choice instanceof NodeToken) {
            token = ((NodeToken) n.nodeChoice.choice).tokenImage;
        }

        switch (n.nodeChoice.which) {
            case 0:
                return Long.valueOf(token);
            case 1:
                return Double.valueOf(token);
            case 2:
                return Character.valueOf(token.charAt(1));
            case 3:
                return Text.unescapeJava(token.substring(1, token.length() - 1));
        }

        // must be 'true', 'false', or 'null'
        return n.nodeChoice.accept(this, context);
    }

    /** Evaluate a BooleanLiteral node.
     *
     * <PRE>
     * nodeChoice -> "true"
     *       | "false"
     * </PRE>
     */
    public Object visit(BooleanLiteral n, EvalContext context) {
        if (n.nodeChoice.which == 0) {
            return Boolean.valueOf(true);
        } else {
            return Boolean.valueOf(false);
        }
    }

    /** Evaluate a NullLiteral node.
     *
     * <PRE>
     * nodeToken -> "null"
     * </PRE>
     */
    public Object visit(NullLiteral n, EvalContext context) {
        return null;
    }

    /** This is never executed (we do not evaluate tokens) */
    public Object visit(NodeToken n, EvalContext context) {
        return n.tokenImage;
    }
}
File Line
com\randomnoun\common\jexl\parser\ParseException.java 152
com\randomnoun\common\jexl\parser\TokenMgrError.java 43
protected String add_escapes(String str) {
      StringBuffer retval = new StringBuffer();
      char ch;
      for (int i = 0; i < str.length(); i++) {
        switch (str.charAt(i))
        {
           case 0 :
              continue;
           case '\b':
              retval.append("\\b");
              continue;
           case '\t':
              retval.append("\\t");
              continue;
           case '\n':
              retval.append("\\n");
              continue;
           case '\f':
              retval.append("\\f");
              continue;
           case '\r':
              retval.append("\\r");
              continue;
           case '\"':
              retval.append("\\\"");
              continue;
           case '\'':
              retval.append("\\\'");
              continue;
           case '\\':
              retval.append("\\\\");
              continue;
           default:
              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                 String s = "0000" + Integer.toString(ch, 16);
                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
              } else {
                 retval.append(ch);
              }
              continue;
        }
      }
      return retval.toString();
   }
File Line
com\randomnoun\common\Base64.java 331
com\randomnoun\common\Base64.java 337
39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'
      -9,-9,-9,-9,-9                              // Decimal 123 - 127
      ,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 128 - 139
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
File Line
com\randomnoun\common\Base64.java 275
com\randomnoun\common\Base64.java 331
com\randomnoun\common\Base64.java 396
-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255
File Line
com\randomnoun\common\Base64.java 337
com\randomnoun\common\Base64.java 396
-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255
File Line
com\randomnoun\common\Struct.java 1673
com\randomnoun\common\Struct.java 1911
((WriteJsonFormat) value).writeJsonFormat(w,  jsonFormat);
           } else if (value instanceof ToJsonFormat) {
        	   if (!isFirst) { w.append(","); }
        	   w.append(keyJson);
        	   w.append(": ");
        	   w.append(((ToJsonFormat) value).toJson(jsonFormat));
           } else if (value instanceof ToJson) {
        	   if (!isFirst) { w.append(","); }
        	   w.append(keyJson);
        	   w.append(": ");
        	   w.append(((ToJson) value).toJson());
           } else if (value instanceof ToStringReturnsJson) {
        	   if (!isFirst) { w.append(","); }
        	   w.append(keyJson);
        	   w.append(": ");
        	   w.append(value.toString());
           } else if (value instanceof Map) {
        	   if (!isFirst) { w.append(","); }
               w.append(keyJson);
               w.append(": ");
File Line
com\randomnoun\common\XmlUtil.java 102
com\randomnoun\common\XmlUtil.java 185
public static String getText(Element element)
	{
		if (element == null) { throw new NullPointerException("null element"); }
		StringBuffer buf = new StringBuffer();
		NodeList children = element.getChildNodes();
		for (int i = 0; i < children.getLength(); ++i) {
			org.w3c.dom.Node child = children.item(i);
			short nodeType = child.getNodeType();
			if (nodeType == org.w3c.dom.Node.CDATA_SECTION_NODE) {
				buf.append(((org.w3c.dom.Text) child).getData());			
			} else if (nodeType == org.w3c.dom.Node.TEXT_NODE) {
				buf.append(((org.w3c.dom.Text) child).getData());
			} else if (nodeType == org.w3c.dom.Node.ELEMENT_NODE) {
File Line
com\randomnoun\common\jexl\ast\NodeList.java 27
com\randomnoun\common\jexl\ast\NodeSequence.java 28
public Node elementAt(int i)  { return nodes.elementAt(i); }
   public int size()             { return nodes.size(); }
   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }

   public Vector<Node> nodes;
}
File Line
com\randomnoun\common\XmlUtil.java 105
com\randomnoun\common\XmlUtil.java 140
com\randomnoun\common\XmlUtil.java 188
StringBuffer buf = new StringBuffer();
		NodeList children = element.getChildNodes();
		for (int i = 0; i < children.getLength(); ++i) {
			org.w3c.dom.Node child = children.item(i);
			short nodeType = child.getNodeType();
			if (nodeType == org.w3c.dom.Node.CDATA_SECTION_NODE) {
				buf.append(((org.w3c.dom.Text) child).getData());			
			} else if (nodeType == org.w3c.dom.Node.TEXT_NODE) {
				buf.append(((org.w3c.dom.Text) child).getData());
			} else if (nodeType == org.w3c.dom.Node.ELEMENT_NODE) {
File Line
com\randomnoun\common\jexl\eval\function\EndsWithFunction.java 20
com\randomnoun\common\jexl\eval\function\LikeFunction.java 25
implements EvalFunction
{
    /** Implements the function as per the class description. */
    public Object evaluate(String functionName, EvalContext context, List<Object> arguments)
        throws EvalException
    {
        if (arguments.size() != 2) { throw new EvalException(functionName + "() must contain two parameters"); }
        if (!(arguments.get(0) instanceof String)) {
            throw new EvalException(functionName + "() parameter 1 must be a string type");
        }
        if (!(arguments.get(1) instanceof String)) {
            throw new EvalException(functionName + "() parameter 2 must be a string type");
        }

        String arg0 = (String)arguments.get(0);
        String arg1 = (String)arguments.get(1);
        if (arg0 == null) {
            throw new EvalException(functionName + "() first parameter cannot be null");
        }
        if (arg1 == null) {
            throw new EvalException(functionName + "() second parameter cannot be null");
        }
File Line
com\randomnoun\common\jexl\ast\BooleanLiteral.java 17
com\randomnoun\common\jexl\ast\Literal.java 21
com\randomnoun\common\jexl\ast\PrimaryExpression.java 19
com\randomnoun\common\jexl\ast\UnaryExpression.java 17
public BooleanLiteral(NodeChoice n0) {
      nodeChoice = n0;
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\AdditiveExpression.java 19
com\randomnoun\common\jexl\ast\ArgumentList.java 19
com\randomnoun\common\jexl\ast\ConditionalAndExpression.java 19
com\randomnoun\common\jexl\ast\EqualityExpression.java 19
com\randomnoun\common\jexl\ast\Expression.java 19
com\randomnoun\common\jexl\ast\MultiplicativeExpression.java 19
com\randomnoun\common\jexl\ast\Name.java 19
com\randomnoun\common\jexl\ast\RelationalExpression.java 19
multiplicativeExpression = n0;
      nodeListOptional = n1;
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\eval\Evaluator.java 498
com\randomnoun\common\jexl\sql\SqlGenerator.java 858
throw new EvalException("Internal error - unexpected unary operation");
            }
        } else {
            return n.nodeChoice.choice.accept(this, context);
        }
    }

    /** Evaluate a PrimaryExpression node.
     *
     * <PRE>
     * nodeChoice -> FunctionCall()
     *       | Name()
     *       | Literal()
     *       | "(" Expression() ")"
     * </PRE>
     */
    public Object visit(PrimaryExpression n, EvalContext context) {
        NodeSequence seq;
        int which = n.nodeChoice.which;

        switch (which) {
            case 0:
            case 1:
            case 2:
                return n.nodeChoice.choice.accept(this, context);
            case 3:
                seq = (NodeSequence) n.nodeChoice.choice;
                Object obj = seq.elementAt(1).accept(this, context);

                ;

                return obj;
            default:
                throw new EvalException("Internal parser error (PrimaryExpression)");
        }
    }

    /** Evaluate a Name node.
     *
     * <PRE>
     * nodeToken -> &lt;IDENTIFIER&gt;
     * nodeListOptional -> ( "." &lt;IDENTIFIER&gt; )*
     * </PRE>
     */
    public Object visit(Name n, EvalContext context) {
        EvalContext evalContext = (EvalContext) context;
        String varComponentName;
        String varBaseName = n.nodeToken.tokenImage;

        // logger.debug("Fetching var '" + varBaseName + "'");
        if (evalContext == null) {
File Line
com\randomnoun\common\jexl\ast\AdditiveExpression.java 20
com\randomnoun\common\jexl\ast\FunctionCall.java 20
com\randomnoun\common\jexl\ast\MultiplicativeExpression.java 20
com\randomnoun\common\jexl\ast\Name.java 20
com\randomnoun\common\jexl\ast\RelationalExpression.java 20
nodeListOptional = n1;
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\ArgumentList.java 20
com\randomnoun\common\jexl\ast\FunctionCall.java 20
nodeListOptional = n1;
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\ConditionalAndExpression.java 20
com\randomnoun\common\jexl\ast\FunctionCall.java 20
nodeListOptional = n1;
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\EqualityExpression.java 20
com\randomnoun\common\jexl\ast\FunctionCall.java 20
nodeListOptional = n1;
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\Expression.java 20
com\randomnoun\common\jexl\ast\FunctionCall.java 20
nodeListOptional = n1;
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\NodeList.java 28
com\randomnoun\common\jexl\ast\NodeToken.java 59
public int size()             { return nodes.size(); }
   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }

   public Vector<Node> nodes;
File Line
com\randomnoun\common\jexl\ast\NodeSequence.java 29
com\randomnoun\common\jexl\ast\NodeToken.java 59
public int size()             { return nodes.size(); }
   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }

   public Vector<Node> nodes;
File Line
com\randomnoun\common\jexl\ast\Arguments.java 29
com\randomnoun\common\jexl\ast\NullLiteral.java 21
com\randomnoun\common\jexl\ast\TopLevelExpression.java 25
nodeToken1 = new NodeToken(")");
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\AdditiveExpression.java 21
com\randomnoun\common\jexl\ast\Arguments.java 30
com\randomnoun\common\jexl\ast\BooleanLiteral.java 19
com\randomnoun\common\jexl\ast\ConditionalAndExpression.java 21
com\randomnoun\common\jexl\ast\EqualityExpression.java 21
com\randomnoun\common\jexl\ast\Expression.java 21
com\randomnoun\common\jexl\ast\FunctionCall.java 21
com\randomnoun\common\jexl\ast\Literal.java 23
com\randomnoun\common\jexl\ast\MultiplicativeExpression.java 21
com\randomnoun\common\jexl\ast\Name.java 21
com\randomnoun\common\jexl\ast\NullLiteral.java 22
com\randomnoun\common\jexl\ast\PrimaryExpression.java 21
com\randomnoun\common\jexl\ast\RelationalExpression.java 21
com\randomnoun\common\jexl\ast\TopLevelExpression.java 26
com\randomnoun\common\jexl\ast\UnaryExpression.java 19
}

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\ArgumentList.java 21
com\randomnoun\common\jexl\ast\Arguments.java 30
com\randomnoun\common\jexl\ast\BooleanLiteral.java 19
com\randomnoun\common\jexl\ast\Literal.java 23
com\randomnoun\common\jexl\ast\NullLiteral.java 22
com\randomnoun\common\jexl\ast\PrimaryExpression.java 21
com\randomnoun\common\jexl\ast\TopLevelExpression.java 26
com\randomnoun\common\jexl\ast\UnaryExpression.java 19
}

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
}
File Line
com\randomnoun\common\jexl\ast\Arguments.java 29
com\randomnoun\common\jexl\ast\NodeList.java 28
com\randomnoun\common\jexl\ast\NodeSequence.java 29
com\randomnoun\common\jexl\ast\NodeToken.java 59
com\randomnoun\common\jexl\ast\NullLiteral.java 21
com\randomnoun\common\jexl\ast\TopLevelExpression.java 25
nodeToken1 = new NodeToken(")");
   }

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
File Line
com\randomnoun\common\jexl\ast\AdditiveExpression.java 21
com\randomnoun\common\jexl\ast\NodeList.java 28
com\randomnoun\common\jexl\ast\NodeListOptional.java 29
com\randomnoun\common\jexl\ast\NodeOptional.java 24
com\randomnoun\common\jexl\ast\NodeSequence.java 29
com\randomnoun\common\jexl\ast\NodeToken.java 60
com\randomnoun\common\jexl\ast\NullLiteral.java 22
com\randomnoun\common\jexl\ast\PrimaryExpression.java 21
com\randomnoun\common\jexl\ast\RelationalExpression.java 21
com\randomnoun\common\jexl\ast\TopLevelExpression.java 26
com\randomnoun\common\jexl\ast\UnaryExpression.java 19
}

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
File Line
com\randomnoun\common\jexl\ast\ArgumentList.java 21
com\randomnoun\common\jexl\ast\NodeList.java 28
com\randomnoun\common\jexl\ast\NodeListOptional.java 29
com\randomnoun\common\jexl\ast\NodeOptional.java 24
com\randomnoun\common\jexl\ast\NodeSequence.java 29
com\randomnoun\common\jexl\ast\NodeToken.java 60
}

   public void accept(com.randomnoun.common.jexl.visitor.Visitor v) {
      v.visit(this);
   }
   public <R,A> R accept(com.randomnoun.common.jexl.visitor.GJVisitor<R,A> v, A argu) {
      return v.visit(this,argu);
   }
   public <R> R accept(com.randomnoun.common.jexl.visitor.GJNoArguVisitor<R> v) {
      return v.visit(this);
   }
   public <A> void accept(com.randomnoun.common.jexl.visitor.GJVoidVisitor<A> v, A argu) {
      v.visit(this,argu);
   }
File Line
com\randomnoun\common\Base64.java 232
com\randomnoun\common\Base64.java 358
(byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
        (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
        (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', 
        (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
        (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
File Line
com\randomnoun\common\Base64.java 292
com\randomnoun\common\Base64.java 358
(byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',
      (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
      (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', 
      (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
      (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
File Line
com\randomnoun\common\Base64.java 249
com\randomnoun\common\Base64.java 307
com\randomnoun\common\Base64.java 372
private final static byte[] _STANDARD_DECODABET = {
        -9,-9,-9,-9,-9,-9,-9,-9,-9,                 // Decimal  0 -  8
        -5,-5,                                      // Whitespace: Tab and Linefeed
        -9,-9,                                      // Decimal 11 - 12
        -5,                                         // Whitespace: Carriage Return
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 14 - 26
        -9,-9,-9,-9,-9,                             // Decimal 27 - 31
        -5,                                         // Whitespace: Space
        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,              // Decimal 33 - 42
File Line
com\randomnoun\common\Struct.java 1698
com\randomnoun\common\Struct.java 1936
structuredListToJson(w, (List) value, jsonFormat);
           } else if (value instanceof Number) {
        	   if (!isFirst) { w.append(","); }
               w.append(keyJson);
               w.append(": ");
               w.append(value.toString());
           } else if (value instanceof Boolean) {
        	   if (!isFirst) { w.append(","); }
        	   w.append(keyJson);
        	   w.append(": ");
        	   w.append(value.toString());
           } else if (value instanceof java.util.Date) {
           	// MS-compatible JSON encoding of Dates:
           	// see http://weblogs.asp.net/bleroy/archive/2008/01/18/dates-and-json.aspx
        	   if (!isFirst) { w.append(","); }
               w.append(keyJson);
               w.append(": ");
               w.append(toDate((java.util.Date)value, jsonFormat));
File Line
com\randomnoun\common\Base64.java 235
com\randomnoun\common\Base64.java 362
(byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
        (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
        (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',
        (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', 
        (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z',
File Line
com\randomnoun\common\Base64.java 295
com\randomnoun\common\Base64.java 362
(byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',
      (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',
      (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',
      (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', 
      (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z',
File Line
com\randomnoun\common\Struct.java 1271
com\randomnoun\common\Struct.java 1341
s = s + "  " + index + ": (" + value.getClass() + ") " + Text.indent("  ", structuredListToString(String.valueOf(index), wrapper));
            } else if (value instanceof Map) {
                s = s + Text.indent("  ", structuredMapToString(String.valueOf(index), (Map) value));
            } else if (value instanceof List) {
                s = s + Text.indent("  ", structuredListToString(String.valueOf(index), (List) value));
			} else if (value instanceof Set) {
				s = s + Text.indent("  ", structuredSetToString(String.valueOf(index), (Set) value));
            } else {
                s = s + "  " + index + ": (" + Text.getLastComponent(value.getClass().getName()) + ") " + Text.getDisplayString("", value.toString()) + "\n";
File Line
com\randomnoun\common\jexl\sql\function\EndsWithFunction.java 19
com\randomnoun\common\jexl\sql\function\StartsWithFunction.java 21
public class EndsWithFunction extends com.randomnoun.common.jexl.eval.function.EndsWithFunction  implements SqlFunction {
	/** @inheritdoc */
	public String toSql(String functionName, EvalContext evalContext, List<Object> arguments) {
		if (arguments.size() != 2) { throw new EvalException(functionName + "() must contain two parameters"); }
		if (!(arguments.get(0) instanceof SqlColumn)) { throw new EvalException(functionName + "() parameter 1 must be an SQL column"); }
		if (!(arguments.get(1) instanceof String || arguments.get(1) instanceof SqlText)) { throw new EvalException(functionName + "() parameter 2 must be a string type"); }

		SqlColumn arg0 = (SqlColumn) arguments.get(0);
		String likePattern = "";

		if (arguments.get(1) instanceof String) {
			likePattern = "%" + SqlGenerator.escapeLikeLiteral(evalContext, (String) arguments.get(1));
File Line
com\randomnoun\common\security\SecurityContext.java 518
com\randomnoun\common\security\SecurityContext.java 628
}
		}
		
		// then try per-role permissions ...
		List<String> roles = userRoleCache.get(user);
		if (roles == null) {
			// @TODO - load from DB ? should be handled by MRUCache
			throw new IllegalStateException("Unknown user '" + user.getUsername() + "'");
		} else {
			for (Iterator<String> i = roles.iterator(); i.hasNext(); ) {
				String rolename = (String) i.next();
				Map<String, Permission> rolePermissions = rolePermissionCache.get(rolename);
				if (rolePermissions == null) {
					// @TODO - load from DB ? should be handled by MRUCache
					throw new IllegalStateException("Unknown role '" + rolename + "'");
				} else {
					// this is a strange data structure
					Permission rolePermission = (Permission) rolePermissions.get(permission);
					if (rolePermission!=null) {
File Line
com\randomnoun\common\Struct.java 135
com\randomnoun\common\Struct.java 184
public StructuredListComparator(String fieldName) {
            this.fieldName = fieldName;
        }

        /** Compare two structured list elements
         *
         * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
         */
        public int compare(Object a, Object b)
            throws IllegalArgumentException {
            if (!(a instanceof Map)) {
                throw new IllegalArgumentException("List must be composed of Maps");
            }
            if (!(b instanceof Map)) {
                throw new IllegalArgumentException("List must be composed of Maps");
            }

            Map mapA = (Map) a;
            Map mapB = (Map) b;
            if (!mapA.containsKey(fieldName)) {
                throw new IllegalArgumentException("keyField '" + fieldName + "' not found in Map");
            }
            if (!mapB.containsKey(fieldName)) {
                throw new IllegalArgumentException("keyField '" + fieldName + "' not found in Map");
            }
File Line
com\randomnoun\common\XmlUtil.java 346
com\randomnoun\common\XmlUtil.java 434
public void setDocumentLocator(Locator locator) { }
		public void startDocument() throws SAXException { }
		public void endDocument() throws SAXException { }
		public void startPrefixMapping(String prefix, String uri) throws SAXException { }
		public void endPrefixMapping(String prefix) throws SAXException { }
		public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { }
		public void processingInstruction(String target, String data) throws SAXException { }
		public void skippedEntity(String name) throws SAXException { }


		public void startElement(String uri, String localName, String qName, Attributes atts)
			throws SAXException 
		{
File Line
com\randomnoun\common\security\SecurityContext.java 492
com\randomnoun\common\security\SecurityContext.java 567
public boolean hasPermission(User user, String permission, Map<String, Object> context) {
    	// @TODO should get this User out of our userCache, keyed by id
        if (permission == null) { throw new NullPointerException("Null permission"); }
        if (user == null) { throw new NullPointerException("Null user"); }

        int pos = permission.indexOf('.');
        if (pos == -1) {
            throw new IllegalArgumentException("Illegal permission value '" + permission + "'");
        }

		//  try per-user permissions...
		Map<String, Permission> userPermissions = userPermissionCache.get(user);
		if (userPermissions == null) {
			// @TODO - load from DB ? should be handled by MRUCache
			throw new IllegalStateException("Unknown user '" + user.getUsername() + "'");
		} else {
			Permission userPermission = (Permission) userPermissions.get(permission);
			if (userPermission!=null) {
File Line
com\randomnoun\common\Struct.java 948
com\randomnoun\common\Struct.java 1076
for (Iterator i = list.iterator(); i.hasNext();) {
            try {
                row = (Map) i.next();
            } catch (ClassCastException cce) {
                throw (IllegalStateException) new IllegalStateException("List must be composed of Maps").initCause(cce);
            }
            foundKey = row.get(keyField);
            if (foundKey != null) {
                if (!(foundKey instanceof Number)) {
                    throw (IllegalStateException) new IllegalStateException("Key is not numeric (found '" + foundKey.getClass().getName() + "' instead)");
                }
                if (((Number) foundKey).longValue() == longValue) {
File Line
com\randomnoun\common\jexl\sql\function\EndsWithFunction.java 19
com\randomnoun\common\jexl\sql\function\LikeFunction.java 19
com\randomnoun\common\jexl\sql\function\StartsWithFunction.java 21
public class EndsWithFunction extends com.randomnoun.common.jexl.eval.function.EndsWithFunction  implements SqlFunction {
	/** @inheritdoc */
	public String toSql(String functionName, EvalContext evalContext, List<Object> arguments) {
		if (arguments.size() != 2) { throw new EvalException(functionName + "() must contain two parameters"); }
		if (!(arguments.get(0) instanceof SqlColumn)) { throw new EvalException(functionName + "() parameter 1 must be an SQL column"); }
		if (!(arguments.get(1) instanceof String || arguments.get(1) instanceof SqlText)) { throw new EvalException(functionName + "() parameter 2 must be a string type"); }

		SqlColumn arg0 = (SqlColumn) arguments.get(0);
File Line
com\randomnoun\common\Base64.java 260
com\randomnoun\common\Base64.java 320
63,                                         // Slash at decimal 47
        52,53,54,55,56,57,58,59,60,61,              // Numbers zero through nine
        -9,-9,-9,                                   // Decimal 58 - 60
        -1,                                         // Equals sign at decimal 61
        -9,-9,-9,                                      // Decimal 62 - 64
        0,1,2,3,4,5,6,7,8,9,10,11,12,13,            // Letters 'A' through 'N'
        14,15,16,17,18,19,20,21,22,23,24,25,        // Letters 'O' through 'Z'
        -9,-9,-9,-9,-9,-9,                          // Decimal 91 - 96