Diagnostic nameDiagnostic = getRoseImporter().checkGenModelFileName();
if (nameDiagnostic.getSeverity() != Diagnostic.OK)
{
if (diagnostic.getSeverity() == Diagnostic.OK)
{
diagnostic = nameDiagnostic;
}
else
{
diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic);
}
}
Diagnostic nameDiagnostic = getModelImporter().checkGenModelFileName();
if (nameDiagnostic.getSeverity() != Diagnostic.OK)
{
if (diagnostic.getSeverity() == Diagnostic.OK)
{
diagnostic = nameDiagnostic;
}
else
{
diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic);
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/ui/RoseDetailPage.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/importer/ui/contribution/base/ModelImporterDetailPage.java
|
Method name: void loadPathMapSymbols()
|
|
Method name: void refreshModel(Monitor)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Diagnostic nameDiagnostic = getRoseImporter().checkGenModelFileName();↵ | | 1 | Diagnostic nameDiagnostic = getModelImporter().checkGenModelFileName();↵
|
2 | if (nameDiagnostic.getSeverity() != Diagnostic.OK)↵ | | 2 | if (nameDiagnostic.getSeverity() != Diagnostic.OK)↵
|
3 | {↵ | | 3 | {↵
|
4 | if (diagnostic.getSeverity() == Diagnostic.OK)↵ | | 4 | if (diagnostic.getSeverity() == Diagnostic.OK)↵
|
5 | {↵ | | 5 | {↵
|
6 | diagnostic = nameDiagnostic;↵ | | 6 | diagnostic = nameDiagnostic;↵
|
7 | }↵ | | 7 | }↵
|
8 | else↵ | | 8 | else↵
|
9 | {↵ | | 9 | {↵
|
10 | diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic);↵ | | 10 | diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic);↵
|
11 | }↵ | | 11 | }↵
|
12 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
-
{Refactorable}
Mapping Summary
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) | 1.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | Diagnostic nameDiagnostic = getRoseImporter().checkGenModelFileName(); | | 6 | Diagnostic nameDiagnostic = getModelImporter().checkGenModelFileName(); |
6 | if (nameDiagnostic.getSeverity() != Diagnostic.OK) | | 7 | if (nameDiagnostic.getSeverity() != Diagnostic.OK) |
7 | if (diagnostic.getSeverity() == Diagnostic.OK) | | 8 | if (diagnostic.getSeverity() == Diagnostic.OK) |
8 | diagnostic = nameDiagnostic; | | 9 | diagnostic = nameDiagnostic; |
| | | | |
9 | diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic); | | 10 | diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic); |
Precondition Violations (0)
Row |
Violation |