PMD Results

The following document contains the results of PMD 7.17.0.

Violations By Priority

Priority 1

civitas.base - civitas/common/tests/TestUtil.java

Rule Violation Line
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type Error. 33

Priority 3

civitas.base - civitas/common/ballotdesign/BallotDesign.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 16

civitas.base - civitas/crypto/CryptoError.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 9

civitas.base - civitas/crypto/ciphertext/ElGamalCiphertext.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 14

civitas.base - civitas/crypto/ciphertext/ElGamalCiphertextish.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 5

civitas.base - civitas/crypto/msg/CryptMessage.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 5
ShortMethodName Avoid using short method names 6

civitas.base - civitas/crypto/parameters/ElGamalParameters.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 14

civitas.base - civitas/crypto/parameters/PrimePair.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 16

civitas.base - civitas/crypto/publickey/ElGamalPublicKey.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 20

civitas.base - civitas/crypto/signedciphertext/ElGamalSignedCiphertext.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 15

civitas.base - civitas/util/CivitasBigInteger.java

Rule Violation Line
CyclomaticComplexity The class 'CivitasBigInteger' has a total cyclomatic complexity of 20 (highest 3). 14

civitas.base - civitas/util/CivitasBigIntegerFactory.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 6

civitas.base - civitas/util/CivitasBigIntegerInterface.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 7

civitas.base - civitas/util/CivitasBigintegerBase.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 5

civitas.base - civitas/util/GetCurrentTime.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 6

civitas.base - civitas/util/InitialTests.java

Rule Violation Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 15
UnitTestShouldUseTestAnnotation Unit tests should use the @Test annotation or wont be run. In case of JUnit 5, test methods might use @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest annotations instead. 25

civitas.base - civitas/common/tests/ConstructTestData.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 11

civitas.base - civitas/common/tests/RandomAnswer.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 9
RedundantFieldInitializer Avoid using redundant field initializer for 'step' 10
MutableStaticState Do not use non-final non-private static fields 10

civitas.base - civitas/common/tests/RandomAwareTestBase.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 7
MutableStaticState Do not use non-final non-private static fields 8

civitas.base - civitas/common/tests/RandomFillerAnswer.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 8

civitas.base - civitas/common/tests/TestUtil.java

Rule Violation Line
RedundantFieldInitializer Avoid using redundant field initializer for 'n' 11
MutableStaticState Do not use non-final non-private static fields 11
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 32
AssignmentInOperand Avoid assignment to n in operand 40

civitas.base - civitas/crypto/ciphertext/tests/ElGamalCiphertextTestData.java

Rule Violation Line
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 43

civitas.base - civitas/crypto/msg/tests/ElgamalMsgTestData.java

Rule Violation Line
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 15

civitas.base - civitas/util/tests/BasicValuesTestData.java

Rule Violation Line
UseUnderscoresInNumericLiterals Number 7166760217683588212L should separate every third digit with an underscore 18
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 20
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 23
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 86

civitas.base - civitas/util/tests/InitialTestsTest.java

Rule Violation Line
UnitTestShouldIncludeAssert This unit test should include assert() or fail() 14

civitas.base - civitas/util/tests/ReaderAnswer.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 12
CloseResource Ensure that resources like this Reader object are closed after use 22

civitas.base - civitas/util/tests/XMLAnswer.java

Rule Violation Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 8

Files

civitas.base - civitas/common/ballotdesign/BallotDesign.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 16

civitas.base - civitas/crypto/CryptoError.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 9

civitas.base - civitas/crypto/ciphertext/ElGamalCiphertext.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 14

civitas.base - civitas/crypto/ciphertext/ElGamalCiphertextish.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 5

civitas.base - civitas/crypto/msg/CryptMessage.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 5
ShortMethodName Avoid using short method names 3 6

civitas.base - civitas/crypto/parameters/ElGamalParameters.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 14

civitas.base - civitas/crypto/parameters/PrimePair.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 16

civitas.base - civitas/crypto/publickey/ElGamalPublicKey.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 20

civitas.base - civitas/crypto/signedciphertext/ElGamalSignedCiphertext.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 15

civitas.base - civitas/util/CivitasBigInteger.java

Rule Violation Priority Line
CyclomaticComplexity The class 'CivitasBigInteger' has a total cyclomatic complexity of 20 (highest 3). 3 14

civitas.base - civitas/util/CivitasBigIntegerFactory.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 6

civitas.base - civitas/util/CivitasBigIntegerInterface.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 7

civitas.base - civitas/util/CivitasBigintegerBase.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 5

civitas.base - civitas/util/GetCurrentTime.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 6

civitas.base - civitas/util/InitialTests.java

Rule Violation Priority Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 15
UnitTestShouldUseTestAnnotation Unit tests should use the @Test annotation or wont be run. In case of JUnit 5, test methods might use @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest annotations instead. 3 25

civitas.base - civitas/common/tests/ConstructTestData.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 11

civitas.base - civitas/common/tests/RandomAnswer.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 9
RedundantFieldInitializer Avoid using redundant field initializer for 'step' 3 10
MutableStaticState Do not use non-final non-private static fields 3 10

civitas.base - civitas/common/tests/RandomAwareTestBase.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 7
MutableStaticState Do not use non-final non-private static fields 3 8

civitas.base - civitas/common/tests/RandomFillerAnswer.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 8

civitas.base - civitas/common/tests/TestUtil.java

Rule Violation Priority Line
RedundantFieldInitializer Avoid using redundant field initializer for 'n' 3 11
MutableStaticState Do not use non-final non-private static fields 3 11
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 32
AvoidThrowingRawExceptionTypes Avoid throwing raw exception type Error. 1 33
AssignmentInOperand Avoid assignment to n in operand 3 40

civitas.base - civitas/crypto/ciphertext/tests/ElGamalCiphertextTestData.java

Rule Violation Priority Line
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 3 43

civitas.base - civitas/crypto/msg/tests/ElgamalMsgTestData.java

Rule Violation Priority Line
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 3 15

civitas.base - civitas/util/tests/BasicValuesTestData.java

Rule Violation Priority Line
UseUnderscoresInNumericLiterals Number 7166760217683588212L should separate every third digit with an underscore 3 18
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 3 20
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 3 23
RelianceOnDefaultCharset Specify a character set instead of relying on the default charset 3 86

civitas.base - civitas/util/tests/InitialTestsTest.java

Rule Violation Priority Line
UnitTestShouldIncludeAssert This unit test should include assert() or fail() 3 14

civitas.base - civitas/util/tests/ReaderAnswer.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 12
CloseResource Ensure that resources like this Reader object are closed after use 3 22

civitas.base - civitas/util/tests/XMLAnswer.java

Rule Violation Priority Line
ClassesShouldBeKnown Classes should be either Data, Service,Controller,Repository 3 8