final GridBagConstraints gbc = new GridBagConstraints(); gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(4, 4, 4, 4); gbc.gridx = 0; gbc.gridy = 0; add(new JLabel(OyoahaPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc); ++gbc.gridx; add(_themePackCmb, gbc); gbc.gridx = 0; ++gbc.gridy; add(new JLabel(OyoahaPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc); ++gbc.gridx; final String themePackDir = _ctrl._prefs.getThemePackDirectory(); add(new OutputLabel(themePackDir), gbc);
final GridBagConstraints gbc = new GridBagConstraints(); gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(4, 4, 4, 4); gbc.gridx = 0; gbc.gridy = 0; add(new JLabel(SkinPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc); ++gbc.gridx; add(_themePackCmb, gbc); gbc.gridx = 0; ++gbc.gridy; add(new JLabel(SkinPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc); ++gbc.gridx; final String themePackDir = _ctrl._prefs.getThemePackDirectory(); add(new OutputLabel(themePackDir), gbc);
Clone fragments detected by clone detection tool
File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/OyoahaLookAndFeelController.java File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/SkinLookAndFeelController.java
Method name: void createUserInterface() Method name: void createUserInterface()
Number of AST nodes: 15 Number of AST nodes: 15
1
final GridBagConstraints gbc = new GridBagConstraints();
1
final GridBagConstraints gbc = new GridBagConstraints();
2
			gbc.anchor = GridBagConstraints.WEST;
2
			gbc.anchor = GridBagConstraints.WEST;
3
			gbc.fill = GridBagConstraints.HORIZONTAL;
3
			gbc.fill = GridBagConstraints.HORIZONTAL;
4
			gbc.insets = new Insets(4, 4, 4, 4);
4
			gbc.insets = new Insets(4, 4, 4, 4);
5
			gbc.gridx = 0;
5
			gbc.gridx = 0;
6
			gbc.gridy = 0;
6
			gbc.gridy = 0;
7
			add(new JLabel(OyoahaPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc);
7
			add(new JLabel(SkinPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc);
8
			++gbc.gridx;
8
			++gbc.gridx;
9
			add(_themePackCmb, gbc);
9
			add(_themePackCmb, gbc);
10
			gbc.gridx = 0;
10
			gbc.gridx = 0;
11
			++gbc.gridy;
11
			++gbc.gridy;
12
			add(new JLabel(OyoahaPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc);
12
			add(new JLabel(SkinPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc);
13
			++gbc.gridx;
13
			++gbc.gridx;
14
			final String themePackDir = _ctrl._prefs.getThemePackDirectory();
14
			final String themePackDir = _ctrl._prefs.getThemePackDirectory();
15
			add(new OutputLabel(themePackDir), gbc);
15
			add(new OutputLabel(themePackDir), gbc);
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 comparisons125
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements15
    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
    final GridBagConstraints gbc = new GridBagConstraints();
    1
    final GridBagConstraints gbc = new GridBagConstraints();
    2
    gbc.anchor = GridBagConstraints.WEST;
    2
    gbc.anchor = GridBagConstraints.WEST;
    3
    gbc.fill = GridBagConstraints.HORIZONTAL;
    3
    gbc.fill = GridBagConstraints.HORIZONTAL;
    4
    gbc.insets = new Insets(4, 4, 4, 4);
    4
    gbc.insets = new Insets(4, 4, 4, 4);
    5
    gbc.gridx = 0;
    5
    gbc.gridx = 0;
    6
    gbc.gridy = 0;
    6
    gbc.gridy = 0;
    7
    add(new JLabel(OyoahaPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc);
    7
    add(new JLabel(OyoahaPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc);
    7
    add(new JLabel(SkinPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel.OyoahaPrefsPanelI18nnet.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPrefsPanel.SkinPrefsPanelI18nVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel.OyoahaPrefsPanelI18n does not match with type net.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPrefsPanel.SkinPrefsPanelI18n
    • Make classes net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel.OyoahaPrefsPanelI18n and net.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPrefsPanel.SkinPrefsPanelI18n extend a common superclass
    7
    add(new JLabel(SkinPrefsPanelI18n.THEME_PACK, SwingConstants.RIGHT), gbc);
    8
    ++gbc.gridx;
    8
    ++gbc.gridx;
    9
    add(_themePackCmb, gbc);
    9
    add(_themePackCmb, gbc);
    10
    gbc.gridx = 0;
    10
    gbc.gridx = 0;
    11
    ++gbc.gridy;
    11
    ++gbc.gridy;
    12
    add(new JLabel(OyoahaPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc);
    12
    add(new JLabel(OyoahaPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc);
    12
    add(new JLabel(SkinPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel.OyoahaPrefsPanelI18nnet.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPrefsPanel.SkinPrefsPanelI18nVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel.OyoahaPrefsPanelI18n does not match with type net.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPrefsPanel.SkinPrefsPanelI18n
    • Make classes net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel.OyoahaPrefsPanelI18n and net.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPrefsPanel.SkinPrefsPanelI18n extend a common superclass
    12
    add(new JLabel(SkinPrefsPanelI18n.THEMEPACK_LOC, SwingConstants.RIGHT), gbc);
    13
    ++gbc.gridx;
    13
    ++gbc.gridx;
    14
    final String themePackDir = _ctrl._prefs.getThemePackDirectory();
    14
    final String themePackDir = _ctrl._prefs.getThemePackDirectory();
    14
    final String themePackDir = _ctrl._prefs.getThemePackDirectory();
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelControllernet.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelControllerSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPreferencesnet.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPreferencesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression _ctrl._prefs cannot be unified with expression _ctrl._prefs , because common superclass net.sourceforge.squirrel_sql.fw.id.IHasIdentifier does not declare member(s) public java.lang.String getThemePackDirectory()
    14
    final String themePackDir = _ctrl._prefs.getThemePackDirectory();
    15
    add(new OutputLabel(themePackDir), gbc);
    15
    add(new OutputLabel(themePackDir), gbc);
    Precondition Violations (3)
    Row Violation
    1Type net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel.OyoahaPrefsPanelI18n does not match with type net.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPrefsPanel.SkinPrefsPanelI18n
    2Type net.sourceforge.squirrel_sql.plugins.laf.OyoahaLookAndFeelController.OyoahaPrefsPanel.OyoahaPrefsPanelI18n does not match with type net.sourceforge.squirrel_sql.plugins.laf.SkinLookAndFeelController.SkinPrefsPanel.SkinPrefsPanelI18n
    3Expression _ctrl._prefs cannot be unified with expression _ctrl._prefs , because common superclass net.sourceforge.squirrel_sql.fw.id.IHasIdentifier does not declare member(s) public java.lang.String getThemePackDirectory()