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 起来不要太酸爽.直到现在,我还对 ...
随机推荐
- MySQL主从异常恢复
说明 MySQL主从出现不同步的情况时,或者要添加新的从库时,可以使用以下方法进行操作回复主从. 停止业务应用 停止所有连接到主从库上的应用,在恢复主从期间禁止任何增删改等操作,否则恢复失败 停止主从 ...
- 大数据-Hadoop虚拟机的准备以及配置(三台机子)
虚拟机的准备 修改静态IP(克隆的虚拟机) vim /etc/udev/rules.d/70-persistent-net.rules 配置网络: Vim /etc/sysconfig/network ...
- 根据使用者反馈,对开源项目 go-gin-api 新增两个功能
目录 前言 接口返回的错误信息支持中英文 代码位置 使用方式 错误信息自定义 参数验证的错误信息支持中英文 代码位置 使用方式 错误信息语言包 示例 小结 推荐阅读 前言 根据使用者的反馈,对开源项目 ...
- HCNA Routing&Switching之动态路由基本概念
前文我们了解了静态路由的相关话题,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/14965433.html:今天我们来聊一聊动态路由相关概念: 首先我们要清楚什 ...
- DIY一个智能开关kwswitch
源码地址:https://gitee.com/kerwincui/kwswitch 平台简介 该智能开关平台包括服务端.硬件端.PC端和安卓端.硬件使用ESP8266模块,成本相对较低,可以发挥想象力 ...
- Vue中watch与computed的区别
一. 计算属性(computed) 1.计算属性是为了模板中的表达式简洁,易维护,符合用于简单运算的设计初衷.对于运算过于复杂,冗长,且不好维护,因此我们对于复杂的运算应该 使用计算属性的方式去书写. ...
- Git错误:unable to access 'https://git.voicegu.com/qa/qa.git/': SSL certificate problem: unable to get local issuer certificate
fatal: unable to access 'https://git.voicegu.com/qa/qa.git/': SSL certificate problem: unable to get ...
- Docker单机网络实战
前言 Docker系列文章: 此篇是Docker系列的第八篇,大家一定要按照我做的Demo都手敲一遍,印象会更加深刻的,加油! 为什么要学习Docker Docker基本概念 Docker镜像基本原理 ...
- [刘阳Java]_CSS图片画廊
图片画廊也是一种比较经典的案例.本节文章主要简单给大家介绍了CSS2实现图片画廊,采取的实现思路 ul放置图片 li标签里面嵌套a标签 a标签里面嵌套两个图片的标签 通过简单的伪类来实现图片预览效果 ...
- UI作品评审总结:切忌过度设计,注意设计闭环
本期,我们一起看看学长认证模块--UI同学的作品评审. 拿好小板凳,做好笔记,我们开始吧! 我们拿了两个典型的作品进行了一个讲解,做的特色都还不错,但是都有些小问题. 先来看一下第一位 ...