if ((p = getProject().getProperty("ant.netrexxc.savelog")) != null) { this.savelog = Project.toBoolean(p); // srcDir } if ((p = getProject().getProperty("ant.netrexxc.sourcedir")) != null) { this.sourcedir = Project.toBoolean(p); } 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); } if ((p = getProject().getProperty("ant.netrexxc.explicit")) != null) { this.explicit = Project.toBoolean(p); } if ((p = getProject().getProperty("ant.netrexxc.format")) != null) { this.format = 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: 20 Number of AST nodes: 20
1
if ((p = getProject().getProperty("ant.netrexxc.savelog")) != null) {
1
if ((p = getProject().getProperty("ant.netrexxc.binary")) != null) {
2
            this.savelog = Project.toBoolean(p);
2
            this.binary = Project.toBoolean(p);
3
        
3
        }
4
    // srcDir
4
    
5
        }
5
    // classpath makes no sense
6
        if ((p = getProject().getProperty("ant.netrexxc.sourcedir")) != null) {
6
        if ((p = getProject().getProperty("ant.netrexxc.comments")) != null) {
7
            this.sourcedir = Project.toBoolean(p);
7
            this.comments = Project.toBoolean(p);
8
        }
8
        }
9
        if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null) {
9
        if ((p = getProject().getProperty("ant.netrexxc.compact")) != null) {
10
            this.strictargs = Project.toBoolean(p);
10
            this.compact = Project.toBoolean(p);
11
        }
11
        }
12
        if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null) {
12
        if ((p = getProject().getProperty("ant.netrexxc.compile")) != null) {
13
            this.strictassign = Project.toBoolean(p);
13
            this.compile = Project.toBoolean(p);
14
        }
14
        }
15
        if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null) {
15
        if ((p = getProject().getProperty("ant.netrexxc.console")) != null) {
16
            this.strictcase = Project.toBoolean(p);
16
            this.console = Project.toBoolean(p);
17
        }
17
        }
18
        if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null) {
18
        if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null) {
19
            this.strictimport = Project.toBoolean(p);
19
            this.crossref = Project.toBoolean(p);
20
        }
20
        }
21
        if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null) {
21
        if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null) {
22
            this.strictprops = Project.toBoolean(p);
22
            this.decimal = Project.toBoolean(p);
23
            // destDir
23
        }
24
        }
24
        if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null) {
25
        if ((p = getProject().getProperty("ant.netrexxc.diag")) != null) {
25
            this.strictsignal = Project.toBoolean(p);
26
            this.diag = Project.toBoolean(p);
26
        }
27
        }
27
        if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null) {
28
        if ((p = getProject().getProperty("ant.netrexxc.explicit")) != null) {
28
            this.symbols = Project.toBoolean(p);
29
            this.explicit = Project.toBoolean(p);
29
        }
30
        }
