File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Table.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Table.java | |||
Method name: Index addIndex(Index)
|
Method name: UniqueKey addUniqueKey(UniqueKey)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Index current = (Index) indexes.get( index.getName() );↵ | 1 | UniqueKey current = (UniqueKey) uniqueKeys.get( uniqueKey.getName() );↵ | |
2 | if ( current != null ) {↵ | 2 | if ( current != null ) {↵ | |
3 | throw new MappingException( "Index " + index.getName() + " already exists!" );↵ | 3 | throw new MappingException( "UniqueKey " + uniqueKey.getName() + " already exists!" );↵ | |
4 | }↵ | 4 | }↵ | |
5 | indexes.put( index.getName(), index );↵ | 5 | uniqueKeys.put( uniqueKey.getName(), uniqueKey );↵ | |
6 | return index; | 6 | return uniqueKey; | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 14.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Index current = (Index)indexes.get(index.getName()); |
| 1 | UniqueKey current = (UniqueKey)uniqueKeys.get(uniqueKey.getName()); | |||||||||||||||||||||||||||||
2 | if (current != null) |
| 2 | if (current != null) | |||||||||||||||||||||||||||||
3 | throw new MappingException("Index " + index.getName() + " already exists!"); |
| 3 | throw new MappingException("UniqueKey " + uniqueKey.getName() + " already exists!"); | |||||||||||||||||||||||||||||
4 | indexes.put(index.getName(), index); |
| 4 | uniqueKeys.put(uniqueKey.getName(), uniqueKey); | |||||||||||||||||||||||||||||
5 | return index; |
| 5 | return uniqueKey; |
Row | Violation |
---|---|
1 | Expression Index cannot be unified with expression UniqueKey , because common superclass org.hibernate.mapping.RelationalModel does not declare member(s) public java.lang.String getName() |
2 | Expression current cannot be unified with expression current , because common superclass org.hibernate.mapping.RelationalModel does not declare member(s) public java.lang.String getName() |
3 | Expression (Index)indexes.get(index.getName()) cannot be unified with expression (UniqueKey)uniqueKeys.get(uniqueKey.getName()) , because common superclass org.hibernate.mapping.RelationalModel does not declare member(s) public java.lang.String getName() |
4 | Expression index cannot be unified with expression uniqueKey , because common superclass org.hibernate.mapping.RelationalModel does not declare member(s) public java.lang.String getName() |
5 | Expression index cannot be unified with expression uniqueKey , because common superclass org.hibernate.mapping.RelationalModel does not declare member(s) public java.lang.String getName() |
6 | Expression index cannot be unified with expression uniqueKey , because common superclass org.hibernate.mapping.RelationalModel does not declare member(s) public java.lang.String getName() |
7 | Expression index cannot be unified with expression uniqueKey , because common superclass type org.hibernate.mapping.RelationalModel cannot be passed as an argument to public abstract java.lang.Object put(java.lang.Object, java.lang.Object) |
8 | Expression index cannot be unified with expression uniqueKey , because common superclass org.hibernate.mapping.RelationalModel does not declare member(s) public java.lang.String getName() |