File tempFile = File.createTempFile(PREFIX, SUFFIX); IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile); dest.show(new ObjectArrayDataSet(md.getCatalogs())); files.add(tempFile); titles.add("Catalogs");
File tempFile = File.createTempFile(PREFIX, SUFFIX); IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile); dest.show(new HashtableDataSet(System.getProperties())); files.add(tempFile); //i18n[DumpApplicationCommand.title.systemprops=System Properties] titles.add(s_stringMgr.getString("DumpApplicationCommand.title.systemprops"));
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/DumpSessionCommand.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/DumpApplicationCommand.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 5 Number of AST nodes: 5
1
File tempFile = File.createTempFile(PREFIX, SUFFIX);
1
File tempFile = File.createTempFile(PREFIX, SUFFIX);
2
				IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
2
				IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
3
				dest.show(new ObjectArrayDataSet(md.getCatalogs()));
3
				dest.show(new 
4
				files.add(tempFile);
5
				titles.add("Catalog
4
HashtableDataSet(System.getProperties()));
5
				files.add(tempFile);
6
				//i18n[DumpApplicationCommand.title.systemprops=System Properties]
6
s");
7
				titles.add(s_stringMgr.getString("DumpApplicationCommand.title.systemprops"));
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 comparisons19
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    29
    File tempFile = File.createTempFile(PREFIX, SUFFIX);
    10
    File tempFile = File.createTempFile(PREFIX, SUFFIX);
    30
    IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
    11
    IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
                                                                                                                            
    12
    dest.show(new HashtableDataSet(System.getProperties()));
    Preondition Violations
    Unmatched statement dest.show(new HashtableDataSet(System.getProperties())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12
    dest.show(new HashtableDataSet(System.getProperties()));
    31
    dest.show(new ObjectArrayDataSet(md.getCatalogs()));
    31
    dest.show(new ObjectArrayDataSet(md.getCatalogs()));
    Preondition Violations
    Unmatched statement dest.show(new ObjectArrayDataSet(md.getCatalogs())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                    
    32
    files.add(tempFile);
    13
    files.add(tempFile);
    33
    titles.add("Catalogs");
    33
    titles.add("Catalogs");
    14
    titles.add(s_stringMgr.getString("DumpApplicationCommand.title.systemprops"));
    Differences
    Expression1Expression2Difference
    "Catalogs"s_stringMgr.getString("DumpApplicationCommand.title.systemprops")TYPE_COMPATIBLE_REPLACEMENT
    14
    titles.add(s_stringMgr.getString("DumpApplicationCommand.title.systemprops"));
    Precondition Violations (2)
    Row Violation
    1Unmatched statement dest.show(new HashtableDataSet(System.getProperties())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement dest.show(new ObjectArrayDataSet(md.getCatalogs())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted