if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null) { this.strictargs = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null) { this.strictassign = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null) { this.strictcase = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null) { this.strictimport = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null) { this.strictprops = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null) { this.strictsignal = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null) { this.symbols = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.time")) != null) { this.time = Project.toBoolean(p); }
if ((p = getProject().getProperty("ant.netrexxc.binary")) != null) { this.binary = Project.toBoolean(p); } // classpath makes no sense if ((p = getProject().getProperty("ant.netrexxc.comments")) != null) { this.comments = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.compact")) != null) { this.compact = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.compile")) != null) { this.compile = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.console")) != null) { this.console = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null) { this.crossref = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null) { this.decimal = Project.toBoolean(p); // destDir } if ((p = getProject().getProperty("ant.netrexxc.diag")) != null) { this.diag = Project.toBoolean(p); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/NetRexxC.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
Method name: void init() Method name: void init()
Number of AST nodes: 16 Number of AST nodes: 16
1
if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null) {
1
if ((p = getProject().getProperty("ant.netrexxc.binary")) != null) {
2
            this.strictargs = Project.toBoolean(p);
2
            this.binary = Project.toBoolean(p);
3
        }
3
        }
4
        // classpath makes no sense
4
        if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null) {
5
        if ((p = getProject().getProperty("ant.netrexxc.comments")) != null) {
5
            this.strictassign = Project.toBoolean(p);
6
            this.comments = Project.toBoolean(p);
6
        }
7
        }
7
        if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null) {
8
        if ((p = getProject().getProperty("ant.netrexxc.compact")) != null) {
8
            this.strictcase = Project.toBoolean(p);
9
            this.compact = Project.toBoolean(p);
9
        }
10
        }
10
        if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null) {
11
        if ((p = getProject().getProperty("ant.netrexxc.compile")) != null) {
11
            this.strictimport = Project.toBoolean(p);
12
            this.compile = Project.toBoolean(p);
12
        }
13
        }
13
        if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null) {
14
        if ((p = getProject().getProperty("ant.netrexxc.console")) != null) {
14
            this.strictprops = Project.toBoolean(p);
15
            this.console = Project.toBoolean(p);
15
        }
16
        }
16
        if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null) {
17
        if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null) {
17
            this.strictsignal = Project.toBoolean(p);
18
            this.crossref = Project.toBoolean(p);
18
        }
19
        }
19
        if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null) {
20
        if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null) {
20
            this.symbols = Project.toBoolean(p);
21
            this.decimal = Project.toBoolean(p);
22
            // destDir
21
        }
23
        }
