File path: /jruby-1.4.0/src/org/jruby/Ruby.java | File path: /jruby-1.4.0/src/org/jruby/Ruby.java | |||
Method name: Node parseEval(String, String, DynamicScope, int)
|
Method name: Node parse(String, String, DynamicScope, int, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 4 | |||
1 | byte[] bytes;↵ | 1 | byte[] bytes;↵ | |
2 | ↵ | 2 | ↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | bytes = content.getBytes(KCode.NONE.getKCode());↵ | 4 | bytes = content.getBytes(KCode.NONE.getKCode());↵ | |
5 | } catch (UnsupportedEncodingException e) {↵ | 5 | } catch (UnsupportedEncodingException e) {↵ | |
6 | bytes = content.getBytes();↵ | 6 | bytes = content.getBytes();↵ | |
7 | }↵ | 7 | }↵ | |
8 | ↵ | |||
9 | if (parserStats != null) parserStats.addEvalParse();↵ | |||
10 | return parser.parse(file, new ByteArrayInputStream(bytes), scope, ↵ | 8 | return parser.parse(file, new ByteArrayInputStream(bytes), scope, ↵ | |
11 | new ParserConfiguration(getKCode(), lineNumber, false, false, true, config)); | 9 | new ParserConfiguration(getKCode(), lineNumber, extraPositionInformation, false, true, config)); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | byte[] bytes; | 1 | byte[] bytes; | |||||||||||
2 | try | 2 | try | |||||||||||
3 | bytes = content.getBytes(KCode.NONE.getKCode()); | 3 | bytes = content.getBytes(KCode.NONE.getKCode()); | |||||||||||
4 | if (parserStats != null) | | ||||||||||||
5 | parserStats.addEvalParse(); | | ||||||||||||
6 | return parser.parse(file, new ByteArrayInputStream(bytes), scope, new ParserConfiguration(getKCode(), lineNumber, false, false, true, config)); |
| 4 | return parser.parse(file, new ByteArrayInputStream(bytes), scope, new ParserConfiguration(getKCode(), lineNumber, extraPositionInformation, false, true, config)); |
Row | Violation |
---|