Completion[] completions
= getCompletions(buffer,word,
caret);
if(completions.length == 0)
{
dispose();
return;
}
words.setListData(completions);
words.setSelectedIndex(0);
words.setVisibleRowCount(Math.min(completions.length,8));
Completion[] completions = getCompletions(
buffer,word,caret);
if(completions.length == 0)
{
dispose();
return;
}
words.setListData(completions);
words.setSelectedIndex(0);
words.setVisibleRowCount(Math.min(completions.length,8));
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/CompleteWord.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/CompleteWord.java
|
Method name: void keyPressed(KeyEvent)
|
|
Method name: void keyTyped(KeyEvent)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | Completion[] completions↵ | | 1 | Completion[] completions↵
|
2 | = getCompletions(↵ | | 2 | = getCompletions(↵
|
3 | buffer,word,↵ | | 3 | buffer,word,↵
|
4 | caret);↵ | | 4 | caret);↵
|
|
5 | if(completions.length == 0)↵ | | 5 | if(completions.length == 0)↵
|
6 | {↵ | | 6 | {↵
|
7 | dispose();↵ | | 7 | dispose();↵
|
8 | return;↵ | | 8 | return;↵
|
9 | }↵ | | 9 | }↵
|
|
10 | words.setListData(completions);↵ | | 10 | words.setListData(completions);↵
|
11 | words.setSelectedIndex(0);↵ | | 11 | words.setSelectedIndex(0);↵
|
12 | words.setVisibleRowCount(Math.min(completions.length,8)); | | 12 | words.setVisibleRowCount(Math.min(completions.length,8));
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
41 | Completion[] completions = getCompletions(buffer, word, caret); | | 25 | Completion[] completions = getCompletions(buffer, word, caret); |
42 | if (completions.length == 0) | | 26 | if (completions.length == 0) |
43 | | | 27 | |
44 | | | 28 | |
45 | words.setListData(completions); | | 29 | words.setListData(completions); |
46 | words.setSelectedIndex(0); | | 30 | words.setSelectedIndex(0); |
47 | words.setVisibleRowCount(Math.min(completions.length, 8)); | | 31 | words.setVisibleRowCount(Math.min(completions.length, 8)); |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |