File path: /jEdit-4.2/src/org/gjt/sp/jedit/ActionSet.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/JARClassLoader.java | |||
Method name: void removeAllActions()
|
Method name: void activate()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if(context != null)↵ | |||
2 | {↵ | |||
3 | context.actionNam↵ | 1 | String[] classes = jar.getClasses();↵ | |
4 | es = null;↵ | 2 | if(classes != null)↵ | |
5 | String[] actions = getActionNames();↵ | 3 | {↵ | |
6 | for(int i = 0; i < actions.length; i++)↵ | 4 | for(int i = 0; i < classes.length; i++)↵ | |
7 | {↵ | 5 | {↵ | |
8 | context.actionHash.remove(actions[i]);↵ | 6 | classHash.put(classes[i],this);↵ | |
9 | }↵ | 7 | }↵ | |
10 | } | 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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 7 |
Number of mapped statements | 3 |
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) | 1.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | String[] classes = jar.getClasses(); | ||||||||||||||||||||||
1 | if (context != null) |
| 2 | if (classes != null) | ||||||||||||||||||||
2 | context.actionNames = null; | | ||||||||||||||||||||||
3 | String[] actions = getActionNames(); | | ||||||||||||||||||||||
4 | for (int i = 0; i < actions.length; i++) |
| 3 | for (int i = 0; i < classes.length; i++) | ||||||||||||||||||||
5 | context.actionHash.remove(actions[i]); |
| 4 | classHash.put(classes[i], this); |
Row | Violation |
---|---|
1 | Type org.gjt.sp.jedit.ActionContext of variable context does not match with type java.lang.String[] of variable classes |
2 | Expression context.actionHash.remove(actions[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression classHash.put(classes[i],this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression context.actionHash.remove(actions[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression classHash.put(classes[i],this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |