File path: /jEdit-4.2/src/bsh/Reflect.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/ActionSet.java | |||
Method name: Method resolveJavaMethod(BshClassManager, Class, String, Class[], boolean)
|
Method name: void removeAllActions()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | while( c != null )↵ | 1 | if(context != null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | Method [] m↵ | 3 | context.actionNames = null;↵ | |
4 | = c.getDeclaredMethods();↵ | 4 | String[] actions = getActionNames();↵ | |
5 | for(int i=0; i<m.length; i++)↵ | 5 | for(int i = 0; i < actions.length; i++)↵ | |
6 | mv.add( m[i] );↵ | 6 | ↵ | |
7 | c = c.getSuperclass(↵ | 7 | {↵ | |
8 | );↵ | 8 | context.actionHash.remove(actions[i]);↵ | |
9 | } | 9 | }↵ | |
10 |
| |||
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | context.actionNames = null; | ||||||||||||||||
| 3 | String[] actions = getActionNames(); | ||||||||||||||||
17 | Method[] m = c.getDeclaredMethods(); |
| | |||||||||||||||
18 | for (int i = 0; i < m.length; i++) |
| 4 | for (int i = 0; i < actions.length; i++) | ||||||||||||||
|
| 5 | context.actionHash.remove(actions[i]); | |||||||||||||||
19 | mv.add(m[i]); |
| |
Row | Violation |
---|---|
1 | Unmatched statement Method[] m=c.getDeclaredMethods(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Type java.lang.reflect.Method[] of variable m does not match with type java.lang.String[] of variable actions |
3 | Unmatched statement context.actionHash.remove(actions[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement mv.add(m[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |