{ // -incremental cmd.createArgument().setValue(FLAG_INCREMENTAL); } if (getNlabel()) { // -nlabel cmd.createArgument().setValue(FLAG_NLABEL); } // baseline_root_name cmd.createArgument().setValue(getBaselineRootName()); } /** * Set comment string * * @param comment the comment string */ public void setComment(String comment) { mComment = comment; } /** * Get comment string * * @return String containing the comment */ public String getComment() { return mComment; } /** * Set comment file * * @param cfile the path to the comment file */ public void setCommentFile(String cfile) { mCfile = cfile; } /** * Get comment file * * @return String containing the path to the comment file */ public String getCommentFile() { return mCfile; } /** * Set baseline_root_name * * @param baselineRootName the name of the baseline */ public void setBaselineRootName(String baselineRootName) { mBaselineRootName = baselineRootName; } /** * Get baseline_root_name * * @return String containing the name of the baseline */ public String getBaselineRootName() { return mBaselineRootName; } /** /** * Set the nowarn flag * * @param nwarn the status to set the flag to */ public void setNoWarn(boolean nwarn) { mNwarn = nwarn; } /** * Get nowarn flag status * * @return boolean containing status of nwarn flag */ public boolean getNoWarn() { return mNwarn; } /** * Set the identical flag * * @param identical the status to set the flag to */ public void setIdentical(boolean identical) { mIdentical = identical; } /** * Get identical flag status * * @return boolean containing status of identical flag */ public boolean getIdentical() { return mIdentical; } /** * Set the full flag * * @param full the status to set the flag to */ public void setFull(boolean full) { mFull = full; } /** * Get full flag status * * @return boolean containing status of full flag */ public boolean getFull() { return mFull; } /** * Set the nlabel flag * * @param nlabel the status to set the flag to */ public void setNlabel(boolean nlabel) { mNlabel = nlabel; } /** * Get nlabel status * * @return boolean containing status of nlabel flag */ public boolean getNlabel() { return mNlabel; } /** * Get the 'comment' command * * @param cmd containing the command line string with or * without the comment flag and string appended */ private void getCommentCommand(Commandline cmd) { if (getComment() != null) { /* Had to make two separate commands here because if a space is inserted between the flag and the value, it is treated as a Windows filename with a space and it is enclosed in double quotes ("). This breaks clearcase. */ cmd.createArgument().setValue(FLAG_COMMENT); cmd.createArgument().setValue(getComment()); } } /** * Get the 'commentfile' command * * @param cmd CommandLine containing the command line string with or * without the commentfile flag and file appended */ private void getCommentFileCommand(Commandline cmd) { if (getCommentFile() != null) { /* Had to make two separate commands here because if a space is inserted between the flag and the value, it is treated as a Windows filename with a space and it is enclosed in double quotes ("). This breaks clearcase. */ cmd.createArgument().setValue(FLAG_COMMENTFILE); cmd.createArgument().setValue(getCommentFile()); }
{ // -keep cmd.createArgument().setValue(FLAG_KEEPCOPY); } if (getIdentical()) { // -identical cmd.createArgument().setValue(FLAG_IDENTICAL); } // viewpath cmd.createArgument().setValue(getViewPath()); } /** * Sets the comment string. * * @param comment the comment string */ public void setComment(String comment) { mComment = comment; } /** * Get comment string * * @return String containing the comment */ public String getComment() { return mComment; } /** * Specifies a file containing a comment. * * @param cfile the path to the comment file */ public void setCommentFile(String cfile) { mCfile = cfile; } /** * Get comment file * * @return String containing the path to the comment file */ public String getCommentFile() { return mCfile; } /** * If true, suppress warning messages. * * @param nwarn the status to set the flag to */ public void setNoWarn(boolean nwarn) { mNwarn = nwarn; } /** * Get nowarn flag status * * @return boolean containing status of nwarn flag */ public boolean getNoWarn() { return mNwarn; } /** * If true, preserve the modification time. * * @param ptime the status to set the flag to */ public void setPreserveTime(boolean ptime) { mPtime = ptime; } /** * Get preservetime flag status * * @return boolean containing status of preservetime flag */ public boolean getPreserveTime() { return mPtime; } /** * If true, keeps a copy of the file with a .keep extension. * * @param keep the status to set the flag to */ public void setKeepCopy(boolean keep) { mKeep = keep; } /** * Get keepcopy flag status * * @return boolean containing status of keepcopy flag */ public boolean getKeepCopy() { return mKeep; } /** * If true, allows the file to be checked in even * if it is identical to the original. * * @param identical the status to set the flag to */ public void setIdentical(boolean identical) { mIdentical = identical; } /** * Get identical flag status * * @return boolean containing status of identical flag */ public boolean getIdentical() { return mIdentical; } /** * Get the 'comment' command * * @param cmd containing the command line string with or * without the comment flag and string appended */ private void getCommentCommand(Commandline cmd) { if (getComment() != null) { /* Had to make two separate commands here because if a space is inserted between the flag and the value, it is treated as a Windows filename with a space and it is enclosed in double quotes ("). This breaks clearcase. */ cmd.createArgument().setValue(FLAG_COMMENT); cmd.createArgument().setValue(getComment()); } } /** * Get the 'commentfile' command * * @param cmd containing the command line string with or * without the commentfile flag and file appended */ private void getCommentFileCommand(Commandline cmd) { if (getCommentFile() != null) { /* Had to make two separate commands here because if a space is inserted between the flag and the value, it is treated as a Windows filename with a space and it is enclosed in double quotes ("). This breaks clearcase. */ cmd.createArgument().setValue(FLAG_COMMENTFILE); cmd.createArgument().setValue(getCommentFile()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
{
1
{
2
           // -incremental
2
            // -
3
keep
3
           cmd.createArgument().setValue(FLAG_INCREMENTAL);
4
            cmd.createArgument().setValue(FLAG_KEEPCOPY);
4
       }
5
        }
5
       if (getNlabel()) {
6
        if (getIdentical()) {
6
           // -nlabel
7
            // -identical
7
           cmd.createArgument().setValue(FLAG_NLABEL);
8
            cmd.createArgument().setValue(FLAG_IDENTICAL);
8
       }
9
        }
9
       // baseline_root_name
10
        // viewpath
10
        cmd.createArgument().setValue(getBaselineRootName());
11
        cmd.createArgument().setValue(getViewPath());
11
    }
12
    }
