if (task != null) { Task sub = task.getSubtask(subinterval); if (sub != null) { TimePeriod duration = sub.getDuration(); result = new Long(duration.getStart().getTime()); } }
if (task != null) { Task sub = task.getSubtask(subinterval); if (sub != null) { TimePeriod duration = sub.getDuration(); result = new Long(duration.getEnd().getTime()); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/TaskSeriesCollection.java File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/TaskSeriesCollection.java
Method name: Number getStartValue(Comparable, Comparable, int) Method name: Number getEndValue(Comparable, Comparable, int)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (task != null) {
1
if (task != null) {
2
            Task sub = task.getSubtask(subinterval);
2
            Task sub = task.getSubtask(subinterval);
3
            if (sub != null) {
3
            if (sub != null) {
4
                TimePeriod duration = sub.getDuration();
4
                TimePeriod duration = sub.getDuration();
5
                result = new Long(duration.getStart().getTime());
5
                result = new Long(duration.getEnd().getTime());
6
            }
6
            }
7
        }
7
        }
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 declared in the same class
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    if (task != null)
    5
    if (task != null)
    6
    Task sub = task.getSubtask(subinterval);
    6
    Task sub = task.getSubtask(subinterval);
    7
    if (sub != null)
    7
    if (sub != null)
    8
    TimePeriod duration = sub.getDuration();
    8
    TimePeriod duration = sub.getDuration();
    9
    result = new Long(duration.getStart().getTime());
    9
    result = new Long(duration.getStart().getTime());
    9
    result = new Long(duration.getEnd().getTime());
    Differences
    Expression1Expression2Difference
    getStartgetEndMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression duration.getStart() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression duration.getEnd() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    result = new Long(duration.getEnd().getTime());
    Precondition Violations (2)
    Row Violation
    1Expression duration.getStart() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression duration.getEnd() cannot be parameterized, because it has dependencies to/from statements that will be extracted