private Object validate(Class expectedClass, Object visitee) {
if (!visitee.getClass().getName().equals(expectedClass.getName())) {
throw new IllegalStateException(visitee.getClass().getName()
+ " did not call proper accept method. Was "
+ expectedClass.getName());
}
return null;
private Object validate(Class expectedClass, Object visitee) {
if (!visitee.getClass().getName().equals(expectedClass.getName())) {
throw new IllegalStateException(visitee.getClass().getName()
+ " did not call proper accept method. Was "
+ expectedClass.getName());
}
return null;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/mapping/PersistentClassVisitorTest.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/mapping/ValueVisitorTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | private Object validate(Class expectedClass, Object visitee) {↵ | | 1 | private Object validate(Class expectedClass, Object visitee) {↵
|
2 | if (!visitee.getClass().getName().equals(expectedClass.getName())) {↵ | | 2 | if (!visitee.getClass().getName().equals(expectedClass.getName())) {↵
|
3 | throw new IllegalStateException(visitee.getClass().getName()↵ | | 3 | throw new IllegalStateException(visitee.getClass().getName()↵
|
4 | + " did not call proper accept method. Was "↵ | | 4 | + " did not call proper accept method. Was "↵
|
5 | + expectedClass.getName());↵ | | 5 | + expectedClass.getName());↵
|
6 | }↵ | | 6 | }↵
|
7 | return null;↵ | | 7 | return null;↵
|
8 | | | 8 |
|
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 |