mirror of
https://github.com/github/codeql.git
synced 2026-01-03 17:50:19 +01:00
24 lines
729 B
Plaintext
24 lines
729 B
Plaintext
/**
|
|
* @deprecated
|
|
* @name Mostly duplicate method
|
|
* @description Methods in which most of the lines are duplicated in another method 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-method
|
|
* @tags testability
|
|
* maintainability
|
|
* useless-code
|
|
* duplicate-code
|
|
* statistical
|
|
* non-attributable
|
|
*/
|
|
|
|
import java
|
|
|
|
from Method m, Method other, int percent
|
|
where none()
|
|
select m, percent + "% of the statements in " + m.getName() + " are duplicated in $@.", other,
|
|
other.getDeclaringType().getName() + "." + other.getStringSignature()
|