String tip = null; final TreePath path = getPathForLocation(evt.getX(), evt.getY()); if (path != null) { tip = path.getLastPathComponent().toString(); } else { tip = super.getToolTipText(); } return tip;
String tip = null; final TreePath path = getPathForLocation(evt.getX(), evt.getY()); if (path != null) { tip = path.getLastPathComponent().toString(); } else { tip = getToolTipText(); } return tip;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/QueryTree.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTree.java
Method name: String getToolTipText(MouseEvent) Method name: String getToolTipText(MouseEvent)
Number of AST nodes: 6 Number of AST nodes: 6
1
String tip = null;
1
String tip = null;
2
		final TreePath path = getPathForLocation(evt.getX(), evt.getY());
2
		final TreePath path = getPathForLocation(evt.getX(), evt.getY());
3
		if (path != null) 
3
		if (path != null)
4
{
4
		{
5
			tip = path.getLastPathComponent().toString();
5
			tip = path.getLastPathComponent().toString();
6
		} 
6
		}
7
else 
7
		else
8
{
8
		{
9
			tip = super.getToolTipText();
9
			tip = getToolTipText();
10
		}
10
		}
11
		return tip;
11
		return tip;
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons18
  1. {Non-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)2.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    String tip = null;
    1
    String tip = null;
    2
    final TreePath path = getPathForLocation(evt.getX(), evt.getY());
    2
    final TreePath path = getPathForLocation(evt.getX(), evt.getY());
    3
    if (path != null)
    3
    if (path != null)
    4
    tip = path.getLastPathComponent().toString();
    4
    tip = path.getLastPathComponent().toString();
    else
    else
    5
    tip = super.getToolTipText();
    5
    tip = super.getToolTipText();
    5
    tip = getToolTipText();
    Differences
    Expression1Expression2Difference
    super.getToolTipText()getToolTipText()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Super method call tip=super.getToolTipText(); cannot be extracted from method
    5
    tip = getToolTipText();
    6
    return tip;
    6
    return tip;
    Precondition Violations (1)
    Row Violation
    1Super method call tip=super.getToolTipText(); cannot be extracted from method