PMD Results
The following document contains the results of PMD 7.17.0.
Violations By Priority
Priority 1
coder - io/github/magwas/coder/FileDeletionService.java
coder - io/github/magwas/coder/FileWriterService.java
coder - io/github/magwas/coder/OpenRouterClientService.java
coder - io/github/magwas/coder/XMLFileWriterService.java
Priority 2
coder - io/github/magwas/coder/CoderApplication.java
coder - io/github/magwas/coder/SourceCodeReaderService.java
Priority 3
coder - io/github/magwas/coder/CoderApplication.java
coder - io/github/magwas/coder/ConfigService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
9 |
| AutowiredFields |
@Autowired fields naming conventions |
12 |
| ServiceClassMethods |
Services have only public apply method |
14 |
| SignatureDeclareThrowsException |
A method/constructor should not explicitly throw java.lang.Exception |
14 |
| ServiceClassMethods |
Services have only public apply method |
18 |
coder - io/github/magwas/coder/ConsoleInputService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
12 |
| AppendCharacterWithChar |
Avoid appending characters as strings in StringBuffer.append. |
26 |
coder - io/github/magwas/coder/ConversationAddMessageService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
11 |
| MethodArgumentCouldBeFinal |
Parameter 'message' is not assigned and could be declared final |
13 |
| LooseCoupling |
Avoid using implementation types like 'ArrayList'; use the interface instead |
18 |
coder - io/github/magwas/coder/ConversationClearService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
11 |
| UseExplicitTypes |
Use Explicit Types |
14 |
coder - io/github/magwas/coder/ConversationGetMessagesService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
9 |
coder - io/github/magwas/coder/ConversationHasSystemInstructionsService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
9 |
coder - io/github/magwas/coder/ConversationSetupService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
11 |
| AutowiredFields |
@Autowired fields naming conventions |
14 |
| AutowiredFields |
@Autowired fields naming conventions |
17 |
| LooseCoupling |
Avoid using implementation types like 'ArrayList'; use the interface instead |
25 |
| MethodArgumentCouldBeFinal |
Parameter 'instructions' is not assigned and could be declared final |
34 |
| MethodArgumentCouldBeFinal |
Parameter 'sourceCode' is not assigned and could be declared final |
34 |
| UseStringBufferForStringAppends |
Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings |
40 |
| UseStringBufferForStringAppends |
Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings |
42 |
| FieldDeclarationsShouldBeAtStartOfClass |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. |
46 |
| ServiceClassField |
Services have only @Autowired fields |
46 |
coder - io/github/magwas/coder/ConversationSizeService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
9 |
coder - io/github/magwas/coder/ConversationStateComponent.java
| Rule |
Violation |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
9 |
coder - io/github/magwas/coder/ConversationStateData.java
| Rule |
Violation |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
7 |
coder - io/github/magwas/coder/DirectoryComponent.java
| Rule |
Violation |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
9 |
coder - io/github/magwas/coder/ErrorMessages.java
| Rule |
Violation |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
3 |
coder - io/github/magwas/coder/FileDeletionService.java
coder - io/github/magwas/coder/FileService.java
coder - io/github/magwas/coder/FileWriterService.java
coder - io/github/magwas/coder/LineReaderComponent.java
| Rule |
Violation |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
12 |
coder - io/github/magwas/coder/OpenRouterClientService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
14 |
| AutowiredFields |
@Autowired fields naming conventions |
17 |
| AutowiredFields |
@Autowired fields naming conventions |
20 |
| AutowiredFields |
@Autowired fields naming conventions |
23 |
| AutowiredFields |
@Autowired fields naming conventions |
26 |
| AutowiredFields |
@Autowired fields naming conventions |
29 |
| ServiceClassField |
Services have only @Autowired fields |
31 |
| MethodArgumentCouldBeFinal |
Parameter 'question' is not assigned and could be declared final |
33 |
| AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
57 |
coder - io/github/magwas/coder/OpenRouterRequestService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
12 |
| MethodArgumentCouldBeFinal |
Parameter 'messages' is not assigned and could be declared final |
14 |
coder - io/github/magwas/coder/OpenRouterResponseService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
16 |
| AutowiredFields |
@Autowired fields naming conventions |
19 |
| AutowiredFields |
@Autowired fields naming conventions |
22 |
| MethodArgumentCouldBeFinal |
Parameter 'responseBody' is not assigned and could be declared final |
24 |
| AvoidDeeplyNestedIfStmts |
Deeply nested if..then statements are hard to read |
31–33 |
| AvoidDeeplyNestedIfStmts |
Deeply nested if..then statements are hard to read |
34–37 |
coder - io/github/magwas/coder/PathUtil.java
coder - io/github/magwas/coder/SourceCodeReaderService.java
coder - io/github/magwas/coder/XMLFileWriterService.java
| Rule |
Violation |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
15 |
| AutowiredFields |
@Autowired fields naming conventions |
18 |
| AutowiredFields |
@Autowired fields naming conventions |
21 |
| MethodArgumentCouldBeFinal |
Parameter 'xmlContent' is not assigned and could be declared final |
23 |
| MethodArgumentCouldBeFinal |
Parameter 'path' is not assigned and could be declared final |
41 |
| MethodArgumentCouldBeFinal |
Parameter 'currentDir' is not assigned and could be declared final |
41 |
coder - io/github/magwas/coder/XmlProcessingUtil.java
coder - io/github/magwas/coder/XmlUtil.java
coder - io/github/magwas/coder/tests/XMLFileWriterServiceTest.java
Priority 4
coder - io/github/magwas/coder/FileWriterService.java
| Rule |
Violation |
Line |
| UnnecessaryFullyQualifiedName |
Unnecessary qualifier 'ErrorMessages': 'FILE_ERROR' is already in scope because it is inherited by an enclosing type |
19 |
coder - io/github/magwas/coder/OpenRouterRequestService.java
| Rule |
Violation |
Line |
| UseVarargs |
Consider using varargs for methods or constructors which take an array the last parameter. |
14 |
Files
coder - io/github/magwas/coder/CoderApplication.java
coder - io/github/magwas/coder/ConfigService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
9 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
12 |
| ServiceClassMethods |
Services have only public apply method |
3 |
14 |
| SignatureDeclareThrowsException |
A method/constructor should not explicitly throw java.lang.Exception |
3 |
14 |
| ServiceClassMethods |
Services have only public apply method |
3 |
18 |
coder - io/github/magwas/coder/ConsoleInputService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
12 |
| AppendCharacterWithChar |
Avoid appending characters as strings in StringBuffer.append. |
3 |
26 |
coder - io/github/magwas/coder/ConversationAddMessageService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
11 |
| MethodArgumentCouldBeFinal |
Parameter 'message' is not assigned and could be declared final |
3 |
13 |
| LooseCoupling |
Avoid using implementation types like 'ArrayList'; use the interface instead |
3 |
18 |
coder - io/github/magwas/coder/ConversationClearService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
11 |
| UseExplicitTypes |
Use Explicit Types |
3 |
14 |
coder - io/github/magwas/coder/ConversationGetMessagesService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
9 |
coder - io/github/magwas/coder/ConversationHasSystemInstructionsService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
9 |
coder - io/github/magwas/coder/ConversationSetupService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
11 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
14 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
17 |
| LooseCoupling |
Avoid using implementation types like 'ArrayList'; use the interface instead |
3 |
25 |
| MethodArgumentCouldBeFinal |
Parameter 'instructions' is not assigned and could be declared final |
3 |
34 |
| MethodArgumentCouldBeFinal |
Parameter 'sourceCode' is not assigned and could be declared final |
3 |
34 |
| UseStringBufferForStringAppends |
Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings |
3 |
40 |
| UseStringBufferForStringAppends |
Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings |
3 |
42 |
| FieldDeclarationsShouldBeAtStartOfClass |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. |
3 |
46 |
| ServiceClassField |
Services have only @Autowired fields |
3 |
46 |
coder - io/github/magwas/coder/ConversationSizeService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
9 |
coder - io/github/magwas/coder/ConversationStateComponent.java
| Rule |
Violation |
Priority |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
3 |
9 |
coder - io/github/magwas/coder/ConversationStateData.java
| Rule |
Violation |
Priority |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
3 |
7 |
coder - io/github/magwas/coder/DirectoryComponent.java
| Rule |
Violation |
Priority |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
3 |
9 |
coder - io/github/magwas/coder/ErrorMessages.java
| Rule |
Violation |
Priority |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
3 |
3 |
coder - io/github/magwas/coder/FileDeletionService.java
coder - io/github/magwas/coder/FileService.java
coder - io/github/magwas/coder/FileWriterService.java
coder - io/github/magwas/coder/LineReaderComponent.java
| Rule |
Violation |
Priority |
Line |
| ClassesShouldBeKnown |
Classes should be either Data, Service,Controller,Repository |
3 |
12 |
coder - io/github/magwas/coder/OpenRouterClientService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
14 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
17 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
20 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
23 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
26 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
29 |
| ServiceClassField |
Services have only @Autowired fields |
3 |
31 |
| MethodArgumentCouldBeFinal |
Parameter 'question' is not assigned and could be declared final |
3 |
33 |
| AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
3 |
57 |
| AvoidThrowingRawExceptionTypes |
Avoid throwing raw exception type RuntimeException. |
1 |
58 |
coder - io/github/magwas/coder/OpenRouterRequestService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
12 |
| UseVarargs |
Consider using varargs for methods or constructors which take an array the last parameter. |
4 |
14 |
| MethodArgumentCouldBeFinal |
Parameter 'messages' is not assigned and could be declared final |
3 |
14 |
coder - io/github/magwas/coder/OpenRouterResponseService.java
| Rule |
Violation |
Priority |
Line |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
16 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
19 |
| AutowiredFields |
@Autowired fields naming conventions |
3 |
22 |
| MethodArgumentCouldBeFinal |
Parameter 'responseBody' is not assigned and could be declared final |
3 |
24 |
| AvoidDeeplyNestedIfStmts |
Deeply nested if..then statements are hard to read |
3 |
31–33 |
| AvoidDeeplyNestedIfStmts |
Deeply nested if..then statements are hard to read |
3 |
34–37 |
coder - io/github/magwas/coder/PathUtil.java
coder - io/github/magwas/coder/SourceCodeReaderService.java
coder - io/github/magwas/coder/XMLFileWriterService.java
coder - io/github/magwas/coder/XmlProcessingUtil.java
coder - io/github/magwas/coder/XmlUtil.java
coder - io/github/magwas/coder/tests/XMLFileWriterServiceTest.java