public class DuplicateMappingException extends MappingException { private final String name; private final String type; public DuplicateMappingException(String customMessage, String type, String name) { super(customMessage); this.type=type; this.name=name; } public DuplicateMappingException(String type, String name) { this("Duplicate " + type + " mapping " + name, type, name); } public String getType() { return type; } public String getName() { return name;
public static class EntityNotFoundException extends RuntimeException { private final String entityName; private final Serializable id; public EntityNotFoundException(String entityName, Serializable id) { this( "unable to locate specified entity", entityName, id ); } public EntityNotFoundException(String message, String entityName, Serializable id) { super( message ); this.entityName = entityName; this.id = id; } public String getEntityName() { return entityName; } public Serializable getId() { return id;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/DuplicateMappingException.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/jpa/AbstractJPATest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class DuplicateMappingException extends MappingException {
1
public static class EntityNotFoundException extends RuntimeException {
2
	private final String name;
2
		private final String entityName;
3
	private final String type;
3
		private final Seri
4
	public DuplicateMappingException(String customMessage, String typ
4
alizable id;
5
e, String name) {
5
		public EntityNotFoundException(String entityName, Serializable id) {
6
		super(customMessage);
6
		
7
		this.type=type;
8
		this.name=name;
9
	}
7
	this( "unable to locate specified entity", entityName, id );
8
		}
9

10
	
10
	
11
	public DuplicateMappingException(String type, String name) {
11
	public EntityNotFoundException(String message, String 
12
		this("Duplicate " + type + " mapping " + name, type, name);
13
	}
12
entityName, Serializable id) {
13
			super( message );
14
			this.entityName = entityName;
15
			this.id = id;
16
		}
14
	public String getType() {
17
		public String getEntityName() {
15
		return type;
18
			return 
16
	}
17
	
19
entityName;
20
		}
18
	public String getName() {
21
		public Serializable getId() {
19
		return name;
22
			return id;
20
	
23
		
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0