super.paintComponent(g); super.paintBorder(g); paintGraphComponents(g); super.paintChildren(g);
_tree.setSelectionPath(treePath); _tree.scrollPathToVisible(treePath); return true;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/GraphDesktopPane.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTreePanel.java
Method name: void paint(Graphics) Method name: boolean selectInObjectTree(String, String, FilterMatcher)
Number of AST nodes: 4 Number of AST nodes: 3
1
super.paintComponent(g);
2
      super.paintBorder(g);
3
      paintGraphComponents(g
1
_tree.setSelectionPath(treePath);
4
);
2
         _tree.scrollPathToVisible(treePath);
5
      super.paintChildren(g);
3
         return true;
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    super.paintComponent(g);
    1
    super.paintComponent(g);
    5
    _tree.setSelectionPath(treePath);
    Differences
    Expression1Expression2Difference
    super.paintComponent(g)_tree.setSelectionPath(treePath)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression super.paintComponent(g) is a void method call, and thus it cannot be parameterized
    Expression _tree.setSelectionPath(treePath) is a void method call, and thus it cannot be parameterized
    Super method call super.paintComponent(g); cannot be extracted from method
    5
    _tree.setSelectionPath(treePath);
    2
    super.paintBorder(g);
    2
    super.paintBorder(g);
    6
    _tree.scrollPathToVisible(treePath);
    Differences
    Expression1Expression2Difference
    super.paintBorder(g)_tree.scrollPathToVisible(treePath)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression super.paintBorder(g) is a void method call, and thus it cannot be parameterized
    Expression _tree.scrollPathToVisible(treePath) is a void method call, and thus it cannot be parameterized
    Super method call super.paintBorder(g); cannot be extracted from method
    6
    _tree.scrollPathToVisible(treePath);
    3
    paintGraphComponents(g);
                                                          
    4
    super.paintChildren(g);
                                                        
                                  
    7
    return true;
    Preondition Violations
    Unmatched return true;
    7
    return true;
    Precondition Violations (8)
    Row Violation
    1Expression super.paintComponent(g) is a void method call, and thus it cannot be parameterized
    2Expression _tree.setSelectionPath(treePath) is a void method call, and thus it cannot be parameterized
    3Super method call super.paintComponent(g); cannot be extracted from method
    4Expression super.paintBorder(g) is a void method call, and thus it cannot be parameterized
    5Expression _tree.scrollPathToVisible(treePath) is a void method call, and thus it cannot be parameterized
    6Super method call super.paintBorder(g); cannot be extracted from method
    7Unmatched return true;
    8The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.graph.GraphDesktopPane and net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreePanel do not have a common superclass