while ( iter.hasNext() ) {
Property prop = (Property) iter.next();
boolean[] chunk = prop.getValue().getColumnInsertability();
if ( prop.isInsertable() ) {
System.arraycopy(chunk, 0, result, i, chunk.length);
}
i+=chunk.length;
}
while ( iter.hasNext() ) {
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: 6
|
|
Number of AST nodes: 6
|
|
1 | while ( iter.hasNext() ) {↵ | | 1 | while ( iter.hasNext() ) {↵
|
2 | Property prop = (Property) iter.next();↵ | | 2 | Property prop = (Property) iter.next();↵
|
3 | boolean[] chunk = prop.getValue().getColumnInsertability();↵ | | 3 | boolean[] chunk = prop.getValue().getColumnUpdateability();↵
|
4 | if ( prop.isInsertable() ) {↵ | | 4 | if ( prop.isUpdateable() ) {↵
|
5 | System.arraycopy(chunk, 0, result, i, chunk.length);↵ | | 5 | System.arraycopy(chunk, 0, result, i, chunk.length);↵
|
6 | }↵ | | 6 | }↵
|
7 | i+=chunk.length;↵ | | 7 | i+=chunk.length;↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 13.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | while (iter.hasNext()) | | 4 | while (iter.hasNext()) |
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 | | | 7 | |
8 | System.arraycopy(chunk, 0, result, i, chunk.length); | | 8 | System.arraycopy(chunk, 0, result, i, chunk.length); |
9 | | | 9 | |
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 |