File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/SizeAssertionGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/PropertyControlGui.java | |||
Method name: void init()
|
Method name: void init()
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | JPanel p = this;↵ | |||
1 | setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));↵ | 2 | setLayout(new BorderLayout(0, 5));↵ | |
2 | setBorder(makeBorder());↵ | 3 | setBorder(makeBorder());↵ | |
3 | add(makeTitlePanel());↵ | 4 | add(makeTitlePanel()↵ | |
4 | // USER_INPUT↵ | |||
5 | JPanel sizePanel = new JPanel();↵ | |||
6 | sizePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),↵ | |||
7 | getSizeAttributesTitle↵ | 5 | , BorderLayout.NORTH);↵ | |
6 | p = new JPanel();↵ | |||
8 | ()));↵ | 7 | p.setLayout(new BorderLayout());↵ | |
9 | sizePanel.add(new JLabel(JMeterUtils.getResString("size_assertion_label"))); //$NON-NLS-1$↵ | 8 | ↵ | |
10 | size = new JTextField(5);↵ | |||
11 | size.addFocusLis↵ | 9 | p.add(makeLabelPanel(), BorderLayout.NORTH);↵ | |
10 | p.add(makeMainPanel(), BorderLayout.CENTER);↵ | |||
11 | // Force a minimum table height of 70 pixels↵ | |||
12 | tener(this);↵ | 12 | p.add(Box.createVer↵ | |
13 | sizePanel.add(size);↵ | |||
14 | sizePanel.add(createComparatorButtonPanel());↵ | |||
15 | add(sizePanel↵ | 13 | ticalStrut(70), BorderLayout.WEST);↵ | |
14 | //p.add(makeButtonPanel(), BorderLayout.SOUTH);↵ | |||
15 | add(p, BorderLayout.CENTER);↵ | |||
16 | ); | 16 | table.revalidate(); | |
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 | 99 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP)); |
| 4 | add(makeTitlePanel(), BorderLayout.NORTH); | |||||||||||||||||||||||||||||
2 | setBorder(makeBorder()); | 3 | setBorder(makeBorder()); | ||||||||||||||||||||||||||||||
3 | add(makeTitlePanel()); | | |||||||||||||||||||||||||||||||
4 | JPanel sizePanel = new JPanel(); |
| 1 | JPanel p = this; | |||||||||||||||||||||||||||||
| 2 | setLayout(new BorderLayout(0, 5)); | |||||||||||||||||||||||||||||||
5 | sizePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), getSizeAttributesTitle())); |
| 7 | p.add(makeLabelPanel(), BorderLayout.NORTH); | |||||||||||||||||||||||||||||
6 | sizePanel.add(new JLabel(JMeterUtils.getResString("size_assertion_label"))); | | |||||||||||||||||||||||||||||||
7 | size = new JTextField(5); |
| 5 | p = new JPanel(); | |||||||||||||||||||||||||||||
|
| 6 | p.setLayout(new BorderLayout()); | ||||||||||||||||||||||||||||||
8 | size.addFocusListener(this); |
| 8 | p.add(makeMainPanel(), BorderLayout.CENTER); | |||||||||||||||||||||||||||||
| 9 | p.add(Box.createVerticalStrut(70), BorderLayout.WEST); | |||||||||||||||||||||||||||||||
9 | sizePanel.add(size); | | |||||||||||||||||||||||||||||||
| 10 | add(p, BorderLayout.CENTER); | |||||||||||||||||||||||||||||||
10 | sizePanel.add(createComparatorButtonPanel()); | | |||||||||||||||||||||||||||||||
| 11 | table.revalidate(); | |||||||||||||||||||||||||||||||
11 | add(sizePanel); | |
Row | Violation |
---|---|
1 | Expression setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP)) is a void method call, and thus it cannot be parameterized |
2 | Expression add(makeTitlePanel(),BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
3 | Expression setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP)) is a void method call, and thus it cannot be parameterized |
4 | Expression add(makeTitlePanel(),BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
5 | Expression sizePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),getSizeAttributesTitle())) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression p.add(makeLabelPanel(),BorderLayout.NORTH) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression sizePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),getSizeAttributesTitle())) is a void method call, and thus it cannot be parameterized |
8 | Expression p.add(makeLabelPanel(),BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
9 | Expression sizePanel cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression p cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression sizePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),getSizeAttributesTitle())) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression p.add(makeLabelPanel(),BorderLayout.NORTH) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression sizePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),getSizeAttributesTitle())) is a void method call, and thus it cannot be parameterized |
14 | Expression p.add(makeLabelPanel(),BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
15 | Expression p cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression size is a field being modified, and thus it cannot be parameterized |
17 | Unmatched statement p.setLayout(new BorderLayout()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
18 | Expression size.addFocusListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression p.add(makeMainPanel(),BorderLayout.CENTER) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression size.addFocusListener(this) is a void method call, and thus it cannot be parameterized |
21 | Expression p.add(makeMainPanel(),BorderLayout.CENTER) is a void method call, and thus it cannot be parameterized |
22 | Expression size cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression p cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Expression size.addFocusListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression p.add(makeMainPanel(),BorderLayout.CENTER) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Expression size.addFocusListener(this) is a void method call, and thus it cannot be parameterized |
27 | Expression p.add(makeMainPanel(),BorderLayout.CENTER) is a void method call, and thus it cannot be parameterized |