DESOSA 2022

PMD

PMD is an easy to use, extensible, multi-language static code analysis tool. It is intended to find and report common programming flaws, such as:

  • Unused variables
  • Empty catch blocks
  • Unnecessary object creation
  • Copy-pasted code

PMD is designed to be integrated directly into a build process or continuous integration tools, acting as a automatic quality gate and enforcing code standards within a codebase. PMD provides plugins for several such tools, including Maven, Gradle, Ant, GitHub Actions, and Jenkins, as well as a standalone version for command-line usage.

PMD operates by parsing source files into abstract syntax trees (AST) and applies rules over this tree to detect violations. Alongside pre-configured rules for languages, PMD supports the addition of custom rules to aid users in defining coding standards for their applications. This includes a graphical Rule Designer tool to help in custom rule development.

PMD’s AST analysis supports a variety of languages, including Java, JavaScript, Scala, Apex, Visualforce, and XML. The copy paste detector module (which does not use the AST) functions on most modern programming languages.

Authors

Jerrit Eickhoff

Software Technology track CS Msc student @TU Delft, interested in distributed systems and performance engineering.

Jason Qiu

Artificial Intelligence Technology track CS MSc student @TU Delft

Bailey Tjiong

Master Student Computer Science, Software Technology track.

Liang Zhang

PMD - Scalability

Scalability is a system’s ability to meet its quality requirements in the presence of some strain on the system, such as increased workload or reduced resources. In this essay, we will explore the current performance of PMD at scale and propose reasonable changes to improve the scalability of PMD: PMD’s Scalability Challenges Scalability Quantitative Analysis PMD’s Scalability Concerns Current solutions Proposals of future improvements In Practice - Feasibility Check Testing the Improvement - Validation Procedures References PMD’s Scalability Challenges The PMD static code analysis tool is used in various contexts that each have unique scalability challenges.
PMD
March 27, 2022

PMD - Quality and Evolution

PMD is a powerful code quality analysis tool, but what about the quality of PMD itself? In this essay, we will discuss how PMD’s own quality attributes are fulfilled through the following sections. Software Quality Processes Continuous Integration Test Processes Hotspot Components File-Level Hotspots Package-Level Hotspots Modularity and Serviceability in Hotspots Code Quality Analysis Quality Culture Technical Debt References Software Quality Processes The software quality processes of PMD are equipped with a standardized continuous integration (CI) routine establised with a clear guideline1.
PMD
March 21, 2022

PMD - System Architecture

The main architectural style In PMD - Product Vision, we focused on the vision and context of the PMD project. In this essay, we will focus on a high-level view of the architecture of the system. The main architecture pattern is the pipe and filter pattern1, and the concrete overviews of architectural views are given: The main architectural style Container View Component and Connector Views Development View Documentation Source code Tests Runtime View Key Quality Attributes and Trade-offs API Design Principles Conclusion References According to the workflow documentation of PMD2, the main pattern applied is the pipe and filter pattern1, which has main entities called filters.
PMD
March 14, 2022

PMD - Product Vision

Putting PMD into Context Imagine you are implementing an algorithm for an application using Java. The application is runnable, and you are satisfied by the output because it is exactly what you need. The application gets popular on the Google store, and you decide to add functionalities to attract more users. Some new colleagues are hired to work on the same project. But you find your colleagues are slow to get familiar with the source code.
PMD
March 7, 2022

Contributions