File path: /jruby-1.4.0/src/org/jruby/RubyRange.java | File path: /jruby-1.4.0/src/org/jruby/runtime/load/LoadService.java | |||
Method name: RubyRange newRange(Ruby, ThreadContext, IRubyObject, IRubyObject, boolean)
|
Method name: LoadServiceResource findFileInClasspath(String)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 4 | |||
1 | RubyRange range = new RubyRange(runtime, runtime.getRange());↵ | |||
2 | range.init(context, begin, end, isExclusiv↵ | 1 | if (isRequireable(loc)) {↵ | |
2 | LoadServiceResource foundResource = new LoadServiceResource(loc, loc.getPath());↵ | |||
3 | e);↵ | 3 | debugLogFound(foundResource);↵ | |
4 | return range; | 4 | return foundResource;↵ | |
5 |
| |||
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 | RubyRange range = new RubyRange(runtime, runtime.getRange()); | | ||||||||||||||||||||||
| 21 | LoadServiceResource foundResource = new LoadServiceResource(loc, loc.getPath()); | ||||||||||||||||||||||
2 | range.init(context, begin, end, isExclusive); |
| 22 | debugLogFound(foundResource); | ||||||||||||||||||||
3 | return range; |
| | |||||||||||||||||||||
|
| 23 | return foundResource; |
Row | Violation |
---|---|
1 | Expression range.init(context,begin,end,isExclusive) 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 range.init(context,begin,end,isExclusive) 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 range; |
6 | Unmatched return foundResource; |