File path: /jEdit-4.2/src/bsh/NameSpace.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/View.java | |||
Method name: String[] getAllNames()
|
Method name: EditPane[] getEditPanes()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Vector vec = new Vector();↵ | 1 | Vector vec = new Vector();↵ | |
2 | getAllNamesAux( vec );↵ | 2 | get↵ | |
3 | String [] names = new String [ ↵ | 3 | EditPanes(vec,splitPane);↵ | |
4 | vec.size() ];↵ | 4 | EditPane[] ep = new EditPane[vec.size()];↵ | |
5 | vec.copyInto( names );↵ | 5 | vec.copyInto(ep);↵ | |
6 | return names; | 6 | return ep; | |
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 | 13 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Vector vec = new Vector(); | 4 | Vector vec = new Vector(); | ||||||||||||||||||||||
2 | getAllNamesAux(vec); |
| 5 | getEditPanes(vec, splitPane); | |||||||||||||||||||||
3 | String[] names = new String[vec.size()]; |
| | ||||||||||||||||||||||
|
| 6 | EditPane[] ep = new EditPane[vec.size()]; | ||||||||||||||||||||||
4 | vec.copyInto(names); |
| 7 | vec.copyInto(ep); | |||||||||||||||||||||
5 | return names; |
| | ||||||||||||||||||||||
|
| 8 | return ep; |
Row | Violation |
---|---|
1 | Expression getAllNamesAux(vec) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getEditPanes(vec,splitPane) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression getAllNamesAux(vec) is a void method call, and thus it cannot be parameterized |
4 | Expression getEditPanes(vec,splitPane) is a void method call, and thus it cannot be parameterized |
5 | Expression getAllNamesAux(vec) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression getEditPanes(vec,splitPane) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression getAllNamesAux(vec) is a void method call, and thus it cannot be parameterized |
8 | Expression getEditPanes(vec,splitPane) is a void method call, and thus it cannot be parameterized |
9 | Unmatched statement String[] names=new String[vec.size()]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
10 | Unmatched statement EditPane[] ep=new EditPane[vec.size()]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
11 | Type java.lang.String[] of variable names does not match with type org.gjt.sp.jedit.EditPane[] of variable ep |
12 | Unmatched return names; |
13 | Unmatched return ep; |