12
    /**
13
    /**
13
     * Set comment string
14
     * Sets the comment string.
14
     *
15
     *
15
     * @param comment the comment string
16
     * @param comment the comment string
16
     */
17
     */
17
    public void setComment(String comment) {
18
    public void setComment(String comment) {
18
        mComment = comment;
19
        mComment = comment;
19
    }
20
    }
20
    /**
21
    /**
21
     * Get comment string
22
     * Get comment string
22
     *
23
     *
23
     * @return String containing the comment
24
     * @return String containing the comment
24
     */
25
     */
25
    public String getComment() {
26
    public String getComment() {
26
        return mComment;
27
        return mComment;
27
    }
28
    }
28
    /**
29
    /**
29
     * Set comment file
30
     * Specifies a file containing a comment.
30
     *
31
     *
31
     * @param cfile the path to the comment file
32
     * @param cfile the path to the comment file
32
     */
33
     */
33
    public void setCommentFile(String cfile) {
34
    public void setCommentFile(String cfile) {
34
        mCfile = cfile;
35
        mCfile = cfile;
35
    }
36
    }
36
    /**
37
    /**
37
     * Get comment file
38
     * Get comment file
38
     *
39
     *
39
     * @return String containing the path to the comment file
40
     * @return String containing the path to the comment file
40
     */
41
     */
41
    public String getCommentFile() {
42
    public String getCommentFile() {
42
        return mCfile;
43
        return mCfile;
43
    }
44
    }
44
    /**
45
    /**
45
     * Set baseline_root_name
46
     * 
46
     *
47
     * @param baselineRootName the name of the baseline
48
     */
49
    public void setBaselineRootName(String baselineRootName) {
50
        mBaselineRootName = baselineRootName;
51
    }
52
    /**
53
     * Get baseline_root_name
54
     *
55
     * @return String containing the name of the baseline
56
     */
57
    public String getBaselineRootName() {
58
        return mBaselineRootName;
59
    }
60
    /**
61
    /**
62
     * Set the nowarn flag
47
If true, suppress warning messages.
63
     *
48
     *
64
     * @param nwarn the status to set the flag to
49
     * @param nwarn the status to set the flag to
65
     */
50
     */
66
    public void setNoWarn(boolean nwarn) {
51
    public void setNoWarn(boolean nwarn) {
67
        mNwarn = nwarn;
52
        mNwarn = nwarn;
68
    }
53
    }
69
    /**
54
    /**
70
     * Get nowarn flag status
55
     * Get nowarn flag status
71
     *
56
     *
72
     * @return boolean containing status of nwarn flag
57
     * @return boolean containing status of nwarn flag
73
     */
58
     */
74
    public boolean getNoWarn() {
59
    public boolean getNoWarn() {
75
        return mNwarn;
60
        return mNwarn;
76
    }
61
    }
77
    /**
62
    /**
78
     * Set the identical flag
63
     * If true, preserve the modification time.
79
     *
64
     *
80
     * @param identical the status to set the flag to
65
     * @param ptime the status to set the flag to
81
     */
66
     */
