Calendar cal = Calendar.getInstance(); TimeZone tz = cal.getTimeZone(); out.println("Timezone " + tz.getDisplayName() + " offset=" + tz.getOffset(cal.get(Calendar.ERA), cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_WEEK), ((cal.get(Calendar.HOUR_OF_DAY) * MINUTES_PER_HOUR + cal.get(Calendar.MINUTE)) * SECONDS_PER_MINUTE + cal.get(Calendar.SECOND)) * SECONDS_PER_MILLISECOND + cal.get(Calendar.MILLISECOND)));
DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dbuilder = dbfactory.newDocumentBuilder(); return dbuilder.parse(file);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Diagnostics.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/AbstractXSLTLiaisonTest.java
Method name: void doReportLocale(PrintStream) Method name: Document parseXML(File)
Number of AST nodes: 3 Number of AST nodes: 3
1
Calendar cal = Calendar.getInstance();
2
        TimeZone tz = cal.getTimeZone();
3
        out.println("Timezone " + tz.getDisplayName()
4
                + " offset=" + tz.getOffset(cal.get(Calendar.ERA),
5
                        cal.get(Calendar.YEAR),
6
                        cal.get(Calendar.MONTH),
7
                        cal.get(Calendar.DAY_OF_MONTH),
8
                        cal.get(Calendar.DAY_OF_WEEK),
9
                        ((cal.get(Calendar.HOUR_OF_DAY) * MINUTES_PER_HOUR
10
                         + cal.get(Calendar.MINUTE)) * SECONDS_PER_MINUTE
11
                         + cal.get(Calendar.SECOND)) * SECONDS_PER_MILLISECOND
12
                         + cal.get(Calendar.MILLISECOND))
1
DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
2
        DocumentBuilder dbuilder = dbfactory.newDocumentBuilder();
13
);
3
        return dbuilder.parse(file);
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 comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements0
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeUnknown type
    Mapped Statements
    ID Statement ID Statement
    Precondition Violations (0)
    Row Violation