class P4Edit extends P4Base { // CheckStyle:VisibilityModifier OFF - bc /** * number of the change list to work on */ public String change = null; // CheckStyle:VisibilityModifier ON /** * An existing changelist number to assign files to; optional * but strongly recommended. * @param change the change list number */ public void setChange(String change) { this.change = change; } /** * Run the p4 edit command * @throws BuildException if there is no view specified */ public void execute() throws BuildException { if (change != null) { P4CmdOpts = "-c " + change; } if (P4View == null) { throw new BuildException("No view specified to edit"); } execP4Command("-s edit " + P4CmdOpts + " " + P4View, new SimpleP4OutputHandler(this)); }
class P4Delete extends P4Base { // CheckStyle:VisibilityModifier OFF - bc /** * number of the change list to work on */ public String change = null; // CheckStyle:VisibilityModifier ON /** * An existing changelist number for the deletion; optional * but strongly recommended. * @param change the number of a change list */ public void setChange(String change) { this.change = change; } /** * executes the p4 delete task * @throws BuildException if there is no view specified */ public void execute() throws BuildException { if (change != null) { P4CmdOpts = "-c " + change; } if (P4View == null) { throw new BuildException("No view specified to delete"); } execP4Command("-s delete " + P4CmdOpts + " " + P4View, new SimpleP4OutputHandler(this)); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/perforce/P4Delete.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
class P4Edit extends P4Base {
1
class P4Delete extends P4Base {
2
    // CheckStyle:VisibilityModifier OFF - bc
2
    // CheckStyle:VisibilityModifier OFF - bc
3
    /**
3
    /**
4
     * number of the change list to work on
4
     * number of the change list to work on
5
     */
5
     */
6
    public String change = null;
6
    public String change = null;
7
    // CheckStyle:VisibilityModifier ON
7
    // CheckStyle:VisibilityModifier ON
8
    /**
8
    /**
9
     * An existing changelist number to assign files to; optional
9
     * An existing changelist number for the deletion; optional
10
     * but strongly recommended.
10
     * but strongly recommended.
11
     * @param change the change list number
11
     * @param change the number of a change list
12
     */
12
     */
13
    public void setChange(String change) {
13
    public void setChange(String change) {
14
        this.change = change;
14
        this.change = change;
15
    }
15
    }
16
    /**
16
    /**
17
     * Run the p4 edit command
17
     * executes the p4 delete task
18
     * @throws BuildException if there is no view specified
18
     * @throws BuildException if there is no view specified
19
     */
19
     */
20
    public void execute() throws BuildException {
20
    public void execute() throws BuildException {
21
        if (change != null) {
21
        if (change != null) {
22
            P4CmdOpts = "-c " + change;
22
            P4CmdOpts = "-c " + change;
23
        }
23
        }
24
        if (P4View == null) {
24
        if (P4View == null) {
25
            throw new BuildException("No view specified to edit");
25
            throw new BuildException("No view specified to delete");
26
        }
26
        }
27
        execP4Command("-s edit " + P4CmdOpts + " " + P4View, new SimpleP4OutputHandler(this));
27
        execP4Command("-s delete " + P4CmdOpts + " " + P4View, new SimpleP4OutputHandler(this));
28
    }
28
    }
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