addButton = new ButtonWithMnemonic(GlobalResourceLoader.getString( RESOURCE_PATH, "profiles", "add")); addButton.setActionCommand("ADD"); addButton.addActionListener(this); addButton.setEnabled(false); editButton = new ButtonWithMnemonic(GlobalResourceLoader.getString( RESOURCE_PATH, "profiles", "edit")); editButton.setActionCommand("EDIT"); editButton.addActionListener(this); editButton.setEnabled(false); nameLabel = new JLabel(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "label"));
addButton = new ButtonWithMnemonic(GlobalResourceLoader.getString( RESOURCE_PATH, "profiles", "add")); addButton.setActionCommand("ADD"); addButton.addActionListener(this); addButton.setEnabled(false); editButton = new ButtonWithMnemonic(GlobalResourceLoader.getString( RESOURCE_PATH, "profiles", "edit")); editButton.setActionCommand("EDIT"); editButton.addActionListener(this); editButton.setEnabled(false); removeButton = new ButtonWithMnemonic(GlobalResourceLoader.getString( RESOURCE_PATH, "profiles", "remove"));
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/profiles/ProfileChooserDialog.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/profiles/ProfileManagerDialog.java
Method name: void initComponents() Method name: void initComponents()
Number of AST nodes: 9 Number of AST nodes: 9
1
addButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(
1
addButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(
2
            RESOURCE_PATH, "profiles", "add"));
2
				RESOURCE_PATH, "profiles", "add"));
3
        addButton.setActionCommand("ADD");
3
		addButton.setActionCommand("ADD");
4
        addButton.addActionListener(this);
4
		addButton.addActionListener(this);
5
        addButton.setEnabled(false);
5
		addButton.setEnabled(false);
6
        
7
        
8
editButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(
6
		editButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(
9
            RESOURCE_PATH, "profiles", "edit"));
7
				RESOURCE_PATH, "profiles", "edit"));
10
        editButton.setActionCommand("EDIT");
8
		editButton.setActionCommand("EDIT");
11
        editButton.addActionListener(this);
9
		editButton.addActionListener(this);
12
        editButton.setEnabled(false);
10
		editButton.setEnabled(false);
13
        
14
        nameLabel = new JLabel
15
(GlobalResourceLoader.getString(
11
		removeButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(
16
RESOURCE_PATH,
12
				RESOURCE_PATH,
17
            "profiles", "label"));
13
 "profiles", "remove"));
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons42
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    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
    addButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "add"));
    1
    addButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "add"));
    2
    addButton.setActionCommand("ADD");
    2
    addButton.setActionCommand("ADD");
    3
    addButton.addActionListener(this);
    3
    addButton.addActionListener(this);
    4
    addButton.setEnabled(false);
    4
    addButton.setEnabled(false);
    5
    editButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "edit"));
    5
    editButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "edit"));
    6
    editButton.setActionCommand("EDIT");
    6
    editButton.setActionCommand("EDIT");
    7
    editButton.addActionListener(this);
    7
    editButton.addActionListener(this);
    8
    editButton.setEnabled(false);
    8
    editButton.setEnabled(false);
    9
    nameLabel = new JLabel(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "label"));
    9
    nameLabel = new JLabel(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "label"));
    9
    removeButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "remove"));
    Differences
    Expression1Expression2Difference
    nameLabelremoveButtonVARIABLE_NAME_MISMATCH
    javax.swing.JLabeljavax.swing.JButtonSUBCLASS_TYPE_MISMATCH
    javax.swing.JLabelorg.columba.core.gui.base.ButtonWithMnemonicSUBCLASS_TYPE_MISMATCH
    "label""remove"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression nameLabel is a field being modified, and thus it cannot be parameterized
    Expression removeButton is a field being modified, and thus it cannot be parameterized
    Expression new JLabel(GlobalResourceLoader.getString(RESOURCE_PATH,"profiles","label")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new ButtonWithMnemonic(GlobalResourceLoader.getString(RESOURCE_PATH,"profiles","remove")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    removeButton = new ButtonWithMnemonic(GlobalResourceLoader.getString(RESOURCE_PATH, "profiles", "remove"));
    Precondition Violations (4)
    Row Violation
    1Expression nameLabel is a field being modified, and thus it cannot be parameterized
    2Expression removeButton is a field being modified, and thus it cannot be parameterized
    3Expression new JLabel(GlobalResourceLoader.getString(RESOURCE_PATH,"profiles","label")) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression new ButtonWithMnemonic(GlobalResourceLoader.getString(RESOURCE_PATH,"profiles","remove")) cannot be parameterized, because it has dependencies to/from statements that will be extracted