File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/DefaultNamingStrategy.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityTuplizerFactory.java | |||
Method name: String foreignKeyColumnName(String, String, String, String)
|
Method name: EntityTuplizer constructDefaultTuplizer(EntityMode, EntityMetamodel, PersistentClass)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String header = propertyName != null ? StringHelper.unqualify( propertyName ) : propertyTableName;↵ | |||
2 | if (header↵ | 1 | Class tuplizerClass = ( Class ) defaultImplClassByMode.get( entityMode );↵ | |
3 | == null) ↵ | 2 | if ( tuplizerClass == null ) {↵ | |
4 | throw new AssertionFailure("NammingStrategy not properly filled");↵ | 3 | throw new ↵ | |
5 | return columnName( header↵ | 4 | HibernateException( "could not determine default tuplizer class to use [" + entityMode + "]" );↵ | |
5 | }↵ | |||
6 | ); | 6 | return constructTuplizer( tuplizerClass, metamodel, persistentClass ); | |
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 | 8 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Class tuplizerClass = (Class)defaultImplClassByMode.get(entityMode); | ||||||||||||||||
1 | String header = propertyName != null ? StringHelper.unqualify(propertyName) : propertyTableName; | | ||||||||||||||||
2 | if (header == null) |
| 2 | if (tuplizerClass == null) | ||||||||||||||
3 | throw new AssertionFailure("NammingStrategy not properly filled"); |
| 3 | throw new HibernateException("could not determine default tuplizer class to use [" + entityMode + "]"); | ||||||||||||||
|
| 4 | return constructTuplizer(tuplizerClass, metamodel, persistentClass); | |||||||||||||||
4 | return columnName(header); |
| |
Row | Violation |
---|---|
1 | Type java.lang.String of variable header does not match with type java.lang.Class of variable tuplizerClass |
2 | Unmatched statement return constructTuplizer(tuplizerClass,metamodel,persistentClass); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched return constructTuplizer(tuplizerClass,metamodel,persistentClass); |
4 | Unmatched statement return columnName(header); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched return columnName(header); |