File path: /jruby-1.4.0/src/org/jruby/runtime/load/LoadServiceResource.java | File path: /jruby-1.4.0/src/org/jruby/RubyInstanceConfig.java | |||
Method name: URL getURL()
|
Method name: String displayedFileName()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (resource != null) {↵ | 1 | if (scriptFileName != null) {↵ | |
2 | return resource;↵ | 2 | return scriptFileName;↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | return path.toURI().toURL();↵ | 4 | return ↵ | |
5 | "-e";↵ | |||
5 | } | 6 | } | |
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.2 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (resource != null) |
| 2 | if (scriptFileName != null) | ||||||||||||||
2 | return resource; |
| | |||||||||||||||
else | | |||||||||||||||||
3 | return path.toURI().toURL(); |
| | |||||||||||||||
|
| 4 | return "-e"; | |||||||||||||||
|
| 3 | return scriptFileName; |
Row | Violation |
---|---|
1 | Type java.net.URL of variable resource does not match with type java.lang.String of variable scriptFileName |
2 | Unmatched return resource; |
3 | Unmatched return path.toURI().toURL(); |
4 | Unmatched return "-e"; |
5 | Unmatched return scriptFileName; |