82
    public void setIdentical(boolean identical) {
67
    public void set
83
        mIdentical = identical
68
PreserveTime(boolean ptime) {
84
;
69
        mPtime = ptime;
85
    }
70
    }
86
    /**
71
    /**
87
     * Get identical flag status
72
     * Get preservetime flag status
88
     *
73
     *
89
     * @return boolean containing status of identical flag
74
     * @return boolean containing status of preservetime flag
90
     */
75
     */
91
    public boolean getIdentical() {
76
    public boolean getPreserveTime() {
92
        return mIdentical;
77
        return mPtime;
93
    }
78
    }
94
    /**
79
    /**
95
     * Set the full flag
80
     * If true, keeps a copy of the file with a .keep extension.
96
     *
81
     *
97
     * @param full the status to set the flag to
82
     * @param keep the status to set the flag to
98
     */
83
     */
99
    public void setFull(boolean full) {
84
    public void setKeepCopy(boolean keep) {
100
        mFull = full;
85
        mKeep = keep;
101
    }
86
    }
102
    /**
87
    /**
103
     * Get full flag status
88
     * Get keepcopy flag status
104
     *
89
     *
105
     * @return boolean containing status of full flag
90
     * @return boolean containing status of keepcopy flag
106
     */
91
     */
107
    public boolean getFull() {
92
    public boolean getKeepCopy() {
108
        return mFull;
93
        return mKeep;
109
    }
94
    }
110
    /**
95
    /**
111
     * Set the nlabel flag
96
     * If true, allows the file to be checked in even
97
     * if it is identical to the original.
112
     *
98
     *
113
     * @param nlabel the status to set the flag to
99
     * @param identical the status to set the flag to
114
     */
100
     */
115
    public void setNlabel(boolean nlabel) {
101
    public void setIdentical(boolean identical) {
116
        mNlabel = nlabel;
102
        mIdentical = identical;
117
    }
103
    }
118
    /**
104
    /**
119
     * Get nlabel status
105
     * Get identical flag status
120
     *
106
     *
121
     * @return boolean containing status of nlabel flag
107
     * @return boolean containing status of identical flag
122
     */
108
     */
123
    public boolean getNlabel() {
109
    public boolean getIdentical() {
124
        return mNlabel;
110
        return mIdentical;
125
    }
111
    }
126
    /**
112
    /**
127
     * Get the 'comment' command
113
     * Get the 'comment' command
128
     *
114
     *
129
     * @param cmd containing the command line string with or
115
     * @param cmd containing the command line string with or
130
     *                    without the comment flag and string appended
116
     *            without the comment flag and string appended
131
     */
117
     */
132
    private void getCommentCommand(Commandline cmd) {
118
    private void getCommentCommand(Commandline cmd) {
133
        if (getComment() != null) {
119
        if (getComment() != null) {
134
            /* Had to make two separate commands here because if a space is
120
            /* Had to make two separate commands here because if a space is
135
               inserted between the flag and the value, it is treated as a
121
               inserted between the flag and the value, it is treated as a
136
               Windows filename with a space and it is enclosed in double
122
               Windows filename with a space and it is enclosed in double
137
               quotes ("). This breaks clearcase.
123
               quotes ("). This breaks clearcase.
138
            */
124
            */
139
            cmd.createArgument().setValue(FLAG_COMMENT);
125
            cmd.createArgument().setValue(FLAG_COMMENT);
140
            cmd.createArgument().setValue(getComment());
126
            cmd.createArgument().setValue(getComment());
141
        }
127
        }
142
    }
128
    }
143
    /**
129
    /**
144
     * Get the 'commentfile' command
130
     * Get the 'commentfile' command
145
     *
131
     *
146
     * @param cmd CommandLine containing the command line string with or
132
     * @param cmd containing the command line string with or
147
     *                    without the commentfile flag and file appended
133
     *            without the commentfile flag and file appended
148
     */
134
     */
149
    private void getCommentFileCommand(Commandline cmd) {
135
    private void getCommentFileCommand(Commandline cmd) {
150
        if (getCommentFile() != null) {
136
        if (getCommentFile() != null) {
151
            /* Had to make two separate commands here because if a space is
137
            /* Had to make two separate commands here because if a space is
152
               inserted between the flag and the value, it is treated as a
138
               inserted between the flag and the value, it is treated as a
153
               Windows filename with a space and it is enclosed in double
139
               Windows filename with a space and it is enclosed in double
154
               quotes ("). This breaks clearcase.
140
               quotes ("). This breaks clearcase.
155
            */
141
            */
156
            cmd.createArgument().setValue(FLAG_COMMENTFILE);
142
            cmd.createArgument().setValue(FLAG_COMMENTFILE);
157
            cmd.createArgument().setValue(getCommentFile());
143
            cmd.createArgument().setValue(getCommentFile());
158
        }
144
        }
159
    
145
    
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