Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions java/ql/src/Metrics/Internal/Extents.qll
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import java
* including the body (if any), as opposed to the location of its name only.
*/
class RangeCallable extends Callable {
predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
exists(int elSuper, int ecSuper | super.hasLocationInfo(path, sl, sc, elSuper, ecSuper) |
this.getBody().hasLocationInfo(path, _, _, el, ec)
or
Expand All @@ -39,7 +39,7 @@ class RangeCallable extends Callable {
* including the range of its members (if any), as opposed to the location of its name only.
*/
class RangeRefType extends RefType {
predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
exists(int elSuper, int ecSuper | super.hasLocationInfo(path, sl, sc, elSuper, ecSuper) |
lastMember().hasLocationInfo(path, _, _, el, ec)
or
Expand Down
6 changes: 4 additions & 2 deletions java/ql/src/external/CodeDuplication.qll
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ class Copy extends @duplication_or_similarity {
}

class DuplicateBlock extends Copy, @duplication {
string toString() { result = "Duplicate code: " + sourceLines() + " duplicated lines." }
override string toString() { result = "Duplicate code: " + sourceLines() + " duplicated lines." }
}

class SimilarBlock extends Copy, @similarity {
string toString() { result = "Similar code: " + sourceLines() + " almost duplicated lines." }
override string toString() {
result = "Similar code: " + sourceLines() + " almost duplicated lines."
}
}

Method sourceMethod() { hasLocation(result, _) and numlines(result, _, _, _) }
Expand Down