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/search/ComponentBoxContainer.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);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons6
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 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