if (!(src instanceof JTabbedPane)) { StringBuilder buf = new StringBuilder(); buf.append("Source object in TabbedPaneListener was not a JTabbedpane") .append(" - it was ") .append(src == null ? "null" : src.getClass().getName()); s_log.error(buf.toString()); return; }
if (!(prop instanceof ObjectTreeTabbedPane)) { StringBuilder buf = new StringBuilder(); buf.append("Client property in JTabbedPane was not an ObjectTreeTabbedPane") .append(" - it was ") .append(prop == null ? "null" : prop.getClass().getName()); s_log.error(buf.toString()); return; }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTreePanel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTreePanel.java
Method name: void stateChanged(ChangeEvent) Method name: void stateChanged(ChangeEvent)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (!(src instanceof JTabbedPane))
1
if (!(prop instanceof ObjectTreeTabbedPane))
2
			{
2
			{
3
				StringBuilder buf = new StringBuilder();
3
				StringBuilder buf = new StringBuilder();
4
				buf.append("Source object in TabbedPaneListener was not a JTabbedpane")
4
				buf.append("Client property in JTabbedPane was not an ObjectTreeTabbedPane")
5
					.append(" - it was ")
5
					.append(" - it was ")
6
					.append(src == null ? "null" : src.getClass().getName());
6
					.append(prop == null ? "null" : prop.getClass().getName());
7
				s_log.error(buf.toString());
7
				s_log.error(buf.toString());
8
				return;
8
				return;
9
			}
9
			}
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.2
Clones locationClones are in the same method
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (!(src instanceof JTabbedPane))
    2
    if (!(src instanceof JTabbedPane))
    9
    if (!(prop instanceof ObjectTreeTabbedPane))
    Differences
    Expression1Expression2Difference
    srcpropVARIABLE_NAME_MISMATCH
    javax.swing.JTabbedPanenet.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeTabbedPaneVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type javax.swing.JTabbedPane does not match with type net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeTabbedPane
    • Make classes javax.swing.JTabbedPane and net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeTabbedPane extend a common superclass
    9
    if (!(prop instanceof ObjectTreeTabbedPane))
    3
    StringBuilder buf = new StringBuilder();
    10
    StringBuilder buf = new StringBuilder();
    4
    buf.append("Source object in TabbedPaneListener was not a JTabbedpane").append(" - it was ").append(src == null ? "null" : src.getClass().getName());
    4
    buf.append("Source object in TabbedPaneListener was not a JTabbedpane").append(" - it was ").append(src == null ? "null" : src.getClass().getName());
    11
    buf.append("Client property in JTabbedPane was not an ObjectTreeTabbedPane").append(" - it was ").append(prop == null ? "null" : prop.getClass().getName());
    Differences
    Expression1Expression2Difference
    srcpropVARIABLE_NAME_MISMATCH
    srcpropVARIABLE_NAME_MISMATCH
    "Source object in TabbedPaneListener was not a JTabbedpane""Client property in JTabbedPane was not an ObjectTreeTabbedPane"LITERAL_VALUE_MISMATCH
    11
    buf.append("Client property in JTabbedPane was not an ObjectTreeTabbedPane").append(" - it was ").append(prop == null ? "null" : prop.getClass().getName());
    5
    s_log.error(buf.toString());
    12
    s_log.error(buf.toString());
    6
    return;
    6
    return;
    13
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    13
    return;
    Precondition Violations (3)
    Row Violation
    1Type javax.swing.JTabbedPane does not match with type net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeTabbedPane
    2Conditional return;
    3Conditional return;