File path: /jEdit-4.2/src/org/gjt/sp/jedit/search/HyperSearchResults.java | File path: /jEdit-4.2/src/installer/SwingInstall.java | |||
Method name: void keyPressed(KeyEvent)
|
Method name: void advance(int)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | goToSelectedNode();↵ | |||
2 | // fuck me dead↵ | |||
3 | SwingUtilities.invokeLater(new Runnable()↵ | 1 | SwingUtilities.invokeAndWait(new Runnable()↵ | |
4 | {↵ | 2 | {↵ | |
5 | public void run()↵ | 3 | public void run()↵ | |
6 | {↵ | 4 | {↵ | |
7 | resultTree.requestFocus(↵ | 5 | progress.setValue(progress↵ | |
8 | );↵ | 6 | .getValue() + value);↵ | |
9 | }↵ | 7 | }↵ | |
10 | });↵ | 8 | });↵ | |
11 | evt.consume(); | 9 | Thread.yield(); | |
See real code fragment | See real code fragment |
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 | 6 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | goToSelectedNode(); |
| 2 | SwingUtilities.invokeAndWait(new Runnable() {...}); | ||||||||||||||||||||
3 | SwingUtilities.invokeLater(new Runnable() {...}); | | ||||||||||||||||||||||
4 | evt.consume(); |
| 3 | Thread.yield(); |
Row | Violation |
---|---|
1 | Expression goToSelectedNode() is a void method call, and thus it cannot be parameterized |
2 | Expression SwingUtilities.invokeAndWait(new Runnable(){ public void run(){ progress.setValue(progress.getValue() + value); } } ) is a void method call, and thus it cannot be parameterized |
3 | Expression goToSelectedNode() is a void method call, and thus it cannot be parameterized |
4 | Expression SwingUtilities.invokeAndWait(new Runnable(){ public void run(){ progress.setValue(progress.getValue() + value); } } ) is a void method call, and thus it cannot be parameterized |
5 | Expression evt.consume() is a void method call, and thus it cannot be parameterized |
6 | Expression Thread.yield() is a void method call, and thus it cannot be parameterized |
7 | Type java.awt.event.KeyEvent of variable evt does not match with type java.lang.Thread of variable Thread |