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);
}
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);
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/ForeachControlPanel.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/RunTimeGui.java
|
Method name: void init()
|
|
Method name: void init()
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | if (displayName) {↵ | | 1 | if (displayName) {↵
|
2 | setLayout(new BorderLayout(0, 5));↵ | | 2 | setLayout(new BorderLayout(0, 5));↵
|
3 | setBorder(makeBorder());↵ | | 3 | setBorder(makeBorder());↵
|
4 | add(makeTitlePanel(), BorderLayout.NORTH);↵ | | 4 | add(makeTitlePanel(), BorderLayout.NORTH);↵
|
|
5 | JPanel mainPanel = new JPanel(new BorderLayout());↵ | | 5 | JPanel mainPanel = new JPanel(new BorderLayout());↵
|
6 | mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH);↵ | | 6 | mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH);↵
|
7 | add(mainPanel, BorderLayout.CENTER);↵ | | 7 | add(mainPanel, BorderLayout.CENTER);↵
|
8 | } else {↵ | | 8 | } else {↵
|
9 | // Embedded↵ | | 9 | // Embedded↵
|
10 | setLayout(new BorderLayout());↵ | | 10 | setLayout(new BorderLayout());↵
|
11 | add(createLoopCountPanel(), BorderLayout.NORTH);↵ | | 11 | add(createLoopCountPanel(), BorderLayout.NORTH);↵
|
12 | } | | 12 | }
|
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 | 81 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 4.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (displayName) | | 1 | if (displayName) |
2 | setLayout(new BorderLayout(0, 5)); | | 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()); | | 5 | JPanel mainPanel = new JPanel(new BorderLayout()); |
6 | mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH); | | 6 | mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH); |
7 | add(mainPanel, BorderLayout.CENTER); | | 7 | add(mainPanel, BorderLayout.CENTER); |
| | | | |
8 | setLayout(new BorderLayout()); | | 8 | setLayout(new BorderLayout()); |
9 | add(createLoopCountPanel(), BorderLayout.NORTH); | | 9 | add(createLoopCountPanel(), BorderLayout.NORTH); |
Precondition Violations (0)
Row |
Violation |