if (src == null && dir == null) { String message = "Either the file or the dir attribute " + "must be specified"; throw new BuildException(message, getLocation()); }
if (token == null && replacefilters.size() == 0) { String message = "Either token or a nested replacefilter " + "must be specified"; throw new BuildException(message, getLocation()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Replace.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Replace.java
Method name: void validateAttributes() Method name: void validateAttributes()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (src == null && dir == null) {
1
if (token == null && replacefilters.size() == 0) {
2
            String message = "Either the file or the dir attribute "
2
            String message = "Either token or a nested replacefilter "
3
                + "must be specified";
3
                + "must be specified";
4
            throw new BuildException(message, getLocation());
4
            throw new BuildException(message, getLocation());
5
        }
5
        }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in the same method
Number of node comparisons1