for (int i = 0; i < list.size(); i++) { Element e = (Element) list.get(i); if (e.getText().equals(category)) { // found category child.removeContent(e); } }
for (int i = 0; i < model.getSize(); i++) { AccountComboBoxItem item = (AccountComboBoxItem) model.getElementAt(i); if (item.getAccountID() == criteriaAccountUid) { accountComboBox.setSelectedIndex(i); break; } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/XCSDocumentParser.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/plugins/AccountCriteriaRow.java
Method name: void removeCategory(String) Method name: void updateComponents(boolean)
Number of AST nodes: 4 Number of AST nodes: 5
1
for (int i = 0; i < list.size(); i++) {
1
for (int i = 0; i < model.getSize(); i++) {
2
			Element e = (Element) list.get(i);
3
			if (e.getText().equals(category)) {
4
				// found category
5
				child.removeContent(e);
6
			}
7
		
2
                    AccountComboBoxItem item = (AccountComboBoxItem) model.getElementAt(i);
3
                    if (item.getAccountID() == criteriaAccountUid) {
4
                        accountComboBox.setSelectedIndex(i);
5
                        break;
6
                    }
8
}
7
                }
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.1
Clones locationClones are in different classes
Number of node comparisons1