while ( iter.hasNext() ) {
Column column = (Column) iter.next();
if ( !nullable && column.isNullable() ) nullable = true;
buf.append( column.getQuotedName( dialect ) );
if ( iter.hasNext() ) buf.append( ", " );
}
while ( iter.hasNext() ) {
Column column = (Column) iter.next();
if ( !nullable && column.isNullable() ) nullable = true;
buf.append( column.getQuotedName( dialect ) );
if ( iter.hasNext() ) buf.append( ", " );
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/UniqueKey.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/UniqueKey.java
|
Method name: String sqlConstraintString(Dialect)
|
|
Method name: String sqlConstraintString(Dialect, String, String, String)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | while ( iter.hasNext() ) {↵ | | 1 | while ( iter.hasNext() ) {↵
|
2 | Column column = (Column) iter.next();↵ | | 2 | Column column = (Column) iter.next();↵
|
3 | if ( !nullable && column.isNullable() ) nullable = true;↵ | | 3 | if ( !nullable && column.isNullable() ) nullable = true;↵
|
4 | buf.append( column.getQuotedName( dialect ) );↵ | | 4 | buf.append( column.getQuotedName( dialect ) );↵
|
5 | if ( iter.hasNext() ) buf.append( ", " );↵ | | 5 | if ( iter.hasNext() ) buf.append( ", " );↵
|
6 | } | | 6 | }
|
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 22 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 0.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | while (iter.hasNext()) | | 4 | while (iter.hasNext()) |
5 | Column column = (Column)iter.next(); | | 5 | Column column = (Column)iter.next(); |
6 | if (!nullable && column.isNullable()) | | 6 | if (!nullable && column.isNullable()) |
7 | | | 7 | |
8 | buf.append(column.getQuotedName(dialect)); | | 8 | buf.append(column.getQuotedName(dialect)); |
9 | | | 9 | |
10 | | | 10 | |
Precondition Violations (0)
Row |
Violation |