- 浏览: 107677 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
onecan:
分析的很好
大型网站系统架构分析 -
ruanwxh:
为什么我用oracle的例子会出现下面的情况
编绎触发器没错 ...
Oracle触发器介绍 -
lauphai:
不错,拜读了!!!
大型网站系统架构分析 -
shinelgz:
Oracle触发器介绍 -
shinelgz:
Oracle触发器介绍
Below is a list of some tools that can help you examine your Java source code for potential problems:
1. PMD from http://pmd.sourceforge.net/
License: PMD is licensed under a “BSD-style” license
PMD scans Java source code and looks for potential problems like:
* Possible bugs – empty try/catch/finally/switch statements
* Dead code – unused local variables, parameters and private methods
* Suboptimal code – wasteful String/StringBuffer usage
* Overcomplicated expressions – unnecessary if statements, for loops that could be while loops
* Duplicate code – copied/pasted code means copied/pasted bugs
You can download everything from here, and you can get an overview of all the rules at the rulesets index page.
PMD is integrated with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.
PMD能够扫描Java 源代码,查找类似以下的潜在问题:
可能的bug——try/catch/finally/switch语句中返回空值。
死代码——未使用的局部变量、参数、私有方法。
不理想的代码——使用String/StringBuffer。
过于复杂的表达式——没有必要使用if语句、while循环可以代替for循环。
重复代码——复制/粘贴的代码引发的bug。
PMD集成了JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, 以及 Emacs。
2. FindBug from http://findbugs.sourceforge.net
License: L-GPL
FindBugs, a program which uses static analysis to look for bugs in Java code. And since this is a project from my alumni university (IEEE – University of Maryland, College Park – Bill Pugh) , I have to definitely add this contribution to this list.
FindBug是一个使用静态方法来查找Java代码漏洞的程序。
3. Clover from http://www.cenqua.com/clover/
License: Free for Open Source (more like a GPL)
Measures statement, method, and branch coverage and has XML, HTML, and GUI reporting. and comprehensive plug-ins for major IDEs.
* Improve Test Quality
* Increase Testing Productivity
* Keep Team on Track
Fully integrated plugins for NetBeans, Eclipse , IntelliJ IDEA, JBuilder and JDeveloper. These plugins allow you to measure and inspect coverage results without leaving the IDE.
Seamless Integration with projects using Apache Ant and Maven. * Easy integration into legacy build systems with command line interface and API.
Fast, accurate, configurable, detailed coverage reporting of Method, Statement, and Branch coverage.
Rich reporting in HTML, PDF, XML or a Swing GUI
Precise control over the coverage gathering with source-level filtering.
Historical charting of code coverage and other metrics.
Fully compatible with JUnit 3.x & 4.x, TestNG, JTiger and other testing frameworks. Can also be used with manual, functional or integration testing.
这个插件允许你在不离开IDE的环境条件下来衡量和检测覆盖效果。该插件通过使用Apache Ant、Maven来无缝集成其它项目,可以通过命令行界面和API系统轻松集成到传统的构建系统中。
该插件的特性:
支持快速、准确、可配置的方法,语句等。
支持丰富的报告格式:HTML、PDF、XML、以及Swing GUI。
精确控制源代码级别的过滤。
支持代码覆盖以及其它指标的图表。
完全兼容JUnit 3.x & 4.x, TestNG, JTiger以及其它的测试框架。
4. Macker from http://innig.net/macker/
License: GPL
Macker is a build-time architectural rule checking utility for Java developers. It’s meant to model the architectural ideals programmers always dream up for their projects, and then break — it helps keep code clean and consistent. You can tailor a rules file to suit a specific project’s structure, or write some general “good practice” rules for your code. Macker doesn’t try to shove anybody else’s rules down your throat; it’s flexible, and writing a rules file is part of the development process for each unique project.
Macker是一个适用于Java开发人员用来检查架构规则的工具。你可以定制一个适合特定项目架构的规则文件,也可以为您的代码撰写通用的规则说明。
5 EMMA from http://emma.sourceforge.net/
License: EMMA is distributed under the terms of Common Public License v1.0 and is thus free for both open-source and commercial development.
Reports on class, method, basic block, and line coverage (text, HTML, and XML).
EMMA can instrument classes for coverage either offline (before they are loaded) or on the fly (using an instrumenting application classloader).
Supported coverage types: class, method, line, basic block. EMMA can detect when a single source code line is covered only partially.
Coverage stats are aggregated at method, class, package, and “all classes” levels.
Output report types: plain text, HTML, XML. All report types support drill-down, to a user-controlled detail depth. The HTML report supports source code linking.
Output reports can highlight items with coverage levels below user-provided thresholds.
Coverage data obtained in different instrumentation or test runs can be merged together.
EMMA does not require access to the source code and degrades gracefully with decreasing amount of debug information available in the input classes.
EMMA can instrument individial .class files or entire .jars (in place, if desired). Efficient coverage subset filtering is possible, too.
Makefile and ANT build integration are supported on equal footing.
EMMA is quite fast: the runtime overhead of added instrumentation is small (5-20%) and the bytecode instrumentor itself is very fast (mostly limited by file I/O speed). Memory overhead is a few hundred bytes per Java class.
EMMA is 100% pure Java, has no external library dependencies, and works in any Java 2 JVM (even 1.2.x).
EMMA支持的覆盖类型:方法、类等。
输出报告的格式为:文本、HTML、XML。
输出报告可以高亮显示某些项目。
EMMA不需要访问源代码,可以在输入类中减少调试的信息。
6. XRadar from http://xradar.sourceforge.net/
License: BSD (me thinks)
The XRadar is an open extensible code report tool currently supporting all Java based systems. The batch-processing framework produces HTML/SVG reports of the systems current state and the development over time – all presented in sexy tables and graphs.
The XRadar gives measurements on standard software metrics such as package metrics and dependencies, code size and complexity, code duplications, coding violations and code-style violations.
XRadar是一个开放的、为代码生成可扩展报告的工具。目前支持基于Java的所有系统。批量处理的框架可以用来生成HTML/SVG系统的报告。Xradar可以估量代码的大小、复杂性以及代码的重复性、依赖性等。
7. Hammurapi from Hammurapi Group
License: (if anyone knows the license for this email me Venkatt.Guhesan at Y! dot com)
Hammurapi is a tool for execution of automated inspection of Java program code. Following the example of 282 rules of Hammurabi’s code, we are offered over 120 Java classes, the so-called inspectors, which can, at three levels (source code, packages, repository of Java files), state whether the analysed source code contains violations of commonly accepted standards of coding.
Relevant Links:
http://en.sdjournal.org/products/articleInfo/93
http://wiki.hammurapi.biz/index.php?title=Hammurapi_4_Quick_Start
Hammurapi是一款执行Java程序代码的自动检测工具。提供的实例中含有282条Hammurapi代码规则,提供了120多个Java类,这款所谓的检测工具,可以从三个级别来检测代码是否违背了编码标准。
8. Relief from http://www.workingfrog.org/
License: GPL
Relief is a design tool providing a new look on Java projects. Relying on our ability to deal with real objects by examining their shape, size or relative place in space it gives a “physical” view on java packages, types and fields and their relationships, making them easier to handle.
Relif是一款设计工具,为Java项目提供了崭新的面貌。我们可以充分发挥自己的能力来处理真实的实例——通过检测大小、形状、关系等来简化处理过程。
9. Hudson from http://hudson-ci.org/
License: MIT
Hudson is a continuous integration (CI) tool written in Java, which runs in a servlet container, such as Apache Tomcat or the GlassFish application server. It supports SCM tools including CVS, Subversion, Git and Clearcase and can execute Apache Ant and Apache Maven based projects, as well as arbitrary shell scripts and Windows batch commands.
Hudson 是一个持续集成工具,使用Java编写,运行在servlet容器中,比如Apache Tomcat或者或GlassFish应用服务器。它支持SCM工具,包括CVS、Subversion、Git和ClearCase。它可以执行 Apache Ant、基于Apache Maven的项目、以及任意的shell脚本和 Windows批处理命令。
10. Cobertura from http://cobertura.sourceforge.net/
License: GNU GPL
Cobertura is a free Java tool that calculates the percentage of code accessed by tests. It can be used to identify which parts of your Java program are lacking test coverage. It is based on jcoverage.
Cobertura是一个免费的基于jcoverage的Java工具,用于计算代码被测试访问的百分比,它可以被用来确定Java程序中的缺少部分的测试覆盖率。
11. SonarSource from http://www.sonarsource.org/ (recommended by Vishwanath Krishnamurthi – thanks)
License: LGPL
Sonar is an open platform to manage code quality. As such, it covers the 7 axes of code quality:
Architecture & Design, Duplications, Unit Tests, Complexity, Potential bugs, Coding rules, Comments.
Sonar是一个管理代码质量的开放平台。因此,它涵盖了代码质量的7个方面:架构与设计、重复、单元测试、复杂性、潜在错误、编码规则、评论。
发表评论
-
GitHub上最火的74个Android开源项目
2014-03-05 14:28 2122GitHub在中国的火爆程 ... -
代码审查最佳实践 for Java
2012-08-15 11:43 784代码审查可以帮助提高代码质量,避免由于代码习惯而造成的 bug ... -
5个让人激动的Java项目
2012-04-09 14:28 862每个Java/JVM领域的技术专家都应从那些项目中获益, ... -
细说Java GUI:AWT,SWT,Swing
2010-09-19 01:14 7788Overview概述 Jav ... -
使用JMock模拟接口或类
2010-07-14 16:25 2630使用Jmock时,如果给的类型不是一个接口的时候,会抛出一个异 ... -
浅析VO、DTO、DO、PO的概念、区别和用处
2010-06-09 15:18 1828概念: VO(View Object):视图对象,用于展 ... -
使用Java执行JavaScript
2010-06-09 14:58 791一个简单的例子: public static voi ... -
解析Java对象的equals()和hashCode()的使用
2010-06-02 17:27 784前言 在Java语言中, ... -
Java关键字
2010-05-20 10:40 801访问控制: private 私有的。当前类可见prote ... -
Emma: Quick Reference
2010-03-29 21:38 2929Introduction EMMA is an open-s ... -
Java5泛型的用法,T.class的获取和为擦拭法站台
2010-03-29 19:36 881Java 5的泛型语法已 ...
相关推荐
WDSsoft的一款免费源代码 JCT 1.0,它是一个Java加密解密常用工具包。 Java局域网通信——飞鸽传书源代码 28个目标文件 内容索引:JAVA源码,媒体网络,飞鸽传书 Java局域网通信——飞鸽传书源代码,大家都知道VB...
WDSsoft的一款免费源代码 JCT 1.0,它是一个Java加密解密常用工具包。 Java局域网通信——飞鸽传书源代码 28个目标文件 内容索引:JAVA源码,媒体网络,飞鸽传书 Java局域网通信——飞鸽传书源代码,大家都知道VB...
HAHA CHAT Java仿QQ聊天程序源代码.rar html 标记大全.rar iCHAT聊天室基于Java.rar IP定位器.rar J2ME优化压缩PNG文件.rar J2ME冒险游戏CASPER源代码.rar J2me月光战机游戏源码.rar J2ME黑白棋游戏手机版 v2.1完整...
2001年11月,IBM公司捐出价值4,000万美元的源代码组建了Eclipse联盟,并由该联盟负责这种工具的后续开发。集成开发环境(IDE)经常将其应用范围限定在“开发、构建和调试”的周期之中。为了帮助集成开发环境 (IDE)克服...
标准库丰富:Java拥有庞大的类库,如Java SE(Java Standard Edition)包含基础API,用于开发通用应用程序;Java EE(Java Enterprise Edition)提供企业级服务,如Web服务、EJB等;而Java ME(Java Micro Edition...
性能工具:JDK包含了性能监控工具,如Java VisualVM、Java Mission Control等,用于监控和优化Java应用程序的性能。 文档和示例:JDK附带了Java API文档和示例代码,帮助开发人员了解Java类库的使用和功能。 ...
WDSsoft的一款免费源代码 JCT 1.0,它是一个Java加密解密常用工具包。 Java局域网通信——飞鸽传书源代码 28个目标文件 内容索引:JAVA源码,媒体网络,飞鸽传书 Java局域网通信——飞鸽传书源代码,大家都知道...
WDSsoft的一款免费源代码 JCT 1.0,它是一个Java加密解密常用工具包。 Java局域网通信——飞鸽传书源代码 28个目标文件 内容索引:JAVA源码,媒体网络,飞鸽传书 Java局域网通信——飞鸽传书源代码,大家都知道...
WDSsoft的一款免费源代码 JCT 1.0,它是一个Java加密解密常用工具包。 Java局域网通信——飞鸽传书源代码 28个目标文件 内容索引:JAVA源码,媒体网络,飞鸽传书 Java局域网通信——飞鸽传书源代码,大家都知道VB...
WDSsoft的一款免费源代码 JCT 1.0,它是一个Java加密解密常用工具包。 Java局域网通信——飞鸽传书源代码 28个目标文件 内容索引:JAVA源码,媒体网络,飞鸽传书 Java局域网通信——飞鸽传书源代码,大家都知道...
用于构建程序依赖关系图的当前可用框架依赖于编译后的源代码,这需要解决依赖关系。 结果,这些框架无法应用于分析无法自动解决依赖关系的遗留代码库,也无法应用于无法解决依赖关系的大型代码库。 在本文中,我们...
1个目标文件 简单 Java从压缩包中提取文件 1个目标文件 简单 Java存储与读取对象 1个目标文件 如题 Java调色板面板源代码 1个目标文件 摘要:Java源码,窗体界面,调色板 使用Java语言编写的一款用于反映颜色变化的面板...
JAVA+access综合测评系统是一款用于学生综合素质评价的系统,它能够评估学生在知识、技能、态度等方面的表现,为学生提供更加全面的评价结果。该系统采用JAVA语言开发,运用access数据库进行数据存储,具有良好的...
LLVM编译器基础架构,此目录及其子目录包含LLVM的源代码,LLVM是一个用于构建高度优化的编译器、优化器和运行时环境的工具包。LLVM项目有多个组件。该项目的核心本身被称为“LLVM”。这包含处理中间表示并将其转换为...
1个目标文件 简单 Java从压缩包中提取文件 1个目标文件 简单 Java存储与读取对象 1个目标文件 如题 Java调色板面板源代码 1个目标文件 摘要:Java源码,窗体界面,调色板 使用Java语言编写的一款用于反映颜色变化的面板...
该项目不仅是一个学习Java Web开发技术的优秀范例,也是一个可以直接用于实际场景的实用工具。 该系统实现了图书管理的基本功能,包括图书信息的录入、查询、修改和删除等。同时,为了方便用户的使用,系统还提供了...
**资源名称:** 工具箱源代码+书签文件.zip **内容概要:** 该资源为一个工具箱的源代码及书签文件,包含了多个知识领域、技术关键词和内容关键词相关的在线工具。通过该资源,用户可以快速定位并使用各种实用的...
1、资源内容:用于深度学习(ultralytics-Yolo训练)数据集文件整合与预处理小工具+界面截图+源代码+文档说明 2、代码特点:内含运行结果,不会运行可私信,参数化编程、参数可方便更改、代码编程思路清晰、注释明细...
要特性 - 使用最新技术栈,社区资源丰富...3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),仅供学习参考, 切勿用于商业用途。