button.setBorder(LINK_BORDER); button.setForeground(LINK_COLOR); button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); button.setFocusPainted(false); button.setRequestFocusEnabled(false); button.setText("<html><u>" + button.getText() + "</u></html>"); button.setContentAreaFilled(false); // button.addMouseListener(new LinkMouseListener()); return button;
button.setBorder(LINK_BORDER); button.setForeground(LABEL_COLOR); button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); button.setFocusPainted(false); button.setRequestFocusEnabled(false); button.setContentAreaFilled(false); button.setText("<html><u>" + button.getText() + "</u></html>"); // button.addMouseListener(new LabelMouseListener()); return button;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/HeaderViewer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/HeaderViewer.java
Method name: JButton createLinkButton(JButton) Method name: JButton createLabelButton(JButton)
Number of AST nodes: 8 Number of AST nodes: 8
1
button.setBorder(LINK_BORDER);
1
button.setBorder(LINK_BORDER);
2
		button.setForeground(LINK_COLOR);
2
		button.setForeground(LABEL_COLOR);
3
		button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
3
		button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
4
		button.setFocusPainted(false);
4
		button.setFocusPainted(false);
5
		button.setRequestFocusEnabled(false);
5
		button.setRequestFocusEnabled(false);
6
		
6
		button.setContentAreaFilled(false);
7
button.setText("<html><u>" + button.getText() + "</u></html>");
7
		button.setText("<html><u>" + button.getText() + "</u></html>");
8
		button.setContentAreaFilled(false);
8
		
9
		// button.addMouseListener(new LinkMouseListener());
9
// button.addMouseListener(new LabelMouseListener());
10
		return button;
10
		return button;
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.0
Clones locationClones are declared in the same class
Number of node comparisons64
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    button.setBorder(LINK_BORDER);
    1
    button.setBorder(LINK_BORDER);
    2
    button.setForeground(LINK_COLOR);
    2
    button.setForeground(LINK_COLOR);
    2
    button.setForeground(LABEL_COLOR);
    Differences
    Expression1Expression2Difference
    LINK_COLORLABEL_COLORVARIABLE_NAME_MISMATCH
    2
    button.setForeground(LABEL_COLOR);
    3
    button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    3
    button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    4
    button.setFocusPainted(false);
    4
    button.setFocusPainted(false);
    5
    button.setRequestFocusEnabled(false);
    5
    button.setRequestFocusEnabled(false);
    6
    button.setText("<html><u>" + button.getText() + "</u></html>");
    7
    button.setText("<html><u>" + button.getText() + "</u></html>");
    7
    button.setContentAreaFilled(false);
    6
    button.setContentAreaFilled(false);
    8
    return button;
    8
    return button;
    Precondition Violations (0)
    Row Violation