File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java | |||
Method name: ValueInclusion determineInsertValueGenerationType(Property, StandardProperty)
|
Method name: ValueInclusion determineUpdateValueGenerationType(Property, StandardProperty)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if ( runtimeProperty.isInsertGenerated() ) {↵ | 1 | if ( runtimeProperty.isUpdateGenerated() ) {↵ | |
2 | return ValueInclusion.FULL;↵ | 2 | return ValueInclusion.FULL;↵ | |
3 | }↵ | 3 | }↵ | |
4 | else if ( mappingProperty.getValue() instanceof Component ) {↵ | 4 | else if ( mappingProperty.getValue() instanceof Component ) {↵ | |
5 | if ( hasPartialInsertComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {↵ | 5 | if ( hasPartialUpdateComponentGeneration( ( Component ) mappingProperty.getValue() ) ) {↵ | |
6 | return ValueInclusion.PARTIAL;↵ | 6 | return ValueInclusion.PARTIAL;↵ | |
7 | }↵ | 7 | }↵ | |
8 | }↵ | 8 | }↵ | |
9 | return ValueInclusion.NONE; | 9 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
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) | 15.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (runtimeProperty.isInsertGenerated()) |
| 1 | if (runtimeProperty.isUpdateGenerated()) | ||||||||||||
2 | return ValueInclusion.FULL; | 2 | return ValueInclusion.FULL; | |||||||||||||
3 | else if (mappingProperty.getValue() instanceof Component) | 3 | else if (mappingProperty.getValue() instanceof Component) | |||||||||||||
4 | if (hasPartialInsertComponentGeneration((Component)mappingProperty.getValue())) |
| 4 | if (hasPartialUpdateComponentGeneration((Component)mappingProperty.getValue())) | ||||||||||||
5 | return ValueInclusion.PARTIAL; | 5 | return ValueInclusion.PARTIAL; | |||||||||||||
6 | return ValueInclusion.NONE; | 6 | return ValueInclusion.NONE; |
Row | Violation |
---|---|
1 | Expression hasPartialInsertComponentGeneration((Component)mappingProperty.getValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression hasPartialUpdateComponentGeneration((Component)mappingProperty.getValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |