String getLabelResource() { return "runtime_controller_title"; // $NON-NLS-1$ } /** * Initialize the GUI components and layout for this component. */ private void init() { // The Loop Controller panel can be displayed standalone or inside // another panel. For standalone, we want to display the TITLE, NAME, // etc. (everything). However, if we want to display it within another // panel, we just display the Loop Count fields (not the TITLE and // NAME). // Standalone 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); } } /** * Create a GUI panel containing the components related to the number of * seconds which should be executed. * * @return a GUI panel containing the loop count components */ private JPanel createLoopCountPanel() { JPanel loopPanel = new JPanel(new BorderLayout(5, 0)); // SECONDS LABEL JLabel secondsLabel = new JLabel(JMeterUtils.getResString("runtime_seconds")); // $NON-NLS-1$ loopPanel.add(secondsLabel, BorderLayout.WEST); JPanel loopSubPanel = new JPanel(new BorderLayout(5, 0)); // TEXT FIELD seconds = new JTextField("1", 5)
String getLabelResource() { return "loop_controller_title"; // $NON-NLS-1$ } /** * Initialize the GUI components and layout for this component. */ private void init() { // The Loop Controller panel can be displayed standalone or inside // another panel. For standalone, we want to display the TITLE, NAME, // etc. (everything). However, if we want to display it within another // panel, we just display the Loop Count fields (not the TITLE and // NAME). // Standalone 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); } } /** * Create a GUI panel containing the components related to the number of * loops which should be executed. * * @return a GUI panel containing the loop count components */ private JPanel createLoopCountPanel() { JPanel loopPanel = new JPanel(new BorderLayout(5, 0)); // LOOP LABEL JLabel loopsLabel = new JLabel(JMeterUtils.getResString("iterator_num")); // $NON-NLS-1$ loopPanel.add(loopsLabel, BorderLayout.WEST); JPanel loopSubPanel = new JPanel(new BorderLayout(5, 0)); // TEXT FIELD loops = new JTextField("1", 5)
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/RunTimeGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/LoopControlPanel.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
String getLabelResource() {
1
String getLabelResource() {
2
		return "runtime_controller_title"; // $NON-NLS-1$
2
		return "loop_controller_title"; // $NON-NLS-1$
3
	}
3
	}
4
	/**
4
	/**
5
	 * Initialize the GUI components and layout for this component.
5
	 * Initialize the GUI components and layout for this component.
6
	 */
6
	 */
7
	private void init() {
7
	private void init() {
8
		// The Loop Controller panel can be displayed standalone or inside
8
		// The Loop Controller panel can be displayed standalone or inside
9
		// another panel. For standalone, we want to display the TITLE, NAME,
9
		// another panel. For standalone, we want to display the TITLE, NAME,
10
		// etc. (everything). However, if we want to display it within another
10
		// etc. (everything). However, if we want to display it within another
11
		// panel, we just display the Loop Count fields (not the TITLE and
11
		// panel, we just display the Loop Count fields (not the TITLE and
12
		// NAME).
12
		// NAME).
13
		// Standalone
13
		// Standalone
14
		if (displayName) {
14
		if (displayName) {
15
			setLayout(new BorderLayout(0, 5));
15
			setLayout(new BorderLayout(0, 5));
16
			setBorder(makeBorder());
16
			setBorder(makeBorder());
17
			add(makeTitlePanel(), BorderLayout.NORTH);
17
			add(makeTitlePanel(), BorderLayout.NORTH);
18
			JPanel mainPanel = new JPanel(new BorderLayout());
18
			JPanel mainPanel = new JPanel(new BorderLayout());
19
			mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH);
19
			mainPanel.add(createLoopCountPanel(), BorderLayout.NORTH);
20
			add(mainPanel, BorderLayout.CENTER);
20
			add(mainPanel, BorderLayout.CENTER);
21
		} else {
21
		} else {
22
			// Embedded
22
			// Embedded
23
			setLayout(new BorderLayout());
23
			setLayout(new BorderLayout());
24
			add(createLoopCountPanel(), BorderLayout.NORTH);
24
			add(createLoopCountPanel(), BorderLayout.NORTH);
25
		}
25
		}
26
	}
26
	}
27
	/**
27
	/**
28
	 * Create a GUI panel containing the components related to the number of
28
	 * Create a GUI panel containing the components related to the number of
29
	 * seconds which should be executed.
29
	 * loops which should be executed.
30
	 * 
30
	 * 
31
	 * @return a GUI panel containing the loop count components
31
	 * @return a GUI panel containing the loop count components
32
	 */
32
	 */
33
	private JPanel createLoopCountPanel() {
33
	private JPanel createLoopCountPanel() {
34
		JPanel loopPanel = new JPanel(new BorderLayout(5, 0));
34
		JPanel loopPanel = new JPanel(new BorderLayout(5, 0));
35
		// SECONDS LABEL
35
		// LOOP LABEL
36
		JLabel secondsLabel = new JLabel(JMeterUtils.getResString("runtime_seconds")); // $NON-NLS-1$
36
		JLabel loopsLabel = new JLabel(JMeterUtils.getResString("iterator_num")); // $NON-NLS-1$
37
		loopPanel.add(secondsLabel, BorderLayout.WEST);
37
		loopPanel.add(loopsLabel, BorderLayout.WEST);
38
		JPanel loopSubPanel = new JPanel(new BorderLayout(5, 0));
38
		JPanel loopSubPanel = new JPanel(new BorderLayout(5, 0));
39
		// TEXT FIELD
39
		// TEXT FIELD
40
		seconds = new JTextField("1", 5)
40
		loops = new JTextField("1", 5)
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0