super.paintComponent(g);
super.paintBorder(g);
paintGraphComponents(g);
super.paintChildren(g);
Arrays.sort(completions);
completionInfos.addAll(0,Arrays.asList(completions));
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/plugins/codecompletion/src/net/sourceforge/squirrel_sql/plugins/codecompletion/CodeCompletionInfoCollection.java
|
Method name: void paint(Graphics)
|
|
Method name: boolean addCompletionsAtListBegin(String, String, CodeCompletionInfo[])
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | super.paintComponent(g);↵ | | |
|
2 | super.paintBorder(g);↵ | | |
|
|
3 | paintGraphComponents(g↵ | | 1 | Arrays.sort(completions);↵
|
4 | );↵ | | 2 | completionInfos.addAll(0,Arrays.asList(completions));↵
|
|
5 | super.paintChildren(g); | | 3 | return true;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 12 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super.paintComponent(g); | | 4 | Arrays.sort(completions); |
2 | super.paintBorder(g); | | | |
3 | paintGraphComponents(g); | | | |
4 | super.paintChildren(g); | | | |
| | | 5 | completionInfos.addAll(0, Arrays.asList(completions)); |
| | | 6 | return true; |
Precondition Violations (4)
Row |
Violation |
1 | Expression super.paintComponent(g) is a void method call, and thus it cannot be parameterized |
2 | Expression Arrays.sort(completions) is a void method call, and thus it cannot be parameterized |
3 | Super method call super.paintComponent(g); cannot be extracted from method |
4 | Unmatched return true; |