CodeReview of JDK Source Code
jdk1.6.0_35/src.zip, only java package is reviewd(full package review caused a OutofMemory on java heap size).
Checkstyle Review
tyRules.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
Run code review
java -jar checkstyle-5.6-all.jar -c tyRules.xml -r /home/chad/tmp/jdksrc -o result.txt
Get Review Result
grep "Method length is" result.txt|wc -l
grep "Nested if-else depth is" result.txt|wc -l
grep "More than 6 parameters" result.txt|wc -l
grep "max allowed is 1,000" result.txt|wc -l
grep "Found duplicate of" result.txt|wc -l
grep "Cyclomatic Complexity is" result.txt|wc -l
Sonar Review
sonar-project.properties:
sonar.projectKey=jdk.sonar.analysis
sonar.projectName=JDK
sonar.projectVersion=1.6
sonar.sources=jdksrc
sonar.login=liuyan
sonar.password=liuyan
sonar.language=java
sonar.profile=TongYong
sonar.skipDesign=true
sonar.dynamicAnalysis=false
Run code review
/opt/sonar-server/runner/sonar-runner-2.2/bin/sonar-runner
The profile TongYong is imported from above tyRules.xml.
Result
From Sonar
Lines of code: 202,505 (NBNC, not blank not comment code lines);
559,577 lines (total lines = NBNC + blank + comment);
Above can be verified by cloc.
2172 Classes, 21,275 methods, 675 method cyclomatic complexity are greater than 10,
Cyclomatic Complxity
GCP: 298/6276 = 4.75%
JDK: 674/21275 = 3.17%
Duplicate Lines
GCP:
JDK: 825/
CodeReview of JDK Source Code的更多相关文章
- 3 Ways of JDK Source Code Attachment in Eclipse---reference
You wanna look at a JVM class while you are coding and you cannot. Here is the solution. First of al ...
- ubuntu 12.04 下 eclipse关联 source code
一.JDK source code 命令行中: sudo apt-get install openjdk-7-source 下好的jdk源码在 Linux 在目录 usr/lib/jvm/openjd ...
- [转]Native Java Bytecode Debugging without Source Code
link from:http://www.crowdstrike.com/blog/native-java-bytecode-debugging-without-source-code/index.h ...
- Spring 4 MVC example with Maven - [Source Code Download]
In this tutorial, we show you a Spring 4 MVC example, using Maven build tool. Technologies used : Sp ...
- Tips for newbie to read source code
This post is first posted on my WeChat public account: GeekArtT Reading source code is always one bi ...
- 编程等宽字体Source Code Pro(转)
Source Code Pro - 最佳的免费编程字体之一!来自 Adobe 公司的开源等宽字体下载 每一位程序员都有一套自己喜爱的代码编辑器与编程字体,譬如我们之前就推荐过一款"神 ...
- How to build the Robotics Library from source code on Windows
The Robotics Library is an open source C++ library for robot kinematics, motion planning and control ...
- How to build windows azure PowerShell Source Code
Download any version source code of Windows Azure Powershell from https://github.com/Azure/azure-sdk ...
- akka cluster sharding source code 学习 (1/5) 替身模式
为了使一个项目支持集群,自己学习使用了 akka cluster 并在项目中实施了,从此,生活就变得有些痛苦.再配上 apache 做反向代理和负载均衡,debug 起来不要太酸爽.直到现在,我还对 ...
随机推荐
- 解决Windows Server 2012 在VMware ESXi中经常自动断网问题
最近一些开发人员反映他们使用的 Windows server2012 R2 虚拟机过段时间就远程连接不上了,ping也不通(已关闭防火墙),我们登录ESXi发现,Windows Server 的网络图 ...
- kali安装angr
最近打算重新学习一波angr,先把环境搭好 1. 先安装virtualenv,这玩意是可以创建一个纯净的python环境,我陷入了沉思,pyenv好像也可以 这里利用豆瓣的源下载,非常快而且很舒服 p ...
- buu 新年快乐
一.查壳 发现是upx的壳. 二.拖入ida,发现要先脱壳. 题外话.总结一下手动脱壳,esp定律: 1.先单步到只有esp红色时,右键数据窗口跟随. 2.到数据窗口后,左键硬件访问,byte和wor ...
- 学生信息管理系统--基于jsp技术和MySQL的简单增删改查
web实现增删改查的方式有很多啊,对于初学者来说当然是要先了解各部分的传值的方式.本篇博客从jsp技术的最基础方面进行说明. 一.什么是jsp技术 首先,我们要了解什么是jsp技术. jsp技术是基于 ...
- java面向对象程序设计(下)-接口的定义
抽象类是从多个类中抽象出来的模板,如果将这种抽象进行得更加彻底,则可以提炼出一种更加特殊的"抽象类"-接口(interface),Java9对接口进行了改进,允许在接口中定义默认方 ...
- keeplived+mycat+mysql高可用读写分离水平分表(谁看谁都会)
一:环境准备: 应用 主机 mysql-master 192.168.205.184 mysql-slave 192.168.205.185 mycat-01,keeplived,jdk 192.16 ...
- R Studio Server install fails - hard coded libssl1.0.0 dependency out of date ...
wget http://ftp.debian.org/debian/pool/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb md5sum l ...
- ThinkPHP3.2.3 语言包切换中英文切换
今天要用ThinkPHP3.2.3做一个小网站,其中涉及到切换中文与英文,通过查询手册和百度实现了该操作,现在将我具体的操作步骤记录下来,作为笔记和大家分享. php开发框架:ThinkPHP3.2. ...
- 数据库count用法
count(*)包括了所有的列,相当于行数,在统计结果的时候,不会忽略列值为NULL count(1)包括了所有列,用1代表代码行,在统计结果的时候,不会忽略列值为NULL count(列名)只包 ...
- ESLint自用规则
官方文档地址 rules: { // allow async-await 'generator-star-spacing': 'off', // allow debugger during devel ...