File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/TypeFactory.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/TypeFactory.java | |||
Method name: int[] findDirty(StandardProperty[], Object[], Object[], boolean[][], boolean, SessionImplementor)
|
Method name: int[] findModified(StandardProperty[], Object[], Object[], boolean[][], boolean, SessionImplementor)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | for ( int i = 0; i < span; i++ ) {↵ | 1 | for ( int i = 0; i < span; i++ ) {↵ | |
2 | final boolean dirty = currentState[i] != LazyPropertyInitializer.UNFETCHED_PROPERTY↵ | 2 | final boolean modified = currentState[i]!=LazyPropertyInitializer.UNFETCHED_PROPERTY↵ | |
3 | && properties[i].isDirtyCheckable( anyUninitializedProperties )↵ | 3 | && properties[i].isDirtyCheckable(anyUninitializedProperties)↵ | |
4 | && properties[i].getType().isDirty( previousState[i], currentState[i], includeColumns[i], session );↵ | 4 | && properties[i].getType().isModified( previousState[i], currentState[i], includeColumns[i], session );↵ | |
5 | if ( dirty ) {↵ | 5 | if ( modified ) {↵ | |
6 | if ( results == null ) {↵ | 6 | if ( results == null ) {↵ | |
7 | results = new int[span];↵ | 7 | results = new int[span];↵ | |
8 | }↵ | 8 | }↵ | |
9 | results[count++] = i;↵ | 9 | results[count++] = i;↵ | |
10 | }↵ | 10 | }↵ | |
11 | } | 11 |
| |
See real code fragment | See real code fragment |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 12 |
Number of mapped statements | 6 |
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) | 4.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | for (int i = 0; i < span; i++) | 4 | for (int i = 0; i < span; i++) | ||||||||||||||||
5 | final boolean dirty = currentState[i] != LazyPropertyInitializer.UNFETCHED_PROPERTY && properties[i].isDirtyCheckable(anyUninitializedProperties) && properties[i].getType().isDirty(previousState[i], currentState[i], includeColumns[i], session); |
| 5 | final boolean modified = currentState[i] != LazyPropertyInitializer.UNFETCHED_PROPERTY && properties[i].isDirtyCheckable(anyUninitializedProperties) && properties[i].getType().isModified(previousState[i], currentState[i], includeColumns[i], session); | |||||||||||||||
6 | if (dirty) |
| 6 | if (modified) | |||||||||||||||
7 | if (results == null) | 7 | if (results == null) | ||||||||||||||||
8 | results = new int[span]; | 8 | results = new int[span]; | ||||||||||||||||
9 | results[count++] = i; | 9 | results[count++] = i; |
Row | Violation |
---|---|
1 | Expression properties[i].getType().isDirty(previousState[i],currentState[i],includeColumns[i],session) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression properties[i].getType().isModified(previousState[i],currentState[i],includeColumns[i],session) cannot be parameterized, because it has dependencies to/from statements that will be extracted |