File location = fc.getSelectedFile();
Profile p = new Profile(location.getName(), location);
// add profile to profiles.xml
ProfileManager.getInstance().addProfile(p);
// add to listmodel
model.addElement(p.getName());
// select new item
list.setSelectedValue(p.getName(), true);
List authMechanisms = AuthenticationFactory.getInstance()
.getSupportedMechanisms(oneLine.toString());
Iterator it = authMechanisms.iterator();
while (it.hasNext()) {
supportedMechanisms.add(new Integer(AuthenticationManager
.getSaslCode((String) it.next())));
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/profiles/ProfileChooserDialog.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/imap/IMAPServer.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: List checkSupportedAuthenticationMethods()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | File location = fc.getSelectedFile();↵ | | |
|
2 | Profile p = new Profile(location.getName(), location);↵ | | |
|
3 | // add profile to profiles.xml↵ | | |
|
4 | ProfileManager.getInstance().addProfile(p);↵ | | |
|
5 | ↵ | | |
|
6 | // add to listmodel↵ | | |
|
7 | model.addElement(p.getName());↵ | | |
|
8 | // select new item↵ | | |
|
9 | list.setSelectedValue(p.getName(), true); | | 1 | List authMechanisms = AuthenticationFactory.getInstance()↵
|
| | | 2 | .getSupportedMechanisms(oneLine.toString());↵
|
| | | 3 | Iterator it = authMechanisms.iterator();↵
|
| | | 4 | while (it.hasNext()) {↵
|
| | | 5 | supportedMechanisms.add(new Integer(AuthenticationManager↵
|
| | | 6 | .getSaslCode((String) it.next())));↵
|
| | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 0 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Unknown type |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
Precondition Violations (0)
Row |
Violation |