Property prop = (Property) iter.next();
boolean[] chunk = prop.getValue().getColumnInsertability();
if ( prop.isInsertable() ) {
System.arraycopy(chunk, 0, result, i, chunk.length);
}
i+=chunk.length;
Property prop = (Property) iter.next();
boolean[] chunk = prop.getValue().getColumnUpdateability();
if ( prop.isUpdateable() ) {
System.arraycopy(chunk, 0, result, i, chunk.length);
}
i+=chunk.length;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Component.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Component.java
|
Method name: boolean[] getColumnInsertability()
|
|
Method name: boolean[] getColumnUpdateability()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Property prop = (Property) iter.next();↵ | | 1 | Property prop = (Property) iter.next();↵
|
2 | boolean[] chunk = prop.getValue().getColumnInsertability();↵ | | 2 | boolean[] chunk = prop.getValue().getColumnUpdateability();↵
|
3 | if ( prop.isInsertable() ) {↵ | | 3 | if ( prop.isUpdateable() ) {↵
|
4 | System.arraycopy(chunk, 0, result, i, chunk.length);↵ | | 4 | System.arraycopy(chunk, 0, result, i, chunk.length);↵
|
5 | }↵ | | 5 | }↵
|
6 | i+=chunk.length; | | 6 | i+=chunk.length;
|
See real code fragment |
|
See real code fragment |
Summary
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
-
{Non-refactorable}
Mapping Summary
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) | 1.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | Property prop = (Property)iter.next(); | | 5 | Property prop = (Property)iter.next(); |
6 | boolean[] chunk = prop.getValue().getColumnInsertability(); | | 6 | boolean[] chunk = prop.getValue().getColumnUpdateability(); |
7 | if (prop.isInsertable()) | | 7 | if (prop.isUpdateable()) |
8 | System.arraycopy(chunk, 0, result, i, chunk.length); | | 8 | System.arraycopy(chunk, 0, result, i, chunk.length); |
9 | i += chunk.length; | | 9 | i += chunk.length; |
Precondition Violations (4)
Row |
Violation |
1 | Expression prop.getValue().getColumnInsertability() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression prop.getValue().getColumnUpdateability() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression prop.isInsertable() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression prop.isUpdateable() cannot be parameterized, because it has dependencies to/from statements that will be extracted |