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
				}
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 locationClones are in different classes
Number of node comparisons10