if (statusBarBackgroundColorChk.isSelected()) { statusBarBackgroundColorBtn.setEnabled(true); statusBarBackgroundColorPnl.setEnabled(true); statusBarBackgroundLbl.setEnabled(true); } else { statusBarBackgroundColorBtn.setEnabled(false); statusBarBackgroundColorPnl.setEnabled(false); statusBarBackgroundLbl.setEnabled(false); }
if (objectTreeBackgroundColorChk.isSelected()) { objectTreeBackgroundColorBtn.setEnabled(true); objectTreeBackgroundColorPnl.setEnabled(true); objectTreeBackgroundLbl.setEnabled(true); } else { objectTreeBackgroundColorBtn.setEnabled(false); objectTreeBackgroundColorPnl.setEnabled(false); objectTreeBackgroundLbl.setEnabled(false); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/ColorPropertiesPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/ColorPropertiesPanel.java
Method name: void actionPerformed(ActionEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (statusBarBackgroundColorChk.isSelected())
1
if (objectTreeBackgroundColorChk.isSelected())
2
				{
2
				{
3
					statusBarBackgroundColorBtn.setEnabled(true);
3
					objectTreeBackgroundColorBtn.setEnabled(true);
4
					statusBarBackgroundColorPnl.setEnabled(true);
4
					objectTreeBackgroundColorPnl.setEnabled(true);
5
					statusBarBackgroundLbl.setEnabled(true);
5
					objectTreeBackgroundLbl.setEnabled(true);
6
				}
6
				}
7
				else
7
				else
8
				{
8
				{
9
					statusBarBackgroundColorBtn.setEnabled(false);
9
					objectTreeBackgroundColorBtn.setEnabled(false);
10
					statusBarBackgroundColorPnl.setEnabled(false);
10
					objectTreeBackgroundColorPnl.setEnabled(false);
11
					statusBarBackgroundLbl.setEnabled(false);
11
					objectTreeBackgroundLbl.setEnabled(false);
12
				}
12
				}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in the same java file
Number of node comparisons49
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (statusBarBackgroundColorChk.isSelected())
    1
    if (statusBarBackgroundColorChk.isSelected())
    1
    if (objectTreeBackgroundColorChk.isSelected())
    Differences
    Expression1Expression2Difference
    statusBarBackgroundColorChkobjectTreeBackgroundColorChkVARIABLE_NAME_MISMATCH
    statusBarBackgroundColorBtnobjectTreeBackgroundColorBtnVARIABLE_NAME_MISMATCH
    statusBarBackgroundColorPnlobjectTreeBackgroundColorPnlVARIABLE_NAME_MISMATCH
    statusBarBackgroundLblobjectTreeBackgroundLblVARIABLE_NAME_MISMATCH
    statusBarBackgroundColorBtnobjectTreeBackgroundColorBtnVARIABLE_NAME_MISMATCH
    statusBarBackgroundColorPnlobjectTreeBackgroundColorPnlVARIABLE_NAME_MISMATCH
    statusBarBackgroundLblobjectTreeBackgroundLblVARIABLE_NAME_MISMATCH
    1
    if (objectTreeBackgroundColorChk.isSelected())
    2
    statusBarBackgroundColorBtn.setEnabled(true);
    2
    statusBarBackgroundColorBtn.setEnabled(true);
    2
    objectTreeBackgroundColorBtn.setEnabled(true);
    Differences
    Expression1Expression2Difference
    statusBarBackgroundColorBtnobjectTreeBackgroundColorBtnVARIABLE_NAME_MISMATCH
    2
    objectTreeBackgroundColorBtn.setEnabled(true);
    3
    statusBarBackgroundColorPnl.setEnabled(true);
    3
    statusBarBackgroundColorPnl.setEnabled(true);
    3
    objectTreeBackgroundColorPnl.setEnabled(true);
    Differences
    Expression1Expression2Difference
    statusBarBackgroundColorPnlobjectTreeBackgroundColorPnlVARIABLE_NAME_MISMATCH
    3
    objectTreeBackgroundColorPnl.setEnabled(true);
    4
    statusBarBackgroundLbl.setEnabled(true);
    4
    statusBarBackgroundLbl.setEnabled(true);
    4
    objectTreeBackgroundLbl.setEnabled(true);
    Differences
    Expression1Expression2Difference
    statusBarBackgroundLblobjectTreeBackgroundLblVARIABLE_NAME_MISMATCH
    4
    objectTreeBackgroundLbl.setEnabled(true);
    else
    else
    5
    statusBarBackgroundColorBtn.setEnabled(false);
    5
    statusBarBackgroundColorBtn.setEnabled(false);
    5
    objectTreeBackgroundColorBtn.setEnabled(false);
    Differences
    Expression1Expression2Difference
    statusBarBackgroundColorBtnobjectTreeBackgroundColorBtnVARIABLE_NAME_MISMATCH
    5
    objectTreeBackgroundColorBtn.setEnabled(false);
    6
    statusBarBackgroundColorPnl.setEnabled(false);
    6
    statusBarBackgroundColorPnl.setEnabled(false);
    6
    objectTreeBackgroundColorPnl.setEnabled(false);
    Differences
    Expression1Expression2Difference
    statusBarBackgroundColorPnlobjectTreeBackgroundColorPnlVARIABLE_NAME_MISMATCH
    6
    objectTreeBackgroundColorPnl.setEnabled(false);
    7
    statusBarBackgroundLbl.setEnabled(false);
    7
    statusBarBackgroundLbl.setEnabled(false);
    7
    objectTreeBackgroundLbl.setEnabled(false);
    Differences
    Expression1Expression2Difference
    statusBarBackgroundLblobjectTreeBackgroundLblVARIABLE_NAME_MISMATCH
    7
    objectTreeBackgroundLbl.setEnabled(false);
    Precondition Violations (1)
    Row Violation
    1The refactoring of the clones is infeasible, because classes and do not have a common superclass