this.specificationVendor = specificationVendor; if (null != specificationVersion) { try { this.specificationVersion = new DeweyDecimal(specificationVersion); } catch (final NumberFormatException nfe) { final String error = "Bad specification version format '" + specificationVersion + "' in '" + extensionName + "'. (Reason: " + nfe + ")"; throw new IllegalArgumentException(error); } } this.implementationURL = implementationURL; this.implementationVendor = implementationVendor;
this.specificationVendor = specificationVendor; if (null != specificationVersion) { try { this.specificationVersion = new DeweyDecimal(specificationVersion); } catch (final NumberFormatException nfe) { final String error = "Bad specification version format '" + specificationVersion + "' in '" + specificationTitle + "'. (Reason: " + nfe + ")"; throw new IllegalArgumentException(error); } } this.implementationTitle = implementationTitle; this.implementationVendor = implementationVendor;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Extension.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Specification.java
Method name: void Extension(String, String, String, String, String, String, String) Method name: void Specification(String, String, String, String, String, String, String[])
Number of AST nodes: 6 Number of AST nodes: 6
1
this.specificationVendor = specificationVendor;
1
this.specificationVendor = specificationVendor;
2
        if (null != specificationVersion) {
2
        if (null != specificationVersion) {
3
            try {
3
            try {
4
                this.specificationVersion
4
                this.specificationVersion
5
                    = new DeweyDecimal(specificationVersion);
5
                    = new DeweyDecimal(specificationVersion);
6
            } catch (final NumberFormatException nfe) {
6
            } catch (final NumberFormatException nfe) {
7
                final String error = "Bad specification version format '"
7
                final String error = "Bad specification version format '"
8
                    + specificationVersion + "' in '" + extensionName
8
                    + specificationVersion + "' in '" + specificationTitle
9
                    + "'. (Reason: " + nfe + ")";
9
                    + "'. (Reason: " + nfe + ")";
10
                throw new IllegalArgumentException(error);
10
                throw new IllegalArgumentException(error);
11
            }
11
            }
12
        }
12
        }
13
        this.implementationURL = implementationURL;
13
        this.implementationTitle = implementationTitle;
14
        this.implementationVendor = implementationVendor;
14
        this.implementationVendor = implementationVendor;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in different classes
Number of node comparisons11
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    this.specificationVendor = specificationVendor;
    2
    this.specificationVendor = specificationVendor;
    3
    if (null != specificationVersion)
    3
    if (null != specificationVersion)
    4
    try
    4
    try
    4
    try
    Differences
    Expression1Expression2Difference
    extensionNamespecificationTitleVARIABLE_NAME_MISMATCH
    4
    try
    5
    this.specificationVersion = new DeweyDecimal(specificationVersion);
    5
    this.specificationVersion = new DeweyDecimal(specificationVersion);
    6
    this.implementationURL = implementationURL;
    6
    this.implementationURL = implementationURL;
    6
    this.implementationTitle = implementationTitle;
    Differences
    Expression1Expression2Difference
    implementationURLimplementationTitleVARIABLE_NAME_MISMATCH
    implementationURLimplementationTitleVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.implementationURL is a field being modified, and thus it cannot be parameterized
    Expression this.implementationTitle is a field being modified, and thus it cannot be parameterized
    6
    this.implementationTitle = implementationTitle;
    7
    this.implementationVendor = implementationVendor;
    7
    this.implementationVendor = implementationVendor;
    Precondition Violations (2)
    Row Violation
    1Expression this.implementationURL is a field being modified, and thus it cannot be parameterized
    2Expression this.implementationTitle is a field being modified, and thus it cannot be parameterized