File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/BulkOperationCleanupAction.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/exec/MultiTableUpdateExecutor.java | |||
Method name: void BulkOperationCleanupAction(SessionImplementor, Set)
|
Method name: void MultiTableUpdateExecutor(HqlSqlWalker)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (affectedEntity( querySpaces, entitySpaces )) {↵ | 1 | while ( itr.hasNext() ) {↵ | |
2 | final AssignmentSpecification specification = ( AssignmentSpecification ) itr.next();↵ | |||
2 | if ( persister.hasCache() ) {↵ | 3 | if ( spe↵ | |
3 | affectedEntityNames.add( persister.getEntityName() );↵ | |||
4 | }↵ | |||
5 | Set roles = session.getFactory().getCollectionRolesByEntityParticipant( persister.getEntityName↵ | 4 | cification.affectsTable( tableNames[tableIndex] ) ) {↵ | |
5 | affected = true;↵ | |||
6 | () );↵ | 6 | update.appendAssignmentFragment( specification.getSqlAssignmentFragment() );↵ | |
7 | if ( roles != null ) {↵ | 7 | if ( ↵ | |
8 | affectedCollectionRoles.addAll( roles );↵ | |||
9 | }↵ | |||
10 | for ( int y = 0; y < entitySpaces.length; y++ ) {↵ | |||
11 | tmpSpaces.add( entitySpaces[y] );↵ | 8 | specification.getParameters() != null ) {↵ | |
9 | for ( int paramIndex = 0; paramIndex < specification.getParameters().length; paramIndex++ ) {↵ | |||
10 | parameterList.add( specification.getParameters()[paramIndex] );↵ | |||
11 | }↵ | |||
12 | }↵ | |||
12 | }↵ | 13 | }↵ | |
13 | } | 14 |
| |
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 |
Number of node comparisons | 9 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | Set roles = session.getFactory().getCollectionRolesByEntityParticipant(persister.getEntityName()); | | |||||||||||||||||||||
14 | if (roles != null) | | |||||||||||||||||||||
15 | affectedCollectionRoles.addAll(roles); | | |||||||||||||||||||||
16 | for (int y = 0; y < entitySpaces.length; y++) |
| 29 | for (int paramIndex = 0; paramIndex < specification.getParameters().length; paramIndex++) | |||||||||||||||||||
17 | tmpSpaces.add(entitySpaces[y]); |
| | ||||||||||||||||||||
|
| 30 | parameterList.add(specification.getParameters()[paramIndex]); |
Row | Violation |
---|---|
1 | Unmatched statement tmpSpaces.add(entitySpaces[y]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement parameterList.add(specification.getParameters()[paramIndex]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |