File path: /jEdit-4.2/src/bsh/NameSpace.java | File path: /jEdit-4.2/src/bsh/NameSpace.java | |||
Method name: String[] enumerationToStringArray(Enumeration)
|
Method name: String[] getAllNames()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | Vector v = new Vector();↵ | 1 | Vector vec = new Vector();↵ | |
2 | while ( e.hasMoreElements() )↵ | 2 | ↵ | |
3 | v.addElement( e.nextElement() );↵ | 3 | getAllNamesAux( vec );↵ | |
4 | String [] sa = new String [ v.size() ];↵ | 4 | String [] names = new String [ vec.size() ];↵ | |
5 | v.copyInto( sa );↵ | 5 | vec.copyInto( names );↵ | |
6 | return sa; | 6 | return names; | |
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 declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Vector v = new Vector(); |
| 1 | Vector vec = new Vector(); | |||||||||||||
|
| 2 | getAllNamesAux(vec); | ||||||||||||||
2 | while (e.hasMoreElements()) | | |||||||||||||||
3 | v.addElement(e.nextElement()); |
| | ||||||||||||||
4 | String[] sa = new String[v.size()]; |
| 3 | String[] names = new String[vec.size()]; | |||||||||||||
5 | v.copyInto(sa); |
| 4 | vec.copyInto(names); | |||||||||||||
6 | return sa; |
| 5 | return names; |
Row | Violation |
---|---|
1 | Unmatched statement getAllNamesAux(vec); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement v.addElement(e.nextElement()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |