if (actions != null)
{
for (IAction action : actions)
{
if (contributionID != null)
{
manager.insertBefore(contributionID, action);
}
else
{
manager.add(action);
}
}
}
if (actions != null)
{
for (IAction action : actions)
{
if (contributionID != null)
{
manager.insertBefore(contributionID, action);
}
else
{
manager.add(action);
}
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreActionBarContributor.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLActionBarContributor.java
|
Method name: void populateManager(IContributionManager, Collection extends IAction>, String)
|
|
Method name: void populateManager(IContributionManager, Collection extends IAction>, String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (actions != null)↵ | | 1 | if (actions != null)↵
|
2 | {↵ | | 2 | {↵
|
3 | for (IAction action : actions)↵ | | 3 | for (IAction action : actions)↵
|
4 | {↵ | | 4 | {↵
|
5 | if (contributionID != null)↵ | | 5 | if (contributionID != null)↵
|
6 | {↵ | | 6 | {↵
|
7 | manager.insertBefore(contributionID, action);↵ | | 7 | manager.insertBefore(contributionID, action);↵
|
8 | }↵ | | 8 | }↵
|
9 | else↵ | | 9 | else↵
|
10 | {↵ | | 10 | {↵
|
11 | manager.add(action);↵ | | 11 | manager.add(action);↵
|
12 | }↵ | | 12 | }↵
|
13 | }↵ | | 13 | }↵
|
14 | } | | 14 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | if (contributionID != null) | | 3 | if (contributionID != null) |
4 | manager.insertBefore(contributionID, action); | | 4 | manager.insertBefore(contributionID, action); |
| | | | |
5 | | | 5 | |
Precondition Violations (0)
Row |
Violation |