File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/FromElementType.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/pretty/MessageHelper.java | |||
Method name: String renderIdentifierSelect(int, int)
|
Method name: String collectionInfoString(CollectionPersister, Serializable[], SessionFactoryImplementor)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for ( int i = 0; i < idColumnNames.length; i++ ) {↵ | 1 | for ( int i = 0; i < ids.length; i++ ) {↵ | |
2 | buf.append( fromElement.getTableAlias() ).append( '.' ).append( idColumnNames[i] );↵ | 2 | ↵ | |
3 | if ( i != idColumnName↵ | 3 | // Need to use the identifier type of the collection owner↵ | |
4 | // since the incoming is value is actually the owner's id.↵ | |||
5 | // Using the collection's key type causes problems with↵ | |||
6 | // property-ref keys...↵ | |||
7 | s.append( persister.getOwnerEntityPersister().getIdentifierType().toLoggableString( ids[i], factory ) );↵ | |||
4 | s.length - 1 ) buf↵ | 8 | if ( i < ids.length-1 ) {↵ | |
5 | .append( ", " );↵ | 9 | s.append( ", " );↵ | |
6 | ↵ | 10 | }↵ | |
7 | } | 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.3 |
Clones location | Clones are in different classes |
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) | 28.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | for (int i = 0; i < idColumnNames.length; i++) |
| 7 | for (int i = 0; i < ids.length; i++) | |||||||||||||||||||
6 | buf.append(fromElement.getTableAlias()).append('.').append(idColumnNames[i]); |
| 8 | s.append(persister.getOwnerEntityPersister().getIdentifierType().toLoggableString(ids[i], factory)); | |||||||||||||||||||
7 | if (i != idColumnNames.length - 1) |
| 9 | if (i < ids.length - 1) | |||||||||||||||||||
8 | buf.append(", "); |
| 10 | s.append(", "); |
Row | Violation |
---|---|
1 | Type int of variable idColumnNames.length does not match with type int of variable ids.length |
2 | Expression idColumnNames[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression persister.getOwnerEntityPersister().getIdentifierType().toLoggableString(ids[i],factory) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type int of variable idColumnNames.length does not match with type int of variable ids.length |
5 | Expression i != idColumnNames.length - 1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression i < ids.length - 1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |