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