if (c instanceof JXCollapsiblePane) {
if (((JXCollapsiblePane) c).isCollapsed()) {
return new Insets(0, 0, 0, 0);
}
}
return new Insets(isFirst(c) ? 4 : 1, 0, 1, 0);
if (c instanceof JXCollapsiblePane) {
if (((JXCollapsiblePane) c).isCollapsed()) {
return new Insets(0, 0, 0, 0);
}
}
return new Insets(isFirst(c) ? 4 : 1, 0, 1, 0);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/context/ContextResultBox.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/search/SearchResultBox.java
|
Method name: Insets getBorderInsets(Component)
|
|
Method name: Insets getBorderInsets(Component)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (c instanceof JXCollapsiblePane) {↵ | | 1 | if (c instanceof JXCollapsiblePane) {↵
|
2 | if (((JXCollapsiblePane) c).isCollapsed()) {↵ | | 2 | if (((JXCollapsiblePane) c).isCollapsed()) {↵
|
3 | return new Insets(0, 0, 0, 0);↵ | | 3 | return new Insets(0, 0, 0, 0);↵
|
4 | }↵ | | 4 | }↵
|
5 | }↵ | | 5 | }↵
|
6 | return new Insets(isFirst(c) ? 4 : 1, 0, 1, 0); | | 6 | return new Insets(isFirst(c) ? 4 : 1, 0, 1, 0);
|
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 |
Number of node comparisons | 6 |
-
{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.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (c instanceof JXCollapsiblePane) | | 1 | if (c instanceof JXCollapsiblePane) |
2 | if (((JXCollapsiblePane)c).isCollapsed()) | | 2 | if (((JXCollapsiblePane)c).isCollapsed()) |
3 | return new Insets(0, 0, 0, 0); | | 3 | return new Insets(0, 0, 0, 0); |
4 | return new Insets(isFirst(c) ? 4 : 1, 0, 1, 0); | | 4 | return new Insets(isFirst(c) ? 4 : 1, 0, 1, 0); |
Precondition Violations (0)
Row |
Violation |