setLayout(new GridBagLayout()); 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(createSQLPanel(), gbc); ++gbc.gridy; add(createFontPanel(), gbc); ++gbc.gridy; add(createSQLHistoryPanel(), gbc);
setLayout(new GridBagLayout()); 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(createFontsPanel(), gbc); ++gbc.gridy; gbc.gridwidth = GridBagConstraints.REMAINDER; add(new MultipleLineLabel(i18n.LAF_WARNING), gbc);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/properties/SessionSQLPropertiesPanel.java File path: /sql12/plugins/laf/src/net/sourceforge/squirrel_sql/plugins/laf/LAFFontsTab.java
Method name: void createGUI() Method name: void createUserInterface()
Number of AST nodes: 12 Number of AST nodes: 11
1
setLayout(new GridBagLayout());
1
setLayout(new GridBagLayout());
2
			final GridBagConstraints gbc = new GridBagConstraints();
2
			final GridBagConstraints gbc = new GridBagConstraints();
3
			gbc.anchor = GridBagConstraints.WEST;
3
			gbc.anchor = GridBagConstraints.WEST;
4
			gbc.fill = GridBagConstraints.HORIZONTAL;
4
			gbc.fill = GridBagConstraints.HORIZONTAL;
5
			gbc.insets = new Insets(4, 4, 4, 4);
5
			gbc.insets = new Insets(4, 4, 4, 4);
6
			gbc.gridx = 0;
6
			gbc.gridx = 0;
7
			gbc.gridy = 0;
7
			gbc.gridy = 0;
8
			add(createSQLPanel(), gbc);
8
			add(createFontsPanel(), gbc);
9
			++gbc.gridy;
9
			++gbc.gridy;
10
			add(createFontPanel(), gbc);
10
			
11
			++gbc.gridy;
12
			add(createSQLHistoryPanel(
11
gbc.gridwidth = GridBagConstraints.REMAINDER;
13
), gbc);
12
			add(new MultipleLineLabel(i18n.LAF_WARNING), gbc);
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 comparisons83
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    setLayout(new GridBagLayout());
    1
    setLayout(new GridBagLayout());
    2
    final GridBagConstraints gbc = new GridBagConstraints();
    2
    final GridBagConstraints gbc = new GridBagConstraints();
    3
    gbc.anchor = GridBagConstraints.WEST;
    3
    gbc.anchor = GridBagConstraints.WEST;
    4
    gbc.fill = GridBagConstraints.HORIZONTAL;
    4
    gbc.fill = GridBagConstraints.HORIZONTAL;
    5
    gbc.insets = new Insets(4, 4, 4, 4);
    5
    gbc.insets = new Insets(4, 4, 4, 4);
    6
    gbc.gridx = 0;
    6
    gbc.gridx = 0;
    7
    gbc.gridy = 0;
    7
    gbc.gridy = 0;
    8
    add(createSQLPanel(), gbc);
    8
    add(createSQLPanel(), gbc);
    Preondition Violations
    Unmatched statement add(createSQLPanel(),gbc); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                              
    9
    ++gbc.gridy;
    9
    ++gbc.gridy;
    10
    add(createFontPanel(), gbc);
    10
    add(createFontPanel(), gbc);
    8
    add(createFontsPanel(), gbc);
    Differences
    Expression1Expression2Difference
    createFontPanelcreateFontsPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createFontsPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createFontsPanel
    8
    add(createFontsPanel(), gbc);
                                                                                                  
    10
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    Preondition Violations
    Unmatched statement gbc.gridwidth=GridBagConstraints.REMAINDER; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    11
    ++gbc.gridy;
    11
    ++gbc.gridy;
    Preondition Violations
    Unmatched statement ++gbc.gridy; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                    
    12
    add(createSQLHistoryPanel(), gbc);
    12
    add(createSQLHistoryPanel(), gbc);
    11
    add(new MultipleLineLabel(i18n.LAF_WARNING), gbc);
    Differences
    Expression1Expression2Difference
    javax.swing.JPanelnet.sourceforge.squirrel_sql.fw.gui.MultipleLineLabelSUBCLASS_TYPE_MISMATCH
    createSQLHistoryPanel()new MultipleLineLabel(i18n.LAF_WARNING)TYPE_COMPATIBLE_REPLACEMENT
    11
    add(new MultipleLineLabel(i18n.LAF_WARNING), gbc);
    Precondition Violations (4)
    Row Violation
    1Unmatched statement add(createSQLPanel(),gbc); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Expression createFontsPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Unmatched statement gbc.gridwidth=GridBagConstraints.REMAINDER; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement ++gbc.gridy; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted