File path: /jruby-1.4.0/src/org/jruby/RubyClass.java | File path: /jruby-1.4.0/src/org/jruby/RubyClass.java | |||
Method name: RubyClass newClass(Ruby, RubyClass, CallSite[])
|
Method name: RubyClass newClass(Ruby, RubyClass)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (superClass == runtime.getClassClass()) throw runtime.newTypeError("can't make subclass of Class");↵ | 1 | if (superClass == runtime.getClassClass()) throw runtime.newTypeError("can't make subclass of Class");↵ | |
2 | if (superClass.isSingleton()) throw runtime.newTypeError("can't make subclass of virtual class");↵ | 2 | if (superClass.isSingleton()) throw runtime.newTypeError("can't make subclass of virtual class");↵ | |
3 | return new RubyClass(runtime, superClass, extraCallSites); | 3 | return new RubyClass(runtime, superClass); | |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
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) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (superClass == runtime.getClassClass()) | 1 | if (superClass == runtime.getClassClass()) | |||||||||||
2 | throw runtime.newTypeError("can't make subclass of Class"); | 2 | throw runtime.newTypeError("can't make subclass of Class"); | |||||||||||
3 | if (superClass.isSingleton()) | 3 | if (superClass.isSingleton()) | |||||||||||
4 | throw runtime.newTypeError("can't make subclass of virtual class"); | 4 | throw runtime.newTypeError("can't make subclass of virtual class"); | |||||||||||
5 | return new RubyClass(runtime, superClass, extraCallSites); |
| 5 | return new RubyClass(runtime, superClass); |
Row | Violation |
---|