30
        if ((p = getProject().getProperty("ant.netrexxc.time")) != null) {
31
        if ((p = getProject().getProperty("ant.netrexxc.format")) != null) {
31
            this.time = Project.toBoolean(p);
32
            this.format = Project.toBoolean(p);
32
        }
33
        }
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)13.9
Clones locationClones are in the same method
Number of node comparisons265
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements20
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)15.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    28
    if ((p = getProject().getProperty("ant.netrexxc.savelog")) != null)
    28
    if ((p = getProject().getProperty("ant.netrexxc.savelog")) != null)
    2
    if ((p = getProject().getProperty("ant.netrexxc.binary")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.savelog""ant.netrexxc.binary"LITERAL_VALUE_MISMATCH
    2
    if ((p = getProject().getProperty("ant.netrexxc.binary")) != null)
    29
    this.savelog = Project.toBoolean(p);
    29
    this.savelog = Project.toBoolean(p);
    3
    this.binary = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    savelogbinaryVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.savelog 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);
    30
    if ((p = getProject().getProperty("ant.netrexxc.sourcedir")) != null)
    30
    if ((p = getProject().getProperty("ant.netrexxc.sourcedir")) != null)
    4
    if ((p = getProject().getProperty("ant.netrexxc.comments")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.sourcedir""ant.netrexxc.comments"LITERAL_VALUE_MISMATCH
    4
    if ((p = getProject().getProperty("ant.netrexxc.comments")) != null)
    31
    this.sourcedir = Project.toBoolean(p);
    31
    this.sourcedir = Project.toBoolean(p);
    5
    this.comments = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    sourcedircommentsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.sourcedir 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);
    32
    if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null)
    32
    if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null)
    6
    if ((p = getProject().getProperty("ant.netrexxc.compact")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictargs""ant.netrexxc.compact"LITERAL_VALUE_MISMATCH
    6
    if ((p = getProject().getProperty("ant.netrexxc.compact")) != null)
    33
    this.strictargs = Project.toBoolean(p);
    33
    this.strictargs = Project.toBoolean(p);
    7
    this.compact = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictargscompactVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictargs 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);
    34
    if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null)
    34
    if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null)
    8
    if ((p = getProject().getProperty("ant.netrexxc.compile")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictassign""ant.netrexxc.compile"LITERAL_VALUE_MISMATCH
    8
    if ((p = getProject().getProperty("ant.netrexxc.compile")) != null)
    35
    this.strictassign = Project.toBoolean(p);
    35
    this.strictassign = Project.toBoolean(p);
    9
    this.compile = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictassigncompileVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictassign 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);
    36
    if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null)
    36
    if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null)
    10
    if ((p = getProject().getProperty("ant.netrexxc.console")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictcase""ant.netrexxc.console"LITERAL_VALUE_MISMATCH
    10
    if ((p = getProject().getProperty("ant.netrexxc.console")) != null)
    37
    this.strictcase = Project.toBoolean(p);
    37
    this.strictcase = Project.toBoolean(p);
    11
    this.console = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictcaseconsoleVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictcase 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);
    38
    if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null)
    38
    if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null)
    12
    if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictimport""ant.netrexxc.crossref"LITERAL_VALUE_MISMATCH
    12
    if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null)
    39
    this.strictimport = Project.toBoolean(p);
    39
    this.strictimport = Project.toBoolean(p);
    13
    this.crossref = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictimportcrossrefVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictimport 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);
    40
    if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null)
    40
    if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null)
    14
    if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictprops""ant.netrexxc.decimal"LITERAL_VALUE_MISMATCH
    14
    if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null)
    41
    this.strictprops = Project.toBoolean(p);
    41
    this.strictprops = Project.toBoolean(p);
    15
    this.decimal = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictpropsdecimalVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictprops 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);
    42
    if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null)
    42
    if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null)
    16
    if ((p = getProject().getProperty("ant.netrexxc.diag")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.strictsignal""ant.netrexxc.diag"LITERAL_VALUE_MISMATCH
    16
    if ((p = getProject().getProperty("ant.netrexxc.diag")) != null)
    43
    this.strictsignal = Project.toBoolean(p);
    43
    this.strictsignal = Project.toBoolean(p);
    17
    this.diag = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    strictsignaldiagVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.strictsignal 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);
    44
    if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null)
    44
    if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null)
    18
    if ((p = getProject().getProperty("ant.netrexxc.explicit")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.symbols""ant.netrexxc.explicit"LITERAL_VALUE_MISMATCH
    18
    if ((p = getProject().getProperty("ant.netrexxc.explicit")) != null)
    45
    this.symbols = Project.toBoolean(p);
    45
    this.symbols = Project.toBoolean(p);
    19
    this.explicit = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    symbolsexplicitVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.symbols is a field being modified, and thus it cannot be parameterized
    Expression this.explicit is a field being modified, and thus it cannot be parameterized
    19
    this.explicit = Project.toBoolean(p);
    46
    if ((p = getProject().getProperty("ant.netrexxc.time")) != null)
    46
    if ((p = getProject().getProperty("ant.netrexxc.time")) != null)
    20
    if ((p = getProject().getProperty("ant.netrexxc.format")) != null)
    Differences
    Expression1Expression2Difference
    "ant.netrexxc.time""ant.netrexxc.format"LITERAL_VALUE_MISMATCH
    20
    if ((p = getProject().getProperty("ant.netrexxc.format")) != null)
    47
    this.time = Project.toBoolean(p);
    47
    this.time = Project.toBoolean(p);
    21
    this.format = Project.toBoolean(p);
    Differences
    Expression1Expression2Difference
    timeformatVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.time is a field being modified, and thus it cannot be parameterized
    Expression this.format is a field being modified, and thus it cannot be parameterized
    21
    this.format = Project.toBoolean(p);
    Precondition Violations (20)
    Row Violation
    1Expression this.savelog 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.sourcedir 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.strictargs 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.strictassign 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.strictcase 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.strictimport 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.strictprops 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.strictsignal 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
    17Expression this.symbols is a field being modified, and thus it cannot be parameterized
    18Expression this.explicit is a field being modified, and thus it cannot be parameterized
    19Expression this.time is a field being modified, and thus it cannot be parameterized
    20Expression this.format is a field being modified, and thus it cannot be parameterized