File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaSupport.java | File path: /jruby-1.4.0/src/org/jruby/ast/SymbolNode.java | |||
Method name: RubyClass getJavaProxyClass()
|
Method name: RubySymbol getSymbol(Ruby)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | RubyClass clazz;↵ | 1 | RubySymbol sym;↵ | |
2 | if ((clazz = javaProxyClass) != null) return clazz;↵ | 2 | if ((sym = symbol) != null) return sym;↵ | |
3 | return javaProxyClass = runtime.fastGetClass("JavaProxy"); | 3 | return symbol = runtime.fastNewSymbol(name); | |
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 | 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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | RubyClass clazz; |
| 1 | RubySymbol sym; | |||||||||||||||||||||
2 | if ((clazz = javaProxyClass) != null) |
| 2 | if ((sym = symbol) != null) | |||||||||||||||||||||
3 | return clazz; |
| 3 | return sym; | |||||||||||||||||||||
4 | return javaProxyClass = runtime.fastGetClass("JavaProxy"); |
| 4 | return symbol = runtime.fastNewSymbol(name); |
Row | Violation |
---|---|
1 | Expression javaProxyClass is a field being modified, and thus it cannot be parameterized |
2 | Expression symbol is a field being modified, and thus it cannot be parameterized |