GridBagConstraints c = new GridBagConstraints(); c.gridx = col; c.gridy = row; c.insets = new Insets(5, LEFT_INDENT_INSET_SIZE, 0, 0); c.anchor = GridBagConstraints.WEST; statementSeparatorLabel = new JLabel(i18n.STMT_SEP_LABEL); statementSeparatorLabel.setHorizontalAlignment(JLabel.LEFT); statementSeparatorLabel.setToolTipText(i18n.STMT_SEP_LABEL_TT); panel.add(statementSeparatorLabel, c);
GridBagConstraints c = new GridBagConstraints(); c.gridx = col; c.gridy = row; c.gridwidth = 1; c.fill = GridBagConstraints.HORIZONTAL; c.anchor = GridBagConstraints.WEST; c.insets = new Insets(5, LEFT_INDENT_INSET_SIZE, 0, 0); sessionTimezone.setToolTipText(i18n.SESSION_TIMEZONE_TT); result.add(sessionTimezone, 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/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/prefs/OraclePluginPreferencesPanel.java
Method name: void addStatementSeparatorLabel(JPanel, int, int) Method name: void addSessionTimezoneTextField(JPanel, int, int)
Number of AST nodes: 9 Number of AST nodes: 9
1
GridBagConstraints c = new GridBagConstraints();
1
GridBagConstraints c = new GridBagConstraints();
2
		c.gridx = col;
2
		c.gridx = col;
3
		c.gridy = row;
3
		c.gridy = row;
4
		c.insets = new Insets(5, LEFT_INDENT_INSET_SIZE, 0, 0)
4
		c.gridwidth = 1;
5
;
5
		c.fill = GridBagConstraints.HORIZONTAL;
6
		c.anchor = GridBagConstraints.WEST;
6
		c.anchor = GridBagConstraints.WEST;
7
		statementSeparatorLabel = new JLabel(i18n.STMT_SEP_LABEL);
7
		
8
		statementSeparatorLabel.setHorizontalAlignment(JLabel.LEFT);
9
		statementSeparatorLabel
8
c.insets = new Insets(5, LEFT_INDENT_INSET_SIZE, 0, 0);
10
.setToolTipText(i18n.STMT_SEP_LABEL_TT);
9
		sessionTimezone.setToolTipText(i18n.SESSION_TIMEZONE_TT);
11
		panel.add(statementSeparatorLabel, c);
10
		result.add(sessionTimezone, c);
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 comparisons56
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    GridBagConstraints c = new GridBagConstraints();
    1
    GridBagConstraints c = new GridBagConstraints();
    2
    c.gridx = col;
    2
    c.gridx = col;
    3
    c.gridy = row;
    3
    c.gridy = row;
                                      
    4
    c.gridwidth = 1;
    Preondition Violations
    Unmatched statement c.gridwidth=1; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    c.gridwidth = 1;
                                                                                    
    5
    c.fill = GridBagConstraints.HORIZONTAL;
    Preondition Violations
    Unmatched statement c.fill=GridBagConstraints.HORIZONTAL; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5
    c.fill = GridBagConstraints.HORIZONTAL;
    4
    c.insets = new Insets(5, LEFT_INDENT_INSET_SIZE, 0, 0);
    7
    c.insets = new Insets(5, LEFT_INDENT_INSET_SIZE, 0, 0);
    5
    c.anchor = GridBagConstraints.WEST;
    6
    c.anchor = GridBagConstraints.WEST;
    6
    statementSeparatorLabel = new JLabel(i18n.STMT_SEP_LABEL);
    6
    statementSeparatorLabel = new JLabel(i18n.STMT_SEP_LABEL);
    Preondition Violations
    Unmatched statement statementSeparatorLabel=new JLabel(i18n.STMT_SEP_LABEL); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                          
    7
    statementSeparatorLabel.setHorizontalAlignment(JLabel.LEFT);
                                                                                                                                  
    8
    statementSeparatorLabel.setToolTipText(i18n.STMT_SEP_LABEL_TT);
    8
    statementSeparatorLabel.setToolTipText(i18n.STMT_SEP_LABEL_TT);
    8
    sessionTimezone.setToolTipText(i18n.SESSION_TIMEZONE_TT);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.plugin.gui.PluginQueryTokenizerPreferencesPanel.i18nnet.sourceforge.squirrel_sql.plugins.oracle.prefs.OraclePluginPreferencesPanel.i18nVARIABLE_TYPE_MISMATCH
    STMT_SEP_LABEL_TTSESSION_TIMEZONE_TTVARIABLE_NAME_MISMATCH
    statementSeparatorLabelsessionTimezoneVARIABLE_NAME_MISMATCH
    javax.swing.JLabeljavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.plugin.gui.PluginQueryTokenizerPreferencesPanel.i18n does not match with type net.sourceforge.squirrel_sql.plugins.oracle.prefs.OraclePluginPreferencesPanel.i18n
    • Make classes net.sourceforge.squirrel_sql.client.plugin.gui.PluginQueryTokenizerPreferencesPanel.i18n and net.sourceforge.squirrel_sql.plugins.oracle.prefs.OraclePluginPreferencesPanel.i18n extend a common superclass
    8
    sessionTimezone.setToolTipText(i18n.SESSION_TIMEZONE_TT);
                                                                      
    9
    result.add(sessionTimezone, c);
    Preondition Violations
    Unmatched statement result.add(sessionTimezone,c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9
    result.add(sessionTimezone, c);
    9
    panel.add(statementSeparatorLabel, c);
    9
    panel.add(statementSeparatorLabel, c);
    Preondition Violations
    Unmatched statement panel.add(statementSeparatorLabel,c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                    
    Precondition Violations (6)
    Row Violation
    1Unmatched statement c.gridwidth=1; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement c.fill=GridBagConstraints.HORIZONTAL; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement statementSeparatorLabel=new JLabel(i18n.STMT_SEP_LABEL); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Type net.sourceforge.squirrel_sql.client.plugin.gui.PluginQueryTokenizerPreferencesPanel.i18n does not match with type net.sourceforge.squirrel_sql.plugins.oracle.prefs.OraclePluginPreferencesPanel.i18n
    5Unmatched statement result.add(sessionTimezone,c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement panel.add(statementSeparatorLabel,c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted