File path: /jruby-1.4.0/src/org/jruby/RubyFileStat.java | File path: /jruby-1.4.0/src/org/jruby/runtime/load/LoadService.java | |||
Method name: RubyFileStat newFileStat(Ruby, String, boolean)
|
Method name: LoadServiceResource findFileInClasspath(String)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 4 | |||
1 | RubyFileStat stat = new RubyFileStat(runtime, runtime.getFileSt↵ | 1 | if (isRequireable(loc)) {↵ | |
2 | at());↵ | 2 | LoadServiceResource foundResource = new LoadServiceResource(loc, loc.getPath());↵ | |
3 | ↵ | 3 | ↵ | |
4 | stat.setup(filename, lstat);↵ | 4 | debugLogFound(foundResource);↵ | |
5 | ↵ | 5 | ↵ | |
6 | return stat; | 6 | return foundResource;↵ | |
7 |
| |||
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | RubyFileStat stat = new RubyFileStat(runtime, runtime.getFileStat()); | | ||||||||||||||||||||||
| 21 | LoadServiceResource foundResource = new LoadServiceResource(loc, loc.getPath()); | ||||||||||||||||||||||
2 | stat.setup(filename, lstat); |
| 22 | debugLogFound(foundResource); | ||||||||||||||||||||
3 | return stat; |
| | |||||||||||||||||||||
|
| 23 | return foundResource; |
Row | Violation |
---|---|
1 | Expression stat.setup(filename,lstat) is a void method call, and thus it cannot be parameterized |
2 | Expression debugLogFound(foundResource) is a void method call, and thus it cannot be parameterized |
3 | Expression stat.setup(filename,lstat) is a void method call, and thus it cannot be parameterized |
4 | Expression debugLogFound(foundResource) is a void method call, and thus it cannot be parameterized |
5 | Unmatched return stat; |
6 | Unmatched return foundResource; |