File path: /jruby-1.4.0/src/org/jruby/runtime/builtin/InstanceVariableTable.java | File path: /jruby-1.4.0/src/org/jruby/runtime/builtin/InstanceVariableTable.java | |||
Method name: boolean fastContains(String)
|
Method name: Object fastFetch(String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (USE_PACKED_ARRAY) {↵ | 1 | if (USE_PACKED_ARRAY) {↵ | |
2 | if (packedVTable != null) return fastPackedContains(name);↵ | 2 | if (packedVTable != null) return fastPackedFetch(name);↵ | |
3 | } else if (USE_PACKED_FIELDS) {↵ | 3 | } else if (USE_PACKED_FIELDS) {↵ | |
4 | if (packedVFields != null) return packedVFields.fastContains(name);↵ | 4 | if (packedVFields != null) return packedVFields.fastFetch(name);↵ | |
5 | }↵ | 5 | }↵ | |
6 | return fastHashContains(name); | 6 | return fastHashFetch(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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | if (USE_PACKED_ARRAY) | 1 | if (USE_PACKED_ARRAY) | |||||
2 | if (packedVTable != null) | 2 | if (packedVTable != null) | |||||
|
| 3 | return fastPackedFetch(name); | |||||
3 | return fastPackedContains(name); |
| | |||||
4 | else if (USE_PACKED_FIELDS) | 4 | else if (USE_PACKED_FIELDS) | |||||
5 | if (packedVFields != null) | 5 | if (packedVFields != null) | |||||
|
| 6 | return packedVFields.fastFetch(name); | |||||
6 | return packedVFields.fastContains(name); |
| | |||||
|
| 7 | return fastHashFetch(name); | |||||
7 | return fastHashContains(name); |
| |
Row | Violation |
---|---|
1 | Unmatched statement return fastPackedFetch(name); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched return fastPackedFetch(name); |
3 | Unmatched statement return fastPackedContains(name); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return fastPackedContains(name); |
5 | Unmatched statement return packedVFields.fastFetch(name); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched return packedVFields.fastFetch(name); |
7 | Unmatched statement return packedVFields.fastContains(name); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Unmatched return packedVFields.fastContains(name); |
9 | Unmatched return fastHashFetch(name); |
10 | Unmatched return fastHashContains(name); |