/**
* Notify all registered change listeners that the text in the text field
* has changed.
*/
private void notifyChangeListeners() {
ChangeEvent ce = new ChangeEvent(this);
for (int index = 0; index < mChangeListeners.size(); index++) {
mChangeListeners.get(index).stateChanged(ce);
}
}
private void fireFileChanged() {
Iterator<ChangeListener> iter = listeners.iterator();
while (iter.hasNext()) {
iter.next().stateChanged(new ChangeEvent(this));
}
}
Clone fragments detected by clone detection tool
File path: /apache-jmeter-2.11/src/jorphan/org/apache/jorphan/gui/JLabeledTextArea.java
|
|
File path: /apache-jmeter-2.11/src/reports/org/apache/jmeter/gui/util/DirectoryPanel.java
|
Method name: void notifyChangeListeners()
|
|
Method name: void fireFileChanged()
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | /**
| | 1 | private void fireFileChanged() {
|
2 | * Notify all registered change listeners that the text in the text field
| | 2 | Iterator<ChangeListener> iter = listeners.iterator();
|
3 | * has changed.
| | 3 | while (iter.hasNext()) {
|
4 | */
| | 4 | iter.next().stateChanged(new ChangeEvent(this));
|
5 | private void notifyChangeListeners() {
| | 5 | }
|
6 | ChangeEvent ce = new ChangeEvent(this);
| | 6 | } |
7 | for (int index = 0; index < mChangeListeners.size(); index++) {
| | | |
8 | mChangeListeners.get(index).stateChanged(ce);
| | | |
9 | }
| | | |
10 | } | | | |
See real code fragment |
|
See real code fragment |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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 |
Similarity Score | 0.500 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | for (int index = 0; index < mChangeListeners.size(); index++) | | 2 | while (iter.hasNext()) |
| | | 3 | iter.next().stateChanged(new ChangeEvent(this)); |
3 | mChangeListeners.get(index).stateChanged(ce); | | | |
Precondition Violations (0)
Row |
Violation |