PMD Results

The following document contains the results of PMD 6.29.0.

Violations By Priority

Priority 3

us/codecraft/webmagic/Spider.java

Rule Violation Line
UnnecessaryReturn Avoid unnecessary return statements 461
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'Status(int)': enum constructors are implicitly private 710712

us/codecraft/webmagic/SpiderListener.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'onSuccess': the method is declared in an interface type 11
UnnecessaryModifier Unnecessary modifier 'public' on method 'onError': the method is declared in an interface type 17

us/codecraft/webmagic/Task.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'getUUID': the method is declared in an interface type 18
UnnecessaryModifier Unnecessary modifier 'public' on method 'getSite': the method is declared in an interface type 25

us/codecraft/webmagic/downloader/Downloader.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'download': the method is declared in an interface type 24
UnnecessaryModifier Unnecessary modifier 'public' on method 'setThread': the method is declared in an interface type 30

us/codecraft/webmagic/downloader/HttpUriRequestConverter.java

Rule Violation Line
UnusedFormalParameter Avoid unused method parameters such as 'site'. 41

us/codecraft/webmagic/pipeline/CollectorPipeline.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'getCollected': the method is declared in an interface type 19

us/codecraft/webmagic/pipeline/Pipeline.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'process': the method is declared in an interface type 23

us/codecraft/webmagic/scheduler/MonitorableScheduler.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'getLeftRequestsCount': the method is declared in an interface type 13
UnnecessaryModifier Unnecessary modifier 'public' on method 'getTotalRequestsCount': the method is declared in an interface type 15

us/codecraft/webmagic/scheduler/Scheduler.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'push': the method is declared in an interface type 23
UnnecessaryModifier Unnecessary modifier 'public' on method 'poll': the method is declared in an interface type 31

us/codecraft/webmagic/scheduler/component/DuplicateRemover.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'isDuplicate': the method is declared in an interface type 20
UnnecessaryModifier Unnecessary modifier 'public' on method 'resetDuplicateCheck': the method is declared in an interface type 26
UnnecessaryModifier Unnecessary modifier 'public' on method 'getTotalRequestsCount': the method is declared in an interface type 33

us/codecraft/webmagic/selector/ElementSelector.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'select': the method is declared in an interface type 22
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectList': the method is declared in an interface type 30

us/codecraft/webmagic/selector/Selectable.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'xpath': the method is declared in an interface type 19
UnnecessaryModifier Unnecessary modifier 'public' on method '$': the method is declared in an interface type 27
UnnecessaryModifier Unnecessary modifier 'public' on method '$': the method is declared in an interface type 36
UnnecessaryModifier Unnecessary modifier 'public' on method 'css': the method is declared in an interface type 44
UnnecessaryModifier Unnecessary modifier 'public' on method 'css': the method is declared in an interface type 53
UnnecessaryModifier Unnecessary modifier 'public' on method 'smartContent': the method is declared in an interface type 60
UnnecessaryModifier Unnecessary modifier 'public' on method 'links': the method is declared in an interface type 67
UnnecessaryModifier Unnecessary modifier 'public' on method 'regex': the method is declared in an interface type 75
UnnecessaryModifier Unnecessary modifier 'public' on method 'regex': the method is declared in an interface type 84
UnnecessaryModifier Unnecessary modifier 'public' on method 'replace': the method is declared in an interface type 93
UnnecessaryModifier Unnecessary modifier 'public' on method 'toString': the method is declared in an interface type 100
UnnecessaryModifier Unnecessary modifier 'public' on method 'get': the method is declared in an interface type 107
UnnecessaryModifier Unnecessary modifier 'public' on method 'match': the method is declared in an interface type 114
UnnecessaryModifier Unnecessary modifier 'public' on method 'all': the method is declared in an interface type 121
UnnecessaryModifier Unnecessary modifier 'public' on method 'jsonPath': the method is declared in an interface type 129
UnnecessaryModifier Unnecessary modifier 'public' on method 'select': the method is declared in an interface type 137
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectList': the method is declared in an interface type 145
UnnecessaryModifier Unnecessary modifier 'public' on method 'nodes': the method is declared in an interface type 151

us/codecraft/webmagic/selector/Selector.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'select': the method is declared in an interface type 20
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectList': the method is declared in an interface type 28

us/codecraft/webmagic/selector/SmartContentSelector.java

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 5561
CollapsibleIfStatements These nested if statements could be combined 6468

Files

us/codecraft/webmagic/Spider.java

