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, isExclusive);↵ | |||
3 | return range; | 1 | if (isRequireable(loc)) {↵ | |
2 | LoadServiceResource foundResource = new LoadServiceResource(loc, loc.getPath());↵ | |||
3 | debugLogFound(foundResource);↵ | |||
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()); | | ||||||||||||||||||||||
|
| 13 | LoadServiceResource foundResource = new LoadServiceResource(loc, loc.getPath()); | |||||||||||||||||||||
2 | range.init(context, begin, end, isExclusive); |
| 14 | debugLogFound(foundResource); | ||||||||||||||||||||
3 | return range; |
| | |||||||||||||||||||||
|
| 15 | return foundResource; |
Row | Violation |
---|---|
1 | Unmatched statement LoadServiceResource foundResource=new LoadServiceResource(loc,loc.getPath()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression range.init(context,begin,end,isExclusive) is a void method call, and thus it cannot be parameterized |
3 | Expression debugLogFound(foundResource) is a void method call, and thus it cannot be parameterized |
4 | Expression range.init(context,begin,end,isExclusive) is a void method call, and thus it cannot be parameterized |
5 | Expression debugLogFound(foundResource) is a void method call, and thus it cannot be parameterized |
6 | Unmatched return range; |
7 | Unmatched return foundResource; |