POP3Server controller = POP3ServerCollection.getInstance().uidGet(accountUid); setEnabled( false ); POP3CommandReference r = new POP3CommandReference(controller); FetchNewMessagesCommand c = new FetchNewMessagesCommand(this, r); CommandProcessor.getInstance().addOp(c);
String option = commandLine.getOptionValue("compose"); ComposerModel model = new ComposerModel(MessageOptionParser .parse(option)); ComposerController controller = new ComposerController(); new DefaultContainer(controller); controller.setComposerModel(model); ColumbaCmdLineParser.getInstance().setRestoreLastSession(false);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/mailchecking/POP3MailCheckingAction.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/main/MailMain.java
Method name: void check() Method name: void handleCommandLineParameters(CommandLine)
Number of AST nodes: 5 Number of AST nodes: 6
1
POP3Server controller = POP3ServerCollection.getInstance().uidGet(accountUid);
2
        
3
        setEnabled( false );
4
        
5
        POP3CommandReference r = new POP3CommandReference(c
1
String option = commandLine.getOptionValue("compose");
2
			ComposerModel model = new ComposerModel(MessageOptionParser
3
					.parse(option));
6
ontroller);
4
			ComposerController controller = new ComposerController();
7
        FetchNewMessagesCommand c = new FetchNewMessagesCommand(this, r);
8
        CommandProcessor.getInstance().addOp(c
5
			new DefaultContainer(controller);
6
			controller.setComposerModel(model);
9
);
7
			ColumbaCmdLineParser.getInstance().setRestoreLastSession(false);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons30
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment5
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    POP3Server controller = POP3ServerCollection.getInstance().uidGet(accountUid);
                                                                                                                                                                  
                                                                                                                    
    13
    String option = commandLine.getOptionValue("compose");
                                                                                                                                                              
    14
    ComposerModel model = new ComposerModel(MessageOptionParser.parse(option));
    Preondition Violations
    Unmatched statement ComposerModel model=new ComposerModel(MessageOptionParser.parse(option)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    14
    ComposerModel model = new ComposerModel(MessageOptionParser.parse(option));
                                                                                                                          
    15
    ComposerController controller = new ComposerController();
    Preondition Violations
    Unmatched statement ComposerController controller=new ComposerController(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    15
    ComposerController controller = new ComposerController();
                                                                              
    16
    new DefaultContainer(controller);
                                                                                  
    17
    controller.setComposerModel(model);
    Preondition Violations
    Unmatched statement controller.setComposerModel(model); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    17
    controller.setComposerModel(model);
    2
    setEnabled(false);
    2
    setEnabled(false);
    18
    ColumbaCmdLineParser.getInstance().setRestoreLastSession(false);
    Differences
    Expression1Expression2Difference
    setEnabledsetRestoreLastSessionMETHOD_INVOCATION_NAME_MISMATCH
    ColumbaCmdLineParser.getInstance()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression setEnabled(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ColumbaCmdLineParser.getInstance().setRestoreLastSession(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setEnabled(false) is a void method call, and thus it cannot be parameterized
    Expression ColumbaCmdLineParser.getInstance().setRestoreLastSession(false) is a void method call, and thus it cannot be parameterized
    Expression setEnabled(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ColumbaCmdLineParser.getInstance().setRestoreLastSession(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setEnabled(false) is a void method call, and thus it cannot be parameterized
    Expression ColumbaCmdLineParser.getInstance().setRestoreLastSession(false) is a void method call, and thus it cannot be parameterized
    18
    ColumbaCmdLineParser.getInstance().setRestoreLastSession(false);
    3
    POP3CommandReference r = new POP3CommandReference(controller);
    3
    POP3CommandReference r = new POP3CommandReference(controller);
    Preondition Violations
    Unmatched statement POP3CommandReference r=new POP3CommandReference(controller); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                                  
    4
    FetchNewMessagesCommand c = new FetchNewMessagesCommand(this, r);
    4
    FetchNewMessagesCommand c = new FetchNewMessagesCommand(this, r);
    Preondition Violations
    Unmatched statement FetchNewMessagesCommand c=new FetchNewMessagesCommand(this,r); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                                      
    5
    CommandProcessor.getInstance().addOp(c);
                                                                                          
    Precondition Violations (14)
    Row Violation
    1Unmatched statement ComposerModel model=new ComposerModel(MessageOptionParser.parse(option)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement ComposerController controller=new ComposerController(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched statement controller.setComposerModel(model); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Expression setEnabled(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression ColumbaCmdLineParser.getInstance().setRestoreLastSession(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression setEnabled(false) is a void method call, and thus it cannot be parameterized
    7Expression ColumbaCmdLineParser.getInstance().setRestoreLastSession(false) is a void method call, and thus it cannot be parameterized
    8Expression setEnabled(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression ColumbaCmdLineParser.getInstance().setRestoreLastSession(false) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression setEnabled(false) is a void method call, and thus it cannot be parameterized
    11Expression ColumbaCmdLineParser.getInstance().setRestoreLastSession(false) is a void method call, and thus it cannot be parameterized
    12Unmatched statement POP3CommandReference r=new POP3CommandReference(controller); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    13Unmatched statement FetchNewMessagesCommand c=new FetchNewMessagesCommand(this,r); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    14The refactoring of the clones is infeasible, because classes org.columba.mail.mailchecking.POP3MailCheckingAction and org.columba.mail.main.MailMain do not have a common superclass