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: 6 | |||
1 | browserActions = new ActionSet(this,null,null,↵ | 1 | actions = new ActionSet(this,null,null,↵ | |
2 | cache.browserActionsURI);↵ | 2 | cache.actionsURI);↵ | |
3 | browserActions.load();↵ | 3 | actions.load();↵ | |
4 | VFSBrowser.getActionContext().addActionSet(browserActions);↵ | 4 | ↵ | |
5 | cache.cachedBrowserActionNames =↵ | 5 | cache.cachedActionNames =↵ | |
6 | browserActions.getCacheableActionNames();↵ | 6 | actions.getCacheableActionNames();↵ | |
7 | cache.cachedBrowserActionToggleFlags = new boolean[↵ | 7 | cache.cachedActionToggleFlags = new boolean[↵ | |
8 | cache.cachedBrowserActionNames.length];↵ | 8 | cache.cachedActionNames.length];↵ | |
9 | for(int i = 0;↵ | 9 | for(int i = 0;↵ | |
10 | i < cache.cachedBrowserActionNames.length;↵ | 10 | i < cache.cachedActionNames.length;↵ | |
11 | i++)↵ | 11 | i++)↵ | |
12 | {↵ | 12 | {↵ | |
13 | cache.cachedBrowserActionToggleFlags[i]↵ | 13 | cache.cachedActionToggleFlags[i]↵ | |
14 | = jEdit.getBooleanProperty(↵ | 14 | = jEdit.getBooleanProperty(↵ | |
15 | cache.cachedBrowserActionNames[i]↵ | 15 | cache.cachedActionNames[i]↵ | |
16 | + ".toggle");↵ | 16 | + ".toggle");↵ | |
17 | } | 17 |
| |
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 | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 4.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
59 | browserActions = new ActionSet(this, null, null, cache.browserActionsURI); |
| 52 | actions = new ActionSet(this, null, null, cache.actionsURI); | |||||||||||||||||
60 | browserActions.load(); |
| 53 | actions.load(); | |||||||||||||||||
61 | VFSBrowser.getActionContext().addActionSet(browserActions); | | |||||||||||||||||||
62 | cache.cachedBrowserActionNames = browserActions.getCacheableActionNames(); |
| 54 | cache.cachedActionNames = actions.getCacheableActionNames(); | |||||||||||||||||
63 | cache.cachedBrowserActionToggleFlags = new boolean[cache.cachedBrowserActionNames.length]; |
| 55 | cache.cachedActionToggleFlags = new boolean[cache.cachedActionNames.length]; | |||||||||||||||||
64 | for (int i = 0; i < cache.cachedBrowserActionNames.length; i++) |
| 56 | for (int i = 0; i < cache.cachedActionNames.length; i++) | |||||||||||||||||
65 | cache.cachedBrowserActionToggleFlags[i] = jEdit.getBooleanProperty(cache.cachedBrowserActionNames[i] + ".toggle"); |
| 57 | cache.cachedActionToggleFlags[i] = jEdit.getBooleanProperty(cache.cachedActionNames[i] + ".toggle"); |
Row | Violation |
---|---|
1 | Expression browserActions is a field being modified, and thus it cannot be parameterized |
2 | Expression actions is a field being modified, and thus it cannot be parameterized |
3 | Expression browserActions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression actions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression browserActions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression actions cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression cache.cachedBrowserActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression cache.cachedActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression cache.cachedBrowserActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression cache.cachedActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression cache.cachedBrowserActionToggleFlags cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression cache.cachedActionToggleFlags cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression cache.cachedBrowserActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression cache.cachedActionNames cannot be parameterized, because it has dependencies to/from statements that will be extracted |