String instanceTypeName1 = eClassifier.getInstanceTypeName();
String instanceTypeName2 = eBoundEClassifier.getInstanceTypeName();
// I.e., the classifiers are considered equal if they wrap the same non-null type.
//
if (instanceTypeName1 == null || !instanceTypeName1.equals(instanceTypeName2))
{
return false;
}
String instanceTypeName1 = eClassifier1.getInstanceTypeName();
String instanceTypeName2 = eClassifier2.getInstanceTypeName();
// I.e., the classifiers are considered equal if they wrap the same non-null type.
//
if (instanceTypeName1 == null || !instanceTypeName1.equals(instanceTypeName2))
{
return false;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java
|
Method name: boolean isMatching(EGenericType, EGenericType, Map extends ETypeParameter,? extends EGenericType>)
|
|
Method name: boolean equalTypeArguments(EGenericType, EGenericType, Map extends ETypeParameter,? extends EGenericType>)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | String instanceTypeName1 = eClassifier.getInstanceTypeName(); ↵ | | 1 | String instanceTypeName1 = eClassifier1.getInstanceTypeName(); ↵
|
2 | String instanceTypeName2 = eBoundEClassifier.getInstanceTypeName(); ↵ | | 2 | String instanceTypeName2 = eClassifier2.getInstanceTypeName(); ↵
|
3 | ↵ | | |
|
4 | // I.e., the classifiers are considered equal if they wrap the same non-null type.↵ | | 3 | // I.e., the classifiers are considered equal if they wrap the same non-null type.↵
|
5 | //↵ | | 4 | //↵
|
6 | if (instanceTypeName1 == null || !instanceTypeName1.equals(instanceTypeName2))↵ | | 5 | if (instanceTypeName1 == null || !instanceTypeName1.equals(instanceTypeName2))↵
|
7 | {↵ | | 6 | {↵
|
8 | return false;↵ | | 7 | return false;↵
|
9 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 declared in the same class |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
8 | String instanceTypeName1 = eClassifier.getInstanceTypeName(); | | 9 | String instanceTypeName1 = eClassifier1.getInstanceTypeName(); |
9 | String instanceTypeName2 = eBoundEClassifier.getInstanceTypeName(); | | 10 | String instanceTypeName2 = eClassifier2.getInstanceTypeName(); |
10 | if (instanceTypeName1 == null || !instanceTypeName1.equals(instanceTypeName2)) | | 11 | if (instanceTypeName1 == null || !instanceTypeName1.equals(instanceTypeName2)) |
11 | | | 12 | |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return false; |
2 | Conditional return false; |