Submission deadline: 31 August 2020, 11.59pm
You do not need to modify this README.md
file. No late submission for the coding assignment will be accepted so any late submission after 11.59pm on 31 August 2020 will get a 0.
You will need to write Junit test cases in BITreeTest.java
and ParserTest.java
in ${projectRootPath}/src/test/java
folder for the ${projectRootPath}/src/main/java/BITree.java
and ${projectRootPath}/src/main/java/Parser.java
.
ATTENTION:
- Do not change the folder structure, please directly write your
JUnit
test cases in corresponding files. - Do not simplify source code to reduce the complexity of writing test cases. We will test your test file using our original main file.
- Do not use Evosuite to generate test cases. Otherwise, you will get a 0.
Run two test files with coverage with JaCoCo coverage runner. Your score will be the Branch coverage rate of Parser class * 30.
You will need to modify ${projectRootPath}/src/main/java/BITree.java
and ${projectRootPath}/src/main/java/Parser.java
to reduce all errors reported by three static analysis tools include SpotBugs, Checkstyle and PMD. The total number of errors in all three reports is 178. Your score will be (178 - errors in your reports) / 178 * 30.
static analysis tools | Errors |
---|---|
SpotBugs | 5 |
Checkstyle | 160 |
PMD | 13 |
ATTENTION:
- Rebuild project before run SpotBugs.
- Do not modify
pom.xml
. - Do not add @SuppressWarnings annotation.
- Do not delete source code to reduce errors, we have test cases to ensure the complexity.
- Do not modify or delete
google_checks.xml
which is provided for Checkstyle.
-
VPN problem: Set Maven mirror
settings.xml
是maven
的配置文件,用户配置文件存放于${user.home}/.m2/
目录下 -
Maven plugin usages (IntelliJ IDE)
-
- Goal: check
- Output:
${projectRootPath}/target/spotbugsXml.xml
- Output:
- Goal: gui
- launches SpotBugs GUI to check analysis result.
- Goal: check
-
- Put
google_checks.xml
to project root path - Goal: checkstyle
- Put
-
** checkstyle.html Output:**.
${projectRootPath}/target/checkstyle-checker.xml
,${projectRootPath}/target/checkstyle-result.xml
,${projectRootPath}/target/site/checkstyle.html
... etc -
- Goal: check
- Output:
${projectRootPath}/target/pmd.xml
,${projectRootPath}/target/site/pmd.html
-
The way that we will use to score.
-
Branch
-
Static Analysis Tool