File path: /jruby-1.4.0/src/org/jruby/RubyJRuby.java | File path: /jruby-1.4.0/src/org/jruby/RubyInstanceConfig.java | |||
Method name: IRubyObject getDefaultProc(ThreadContext)
|
Method name: String displayedFileName()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (default_proc != null) {↵ | 1 | if (scriptFileName != null) {↵ | |
2 | return default_proc;↵ | 2 | return scriptFileName;↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | return context.getRuntime().getNil();↵ | 4 | return "-e";↵ | |
5 | } | 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.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) | 3.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (default_proc != null) |
| 2 | if (scriptFileName != null) | ||||||||||||||
2 | return default_proc; |
| | |||||||||||||||
else | | |||||||||||||||||
3 | return context.getRuntime().getNil(); |
| | |||||||||||||||
|
| 4 | return "-e"; | |||||||||||||||
|
| 3 | return scriptFileName; |
Row | Violation |
---|---|
1 | Type org.jruby.RubyProc of variable default_proc does not match with type java.lang.String of variable scriptFileName |
2 | Unmatched return default_proc; |
3 | Unmatched return context.getRuntime().getNil(); |
4 | Unmatched return "-e"; |
5 | Unmatched return scriptFileName; |