File path: /jruby-1.4.0/src/org/jruby/RubyInstanceConfig.java | File path: /jruby-1.4.0/src/org/jruby/parser/RubyParserPool.java | |||
Method name: ASTCompiler newCompiler()
|
Method name: RubyParser borrowParser(CompatVersion)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (getCompatVersion() == CompatVersion.RUBY1_8) {↵ | 1 | if (version == CompatVersion.RUBY1_8) {↵ | |
2 | return new ASTCompiler();↵ | 2 | return new DefaultRubyParser();↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | return new ASTCompiler19();↵ | 4 | return new Ruby19Parser();↵ | |
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) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (getCompatVersion() == CompatVersion.RUBY1_8) |
| 1 | if (version == CompatVersion.RUBY1_8) | ||||||||||
|
| 2 | return new DefaultRubyParser(); | |||||||||||
2 | return new ASTCompiler(); |
| | |||||||||||
else | | |||||||||||||
|
| 3 | return new Ruby19Parser(); | |||||||||||
3 | return new ASTCompiler19(); |
| |
Row | Violation |
---|---|
1 | Unmatched return new DefaultRubyParser(); |
2 | Unmatched return new ASTCompiler(); |
3 | Unmatched return new Ruby19Parser(); |
4 | Unmatched return new ASTCompiler19(); |