Files
codeql/java/ql/src/external/MostlySimilarFile.ql
2021-03-25 10:06:10 +01:00

24 lines
668 B
Plaintext

/**
* @deprecated
* @name Mostly similar file
* @description Files in which most of the lines are similar to those in another file make code more
* difficult to understand and introduce a risk of changes being made to only one copy.
* @kind problem
* @problem.severity recommendation
* @precision high
* @id java/similar-file
* @tags testability
* maintainability
* useless-code
* duplicate-code
* statistical
* non-attributable
*/
import java
from File f, File other, int percent
where none()
select f, percent + "% of the lines in " + f.getStem() + " are similar to lines in $@.", other,
other.getStem()