File path: /jruby-1.4.0/src/org/jruby/RubySymbol.java | File path: /jruby-1.4.0/src/org/jruby/RubySymbol.java | |||
Method name: RubySymbol createSymbol(String, ByteList, int, SymbolEntry[])
|
Method name: RubySymbol lookup(String)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | for (SymbolEntry e = table[index = 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 e.symbol;↵ | 3 | return e.symbol;↵ | |
4 | }↵ | 4 | ↵ | |
5 | ↵ | 5 | }↵ | |
6 | } | 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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
Number of mapped statements | 3 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | for (SymbolEntry e = table[index = hash & (table.length - 1)]; e != null; e = e.next) |
| 3 | for (SymbolEntry e = (table = symbolTable)[hash & (table.length - 1)]; e != null; e = e.next) | ||||||||||
10 | if (hash == e.hash && name.equals(e.name)) | 4 | if (hash == e.hash && name.equals(e.name)) | |||||||||||
11 | return e.symbol; | 5 | return e.symbol; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables index , while Clone fragment #2 returns variables |