workCityTextField.setText(m.getCity()); workCountryTextField.setText(m.getCountry()); workPOBoxTextField.setText(m.getPoBox()); workStateProvinceCountyTextField .setText(m.getStateProvinceCounty()); workZipPostalCodeTextField.setText(m.getZipPostalCode()); workAddressTextArea.setText(m.getLabel()); workStreetTextField.setText(m.getStreet());
if (m.getType() == AddressModel.TYPE_OTHER) { otherCityTextField.setText(m.getCity()); otherCountryTextField.setText(m.getCountry()); otherPOBoxTextField.setText(m.getPoBox()); otherStateProvinceCountyTextField.setText(m .getStateProvinceCounty()); otherZipPostalCodeTextField.setText(m.getZipPostalCode()); otherAddressTextArea.setText(m.getLabel()); otherStreetTextField.setText(m.getStreet()); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/ContactEditorDialog.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/contact/ContactEditorDialog.java
Method name: void fillAddressView(AddressModel) Method name: void fillAddressView(AddressModel)
Number of AST nodes: 7 Number of AST nodes: 8
1
work
1
if (m.getType() == AddressModel.TYPE_OTHER) {
2
CityTextField.setText(m.getCity());
2
			otherCityTextField.setText(m.getCity());
3
			workCountryTextField.setText(m.getCountry());
3
			otherCountryTextField.setText(m.getCountry());
4
			workPOBoxTextField.setText(m.getPoBox());
4
			otherPOBoxTextField.setText(m.getPoBox());
5
			workStateProvinceCountyTextField
5
			otherStateProvinceCountyTextField
6
					.setText(m
6
.setText(m
7
.getStateProvinceCounty());
7
					.getStateProvinceCounty());
8
			workZipPostalCodeTextField.setText(m.getZipPostalCode());
8
			otherZipPostalCodeTextField.setText(m.getZipPostalCode());
9
			workAddressTextArea.setText(m.getLabel());
9
			otherAddressTextArea.setText(m.getLabel());
10
			workStreetTextField.setText(m.getStreet());
10
			otherStreetTextField.setText(m.getStreet());
11
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in the same method
Number of node comparisons49
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    workCityTextField.setText(m.getCity());
    2
    workCityTextField.setText(m.getCity());
    18
    otherCityTextField.setText(m.getCity());
    Differences
    Expression1Expression2Difference
    workCityTextFieldotherCityTextFieldVARIABLE_NAME_MISMATCH
    18
    otherCityTextField.setText(m.getCity());
    3
    workCountryTextField.setText(m.getCountry());
    3
    workCountryTextField.setText(m.getCountry());
    19
    otherCountryTextField.setText(m.getCountry());
    Differences
    Expression1Expression2Difference
    workCountryTextFieldotherCountryTextFieldVARIABLE_NAME_MISMATCH
    19
    otherCountryTextField.setText(m.getCountry());
    4
    workPOBoxTextField.setText(m.getPoBox());
    4
    workPOBoxTextField.setText(m.getPoBox());
    20
    otherPOBoxTextField.setText(m.getPoBox());
    Differences
    Expression1Expression2Difference
    workPOBoxTextFieldotherPOBoxTextFieldVARIABLE_NAME_MISMATCH
    20
    otherPOBoxTextField.setText(m.getPoBox());
    5
    workStateProvinceCountyTextField.setText(m.getStateProvinceCounty());
    5
    workStateProvinceCountyTextField.setText(m.getStateProvinceCounty());
    21
    otherStateProvinceCountyTextField.setText(m.getStateProvinceCounty());
    Differences
    Expression1Expression2Difference
    workStateProvinceCountyTextFieldotherStateProvinceCountyTextFieldVARIABLE_NAME_MISMATCH
    21
    otherStateProvinceCountyTextField.setText(m.getStateProvinceCounty());
    6
    workZipPostalCodeTextField.setText(m.getZipPostalCode());
    6
    workZipPostalCodeTextField.setText(m.getZipPostalCode());
    22
    otherZipPostalCodeTextField.setText(m.getZipPostalCode());
    Differences
    Expression1Expression2Difference
    workZipPostalCodeTextFieldotherZipPostalCodeTextFieldVARIABLE_NAME_MISMATCH
    22
    otherZipPostalCodeTextField.setText(m.getZipPostalCode());
    7
    workAddressTextArea.setText(m.getLabel());
    7
    workAddressTextArea.setText(m.getLabel());
    23
    otherAddressTextArea.setText(m.getLabel());
    Differences
    Expression1Expression2Difference
    workAddressTextAreaotherAddressTextAreaVARIABLE_NAME_MISMATCH
    23
    otherAddressTextArea.setText(m.getLabel());
    8
    workStreetTextField.setText(m.getStreet());
    8
    workStreetTextField.setText(m.getStreet());
    24
    otherStreetTextField.setText(m.getStreet());
    Differences
    Expression1Expression2Difference
    workStreetTextFieldotherStreetTextFieldVARIABLE_NAME_MISMATCH
    24
    otherStreetTextField.setText(m.getStreet());
    Precondition Violations (0)
    Row Violation