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); } }
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); } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Specification.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Extension.java
Method name: void Specification(String, String, String, String, String, String, String[]) Method name: void Extension(String, String, String, String, String, String, String)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (null != specificationVersion) {
1
if (null != specificationVersion) {
2
            try {
2
            try {
3
                this.specificationVersion
3
                this.specificationVersion
4
                    = new DeweyDecimal(specificationVersion);
4
                    = new DeweyDecimal(specificationVersion);
5
            } catch (final NumberFormatException nfe) {
5
            } catch (final NumberFormatException nfe) {
6
                final String error = "Bad specification version format '"
6
                final String error = "Bad specification version format '"
7
                    + specificationVersion + "' in '" + specificationTitle
7
                    + specificationVersion + "' in '" + extensionName
8
                    + "'. (Reason: " + nfe + ")";
8
                    + "'. (Reason: " + nfe + ")";
9
                throw new IllegalArgumentException(error);
9
                throw new IllegalArgumentException(error);
10
            }
10
            }
11
        }
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.3
Clones locationClones are in different classes
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (null != specificationVersion)
    3
    if (null != specificationVersion)
    4
    try
    4
    try
    4
    try
    Differences
    Expression1Expression2Difference
    specificationTitleextensionNameVARIABLE_NAME_MISMATCH
    4
    try
    5
    this.specificationVersion = new DeweyDecimal(specificationVersion);
    5
    this.specificationVersion = new DeweyDecimal(specificationVersion);
    Precondition Violations (0)
    Row Violation