File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/plugin/gui/PluginQueryTokenizerPreferencesPanel.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/plugin/gui/PluginQueryTokenizerPreferencesPanel.java | |||
Method name: void loadData()
|
Method name: void save()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | IQueryTokenizerPreferenceBean _prefs = _prefsManager.getPreferences();↵ | 1 | IQueryTokenizerPreferenceBean _prefs = _prefsManager.getPreferences();↵ | |
2 | removeMultiLineCommentCheckBox.setSelected(↵ | 2 | _prefs.setRemoveMultiLineComments(removeMultiLineCommentCheckBox.isSelected());↵ | |
3 | _prefs.isRemoveMultiLineComments());↵ | 3 | _prefs.setLineComment↵ | |
4 | lineCommentTextField.setText(↵ | 4 | (lineCommentTextField.getText());↵ | |
5 | _prefs.getLineComment());↵ | 5 | _prefs.set↵ | |
6 | statementSeparatorTextField.setText(_prefs.getStatementSeparator());↵ | 6 | StatementSeparator(statementSeparatorTextField.getText());↵ | |
7 | if (_showProcSep)↵ | 7 | if (_showProcSep)↵ | |
8 | {↵ | 8 | {↵ | |
9 | procedureSeparatorTextField.setText(_prefs.getProcedureSeparator());↵ | 9 | _prefs.setProcedureSeparator↵ | |
10 | }↵ | |||
11 | useCustomQTCheckBox.setSelected(↵ | 10 | (procedureSeparatorTextField.getText());↵ | |
11 | }↵ | |||
12 | _prefs.isInstallCustomQueryTokenizer());↵ | 12 | _prefs.setInstallCustomQueryTokenizer(↵ | |
13 | updatePreferenceState↵ | 13 | useCustomQTCheckBox.isSelected());↵ | |
14 | (); | 14 | _prefsManager.savePrefs(); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 40 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 12.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | IQueryTokenizerPreferenceBean _prefs = _prefsManager.getPreferences(); | 1 | IQueryTokenizerPreferenceBean _prefs = _prefsManager.getPreferences(); | ||||||||||||||||||
|
| 2 | _prefs.setRemoveMultiLineComments(removeMultiLineCommentCheckBox.isSelected()); | ||||||||||||||||||
2 | removeMultiLineCommentCheckBox.setSelected(_prefs.isRemoveMultiLineComments()); |
| | ||||||||||||||||||
|
| 3 | _prefs.setLineComment(lineCommentTextField.getText()); | ||||||||||||||||||
3 | lineCommentTextField.setText(_prefs.getLineComment()); |
| | ||||||||||||||||||
|
| 4 | _prefs.setStatementSeparator(statementSeparatorTextField.getText()); | ||||||||||||||||||
4 | statementSeparatorTextField.setText(_prefs.getStatementSeparator()); |
| | ||||||||||||||||||
5 | if (_showProcSep) | 5 | if (_showProcSep) | ||||||||||||||||||
|
| 6 | _prefs.setProcedureSeparator(procedureSeparatorTextField.getText()); | ||||||||||||||||||
6 | procedureSeparatorTextField.setText(_prefs.getProcedureSeparator()); |
| | ||||||||||||||||||
|
| 7 | _prefs.setInstallCustomQueryTokenizer(useCustomQTCheckBox.isSelected()); | ||||||||||||||||||
7 | useCustomQTCheckBox.setSelected(_prefs.isInstallCustomQueryTokenizer()); |
| | ||||||||||||||||||
8 | updatePreferenceState(); |
| 8 | _prefsManager.savePrefs(); |
Row | Violation |
---|---|
1 | Unmatched statement _prefs.setRemoveMultiLineComments(removeMultiLineCommentCheckBox.isSelected()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement removeMultiLineCommentCheckBox.setSelected(_prefs.isRemoveMultiLineComments()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement _prefs.setLineComment(lineCommentTextField.getText()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement lineCommentTextField.setText(_prefs.getLineComment()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement _prefs.setStatementSeparator(statementSeparatorTextField.getText()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement statementSeparatorTextField.setText(_prefs.getStatementSeparator()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched statement _prefs.setProcedureSeparator(procedureSeparatorTextField.getText()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement procedureSeparatorTextField.setText(_prefs.getProcedureSeparator()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
9 | Unmatched statement _prefs.setInstallCustomQueryTokenizer(useCustomQTCheckBox.isSelected()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
10 | Unmatched statement useCustomQTCheckBox.setSelected(_prefs.isInstallCustomQueryTokenizer()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
11 | Expression updatePreferenceState() is a void method call, and thus it cannot be parameterized |
12 | Expression _prefsManager.savePrefs() is a void method call, and thus it cannot be parameterized |
13 | Expression updatePreferenceState() is a void method call, and thus it cannot be parameterized |
14 | Expression _prefsManager.savePrefs() is a void method call, and thus it cannot be parameterized |