An apparent infinite loop (IL_INFINITE_LOOP)
This loop doesn't seem to have a way to terminate (other than by perhaps throwing an exception).
IT1901 Fall 2020 - 11th Lecture
automated tests
coding standards and consistent formatting
check for higher level types of errors (bug patterns)
Checkstyle (https://checkstyle.sourceforge.io/index.html)
Spotbugs (https://spotbugs.readthedocs.io/en/latest/index.html)
Pmd (https://pmd.github.io)
Sonarcube (https://www.sonarqube.org/)
…
static analysis
finds errors like
references to variables with undefined value
variables that are never used
syntax and coding standards violations
dead code blocks
naming conventions
line length
whitespace
Javadoc comments
annotations
can be configured to use a certain set of checks
extendable - one can write own checks
plugins for IDEs
checks bytecode and not the source
looks for "bug patterns"
example:
An apparent infinite loop (IL_INFINITE_LOOP)
This loop doesn't seem to have a way to terminate (other than by perhaps throwing an exception).
extendable
plugins for Maven Gradle Ant
Eclipse IDE integration