PMD Results

The following document contains the results of PMD 5.2.3.

Files

locklib/FifoWaitQueue.java

Violation Line
Generics names should be a one letter long and upper case. 15
Avoid using implementation types like 'LinkedList'; use the interface instead 19
Private field 'm_queue' could be made final; it is only initialized in the declaration or constructor. 19
Private field 'm_set' could be made final; it is only initialized in the declaration or constructor. 24
Potential violation of Law of Demeter (method chain calls) 36

locklib/FifoWaitQueueFactory.java

Violation Line
Generics names should be a one letter long and upper case. 7
Document empty constructor 12–13

locklib/LockGrant.java

Violation Line
Generics names should be a one letter long and upper case. 46
Private field 'm_request' could be made final; it is only initialized in the declaration or constructor. 50
Private field 'm_target' could be made final; it is only initialized in the declaration or constructor. 55
Private field 'm_predecessor' could be made final; it is only initialized in the declaration or constructor. 60
Avoid if (x != y) ..; else ..; 126–139
Potential violation of Law of Demeter (method chain calls) 179

locklib/LockGrantFuture.java

Violation Line
Generics names should be a one letter long and upper case. 35
Private field 'm_request' could be made final; it is only initialized in the declaration or constructor. 39
Private field 'm_target' could be made final; it is only initialized in the declaration or constructor. 44
Private field 'm_predecessor_future' could be made final; it is only initialized in the declaration or constructor. 55
The String literal "m_grant != null" appears 4 times in this file; the first occurrence is on line 101 101
The String literal "m_cancelled" appears 4 times in this file; the first occurrence is on line 103 103
Potential violation of Law of Demeter (object not created locally) 153
Avoid if (x != y) ..; else ..; 230–250

locklib/LockManager.java

Violation Line
Generics names should be a one letter long and upper case. 12
Private field 'm_policy' could be made final; it is only initialized in the declaration or constructor. 16
Private field 'm_api' could be made final; it is only initialized in the declaration or constructor. 32

locklib/LockManagerListener.java

Violation Line
Generics names should be a one letter long and upper case. 8

locklib/LockPolicy.java

Violation Line
Generics names should be a one letter long and upper case. 9

locklib/LockPreChecker.java

Violation Line
Generics names should be a one letter long and upper case. 10

locklib/LockRequest.java

Violation Line
Generics names should be a one letter long and upper case. 10
Private field 'm_type' could be made final; it is only initialized in the declaration or constructor. 14
Private field 'm_holder' could be made final; it is only initialized in the declaration or constructor. 19

locklib/NullLockPreChecker.java

Violation Line
Generics names should be a one letter long and upper case. 8

locklib/Target.java

Violation Line
Possible God class (WMC=62, ATFD=11, TCC=0.10833333333333334) 1–676
The class 'Target' has a Cyclomatic Complexity of 4 (Highest = 11). 51–676
The class 'Target' has a Standard Cyclomatic Complexity of 4 (Highest = 10). 51–676
Generics names should be a one letter long and upper case. 51
The class 'Target' has a Modified Cyclomatic Complexity of 4 (Highest = 10). 51–676
The method parent() has an NPath complexity of 336 109–161
The method 'parent' has a Standard Cyclomatic Complexity of 10. 109–161
The method 'parent' has a Cyclomatic Complexity of 11. 109–161
The method 'parent' has a Modified Cyclomatic Complexity of 10. 109–161
Use equals() to compare object references. 110
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 125
Potential violation of Law of Demeter (object not created locally) 148
Potential violation of Law of Demeter (method chain calls) 246–247
Potential violation of Law of Demeter (object not created locally) 262
Potential violation of Law of Demeter (object not created locally) 263
Potential violation of Law of Demeter (method chain calls) 264
Potential violation of Law of Demeter (object not created locally) 264
Potential violation of Law of Demeter (method chain calls) 266
Potential violation of Law of Demeter (object not created locally) 313
Potential violation of Law of Demeter (object not created locally) 317
Potential violation of Law of Demeter (object not created locally) 327
Potential violation of Law of Demeter (object not created locally) 397
Potential violation of Law of Demeter (object not created locally) 399
Potential violation of Law of Demeter (object not created locally) 400
Potential violation of Law of Demeter (object not created locally) 400
Potential violation of Law of Demeter (object not created locally) 414
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 414
Potential violation of Law of Demeter (object not created locally) 415
Potential violation of Law of Demeter (object not created locally) 416
Potential violation of Law of Demeter (object not created locally) 419
Potential violation of Law of Demeter (object not created locally) 420
Potential violation of Law of Demeter (object not created locally) 421
Potential violation of Law of Demeter (object not created locally) 422
Potential violation of Law of Demeter (object not created locally) 422
Avoid declaring a variable if it is unreferenced before a possible exit point. 442
Potential violation of Law of Demeter (object not created locally) 459
Potential violation of Law of Demeter (method chain calls) 467
Potential violation of Law of Demeter (object not created locally) 479
Potential violation of Law of Demeter (object not created locally) 480
Potential violation of Law of Demeter (method chain calls) 480
The method 'can_grant' has a Cyclomatic Complexity of 11. 490–545
Potential violation of Law of Demeter (method chain calls) 499
Potential violation of Law of Demeter (object not created locally) 499
Potential violation of Law of Demeter (object not created locally) 501
Potential violation of Law of Demeter (method chain calls) 501
Potential violation of Law of Demeter (method chain calls) 501–502
Potential violation of Law of Demeter (method chain calls) 501–502
Potential violation of Law of Demeter (method chain calls) 507
These nested if statements could be combined 513–540
Potential violation of Law of Demeter (method chain calls) 524
Potential violation of Law of Demeter (method chain calls) 559
Potential violation of Law of Demeter (object not created locally) 612
Avoid if (x != y) ..; else ..; 625–629
Potential violation of Law of Demeter (method chain calls) 626
Potential violation of Law of Demeter (object not created locally) 626
Private field 'm_granted' could be made final; it is only initialized in the declaration or constructor. 641
Private field 'm_successor' could be made final; it is only initialized in the declaration or constructor. 648

locklib/WaitQueue.java

Violation Line
Generics names should be a one letter long and upper case. 10
Abstract classes should be named AbstractXXX 10–30
Document empty constructor 15–16

locklib/WaitQueueFactory.java

Violation Line
Generics names should be a one letter long and upper case. 7

locklib/mutex/MutexLockPolicy.java

Violation Line
Document empty constructor 14–15

locklib/sx/SxLockPolicy.java

Violation Line
Private field 'm_starvation_allowed' could be made final; it is only initialized in the declaration or constructor. 14