File path: /jruby-1.4.0/src/org/jruby/ast/SuperNode.java | File path: /jruby-1.4.0/src/org/jruby/ast/ZSuperNode.java | |||
Method name: String definition(Ruby, ThreadContext, IRubyObject, Block)
|
Method name: String definition(Ruby, ThreadContext, IRubyObject, Block)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | String name = context.getFrameName();↵ | 1 | String name = context.getFrameName();↵ | |
2 | RubyModule klazz = context.getFrameKlazz();↵ | 2 | RubyModule klazz = context.getFrameKlazz();↵ | |
3 | ↵ | 3 | ↵ | |
4 | if (name != null && klazz != null && klazz.getSuperClass().isMethodBound(name, false)) {↵ | 4 | if (name != null && klazz != null && klazz.getSuperClass().isMethodBound(name, false)) {↵ | |
5 | return ASTInterpreter.getArgumentDefinition(runtime, context, argsNode, "super", self, aBlock);↵ | 5 | return "super";↵ | |
6 | }↵ | 6 | }↵ | |
7 | ↵ | 7 | ↵ | |
8 | return null; | 8 |
| |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String name = context.getFrameName(); | 1 | String name = context.getFrameName(); | |||||||||||
2 | RubyModule klazz = context.getFrameKlazz(); | 2 | RubyModule klazz = context.getFrameKlazz(); | |||||||||||
3 | if (name != null && klazz != null && klazz.getSuperClass().isMethodBound(name, false)) | 3 | if (name != null && klazz != null && klazz.getSuperClass().isMethodBound(name, false)) | |||||||||||
4 | return ASTInterpreter.getArgumentDefinition(runtime, context, argsNode, "super", self, aBlock); |
| 4 | return "super"; | ||||||||||
5 | return null; | 5 | return null; |
Row | Violation |
---|