final GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(4, 4, 4, 4); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 1; add(createHTTPPanel(), gbc); ++gbc.gridy; add(createSOCKSPanel(), gbc); final ActionListener lis = new MyActionHandler(); _httpUseProxyChk.addActionListener(lis); _socksUseProxyChk.addActionListener(lis);
final GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(4, 4, 4, 4); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 1; add(createUpdateSitePanel(), gbc); ++gbc.gridy; add(createAutoUpdatePanel(), gbc); final ActionListener lis = new MyActionHandler(); _enableAutoUpdateChk.addActionListener(lis);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/preferences/ProxyPreferencesPanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/preferences/UpdatePreferencesPanel.java
Method name: void createUserInterface() Method name: void createUserInterface()
Number of AST nodes: 12 Number of AST nodes: 11
1
final GridBagConstraints gbc = new GridBagConstraints();
1
final GridBagConstraints gbc = new GridBagConstraints();
2
			gbc.fill = GridBagConstraints.HORIZONTAL;
2
		gbc.fill = GridBagConstraints.HORIZONTAL;
3
			gbc.insets = new Insets(4, 4, 4, 4);
3
		gbc.insets = new Insets(4, 4, 4, 4);
4
			gbc.gridx = 0;
4
		gbc.gridx = 0;
5
			gbc.gridy = 0;
5
		gbc.gridy = 0;
6
			gbc.weightx = 1;
6
		gbc.weightx = 1;
7
			add(createHTTPPanel(), gbc);
7
		add(createUpdateSitePanel(), gbc);
8
			++gbc.gridy;
8
		++gbc.gridy;
9
			add(createSOCKSPanel(), gbc);
9
		add(createAutoUpdatePanel(), gbc);
10
			final ActionListener lis = new MyActionHandler();
10
		final ActionListener lis = new MyActionHandler();
11
			_httpUseProxyChk.addActionListener(lis);
11
		
12
			_socksUseProxyChk.addActionListener(lis);
12
_enableAutoUpdateChk.addActionListener(lis);
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 in different classes having the same super class
Number of node comparisons69
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    final GridBagConstraints gbc = new GridBagConstraints();
    1
    final GridBagConstraints gbc = new GridBagConstraints();
    2
    gbc.fill = GridBagConstraints.HORIZONTAL;
    2
    gbc.fill = GridBagConstraints.HORIZONTAL;
    3
    gbc.insets = new Insets(4, 4, 4, 4);
    3
    gbc.insets = new Insets(4, 4, 4, 4);
    4
    gbc.gridx = 0;
    4
    gbc.gridx = 0;
    5
    gbc.gridy = 0;
    5
    gbc.gridy = 0;
    6
    gbc.weightx = 1;
    6
    gbc.weightx = 1;
    7
    add(createHTTPPanel(), gbc);
    7
    add(createHTTPPanel(), gbc);
    9
    add(createAutoUpdatePanel(), gbc);
    Differences
    Expression1Expression2Difference
    createHTTPPanelcreateAutoUpdatePanelMETHOD_INVOCATION_NAME_MISMATCH
    9
    add(createAutoUpdatePanel(), gbc);
    8
    ++gbc.gridy;
    8
    ++gbc.gridy;
    9
    add(createSOCKSPanel(), gbc);
    9
    add(createSOCKSPanel(), gbc);
    7
    add(createUpdateSitePanel(), gbc);
    Differences
    Expression1Expression2Difference
    createSOCKSPanelcreateUpdateSitePanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createUpdateSitePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createUpdateSitePanel
    7
    add(createUpdateSitePanel(), gbc);
    10
    final ActionListener lis = new MyActionHandler();
    10
    final ActionListener lis = new MyActionHandler();
    10
    final ActionListener lis = new MyActionHandler();
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.preferences.ProxyPreferencesPanel.MyPanel.MyActionHandlernet.sourceforge.squirrel_sql.client.preferences.UpdatePreferencesPanel.MyActionHandlerSUBCLASS_TYPE_MISMATCH
    10
    final ActionListener lis = new MyActionHandler();
    11
    _httpUseProxyChk.addActionListener(lis);
    11
    _httpUseProxyChk.addActionListener(lis);
    11
    _enableAutoUpdateChk.addActionListener(lis);
    Differences
    Expression1Expression2Difference
    _httpUseProxyChk_enableAutoUpdateChkVARIABLE_NAME_MISMATCH
    11
    _enableAutoUpdateChk.addActionListener(lis);
    12
    _socksUseProxyChk.addActionListener(lis);
    12
    _socksUseProxyChk.addActionListener(lis);
    Preondition Violations
    Unmatched statement _socksUseProxyChk.addActionListener(lis); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                              
    Precondition Violations (2)
    Row Violation
    1Expression createUpdateSitePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Unmatched statement _socksUseProxyChk.addActionListener(lis); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted