public class ImportMessageCommand extends Command { /** * @param references */ public ImportMessageCommand(ICommandReference reference) { super(reference); } /* * (non-Javadoc) * * @see org.columba.api.command.Command#execute(org.columba.api.command.Worker) */ public void execute(IWorkerStatusController worker) throws Exception { ImportFolderCommandReference r = (ImportFolderCommandReference) getReference(); AbstractMailboxImporter importer = r.getImporter(); importer.run(worker);
class PlaySoundCommand extends Command { public PlaySoundCommand(ICommandReference reference) { super(reference); } public void execute(IWorkerStatusController worker) throws Exception { // you need a sound.wav in your program folder File soundFile = new File("sound.wav"); URL url = soundFile.toURL(); PlaySound.play(url);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/command/ImportMessageCommand.java File path: /columba-1.4-src/plugins/org.columba.mail.PlaySoundFilterAction/src/org/columba/mail/filter/plugins/PlaySoundFilterAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class ImportMessageCommand extends Command {
1
class PlaySoundCommand extends Command {
2
	/**
2
	
3
	 * @param references
4
	 */
5
	public ImportMessageCommand(ICommandReference reference) {
3
	public PlaySoundCommand(ICommandReference reference) {
6
		super(reference);
4
			super(reference);
7
	}
5
		}
8
	/*
6
	
9
	 * (non-Javadoc)
10
	 * 
11
	 * @see org.columba.api.command.Command#execute(org.columba.api.command.Worker)
12
	 */
13
	public void execute(IWorkerStatusController worker) throws Exception {
7
	public void execute(IWorkerStatusController worker) throws Exception {
14
		ImportFolderCommandReference r = (ImportFolderCommandReference) getReference(
8
			// you need a sound.wav in your program folder
15
);
9
			File soundFile = new File("sound.wav");
16
		AbstractMailboxImporter importer = r.getImporter();
10
			
17
		importer.run(worker
11
URL url = soundFile.toURL();
18
);
12
			PlaySound.play(url);
19
	
13
		
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