Iterator iter = friends.iterator();
while ( iter.hasNext() ) {
s.delete( iter.next() );
}
if ( dialect.supportsTableCheck() ) {
Iterator chiter = checkConstraints.iterator();
while ( chiter.hasNext() ) {
buf.append( ", check (" )
.append( chiter.next() )
.append( ')' );
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/Fum.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Table.java
|
Method name: boolean onDelete(Session)
|
|
Method name: String sqlCreateString(Dialect, Mapping, String, String)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 4
|
|
| | | 1 | if ( dialect.supportsTableCheck() ) {↵
|
1 | Iterator iter = friends.iterator();↵ | | 2 | Iterator chiter = checkConstraints.iterator();↵
|
2 | while ( iter.hasNext() ) {↵ | | 3 | while ( chiter.hasNext() ) {↵
|
3 | s.delete( iter.next()↵ | | 4 | buf.append( ", check (" )↵
|
| | | 5 | .append( chiter.next() )↵
|
4 | );↵ | | 6 | .append( ')' );↵
|
5 | } | | 7 | }↵
|
| | | 8 | }
|
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 in different classes |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
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.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | Iterator iter = friends.iterator(); | | 44 | Iterator chiter = checkConstraints.iterator(); |
5 | while (iter.hasNext()) | | 45 | while (chiter.hasNext()) |
6 | | | | |
| | | 46 | buf.append(", check (").append(chiter.next()).append(')'); |
Precondition Violations (1)
Row |
Violation |
1 | Type java.util.Set of variable friends does not match with type java.util.List of variable checkConstraints |