public CachedMboxFolder(FolderItem item, String path) { super(item, path); // enable lucene search index by default boolean enableLucene = getConfiguration().getBooleanWithDefault("property", "enable_lucene", true); if (enableLucene) { getSearchEngine().setNonDefaultEngine(new LuceneQueryEngine(this)); } } /** * Constructs the CachedMboxFolder.java. * * @param name * @param type * @param path */ public CachedMboxFolder(String name, String type, String path) { super(name, type, path); IFolderItem item = getConfiguration(); item.setString("property", "accessrights", "user"); item.setString("property", "subfolder", "true"); boolean enableLucene = getConfiguration().getBooleanWithDefault("property", "enable_lucene", false); if (enableLucene) { getSearchEngine().setNonDefaultEngine(new LuceneQueryEngine(this)); } } /** * @see org.columba.mail.folder.AbstractLocalFolder#getDataStorageInstance() */ public IDataStorage getDataStorageInstance() { if (dataStorage == null) { dataStorage = new MboxDataStorage(this); } return dataStorage
public CachedMHFolder(FolderItem item, String path) { super(item, path); // enable lucene search index by default boolean enableLucene = getConfiguration().getBooleanWithDefault("property", "enable_lucene", true); if (enableLucene) { getSearchEngine().setNonDefaultEngine(new LuceneQueryEngine(this)); } } /** * @param type */ public CachedMHFolder(String name, String type, String path) { super(name, type, path); IFolderItem item = getConfiguration(); item.setString("property", "accessrights", "user"); item.setString("property", "subfolder", "true"); boolean enableLucene = getConfiguration().getBooleanWithDefault("property", "enable_lucene", false); if (enableLucene) { getSearchEngine().setNonDefaultEngine(new LuceneQueryEngine(this)); } } public IDataStorage getDataStorageInstance() { if (dataStorage == null) { dataStorage = new MHDataStorage(this); } return dataStorage
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/mbox/CachedMboxFolder.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/mh/CachedMHFolder.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public CachedMboxFolder(FolderItem item, String path) {
1
public CachedMHFolder(FolderItem item, String path) {
2
        super(item, path);
2
        super(item, path);
3
        // enable lucene search index by default
3
        // enable lucene search index by default
4
        boolean enableLucene = getConfiguration().getBooleanWithDefault("property",
4
        boolean enableLucene = getConfiguration().getBooleanWithDefault("property",
5
                "enable_lucene", true);
5
                "enable_lucene", true);
6
        if (enableLucene) {
6
        if (enableLucene) {
7
            getSearchEngine().setNonDefaultEngine(new LuceneQueryEngine(this));
7
            getSearchEngine().setNonDefaultEngine(new LuceneQueryEngine(this));
8
        }        
8
        }        
9
	}
10
	/**
11
	 * Constructs the CachedMboxFolder.java.
12
	 * 
13
	 * @param name
14
	
9
        
10
    }
11
    /**
15
 * @param type
12
 * @param type
16
	 * @param path
13
 *
17
	 */
18
	
14
/
19
public CachedMboxFolder(String name, String type, String path) {
15
    public CachedMHFolder(String name, String type, String path) {
20
        super(name, type, path);
16
        super(name, type, path);
21
        IFolderItem item = getConfiguration();
17
        IFolderItem item = getConfiguration();
22
        item.setString("property", "accessrights", "user");
18
        item.setString("property", "accessrights", "user");
23
        item.setString("property", "subfolder", "true");
19
        item.setString("property", "subfolder", "true");
20
        
24
        boolean enableLucene = getConfiguration().getBooleanWithDefault("property",
21
        boolean enableLucene = getConfiguration().getBooleanWithDefault("property",
25
                "enable_lucene", false);
22
                "enable_lucene", false);
26
        if (enableLucene) {
23
        if (enableLucene) {
27
            getSearchEngine().setNonDefaultEngine(new LuceneQueryEngine(this));
24
            getSearchEngine().setNonDefaultEngine(new LuceneQueryEngine(this));
28
        }        
25
        }        
29
	}
30
	
31
	
32
	/**
33
	 * @see org.columba.mail.folder.AbstractLocalFolder#getDataStorageInstance()
34
	 */
35
	
26
    }
27
    
36
public IDataStorage getDataStorageInstance() {
28
    public IDataStorage getDataStorageInstance() {
37
        if (dataStorage == null) {
29
        if (dataStorage == null) {
38
            dataStorage = new MboxDataStorage(this);
30
            dataStorage = new MHDataStorage(this);
39
        }
31
        }
40
        return dataStorage
32
        return dataStorage
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