File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/ForeignKey.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Constraint.java | |||
Method name: void addReferencedColumns(Iterator)
|
Method name: void addColumns(Iterator)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while ( referencedColumnsIterator.hasNext() ) {↵ | 1 | while ( columnIterator.hasNext() ) {↵ | |
2 | Selectable col = (Selectable) referencedColumnsIterator.next();↵ | 2 | Selectable col = (Selectable) columnIterator.next();↵ | |
3 | if ( !col.isFormula() ) addReferencedColumn( (Column) col );↵ | 3 | if ( !col.isFormula() ) addColumn( (Column) col );↵ | |
4 | } | 4 |
| |
See real code fragment | See real code fragment |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | while (referencedColumnsIterator.hasNext()) |
| 1 | while (columnIterator.hasNext()) | ||||||||||||||
2 | Selectable col = (Selectable)referencedColumnsIterator.next(); |
| 2 | Selectable col = (Selectable)columnIterator.next(); | ||||||||||||||
3 | if (!col.isFormula()) | 3 | if (!col.isFormula()) | |||||||||||||||
4 | addReferencedColumn((Column)col); |
| 4 | addColumn((Column)col); |
Row | Violation |
---|---|
1 | Expression addReferencedColumn((Column)col) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression addColumn((Column)col) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression addReferencedColumn((Column)col) is a void method call, and thus it cannot be parameterized |
4 | Expression addColumn((Column)col) is a void method call, and thus it cannot be parameterized |