package org.columba.addressbook.config; import org.columba.core.config.DefaultItem; import org.columba.core.xml.XmlElement; /** * Convinience wrapper for a contact folder configuration. * * @author fdietz */ public class FolderItem extends DefaultItem { /* AdapterNode name; AdapterNode uid; AdapterNode type; AdapterNode rootNode; */ public FolderItem(XmlElement root) { super(root); /* this.rootNode = root; parse(); createMissingElements(); */ //filterList = new Vector(); } /* protected void parse() { for (int i = 0; i < getRootNode().getChildCount(); i++) { AdapterNode child = getRootNode().getChildAt(i); if (child.getName().equals("name")) { name = child; } else if (child.getName().equals("uid")) { uid = child; } else if (child.getName().equals("type")) { type = child; } } } protected void createMissingElements() { } public AdapterNode getRootNode() { return rootNode; } public void setUid(int i) { Integer h = new Integer(i); setTextValue(uid, h.toString()); } public void setName(String str) { setTextValue(name, str); } public int getUid() { if ( uid != null ) { Integer i = new Integer(getTextValue(uid)); return i.intValue(); } else { return -1; } } public String getName() { if ( name != null ) return getTextValue(name); else return ""; } public String getType() { return getTextValue(type); } */
package org.columba.mail.config; import org.columba.core.config.DefaultItem; import org.columba.core.xml.XmlElement; /** * @version 1.0 * @author */ public class SpellcheckItem extends DefaultItem { public SpellcheckItem(XmlElement root) { super(root); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/config/FolderItem.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/config/SpellcheckItem.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
package org.columba.addressbook.config;
1
package org.columba.mail.config;
2
import org.columba.core.config.DefaultItem;
2
import org.columba.core.config.DefaultItem;
3
import org.columba.core.xml.XmlElement;
3
import org.columba.core.xml.XmlElement;
4
/**
4
/**
5
 * Convinience wrapper for a contact folder configuration.
5
 * 
6
 * 
6
@version         1.0
7
 * @author fdietz
7
 * @author
8
 */
8
 */
9
public class FolderItem extends DefaultItem {
9
public class SpellcheckItem extends DefaultItem {
10
    /*
10
    
11
AdapterNode name;
12
AdapterNode uid;
13
AdapterNode type;
14
AdapterNode rootNode;
15
*/
16
    public FolderItem(XmlElement root) {
17
        super(root);
18
        /*
19
this.rootNode = root;
20
parse();
21
createMissingElements();
22
*/
23
        //filterList = new Vector();
24
    }
25
    /*
26
protected void parse()
27
{
28
        for (int i = 0; i < getRootNode().getChildCount(); i++)
29
        {
30
                AdapterNode child = getRootNode().getChildAt(i);
31
                if (child.getName().equals("name"))
32
                {
33
                        name = child;
34
                }
35
                else if (child.getName().equals("uid"))
36
                {
37
                        uid = child;
38
                }
39
                else if (child.getName().equals("type"))
40
                {
41
                        type = child;
42
                }
43
        }
44
}
45
protected void createMissingElements()
46
{
47
}
48
public AdapterNode getRootNode()
49
{
50
        return rootNode;
51
}
52
public void setUid(int i)
53
{
54
        Integer h = new Integer(i);
55
        setTextValue(uid, h.toString());
56
}
57
public void setName(String str)
58
{
59
        setTextValue(name, str);
60
}
61
public int getUid()
62
{
63
        if ( uid != null )
64
        {
65
        Integer i = new Integer(getTextValue(uid)
11
public SpellcheckItem(XmlElement root) {
66
);
12
        super(root);
13

67
        return i.intValue();
14
    
68
        }
69
        else
70
        {
71
                return -1;
72
        }
73
}
74
public String getName()
75
{
76
        if ( name != null )
77
                return getTextValue(name);
78
        else
79
                return "";
80
}
81
public String getType()
82
{
83
        return getTextValue(type);
84
}
85
*/
15
}
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