File path: /jruby-1.4.0/src/org/jruby/runtime/builtin/InstanceVariableTable.java | File path: /jruby-1.4.0/src/org/jruby/RubySymbol.java | |||
Method name: boolean hashContains(String)
|
Method name: RubySymbol lookup(String)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | for (VariableTableEntry e = table[hash & (table.length - 1)]; e != null; e = e.next) {↵ | 1 | for (SymbolEntry e = (table = symbolTable)[hash & (table.length - 1)]; e != null; e = e.next) {↵ | |
2 | if (hash == e.hash && name.equals(e.name)) {↵ | 2 | if (hash == e.hash && name.equals(e.name)) {↵ | |
3 | return true;↵ | 3 | return e.symbol;↵ | |
4 | }↵ | 4 | ↵ | |
5 | }↵ | |||
5 | } | 6 | } | |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (hash == e.hash && name.equals(e.name)) |
| 4 | if (hash == e.hash && name.equals(e.name)) | |||||||||||||||
|
| 5 | return e.symbol; | ||||||||||||||||
5 | return true; |
| |
Row | Violation |
---|---|
1 | Type org.jruby.runtime.builtin.InstanceVariableTable.VariableTableEntry of variable e does not match with type org.jruby.RubySymbol.SymbolTable.SymbolEntry of variable e |
2 | Type org.jruby.runtime.builtin.InstanceVariableTable.VariableTableEntry of variable e does not match with type org.jruby.RubySymbol.SymbolTable.SymbolEntry of variable e |
3 | Unmatched return e.symbol; |
4 | Unmatched return true; |