this.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; // Column 0 c.gridy = 0; // Row 0 c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = .40; add(createTopPanel(), c);
this.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; // Column 0 c.gridy = 0; // Row 0 c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = .60; add(createBottomPanel(), c);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/plugin/gui/PluginQueryTokenizerPreferencesPanel.java File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/prefs/SQLScriptPreferencesPanel.java
Method name: void createGUI() Method name: void createGUI()
Number of AST nodes: 8 Number of AST nodes: 8
1
this.setLayout(new GridBagLayout());
1
this.setLayout(new GridBagLayout());
2
		GridBagConstraints c = new GridBagConstraints();
2
        GridBagConstraints c = new GridBagConstraints();
3
		c.gridx = 0; // Column 0
3
        c.gridx = 0;   // Column 0
4
		c.gridy = 0; // Row 0
4
        c.gridy = 0;   // Row 0
5
		c.fill = GridBagConstraints.BOTH;
5
        c.fill = GridBagConstraints.BOTH;
6
		c.weightx = 1;
6
        c.weightx = 1;
7
		c.weighty = .40;
7
        c.weighty = .60;
8
		add(createTopPanel(), c);
8
        add(createBottomPanel(), c);
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 comparisons40
  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
    this.setLayout(new GridBagLayout());
    1
    this.setLayout(new GridBagLayout());
    2
    GridBagConstraints c = new GridBagConstraints();
    2
    GridBagConstraints c = new GridBagConstraints();
    3
    c.gridx = 0;
    3
    c.gridx = 0;
    4
    c.gridy = 0;
    4
    c.gridy = 0;
    5
    c.fill = GridBagConstraints.BOTH;
    5
    c.fill = GridBagConstraints.BOTH;
    6
    c.weightx = 1;
    6
    c.weightx = 1;
    7
    c.weighty = .40;
    7
    c.weighty = .40;
    7
    c.weighty = .60;
    Differences
    Expression1Expression2Difference
    .40.60LITERAL_VALUE_MISMATCH
    7
    c.weighty = .60;
    8
    add(createTopPanel(), c);
    8
    add(createTopPanel(), c);
    8
    add(createBottomPanel(), c);
    Differences
    Expression1Expression2Difference
    createTopPanelcreateBottomPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createTopPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression createBottomPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createBottomPanel
    8
    add(createBottomPanel(), c);
    Precondition Violations (2)
    Row Violation
    1Expression createTopPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression createBottomPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted