if (log.isDebugEnabled()) { String jcp=System.getProperty("java.class.path");// $NON-NLS-1$ String bits[] =jcp.split(File.pathSeparator); log.debug("ClassPath"); for(int i = 0; i<bits.length ;i++){ log.debug(bits[i]); } log.debug(jcp); }
System.out.println("Class path is:"); String cp = System.getProperty("java.class.path"); String cpe[] = JOrphanUtils.split(cp, java.io.File.pathSeparator); for (int i = 0; i < cpe.length; i++) { System.out.println(cpe[i]); } classPathShown = true;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/JMeter.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/junit/JMeterTest.java
Method name: void start(String[]) Method name: Collection getObjects(Class)
Number of AST nodes: 7 Number of AST nodes: 6
1
if (log.isDebugEnabled())
2
            {
3
                
1
System.out.println("Class path is:");
4
String jcp=System.getProperty("java.class.path");// $NON-NLS-1$
2
				String cp = System.getProperty("java.class.path");
5
                String bits[] =jcp.split(File.pathSeparator);
6
                log.debug("ClassPath");
7
                
3
				String cpe[] = JOrphanUtils.split(cp, java.io.File.pathSeparator);
8
for(int i = 0; i<bits.length ;i++){
4
				for (int i = 0; i < cpe.length; i++) {
9
                	log.debug(bits[i]);
10
                }
11
                log.debug(jcp);
12
            }
5
					System.out.println(cpe[i]);
6
				}
7
				classPathShown = true;
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.2
Clones locationClones are in different classes
Number of node comparisons21
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment4
    Time elapsed for statement mapping (ms)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                      
    26
    System.out.println("Class path is:");
    34
    String jcp = System.getProperty("java.class.path");
    34
    String jcp = System.getProperty("java.class.path");
    27
    String cp = System.getProperty("java.class.path");
    Differences
    Expression1Expression2Difference
    jcpcpVARIABLE_NAME_MISMATCH
    27
    String cp = System.getProperty("java.class.path");
                                                                                                                                          
    28
    String cpe[] = JOrphanUtils.split(cp, java.io.File.pathSeparator);
    Preondition Violations
    Unmatched statement String cpe[]=JOrphanUtils.split(cp,java.io.File.pathSeparator); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    28
    String cpe[] = JOrphanUtils.split(cp, java.io.File.pathSeparator);
                                                    
    31
    classPathShown = true;
    35
    String bits[] = jcp.split(File.pathSeparator);
    35
    String bits[] = jcp.split(File.pathSeparator);
    Preondition Violations
    Unmatched statement String bits[]=jcp.split(File.pathSeparator); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                    
    36
    log.debug("ClassPath");
                                                          
    37
    for (int i = 0; i < bits.length; i++)
    37
    for (int i = 0; i < bits.length; i++)
    29
    for (int i = 0; i < cpe.length; i++)
    Differences
    Expression1Expression2Difference
    bitscpeVARIABLE_NAME_MISMATCH
    29
    for (int i = 0; i < cpe.length; i++)
                                                                  
    30
    System.out.println(cpe[i]);
    Preondition Violations
    Unmatched statement System.out.println(cpe[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    30
    System.out.println(cpe[i]);
    38
    log.debug(bits[i]);
    38
    log.debug(bits[i]);
    Preondition Violations
    Unmatched statement log.debug(bits[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                  
    39
    log.debug(jcp);
                                          
    Precondition Violations (5)
    Row Violation
    1Unmatched statement String cpe[]=JOrphanUtils.split(cp,java.io.File.pathSeparator); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement String bits[]=jcp.split(File.pathSeparator); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement System.out.println(cpe[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement log.debug(bits[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Clone fragment #1 returns variables jcp, i , while Clone fragment #2 returns variables cp, i