Common Java code optimization and analysis tools

Source: Internet
Author: User
Tags apache tomcat

Original article: http://java.dzone.com/articles/java-tools-source-code

1.PMDFrom

Http://pmd.sourceforge.net/

PMD can scan Java source code to find potential problems similar to the following:

  • Potential bug -- a null value is returned in the try/catch/finally/switch statement.
  • Dead Code-unused local variables, parameters, and private methods.
  • Unreasonable code-use string/stringbuffer.
  • Overly complex expressions-there is no need to use the if statement or the while loop to replace the for loop.
  • Duplicate code-A bug caused by the copy/paste code.

It integrates jdeveloper, Eclipse, jedit, JBuilder, bluej, codeguide, netbeans/Sun Java Studio Enterprise/creator, intellij idea, textpad, Maven, ant, gel, jcreator, and Emacs.

2.FindbugFrom

Http://findbugs.sourceforge.net

Findbug is a program that uses static methods to find Java code vulnerabilities.

3.CloverFrom

Http://www.cenqua.com/clover/

This plugin allows you to measure and detect coverage without leaving the IDE environment. By using Apache ant and Maven, this plug-in can seamlessly integrate other projects. It can be easily integrated into traditional build systems through the command line interface and API system.

Features of this plug-in:

  • Supports fast, accurate, and configurable methods and statements.
  • Supports rich report formats: HTML, PDF, XML, and swing GUI.
  • Precisely control source code filtering.
  • Supports code coverage and other metrics charts.
  • Fully compatible with JUnit 3.x & 4.X, testng, jtiger, and other testing frameworks.

4.MacerFrom

Http://innig.net/macker/

Macer is a tool used by Java developers to check architecture rules. You can customize a rule file suitable for a specific project architecture, or write a general rule description for your code.

5.EmmaFrom

Http://emma.sourceforge.net/

  • Emma supports override types: Methods and classes.
  • The output report format is text, HTML, and XML.
  • Some projects can be highlighted in the output report.
  • Emma does not need to access source code. You can reduce debugging information in the input class.

6.XradarFrom

Http://xradar.sourceforge.net/

Xradar is an open tool for generating scalable reports for code. Currently, all Java-based systems are supported. The batch processing framework can be used to generate reports of HTML/SVG systems. Xradar can estimate the code size, complexity, code repeatability, and dependency.

7.HammurapiFrom

Http://www.hammurapi.com

Hammurapi is an automatic detection tool that executes Java program code. The provided instance contains 282 hammurapi Code rules and more than 120 Java classes. This so-called detection tool can detect whether the Code violates the encoding standards at three levels.

8.ReliefFrom

Http://www.workingfrog.org/

Relif is a design tool that provides a brand new look for Java projects. We can make full use of our capabilities to process real instances-by checking the size, shape, and relationship to simplify the processing process.

9.HudsonFrom http://hudson-ci.org/

Hudson is a continuous integration tool written in Java and run in servlet containers, such as Apache Tomcat or glassfish application server. It supports SCM tools, including CVs, subversion, git, and clearcase. It can execute Apache ant, Apache Maven-based projects, arbitrary shell scripts, and Windows batch processing commands.

10.CoberturaFromhttp: // cobertura.sourceforge.net/

Cobertura is a free jcoverage-based Java tool used to calculate the percentage of access to tested code. It can be used to determine the test coverage of the missing part of the Java program.

11.SonarsourceFrom

Http://www.sonarsource.org/

Sonar is an open platform for managing code quality. Therefore, it covers seven aspects of code quality: architecture and design, repetition, unit testing, complexity, potential errors, coding rules, and comments.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.