Rule Violation Priority Line
UnnecessaryReturn Avoid unnecessary return statements 3 461
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'Status(int)': enum constructors are implicitly private 3 710712

us/codecraft/webmagic/SpiderListener.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'onSuccess': the method is declared in an interface type 3 11
UnnecessaryModifier Unnecessary modifier 'public' on method 'onError': the method is declared in an interface type 3 17

us/codecraft/webmagic/Task.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'getUUID': the method is declared in an interface type 3 18
UnnecessaryModifier Unnecessary modifier 'public' on method 'getSite': the method is declared in an interface type 3 25

us/codecraft/webmagic/downloader/Downloader.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'download': the method is declared in an interface type 3 24
UnnecessaryModifier Unnecessary modifier 'public' on method 'setThread': the method is declared in an interface type 3 30

us/codecraft/webmagic/downloader/HttpUriRequestConverter.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused method parameters such as 'site'. 3 41

us/codecraft/webmagic/pipeline/CollectorPipeline.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'getCollected': the method is declared in an interface type 3 19

us/codecraft/webmagic/pipeline/Pipeline.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'process': the method is declared in an interface type 3 23

us/codecraft/webmagic/scheduler/MonitorableScheduler.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'getLeftRequestsCount': the method is declared in an interface type 3 13
UnnecessaryModifier Unnecessary modifier 'public' on method 'getTotalRequestsCount': the method is declared in an interface type 3 15

us/codecraft/webmagic/scheduler/Scheduler.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'push': the method is declared in an interface type 3 23
UnnecessaryModifier Unnecessary modifier 'public' on method 'poll': the method is declared in an interface type 3 31

us/codecraft/webmagic/scheduler/component/DuplicateRemover.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'isDuplicate': the method is declared in an interface type 3 20
UnnecessaryModifier Unnecessary modifier 'public' on method 'resetDuplicateCheck': the method is declared in an interface type 3 26
UnnecessaryModifier Unnecessary modifier 'public' on method 'getTotalRequestsCount': the method is declared in an interface type 3 33

us/codecraft/webmagic/selector/ElementSelector.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'select': the method is declared in an interface type 3 22
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectList': the method is declared in an interface type 3 30

us/codecraft/webmagic/selector/Selectable.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'xpath': the method is declared in an interface type 3 19
UnnecessaryModifier Unnecessary modifier 'public' on method '$': the method is declared in an interface type 3 27
UnnecessaryModifier Unnecessary modifier 'public' on method '$': the method is declared in an interface type 3 36
UnnecessaryModifier Unnecessary modifier 'public' on method 'css': the method is declared in an interface type 3 44
UnnecessaryModifier Unnecessary modifier 'public' on method 'css': the method is declared in an interface type 3 53
UnnecessaryModifier Unnecessary modifier 'public' on method 'smartContent': the method is declared in an interface type 3 60
UnnecessaryModifier Unnecessary modifier 'public' on method 'links': the method is declared in an interface type 3 67
UnnecessaryModifier Unnecessary modifier 'public' on method 'regex': the method is declared in an interface type 3 75
UnnecessaryModifier Unnecessary modifier 'public' on method 'regex': the method is declared in an interface type 3 84
UnnecessaryModifier Unnecessary modifier 'public' on method 'replace': the method is declared in an interface type 3 93
UnnecessaryModifier Unnecessary modifier 'public' on method 'toString': the method is declared in an interface type 3 100
UnnecessaryModifier Unnecessary modifier 'public' on method 'get': the method is declared in an interface type 3 107
UnnecessaryModifier Unnecessary modifier 'public' on method 'match': the method is declared in an interface type 3 114
UnnecessaryModifier Unnecessary modifier 'public' on method 'all': the method is declared in an interface type 3 121
UnnecessaryModifier Unnecessary modifier 'public' on method 'jsonPath': the method is declared in an interface type 3 129
UnnecessaryModifier Unnecessary modifier 'public' on method 'select': the method is declared in an interface type 3 137
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectList': the method is declared in an interface type 3 145
UnnecessaryModifier Unnecessary modifier 'public' on method 'nodes': the method is declared in an interface type 3 151

us/codecraft/webmagic/selector/Selector.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'select': the method is declared in an interface type 3 20
UnnecessaryModifier Unnecessary modifier 'public' on method 'selectList': the method is declared in an interface type 3 28

us/codecraft/webmagic/selector/SmartContentSelector.java

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 5561
CollapsibleIfStatements These nested if statements could be combined 3 6468