File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/SegmentedTimeline.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/SegmentedTimeline.java | |||
Method name: void addBaseTimelineException(long)
|
Method name: void addBaseTimelineExclusions(long, long)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | while (segment.getSegmentStart() <= baseSegment.getSegmentEnd()) {↵ | 1 | while (segment.getSegmentStart() <= baseExclusionRangeEnd) {↵ | |
2 | if (segment.inIncludeSegments()) {↵ | 2 | if (segment.inIncludeSegments()) {↵ | |
3 | // find all consecutive included segments↵ | 3 | // find all consecutive included segments↵ | |
4 | long fromDomainValue = segment.getSegmentStart();↵ | 4 | long fromDomainValue = segment.getSegmentStart();↵ | |
5 | long toDomainValue;↵ | 5 | long toDomainValue;↵ | |
6 | do {↵ | 6 | do {↵ | |
7 | toDomainValue = segment.getSegmentEnd();↵ | 7 | toDomainValue = segment.getSegmentEnd();↵ | |
8 | segment.inc();↵ | 8 | segment.inc();↵ | |
9 | }↵ | 9 | }↵ | |
10 | while (segment.inIncludeSegments());↵ | 10 | while (segment.inIncludeSegments());↵ | |
11 | // add the interval as an exception↵ | 11 | // add the interval as an exception↵ | |
12 | addException(↵ | 12 | addException(new BaseTimelineSegmentRange(↵ | |
13 | fromDomainValue, toDomainValue);↵ | 13 | fromDomainValue, toDomainValue));↵ | |
14 | }↵ | 14 | }↵ | |
15 | else {↵ | 15 | else {↵ | |
16 | // this is not one of our included segment, skip it↵ | 16 | // this is not one of our included segment, skip it↵ | |
17 | segment.inc();↵ | 17 | segment.inc();↵ | |
18 | }↵ | 18 | }↵ | |
19 | } | 19 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 38 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 12.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | while (segment.getSegmentStart() <= baseSegment.getSegmentEnd()) |
| 7 | while (segment.getSegmentStart() <= baseExclusionRangeEnd) | ||||||||||||||
5 | if (segment.inIncludeSegments()) | 8 | if (segment.inIncludeSegments()) | |||||||||||||||
6 | long fromDomainValue = segment.getSegmentStart(); | 9 | long fromDomainValue = segment.getSegmentStart(); | |||||||||||||||
7 | long toDomainValue; | 10 | long toDomainValue; | |||||||||||||||
10 | do while(segment.inIncludeSegments()) | 13 | do while(segment.inIncludeSegments()) | |||||||||||||||
8 | toDomainValue = segment.getSegmentEnd(); | 11 | toDomainValue = segment.getSegmentEnd(); | |||||||||||||||
9 | segment.inc(); | 12 | segment.inc(); | |||||||||||||||
11 | addException(fromDomainValue, toDomainValue); |
| 14 | addException(new BaseTimelineSegmentRange(fromDomainValue, toDomainValue)); | ||||||||||||||
else | else | |||||||||||||||||
12 | segment.inc(); | 15 | segment.inc(); |
Row | Violation |
---|---|
1 | Expression addException(fromDomainValue,toDomainValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression addException(new BaseTimelineSegmentRange(fromDomainValue,toDomainValue)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression addException(fromDomainValue,toDomainValue) is a void method call, and thus it cannot be parameterized |
4 | Expression addException(new BaseTimelineSegmentRange(fromDomainValue,toDomainValue)) is a void method call, and thus it cannot be parameterized |