_tree.expandPath(path); _tree.scrollPathToVisible(path); _tree.setSelectionPath(path);
if (newNodePath != null) { _tree.makeVisible(newNodePath); _tree.expandPath(newNodePath); _tree.startEditingAtPath(newNodePath); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/HelpViewerWindow.java File path: /sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/NewSavedQueriesFolderCommand.java
Method name: void selectTreeNodeForURL(URL) Method name: void execute()
Number of AST nodes: 3 Number of AST nodes: 4
1
_tree.expandPath(path);
2
				_tree.scrollPathToVisible(path);
3
				_tree.setSelectionPath(path);
1
if (newNodePath != null) {
2
				_tree.makeVisible(newNodePath);
3
				_tree.expandPath(newNodePath);
4
				_tree.startEditingAtPath(newNodePath);
5
			}
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.0
Clones locationClones are in different classes
Number of node comparisons9
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    _tree.expandPath(path);
    10
    _tree.expandPath(path);
    22
    _tree.expandPath(newNodePath);
    Differences
    Expression1Expression2Difference
    pathnewNodePathVARIABLE_NAME_MISMATCH
    javax.swing.JTreenet.sourceforge.squirrel_sql.plugins.favs.QueryTreeSUBCLASS_TYPE_MISMATCH
    22
    _tree.expandPath(newNodePath);
    11
    _tree.scrollPathToVisible(path);
    11
    _tree.scrollPathToVisible(path);
    21
    _tree.makeVisible(newNodePath);
    Differences
    Expression1Expression2Difference
    pathnewNodePathVARIABLE_NAME_MISMATCH
    scrollPathToVisiblemakeVisibleMETHOD_INVOCATION_NAME_MISMATCH
    javax.swing.JTreenet.sourceforge.squirrel_sql.plugins.favs.QueryTreeSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression _tree.scrollPathToVisible(path) is a void method call, and thus it cannot be parameterized
    Expression _tree.makeVisible(newNodePath) is a void method call, and thus it cannot be parameterized
    21
    _tree.makeVisible(newNodePath);
    12
    _tree.setSelectionPath(path);
    12
    _tree.setSelectionPath(path);
    23
    _tree.startEditingAtPath(newNodePath);
    Differences
    Expression1Expression2Difference
    pathnewNodePathVARIABLE_NAME_MISMATCH
    setSelectionPathstartEditingAtPathMETHOD_INVOCATION_NAME_MISMATCH
    javax.swing.JTreenet.sourceforge.squirrel_sql.plugins.favs.QueryTreeSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression _tree.setSelectionPath(path) is a void method call, and thus it cannot be parameterized
    Expression _tree.startEditingAtPath(newNodePath) is a void method call, and thus it cannot be parameterized
    23
    _tree.startEditingAtPath(newNodePath);
    Precondition Violations (4)
    Row Violation
    1Expression _tree.scrollPathToVisible(path) is a void method call, and thus it cannot be parameterized
    2Expression _tree.makeVisible(newNodePath) is a void method call, and thus it cannot be parameterized
    3Expression _tree.setSelectionPath(path) is a void method call, and thus it cannot be parameterized
    4Expression _tree.startEditingAtPath(newNodePath) is a void method call, and thus it cannot be parameterized