View by Classes

Findings - Overview

info AvoidDuplicateLiterals (PMD)

Further info on the wiki.
Code containing duplicate String literals can usually be improved by declaring the String as a constant field.

public class Foo {
 private void bar() {
    buz("Howdy");
    buz("Howdy");
    buz("Howdy");
    buz("Howdy");
 }
 private void buz(String x) {}
}

    

Additional info can be found at this http://pmd.sourceforge.net/rules/strings.html#AvoidDuplicateLiterals site.

6org.jcoderz.commons.types.PeriodTest
The String literal ", should be " appears 5 times in this file; the first occurrence is on line 145 (test code) [145:48],
The String literal "2004-09-04T10:04:22.788Z" appears 4 times in this file; the first occurrence is on line 542 (test code) [542:42],
The String literal "Testcase internal error. Got a ParseException " appears 4 times in this file; the first occurrence is on line 564 (test code) [564:15],
The String literal " should be " appears 4 times in this file; the first occurrence is on line 765 (test code) [765:60],
The String literal ", got period " appears 4 times in this file; the first occurrence is on line 766 (test code) [766:32],
The String literal ", result " appears 4 times in this file; the first occurrence is on line 772 (test code) [772:15]
6org.jcoderz.commons.tracing.AspectPatternTest
The String literal "foo/test/Bar" appears 6 times in this file; the first occurrence is on line 50 (test code) [50:9],
The String literal "Foo" appears 6 times in this file; the first occurrence is on line 63 (test code) [63:9],
The String literal "method(II)I" appears 4 times in this file; the first occurrence is on line 73 (test code) [73:20],
The String literal "method(JI)I" appears 5 times in this file; the first occurrence is on line 88 (test code) [88:24],
The String literal "Pattern should match class! " appears 4 times in this file; the first occurrence is on line 143 (test code) [143:16],
The String literal "Pattern should match method! " appears 4 times in this file; the first occurrence is on line 145 (test code) [145:16]
4org.jcoderz.commons.util.LazyFileOutputStreamTest
The String literal "new" appears 5 times in this file; the first occurrence is on line 55 (test code) [55:55],
The String literal "test" appears 5 times in this file; the first occurrence is on line 55 (test code) [55:47],
The String literal "Could not delete temp '" appears 5 times in this file; the first occurrence is on line 66 (test code) [66:24],
The String literal "Same data should be buffered." appears 5 times in this file; the first occurrence is on line 84 (test code) [84:24]
3org.jcoderz.commons.doclet.XmlDoclet
The String literal "name" appears 5 times in this file; the first occurrence is on line 280 [280:23],
The String literal "type" appears 6 times in this file; the first occurrence is on line 354 [354:23],
The String literal "'></a>" appears 4 times in this file; the first occurrence is on line 665 [665:25]
2org.jcoderz.commons.types.samples.SampleFixPointTest
The String literal "Expected exception but got " appears 4 times in this file; the first occurrence is on line 130 (test code) [130:18],
The String literal "0.01" appears 4 times in this file; the first occurrence is on line 192 (test code) [192:39]
2org.jcoderz.phoenix.report.Java2HtmlTest
The String literal "Unexpected start for week." appears 5 times in this file; the first occurrence is on line 71 (test code) [71:22],
The String literal "Unexpected end for week." appears 5 times in this file; the first occurrence is on line 100 (test code) [100:22]
2org.jcoderz.phoenix.sqlparser.SqlParser
The String literal "Parsed inline constraint " appears 6 times in this file; the first occurrence is on line 826 [826:23],
The String literal "Parsed OOL constraint " appears 4 times in this file; the first occurrence is on line 1,013 [1013:23]
1org.jcoderz.commons.types.EmailAddress
The String literal "email" appears 4 times in this file; the first occurrence is on line 149 [149:27]
1org.jcoderz.commons.types.EmailAddressTest
The String literal "ArgumentMalformedException should be thrown" appears 4 times in this file; the first occurrence is on line 51 (test code) [51:12]
1org.jcoderz.commons.taskdefs.AppInfoSaxHandler
The String literal "The solution element MUST NOT use variables: " appears 4 times in this file; the first occurrence is on line 291 [291:18]
1org.jcoderz.commons.types.StrongTypesTest
The String literal "Expected exception!" appears 4 times in this file; the first occurrence is on line 74 (test code) [74:18]
1org.jcoderz.phoenix.servlet.Base64DecoderServlet
The String literal "<hr />" appears 5 times in this file; the first occurrence is on line 104 [104:25]
1org.jcoderz.phoenix.sqlparser.SqlToXml
The String literal "\">" appears 5 times in this file; the first occurrence is on line 95 [95:57]
1org.jcoderz.commons.tracing.TracingProxy
The String literal "tracer" appears 7 times in this file; the first occurrence is on line 177 [177:20]
1org.jcoderz.phoenix.templategen.TemplateGeneratorServlet
The String literal "<td>" appears 5 times in this file; the first occurrence is on line 196 [196:21]
1org.jcoderz.commons.util.Base64UtilTest
The String literal "kB/sec" appears 5 times in this file; the first occurrence is on line 118 (test code) [118:67]
1org.jcoderz.commons.taskdefs.XtremeDocs
The String literal ".tmp" appears 5 times in this file; the first occurrence is on line 627 [627:59]
1org.jcoderz.commons.logging.WhitespaceFormatTest
The String literal "This is a string." appears 4 times in this file; the first occurrence is on line 55 (test code) [55:25]
1org.jcoderz.commons.util.ObjectUtilTest
The String literal "foo" appears 4 times in this file; the first occurrence is on line 69 (test code) [69:13]
1org.jcoderz.commons.util.StringUtilTest
The String literal "any string should be false" appears 4 times in this file; the first occurrence is on line 146 (test code) [146:19]
1org.jcoderz.phoenix.report.JDepend
The String literal " -> " appears 4 times in this file; the first occurrence is on line 289 [289:26]
1org.jcoderz.phoenix.dbview.DbView
The String literal "Failed to convert type '" appears 4 times in this file; the first occurrence is on line 649 [649:22]
1org.jcoderz.commons.taskdefs.SimpleTypeGeneratorTest
The String literal " exists" appears 4 times in this file; the first occurrence is on line 86 (test code) [86:37]