22
        if ((p = getProject().getProperty("ant.netrexxc.time")) != null) {
24
        if ((p = getProject().getProperty("ant.netrexxc.diag")) != null) {
23
            this.time = Project.toBoolean(p);
25
            this.diag = Project.toBoolean(p);
24
        }
26
        }
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)9.1
Clones locationClones are in the same method
Number of node comparisons172
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements16
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)11.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    32
    if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null)
    32
    if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null)
    2
    if ((p = getProject().getProperty("ant.netrexxc.binary")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictargs""ant.netrexxc.binary"LITERAL_VALUE_MISMATCH
    2
    if ((p = getProject().getProperty("ant.netrexxc.binary")) != null)
    33
    this.strictargs = Project.toBoolean(p);
    33
    this.strictargs = Project.toBoolean(p);
    3
    this.binary = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictargsbinaryVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictargs is a field being modified, and thus it cannot be parameterized
    Expression this.binary is a field being modified, and thus it cannot be parameterized
    3
    this.binary = Project.toBoolean(p);
    34
    if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null)
    34
    if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null)
    4
    if ((p = getProject().getProperty("ant.netrexxc.comments")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictassign""ant.netrexxc.comments"LITERAL_VALUE_MISMATCH
    4
    if ((p = getProject().getProperty("ant.netrexxc.comments")) != null)
    35
    this.strictassign = Project.toBoolean(p);
    35
    this.strictassign = Project.toBoolean(p);
    5
    this.comments = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictassigncommentsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictassign is a field being modified, and thus it cannot be parameterized
    Expression this.comments is a field being modified, and thus it cannot be parameterized
    5
    this.comments = Project.toBoolean(p);
    36
    if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null)
    36
    if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null)
    6
    if ((p = getProject().getProperty("ant.netrexxc.compact")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictcase""ant.netrexxc.compact"LITERAL_VALUE_MISMATCH
    6
    if ((p = getProject().getProperty("ant.netrexxc.compact")) != null)
    37
    this.strictcase = Project.toBoolean(p);
    37
    this.strictcase = Project.toBoolean(p);
    7
    this.compact = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictcasecompactVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictcase is a field being modified, and thus it cannot be parameterized
    Expression this.compact is a field being modified, and thus it cannot be parameterized
    7
    this.compact = Project.toBoolean(p);
    38
    if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null)
    38
    if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null)
    8
    if ((p = getProject().getProperty("ant.netrexxc.compile")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictimport""ant.netrexxc.compile"LITERAL_VALUE_MISMATCH
    8
    if ((p = getProject().getProperty("ant.netrexxc.compile")) != null)
    39
    this.strictimport = Project.toBoolean(p);
    39
    this.strictimport = Project.toBoolean(p);
    9
    this.compile = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictimportcompileVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictimport is a field being modified, and thus it cannot be parameterized
    Expression this.compile is a field being modified, and thus it cannot be parameterized
    9
    this.compile = Project.toBoolean(p);
    40
    if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null)
    40
    if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null)
    10
    if ((p = getProject().getProperty("ant.netrexxc.console")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictprops""ant.netrexxc.console"LITERAL_VALUE_MISMATCH
    10
    if ((p = getProject().getProperty("ant.netrexxc.console")) != null)
    41
    this.strictprops = Project.toBoolean(p);
    41
    this.strictprops = Project.toBoolean(p);
    11
    this.console = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictpropsconsoleVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictprops is a field being modified, and thus it cannot be parameterized
    Expression this.console is a field being modified, and thus it cannot be parameterized
    11
    this.console = Project.toBoolean(p);
    42
    if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null)
    42
    if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null)
    12
    if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictsignal""ant.netrexxc.crossref"LITERAL_VALUE_MISMATCH
    12
    if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null)
    43
    this.strictsignal = Project.toBoolean(p);
    43
    this.strictsignal = Project.toBoolean(p);
    13
    this.crossref = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictsignalcrossrefVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictsignal is a field being modified, and thus it cannot be parameterized
    Expression this.crossref is a field being modified, and thus it cannot be parameterized
    13
    this.crossref = Project.toBoolean(p);
    44
    if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null)
    44
    if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null)
    14
    if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.symbols""ant.netrexxc.decimal"LITERAL_VALUE_MISMATCH
    14
    if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null)
    45
    this.symbols = Project.toBoolean(p);
    45
    this.symbols = Project.toBoolean(p);
    15
    this.decimal = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    symbolsdecimalVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.symbols is a field being modified, and thus it cannot be parameterized
    Expression this.decimal is a field being modified, and thus it cannot be parameterized
    15
    this.decimal = Project.toBoolean(p);
    46
    if ((p = getProject().getProperty("ant.netrexxc.time")) != null)
    46
    if ((p = getProject().getProperty("ant.netrexxc.time")) != null)
    16
    if ((p = getProject().getProperty("ant.netrexxc.diag")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.time""ant.netrexxc.diag"LITERAL_VALUE_MISMATCH
    16
    if ((p = getProject().getProperty("ant.netrexxc.diag")) != null)
    47
    this.time = Project.toBoolean(p);
    47
    this.time = Project.toBoolean(p);
    17
    this.diag = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    timediagVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.time is a field being modified, and thus it cannot be parameterized
    Expression this.diag is a field being modified, and thus it cannot be parameterized
    17
    this.diag = Project.toBoolean(p);
    Precondition Violations (16)
    Row Violation
    1Expression this.strictargs is a field being modified, and thus it cannot be parameterized
    2Expression this.binary is a field being modified, and thus it cannot be parameterized
    3Expression this.strictassign is a field being modified, and thus it cannot be parameterized
    4Expression this.comments is a field being modified, and thus it cannot be parameterized
    5Expression this.strictcase is a field being modified, and thus it cannot be parameterized
    6Expression this.compact is a field being modified, and thus it cannot be parameterized
    7Expression this.strictimport is a field being modified, and thus it cannot be parameterized
    8Expression this.compile is a field being modified, and thus it cannot be parameterized
    9Expression this.strictprops is a field being modified, and thus it cannot be parameterized
    10Expression this.console is a field being modified, and thus it cannot be parameterized
    11Expression this.strictsignal is a field being modified, and thus it cannot be parameterized
    12Expression this.crossref is a field being modified, and thus it cannot be parameterized
    13Expression this.symbols is a field being modified, and thus it cannot be parameterized
    14Expression this.decimal is a field being modified, and thus it cannot be parameterized
    15Expression this.time is a field being modified, and thus it cannot be parameterized
    16Expression this.diag is a field being modified, and thus it cannot be parameterized