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的更多相关文章

  1. 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 ...

  2. ubuntu 12.04 下 eclipse关联 source code

    一.JDK source code 命令行中: sudo apt-get install openjdk-7-source 下好的jdk源码在 Linux 在目录 usr/lib/jvm/openjd ...

  3. [转]Native Java Bytecode Debugging without Source Code

    link from:http://www.crowdstrike.com/blog/native-java-bytecode-debugging-without-source-code/index.h ...

  4. 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 ...

  5. 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 ...

  6. 编程等宽字体Source Code Pro(转)

    Source Code Pro - 最佳的免费编程字体之一!来自 Adobe 公司的开源等宽字体下载     每一位程序员都有一套自己喜爱的代码编辑器与编程字体,譬如我们之前就推荐过一款"神 ...

  7. 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 ...

  8. How to build windows azure PowerShell Source Code

    Download any version source code of Windows Azure Powershell from https://github.com/Azure/azure-sdk ...

  9. akka cluster sharding source code 学习 (1/5) 替身模式

    为了使一个项目支持集群,自己学习使用了 akka cluster 并在项目中实施了,从此,生活就变得有些痛苦.再配上 apache 做反向代理和负载均衡,debug 起来不要太酸爽.直到现在,我还对 ...

随机推荐

  1. Redis 底层数据结构之整数集合

    文章参考:<Redis 设计与实现>黄建宏 整数集合 整数集合时集合键的底层实现之一,当一个集合只包含整数值元素,并且这个集合数量不多时,就会使用整数集合 typedef struct i ...

  2. SpringBoot Cache 入门

    首先搭载开发环境,不会的可以参考笔者之前的文章SpringBoot入门 添加依赖 <dependency> <groupId>org.springframework.boot& ...

  3. linux学习之路第九天(磁盘分区,挂载详解)

    磁盘分区,挂载 -----分区基础知识 分区的方式 1)mbr分区: 1.最多支持四个主分区 2.系统只能安装在主分区 3.扩展分区要占一个主分区 4.mbr最大只支持2TB,但拥有最好的兼容性 -- ...

  4. C语言常用函数笔记

    strcmp 比较字符串: sscanf 读取格式化的字符串中的数据: memset 初始化内存的"万能函数",通常为新申请的内存进行初始化工作.对一段内存空间全部设置为某个字符, ...

  5. java基础---集合(1)

    一. 基本概念 集合.数组都是对多个数据进行存储操作的结构,简称Java容器 数组:长度确定,类型确定,对于添加.删除.插入等操作效率不高,元素有序可重复 Java中集合框架顶层框架是:java.ut ...

  6. Docker实现退出container后保持继续运行的解决办法

    现象: 运行一个image,例如ubuntu14.04: 1 docker run -it --rm ubuntu:14.04 bash 退出时: 执行Ctrl+D或者执行exit 查看线程: 1 d ...

  7. C语言:源代码兼容WINDOWS LINUX

    使用库函数之前,应该用#include引入对应的头文件.这种以#号开头的命令称为预处理命令.C语言源文件要经过编译.链接才能生成可执行程序:1) 编译(Compile)会将源文件(.c文件)转换为目标 ...

  8. SpringBoot总结之属性配置

    一.SpringBoot简介 SpringBoot是spring团队提供的全新框架,主要目的是抛弃传统Spring应用繁琐的配置,该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配 ...

  9. 深入学习Netty(5)——Netty是如何解决TCP粘包/拆包问题的?

    前言 学习Netty避免不了要去了解TCP粘包/拆包问题,熟悉各个编解码器是如何解决TCP粘包/拆包问题的,同时需要知道TCP粘包/拆包问题是怎么产生的. 在此博文前,可以先学习了解前几篇博文: 深入 ...

  10. TCP协议与HTTP协议区别

    一.TCP协议与HTTP协议区别 1.直观认识 TCP协议对应于传输层,而HTTP协议对应于应用层,从本质上来说,二者没有可比性.Http协议是建立在TCP协议基础之上的,当浏览器需要从服务器获取网页 ...