CPD Results

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

Duplications

File Line
com\gridsystems\beanfilter\ParseException.java 147
com\gridsystems\beanfilter\TokenMgrError.java 40
   protected static final String addEscapes(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\gridsystems\beanfilter\FilterParser.java 104
com\gridsystems\beanfilter\FilterParser.java 183
  final public EvalValue nolistvalue(Class parentClass) throws ParseException, EvalException {
  EvalValue f;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case LPAREN:
      jj_consume_token(LPAREN);
      f = value(parentClass);
      jj_consume_token(RPAREN);
                                             {if (true) return new ParenthesisValue(token, f);}
      break;
    case TRUE:
    case FALSE:
    case NULL:
    case NUMBER:
    case STRING:
      f = constValue();
                       {if (true) return f;}
      break;
    case NOT:
    case SIZEOF:
    case SELECT:
    case THIS:
    case IDENTIFIER:
      f = varValue(parentClass);
                                  {if (true) return f;}
      break;