if (node.getKey().equals(RoseStrings.TOOL))
{
setName = stringV;
}
else if (node.getKey().equals(RoseStrings.NAME))
{
tagName = stringV;
}
else if (node.getKey().equals(RoseStrings.VALUE))
{
valueName = stringV;
}
if (node.getKey().equals(RoseStrings.TOOL))
{
setName = stringV;
}
else if (node.getKey().equals(RoseStrings.NAME))
{
tagName = stringV;
}
else if (node.getKey().equals(RoseStrings.VALUE))
{
valueName = stringV;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/parser/RoseNode.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/parser/RoseNode.java
|
Method name: String getAttributeValueInAttributeList(RoseNode, String, String)
|
|
Method name: String getAttributeValueInAttributeList(RoseNode, String, String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (node.getKey().equals(RoseStrings.TOOL))↵ | | 1 | if (node.getKey().equals(RoseStrings.TOOL))↵
|
2 | {↵ | | 2 | ↵
|
| | | 3 | {↵
|
3 | setName = stringV;↵ | | 4 | setName = stringV;↵
|
4 | }↵ | | 5 | ↵
|
| | | 6 | }↵
|
5 | else if (node.getKey().equals(RoseStrings.NAME))↵ | | 7 | else if (node.getKey().equals(RoseStrings.NAME))↵
|
6 | {↵ | | 8 | {↵
|
7 | tagName = stringV;↵ | | 9 | tagName = stringV;↵
|
8 | }↵ | | 10 | ↵
|
| | | 11 | }↵
|
9 | else if (node.getKey().equals(RoseStrings.VALUE))↵ | | 12 | else if (node.getKey().equals(RoseStrings.VALUE))↵
|
10 | {↵ | | 13 | {↵
|
11 | valueName = stringV;↵ | | 14 | valueName = stringV;↵
|
12 | } | | 15 | }
|
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) | 1.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 32 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
27 | if (node.getKey().equals(RoseStrings.TOOL)) | | 47 | if (node.getKey().equals(RoseStrings.TOOL)) |
28 | | | 48 | |
29 | else if (node.getKey().equals(RoseStrings.NAME)) | | 49 | else if (node.getKey().equals(RoseStrings.NAME)) |
30 | | | 50 | |
31 | else if (node.getKey().equals(RoseStrings.VALUE)) | | 51 | else if (node.getKey().equals(RoseStrings.VALUE)) |
32 | | | 52 | |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables setName, tagName, valueName , while Clone fragment #2 returns variables setName, tagName, valueName |