CodeNarc Report: Grails 1.2.0

Report timestamp: May 10, 2010 10:17:20 PM

Summary by Package

PackageTotal FilesFiles with ViolationsPriority 1Priority 2Priority 3
All Packages6853470694327
scripts6422010828
src/grails/grails-app/conf50000
src/grails/grails-app/conf/spring10000
src/java/grails/doc22051
src/java/grails/doc/ant10000
src/java/grails/doc/filters32012
src/java/grails/spring10000
src/java/grails/test1050618
src/java/grails/util32025
src/java/grails/validation10000
src/java/grails/web10000
src/java/org/codehaus/groovy/grails/commons/cfg21031
src/java/org/codehaus/groovy/grails/commons/metaclass10000
src/java/org/codehaus/groovy/grails/compiler11008
src/java/org/codehaus/groovy/grails/documentation10000
src/java/org/codehaus/groovy/grails/orm/hibernate/cfg122030
src/java/org/codehaus/groovy/grails/orm/hibernate/support11002
src/java/org/codehaus/groovy/grails/plugins85096
src/java/org/codehaus/groovy/grails/plugins/codecs113004
src/java/org/codehaus/groovy/grails/plugins/converters11011
src/java/org/codehaus/groovy/grails/plugins/converters/codecs20000
src/java/org/codehaus/groovy/grails/plugins/datasource110150
src/java/org/codehaus/groovy/grails/plugins/i18n11001
src/java/org/codehaus/groovy/grails/plugins/logging11002
src/java/org/codehaus/groovy/grails/plugins/orm/hibernate1101111
src/java/org/codehaus/groovy/grails/plugins/publishing10000
src/java/org/codehaus/groovy/grails/plugins/scaffolding11020
src/java/org/codehaus/groovy/grails/plugins/services10000
src/java/org/codehaus/groovy/grails/plugins/support10000
src/java/org/codehaus/groovy/grails/plugins/testing41001
src/java/org/codehaus/groovy/grails/plugins/web330172
src/java/org/codehaus/groovy/grails/plugins/web/filters61002
src/java/org/codehaus/groovy/grails/plugins/web/mapping10000
src/java/org/codehaus/groovy/grails/plugins/web/mimes11020
src/java/org/codehaus/groovy/grails/plugins/web/taglib960119
src/java/org/codehaus/groovy/grails/resolve22025
src/java/org/codehaus/groovy/grails/scaffolding11043
src/java/org/codehaus/groovy/grails/support11002
src/java/org/codehaus/groovy/grails/test30000
src/java/org/codehaus/groovy/grails/test/event20000
src/java/org/codehaus/groovy/grails/test/io20000
src/java/org/codehaus/groovy/grails/test/junit331002
src/java/org/codehaus/groovy/grails/test/report/junit10000
src/java/org/codehaus/groovy/grails/test/support52002
src/java/org/codehaus/groovy/grails/validation10000
src/java/org/codehaus/groovy/grails/web/converters30000
src/java/org/codehaus/groovy/grails/web/converters/configuration11004
src/java/org/codehaus/groovy/grails/web/filters10000
src/java/org/codehaus/groovy/grails/web/i18n11002
src/java/org/codehaus/groovy/grails/web/mapping11001
src/java/org/codehaus/groovy/grails/web/metaclass32011
src/java/org/codehaus/groovy/grails/web/mime31010
src/java/org/codehaus/groovy/grails/web/pages22011
src/java/org/codehaus/groovy/grails/web/pages/ext/jsp73044
src/java/org/codehaus/groovy/grails/web/plugins/support11002
src/java/org/codehaus/groovy/grails/web/servlet/mvc21074
src/java/org/codehaus/groovy/grails/web/servlet/mvc/exceptions10000
src/java/org/codehaus/groovy/grails/web/taglib22071
src/java/org/codehaus/groovy/grails/web/util11080
src/java/org/codehaus/groovy/grails/webflow11004
src/java/org/codehaus/groovy/grails/webflow/context/servlet11001
src/java/org/codehaus/groovy/grails/webflow/engine/builder83088
src/jsp21/org/codehaus/groovy/grails/web/pages/ext/jsp20000
src/test/grails/ant10000
src/test/grails/build/eclipse10000
src/test/grails/persistence10000
src/test/grails/spring31010
src/test/grails/test83077
src/test/grails/util64060
src/test/grails/web10000
src/test/org/codehaus/groovy/grails/cli1390190
src/test/org/codehaus/groovy/grails/cli/support11010
src/test/org/codehaus/groovy/grails/commons1170124
src/test/org/codehaus/groovy/grails/commons/metaclass31001
src/test/org/codehaus/groovy/grails/compiler11002
src/test/org/codehaus/groovy/grails/context/support11020
src/test/org/codehaus/groovy/grails/documentation11022
src/test/org/codehaus/groovy/grails/domain80000
src/test/org/codehaus/groovy/grails/orm/hibernate17073013726
src/test/org/codehaus/groovy/grails/orm/hibernate/binding21020
src/test/org/codehaus/groovy/grails/orm/hibernate/cfg51001
src/test/org/codehaus/groovy/grails/orm/hibernate/support11001
src/test/org/codehaus/groovy/grails/orm/hibernate/validation71081
src/test/org/codehaus/groovy/grails/orm/support10000
src/test/org/codehaus/groovy/grails/plugins96074
src/test/org/codehaus/groovy/grails/plugins/datasource10000
src/test/org/codehaus/groovy/grails/plugins/grails-app/conf20000
src/test/org/codehaus/groovy/grails/plugins/grails-app/services10000
src/test/org/codehaus/groovy/grails/plugins/i18n10000
src/test/org/codehaus/groovy/grails/plugins/logging11021
src/test/org/codehaus/groovy/grails/plugins/metadata10000
src/test/org/codehaus/groovy/grails/plugins/publishing10000
src/test/org/codehaus/groovy/grails/plugins/scaffolding11010
src/test/org/codehaus/groovy/grails/plugins/services11010
src/test/org/codehaus/groovy/grails/plugins/testing30000
src/test/org/codehaus/groovy/grails/plugins/web550121
src/test/org/codehaus/groovy/grails/plugins/web/filters52042
src/test/org/codehaus/groovy/grails/plugins/web/mapping10000
src/test/org/codehaus/groovy/grails/plugins/webflow220127
src/test/org/codehaus/groovy/grails/reload43050
src/test/org/codehaus/groovy/grails/resolve11052
src/test/org/codehaus/groovy/grails/scaffolding21020
src/test/org/codehaus/groovy/grails/scaffolding/view22012
src/test/org/codehaus/groovy/grails/validation63070
src/test/org/codehaus/groovy/grails/web/binding92031
src/test/org/codehaus/groovy/grails/web/codecs11110290
src/test/org/codehaus/groovy/grails/web/context11010
src/test/org/codehaus/groovy/grails/web/converters55045
src/test/org/codehaus/groovy/grails/web/errors10000
src/test/org/codehaus/groovy/grails/web/filters22004
src/test/org/codehaus/groovy/grails/web/i18n11010
src/test/org/codehaus/groovy/grails/web/mapping221601218
src/test/org/codehaus/groovy/grails/web/mapping/filter21005
src/test/org/codehaus/groovy/grails/web/metaclass31010
src/test/org/codehaus/groovy/grails/web/mime22030
src/test/org/codehaus/groovy/grails/web/pages171101427
src/test/org/codehaus/groovy/grails/web/pages/ext/jsp95082
src/test/org/codehaus/groovy/grails/web/servlet66071
src/test/org/codehaus/groovy/grails/web/servlet/filter11010
src/test/org/codehaus/groovy/grails/web/servlet/mvc17100191
src/test/org/codehaus/groovy/grails/web/servlet/view11010
src/test/org/codehaus/groovy/grails/web/sitemesh31080
src/test/org/codehaus/groovy/grails/web/taglib363007315
src/test/org/codehaus/groovy/grails/web/util22042
src/test/org/codehaus/groovy/grails/webflow44057
src/test/org/codehaus/groovy/grails/webflow/engine/builder770101
src/test/org/codehaus/groovy/grails/webflow/support11063

scripts

scripts/Help_.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable271

[SRC]def helpText = ""

scripts/Init.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [69.2]

scripts/IntegrateWith.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [72.8]

scripts/ListPluginUpdates.groovy

Rule NamePriorityLine #Source Line / Message
NestedBlockDepth234

