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: String[] getActionNames()
|
Method name: EditAction[] getActions()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 7 | |||
1 | String↵ | 1 | load();↵ | |
2 | [] retVal = new String[actions.size()];↵ | 2 | EditAction[] retVal = new EditAction[actions.size()];↵ | |
3 | Enumeration e = actions.keys();↵ | 3 | Enumeration e = actions.elements();↵ | |
4 | int i = 0;↵ | 4 | int i = 0;↵ | |
5 | while(e.hasMoreElements())↵ | 5 | while(e.hasMoreElements())↵ | |
6 | {↵ | 6 | {↵ | |
7 | retVal[i++] = (String)e.nextElement();↵ | 7 | retVal[i++] = (EditAction)e.nextElement();↵ | |
8 | }↵ | 8 | }↵ | |
9 | return retVal; | 9 |
| |
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 | 24 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | load(); | ||||||||||||
1 | String[] retVal = new String[actions.size()]; | | ||||||||||||
| 2 | EditAction[] retVal = new EditAction[actions.size()]; | ||||||||||||
2 | Enumeration e = actions.keys(); |
| 3 | Enumeration e = actions.elements(); | ||||||||||
3 | int i = 0; | 4 | int i = 0; | |||||||||||
4 | while (e.hasMoreElements()) | 5 | 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 |