PMD is a Java-based application that aims to assist programmers in correcting their code. Its main purpose is to identify common errors that can affect the efficiency of the execution.
Supported languages and detects errors in code
The application optimizes the code by finding FOR loops that can be transformed in WHILE commands to reduce the syntax complexity and execution time, identifying disposable strings and classes with conditional complexity.
Create rules for correction
The “PMD Rule Designer” is the main component included in the package, designed to help you create custom rules for code correction and error detection, and use them alongside the set of built-in ones that the application comes with. It allows you to input the code you want to process and use the XPath query language or Java classes in order to write new criterion.
Optimize code and ignore literals and annotations
In addition to this, there is another application that can be used for optimizing your code. The PMD Duplicate Code Detector has a name that clearly reveals its purpose.
Relying on the Rabin-Karp string search algorithm, it is intended for exposing duplicate chunks of code in a source directory and export them to your computer in various formats. Optionally, you can set it to include subfolders in the analysis process, as well as ignore literals, identifiers and annotations.
Programmers know that efficiency and accuracy are some of the most important aspects when it comes to coding. Manually correcting the code can be a tedious task, not to mention that some errors might slip away. PMD does not actually find true syntax errors that prevent your code from working properly, but it is a handy tool for spotting inefficient code.
top FREE alternatives