GridBagConstraints c = new GridBagConstraints(); c.gridx = col; c.gridy = row; c.gridwidth = 2; // Span across two columns c.insets = new Insets(5, 30, 0, 0); String cbLabel = i18n.REMOVE_ML_COMMENT_LABEL; removeMultiLineCommentCheckBox = new JCheckBox(cbLabel); removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT); panel.add(removeMultiLineCommentCheckBox, c);
GridBagConstraints c = new GridBagConstraints(); c.gridx = col; c.gridy = row; c.insets = new Insets(5,25,0,0); String label = s_stringMgr.getString("PreferencesPanel.delayRecordsLabel"); delayRecordsLabel = new JLabel(label); delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT); panel.add(delayRecordsLabel, 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/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/gui/PreferencesPanel.java
Method name: void addRemoveMultiLineCommentCheckBox(JPanel, int, int) Method name: void addDelayRecordsLabel(JPanel, int, int)
Number of AST nodes: 9 Number of AST nodes: 8
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 = 2; // Span across two columns
5
		
4
  
6
c.insets = new Insets(5, 30, 0, 0);
5
        c.insets = new Insets(5,25,0,0);
7
		String cbLabel = i18n.REMOVE_ML_COMMENT_LABEL;
6
        String label = 
8
		removeMultiLineCommentCheckBox = new JCheckBox(cbLabel);
9
		removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT);
10
		panel.add(removeMultiLineCommentCheckBox
7
            s_stringMgr.getString("PreferencesPanel.delayRecordsLabel");
8
        delayRecordsLabel = new JLabel(label);
9
        delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT);
11
, c);
10
        panel.add(delayRecordsLabel, 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 comparisons38
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    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
    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 = 2;
    4
    c.gridwidth = 2;
    Preondition Violations
    Unmatched statement c.gridwidth=2; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                      
    5
    c.insets = new Insets(5, 30, 0, 0);
    5
    c.insets = new Insets(5, 30, 0, 0);
    4
    c.insets = new Insets(5, 25, 0, 0);
    Differences
    Expression1Expression2Difference
    3025LITERAL_VALUE_MISMATCH
    4
    c.insets = new Insets(5, 25, 0, 0);
    6
    String cbLabel = i18n.REMOVE_ML_COMMENT_LABEL;
    6
    String cbLabel = i18n.REMOVE_ML_COMMENT_LABEL;
    5
    String label = s_stringMgr.getString("PreferencesPanel.delayRecordsLabel");
    Differences
    Expression1Expression2Difference
    cbLabellabelVARIABLE_NAME_MISMATCH
    i18n.REMOVE_ML_COMMENT_LABELs_stringMgr.getString("PreferencesPanel.delayRecordsLabel")TYPE_COMPATIBLE_REPLACEMENT
    5
    String label = s_stringMgr.getString("PreferencesPanel.delayRecordsLabel");
    7
    removeMultiLineCommentCheckBox = new JCheckBox(cbLabel);
    7
    removeMultiLineCommentCheckBox = new JCheckBox(cbLabel);
    6
    delayRecordsLabel = new JLabel(label);
    Differences
    Expression1Expression2Difference
    removeMultiLineCommentCheckBoxdelayRecordsLabelVARIABLE_NAME_MISMATCH
    javax.swing.JCheckBoxjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    javax.swing.JCheckBoxjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    cbLabellabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression removeMultiLineCommentCheckBox is a field being modified, and thus it cannot be parameterized
    Expression delayRecordsLabel is a field being modified, and thus it cannot be parameterized
    Expression new JCheckBox(cbLabel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new JLabel(label) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    delayRecordsLabel = new JLabel(label);
    8
    removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT);
    8
    removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT);
    8
    panel.add(delayRecordsLabel, c);
    Differences
    Expression1Expression2Difference
    setToolTipTextaddMETHOD_INVOCATION_NAME_MISMATCH
    removeMultiLineCommentCheckBoxpanelVARIABLE_NAME_MISMATCH
    javax.swing.JCheckBoxjavax.swing.JPanelSUBCLASS_TYPE_MISMATCH
    removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT)panel.add(delayRecordsLabel,c)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression panel.add(delayRecordsLabel,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) is a void method call, and thus it cannot be parameterized
    Expression panel.add(delayRecordsLabel,c) is a void method call, and thus it cannot be parameterized
    Expression removeMultiLineCommentCheckBox cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression panel.add(delayRecordsLabel,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) is a void method call, and thus it cannot be parameterized
    Expression panel.add(delayRecordsLabel,c) is a void method call, and thus it cannot be parameterized
    8
    panel.add(delayRecordsLabel, c);
    9
    panel.add(removeMultiLineCommentCheckBox, c);
    9
    panel.add(removeMultiLineCommentCheckBox, c);
    7
    delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT);
    Differences
    Expression1Expression2Difference
    addsetHorizontalAlignmentMETHOD_INVOCATION_NAME_MISMATCH
    paneldelayRecordsLabelVARIABLE_NAME_MISMATCH
    javax.swing.JPaneljavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    panel.add(removeMultiLineCommentCheckBox,c)delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression panel.add(removeMultiLineCommentCheckBox,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression panel.add(removeMultiLineCommentCheckBox,c) is a void method call, and thus it cannot be parameterized
    Expression delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT) is a void method call, and thus it cannot be parameterized
    Expression delayRecordsLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression panel.add(removeMultiLineCommentCheckBox,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression panel.add(removeMultiLineCommentCheckBox,c) is a void method call, and thus it cannot be parameterized
    Expression delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT) is a void method call, and thus it cannot be parameterized
    7
    delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT);
    Precondition Violations (23)
    Row Violation
    1Unmatched statement c.gridwidth=2; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Expression removeMultiLineCommentCheckBox is a field being modified, and thus it cannot be parameterized
    3Expression delayRecordsLabel is a field being modified, and thus it cannot be parameterized
    4Expression new JCheckBox(cbLabel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression new JLabel(label) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression panel.add(delayRecordsLabel,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) is a void method call, and thus it cannot be parameterized
    9Expression panel.add(delayRecordsLabel,c) is a void method call, and thus it cannot be parameterized
    10Expression removeMultiLineCommentCheckBox cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression panel.add(delayRecordsLabel,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) is a void method call, and thus it cannot be parameterized
    14Expression panel.add(delayRecordsLabel,c) is a void method call, and thus it cannot be parameterized
    15Expression panel.add(removeMultiLineCommentCheckBox,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression panel.add(removeMultiLineCommentCheckBox,c) is a void method call, and thus it cannot be parameterized
    18Expression delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT) is a void method call, and thus it cannot be parameterized
    19Expression delayRecordsLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression panel.add(removeMultiLineCommentCheckBox,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression panel.add(removeMultiLineCommentCheckBox,c) is a void method call, and thus it cannot be parameterized
    23Expression delayRecordsLabel.setHorizontalAlignment(JLabel.LEFT) is a void method call, and thus it cannot be parameterized