if (data == null) { throw new IllegalArgumentException("SyntaxStyle==null"); } if (_reservedWordStyle != data) { final SyntaxStyle oldValue = _reservedWordStyle; _reservedWordStyle = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.RESERVED_WORD_STYLE, oldValue, _reservedWordStyle); }
if (data == null) { throw new IllegalArgumentException("SyntaxStyle==null"); } if (_columnStyle != data) { final SyntaxStyle oldValue = _columnStyle; _columnStyle = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.COLUMN_STYLE, oldValue, _columnStyle); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/SyntaxPreferences.java File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/SyntaxPreferences.java
Method name: void setReservedWordStyle(SyntaxStyle) Method name: void setColumnStyle(SyntaxStyle)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (data == null)
1
if (data == null)
2
		{
2
		{
3
			throw new IllegalArgumentException("SyntaxStyle==null");
3
			throw new IllegalArgumentException("SyntaxStyle==null");
4
		}
4
		}
5
		if (_reservedWordStyle != data)
5
		if (_columnStyle != data)
6
		{
6
		{
7
			final SyntaxStyle oldValue = _reservedWordStyle;
7
			final SyntaxStyle oldValue = _
8
			_reservedWord
8
columnStyle;
9
Style = data;
9
			_columnStyle = data;
10
			getPropertyChangeReporter().firePropertyChange(IPropertyNames.RESERVED_WORD_STYLE,
10
			getPropertyChangeReporter().firePropertyChange(IPropertyNames.COLUMN_STYLE,
11
				oldValue, _reservedWordStyle);
11
				oldValue, _columnStyle);
12
		}
12
		}
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.3
Clones locationClones are declared in the same class
Number of node comparisons22
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (data == null)
    1
    if (data == null)
    2
    throw new IllegalArgumentException("SyntaxStyle==null");
    2
    throw new IllegalArgumentException("SyntaxStyle==null");
    3
    if (_reservedWordStyle != data)
    3
    if (_reservedWordStyle != data)
    3
    if (_columnStyle != data)
    Differences
    Expression1Expression2Difference
    _reservedWordStyle_columnStyleVARIABLE_NAME_MISMATCH
    3
    if (_columnStyle != data)
    4
    final SyntaxStyle oldValue = _reservedWordStyle;
    4
    final SyntaxStyle oldValue = _reservedWordStyle;
    4
    final SyntaxStyle oldValue = _columnStyle;
    Differences
    Expression1Expression2Difference
    _reservedWordStyle_columnStyleVARIABLE_NAME_MISMATCH
    4
    final SyntaxStyle oldValue = _columnStyle;
    5
    _reservedWordStyle = data;
    5
    _reservedWordStyle = data;
    5
    _columnStyle = data;
    Differences
    Expression1Expression2Difference
    _reservedWordStyle_columnStyleVARIABLE_NAME_MISMATCH
    5
    _columnStyle = data;
    6
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.RESERVED_WORD_STYLE, oldValue, _reservedWordStyle);
    6
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.RESERVED_WORD_STYLE, oldValue, _reservedWordStyle);
    6
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.COLUMN_STYLE, oldValue, _columnStyle);
    Differences
    Expression1Expression2Difference
    RESERVED_WORD_STYLECOLUMN_STYLEVARIABLE_NAME_MISMATCH
    _reservedWordStyle_columnStyleVARIABLE_NAME_MISMATCH
    6
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.COLUMN_STYLE, oldValue, _columnStyle);
    Precondition Violations (0)
    Row Violation