File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuBar.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/JMeterMenuBar.java | |||
Method name: JMenu makeLanguageMenu()
|
Method name: JMenu makeLanguageMenu()
|
|||
Number of AST nodes: 42 | Number of AST nodes: 42 | |||
1 | JMenu languageMenu = new JMenu(JMeterUtils.getResString("choose_language"));↵ | 1 | JMenu languageMenu = new JMenu(JMeterUtils.getResString("choose_language")); //$NON-NLS-1$↵ | |
2 | languageMenu.setMnemonic('C');↵ | 2 | languageMenu.setMnemonic('C');↵ | |
3 | // add english↵ | 3 | // add english↵ | |
4 | JMenuItem english = new JMenuItem(JMeterUtils.getResString("en"), 'E');↵ | 4 | JMenuItem english = new JMenuItem(JMeterUtils.getResString("en"), 'E'); //$NON-NLS-1$↵ | |
5 | english.addActionListener(ReportActionRouter.getInstance());↵ | 5 | english.addActionListener(ActionRouter.getInstance());↵ | |
6 | english.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | 6 | english.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | |
7 | english.setName(Locale.ENGLISH.getLanguage());↵ | 7 | english.setName(Locale.ENGLISH.getLanguage());↵ | |
8 | languageMenu.add(english);↵ | 8 | languageMenu.add(english);↵ | |
9 | // add Japanese↵ | 9 | // add Japanese↵ | |
10 | JMenuItem japanese = new JMenuItem(JMeterUtils.getResString("jp"), 'J');↵ | 10 | JMenuItem japanese = new JMenuItem(JMeterUtils.getResString("jp"), 'J'); //$NON-NLS-1$↵ | |
11 | japanese.addActionListener(ReportActionRouter.getInstance());↵ | 11 | japanese.addActionListener(ActionRouter.getInstance());↵ | |
12 | japanese.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | 12 | japanese.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | |
13 | japanese.setName(Locale.JAPANESE.getLanguage());↵ | 13 | japanese.setName(Locale.JAPANESE.getLanguage());↵ | |
14 | languageMenu.add(japanese);↵ | 14 | languageMenu.add(japanese);↵ | |
15 | // add Norwegian↵ | 15 | // add Norwegian↵ | |
16 | JMenuItem norway = new JMenuItem(JMeterUtils.getResString("no"), 'N');↵ | 16 | JMenuItem norway = new JMenuItem(JMeterUtils.getResString("no"), 'N'); //$NON-NLS-1$↵ | |
17 | norway.addActionListener(ReportActionRouter.getInstance());↵ | 17 | norway.addActionListener(ActionRouter.getInstance());↵ | |
18 | norway.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | 18 | norway.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | |
19 | norway.setName("no"); // No default for Norwegian↵ | 19 | norway.setName("no"); // No default for Norwegian↵ | |
20 | languageMenu.add(norway);↵ | 20 | languageMenu.add(norway);↵ | |
21 | // add German↵ | 21 | // add German↵ | |
22 | JMenuItem german = new JMenuItem(JMeterUtils.getResString("de"), 'G');↵ | 22 | JMenuItem german = new JMenuItem(JMeterUtils.getResString("de"), 'G'); //$NON-NLS-1$↵ | |
23 | german.addActionListener(ReportActionRouter.getInstance());↵ | 23 | german.addActionListener(ActionRouter.getInstance());↵ | |
24 | german.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | 24 | german.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | |
25 | german.setName(Locale.GERMAN.getLanguage());↵ | 25 | german.setName(Locale.GERMAN.getLanguage());↵ | |
26 | languageMenu.add(german);↵ | 26 | languageMenu.add(german);↵ | |
27 | // add French↵ | 27 | // add French↵ | |
28 | JMenuItem french = new JMenuItem(JMeterUtils.getResString("fr"), 'F');↵ | 28 | JMenuItem french = new JMenuItem(JMeterUtils.getResString("fr"), 'F'); //$NON-NLS-1$↵ | |
29 | french.addActionListener(ReportActionRouter.getInstance());↵ | 29 | french.addActionListener(ActionRouter.getInstance());↵ | |
30 | french.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | 30 | french.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | |
31 | french.setName(Locale.FRENCH.getLanguage());↵ | 31 | french.setName(Locale.FRENCH.getLanguage());↵ | |
32 | languageMenu.add(french);↵ | 32 | languageMenu.add(french);↵ | |
33 | // add chinese (simple)↵ | 33 | // add chinese (simple)↵ | |
34 | JMenuItem chineseSimple = new JMenuItem(JMeterUtils.getResString("zh_cn"));↵ | 34 | JMenuItem chineseSimple = new JMenuItem(JMeterUtils.getResString("zh_cn")); //$NON-NLS-1$↵ | |
35 | chineseSimple.addActionListener(ReportActionRouter.getInstance());↵ | 35 | chineseSimple.addActionListener(ActionRouter.getInstance());↵ | |
36 | chineseSimple.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | 36 | chineseSimple.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | |
37 | chineseSimple.setName(Locale.SIMPLIFIED_CHINESE.toString());↵ | 37 | chineseSimple.setName(Locale.SIMPLIFIED_CHINESE.toString());↵ | |
38 | languageMenu.add(chineseSimple);↵ | 38 | languageMenu.add(chineseSimple);↵ | |
39 | // add chinese (traditional)↵ | 39 | // add chinese (traditional)↵ | |
40 | JMenuItem chineseTrad = new JMenuItem(JMeterUtils.getResString("zh_TW"));↵ | 40 | JMenuItem chineseTrad = new JMenuItem(JMeterUtils.getResString("zh_tw")); //$NON-NLS-1$↵ | |
41 | chineseTrad.addActionListener(ReportActionRouter.getInstance());↵ | 41 | chineseTrad.addActionListener(ActionRouter.getInstance());↵ | |
42 | chineseTrad.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | 42 | chineseTrad.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | |
43 | chineseTrad.setName(Locale.TRADITIONAL_CHINESE.toString());↵ | 43 | chineseTrad.setName(Locale.TRADITIONAL_CHINESE.toString());↵ | |
44 | languageMenu.add(chineseTrad);↵ | 44 | languageMenu.add(chineseTrad);↵ | |
45 | // add spanish↵ | 45 | // add spanish↵ | |
46 | JMenuItem spanish = new JMenuItem(JMeterUtils.getResString("es"));↵ | 46 | JMenuItem spanish = new JMenuItem(JMeterUtils.getResString("es")); //$NON-NLS-1$↵ | |
47 | spanish.addActionListener(ReportActionRouter.getInstance());↵ | 47 | spanish.addActionListener(ActionRouter.getInstance());↵ | |
48 | spanish.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | 48 | spanish.setActionCommand(ActionNames.CHANGE_LANGUAGE);↵ | |
49 | spanish.setName("es");↵ | 49 | spanish.setName("es"); //$NON-NLS-1$↵ | |
50 | languageMenu.add(spanish); | 50 |
| |
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 having the same super class |
Number of node comparisons | 728 |
Number of mapped statements | 42 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | JMenu languageMenu = new JMenu(JMeterUtils.getResString("choose_language")); | 1 | JMenu languageMenu = new JMenu(JMeterUtils.getResString("choose_language")); | ||||||||||||||||||
2 | languageMenu.setMnemonic('C'); | 2 | languageMenu.setMnemonic('C'); | ||||||||||||||||||
3 | JMenuItem english = new JMenuItem(JMeterUtils.getResString("en"), 'E'); | 3 | JMenuItem english = new JMenuItem(JMeterUtils.getResString("en"), 'E'); | ||||||||||||||||||
4 | english.addActionListener(ReportActionRouter.getInstance()); |
| 4 | english.addActionListener(ActionRouter.getInstance()); | |||||||||||||||||
5 | english.setActionCommand(ActionNames.CHANGE_LANGUAGE); | 5 | english.setActionCommand(ActionNames.CHANGE_LANGUAGE); | ||||||||||||||||||
6 | english.setName(Locale.ENGLISH.getLanguage()); | 6 | english.setName(Locale.ENGLISH.getLanguage()); | ||||||||||||||||||
7 | languageMenu.add(english); | 7 | languageMenu.add(english); | ||||||||||||||||||
8 | JMenuItem japanese = new JMenuItem(JMeterUtils.getResString("jp"), 'J'); | 8 | JMenuItem japanese = new JMenuItem(JMeterUtils.getResString("jp"), 'J'); | ||||||||||||||||||
9 | japanese.addActionListener(ReportActionRouter.getInstance()); |
| 9 | japanese.addActionListener(ActionRouter.getInstance()); | |||||||||||||||||
10 | japanese.setActionCommand(ActionNames.CHANGE_LANGUAGE); | 10 | japanese.setActionCommand(ActionNames.CHANGE_LANGUAGE); | ||||||||||||||||||
11 | japanese.setName(Locale.JAPANESE.getLanguage()); | 11 | japanese.setName(Locale.JAPANESE.getLanguage()); | ||||||||||||||||||
12 | languageMenu.add(japanese); | 12 | languageMenu.add(japanese); | ||||||||||||||||||
13 | JMenuItem norway = new JMenuItem(JMeterUtils.getResString("no"), 'N'); | 13 | JMenuItem norway = new JMenuItem(JMeterUtils.getResString("no"), 'N'); | ||||||||||||||||||
14 | norway.addActionListener(ReportActionRouter.getInstance()); |
| 14 | norway.addActionListener(ActionRouter.getInstance()); | |||||||||||||||||
15 | norway.setActionCommand(ActionNames.CHANGE_LANGUAGE); | 15 | norway.setActionCommand(ActionNames.CHANGE_LANGUAGE); | ||||||||||||||||||
16 | norway.setName("no"); | 16 | norway.setName("no"); | ||||||||||||||||||
17 | languageMenu.add(norway); | 17 | languageMenu.add(norway); | ||||||||||||||||||
18 | JMenuItem german = new JMenuItem(JMeterUtils.getResString("de"), 'G'); | 18 | JMenuItem german = new JMenuItem(JMeterUtils.getResString("de"), 'G'); | ||||||||||||||||||
19 | german.addActionListener(ReportActionRouter.getInstance()); |
| 19 | german.addActionListener(ActionRouter.getInstance()); | |||||||||||||||||
20 | german.setActionCommand(ActionNames.CHANGE_LANGUAGE); | 20 | german.setActionCommand(ActionNames.CHANGE_LANGUAGE); | ||||||||||||||||||
21 | german.setName(Locale.GERMAN.getLanguage()); | 21 | german.setName(Locale.GERMAN.getLanguage()); | ||||||||||||||||||
22 | languageMenu.add(german); | 22 | languageMenu.add(german); | ||||||||||||||||||
23 | JMenuItem french = new JMenuItem(JMeterUtils.getResString("fr"), 'F'); | 23 | JMenuItem french = new JMenuItem(JMeterUtils.getResString("fr"), 'F'); | ||||||||||||||||||
24 | french.addActionListener(ReportActionRouter.getInstance()); |
| 24 | french.addActionListener(ActionRouter.getInstance()); | |||||||||||||||||
25 | french.setActionCommand(ActionNames.CHANGE_LANGUAGE); | 25 | french.setActionCommand(ActionNames.CHANGE_LANGUAGE); | ||||||||||||||||||
26 | french.setName(Locale.FRENCH.getLanguage()); | 26 | french.setName(Locale.FRENCH.getLanguage()); | ||||||||||||||||||
27 | languageMenu.add(french); | 27 | languageMenu.add(french); | ||||||||||||||||||
28 | JMenuItem chineseSimple = new JMenuItem(JMeterUtils.getResString("zh_cn")); | 28 | JMenuItem chineseSimple = new JMenuItem(JMeterUtils.getResString("zh_cn")); | ||||||||||||||||||
29 | chineseSimple.addActionListener(ReportActionRouter.getInstance()); |
| 29 | chineseSimple.addActionListener(ActionRouter.getInstance()); | |||||||||||||||||
30 | chineseSimple.setActionCommand(ActionNames.CHANGE_LANGUAGE); | 30 | chineseSimple.setActionCommand(ActionNames.CHANGE_LANGUAGE); | ||||||||||||||||||
31 | chineseSimple.setName(Locale.SIMPLIFIED_CHINESE.toString()); | 31 | chineseSimple.setName(Locale.SIMPLIFIED_CHINESE.toString()); | ||||||||||||||||||
32 | languageMenu.add(chineseSimple); | 32 | languageMenu.add(chineseSimple); | ||||||||||||||||||
33 | JMenuItem chineseTrad = new JMenuItem(JMeterUtils.getResString("zh_TW")); |
| 33 | JMenuItem chineseTrad = new JMenuItem(JMeterUtils.getResString("zh_tw")); | |||||||||||||||||
34 | chineseTrad.addActionListener(ReportActionRouter.getInstance()); |
| 34 | chineseTrad.addActionListener(ActionRouter.getInstance()); | |||||||||||||||||
35 | chineseTrad.setActionCommand(ActionNames.CHANGE_LANGUAGE); | 35 | chineseTrad.setActionCommand(ActionNames.CHANGE_LANGUAGE); | ||||||||||||||||||
36 | chineseTrad.setName(Locale.TRADITIONAL_CHINESE.toString()); | 36 | chineseTrad.setName(Locale.TRADITIONAL_CHINESE.toString()); | ||||||||||||||||||
37 | languageMenu.add(chineseTrad); | 37 | languageMenu.add(chineseTrad); | ||||||||||||||||||
38 | JMenuItem spanish = new JMenuItem(JMeterUtils.getResString("es")); | 38 | JMenuItem spanish = new JMenuItem(JMeterUtils.getResString("es")); | ||||||||||||||||||
39 | spanish.addActionListener(ReportActionRouter.getInstance()); |
| 39 | spanish.addActionListener(ActionRouter.getInstance()); | |||||||||||||||||
40 | spanish.setActionCommand(ActionNames.CHANGE_LANGUAGE); | 40 | spanish.setActionCommand(ActionNames.CHANGE_LANGUAGE); | ||||||||||||||||||
41 | spanish.setName("es"); | 41 | spanish.setName("es"); | ||||||||||||||||||
42 | languageMenu.add(spanish); | 42 | languageMenu.add(spanish); |
Row | Violation |
---|---|
1 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
2 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
3 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
6 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
7 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
10 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
11 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
14 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
15 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
18 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
19 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
22 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
23 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
26 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |
27 | Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
29 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() |
30 | Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter |