File path: /jEdit-4.2/src/org/gjt/sp/jedit/ActionSet.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/ActionSet.java | |||
Method name: EditAction[] getActions()
|
Method name: String[] getActionNames()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | EditAction[] retVal = new EditAction[actions.size()];↵ | 1 | String[] retVal = new String[actions.size()];↵ | |
2 | Enumeration e = actions.elements();↵ | 2 | Enumeration e = actions.keys();↵ | |
3 | int i = 0;↵ | 3 | int i = 0;↵ | |
4 | while(e.hasMoreElements())↵ | 4 | while(e.hasMoreElements())↵ | |
5 | {↵ | 5 | {↵ | |
6 | retVal[i++] = (EditAction)e.nextElement();↵ | 6 | retVal[i++] = (String)e.nextElement();↵ | |
7 | }↵ | 7 | }↵ | |
8 | return retVal; | 8 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | String[] retVal = new String[actions.size()]; | ||||||||||||
2 | EditAction[] retVal = new EditAction[actions.size()]; | | ||||||||||||
3 | Enumeration e = actions.elements(); |
| 2 | Enumeration e = actions.keys(); | ||||||||||
4 | int i = 0; | 3 | int i = 0; | |||||||||||
5 | while (e.hasMoreElements()) | 4 | while (e.hasMoreElements()) | |||||||||||
|
| 5 | retVal[i++] = (String)e.nextElement(); | |||||||||||
6 | retVal[i++] = (EditAction)e.nextElement(); |
| | |||||||||||
|
| 6 | return retVal; | |||||||||||
7 | return retVal; |
| |
Row | Violation |
---|---|
1 | Unmatched statement retVal[i++]=(String)e.nextElement(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement retVal[i++]=(EditAction)e.nextElement(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched return retVal; |
4 | Unmatched return retVal; |
5 | Clone fragment #1 returns variables e, i , while Clone fragment #2 returns variables e, i |