_txtComp.getEditor().addFocusListener(new FocusListener()
{
public void focusGained(FocusEvent e)
{
//System.out.println("################editor.focusGained " + _txtComp.getEditor());
onFocusGained(e);
}
public void focusLost(FocusEvent e)
{
//System.out.println("################editor.focusLost " + _txtComp.getEditor());
onFocusLost(e);
}
});
_txtComp.getFilter().addFocusListener(new FocusListener()
{
public void focusGained(FocusEvent e)
{
//System.out.println("################filter.focusGained");
onFocusGained(e);
}
public void focusLost(FocusEvent e)
{
//System.out.println("################filter.focusLost");
onFocusLost(e);
}
});
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/completion/CompletionFocusHandler.java
|
|
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/completion/CompletionFocusHandler.java
|
Method name: void CompletionFocusHandler(TextComponentProvider, JList)
|
|
Method name: void CompletionFocusHandler(TextComponentProvider, JList)
|
Number of AST nodes: 1
|
|
Number of AST nodes: 1
|
|
1 | _txtComp.getEditor().addFocusListener(new FocusListener()↵ | | 1 | _txtComp.getFilter().addFocusListener(new FocusListener()↵
|
2 | {↵ | | 2 | {↵
|
3 | public void focusGained(FocusEvent e)↵ | | 3 | public void focusGained(FocusEvent e)↵
|
4 | {↵ | | 4 | {↵
|
5 | //System.out.println("################editor.focusGained " + _txtComp.getEditor());↵ | | 5 | //System.out.println("################filter.focusGained");↵
|
6 | onFocusGained(e);↵ | | 6 | onFocusGained(e);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | public void focusLost(FocusEvent e)↵ | | 8 | public void focusLost(FocusEvent e)↵
|
9 | {↵ | | 9 | {↵
|
10 | //System.out.println("################editor.focusLost " + _txtComp.getEditor());↵ | | 10 | //System.out.println("################filter.focusLost");↵
|
11 | onFocusLost(e);↵ | | 11 | onFocusLost(e);↵
|
12 | }↵ | | 12 | }↵
|
13 | }); | | 13 | });
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 1 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
8 | _txtComp.getEditor().addFocusListener(new FocusListener() {...}); | | 9 | _txtComp.getFilter().addFocusListener(new FocusListener() {...}); |
Precondition Violations (0)
Row |
Violation |