if (showMultiSelect) { dim = new Dimension( Math.max(fm.charWidth('-'),fm.charWidth('M')) + 1, fm.getHeight()); multiSelect.setPreferredSize(dim); multiSelect.setMaximumSize(dim); box.add(multiSelect); } if (showRectSelect) { dim = new Dimension( Math.max(fm.charWidth('-'),fm.charWidth('R')) + 1, fm.getHeight()); rectSelect.setPreferredSize(dim); rectSelect.setMaximumSize(dim); box.add(rectSelect); }
if (showRectSelect) { dim = new Dimension( Math.max(fm.charWidth('-'),fm.charWidth('R')) + 1, fm.getHeight()); rectSelect.setPreferredSize(dim); rectSelect.setMaximumSize(dim); box.add(rectSelect); } if (showOverwrite) { dim = new Dimension( Math.max(fm.charWidth('-'),fm.charWidth('O')) + 1, fm.getHeight()); overwrite.setPreferredSize(dim); overwrite.setMaximumSize(dim); box.add(overwrite); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/StatusBar.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/StatusBar.java
Method name: void propertiesChanged() Method name: void propertiesChanged()
Number of AST nodes: 10 Number of AST nodes: 10
1
if (showMultiSelect)
1
if (showRectSelect)
2
		{
2
		{
3
			dim = new Dimension(
3
			dim = new Dimension(
4
				Math.max(fm.charWidth('-'),fm.charWidth('M')) + 1,
4
				Math.max(fm.charWidth('-'),fm.charWidth('R')) + 1,
5
				fm.getHeight());
5
				fm.getHeight());
6
			multiSelect.setPreferredSize(dim);
6
			rectSelect.setPreferredSize(dim);
7
			multiSelect.setMaximumSize(dim);
7
			rectSelect.setMaximumSize(dim);
8
			box.add(multiSelect);
8
			box.add(rectSelect);
9
		}
9
		}
10
		if (showRectSelect)
10
		if (showOverwrite)
11
		{
11
		{
12
			dim = new Dimension(
12
			dim = new Dimension(
13
				Math.max(fm.charWidth('-'),fm.charWidth('R')) + 1,
13
				Math.max(fm.charWidth('-'),fm.charWidth('O')) + 1,
14
				fm.getHeight());
14
				fm.getHeight());
15
			rectSelect.setPreferredSize(dim);
15
			overwrite.setPreferredSize(dim);
16
			rectSelect.setMaximumSize(dim);
16
			overwrite.setMaximumSize(dim);
17
			box.add(rectSelect);
17
			box.add(overwrite);
18
		}
18
		}
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.3
Clones locationClones are in the same method
Number of node comparisons76
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)12.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    49
    if (showMultiSelect)
    49
    if (showMultiSelect)
    54
    if (showRectSelect)
    Differences
    Expression1Expression2Difference
    showMultiSelectshowRectSelectVARIABLE_NAME_MISMATCH
    54
    if (showRectSelect)
    50
    dim = new Dimension(Math.max(fm.charWidth('-'), fm.charWidth('M')) + 1, fm.getHeight());
    50
    dim = new Dimension(Math.max(fm.charWidth('-'), fm.charWidth('M')) + 1, fm.getHeight());
    55
    dim = new Dimension(Math.max(fm.charWidth('-'), fm.charWidth('R')) + 1, fm.getHeight());
    Differences
    Expression1Expression2Difference
    'M''R'LITERAL_VALUE_MISMATCH
    55
    dim = new Dimension(Math.max(fm.charWidth('-'), fm.charWidth('R')) + 1, fm.getHeight());
    51
    multiSelect.setPreferredSize(dim);
    51
    multiSelect.setPreferredSize(dim);
    56
    rectSelect.setPreferredSize(dim);
    Differences
    Expression1Expression2Difference
    multiSelectrectSelectVARIABLE_NAME_MISMATCH
    56
    rectSelect.setPreferredSize(dim);
    52
    multiSelect.setMaximumSize(dim);
    52
    multiSelect.setMaximumSize(dim);
    57
    rectSelect.setMaximumSize(dim);
    Differences
    Expression1Expression2Difference
    multiSelectrectSelectVARIABLE_NAME_MISMATCH
    57
    rectSelect.setMaximumSize(dim);
    53
    box.add(multiSelect);
    53
    box.add(multiSelect);
    58
    box.add(rectSelect);
    Differences
    Expression1Expression2Difference
    multiSelectrectSelectVARIABLE_NAME_MISMATCH
    58
    box.add(rectSelect);
    54
    if (showRectSelect)
    54
    if (showRectSelect)
    59
    if (showOverwrite)
    Differences
    Expression1Expression2Difference
    showRectSelectshowOverwriteVARIABLE_NAME_MISMATCH
    59
    if (showOverwrite)
    55
    dim = new Dimension(Math.max(fm.charWidth('-'), fm.charWidth('R')) + 1, fm.getHeight());
    55
    dim = new Dimension(Math.max(fm.charWidth('-'), fm.charWidth('R')) + 1, fm.getHeight());
    60
    dim = new Dimension(Math.max(fm.charWidth('-'), fm.charWidth('O')) + 1, fm.getHeight());
    Differences
    Expression1Expression2Difference
    'R''O'LITERAL_VALUE_MISMATCH
    60
    dim = new Dimension(Math.max(fm.charWidth('-'), fm.charWidth('O')) + 1, fm.getHeight());
    56
    rectSelect.setPreferredSize(dim);
    56
    rectSelect.setPreferredSize(dim);
    61
    overwrite.setPreferredSize(dim);
    Differences
    Expression1Expression2Difference
    rectSelectoverwriteVARIABLE_NAME_MISMATCH
    61
    overwrite.setPreferredSize(dim);
    57
    rectSelect.setMaximumSize(dim);
    57
    rectSelect.setMaximumSize(dim);
    62
    overwrite.setMaximumSize(dim);
    Differences
    Expression1Expression2Difference
    rectSelectoverwriteVARIABLE_NAME_MISMATCH
    62
    overwrite.setMaximumSize(dim);
    58
    box.add(rectSelect);
    58
    box.add(rectSelect);
    63
    box.add(overwrite);
    Differences
    Expression1Expression2Difference
    rectSelectoverwriteVARIABLE_NAME_MISMATCH
    63
    box.add(overwrite);
    Precondition Violations (0)
    Row Violation