JButton button = new JButton(JMeterUtils.getResString(resName));
button.setMnemonic(mnemonic);
button.setActionCommand(command);
button.setEnabled(enabled);
button.addActionListener(this);
return button;
JButton button = new JButton(JMeterUtils.getResString(resName));
button.setMnemonic(mnemonic);
button.setActionCommand(command);
button.setEnabled(enabled);
button.addActionListener(this);
return button;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/gui/CookiePanel.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
|
Method name: JButton createButton(String, char, String, boolean)
|
|
Method name: JButton createButton(String, char, String, boolean)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | JButton button = new JButton(JMeterUtils.getResString(resName));↵ | | 1 | JButton button = new JButton(JMeterUtils.getResString(resName));↵
|
2 | button.setMnemonic(mnemonic);↵ | | 2 | button.setMnemonic(mnemonic);↵
|
3 | button.setActionCommand(command);↵ | | 3 | button.setActionCommand(command);↵
|
4 | button.setEnabled(enabled);↵ | | 4 | button.setEnabled(enabled);↵
|
5 | button.addActionListener(this);↵ | | 5 | button.addActionListener(this);↵
|
6 | return button; | | 6 | return button;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | JButton button = new JButton(JMeterUtils.getResString(resName)); | | 1 | JButton button = new JButton(JMeterUtils.getResString(resName)); |
2 | button.setMnemonic(mnemonic); | | 2 | button.setMnemonic(mnemonic); |
3 | button.setActionCommand(command); | | 3 | button.setActionCommand(command); |
4 | button.setEnabled(enabled); | | 4 | button.setEnabled(enabled); |
5 | button.addActionListener(this); | | 5 | button.addActionListener(this); |
6 | return button; | | 6 | return button; |
Precondition Violations (0)
Row |
Violation |