File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/sampler/gui/TestActionGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/ThroughputControllerGui.java | |||
Method name: void init()
|
Method name: void init()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | DefaultComboBoxModel targetModel = new DefaultComboBoxModel();↵ | 1 | DefaultComboBoxModel styleModel = new DefaultComboBoxModel();↵ | |
2 | targetModel.addElement(threadTarget);↵ | 2 | styleModel.addElement(↵ | |
3 | target↵ | 3 | BYNUMBER_LABEL);↵ | |
4 | Model.addElement(testTarget);↵ | 4 | styleModel.addElement(↵ | |
5 | target↵ | 5 | BYPERCENT_LABEL);↵ | |
6 | Box = new JComboBox(targetModel);↵ | 6 | styleBox = new JComboBox(styleModel);↵ | |
7 | targetBox.addActionListener(new ActionListener() {↵ | 7 | styleBox.addActionListener(new ActionListener() {↵ | |
8 | public void actionPerformed(ActionEvent e) {↵ | 8 | public void actionPerformed(ActionEvent e) {↵ | |
9 | if (((String) targetBox.getSelectedItem()).equals(threadTarget)) {↵ | 9 | if (((String) styleBox.getSelectedItem()).equals(↵ | |
10 | target = TestAction.THREAD;↵ | |||
11 | } else {↵ | |||
12 | target = TestAction.TES↵ | 10 | BYNUMBER_LABEL)) {↵ | |
11 | style = ThroughputController.BYNUMBER;↵ | |||
12 | } else {↵ | |||
13 | T;↵ | 13 | style = ThroughputController.BYPERCENT;↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | }); | 16 |
| |
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 | 18 |
Number of mapped statements | 5 |
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 | |||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | DefaultComboBoxModel targetModel = new DefaultComboBoxModel(); |
| 4 | DefaultComboBoxModel styleModel = new DefaultComboBoxModel(); | ||||||||||||||||||||||||||||||||||||||||||||||
7 | targetModel.addElement(threadTarget); |
| 5 | styleModel.addElement(BYNUMBER_LABEL); | ||||||||||||||||||||||||||||||||||||||||||||||
8 | targetModel.addElement(testTarget); |
| 6 | styleModel.addElement(BYPERCENT_LABEL); | ||||||||||||||||||||||||||||||||||||||||||||||
9 | targetBox = new JComboBox(targetModel); |
| 7 | styleBox = new JComboBox(styleModel); | ||||||||||||||||||||||||||||||||||||||||||||||
10 | targetBox.addActionListener(new ActionListener() {...}); |
| 8 | styleBox.addActionListener(new ActionListener() {...}); |
Row | Violation |
---|---|
1 | Expression targetBox is a field being modified, and thus it cannot be parameterized |
2 | Expression styleBox is a field being modified, and thus it cannot be parameterized |
3 | Expression targetBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression styleBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression target cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression style cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression target is a field being modified, and thus it cannot be parameterized |
8 | Expression style is a field being modified, and thus it cannot be parameterized |
9 | Expression target cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression style cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression target is a field being modified, and thus it cannot be parameterized |
12 | Expression style is a field being modified, and thus it cannot be parameterized |
13 | Expression targetBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression styleBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |