File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java | |||
Method name: String generateSelectRowByIndexString()
|
Method name: String generateDetectRowByIndexString()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if ( !hasIndex() ) {↵ | 1 | if ( !hasIndex() ) {↵ | |
2 | return null;↵ | 2 | return null;↵ | |
3 | }↵ | 3 | }↵ | |
4 | return new SimpleSelect(dialect)↵ | 4 | return new SimpleSelect(dialect)↵ | |
5 | .setTableName( getTableName() )↵ | 5 | .setTableName( getTableName() )↵ | |
6 | .addCondition( getKeyColumnNames(), "=?" )↵ | 6 | .addCondition( getKeyColumnNames(), "=?" )↵ | |
7 | .addCondition( getIndexColumnNames(), "=?" )↵ | 7 | .addCondition( getIndexColumnNames(), "=?" )↵ | |
8 | .addCondition( indexFormulas, "=?" )↵ | 8 | .addCondition( indexFormulas, "=?" )↵ | |
9 | .addColumns( getElementColumnNames(), elementColumnAliases )↵ | 9 | .addColumn↵ | |
10 | .addColumns( indexFormulas, indexColumnAliases )↵ | 10 | ("1")↵ | |
11 | .toStatementString(); | 11 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | if (!hasIndex()) | 1 | if (!hasIndex()) | ||||
2 | return null; | 2 | return null; | ||||
|
| 3 | return new SimpleSelect(dialect).setTableName(getTableName()).addCondition(getKeyColumnNames(), "=?").addCondition(getIndexColumnNames(), "=?").addCondition(indexFormulas, "=?").addColumn("1").toStatementString(); | ||||
3 | return new SimpleSelect(dialect).setTableName(getTableName()).addCondition(getKeyColumnNames(), "=?").addCondition(getIndexColumnNames(), "=?").addCondition(indexFormulas, "=?").addColumns(getElementColumnNames(), elementColumnAliases).addColumns(indexFormulas, indexColumnAliases).toStatementString(); |
| |
Row | Violation |
---|---|
1 | Unmatched return new SimpleSelect(dialect).setTableName(getTableName()).addCondition(getKeyColumnNames(),"=?").addCondition(getIndexColumnNames(),"=?").addCondition(indexFormulas,"=?").addColumn("1").toStatementString(); |
2 | Unmatched return new SimpleSelect(dialect).setTableName(getTableName()).addCondition(getKeyColumnNames(),"=?").addCondition(getIndexColumnNames(),"=?").addCondition(indexFormulas,"=?").addColumns(getElementColumnNames(),elementColumnAliases).addColumns(indexFormulas,indexColumnAliases).toStatementString(); |