737:
293:
198:
164:
136:
32:
312:
that reports on issues found within application code. PMD includes built-in rule sets and supports the ability to write custom rules. PMD does not report compilation errors, as it only can process well-formed source files. Rather, PMD is designed to detect inefficient code or bad programming habits,
438:
805:
558:
810:
418:
270:
115:
800:
49:
466:
53:
96:
68:
313:
which can reduce the performance and maintainability of the program if they accumulate. It can analyze files written in
177:
314:
211:
155:
336:
While PMD does not officially stand for anything, several retro acronyms have been suggested, including for instance
75:
42:
450:
82:
245:
778:
546:
661:
64:
502:
395:
636:
486:
478:
292:
240:
163:
583:
538:
530:
526:
713:
ISSRE '04 Proceedings of the 15th
International Symposium on Software Reliability Engineering
446:
252:
218:
679:
330:
89:
197:
736:
518:
442:
414:
373:
365:
322:
264:
794:
506:
309:
135:
716:
514:
784:
608:
766:
755:
306:
258:
31:
404:—Copied/pasted code can mean copied/pasted bugs, and decreases maintainability.
482:
318:
708:
563:
534:
369:
445:. Unlike PMD, CPD works with a broader range of languages including Java,
498:
494:
751:
510:
458:
223:
761:
746:
613:
522:
351:
PMD is able to detect flaws or possible flaws in source code, like:
454:
413:
PMD is released under a BSDish license while parts of it are under
542:
490:
326:
232:
227:
385:—Unnecessary if statements, for loops that could be while loops.
20:
462:
25:
186:
773:
742:
730:
281:
276:
251:
239:
217:
207:
176:
154:
142:
56:. Unsourced material may be challenged and removed.
662:"Destroy annoying bugs part 4: the end is near"
584:"PMD Release Notes | PMD Source Code Analyzer"
777:Written by the lead developer, Tom Copeland (
8:
709:"A Comparison of Bug Finding Tools for Java"
128:
735:
291:
196:
162:
134:
127:
603:
601:
116:Learn how and when to remove this message
575:
358:—Empty try/catch/finally/switch blocks.
559:List of tools for static code analysis
7:
437:) is an add-on to PMD that uses the
391:—Wasteful String/StringBuffer usage.
54:adding citations to reliable sources
439:Rabin–Karp string search algorithm
14:
271:GNU Lesser General Public License
30:
707:Rutar, Almazan, Foster (2004),
41:needs additional citations for
1:
806:Static program analysis tools
16:Static software analysis tool
338:Programming Mistake Detector
246:Static program analysis tool
811:Free software testing tools
383:Overcomplicated expressions
827:
379:Empty if/while statements.
18:
425:Copy/Paste Detector (CPD)
305:is an open source static
172:
150:
133:
717:doi:10.1109/ISSRE.2004.1
666:freesoftwaremagazine.com
497:, Omnicore's CodeGuide,
19:Not to be confused with
637:"What does 'PMD' mean?"
342:Project Meets Deadline.
801:Java development tools
680:"Tools / Integrations"
396:Cyclomatic Complexity
785:PMD and CPD in Maven
50:improve this article
774:Book: "PMD Applied"
431:Copy/Paste Detector
130:
65:"PMD" software
545:. There is also a
539:Visual Studio Code
394:Classes with high
617:. 18 January 2015
525:, Gel, JCreator,
325:and Visualforce,
300:
299:
126:
125:
118:
100:
818:
787:
776:
764:
739:
734:
733:
731:Official website
695:
694:
692:
690:
676:
670:
669:
658:
652:
651:
649:
647:
633:
627:
626:
624:
622:
605:
596:
595:
593:
591:
580:
447:JavaServer Pages
333:, XML, and XSL.
296:
295:
288:
285:
283:
268:
261:
235:
219:Operating system
200:
195:
192:
190:
188:
166:
138:
131:
121:
114:
110:
107:
101:
99:
58:
34:
26:
826:
825:
821:
820:
819:
817:
816:
815:
791:
790:
783:
772:
767:SourceForge.net
760:
729:
728:
725:
704:
702:Further reading
699:
698:
688:
686:
678:
677:
673:
660:
659:
655:
645:
643:
635:
634:
630:
620:
618:
607:
606:
599:
589:
587:
582:
581:
577:
572:
555:
475:
443:duplicated code
427:
411:
389:Suboptimal code
374:private methods
366:local variables
349:
331:Apache Velocity
290:
280:
263:
257:
231:
203:
185:
168:
146:4 November 2002
143:Initial release
122:
111:
105:
102:
59:
57:
47:
35:
24:
17:
12:
11:
5:
824:
822:
814:
813:
808:
803:
793:
792:
789:
788:
781:
770:
758:
749:
740:
724:
723:External links
721:
720:
719:
703:
700:
697:
696:
671:
653:
628:
597:
574:
573:
571:
568:
567:
566:
561:
554:
551:
474:
471:
426:
423:
415:Apache License
410:
407:
406:
405:
402:Duplicate code
399:
392:
386:
380:
377:
359:
348:
345:
298:
297:
278:
274:
273:
265:Apache License
255:
249:
248:
243:
237:
236:
221:
215:
214:
209:
205:
204:
202:
201:
182:
180:
174:
173:
170:
169:
160:
158:
156:Stable release
152:
151:
148:
147:
144:
140:
139:
124:
123:
38:
36:
29:
15:
13:
10:
9:
6:
4:
3:
2:
823:
812:
809:
807:
804:
802:
799:
798:
796:
786:
782:
779:
775:
771:
768:
763:
759:
757:
753:
750:
748:
744:
741:
738:
732:
727:
726:
722:
718:
714:
710:
706:
705:
701:
685:
681:
675:
672:
667:
663:
657:
654:
642:
638:
632:
629:
616:
615:
610:
604:
602:
598:
586:. 31 May 2024
585:
579:
576:
569:
565:
562:
560:
557:
556:
552:
550:
548:
544:
540:
536:
532:
528:
524:
520:
516:
512:
508:
507:IntelliJ IDEA
504:
500:
496:
492:
488:
484:
480:
472:
470:
468:
464:
460:
456:
452:
448:
444:
440:
436:
432:
424:
422:
420:
416:
408:
403:
400:
398:measurements.
397:
393:
390:
387:
384:
381:
378:
375:
371:
367:
363:
360:
357:
354:
353:
352:
346:
344:
343:
339:
334:
332:
328:
324:
320:
316:
311:
308:
304:
294:
287:
279:
275:
272:
266:
260:
256:
254:
250:
247:
244:
242:
238:
234:
229:
225:
222:
220:
216:
213:
210:
206:
199:
194:
184:
183:
181:
179:
175:
171:
167:/ 31 May 2024
165:
159:
157:
153:
149:
145:
141:
137:
132:
120:
117:
109:
98:
95:
91:
88:
84:
81:
77:
74:
70:
67: –
66:
62:
61:Find sources:
55:
51:
45:
44:
39:This article
37:
33:
28:
27:
22:
712:
687:. Retrieved
684:pmd-code.org
683:
674:
665:
656:
644:. Retrieved
641:pmd-code.org
640:
631:
619:. Retrieved
612:
588:. Retrieved
578:
476:
434:
430:
428:
417:2.0 and the
412:
401:
388:
382:
361:
355:
350:
341:
337:
335:
302:
301:
112:
103:
93:
86:
79:
72:
60:
48:Please help
43:verification
40:
756:SourceForge
307:source code
259:BSD License
161:7.2.0
106:August 2015
795:Categories
570:References
503:Sun Studio
483:JDeveloper
370:parameters
319:JavaScript
208:Written in
178:Repository
76:newspapers
621:13 August
609:"License"
564:SonarQube
549:version.
535:SonarQube
362:Dead code
715:, IEEE,
689:31 March
646:31 March
553:See also
499:NetBeans
495:JBuilder
477:PMD has
441:to find
364:—Unused
347:Features
310:analyzer
590:13 June
531:Jenkins
511:TextPad
487:Eclipse
479:plugins
473:Plugins
459:Fortran
449:(JSP),
409:License
284:.github
277:Website
253:License
224:Windows
90:scholar
747:GitHub
614:GitHub
527:Hudson
523:Gradle
469:code.
465:, and
289:
187:github
92:
85:
78:
71:
63:
543:Emacs
515:Maven
491:jEdit
327:PLSQL
233:macOS
228:Linux
97:JSTOR
83:books
691:2023
648:2023
623:2015
592:2024
541:and
481:for
429:The
419:LGPL
372:and
356:Bugs
340:and
323:Apex
315:Java
241:Type
212:Java
193:/pmd
191:/pmd
189:.com
69:news
21:.pmd
765:on
762:CPD
754:on
752:PMD
745:on
743:PMD
547:CLI
519:Ant
463:PHP
455:C++
435:CPD
303:PMD
286:.io
282:pmd
267:2.0
129:PMD
52:by
797::
780:).
711:.
682:.
664:.
639:.
611:.
600:^
537:,
533:,
529:,
521:,
517:,
513:,
509:,
505:,
493:,
489:,
485:,
467:C#
461:,
457:,
453:,
421:.
368:,
329:,
321:,
317:,
269:,
262:,
230:,
226:,
769:.
693:.
668:.
650:.
625:.
594:.
501:/
451:C
433:(
376:.
119:)
113:(
108:)
104:(
94:·
87:·
80:·
73:·
46:.
23:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.