File path: /jruby-1.4.0/src/org/jruby/ast/Colon2ConstNode.java | File path: /jruby-1.4.0/src/org/jruby/ast/Colon2MethodNode.java | |||
Method name: String definition(Ruby, ThreadContext, IRubyObject, Block)
|
Method name: String definition(Ruby, ThreadContext, IRubyObject, Block)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | try {↵ | 1 | try {↵ | |
2 | if (isModuleAndHasConstant(leftNode.interpret(runtime, context, self, aBlock))) return "constant";↵ | 2 | if (hasMethod(leftNode.interpret(runtime, context, self, aBlock))) return "method";↵ | |
3 | } catch (JumpException e) {↵ | 3 | } catch (JumpException e) {↵ | |
4 | }↵ | 4 | }↵ | |
5 | return null; | 5 |
| |
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 in different classes having the same super class |
Number of node comparisons | 6 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | try | 1 | try | |||||||||||
2 | if (isModuleAndHasConstant(leftNode.interpret(runtime, context, self, aBlock))) |
| 2 | if (hasMethod(leftNode.interpret(runtime, context, self, aBlock))) | ||||||||||
3 | return "constant"; |
| 3 | return "method"; | ||||||||||
4 | return null; | 4 | return null; |
Row | Violation |
---|