if (displayName) {
setLayout(new BorderLayout(0, 5));
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
JPanel mainPanel = new JPanel(new BorderLayout());
mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH);
add(mainPanel, BorderLayout.CENTER);
} else {
// Embedded
setLayout(new BorderLayout());
add(createLoopCountPanel(), BorderLayout.NORTH);
}
setLayout(new BorderLayout(0, 5));
if (displayName) {
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
}
JPanel classnameRequestPanel = new JPanel(new BorderLayout(0, 5));
classnameRequestPanel.add(createClassnamePanel(), BorderLayout.NORTH);
classnameRequestPanel.add(createParameterPanel(), BorderLayout.CENTER);
add(classnameRequestPanel, BorderLayout.CENTER);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/LoopControlPanel.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java
|
Method name: void init()
|
|
Method name: void init()
|
Number of AST nodes: 9
|
|
Number of AST nodes: 8
|
|
1 | if (displayName) {↵ | | |
|
2 | setLayout(new BorderLayout(0, 5));
↵ | | 1 | setLayout(new BorderLayout(0, 5));
↵
|
|
| | | 2 | if (displayName) {
↵
|
3 | setBorder(makeBorder());↵ | | 3 | setBorder(makeBorder());↵
|
4 | add(makeTitlePanel(), BorderLayout.NORTH);↵ | | 4 | add(makeTitlePanel(), BorderLayout.NORTH);↵
|
| | | 5 | }↵
|
|
5 | JPanel mainPanel = new JPanel(new BorderLayout());↵ | | 6 | JPanel classnameRequestPanel = new JPanel(new BorderLayout(0, 5));↵
|
6 | mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH);↵ | | 7 | classnameRequestPanel.add(createClassnamePanel(), BorderLayout.NORTH);↵
|
7 | add(mainPanel, BorderLayout.CENTER);↵ | | 8 | classnameRequestPanel.add(createParameterPanel(), BorderLayout.CENTER);↵
|
8 | } else {↵ | | |
|
9 | // Embedded↵ | | 9 | ↵
|
10 | setLayout(new BorderLayout());↵ | | |
|
11 | add(createLoopCountPanel(), BorderLayout.NORTH);↵ | | 10 | add(classnameRequestPanel, BorderLayout.↵
|
12 | } | | 11 | CENTER);
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 27 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 6 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | setLayout(new BorderLayout(0, 5)); |
1 | if (displayName) | | 2 | if (displayName) |
2 | setLayout(new BorderLayout(0, 5)); | | | |
3 | | | 3 | |
4 | add(makeTitlePanel(), BorderLayout.NORTH); | | 4 | add(makeTitlePanel(), BorderLayout.NORTH); |
5 | JPanel mainPanel = new JPanel(new BorderLayout()); | | | |
6 | mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH); | | | |
7 | add(mainPanel, BorderLayout.CENTER); | | | |
| | | | |
8 | setLayout(new BorderLayout()); | | | |
9 | add(createLoopCountPanel(), BorderLayout.NORTH); | | | |
| | | 5 | JPanel classnameRequestPanel = new JPanel(new BorderLayout(0, 5)); |
| | | 6 | classnameRequestPanel.add(createClassnamePanel(), BorderLayout.NORTH); |
| | | 7 | classnameRequestPanel.add(createParameterPanel(), BorderLayout.CENTER); |
| | | 8 | add(classnameRequestPanel, BorderLayout.CENTER); |
Precondition Violations (0)
Row |
Violation |