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.ipadx = 40; // Increases component width by 40 pixels c.insets = new Insets(5,5,0,0); c.anchor = GridBagConstraints.WEST; delayRecordsTextField = new JTextField(10); delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT); panel.add(delayRecordsTextField, 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 addDelayRecordsTextField(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.gridwidth = 2; // Span across two columns
5
		
4
   
5
        c.ipadx = 40;    // Increases component width by 40 pixels
6
c.insets = new Insets(5, 30, 0, 0);
6
        c.insets = new Insets(5,5,0,0);
7
		String cbLabel = i18n.REMOVE_ML_COMMENT_LABEL;
8
		removeMultiLineCommentCheckBox = new JCheckBox(cbLabel);
9
		removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT);
10
		panel.add(removeMultiLineCommentCheckBox
7
        c.anchor = GridBagConstraints.WEST;
8
        delayRecordsTextField = new JTextField(10);
9
        
10
        delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT);
11
, c);
11
        panel.add(delayRecordsTextField, 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 comparisons51
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    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 = 2;
    4
    c.gridwidth = 2;
    4
    c.ipadx = 40;
    Differences
    Expression1Expression2Difference
    gridwidthipadxVARIABLE_NAME_MISMATCH
    240LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression c.gridwidth cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression c.ipadx cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression c.gridwidth is a field being modified, and thus it cannot be parameterized
    Expression c.ipadx is a field being modified, and thus it cannot be parameterized
    4
    c.ipadx = 40;
    5
    c.insets = new Insets(5, 30, 0, 0);
    5
    c.insets = new Insets(5, 30, 0, 0);
    5
    c.insets = new Insets(5, 5, 0, 0);
    Differences
    Expression1Expression2Difference
    305LITERAL_VALUE_MISMATCH
    5
    c.insets = new Insets(5, 5, 0, 0);
                                                                            
    6
    c.anchor = GridBagConstraints.WEST;
    Preondition Violations
    Unmatched statement c.anchor=GridBagConstraints.WEST; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    c.anchor = GridBagConstraints.WEST;
    6
    String cbLabel = i18n.REMOVE_ML_COMMENT_LABEL;
                                                                                                  
                                                                                            
    7
    delayRecordsTextField = new JTextField(10);
    Preondition Violations
    Unmatched statement delayRecordsTextField=new JTextField(10); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    7
    delayRecordsTextField = new JTextField(10);
    7
    removeMultiLineCommentCheckBox = new JCheckBox(cbLabel);
    7
    removeMultiLineCommentCheckBox = new JCheckBox(cbLabel);
    Preondition Violations
    Unmatched statement removeMultiLineCommentCheckBox=new JCheckBox(cbLabel); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                      
    8
    removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT);
    8
    removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT);
    9
    panel.add(delayRecordsTextField, 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(delayRecordsTextField,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(delayRecordsTextField,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(delayRecordsTextField,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(delayRecordsTextField,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(delayRecordsTextField,c) is a void method call, and thus it cannot be parameterized
    9
    panel.add(delayRecordsTextField, c);
    9
    panel.add(removeMultiLineCommentCheckBox, c);
    9
    panel.add(removeMultiLineCommentCheckBox, c);
    8
    delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT);
    Differences
    Expression1Expression2Difference
    addsetHorizontalAlignmentMETHOD_INVOCATION_NAME_MISMATCH
    paneldelayRecordsTextFieldVARIABLE_NAME_MISMATCH
    javax.swing.JPaneljavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    panel.add(removeMultiLineCommentCheckBox,c)delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT)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 delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT) 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 delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT) is a void method call, and thus it cannot be parameterized
    Expression delayRecordsTextField 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 delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT) 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 delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT) is a void method call, and thus it cannot be parameterized
    8
    delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT);
    Precondition Violations (25)
    Row Violation
    1Expression c.gridwidth cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression c.ipadx cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression c.gridwidth is a field being modified, and thus it cannot be parameterized
    4Expression c.ipadx is a field being modified, and thus it cannot be parameterized
    5Unmatched statement c.anchor=GridBagConstraints.WEST; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement delayRecordsTextField=new JTextField(10); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    7Unmatched statement removeMultiLineCommentCheckBox=new JCheckBox(cbLabel); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    8Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression panel.add(delayRecordsTextField,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) is a void method call, and thus it cannot be parameterized
    11Expression panel.add(delayRecordsTextField,c) is a void method call, and thus it cannot be parameterized
    12Expression removeMultiLineCommentCheckBox cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression panel.add(delayRecordsTextField,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression removeMultiLineCommentCheckBox.setToolTipText(i18n.REMOVE_ML_COMMENT_LABEL_TT) is a void method call, and thus it cannot be parameterized
    16Expression panel.add(delayRecordsTextField,c) is a void method call, and thus it cannot be parameterized
    17Expression panel.add(removeMultiLineCommentCheckBox,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression panel.add(removeMultiLineCommentCheckBox,c) is a void method call, and thus it cannot be parameterized
    20Expression delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT) is a void method call, and thus it cannot be parameterized
    21Expression delayRecordsTextField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression panel.add(removeMultiLineCommentCheckBox,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23Expression delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression panel.add(removeMultiLineCommentCheckBox,c) is a void method call, and thus it cannot be parameterized
    25Expression delayRecordsTextField.setHorizontalAlignment(JTextField.RIGHT) is a void method call, and thus it cannot be parameterized