void focusLost(FocusEvent pFocusEvent) { // Compare if the value has changed, since we received focus. if (!oldValue.equals(mTextField.getText())) { notifyChangeListeners(); } } /** * Catch what the value was when focus was gained. */ public void focusGained(FocusEvent pFocusEvent) { oldValue = mTextField.getText(); }
void focusLost(FocusEvent pFocusEvent) { // Compare if the value has changed, since we received focus. if (!oldValue.equals(mTextArea.getText())) { notifyChangeListeners(); } } /** * Catch what the value was when focus was gained. */ public void focusGained(FocusEvent pFocusEvent) { oldValue = mTextArea.getText(); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledTextField.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledTextArea.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void focusLost(FocusEvent pFocusEvent) {
1
void focusLost(FocusEvent pFocusEvent) {
2
		// Compare if the value has changed, since we received focus.
2
		// Compare if the value has changed, since we received focus.
3
		if (!oldValue.equals(mTextField.getText())) {
3
		if (!oldValue.equals(mTextArea.getText())) {
4
			notifyChangeListeners();
4
			notifyChangeListeners();
5
		}
5
		}
6
	}
6
	}
7
	/**
7
	/**
8
	 * Catch what the value was when focus was gained.
8
	 * Catch what the value was when focus was gained.
9
	 */
9
	 */
10
	public void focusGained(FocusEvent pFocusEvent) {
10
	public void focusGained(FocusEvent pFocusEvent) {
11
		oldValue = mTextField.getText();
11
		oldValue = mTextArea.getText();
12
	}
12
	}
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