public Index addIndex(Index index) {
Index current = (Index) indexes.get( index.getName() );
if ( current != null ) {
throw new MappingException( "Index " + index.getName() + " already exists!" );
}
indexes.put( index.getName(), index );
return index;
public UniqueKey addUniqueKey(UniqueKey uniqueKey) {
UniqueKey current = (UniqueKey) uniqueKeys.get( uniqueKey.getName() );
if ( current != null ) {
throw new MappingException( "UniqueKey " + uniqueKey.getName() + " already exists!" );
}
uniqueKeys.put( uniqueKey.getName(), uniqueKey );
return uniqueKey;
Clone fragments detected by clone detection tool
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:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public Index addIndex(Index index) {↵ | | 1 | public ↵
|
2 | Index↵ | | 2 | UniqueKey addUniqueKey(UniqueKey uniqueKey) {↵
|
3 | current = (Index) indexes.get( index.getName() );↵ | | 3 | UniqueKey current = (UniqueKey) uniqueKeys.get( uniqueKey.getName() );↵
|
4 | if ( current != null ) {↵ | | 4 | if ( current != null ) {↵
|
5 | throw new MappingException( "Index " + index.getName() + " already exists!" );↵ | | 5 | throw new MappingException( "UniqueKey " + uniqueKey.getName() + " already exists!" );↵
|
6 | }↵ | | 6 | }↵
|
7 | indexes.put( index.getName(), index );↵ | | 7 | uniqueKeys.put( uniqueKey.getName(), uniqueKey );↵
|
8 | return index;↵ | | 8 | return uniqueKey;↵
|
9 | | | 9 |
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |