if (data == null) { throw new IllegalArgumentException("SyntaxStyle==null"); } if (_tableStyle != data) { final SyntaxStyle oldValue = _tableStyle; _tableStyle = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.TABLE_STYLE, oldValue, _tableStyle); }
if (data == null) { throw new IllegalArgumentException("SyntaxStyle==null"); } if (_whiteSpaceStyle != data) { final SyntaxStyle oldValue = _whiteSpaceStyle; _whiteSpaceStyle = data; getPropertyChangeReporter().firePropertyChange(IPropertyNames.WHITE_SPACE_STYLE, oldValue, _whiteSpaceStyle); }
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 setTableStyle(SyntaxStyle) Method name: void setWhiteSpaceStyle(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 (_tableStyle != data)
5
		if (_whiteSpaceStyle != data)
6
		{
6
		{
7
			final SyntaxStyle oldValue = _tableStyle;
7
			final SyntaxStyle oldValue = _whiteSpaceStyle;
8
			_tableStyle = data;
8
			_whiteSpaceStyle = data;
9
			getPropertyChangeReporter().firePropertyChange(IPropertyNames.TABLE_STYLE,
9
			getPropertyChangeReporter().firePropertyChange(IPropertyNames.WHITE_SPACE_STYLE,
10
				oldValue, _tableStyle);
10
				oldValue, _whiteSpaceStyle);
11
		}
11
		}
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.7
    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 (_tableStyle != data)
    3
    if (_tableStyle != data)
    3
    if (_whiteSpaceStyle != data)
    Differences
    Expression1Expression2Difference
    _tableStyle_whiteSpaceStyleVARIABLE_NAME_MISMATCH
    3
    if (_whiteSpaceStyle != data)
    4
    final SyntaxStyle oldValue = _tableStyle;
    4
    final SyntaxStyle oldValue = _tableStyle;
    4
    final SyntaxStyle oldValue = _whiteSpaceStyle;
    Differences
    Expression1Expression2Difference
    _tableStyle_whiteSpaceStyleVARIABLE_NAME_MISMATCH
    4
    final SyntaxStyle oldValue = _whiteSpaceStyle;
    5
    _tableStyle = data;
    5
    _tableStyle = data;
    5
    _whiteSpaceStyle = data;
    Differences
    Expression1Expression2Difference
    _tableStyle_whiteSpaceStyleVARIABLE_NAME_MISMATCH
    5
    _whiteSpaceStyle = data;
    6
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.TABLE_STYLE, oldValue, _tableStyle);
    6
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.TABLE_STYLE, oldValue, _tableStyle);
    6
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.WHITE_SPACE_STYLE, oldValue, _whiteSpaceStyle);
    Differences
    Expression1Expression2Difference
    TABLE_STYLEWHITE_SPACE_STYLEVARIABLE_NAME_MISMATCH
    _tableStyle_whiteSpaceStyleVARIABLE_NAME_MISMATCH
    6
    getPropertyChangeReporter().firePropertyChange(IPropertyNames.WHITE_SPACE_STYLE, oldValue, _whiteSpaceStyle);
    Precondition Violations (0)
    Row Violation