File path: /jEdit-4.2/src/org/gjt/sp/jedit/PluginJAR.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/PluginJAR.java | |||
Method name: PluginCacheEntry generateCache()
|
Method name: PluginCacheEntry generateCache()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if(cache.actionsURI != null)↵ | |||
2 | {↵ | |||
3 | actions = new ActionSet(this,null,null,↵ | 1 | browserActions = new ActionSet(this,null,null,↵ | |
4 | cache.actionsURI);↵ | 2 | cache.browserActionsURI);↵ | |
5 | actions.load();↵ | 3 | browserActions.load();↵ | |
6 | ↵ | 4 | VFSBrowser.getActionContext().addActionSet(browserActions);↵ | |
7 | cache.cachedActionNames =↵ | 5 | cache.cachedBrowserActionNames =↵ | |
8 | actions.getCacheableActionNames();↵ | 6 | browserActions.getCacheableActionNames();↵ | |
9 | cache.cachedActionToggleFlags = new boolean[↵ | 7 | cache.cachedBrowserActionToggleFlags = new boolean[↵ | |
10 | cache.cachedActionNames.length];↵ | 8 | cache.cachedBrowserActionNames.length];↵ | |
11 | for(int i = 0; ↵ | 9 | for(int i = 0;↵ | |
12 | i < cache.cachedActionNames.length; ↵ | 10 | i < cache.cachedBrowserActionNames.length;↵ | |
13 | i++)↵ | 11 | i++)↵ | |
14 | {↵ | 12 | {↵ | |
15 | cache.cachedActionToggleFlags[i]↵ | 13 | cache.cachedBrowserActionToggleFlags[i]↵ | |
16 | = jEdit.getBooleanProperty(↵ | 14 | = jEdit.getBooleanProperty(↵ | |
17 | cache.cachedActionNames[i]↵ | 15 | cache.cachedBrowserActionNames[i]↵ | |
18 | + ".toggle");↵ | 16 | + ".toggle");↵ | |
19 | }↵ | 17 |
| |
20 | } | |||
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 18 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
52 | actions = new ActionSet(this, null, null, cache.actionsURI); |
| 59 | browserActions = new ActionSet(this, null, null, cache.browserActionsURI); | |||||||||||||||||
53 | actions.load(); |
| 60 | browserActions.load(); | |||||||||||||||||
| 61 | VFSBrowser.getActionContext().addActionSet(browserActions); | |||||||||||||||||||
54 | cache.cachedActionNames = actions.getCacheableActionNames(); |
| 62 | cache.cachedBrowserActionNames = browserActions.getCacheableActionNames(); | |||||||||||||||||
55 | cache.cachedActionToggleFlags = new boolean[cache.cachedActionNames.length]; |
| 63 | cache.cachedBrowserActionToggleFlags = new boolean[cache.cachedBrowserActionNames.length]; | |||||||||||||||||
56 | for (int i = 0; i < cache.cachedActionNames.length; i++) |
| 64 | for (int i = 0; i < cache.cachedBrowserActionNames.length; i++) | |||||||||||||||||
57 | cache.cachedActionToggleFlags[i] = jEdit.getBooleanProperty(cache.cachedActionNames[i] + ".toggle"); |
| 65 | cache.cachedBrowserActionToggleFlags[i] = jEdit.getBooleanProperty(cache.cachedBrowserActionNames[i] + ".toggle"); |
Row | Violation |
---|---|
1 | Expression actions is a field being modified, and thus it cannot be parameterized |
2 | Expression browserActions is a field being modified, and thus it cannot be parameterized |
3 | Expression actions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression browserActions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression actions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression browserActions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression cache.cachedActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression cache.cachedBrowserActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression cache.cachedActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression cache.cachedBrowserActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression cache.cachedActionToggleFlags cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression cache.cachedBrowserActionToggleFlags cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression cache.cachedActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression cache.cachedBrowserActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |