if (getPageCount() <= 1)
{
setPageText(0, ""); //$NON-NLS-1$
if (getContainer() instanceof CTabFolder)
{
((CTabFolder)getContainer()).setTabHeight(1);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y + 6);
}
}
if (getPageCount() <= 1)
{
setPageText(0, "");
if (getContainer() instanceof CTabFolder)
{
((CTabFolder)getContainer()).setTabHeight(1);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y + 6);
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLEditor.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java
|
Method name: void hideTabs()
|
|
Method name: void hideTabs()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (getPageCount() <= 1)↵ | | 1 | if (getPageCount() <= 1)↵
|
2 | {↵ | | 2 | {↵
|
3 | setPageText(0, ""); //$NON-NLS-1$↵ | | 3 | setPageText(0, "");↵
|
4 | if (getContainer() instanceof CTabFolder)↵ | | 4 | if (getContainer() instanceof CTabFolder)↵
|
5 | {↵ | | 5 | {↵
|
6 | ((CTabFolder)getContainer()).setTabHeight(1);↵ | | 6 | ((CTabFolder)getContainer()).setTabHeight(1);↵
|
7 | Point point = getContainer().getSize();↵ | | 7 | Point point = getContainer().getSize();↵
|
8 | getContainer().setSize(point.x, point.y + 6);↵ | | 8 | getContainer().setSize(point.x, point.y + 6);↵
|
9 | }↵ | | 9 | }↵
|
10 | } | | 10 | }
|
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 | 20 |
-
{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.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (getPageCount() <= 1) | | 1 | if (getPageCount() <= 1) |
2 | | | 2 | |
3 | if (getContainer() instanceof CTabFolder) | | 3 | if (getContainer() instanceof CTabFolder) |
4 | ((CTabFolder)getContainer()).setTabHeight(1); | | 4 | ((CTabFolder)getContainer()).setTabHeight(1); |
5 | Point point = getContainer().getSize(); | | 5 | Point point = getContainer().getSize(); |
6 | getContainer().setSize(point.x, point.y + 6); | | 6 | getContainer().setSize(point.x, point.y + 6); |
Precondition Violations (0)
Row |
Violation |