if (isSelected) { comp.setBackground(table.getSelectionBackground()); comp.setForeground(table.getSelectionForeground()); } else { comp.setBackground(table.getBackground()); comp.setForeground(table.getForeground()); }
if (isSelected) { lbl.setBackground(tblResult.getSelectionBackground()); lbl.setForeground(tblResult.getSelectionForeground()); } else { lbl.setBackground(tblResult.getBackground()); lbl.setForeground(tblResult.getForeground()); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerGrantFrame.java File path: /sql12/plugins/smarttools/src/net/sourceforge/squirrel_sql/plugins/smarttools/gui/SmarttoolMissingIndicesFrame.java
Method name: Component getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int) Method name: Component getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (isSelected)
1
if (isSelected)
2
		{
2
			{
3
			comp.setBackground(table.getSelectionBackground());
3
				lbl.setBackground(tblResult.getSelectionBackground());
4
			comp.setForeground(table.getSelectionForeground());
4
				lbl.setForeground(tblResult.getSelectionForeground());
5
		}
5
		
6
		else
6
	} else
7
		{
7
			{
8
			comp.setBackground(table.getBackground());
8
				lbl.setBackground(tblResult.getBackground());
9
			comp.setForeground(table.getForeground());
9
				lbl.setForeground(tblResult.getForeground());
10
		}
10
			}
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.1
Clones locationClones are in different classes
Number of node comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    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.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    if (isSelected)
    3
    if (isSelected)
    11
    comp.setBackground(table.getSelectionBackground());
    11
    comp.setBackground(table.getSelectionBackground());
    4
    lbl.setBackground(tblResult.getSelectionBackground());
    Differences
    Expression1Expression2Difference
    tabletblResultVARIABLE_NAME_MISMATCH
    complblVARIABLE_NAME_MISMATCH
    javax.swing.JComponentjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    4
    lbl.setBackground(tblResult.getSelectionBackground());
    12
    comp.setForeground(table.getSelectionForeground());
    12
    comp.setForeground(table.getSelectionForeground());
    5
    lbl.setForeground(tblResult.getSelectionForeground());
    Differences
    Expression1Expression2Difference
    tabletblResultVARIABLE_NAME_MISMATCH
    complblVARIABLE_NAME_MISMATCH
    javax.swing.JComponentjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    5
    lbl.setForeground(tblResult.getSelectionForeground());
    else
    else
    13
    comp.setBackground(table.getBackground());
    13
    comp.setBackground(table.getBackground());
    6
    lbl.setBackground(tblResult.getBackground());
    Differences
    Expression1Expression2Difference
    tabletblResultVARIABLE_NAME_MISMATCH
    complblVARIABLE_NAME_MISMATCH
    javax.swing.JComponentjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    6
    lbl.setBackground(tblResult.getBackground());
    14
    comp.setForeground(table.getForeground());
    14
    comp.setForeground(table.getForeground());
    7
    lbl.setForeground(tblResult.getForeground());
    Differences
    Expression1Expression2Difference
    tabletblResultVARIABLE_NAME_MISMATCH
    complblVARIABLE_NAME_MISMATCH
    javax.swing.JComponentjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    7
    lbl.setForeground(tblResult.getForeground());
    Precondition Violations (0)
    Row Violation