protected OutputStream getOutputStream() { if (this.outputStream == null) { if (output != null) { try { setOutputStream(new PrintStream( new BufferedOutputStream( new FileOutputStream(output .getPath(), append)))); } catch (IOException e) { throw new BuildException(e, getLocation()); } } else { setOutputStream(new LogOutputStream(this, Project.MSG_INFO)); } } return this.outputStream;
protected OutputStream getErrorStream() { if (this.errorStream == null) { if (error != null) { try { setErrorStream(new PrintStream( new BufferedOutputStream( new FileOutputStream(error.getPath(), append)))); } catch (IOException e) { throw new BuildException(e, getLocation()); } } else { setErrorStream(new LogOutputStream(this, Project.MSG_WARN)); } } return this.errorStream;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AbstractCvsTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AbstractCvsTask.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
protected OutputStream getOutputStream() {
1
protected OutputStream getErrorStream() {
2
        if (this.outputStream == null) {
2
        if (this.errorStream == null) {
3
            if (output != null) {
3
            if (error != null) {
4
                try {
4
                try {
5
                    setOutputStream(new PrintStream(
5
                    setErrorStream(new PrintStream(
6
                                        new BufferedOutputStream(
6
                                       new BufferedOutputStream(
7
                                            new FileOutputStream(output
7
                                           new FileOutputStream(
8
                                                                 .getPath(),
8
error.getPath(),
9
                                                                 append))));
9
                                                                append))));
10
                } catch (IOException e) {
10
                } catch (IOException e) {
11
                    throw new BuildException(e, getLocation());
11
                    throw new BuildException(e, getLocation());
12
                }
12
                }
13
            } else {
13
            } else {
14
                setOutputStream(new LogOutputStream(this, Project.MSG_INFO));
14
                setErrorStream(new LogOutputStream(this, Project.MSG_WARN));
15
            }
15
            }
16
        }
16
        }
17
        return this.outputStream;
17
        return this.errorStream;
18
    
18
    
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.0
Clones location
Number of node comparisons0