[SRC]plugin.'release'.each {

[MSG]The nested block depth is 6

scripts/ReleasePlugin.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2486

[SRC]catch (SVNException e) {

EmptyCatchBlock2491

[SRC]catch (SVNException e) {

EmptyCatchBlock2496

[SRC]catch (SVNException e) {

EmptyCatchBlock2225

[SRC]catch (e) {

EmptyCatchBlock2303

[SRC]catch (e) {

AbcComplexity2

[MSG]The ABC score for method [run] is [184.0]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [34]

NestedBlockDepth2157

[SRC]if (notInRepository) {

[MSG]The nested block depth is 6

NestedBlockDepth2160

[SRC]else {

[MSG]The nested block depth is 6

NestedBlockDepth2166

[SRC]else {

[MSG]The nested block depth is 7

UnusedVariable2501

[SRC]def wcClient = new SVNWCClient((ISVNAuthenticationManage..nager, null)

UnusedVariable2277

[SRC]def addClient = new SVNWCClient((ISVNAuthenticationManag..nager, null)

scripts/SchemaExport.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [106.0]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [40]

scripts/TestApp.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport32

[SRC]import grails.util.GrailsWebUtil as GWU

UnusedImport34

[SRC]import java.lang.reflect.Modifier

UnusedImport35

[SRC]import junit.framework.TestCase

UnusedImport36

[SRC]import junit.framework.TestResult

UnusedImport37

[SRC]import junit.framework.TestSuite

UnusedImport38

[SRC]import org.apache.commons.logging.LogFactory

UnusedImport39

[SRC]import org.apache.tools.ant.taskdefs.optional.junit.JUnitTest

UnusedImport310

[SRC]import org.codehaus.groovy.grails.commons.GrailsApplication

UnusedImport311

[SRC]import org.codehaus.groovy.grails.support.PersistenceCon..tInterceptor

UnusedImport312

[SRC]import org.codehaus.groovy.grails.web.servlet.GrailsAppl..onAttributes

UnusedImport313

[SRC]import org.springframework.transaction.support.TransactionCallback

UnusedImport314

[SRC]import org.springframework.transaction.support.TransactionTemplate

UnusedImport315

[SRC]import org.springframework.web.context.request.RequestContextHolder

UnusedImport317

[SRC]import grails.util.GrailsUtil

UnusedImport318

[SRC]import grails.util.GrailsNameUtils

scripts/Upgrade.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [122.5]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [30]

NestedBlockDepth2120

[SRC]copy(tofile: "${basedir}/grails-app/conf/${template}") {

[MSG]The nested block depth is 6

NestedBlockDepth2121

[SRC]fileset(file: "${grailsHome}/src/grails/grails-app/conf/..emplate}") {

[MSG]The nested block depth is 7

NestedBlockDepth2131

[SRC]copy(tofile: "${basedir}/grails-app/conf/${template}") {

[MSG]The nested block depth is 6

NestedBlockDepth2132

[SRC]fileset(file: "${grailsHome}/src/grails/grails-app/conf/..emplate}") {

[MSG]The nested block depth is 7

NestedBlockDepth2144

[SRC]fileset(file: "${grailsHome}/src/grails/grails-app/conf/..emplate}") {

[MSG]The nested block depth is 6

scripts/_GrailsBootstrap.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [95.1]

scripts/_GrailsClasspath.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [79.6]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [23]

scripts/_GrailsCompile.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [98.3]

scripts/_GrailsDocs.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [87.2]

NestedBlockDepth2144

[SRC]foo.${m.name}(${m.arguments?.collect {GrailsNameUtils.ge...join(',')})

[MSG]The nested block depth is 6

NestedBlockDepth2153

[SRC]${m.arguments?.collect { '* @'+GrailsNameUtils.getProper..it)+'@\n' }}

[MSG]The nested block depth is 6

UnusedImport31

[SRC]import grails.util.GrailsUtil

UnusedImport32

[SRC]import org.radeox.engine.context.BaseInitialRenderContext

UnusedImport33

[SRC]import grails.doc.DocEngine

scripts/_GrailsInit.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport326

[SRC]import org.springframework.core.io.FileSystemResource

UnusedImport327

[SRC]import grails.util.GrailsNameUtils

scripts/_GrailsPackage.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [158.7]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [28]

NestedBlockDepth2119

[SRC]i18nPluginDirs.eachAsync { Resource srcDir ->

[MSG]The nested block depth is 6

NestedBlockDepth2120

[SRC]if(srcDir.exists()) {

[MSG]The nested block depth is 7

NestedBlockDepth2124

[SRC]try {

[MSG]The nested block depth is 8

NestedBlockDepth2133

[SRC]catch (e) {

[MSG]The nested block depth is 8

scripts/_GrailsPluginDev.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import groovy.xml.MarkupBuilder

UnusedImport319

[SRC]import org.codehaus.groovy.grails.compiler.support.Grail..LoaderHolder

UnusedImport320

[SRC]import grails.util.GrailsNameUtils

UnusedImport321

[SRC]import org.apache.commons.io.FilenameUtils

scripts/_GrailsPlugins.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [159.8]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [37]

NestedBlockDepth2248

[SRC]plugin.'release'.each {

[MSG]The nested block depth is 6

NestedBlockDepth2264

[SRC]if( release.'title'.text() ) {

[MSG]The nested block depth is 6

NestedBlockDepth2266

[SRC]} else {

[MSG]The nested block depth is 6

NestedBlockDepth2270

[SRC]if( release.'author'.text() ) {

[MSG]The nested block depth is 6

NestedBlockDepth2274

[SRC]if( release.'authorEmail'.text() ) {

[MSG]The nested block depth is 6

NestedBlockDepth2278

[SRC]if( release.'documentation'.text() ) {

[MSG]The nested block depth is 6

NestedBlockDepth2282

[SRC]if( release.'description'.text() ) {

[MSG]The nested block depth is 6

UnusedVariable2314

[SRC]def displayFullPluginInfo = { pluginName ->

scripts/_GrailsRun.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [125.8]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [30]

NestedBlockDepth2208

[SRC]if (scriptName) {

[MSG]The nested block depth is 6

NestedBlockDepth2253

[SRC]if (usingSecureServer) {

[MSG]The nested block depth is 6

NestedBlockDepth2256

[SRC]else {

[MSG]The nested block depth is 6

scripts/_GrailsSettings.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [141.4]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [24]

scripts/_GrailsTest.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [169.8]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [27]

NestedBlockDepth2130

[SRC]if (phaseName in ['integration', 'functional']) {

[MSG]The nested block depth is 6

NestedBlockDepth2137

[SRC]} else {

[MSG]The nested block depth is 6

NestedBlockDepth2157

[SRC]if (type.name in targetTypesForPhase || TEST_TYPE_WILDCA..sForPhase) {

[MSG]The nested block depth is 6

UnusedImport325

[SRC]import org.codehaus.groovy.grails.test.report.junit.JUni..portsFactory

scripts/_GrailsWar.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [226.7]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [37]

NestedBlockDepth2181

[SRC]for(PluginInfo info in pluginInfos) {

[MSG]The nested block depth is 6

NestedBlockDepth2182

[SRC]fileset(dir: info.pluginDir.file.path) {

[MSG]The nested block depth is 7

NestedBlockDepth2279

[SRC]if(!addedResources.contains(name)) {

[MSG]The nested block depth is 6

NestedBlockDepth2282

[SRC]} else {

[MSG]The nested block depth is 6

NestedBlockDepth2294

[SRC]if(supportsScope) {

[MSG]The nested block depth is 6

NestedBlockDepth2297

[SRC]if(!addedPlugins.contains(name)) {

[MSG]The nested block depth is 7

NestedBlockDepth2328

[SRC]fileset(dir:pluginBase.absolutePath) {

[MSG]The nested block depth is 6

NestedBlockDepth2334

[SRC]if(pluginResources.exists()) {

[MSG]The nested block depth is 6

NestedBlockDepth2335

[SRC]fileset(dir:pluginResources) {

[MSG]The nested block depth is 7

NestedBlockDepth2350

[SRC]fileset(dir:"${pluginBase.absolutePath}/grails-app/conf") {

[MSG]The nested block depth is 6

NestedBlockDepth2357

[SRC]fileset(dir:"${pluginBase.absolutePath}/src/java") {

[MSG]The nested block depth is 6

scripts/_PackagePlugins.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [run] is [60.5]

scripts/_PluginDependencies.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock21305

[SRC]catch(e) {

AbcComplexity2

[MSG]The ABC score for method [run] is [622.9]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [run] is [155]

NestedBlockDepth2422

[SRC]for(File dir in pluginResources.file) {

[MSG]The nested block depth is 6

NestedBlockDepth2423

[SRC]if (dir.exists() && dir.isDirectory()) {

[MSG]The nested block depth is 7

NestedBlockDepth2525

[SRC]method(name:m.name, artefact:m.artefact, type:m.type?.name) {

[MSG]The nested block depth is 6

NestedBlockDepth2527

[SRC]if(m.arguments) {

[MSG]The nested block depth is 7

NestedBlockDepth2528

[SRC]for(arg in m.arguments) {

[MSG]The nested block depth is 8

NestedBlockDepth2535

[SRC]'static-method'(name:m.name, artefact:m.artefact, type:m.type?.name) {

[MSG]The nested block depth is 6

NestedBlockDepth2537

[SRC]if(m.arguments) {

[MSG]The nested block depth is 7

NestedBlockDepth2538

[SRC]for(arg in m.arguments) {

[MSG]The nested block depth is 8

NestedBlockDepth2545

[SRC]property(name:p.name, type:p?.type?.name, artefact:p.artefact) {

[MSG]The nested block depth is 6

NestedBlockDepth2586

[SRC]if(grailsApp == null) {

[MSG]The nested block depth is 6

NestedBlockDepth2603

[SRC]if(plugin) {

[MSG]The nested block depth is 6

NestedBlockDepth2609

[SRC]for(p in pluginManager.failedLoadPlugins) {

[MSG]The nested block depth is 6

NestedBlockDepth2738

[SRC]if (remoteRevision > localRevision) {

[MSG]The nested block depth is 6

NestedBlockDepth2742

[SRC]repo.getDir('', -1,null,(Collection)null).each() { entry ->

[MSG]The nested block depth is 7

NestedBlockDepth2744

[SRC]if (entry.name.startsWith(PREFIX)) {

[MSG]The nested block depth is 8

NestedBlockDepth2755

[SRC]line.eachMatch(/Revision (.*):/) {

[MSG]The nested block depth is 6

NestedBlockDepth2758

[SRC]if (remoteRevision > localRevision) {

[MSG]The nested block depth is 6

NestedBlockDepth2763

[SRC]while(line=reader.readLine()) {

[MSG]The nested block depth is 7

NestedBlockDepth2764

[SRC]line.eachMatch(/<li><a href="grails-(.+?)">/) {

[MSG]The nested block depth is 8

NestedBlockDepth2946

[SRC]def release = plugin.'release'.find {rel -> rel.'@versio..ginRelease }

[MSG]The nested block depth is 6

NestedBlockDepth2947

[SRC]if (release) {

[MSG]The nested block depth is 6

NestedBlockDepth2949

[SRC]} else {

[MSG]The nested block depth is 6

NestedBlockDepth21101

[SRC]if(installVersion == '*') {

[MSG]The nested block depth is 6

NestedBlockDepth21115

[SRC]if (!GrailsPluginUtils.isValidVersion(dependencyVersion,..pVersion)) {

[MSG]The nested block depth is 6

NestedBlockDepth21118

[SRC]else {

[MSG]The nested block depth is 6

NestedBlockDepth21148

[SRC].localFile.each { File dep ->

[MSG]The nested block depth is 6

NestedBlockDepth21150

[SRC]if(!settings.runtimeDependencies.contains(dep)) {

[MSG]The nested block depth is 7

NestedBlockDepth21154

[SRC]if(!urls.contains(url)) {

[MSG]The nested block depth is 7

UnusedVariable2577

[SRC]def application

UnusedVariable21435

[SRC]def ver = repo.getFile(file , (long)-1L, props , baos)

UnusedVariable2202

[SRC]ISVNAuthenticationManager aAuthManager

UnusedImport336

[SRC]import org.apache.commons.lang.ArrayUtils

UnusedImport355

[SRC]import org.codehaus.groovy.control.MultipleCompilationErrorsException

UnusedImport356

[SRC]import org.codehaus.groovy.control.CompilationFailedException

src/java/grails/doc

src/java/grails/doc/DocEngine.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2119

[SRC]catch (e) {

src/java/grails/doc/DocPublisher.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [publish] is [201.6]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [publish] is [26]

NestedBlockDepth2292

[SRC]new File("${refDocsDir}/ref/${f.name}/Usage.html").withW..ing) {out ->

[MSG]The nested block depth is 6

NestedBlockDepth2306

[SRC]new File("${refDocsDir}/ref/${f.name}/${name}.html").wit..ing) {out ->

[MSG]The nested block depth is 6

MethodSize394

[MSG]Method "publish" is 231 lines

src/java/grails/doc/filters

src/java/grails/doc/filters/HeaderFilter.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport37

[SRC]import org.radeox.filter.regex.RegexFilter

src/java/grails/doc/filters/LinkTestFilter.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable239

[SRC]Writer writer = new StringBufferWriter(buffer);

UnusedImport312

[SRC]import org.radeox.filter.interwiki.InterWiki

src/java/grails/test

src/java/grails/test/AbstractCliTestCase.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2127

[SRC]catch (InterruptedException ex) {

UnusedPrivateField220

[SRC]private final Condition waiting = lock.newCondition()

UnusedVariable2117

[SRC]final monitor = "monitor"

src/java/grails/test/GrailsUnitTestCase.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import org.codehaus.groovy.grails.commons.DefaultGrailsCodecClass

src/java/grails/test/GrailsUrlMappingsTestCase.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import grails.util.GrailsWebUtil

UnusedImport320

[SRC]import org.codehaus.groovy.grails.commons.DefaultGrailsApplication

UnusedImport321

[SRC]import org.codehaus.groovy.grails.commons.GrailsApplication

UnusedImport323

[SRC]import org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin

UnusedImport324

[SRC]import org.codehaus.groovy.grails.plugins.web.mapping.Ur..GrailsPlugin

UnusedImport325

[SRC]import org.codehaus.groovy.grails.support.MockApplicationContext

UnusedImport328

[SRC]import org.codehaus.groovy.grails.web.multipart.ContentL..partResolver

UnusedImport330

[SRC]import org.springframework.web.context.WebApplicationContext

UnusedImport332

[SRC]import org.springframework.web.servlet.DispatcherServlet

UnusedImport334

[SRC]import org.springframework.web.context.ServletContextAware

UnusedImport335

[SRC]import javax.servlet.ServletContext

src/java/grails/test/MockUtils.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [mockController] is [89.8]

AbcComplexity2

[MSG]The ABC score for method [addValidateMethod] is [68.7]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [processInstances] is [24]

ClassSize349

[MSG]Class "MockUtils" is 1108 lines

MethodSize395

[MSG]Method "mockController" is 136 lines

MethodSize3803

[MSG]Method "addValidateMethod" is 125 lines

src/java/grails/test/MvcUnitTestCase.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport324

[SRC]import grails.util.GrailsWebUtil

UnusedImport325

[SRC]import org.springframework.mock.web.MockServletContext

UnusedImport328

[SRC]import grails.util.GrailsNameUtils

src/java/grails/util

src/java/grails/util/BuildSettings.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage318

[SRC]import grails.util.Metadata

src/java/grails/util/PluginBuildSettings.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2112

[SRC]catch (e) {

NestedBlockDepth2179

[SRC]if(info) {

[MSG]The nested block depth is 6

ImportFromSamePackage318

[SRC]import grails.util.BuildScope

ImportFromSamePackage319

[SRC]import grails.util.BuildSettings

ImportFromSamePackage320

[SRC]import grails.util.Environment

ImportFromSamePackage321

[SRC]import grails.util.GrailsNameUtils

src/java/org/codehaus/groovy/grails/commons/cfg

src/java/org/codehaus/groovy/grails/commons/cfg/ConfigurationHelper.groovy

Rule NamePriorityLine #Source Line / Message
NestedBlockDepth2114

[SRC]if(classLoader) {

[MSG]The nested block depth is 6

NestedBlockDepth2120

[SRC]if(resource.filename.endsWith('.groovy')) {

[MSG]The nested block depth is 6

NestedBlockDepth2124

[SRC]else if(resource.filename.endsWith('.properties')) {

[MSG]The nested block depth is 6

UnusedImport327

[SRC]import org.apache.log4j.helpers.LogLog

src/java/org/codehaus/groovy/grails/compiler

src/java/org/codehaus/groovy/grails/compiler/GrailsCompiler.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import org.codehaus.groovy.control.CompilerConfiguration

UnusedImport323

[SRC]import org.apache.tools.ant.BuildException

UnusedImport324

[SRC]import org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit

UnusedImport325

[SRC]import org.codehaus.groovy.tools.ErrorReporter

UnusedImport326

[SRC]import org.apache.tools.ant.AntClassLoader

UnusedImport329

[SRC]import org.apache.commons.lang.ArrayUtils

UnusedImport330

[SRC]import org.codehaus.groovy.grails.commons.GrailsApplication

UnusedImport332

[SRC]import grails.util.BuildSettingsHolder

src/java/org/codehaus/groovy/grails/orm/hibernate/cfg

src/java/org/codehaus/groovy/grails/orm/hibernate/cfg/HibernateMappingBuilder.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [handleMethodMissing] is [137.8]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [handleMethodMissing] is [42]

src/java/org/codehaus/groovy/grails/orm/hibernate/cfg/HibernateNamedQueriesBuilder.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField260

[SRC]private handleMethodMissing = {String name, args ->

src/java/org/codehaus/groovy/grails/orm/hibernate/support

src/java/org/codehaus/groovy/grails/orm/hibernate/support/ClosureEventTriggeringInterceptor.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryTernaryExpression381

[SRC]boolean shouldTimestamp = m && !m.autoTimestamp ? false : true

UnnecessaryTernaryExpression3149

[SRC]boolean shouldTimestamp = m && !m.autoTimestamp ? false : true

src/java/org/codehaus/groovy/grails/plugins

src/java/org/codehaus/groovy/grails/plugins/CodecsGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import grails.util.GrailsUtil

src/java/org/codehaus/groovy/grails/plugins/DomainClassGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [addRelationshipManagementMethods] is [84.1]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [addRelationshipManagementMethods] is [27]

NestedBlockDepth2233

[SRC]if(otherSide.oneToMany || otherSide.manyToMany) {

[MSG]The nested block depth is 6

NestedBlockDepth2235

[SRC]if (!obj[name]) {

[MSG]The nested block depth is 7

NestedBlockDepth2240

[SRC]else {

[MSG]The nested block depth is 6

NestedBlockDepth2249

[SRC]if (prop.bidirectional) {

[MSG]The nested block depth is 6

NestedBlockDepth2250

[SRC]if (prop.manyToMany) {

[MSG]The nested block depth is 7

NestedBlockDepth2254

[SRC]else {

[MSG]The nested block depth is 7

src/java/org/codehaus/groovy/grails/plugins/DomainClassPluginSupport.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport320

[SRC]import org.springframework.validation.ObjectError

src/java/org/codehaus/groovy/grails/plugins/GrailsPluginUtils.groovy

Rule NamePriorityLine #Source Line / Message
EqualsAndHashCode2353

[SRC]class VersionComparator implements Comparator{

ImportFromSamePackage322

[SRC]import org.codehaus.groovy.grails.plugins.InvalidVersionException

ImportFromSamePackage323

[SRC]import org.codehaus.groovy.grails.plugins.PluginInfo

ImportFromSamePackage324

[SRC]import org.codehaus.groovy.grails.plugins.PluginManagerHolder

src/java/org/codehaus/groovy/grails/plugins/ValidationGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage322

[SRC]import org.codehaus.groovy.grails.plugins.DomainClassPluginSupport

src/java/org/codehaus/groovy/grails/plugins/codecs

src/java/org/codehaus/groovy/grails/plugins/codecs/Base64Codec.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport320

[SRC]import org.codehaus.groovy.runtime.DefaultGroovyMethods

src/java/org/codehaus/groovy/grails/plugins/codecs/SHA256Codec.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import java.security.MessageDigest

src/java/org/codehaus/groovy/grails/plugins/codecs/URLCodec.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGroovyImport319

[SRC]import java.net.URLEncoder

UnnecessaryGroovyImport320

[SRC]import java.net.URLDecoder

src/java/org/codehaus/groovy/grails/plugins/converters

src/java/org/codehaus/groovy/grails/plugins/converters/ConvertersGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable297

[SRC]def json = (value instanceof JSON || value instanceof JS..SON(value));

UnusedImport332

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest

src/java/org/codehaus/groovy/grails/plugins/datasource

src/java/org/codehaus/groovy/grails/plugins/datasource/DataSourceGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [doWithSpring] is [73.6]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [doWithSpring] is [35]

NestedBlockDepth270

[SRC]if(encryptionCodec instanceof Class) {

[MSG]The nested block depth is 6

NestedBlockDepth271

[SRC]try {

[MSG]The nested block depth is 7

NestedBlockDepth274

[SRC]catch (Exception e) {

[MSG]The nested block depth is 7

NestedBlockDepth278

[SRC]else {

[MSG]The nested block depth is 6

NestedBlockDepth280

[SRC]def codecClass = application.codecClasses.find { it.name..odec}?.clazz

[MSG]The nested block depth is 7

NestedBlockDepth281

[SRC]try {

[MSG]The nested block depth is 7

NestedBlockDepth282

[SRC]if(!codecClass) {

[MSG]The nested block depth is 8

NestedBlockDepth285

[SRC]if(codecClass) {

[MSG]The nested block depth is 8

NestedBlockDepth288

[SRC]else {

[MSG]The nested block depth is 8

NestedBlockDepth292

[SRC]catch (ClassNotFoundException e) {

[MSG]The nested block depth is 7

NestedBlockDepth295

[SRC]catch(Exception e) {

[MSG]The nested block depth is 7

NestedBlockDepth2126

[SRC]dataSourceProperties.each { entry ->

[MSG]The nested block depth is 6

NestedBlockDepth2127

[SRC]if(log.debugEnabled) {

[MSG]The nested block depth is 7

src/java/org/codehaus/groovy/grails/plugins/i18n

src/java/org/codehaus/groovy/grails/plugins/i18n/I18nGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import grails.util.GrailsUtil

src/java/org/codehaus/groovy/grails/plugins/logging

src/java/org/codehaus/groovy/grails/plugins/logging/Log4jConfig.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport329

[SRC]import org.apache.log4j.net.SMTPAppender

UnusedImport330

[SRC]import grails.util.GrailsUtil

src/java/org/codehaus/groovy/grails/plugins/orm/hibernate

src/java/org/codehaus/groovy/grails/plugins/orm/hibernate/HibernatePluginSupport.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2908

[SRC]} catch (org.springframework.beans.TypeMismatchException e) {

EmptyCatchBlock2939

[SRC]} catch (FileNotFoundException fnfe) {

ThrowExceptionFromFinallyBlock2894

[SRC]throw e

AbcComplexity2

[MSG]The ABC score for method [addQueryMethods] is [211.6]

AbcComplexity2

[MSG]The ABC score for method [addBasicPersistenceMethods] is [72.2]

AbcComplexity2

[MSG]The ABC score for method [doWithSpring] is [127.6]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [doWithSpring] is [38]

UnusedVariable2156

[SRC]def cacheClass = getClass().classLoader.loadClass(cacheProvider)

UnusedVariable2356

[SRC]MetaClass emc = GroovySystem.metaClassRegistry.getMetaClass(dc.clazz)

UnusedVariable2509

[SRC]def Class domainClassType = dc.clazz

UnusedVariable2511

[SRC]ClassLoader classLoader = application.classLoader

DuplicateImport321

[SRC]import org.apache.commons.logging.Log;

DuplicateImport322

[SRC]import org.codehaus.groovy.grails.commons.GrailsApplication;

DuplicateImport323

[SRC]import org.codehaus.groovy.grails.commons.GrailsDomainClass;

DuplicateImport324

[SRC]import org.hibernate.SessionFactory;

DuplicateImport326

[SRC]import org.springframework.context.ApplicationContext;

DuplicateImport325

[SRC]import org.hibernate.proxy.HibernateProxy;

UnnecessaryGroovyImport319

[SRC]import java.util.Map;

UnusedImport334

[SRC]import org.codehaus.groovy.grails.commons.spring.WebRunt..onfiguration

UnusedImport364

[SRC]import org.hibernate.proxy.LazyInitializer

MethodSize3555

[MSG]Method "addQueryMethods" is 208 lines

MethodSize3780

[MSG]Method "addBasicPersistenceMethods" is 103 lines

src/java/org/codehaus/groovy/grails/plugins/scaffolding

src/java/org/codehaus/groovy/grails/plugins/scaffolding/ScaffoldingGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2154

[SRC]catch (Exception e) {

NestedBlockDepth298

[SRC]metaClass."${GrailsClassUtils.getGetterName(propertyName)}" = {->

[MSG]The nested block depth is 6

src/java/org/codehaus/groovy/grails/plugins/testing

src/java/org/codehaus/groovy/grails/plugins/testing/GrailsMockErrors.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.commons.GrailsClassUtils

src/java/org/codehaus/groovy/grails/plugins/web

src/java/org/codehaus/groovy/grails/plugins/web/ControllersGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [registerControllerMethods] is [81.5]

AbcComplexity2

[MSG]The ABC score for method [doWithDynamicMethods] is [107.5]

NestedBlockDepth2258

[SRC]try {

[MSG]The nested block depth is 6

NestedBlockDepth2260

[SRC]if (counter < commandObjects.size()) {

[MSG]The nested block depth is 7

NestedBlockDepth2261

[SRC]if (paramType.isInstance(commandObjects[counter])) {

[MSG]The nested block depth is 8

NestedBlockDepth2266

[SRC]if (!commandObject) {

[MSG]The nested block depth is 7

NestedBlockDepth2275

[SRC]constrainedProperties.each {constrainedProperty ->

[MSG]The nested block depth is 7

NestedBlockDepth2280

[SRC]} catch (Exception e) {

[MSG]The nested block depth is 6

UnusedVariable2112

[SRC]def basedir = System.getProperty("base.dir")

UnusedVariable2224

[SRC]Class controllerClass = controller.clazz

UnusedVariable2197

[SRC]def registry = GroovySystem.getMetaClassRegistry()

src/java/org/codehaus/groovy/grails/plugins/web/GroovyPagesGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [doWithSpring] is [86.4]

AbcComplexity2

[MSG]The ABC score for method [doWithDynamicMethods] is [80.7]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [doWithDynamicMethods] is [21]

UnusedPrivateMethod2378

[SRC]private PluginBuildSettings createPluginSettings() {

UnnecessaryGroovyImport323

[SRC]import groovy.lang.MetaClass

UnusedImport336

[SRC]import org.springframework.core.io.FileSystemResource

src/java/org/codehaus/groovy/grails/plugins/web/ServletsGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [doWithDynamicMethods] is [102.7]

AbcComplexity2

[MSG]The ABC score for class [org.codehaus.groovy.grails.plugins.web.ServletsGrailsPlugin] is [102.7]

src/java/org/codehaus/groovy/grails/plugins/web/filters

src/java/org/codehaus/groovy/grails/plugins/web/filters/FiltersGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage317

[SRC]import org.codehaus.groovy.grails.plugins.web.filters.Fi..efactHandler

ImportFromSamePackage318

[SRC]import org.codehaus.groovy.grails.plugins.web.filters.Fi..ndlerAdapter

src/java/org/codehaus/groovy/grails/plugins/web/mimes

src/java/org/codehaus/groovy/grails/plugins/web/mimes/MimeTypesGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
NestedBlockDepth2138

[SRC]if(formats.containsKey(mime.extension)) {

[MSG]The nested block depth is 6

UnusedVariable2122

[SRC]def mimeTypes = req.mimeTypes

src/java/org/codehaus/groovy/grails/plugins/web/taglib

src/java/org/codehaus/groovy/grails/plugins/web/taglib/FormTagLib.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2696

[SRC]} catch (Exception) {

AbcComplexity2

[MSG]The ABC score for method [datePicker] is [97.2]

AbcComplexity2

[MSG]The ABC score for method [select] is [65.8]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [datePicker] is [39]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [select] is [23]

src/java/org/codehaus/groovy/grails/plugins/web/taglib/FormatTagLib.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [formatNumber] is [69.0]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [formatNumber] is [26]

UnnecessaryGroovyImport323

[SRC]import java.util.Currency

UnnecessaryGroovyImport324

[SRC]import java.util.Locale;

UnnecessaryGroovyImport325

[SRC]import java.util.TimeZone;

src/java/org/codehaus/groovy/grails/plugins/web/taglib/JavascriptTagLib.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport317

[SRC]import org.springframework.validation.Errors;

UnusedImport318

[SRC]import org.springframework.context.NoSuchMessageException;

UnusedImport319

[SRC]import org.springframework.web.servlet.support.RequestCo..tils as RCU;

UnusedImport320

[SRC]import org.codehaus.groovy.grails.commons.GrailsClassUtils as GCU

src/java/org/codehaus/groovy/grails/plugins/web/taglib/RenderTagLib.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [paginate] is [84.3]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [paginate] is [28]

CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [render] is [23]

UnusedImport320

[SRC]import com.opensymphony.module.sitemesh.RequestConstants

src/java/org/codehaus/groovy/grails/plugins/web/taglib/SitemeshTagLib.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2137

[SRC]def content=captureTagContent(out, 'meta', attrs, body)

src/java/org/codehaus/groovy/grails/plugins/web/taglib/ValidationTagLib.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport330

[SRC]import org.springframework.context.MessageSourceAware

src/java/org/codehaus/groovy/grails/resolve

src/java/org/codehaus/groovy/grails/resolve/EnhancedDefaultDependencyDescriptor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport324

[SRC]import org.apache.ivy.core.module.descriptor.ModuleDescriptor

src/java/org/codehaus/groovy/grails/resolve/IvyDependencyManager.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [parseDependenciesInternal] is [21]

NestedBlockDepth2940

[SRC]if(!pluginExcludes[plugin]) {

[MSG]The nested block depth is 6

ImportFromSamePackage333

[SRC]import org.codehaus.groovy.grails.resolve.DependencyDefinitionParser

ImportFromSamePackage334

[SRC]import org.codehaus.groovy.grails.resolve.DependencyResolver

ImportFromSamePackage335

[SRC]import org.codehaus.groovy.grails.resolve.EnhancedDefaul..cyDescriptor

MethodSize3219

[MSG]Method "getDefaultDependencies" is 128 lines

src/java/org/codehaus/groovy/grails/scaffolding

src/java/org/codehaus/groovy/grails/scaffolding/DefaultGrailsTemplateGenerator.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethod2137

[SRC]private generateListView(domainClass, destDir) {

UnusedPrivateMethod2147

[SRC]private generateShowView(domainClass, destDir) {

UnusedPrivateMethod2157

[SRC]private generateEditView(domainClass, destDir) {

UnusedPrivateMethod2167

[SRC]private generateCreateView(domainClass, destDir) {

ImportFromSamePackage325

[SRC]import org.codehaus.groovy.grails.scaffolding.DomainClas..tyComparator

ImportFromSamePackage326

[SRC]import org.codehaus.groovy.grails.scaffolding.GrailsTemplateGenerator

UnusedImport325

[SRC]import org.codehaus.groovy.grails.scaffolding.DomainClas..tyComparator

src/java/org/codehaus/groovy/grails/support

src/java/org/codehaus/groovy/grails/support/DevelopmentShutdownHook.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport320

[SRC]import org.apache.commons.logging.Log

UnusedImport321

[SRC]import org.apache.commons.logging.LogFactory

src/java/org/codehaus/groovy/grails/test/junit3

src/java/org/codehaus/groovy/grails/test/junit3/JUnit3GrailsEnvironmentTestSuite.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport325

[SRC]import java.util.regex.Matcher

UnusedImport326

[SRC]import java.util.regex.Pattern

src/java/org/codehaus/groovy/grails/test/support

src/java/org/codehaus/groovy/grails/test/support/ControllerNameExtractor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import grails.util.GrailsNameUtils

src/java/org/codehaus/groovy/grails/test/support/GrailsTestTransactionInterceptor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport320

[SRC]import org.springframework.web.context.request.RequestContextHolder

src/java/org/codehaus/groovy/grails/web/converters/configuration

src/java/org/codehaus/groovy/grails/web/converters/configuration/configtest.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage33

[SRC]import org.codehaus.groovy.grails.web.converters.configu..nInitializer

ImportFromSamePackage34

[SRC]import org.codehaus.groovy.grails.web.converters.configu..rationHolder

ImportFromSamePackage36

[SRC]import org.codehaus.groovy.grails.web.converters.configu..onfiguration

ImportFromSamePackage37

[SRC]import org.codehaus.groovy.grails.web.converters.configu..onfiguration

src/java/org/codehaus/groovy/grails/web/i18n

src/java/org/codehaus/groovy/grails/web/i18n/ParamsAwareLocaleChangeInterceptor.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport37

[SRC]import org.codehaus.groovy.grails.web.servlet.GrailsAppl..onAttributes

UnusedImport311

[SRC]import org.springframework.web.context.request.RequestContextHolder

src/java/org/codehaus/groovy/grails/web/mapping

src/java/org/codehaus/groovy/grails/web/mapping/ForwardUrlMappingInfo.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport317

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest

src/java/org/codehaus/groovy/grails/web/metaclass

src/java/org/codehaus/groovy/grails/web/metaclass/ChainMethod.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable226

[SRC]def id = args.id

src/java/org/codehaus/groovy/grails/web/metaclass/ForwardMethod.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport325

[SRC]import org.codehaus.groovy.grails.web.binding.DataBindingUtils

src/java/org/codehaus/groovy/grails/web/mime

src/java/org/codehaus/groovy/grails/web/mime/DefaultAcceptHeaderParser.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable239

[SRC]def qualifiedMimes = []

src/java/org/codehaus/groovy/grails/web/pages

src/java/org/codehaus/groovy/grails/web/pages/GroovyPageCompiler.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [compileGSP] is [64.8]

src/java/org/codehaus/groovy/grails/web/pages/GroovyPageCompilerTask.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage325

[SRC]import org.codehaus.groovy.grails.web.pages.GroovyPageCompiler

src/java/org/codehaus/groovy/grails/web/pages/ext/jsp

src/java/org/codehaus/groovy/grails/web/pages/ext/jsp/JspTagImpl.groovy

Rule NamePriorityLine #Source Line / Message
CyclomaticComplexity2

[MSG]The cyclomatic complexity for method [doTag] is [23]

NestedBlockDepth2112

[SRC]while(state != IterationTag.SKIP_BODY) {

[MSG]The nested block depth is 6

src/java/org/codehaus/groovy/grails/web/pages/ext/jsp/PageContextFactory.groovy

Rule NamePriorityLine #Source Line / Message
DuplicateImport317

[SRC]import javax.servlet.jsp.PageContext as PC

DuplicateImport322

[SRC]import org.codehaus.groovy.grails.web.servlet.GrailsAppl..butes as GAA

UnusedImport317

[SRC]import javax.servlet.jsp.PageContext as PC

UnusedImport322

[SRC]import org.codehaus.groovy.grails.web.servlet.GrailsAppl..butes as GAA

src/java/org/codehaus/groovy/grails/web/pages/ext/jsp/TagLibraryResolver.groovy

Rule NamePriorityLine #Source Line / Message
NestedBlockDepth2169

[SRC]if (token == XmlPullParser.START_TAG && "uri".equals(pul..etName())) {

[MSG]The nested block depth is 6

NestedBlockDepth2179

[SRC]if (tagLibURI == uri) {

[MSG]The nested block depth is 6

src/java/org/codehaus/groovy/grails/web/plugins/support

src/java/org/codehaus/groovy/grails/web/plugins/support/WebMetaUtils.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport320

[SRC]import org.springframework.beans.BeanWrapperImpl

UnusedImport325

[SRC]import org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody

src/java/org/codehaus/groovy/grails/web/servlet/mvc

src/java/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMap.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethod2266

[SRC]private Byte 'byte'(String name) { getByte(name) }

UnusedPrivateMethod2272

[SRC]private Integer 'int'(String name) { getInt(name) }

UnusedPrivateMethod2279

[SRC]private Long 'long'(String name) { getLong(name) }

UnusedPrivateMethod2286

[SRC]private Short 'short'(String name) { getShort(name) }

UnusedPrivateMethod2293

[SRC]private Double 'double'(String name) { getDouble(name) }

UnusedPrivateMethod2300

[SRC]private Float 'float'(String name) { getFloat(name) }

UnusedPrivateMethod2307

[SRC]private Boolean 'boolean'(String name) {

UnnecessaryGroovyImport318

[SRC]import groovy.lang.GString;

UnnecessaryGroovyImport329

[SRC]import java.io.UnsupportedEncodingException;

UnusedImport318

[SRC]import groovy.lang.GString;

UnusedImport323

[SRC]import org.codehaus.groovy.grails.web.binding.Structured..pertyEditor;

src/java/org/codehaus/groovy/grails/web/taglib

src/java/org/codehaus/groovy/grails/web/taglib/GroovyPageAttributes.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateMethod249

[SRC]private Byte 'byte'(String name) { getByte(name) }

UnusedPrivateMethod255

[SRC]private Integer 'int'(String name) { getInt(name) }

UnusedPrivateMethod262

[SRC]private Long 'long'(String name) { getLong(name) }

UnusedPrivateMethod269

[SRC]private Short 'short'(String name) { getShort(name) }

UnusedPrivateMethod276

[SRC]private Double 'double'(String name) { getDouble(name) }

UnusedPrivateMethod283

[SRC]private Float 'float'(String name) { getFloat(name) }

UnusedPrivateMethod290

[SRC]private Boolean 'boolean'(String name) {

src/java/org/codehaus/groovy/grails/web/taglib/NamespacedTagDispatcher.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport319

[SRC]import org.codehaus.groovy.grails.commons.TagLibArtefactHandler

src/java/org/codehaus/groovy/grails/web/util

src/java/org/codehaus/groovy/grails/web/util/TypeConvertingMap.groovy

Rule NamePriorityLine #Source Line / Message
CloneableWithoutClone225

[SRC]class TypeConvertingMap implements Map, Cloneable{

EmptyCatchBlock254

[SRC]catch (NumberFormatException e) {

EmptyCatchBlock274

[SRC]catch (NumberFormatException e) {

EmptyCatchBlock293

[SRC]catch (NumberFormatException e) {

EmptyCatchBlock2114

[SRC]catch (NumberFormatException e) {

EmptyCatchBlock2136

[SRC]catch (NumberFormatException e) {

EmptyCatchBlock2157

[SRC]catch (NumberFormatException e) {

EmptyCatchBlock2178

[SRC]catch (e) {

src/java/org/codehaus/groovy/grails/webflow

src/java/org/codehaus/groovy/grails/webflow/WebFlowPluginSupport.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport320

[SRC]import org.codehaus.groovy.grails.webflow.engine.builder..FlowRegistry

UnusedImport325

[SRC]import org.codehaus.groovy.grails.webflow.persistence.Fl..ssionContext

UnusedImport326

[SRC]import org.codehaus.groovy.grails.webflow.persistence.Se..tionListener

UnusedImport340

[SRC]import org.springframework.webflow.execution.factory.Sta..stenerLoader

src/java/org/codehaus/groovy/grails/webflow/context/servlet

src/java/org/codehaus/groovy/grails/webflow/context/servlet/GrailsFlowUrlHandler.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport328

[SRC]import org.springframework.webflow.execution.repository...nRepository;

src/java/org/codehaus/groovy/grails/webflow/engine/builder

src/java/org/codehaus/groovy/grails/webflow/engine/builder/ClosureExpression.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable239

[SRC]def attrs = context?.attributes ? context.attributes : [:]

src/java/org/codehaus/groovy/grails/webflow/engine/builder/ClosureInvokingAction.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2167

[SRC]catch(MissingPropertyException) {

UnusedPrivateField252

[SRC]private static final String RESULT = "result";

UnnecessaryGroovyImport317

[SRC]import groovy.lang.Closure;

UnnecessaryGroovyImport318

[SRC]import groovy.lang.GroovyObject;

UnnecessaryGroovyImport319

[SRC]import groovy.lang.MetaClass;

UnnecessaryGroovyImport320

[SRC]import groovy.lang.MetaMethod;

UnnecessaryGroovyImport335

[SRC]import java.util.Map

UnusedImport323

[SRC]import org.codehaus.groovy.runtime.InvokerHelper;

UnusedImport331

[SRC]import org.codehaus.groovy.grails.validation.metaclass.C..amicProperty

src/java/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilder.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2259

[SRC]} catch (MissingPropertyException mpe) {

EmptyCatchBlock2268

[SRC]} catch (MissingPropertyException mpe) {

AbcComplexity2

[MSG]The ABC score for method [invokeMethod] is [95.3]

NestedBlockDepth2266

[SRC]try {

[MSG]The nested block depth is 6

NestedBlockDepth2268

[SRC]} catch (MissingPropertyException mpe) {

[MSG]The nested block depth is 6

MethodSize3112

[MSG]Method "invokeMethod" is 123 lines

src/test/grails/spring

src/test/grails/spring/BeanBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2646

[SRC]def dataSource = ctx.getBean("dataSource")

src/test/grails/test

src/test/grails/test/GrailsUnitTestCaseTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport321

[SRC]import junit.framework.AssertionFailedError

src/test/grails/test/GrailsUrlMappingsTestCaseTests.groovy

Rule NamePriorityLine #Source Line / Message
EqualsAndHashCode2361

[SRC]class MockUrlMapping implements UrlMapping {

UnusedImport313

[SRC]import org.codehaus.groovy.grails.web.mapping.DefaultUrlMappingsHolder

UnusedImport316

[SRC]import org.codehaus.groovy.grails.web.mapping.RegexUrlMapping

UnusedImport319

[SRC]import org.codehaus.groovy.grails.web.mapping.AbstractUrlMapping

src/test/grails/test/MockUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
EqualsAndHashCode21456

[SRC]class TestDomain {

EqualsAndHashCode21519

[SRC]class TestDomainWithUUID {

JUnitSetUpCallsSuper233

[SRC]void setUp() {

JUnitTearDownCallsSuper243

[SRC]void tearDown() {

AbcComplexity2

[MSG]The ABC score for method [testDynamicFinders] is [75.2]

AbcComplexity2

[MSG]The ABC score for method [testConstraintValidation] is [96.4]

ClassSize329

[MSG]Class "MockUtilsTests" is 1344 lines

MethodSize3117

[MSG]Method "testDynamicFinders" is 105 lines

MethodSize3625

[MSG]Method "testConstraintValidation" is 109 lines

src/test/grails/util

src/test/grails/util/BuildScopeTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper29

[SRC]protected void tearDown() {

src/test/grails/util/BuildSettingsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper214

[SRC]void setUp() {

JUnitTearDownCallsSuper227

[SRC]void tearDown() {

src/test/grails/util/EnvironmentTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper211

[SRC]protected void tearDown() {

src/test/grails/util/PluginBuildSettingsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]PluginBuildSettings createPluginBuildSettings() {

UnusedVariable222

[SRC]def sourceFiles = pluginSettings.getPluginSourceFiles()

src/test/org/codehaus/groovy/grails/cli

src/test/org/codehaus/groovy/grails/cli/AbstractCliTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper242

[SRC]void setUp() {

JUnitTearDownCallsSuper251

[SRC]void tearDown() {

AbcComplexity2

[MSG]The ABC score for method [gantRun] is [72.9]

src/test/org/codehaus/groovy/grails/cli/CreateControllerTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod227

[SRC]void tryController(String className) {

JUnitPublicNonTestMethod231

[SRC]void tryController(String scriptArg, String className) {

src/test/org/codehaus/groovy/grails/cli/CreateDomainClassTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]void tryDomain(String className) {

JUnitPublicNonTestMethod218

[SRC]void tryDomain(String scriptArg, String className) {

src/test/org/codehaus/groovy/grails/cli/CreateIntegrationTestTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]void tryIntegrationTest(String className) {

JUnitPublicNonTestMethod218

[SRC]void tryIntegrationTest(String scriptArg, String className) {

src/test/org/codehaus/groovy/grails/cli/CreateScriptTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod213

[SRC]void tryScript(String className) {

JUnitPublicNonTestMethod217

[SRC]void tryScript(String scriptArg, String className) {

src/test/org/codehaus/groovy/grails/cli/CreateServiceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]void tryService(String className) {

JUnitPublicNonTestMethod218

[SRC]void tryService(String scriptArg, String className) {

src/test/org/codehaus/groovy/grails/cli/CreateTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]void tryTagLib(String className) {

JUnitPublicNonTestMethod218

[SRC]void tryTagLib(String scriptArg, String className) {

src/test/org/codehaus/groovy/grails/cli/CreateUnitTestTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]void tryUnitTest(String className) {

JUnitPublicNonTestMethod218

[SRC]void tryUnitTest(String scriptArg, String className) {

src/test/org/codehaus/groovy/grails/cli/GenerateAllTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod241

[SRC]void tryGenerate(String className) {

JUnitPublicNonTestMethod245

[SRC]void tryGenerate(String scriptArg, String className) {

src/test/org/codehaus/groovy/grails/cli/support

src/test/org/codehaus/groovy/grails/cli/support/GrailsBuildHelperTests.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [testExecutionWithCustomSettings] is [60.9]

src/test/org/codehaus/groovy/grails/commons

src/test/org/codehaus/groovy/grails/commons/DefaultArtefactInfoTests.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [testAddGrailsClass] is [76.4]

AbcComplexity2

[MSG]The ABC score for class [org.codehaus.groovy.grails.commons.DefaultArtefactInfoTests] is [76.4]

src/test/org/codehaus/groovy/grails/commons/DefaultGrailsCodecClassTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper211

[SRC]protected void setUp() {

JUnitTearDownCallsSuper215

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/commons/DefaultGrailsControllerClassTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper210

[SRC]void setUp() {

JUnitTearDownCallsSuper214

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClassPropertyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper214

[SRC]void setUp() throws Exception {

UnnecessaryGroovyImport33

[SRC]import groovy.util.GroovyTestCase;

src/test/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClassTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2352

[SRC]catch(InvalidPropertyException ipe) {

JUnitSetUpCallsSuper212

[SRC]void setUp() {

JUnitTearDownCallsSuper216

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/commons/GrailsPluginManagerDescriptorTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable220

[SRC]def xml = new XmlSlurper().parseText(text)

src/test/org/codehaus/groovy/grails/commons/GrailsPluginManagerTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2147

[SRC]catch(PluginException pe) {

UnnecessaryGroovyImport33

[SRC]import java.io.IOException;

UnusedImport33

[SRC]import java.io.IOException;

UnusedImport39

[SRC]import org.springframework.context.support.GenericApplicationContext;

src/test/org/codehaus/groovy/grails/commons/metaclass

src/test/org/codehaus/groovy/grails/commons/metaclass/DynamicMethodsExpandoMetaClassTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport318

[SRC]import org.springframework.beans.BeanUtils

src/test/org/codehaus/groovy/grails/compiler

src/test/org/codehaus/groovy/grails/compiler/GrailsClassLoaderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.control.CompilerConfiguration

UnusedImport34

[SRC]import org.codehaus.groovy.grails.compiler.support.Grail..sourceLoader

src/test/org/codehaus/groovy/grails/context/support

src/test/org/codehaus/groovy/grails/context/support/PluginAwareResourceBundleMessageSourceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper219

[SRC]protected void setUp() {

JUnitTearDownCallsSuper223

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/documentation

src/test/org/codehaus/groovy/grails/documentation/MetadataGeneratingExpandoMetaClassTests.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [testGeneratedMetadata] is [74.9]

AbcComplexity2

[MSG]The ABC score for class [org.codehaus.groovy.grails.documentation.MetadataGeneratingExpandoMetaClassTests] is [74.9]

UnusedImport33

[SRC]import org.codehaus.groovy.grails.commons.ControllerArtefactHandler

UnusedImport34

[SRC]import groovy.xml.StreamingMarkupBuilder

src/test/org/codehaus/groovy/grails/orm/hibernate

src/test/org/codehaus/groovy/grails/orm/hibernate/AbstractGrailsHibernateTests.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [setUp] is [65.7]

src/test/org/codehaus/groovy/grails/orm/hibernate/AlternateTableMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod218

[SRC]void onSetUp() {

JUnitPublicNonTestMethod230

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/AutoFlushPropertyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod28

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/orm/hibernate/BidirectionalListMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper233

[SRC]protected void setUp() {

AbcComplexity2

[MSG]The ABC score for method [testIndexBackrefMapping] is [62.1]

AbcComplexity2

[MSG]The ABC score for method [testCollectionBackrefMapping] is [89.1]

AbcComplexity2

[MSG]The ABC score for method [testListMapping] is [147.2]

AbcComplexity2

[MSG]The ABC score for class [org.codehaus.groovy.grails.orm.hibernate.BidirectionalListMappingTests] is [60.1]

UnusedVariable269

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

UnusedVariable2107

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

UnusedVariable2162

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

UnusedVariable2184

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

UnusedVariable2204

[SRC]PersistentClass faqSection = config.getClassMapping("TestFaqSection")

UnusedVariable2300

[SRC]SimpleValue indexColumnValue = indexColumn.getValue()

src/test/org/codehaus/groovy/grails/orm/hibernate/BidirectionalListPersistTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.hibernate.Session

src/test/org/codehaus/groovy/grails/orm/hibernate/BidirectionalOneToManyWithInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable254

[SRC]def configItemClass = ga.getDomainClass("ConfigurationItem").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/BidirectionalOneToOneNoOwnerTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.commons.test.AbstractGrailsMockTests

UnusedImport34

[SRC]import org.codehaus.groovy.grails.commons.DefaultGrailsApplication

UnusedImport35

[SRC]import org.codehaus.groovy.grails.exceptions.GrailsDomainException

UnusedImport36

[SRC]import org.codehaus.groovy.grails.commons.GrailsDomainClass

src/test/org/codehaus/groovy/grails/orm/hibernate/CascadingDeleteBehaviour2Tests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod265

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/orm/hibernate/CascadingDeleteBehaviour3Tests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod247

[SRC]void onSetUp() {

UnusedImport313

[SRC]import org.codehaus.groovy.grails.commons.GrailsDomainClass

src/test/org/codehaus/groovy/grails/orm/hibernate/CascadingDeleteBehaviourTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod299

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/orm/hibernate/CascadingSaveAndUniqueConstraintTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable234

[SRC]def face = faceClass.newInstance(nose:noseClass.newInstance()).save()

src/test/org/codehaus/groovy/grails/orm/hibernate/CircularOneToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod222

[SRC]void onSetUp() {

JUnitPublicNonTestMethod236

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/CircularRelationshipTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod236

[SRC]void onTearDown() {}

JUnitPublicNonTestMethod238

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/orm/hibernate/CircularUnidirectionalOneToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod237

[SRC]void onSetUp() {

JUnitPublicNonTestMethod249

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ClassHeirarchyInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod238

[SRC]void onTearDown() {}

JUnitPublicNonTestMethod240

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ClosureMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod216

[SRC]void onSetUp() {

JUnitPublicNonTestMethod240

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ComponentDomainTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod223

[SRC]void onSetUp() {

JUnitPublicNonTestMethod244

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ComponentMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod272

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2112

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ComponentValidationTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty

src/test/org/codehaus/groovy/grails/orm/hibernate/ConstraintPropertyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod234

[SRC]void onSetUp() {

JUnitPublicNonTestMethod248

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ConstructorAutowiringTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod235

[SRC]void onSetUp() {

JUnitPublicNonTestMethod272

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/CreateCriteriaTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod226

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/orm/hibernate/CreateMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod222

[SRC]void onSetUp() {

JUnitPublicNonTestMethod234

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/CriteriaListDistinctTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable238

[SRC]def Plant = ga.getDomainClass("Plant").clazz

UnusedVariable277

[SRC]def Plant = ga.getDomainClass("Plant").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/CustomCascadeMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable238

[SRC]def twoClass = ga.getDomainClass("CustomCascadeMappingTwo").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/DataBindingDynamicConstructorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]void onSetUp() {

JUnitPublicNonTestMethod237

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/DeepHeirarchyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod288

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2112

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/DefaultSortOrderForCollectionTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable233

[SRC]def Book = ga.getDomainClass("DefaultSortOrderForCollect..Book").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/DeleteFromCollectionTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable230

[SRC]def bookClass = ga.getDomainClass("DeleteBook").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/DeleteMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod231

[SRC]void onSetUp() {

JUnitPublicNonTestMethod243

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/DiscriminatorColumnMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable247

[SRC]def Child2 = ga.getDomainClass("Child2").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/DomainEventsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2180

[SRC]void onSetUp() {

UnusedVariable2157

[SRC]def success = false

src/test/org/codehaus/groovy/grails/orm/hibernate/DomainEventsWithMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2168

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/orm/hibernate/DynamicFinderOrTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod252

[SRC]void onSetUp() {

JUnitPublicNonTestMethod273

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/EagerFindByQueryTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable234

[SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz

UnusedVariable252

[SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz

UnusedVariable270

[SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz

UnusedVariable287

[SRC]def tagClass = ga.getDomainClass("EagerFindByQueryTag").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/EnumToStringTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod29

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ExecuteUpdateTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod228

[SRC]def init() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ExistsTests.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage33

[SRC]import org.codehaus.groovy.grails.orm.hibernate.Abstract..bernateTests

src/test/org/codehaus/groovy/grails/orm/hibernate/FindMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod27

[SRC]void onSetUp() {

UnnecessaryGroovyImport33

[SRC]import groovy.util.GroovyTestCase;

UnusedImport33

[SRC]import groovy.util.GroovyTestCase;

src/test/org/codehaus/groovy/grails/orm/hibernate/HibernateCriteriaBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod245

[SRC]List retrieveListOfNames() {

UnusedImport34

[SRC]import org.codehaus.groovy.runtime.InvokerInvocationException

ClassSize314

[MSG]Class "HibernateCriteriaBuilderTests" is 1445 lines

src/test/org/codehaus/groovy/grails/orm/hibernate/InheritanceQueryingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod228

[SRC]void onSetUp() {

JUnitPublicNonTestMethod257

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/InheritanceWithLazyProxiesTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable238

[SRC]Class AttributeA = ga.getDomainClass("AttributeA").clazz

UnusedVariable272

[SRC]Class A = ga.getDomainClass("A").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/ListDomainTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod225

[SRC]void onSetUp() {

JUnitPublicNonTestMethod242

[SRC]void onTearDown() {

UnusedVariable29

[SRC]def authorClass = ga.getDomainClass("Author")

src/test/org/codehaus/groovy/grails/orm/hibernate/ListEagerFetchingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable244

[SRC]def Category = ga.getDomainClass("Category").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/ListMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod261

[SRC]void onSetUp() {

JUnitPublicNonTestMethod281

[SRC]void onTearDown() {

UnusedVariable248

[SRC]def ids = [a1.id, a2.id, a2.id]

src/test/org/codehaus/groovy/grails/orm/hibernate/ManyToManyLazinessTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock228

[SRC]catch(LazyInitializationException lie) {

JUnitPublicNonTestMethod236

[SRC]void onSetUp() {

JUnitPublicNonTestMethod255

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ManyToManyMappedByTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport39

[SRC]import org.codehaus.groovy.grails.commons.test.AbstractGrailsMockTests

src/test/org/codehaus/groovy/grails/orm/hibernate/ManyToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2119

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2163

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/MapDomainTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod230

[SRC]void onSetUp() {

JUnitPublicNonTestMethod248

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/MapMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2105

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2133

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/MappedByColumn2Tests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod227

[SRC]void onSetUp() {

JUnitPublicNonTestMethod252

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/MappedByColumnTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod243

[SRC]void onSetUp() {

JUnitPublicNonTestMethod268

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/MappingDefaultsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport34

[SRC]import org.codehaus.groovy.grails.commons.GrailsDomainClassProperty

src/test/org/codehaus/groovy/grails/orm/hibernate/MappingDslTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable2232

[SRC]def personClass = ga.getDomainClass("MappedPerson").clazz

UnusedImport310

[SRC]import org.hibernate.SessionFactory

MethodSize3322

[MSG]Method "onSetUp" is 143 lines

src/test/org/codehaus/groovy/grails/orm/hibernate/OneToManyWithInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport39

[SRC]import org.springframework.util.Log4jConfigurer

src/test/org/codehaus/groovy/grails/orm/hibernate/OneToManyWithSelfAndInheritanceTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable239

[SRC]def orgB = Organization.newInstance(name:'Org B', descri..org1).save()

UnusedVariable240

[SRC]def orgaa = Organization.newInstance(name:'Org aa', desc..orgA).save()

UnusedVariable244

[SRC]def xorgB = ExtOrganization.newInstance(name:'ExtOrg B',..org1).save()

UnusedVariable245

[SRC]def xorgaa = ExtOrganization.newInstance(name:'ExtOrg aa..orgA).save()

src/test/org/codehaus/groovy/grails/orm/hibernate/PersistenceMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2161

[SRC]catch(Exception e) {

EmptyCatchBlock2260

[SRC]catch(Exception e) {

EmptyCatchBlock2369

[SRC]} catch(MissingMethodException iae) {

EmptyCatchBlock2372

[SRC]catch(InvokerInvocationException iie) {

EmptyCatchBlock2382

[SRC]catch(MissingMethodException mme) {

EmptyCatchBlock2385

[SRC]catch(InvokerInvocationException iie) {

EmptyCatchBlock2722

[SRC]catch(Exception e) {

EmptyCatchBlock2810

[SRC]catch(Exception e) {

EmptyCatchBlock2819

[SRC]catch(Exception e) {

EmptyCatchBlock2828

[SRC]catch(Exception e) {

AbcComplexity2

[MSG]The ABC score for method [testFindPersistentMethods] is [80.5]

AbcComplexity2

[MSG]The ABC score for method [testFindByPersistentMethods] is [100.2]

AbcComplexity2

[MSG]The ABC score for method [testGetAllPersistentMethod] is [89.1]

AbcComplexity2

[MSG]The ABC score for method [testFindAllPersistentMethod] is [219.7]

AbcComplexity2

[MSG]The ABC score for method [testExecuteQueryMethod] is [105.1]

UnusedVariable2803

[SRC]MetaClass domain = obj.getMetaClass();

MethodSize3145

[MSG]Method "testFindPersistentMethods" is 119 lines

MethodSize3265

[MSG]Method "testFindByPersistentMethods" is 125 lines

MethodSize3504

[MSG]Method "testFindAllPersistentMethod" is 222 lines

MethodSize3788

[MSG]Method "testExecuteQueryMethod" is 114 lines

src/test/org/codehaus/groovy/grails/orm/hibernate/PessimisticLockingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod249

[SRC]void onSetUp() {

JUnitPublicNonTestMethod261

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/SavePersistentMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2271

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2323

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/SimpleBelongsToMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod215

[SRC]void onSetUp() {

JUnitPublicNonTestMethod235

[SRC]void onTearDown() {

UnusedVariable210

[SRC]def bookClass = ga.getDomainClass("Book")

src/test/org/codehaus/groovy/grails/orm/hibernate/StreamCharBufferAndGormTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport34

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest

src/test/org/codehaus/groovy/grails/orm/hibernate/TablePerHierarchyAssocationTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable237

[SRC]def sub1Class = ga.getDomainClass("TablePerHierarchSub1").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/TwoCircularUnidirectionalOneToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [testAssociation] is [72.0]

UnusedImport39

[SRC]import org.codehaus.groovy.grails.commons.test.AbstractGrailsMockTests

src/test/org/codehaus/groovy/grails/orm/hibernate/TwoManyToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2103

[SRC]void onSetUp() {

AbcComplexity2

[MSG]The ABC score for method [testManyToManyMapping] is [104.3]

src/test/org/codehaus/groovy/grails/orm/hibernate/TwoUnidirectionalOneToManyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod225

[SRC]void onSetUp() {

JUnitPublicNonTestMethod248

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/URLMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod229

[SRC]void onSetUp() {

JUnitPublicNonTestMethod244

[SRC]void onTearDown() {

UnusedImport34

[SRC]import org.hibernate.LazyInitializationException

src/test/org/codehaus/groovy/grails/orm/hibernate/UnidirectionalListMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod238

[SRC]void onSetUp() {

JUnitPublicNonTestMethod268

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/UnidirectionalOneToManyWithSortOrderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable235

[SRC]def Child = ga.getDomainClass("Child").clazz

src/test/org/codehaus/groovy/grails/orm/hibernate/UserTypeMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
MethodSize310

[MSG]Method "onSetUp" is 126 lines

src/test/org/codehaus/groovy/grails/orm/hibernate/ValidatePersistentMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2135

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2205

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/ValidationFailureTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod28

[SRC]void onSetUp() {

JUnitPublicNonTestMethod270

[SRC]void onTearDown() {

UnusedImport34

[SRC]import org.hibernate.FlushMode;

src/test/org/codehaus/groovy/grails/orm/hibernate/WithCriteriaMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod227

[SRC]void onSetUp() {

JUnitPublicNonTestMethod258

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/WithTransactionMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod238

[SRC]void onSetUp() {

JUnitPublicNonTestMethod265

[SRC]void onTearDown() {

src/test/org/codehaus/groovy/grails/orm/hibernate/binding

src/test/org/codehaus/groovy/grails/orm/hibernate/binding/AssociationDataBindingTests.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [testOneToManyBindingWithSubscriptOperatorAndExistingInstance] is [71.1]

AbcComplexity2

[MSG]The ABC score for method [testOneToManyBindingWithSubscriptOperatorAndNewInstance] is [72.6]

src/test/org/codehaus/groovy/grails/orm/hibernate/cfg

src/test/org/codehaus/groovy/grails/orm/hibernate/cfg/GORMNamespaceHandlerTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport310

[SRC]import org.springframework.context.support.ClassPathXmlA..ationContext

src/test/org/codehaus/groovy/grails/orm/hibernate/support

src/test/org/codehaus/groovy/grails/orm/hibernate/support/FlushOnRedirectTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport34

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest

src/test/org/codehaus/groovy/grails/orm/hibernate/validation

src/test/org/codehaus/groovy/grails/orm/hibernate/validation/UniqueConstraintTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2135

[SRC]} catch (Exception e) {

EmptyCatchBlock2160

[SRC]} catch (Exception e) {

EmptyCatchBlock2185

[SRC]} catch (Exception e) {

EmptyCatchBlock2210

[SRC]} catch (Exception e) {

JUnitPublicNonTestMethod2287

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2323

[SRC]void onTearDown() {

AbcComplexity2

[MSG]The ABC score for method [testValidation] is [72.9]

UnusedVariable214

[SRC]def userClass = ga.getDomainClass("User")

MethodSize3112

[MSG]Method "testWrongUniqueParams" is 127 lines

src/test/org/codehaus/groovy/grails/plugins

src/test/org/codehaus/groovy/grails/plugins/CoreGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod228

[SRC]void onSetUp() {

UnusedImport37

[SRC]import grails.spring.BeanBuilder

src/test/org/codehaus/groovy/grails/plugins/DomainClassGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod213

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/plugins/GrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport35

[SRC]import grails.util.BuildSettings

src/test/org/codehaus/groovy/grails/plugins/GrailsPluginUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper218

[SRC]void setUp() {

JUnitTearDownCallsSuper250

[SRC]void tearDown() {

UnusedImport39

[SRC]import org.apache.commons.io.FileUtils

src/test/org/codehaus/groovy/grails/plugins/RelationshipManagementMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2140

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2184

[SRC]void onTearDown() {

UnusedVariable251

[SRC]def addressClass = ga.getDomainClass("Address")

src/test/org/codehaus/groovy/grails/plugins/ValidationGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage33

[SRC]import org.codehaus.groovy.grails.plugins.ValidationGrailsPlugin

src/test/org/codehaus/groovy/grails/plugins/logging

src/test/org/codehaus/groovy/grails/plugins/logging/Log4jDslTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper235

[SRC]protected void tearDown() {

UnusedVariable2195

[SRC]def consoleAppender

UnusedImport323

[SRC]import org.apache.log4j.net.SMTPAppender

src/test/org/codehaus/groovy/grails/plugins/scaffolding

src/test/org/codehaus/groovy/grails/plugins/scaffolding/ScaffoldingGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod211

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/plugins/services

src/test/org/codehaus/groovy/grails/plugins/services/ServicesGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod211

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/plugins/web

src/test/org/codehaus/groovy/grails/plugins/web/AbstractGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod234

[SRC]void onSetUp() {

JUnitTearDownCallsSuper279

[SRC]final void tearDown() {

src/test/org/codehaus/groovy/grails/plugins/web/CodecsGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/plugins/web/ControllersGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock2117

[SRC]} catch (NoSuchBeanDefinitionException e) {

JUnitPublicNonTestMethod213

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2192

[SRC]Class parseTestBean() {

UnusedImport38

[SRC]import org.springframework.core.io.FileSystemResource

src/test/org/codehaus/groovy/grails/plugins/web/LoggingGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]void onTearDown() {

JUnitPublicNonTestMethod220

[SRC]void onSetUp() {

UnusedVariable258

[SRC]def registry = GroovySystem.metaClassRegistry

UnusedVariable267

[SRC]def registry = GroovySystem.metaClassRegistry

UnusedVariable276

[SRC]def registry = GroovySystem.metaClassRegistry

src/test/org/codehaus/groovy/grails/plugins/web/ServletsGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod213

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/plugins/web/filters

src/test/org/codehaus/groovy/grails/plugins/web/filters/FilterExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod217

[SRC]public void onSetUp() {

AbcComplexity2

[MSG]The ABC score for method [testFilterMatching] is [137.4]

AbcComplexity2

[MSG]The ABC score for class [org.codehaus.groovy.grails.plugins.web.filters.FilterExecutionTests] is [72.3]

MethodSize317

[MSG]Method "onSetUp" is 145 lines

MethodSize3164

[MSG]Method "testFilterMatching" is 127 lines

src/test/org/codehaus/groovy/grails/plugins/web/filters/FiltersGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod213

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/plugins/webflow

src/test/org/codehaus/groovy/grails/plugins/webflow/MockWebFlowGrailsPlugin.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport317

[SRC]import org.springframework.webflow.engine.RequestControlContext

UnusedImport318

[SRC]import org.springframework.webflow.core.collection.MutableAttributeMap

UnusedImport331

[SRC]import org.springframework.webflow.definition.registry.F..tionRegistry

UnusedImport332

[SRC]import org.codehaus.groovy.grails.commons.GrailsControllerClass

UnusedImport333

[SRC]import org.springframework.webflow.engine.builder.FlowAssembler

UnusedImport334

[SRC]import org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder

UnusedImport335

[SRC]import org.springframework.webflow.engine.builder.suppor..lderServices

UnusedImport336

[SRC]import org.springframework.binding.convert.service.Defau..rsionService

UnusedImport337

[SRC]import org.springframework.webflow.expression.DefaultExp..arserFactory

UnusedImport338

[SRC]import org.springframework.webflow.mvc.builder.MvcViewFactoryCreator

UnusedImport339

[SRC]import org.springframework.webflow.executor.FlowExecutorImpl

UnusedImport340

[SRC]import org.springframework.webflow.engine.impl.FlowExecu..nImplFactory

UnusedImport341

[SRC]import org.springframework.webflow.conversation.impl.Ses..ationManager

UnusedImport342

[SRC]import org.springframework.webflow.execution.repository...pshotFactory

UnusedImport343

[SRC]import org.springframework.webflow.execution.repository...onRepository

UnusedImport344

[SRC]import org.springframework.context.ApplicationContext

UnusedImport345

[SRC]import org.springframework.webflow.engine.builder.DefaultFlowHolder

UnusedImport346

[SRC]import org.springframework.webflow.core.collection.AttributeMap

UnusedImport347

[SRC]import org.springframework.webflow.core.collection.LocalAttributeMap

UnusedImport348

[SRC]import org.springframework.webflow.mvc.servlet.FlowHandlerAdapter

UnusedImport349

[SRC]import org.springframework.webflow.execution.FlowExecutionKeyFactory

UnusedImport350

[SRC]import org.springframework.webflow.execution.FlowExecutionFactory

UnusedImport351

[SRC]import org.codehaus.groovy.grails.webflow.context.servle..owUrlHandler

UnusedImport352

[SRC]import org.codehaus.groovy.grails.webflow.execution.Grai..ExecutorImpl

UnusedImport353

[SRC]import org.codehaus.groovy.grails.webflow.scope.ScopeRegistrar

UnusedImport354

[SRC]import org.codehaus.groovy.grails.webflow.mvc.servlet.Gr..ndlerAdapter

UnusedImport355

[SRC]import org.codehaus.groovy.grails.webflow.mvc.servlet.Gr..ndlerMapping

src/test/org/codehaus/groovy/grails/plugins/webflow/WebFlowGrailsPluginTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod230

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/reload

src/test/org/codehaus/groovy/grails/reload/ServiceReloadTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod258

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/reload/TagLibReloadTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod250

[SRC]void onInit() {

UnusedVariable220

[SRC]Class oldClass = ga.getTagLibClass("TestTagLib").getClazz()

UnusedVariable221

[SRC]def result

src/test/org/codehaus/groovy/grails/reload/TransactionalServiceReloadTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod255

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/resolve

src/test/org/codehaus/groovy/grails/resolve/IvyDependencyManagerTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2384

[SRC]def getCurrentGrailsVersion() {

JUnitSetUpCallsSuper224

[SRC]protected void setUp() {

JUnitTearDownCallsSuper228

[SRC]protected void tearDown() {

AbcComplexity2

[MSG]The ABC score for method [testSerializerToMarkup] is [61.9]

UnusedVariable2502

[SRC]ModuleRevisionId junit = manager.dependencies.find { Mo.. == 'junit'}

UnusedImport39

[SRC]import grails.util.BuildSettingsHolder

UnusedImport310

[SRC]import grails.util.GrailsUtil

src/test/org/codehaus/groovy/grails/scaffolding

src/test/org/codehaus/groovy/grails/scaffolding/DefaultGrailsTemplateGeneratorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper217

[SRC]protected void setUp() {

JUnitTearDownCallsSuper222

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/scaffolding/view

src/test/org/codehaus/groovy/grails/scaffolding/view/ScaffoldedGroovyPageViewTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper234

[SRC]void tearDown() {

ImportFromSamePackage38

[SRC]import org.codehaus.groovy.grails.scaffolding.view.Scaff..oovyPageView

src/test/org/codehaus/groovy/grails/scaffolding/view/ScaffoldingViewResolverTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport311

[SRC]import org.codehaus.groovy.grails.plugins.DefaultPluginMetaManager

src/test/org/codehaus/groovy/grails/validation

src/test/org/codehaus/groovy/grails/validation/ConstraintsBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod283

[SRC]Errors validateInstance(instance, validator) {

JUnitPublicNonTestMethod289

[SRC]GrailsDomainClassValidator configureValidator(theClass, instance) {

JUnitPublicNonTestMethod2104

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/validation/GrailsDomainClassValidatorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod292

[SRC]public void onSetUp() {

AbcComplexity2

[MSG]The ABC score for method [testCascadingValidation] is [85.4]

src/test/org/codehaus/groovy/grails/validation/NullableConstraintTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper213

[SRC]void setUp() {

JUnitTearDownCallsSuper255

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/binding

src/test/org/codehaus/groovy/grails/web/binding/BindingToNullableTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedVariable251

[SRC]def model = controller.update()

src/test/org/codehaus/groovy/grails/web/binding/DataBindingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod218

[SRC]void onSetUp() {

UnusedVariable2155

[SRC]def error = b.errors.getFieldError('site')

UnusedImport314

[SRC]import java.text.SimpleDateFormat

src/test/org/codehaus/groovy/grails/web/codecs

src/test/org/codehaus/groovy/grails/web/codecs/Base64CodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper212

[SRC]void setUp() {

JUnitTearDownCallsSuper220

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/codecs/HTMLCodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper26

[SRC]void setUp() {

JUnitTearDownCallsSuper210

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/codecs/HexCodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]void setUp() {

JUnitTearDownCallsSuper211

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/codecs/JavaScriptCodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper26

[SRC]void setUp() {

JUnitTearDownCallsSuper211

[SRC]void tearDown() {

UnusedVariable27

[SRC]GroovyClassLoader gcl = new GroovyClassLoader();

src/test/org/codehaus/groovy/grails/web/codecs/MD5BytesCodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]void setUp() {

JUnitTearDownCallsSuper211

[SRC]void tearDown() {

UnusedVariable233

[SRC]byte[] result = codec.decode(data)

src/test/org/codehaus/groovy/grails/web/codecs/MD5CodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]void setUp() {

JUnitTearDownCallsSuper211

[SRC]void tearDown() {

UnusedVariable233

[SRC]byte[] result = codec.decode(data)

src/test/org/codehaus/groovy/grails/web/codecs/SHA1BytesCodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]void setUp() {

JUnitTearDownCallsSuper211

[SRC]void tearDown() {

UnusedVariable233

[SRC]byte[] result = codec.decode(data)

src/test/org/codehaus/groovy/grails/web/codecs/SHA1CodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]void setUp() {

JUnitTearDownCallsSuper211

[SRC]void tearDown() {

UnusedVariable233

[SRC]byte[] result = codec.decode(data)

src/test/org/codehaus/groovy/grails/web/codecs/SHA256BytesCodec.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]void setUp() {

JUnitTearDownCallsSuper211

[SRC]void tearDown() {

UnusedVariable234

[SRC]byte[] result = codec.decode(data)

src/test/org/codehaus/groovy/grails/web/codecs/SHA256CodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]void setUp() {

JUnitTearDownCallsSuper211

[SRC]void tearDown() {

UnusedVariable233

[SRC]byte[] result = codec.decode(data)

src/test/org/codehaus/groovy/grails/web/codecs/URLCodecTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper212

[SRC]void setUp() {

JUnitTearDownCallsSuper218

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/context

src/test/org/codehaus/groovy/grails/web/context/GrailsConfigUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper240

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/web/converters

src/test/org/codehaus/groovy/grails/web/converters/AutoParamsJSONMarshallingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod216

[SRC]public void onSetUp() {

UnnecessaryGroovyImport311

[SRC]import groovy.util.ConfigSlurper

src/test/org/codehaus/groovy/grails/web/converters/AutoParamsXmlMarshallingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod215

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/converters/ConverterConfigurationTests.groovy

Rule NamePriorityLine #Source Line / Message
DuplicateImport38

[SRC]import org.codehaus.groovy.grails.web.converters.marshal..ssMarshaller

src/test/org/codehaus/groovy/grails/web/converters/JSONConverterTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2107

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/converters/XMLConverterTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod280

[SRC]void onSetUp() {

UnusedImport315

[SRC]import java.lang.reflect.Method

UnusedImport321

[SRC]import org.hibernate.repackage.cglib.proxy.Enhancer

UnusedImport322

[SRC]import org.hibernate.repackage.cglib.proxy.MethodProxy

src/test/org/codehaus/groovy/grails/web/filters

src/test/org/codehaus/groovy/grails/web/filters/FilterToHandlerAdapterTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport310

[SRC]import java.util.regex.Pattern

src/test/org/codehaus/groovy/grails/web/filters/HiddenHttpMethodFilterTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport34

[SRC]import org.springframework.mock.web.MockServletContext;

UnusedImport36

[SRC]import org.codehaus.groovy.grails.web.servlet.GrailsAppl..nAttributes;

UnusedImport37

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest;

src/test/org/codehaus/groovy/grails/web/i18n

src/test/org/codehaus/groovy/grails/web/i18n/ParamsAwareLocaleChangeInterceptorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper217

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/web/mapping

src/test/org/codehaus/groovy/grails/web/mapping/DefaultUrlCreatorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper234

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/mapping/DoubleWildcardUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod250

[SRC]public void onSetUp() {

UnusedImport39

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

UnusedImport311

[SRC]import org.springframework.mock.web.MockServletContext

src/test/org/codehaus/groovy/grails/web/mapping/DynamicParameterValuesTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport39

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

UnusedImport311

[SRC]import org.springframework.mock.web.MockServletContext

src/test/org/codehaus/groovy/grails/web/mapping/IdUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod228

[SRC]void onSetUp() {

UnusedImport39

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

UnusedImport311

[SRC]import org.springframework.mock.web.MockServletContext

src/test/org/codehaus/groovy/grails/web/mapping/RegexUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [testComparable] is [226.2]

UnusedVariable2316

[SRC]def m = new RegexUrlMapping(parser.parse("/(*)/hello"), ..vletContext)

UnusedImport36

[SRC]import org.springframework.mock.web.MockServletContext

MethodSize3143

[MSG]Method "testComparable" is 130 lines

src/test/org/codehaus/groovy/grails/web/mapping/ResponseCodeUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport36

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

UnusedImport38

[SRC]import org.springframework.mock.web.MockServletContext

src/test/org/codehaus/groovy/grails/web/mapping/RestfulMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty;

UnusedImport36

[SRC]import org.springframework.mock.web.MockServletContext

src/test/org/codehaus/groovy/grails/web/mapping/RestfulReverseUrlRenderingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]public void onSetUp() {

UnusedImport33

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

src/test/org/codehaus/groovy/grails/web/mapping/ReverseMappingWithDefaultActionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod215

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/mapping/ReverseUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod212

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/mapping/ReverseUrlMappingToDefaultActionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod212

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/mapping/RootUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod27

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/mapping/UrlMappingEvaluatorTests.groovy

Rule NamePriorityLine #Source Line / Message
AbcComplexity2

[MSG]The ABC score for method [testEvaluateMappings] is [81.1]

AbcComplexity2

[MSG]The ABC score for class [org.codehaus.groovy.grails.web.mapping.UrlMappingEvaluatorTests] is [81.1]

src/test/org/codehaus/groovy/grails/web/mapping/UrlMappingParameterTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.web.servlet.mvc.Abstra..trollerTests

UnusedImport34

[SRC]import org.springframework.core.io.ByteArrayResource

UnusedImport35

[SRC]import org.springframework.mock.web.MockServletContext

src/test/org/codehaus/groovy/grails/web/mapping/UrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty;

src/test/org/codehaus/groovy/grails/web/mapping/UrlMappingsHolderTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport33

[SRC]import org.codehaus.groovy.grails.validation.ConstrainedProperty;

src/test/org/codehaus/groovy/grails/web/mapping/filter

src/test/org/codehaus/groovy/grails/web/mapping/filter/UrlMappingsFilterTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGroovyImport328

[SRC]import java.util.List

UnusedImport317

[SRC]import junit.framework.TestCase;

UnusedImport324

[SRC]import org.codehaus.groovy.grails.web.mapping.UrlMappingEvaluator;

UnusedImport325

[SRC]import org.codehaus.groovy.grails.web.mapping.DefaultUrl..ngEvaluator;

UnusedImport328

[SRC]import java.util.List

src/test/org/codehaus/groovy/grails/web/metaclass

src/test/org/codehaus/groovy/grails/web/metaclass/ChainMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod215

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/mime

src/test/org/codehaus/groovy/grails/web/mime/AcceptHeaderParserTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper213

[SRC]protected void setUp() {

JUnitTearDownCallsSuper231

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/web/mime/ContentFormatControllerTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/pages

src/test/org/codehaus/groovy/grails/web/pages/GroovyPageLineNumberTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport35

[SRC]import org.codehaus.groovy.grails.web.taglib.exceptions...agException;

src/test/org/codehaus/groovy/grails/web/pages/GroovyPageMethodDispatchTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod217

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/pages/GroovyPageMethodDispatchWithNamespaceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod216

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/pages/GroovyPageTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod259

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2104

[SRC]def runPageCode(pageCode) {

JUnitPublicNonTestMethod2184

[SRC]def getBinding(out) {

UnnecessaryGroovyImport33

[SRC]import java.io.PrintWriter;

UnnecessaryGroovyImport34

[SRC]import java.io.StringWriter;

UnnecessaryGroovyImport35

[SRC]import java.io.Writer;

UnnecessaryGroovyImport36

[SRC]import java.io.IOException;

UnnecessaryGroovyImport39

[SRC]import groovy.lang.MissingPropertyException;

UnnecessaryGroovyImport310

[SRC]import groovy.lang.GroovyClassLoader;

UnnecessaryGroovyImport311

[SRC]import groovy.lang.GroovyObject;

UnnecessaryGroovyImport312

[SRC]import groovy.lang.Binding;

UnnecessaryGroovyImport313

[SRC]import groovy.lang.Script;

UnusedImport36

[SRC]import java.io.IOException;

UnusedImport39

[SRC]import groovy.lang.MissingPropertyException;

UnusedImport310

[SRC]import groovy.lang.GroovyClassLoader;

UnusedImport311

[SRC]import groovy.lang.GroovyObject;

UnusedImport314

[SRC]import org.codehaus.groovy.runtime.InvokerHelper;

UnusedImport316

[SRC]import javax.servlet.http.HttpServletRequest;

UnusedImport317

[SRC]import javax.servlet.http.HttpServletResponse;

UnusedImport320

[SRC]import org.codehaus.groovy.grails.web.metaclass.GetParam..micProperty;

UnusedImport321

[SRC]import org.codehaus.groovy.grails.web.metaclass.GetSessi..micProperty;

UnusedImport322

[SRC]import org.codehaus.groovy.grails.web.metaclass.Controll..amicMethods;

UnusedImport329

[SRC]import org.codehaus.groovy.grails.support.MockApplicationContext;

UnusedImport330

[SRC]import org.springframework.mock.web.MockHttpServletRequest;

UnusedImport331

[SRC]import org.springframework.mock.web.MockHttpServletResponse;

UnusedImport332

[SRC]import org.springframework.mock.web.MockServletContext;

UnusedImport333

[SRC]import junit.framework.TestCase;

src/test/org/codehaus/groovy/grails/web/pages/GroovyPagesServletTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper255

[SRC]void setUp() {

JUnitTearDownCallsSuper252

[SRC]void tearDown() {

UnusedVariable216

[SRC]def writer = gps.createResponseWriter(new MockHttpServletResponse())

src/test/org/codehaus/groovy/grails/web/pages/GroovyPagesTemplateEngineTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper2200

[SRC]void setUp() {

JUnitTearDownCallsSuper2197

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/pages/SitemeshPreprocessorTests.groovy

Rule NamePriorityLine #Source Line / Message
UnnecessaryGroovyImport33

[SRC]import groovy.util.GroovyTestCase;

src/test/org/codehaus/groovy/grails/web/pages/StaticContentRenderingTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport314

[SRC]import org.codehaus.groovy.grails.commons.ConfigurationHolder

src/test/org/codehaus/groovy/grails/web/pages/TagLibNamespaceTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod231

[SRC]void onTearDown() {

JUnitPublicNonTestMethod234

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/pages/TagLibWithGStringTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod216

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/pages/TagLibWithNullValuesTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/pages/ext/jsp

src/test/org/codehaus/groovy/grails/web/pages/ext/jsp/GroovyPagesPageContextTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper214

[SRC]protected void setUp() {

JUnitTearDownCallsSuper218

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/web/pages/ext/jsp/IterativeJspTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper222

[SRC]protected void setUp() {

JUnitTearDownCallsSuper227

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/web/pages/ext/jsp/SimpleJspTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper221

[SRC]protected void setUp() {

JUnitTearDownCallsSuper226

[SRC]protected void tearDown() {

UnusedImport38

[SRC]import javax.servlet.jsp.jstl.core.Config

src/test/org/codehaus/groovy/grails/web/pages/ext/jsp/SimpleTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper222

[SRC]protected void setUp() {

JUnitTearDownCallsSuper227

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/web/pages/ext/jsp/WebXmlTagLibraryReaderTests.groovy

Rule NamePriorityLine #Source Line / Message
ImportFromSamePackage320

[SRC]import org.codehaus.groovy.grails.web.pages.ext.jsp.WebX..ibraryReader

src/test/org/codehaus/groovy/grails/web/servlet

src/test/org/codehaus/groovy/grails/web/servlet/BindDataMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2161

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/servlet/DefaultGrailsApplicationAttributesTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper211

[SRC]void setUp() {

src/test/org/codehaus/groovy/grails/web/servlet/FlashScopeWithErrorsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod227

[SRC]void onSetUp() {

UnusedImport319

[SRC]import org.springframework.mock.web.MockHttpServletRequest

src/test/org/codehaus/groovy/grails/web/servlet/GrailsHttpSessionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod237

[SRC]void onSetUp() {

UnusedVariable253

[SRC]def mock = new MockHttpSession()

src/test/org/codehaus/groovy/grails/web/servlet/MultipleRenderCallsContentTypeTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod213

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/servlet/RenderMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2164

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/servlet/filter

src/test/org/codehaus/groovy/grails/web/servlet/filter/AbstractServletFilterTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper257

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/servlet/mvc

src/test/org/codehaus/groovy/grails/web/servlet/mvc/AbstractGrailsControllerTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2128

[SRC]void runTest(Closure callable) {

AbcComplexity2

[MSG]The ABC score for method [setUp] is [63.6]

UnusedImport322

[SRC]import org.codehaus.groovy.grails.commons.spring.GrailsA..ationContext

src/test/org/codehaus/groovy/grails/web/servlet/mvc/CommandObjectActionMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]public void onSetUp() {

UnusedVariable239

[SRC]def cmd = ga.getClassLoader().loadClass("SampleCommand").newInstance()

UnusedVariable253

[SRC]def cmd = ga.getClassLoader().loadClass("SampleCommand").newInstance()

UnusedVariable260

[SRC]def model = ctrl.renderWithCmd()

src/test/org/codehaus/groovy/grails/web/servlet/mvc/CommandObjectErrorsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod213

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/servlet/mvc/CommandObjectsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod217

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/servlet/mvc/ControllersDynamicMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod219

[SRC]void onSetUp() {

JUnitPublicNonTestMethod228

[SRC]void onTearDown() {

JUnitPublicNonTestMethod236

[SRC]void runTest(Closure callable) {

src/test/org/codehaus/groovy/grails/web/servlet/mvc/GrailsParameterMapTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper210

[SRC]void setUp() {

AbcComplexity2

[MSG]The ABC score for method [testConversionHelperMethods] is [72.4]

src/test/org/codehaus/groovy/grails/web/servlet/mvc/RedirectMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod217

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/servlet/mvc/RenderDynamicMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod222

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/servlet/mvc/SimpleGrailsControllerHelperTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod217

[SRC]void onSetUp() {

UnusedVariable265

[SRC]def webRequest = RequestContextHolder.currentRequestAttributes()

UnusedVariable266

[SRC]def helper = new SimpleGrailsControllerHelper(ga, ctx, servletContext)

src/test/org/codehaus/groovy/grails/web/servlet/mvc/TagLibDynamicMethodsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod217

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/servlet/view

src/test/org/codehaus/groovy/grails/web/servlet/view/GroovyPageViewTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper244

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/web/sitemesh

src/test/org/codehaus/groovy/grails/web/sitemesh/GSPSitemeshPageTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper298

[SRC]void tearDown() {

UnusedVariable214

[SRC]def result = applyTemplate(template, [:])

UnusedVariable222

[SRC]def result = applyTemplate(template, [:])

UnusedVariable230

[SRC]def result = applyTemplate(template, [:])

UnusedVariable238

[SRC]def result = applyTemplate(template, [:])

UnusedVariable250

[SRC]def result = applyTemplate(template, [:])

UnusedVariable268

[SRC]def result = applyTemplate(template, [:], target1)

UnusedVariable285

[SRC]def result = applyTemplate(template, [:])

src/test/org/codehaus/groovy/grails/web/taglib

src/test/org/codehaus/groovy/grails/web/taglib/AbstractGrailsTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod268

[SRC]def withConfig(String text, Closure callable) {

JUnitPublicNonTestMethod279

[SRC]def profile(String name, Closure callable) {

JUnitPublicNonTestMethod289

[SRC]def withTag(String tagName, Writer out, Closure callable) {

JUnitPublicNonTestMethod2137

[SRC]void onSetUp() {

JUnitPublicNonTestMethod2280

[SRC]void runTest(Closure callable) {

JUnitPublicNonTestMethod2284

[SRC]void printCompiledSource(template, params = [:]) {

JUnitPublicNonTestMethod2290

[SRC]def getCompiledSource(template, params = [:]) {

JUnitPublicNonTestMethod2307

[SRC]def assertCompiledSourceContains(expected, template, params = [:]) {

JUnitPublicNonTestMethod2312

[SRC]void assertOutputContains(expected, template, params = [:]) {

JUnitPublicNonTestMethod2317

[SRC]void assertOutputNotContains(expected, template, params = [:]) {

JUnitPublicNonTestMethod2335

[SRC]void assertOutputEquals(expected, template, params = [:]..tring() }) {

JUnitPublicNonTestMethod2361

[SRC]def applyTemplate(template, params = [:], target = null,..e = null ) {

JUnitPublicNonTestMethod2386

[SRC]String sitemeshPreprocess(String template) {

JUnitPublicNonTestMethod2391

[SRC]String applyLayout(String layout, String template, Map params=[:]) {

JUnitSetUpCallsSuper2141

[SRC]void setUp() throws Exception {

JUnitTearDownCallsSuper2232

[SRC]void tearDown() {

AbcComplexity2

[MSG]The ABC score for method [setUp] is [85.4]

UnusedVariable2112

[SRC]GroovyPageOutputStack stack=GroovyPageOutputStack.createNew(out)

UnusedVariable2304

[SRC]String text = sw.toString()

src/test/org/codehaus/groovy/grails/web/taglib/ApplicationTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport36

[SRC]import org.codehaus.groovy.grails.commons.ApplicationHolder

UnusedImport310

[SRC]import org.springframework.mock.web.MockHttpServletRequest

src/test/org/codehaus/groovy/grails/web/taglib/ControllerTagLibMethodDispatchTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod229

[SRC]void onInit() {

src/test/org/codehaus/groovy/grails/web/taglib/CoreTagsTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedImport314

[SRC]import grails.util.GrailsUtil

src/test/org/codehaus/groovy/grails/web/taglib/CountryTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod279

[SRC]void assertResultContains(result, expectedSubstring) {

UnusedVariable254

[SRC]def value = CountryTagLib.ISO3166_3[it]

src/test/org/codehaus/groovy/grails/web/taglib/FormRenderingTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod232

[SRC]void assertOutputEquals(expected, template, params = [:]) {

UnusedImport33

[SRC]import org.codehaus.groovy.runtime.InvokerHelper

src/test/org/codehaus/groovy/grails/web/taglib/FormTagLib2Tests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock272

[SRC]} catch (e) {

UnusedPrivateField217

[SRC]private static final def SELECT_TAG_NAME = "testSelect";

UnusedPrivateMethod2232

[SRC]private void assertSelectFieldPresentWithValue(Document ..ing value) {

UnusedPrivateMethod2238

[SRC]private void assertSelectFieldPresentWithValueAndText(Do..ing label) {

UnusedVariable2127

[SRC]String xp

src/test/org/codehaus/groovy/grails/web/taglib/FormTagLib3Tests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField219

[SRC]private static final String DATE_PICKER_TAG_NAME = "testDatePicker";

UnusedPrivateField221

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] ))

UnusedPrivateField222

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] ))

UnusedPrivateField223

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] ))

UnusedPrivateField224

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] ))

UnnecessaryGroovyImport33

[SRC]import java.io.StringWriter;

src/test/org/codehaus/groovy/grails/web/taglib/FormTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
UnusedPrivateField213

[SRC]private static final String DATE_PICKER_TAG_NAME = "testDatePicker";

UnusedPrivateField214

[SRC]private static final def SELECT_TAG_NAME = "testSelect";

UnusedPrivateField216

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] ))

UnusedPrivateField217

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] ))

UnusedPrivateField218

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] ))

UnusedPrivateField219

[SRC]private static final Collection DATE_PRECISIONS_INCLUDIN.. String[] ))

src/test/org/codehaus/groovy/grails/web/taglib/FormatTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock280

[SRC]catch(org.codehaus.groovy.grails.web.taglib.exceptions.G..Exception e)

src/test/org/codehaus/groovy/grails/web/taglib/GroovyEachTagTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock216

[SRC]catch(Exception e) {

EmptyCatchBlock237

[SRC]catch(Exception e) {

EmptyCatchBlock272

[SRC]catch(Exception ex) {

EmptyCatchBlock289

[SRC]catch(Exception e) {

src/test/org/codehaus/groovy/grails/web/taglib/GroovyGrepTagTests.groovy

Rule NamePriorityLine #Source Line / Message
EmptyCatchBlock216

[SRC]catch(Exception e) {

src/test/org/codehaus/groovy/grails/web/taglib/GroovySyntaxTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitTearDownCallsSuper232

[SRC]protected void tearDown() {

UnnecessaryGroovyImport36

[SRC]import java.io.PrintWriter;

UnnecessaryGroovyImport37

[SRC]import java.io.StringWriter;

UnnecessaryGroovyImport38

[SRC]import java.util.HashMap;

UnnecessaryGroovyImport39

[SRC]import java.util.Map;

src/test/org/codehaus/groovy/grails/web/taglib/InvokeTagLibAsMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod25

[SRC]void onSetUp() {

src/test/org/codehaus/groovy/grails/web/taglib/InvokeTagLibWithBodyAsMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod211

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/taglib/JavascriptTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod218

[SRC]public void onSetUp() {

JUnitPublicNonTestMethod224

[SRC]void onInit() {

JUnitPublicNonTestMethod2369

[SRC]def setRequestContext() {

JUnitPublicNonTestMethod2373

[SRC]def setRequestContext(path) {

JUnitPublicNonTestMethod2377

[SRC]def setupPluginController(tag) {

UnusedVariable245

[SRC]String newLine = EOL

UnusedVariable2232

[SRC]def retval = tag.call(attrs) {"body"}

src/test/org/codehaus/groovy/grails/web/taglib/LinkRenderingTagLib2Tests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod28

[SRC]void onInit() {

JUnitPublicNonTestMethod240

[SRC]void assertOutputEquals(expected, template, params = [:]) {

UnusedImport33

[SRC]import org.codehaus.groovy.runtime.InvokerHelper

src/test/org/codehaus/groovy/grails/web/taglib/LinkRenderingTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod28

[SRC]void onInit() {

UnusedImport33

[SRC]import org.codehaus.groovy.runtime.InvokerHelper

src/test/org/codehaus/groovy/grails/web/taglib/NamedTagBodyParamsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod233

[SRC]void onInit() {

src/test/org/codehaus/groovy/grails/web/taglib/NamespacedNamedUrlMappingTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod26

[SRC]void onInit() {

src/test/org/codehaus/groovy/grails/web/taglib/NamespacedTagAndActionConflictTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/taglib/NamespacedTagLibMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod267

[SRC]void onInit() {

UnusedImport314

[SRC]import org.springframework.validation.MapBindingResult

src/test/org/codehaus/groovy/grails/web/taglib/NamespacedTagLibRenderMethodTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod214

[SRC]void onInit() {

src/test/org/codehaus/groovy/grails/web/taglib/OverlappingReverseMappedLinkTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod218

[SRC]void onInit() {

src/test/org/codehaus/groovy/grails/web/taglib/PageScopeTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod235

[SRC]void onInit() {

src/test/org/codehaus/groovy/grails/web/taglib/PropertyEditorTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod218

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/taglib/RenderTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2367

[SRC]void checkTagOutput(output, expectedClassValue, expected..edContent) {

JUnitPublicNonTestMethod2409

[SRC]void checkTagOutput(output, expectedClassValue, expected..therAttrs) {

UnusedVariable246

[SRC]def head = ""

src/test/org/codehaus/groovy/grails/web/taglib/SelectTagTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2259

[SRC]void checkMultiSelect(List categories, List selected, Cl..sSelected) {

UnusedPrivateMethod2322

[SRC]private void assertSelectFieldNotPresent(Document docume..fieldName) {

src/test/org/codehaus/groovy/grails/web/taglib/TagLibraryDynamicPropertyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]public void onSetUp() {

src/test/org/codehaus/groovy/grails/web/taglib/ValidationTagLibTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod215

[SRC]void onSetUp() {

UnnecessaryGroovyImport33

[SRC]import java.util.Locale;

UnusedImport37

[SRC]import org.springframework.util.StringUtils

UnusedImport38

[SRC]import org.springframework.web.context.request.RequestContextHolder

src/test/org/codehaus/groovy/grails/web/util

src/test/org/codehaus/groovy/grails/web/util/StreamCharBufferGroovyTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper27

[SRC]protected void setUp() {

UnnecessaryGroovyImport33

[SRC]import java.io.Writer

UnusedImport33

[SRC]import java.io.Writer

src/test/org/codehaus/groovy/grails/web/util/WebUtilsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2120

[SRC]void clearGrailsWebRequest() {

JUnitSetUpCallsSuper219

[SRC]protected void setUp() {

JUnitTearDownCallsSuper240

[SRC]protected void tearDown() {

src/test/org/codehaus/groovy/grails/webflow

src/test/org/codehaus/groovy/grails/webflow/FlowCommandObjectsTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod295

[SRC]public Closure getFlowClosure() {

UnusedImport314

[SRC]import org.springframework.webflow.definition.FlowDefinition

UnusedImport315

[SRC]import org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder

UnusedImport316

[SRC]import org.springframework.webflow.context.servlet.Servl..ernalContext

src/test/org/codehaus/groovy/grails/webflow/FlowRedirectTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod242

[SRC]public Closure getFlowClosure() {

UnusedImport34

[SRC]import org.springframework.webflow.definition.FlowDefinition

UnusedImport35

[SRC]import org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder

src/test/org/codehaus/groovy/grails/webflow/FlowTagInvokationTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod240

[SRC]void onInit() {

JUnitPublicNonTestMethod249

[SRC]public Closure getFlowClosure() {

UnusedImport314

[SRC]import org.springframework.webflow.definition.FlowDefinition

UnusedImport315

[SRC]import org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder

src/test/org/codehaus/groovy/grails/webflow/SubflowExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod224

[SRC]public Closure getFlowClosure() {

src/test/org/codehaus/groovy/grails/webflow/engine/builder

src/test/org/codehaus/groovy/grails/webflow/engine/builder/ControllerFlowRegistryTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper227

[SRC]void setUp() {

UnusedImport35

[SRC]import org.codehaus.groovy.grails.support.MockApplicationContext

src/test/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilderDecisionExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]public Closure getFlowClosure() {

src/test/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilderDynamicTransitionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod235

[SRC]String getFlowId() { "myFlow" }

JUnitPublicNonTestMethod237

[SRC]Closure getFlowClosure() {

src/test/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilderExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod210

[SRC]public Closure getFlowClosure() {

src/test/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilderSubFlowExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod213

[SRC]public Closure getFlowClosure() {

JUnitPublicNonTestMethod262

[SRC]def foo() {

src/test/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilderTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitSetUpCallsSuper216

[SRC]void setUp() {

JUnitTearDownCallsSuper226

[SRC]void tearDown() {

src/test/org/codehaus/groovy/grails/webflow/engine/builder/FlowBuilderTransitionCriteriaTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod27

[SRC]public Closure getFlowClosure() {

src/test/org/codehaus/groovy/grails/webflow/support

src/test/org/codehaus/groovy/grails/webflow/support/AbstractGrailsTagAwareFlowExecutionTests.groovy

Rule NamePriorityLine #Source Line / Message
JUnitPublicNonTestMethod2190

[SRC]FlowDefinition getFlowDefinition() {

JUnitPublicNonTestMethod2204

[SRC]String getFlowId() { 'testFlow' }

JUnitPublicNonTestMethod2206

[SRC]abstract Closure getFlowClosure();

JUnitSetUpCallsSuper269

[SRC]final void setUp() throws Exception {

JUnitTearDownCallsSuper2153

[SRC]final void tearDown() {

AbcComplexity2

[MSG]The ABC score for method [setUp] is [77.8]

UnusedImport317

[SRC]import org.codehaus.groovy.grails.commons.spring.Default..onfiguration

UnusedImport326

[SRC]import org.codehaus.groovy.runtime.InvokerHelper

UnusedImport328

[SRC]import org.springframework.core.io.Resource

Rule Descriptions

#Rule NameDescription
1AbcComplexityChecks the ABC metric of size/complexity for methods/classes.A method (or "closure field") with an ABC complexity value (score) greater than the maxMethodComplexity property (which defaults to 60) causes a violation. Likewise, a class that has an (average method) ABC complexityvalue greater than the maxClassAverageMethodComplexity property (which defaults to 60) causes a violation.
2BooleanInstantiationUse Boolean.valueOf() for variable values or Boolean.TRUE and Boolean.FALSE for constant values instead of calling the Boolean() constructor directly or calling Boolean.valueOf(true) or Boolean.valueOf(false).
3ClassSizeChecks if the size of a class exceeds the number of lines specified by the maxLines property, which defaults to 1000.
4CloneableWithoutCloneA class that implements java.lang.Cloneable should define a clone() method.
5ConstantIfExpressionChecks for if statements with a constant value for the if expression, such as true, false, null, or a literal constant value.
6ConstantTernaryExpressionChecks for ternary expressions with a constant value for the boolean expression, such as true, false, null, or a literal constant value.
7CyclomaticComplexityChecks the cyclomatic complexity for methods/classes.A method (or "closure field") with a cyclomatic complexity value greater than the maxMethodComplexity property (which defaults to 20) causes a violation. Likewise, a class that has an (average method) cyclomatic complexityvalue greater than the maxClassAverageMethodComplexity property (which defaults to 20) causes a violation.
8DuplicateImportDuplicate import statements are unnecessary.
9EmptyCatchBlockIn most cases, exceptions should not be caught and ignored (swallowed).
10EmptyElseBlockEmpty else blocks are confusing and serve no purpose.
11EmptyFinallyBlockEmpty finally blocks are confusing and serve no purpose.
12EmptyForStatementEmpty for statements are confusing and serve no purpose.
13EmptyIfStatementEmpty if statements are confusing and serve no purpose.
14EmptySwitchStatementEmpty switch statements are confusing and serve no purpose.
15EmptySynchronizedStatementEmpty synchronized statements are confusing and serve no purpose.
16EmptyTryBlockEmpty try blocks are confusing and serve no purpose.
17EmptyWhileStatementEmpty while statements are confusing and serve no purpose.
18EqualsAndHashCodeIf either the boolean equals(Object) or the int hashCode() methods are overridden within a class, then both must be overridden.
19ImportFromSamePackageAn import of a class that is within the same package is unnecessary.
20JUnitAssertAlwaysFailsChecks for JUnit assert() method calls with constant arguments such that the assertion always fails. This includes: assertTrue(false), assertFalse(true) and assertNull(CONSTANT).
21JUnitAssertAlwaysSucceedsChecks for JUnit assert() method calls with constant arguments such that the assertion always succeeds. This includes: assertTrue(true), assertFalse(false) and assertNull(null).
22JUnitPublicNonTestMethodChecks if a JUnit test class contains public methods other than standard test methods, JUnit framework methods or methods with JUnit annotations.
23JUnitSetUpCallsSuperChecks that if the JUnit setUp() method is defined, that it includes a call to super.setUp().
24JUnitTearDownCallsSuperChecks that if the JUnit tearDown() method is defined, that it includes a call to super.tearDown().
25MethodSizeChecks if the size of a method exceeds the number of lines specified by the maxLines property, which defaults to 100.
26NestedBlockDepthChecks for blocks or closures nested more than maxNestedBlockDepth levels deep, which defaults to 5.
27ReturnFromFinallyBlockReturning from a finally block is confusing and can hide the original exception.
28StringInstantiationUse a String literal (e.g., "...") instead of calling the corresponding String constructor (new String("..")) directly.
29ThrowExceptionFromFinallyBlockThrowing an exception from a finally block is confusing and can hide the original exception.
30UnnecessaryGroovyImportA Groovy file does not need to include an import for classes from java.lang, java.util, java.io, java.net, groovy.lang and groovy.util, as well as the classes java.math.BigDecimal and java.math.BigInteger.
31UnnecessaryTernaryExpressionChecks for ternary expressions where the conditional expression always evaluates to a boolean and the true and false expressions are merely returning true and false constants. Also checks for ternary expressions where both expressions are the same constant or variable.
32UnusedImportImports for a class that is never referenced within the source file is unnecessary.
33UnusedPrivateFieldChecks for private fields that are not referenced within the same class.
34UnusedPrivateMethodChecks for private methods that are not referenced within the same class.
35UnusedVariableChecks for variables that are never referenced.

CodeNarc v0.9