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的分布式锁实现,原理很简单嘛:检测一下Key是否存在,不存在则Set Key,加锁成功,存在则加锁失败.对吗?这么简单吗? 如果你真这么想,那么你真的需要好好听我讲一下了.接下来, ...

  2. 想成为Java高手的25个学习目标

    本文将告诉你学习Java需要达到的25个目标,希望能够对你的学习及找工作有所帮助.对比一下自己,你已经掌握了这25条中的多少条了呢? 1.你需要精通面向对象分析与设计(OOA/OOD).涉及模式(GO ...

  3. CF1539D PriceFixed[题解]

    PriceFixed 题目大意 市场上又 \(n\) 种商品,每种商品的价格都是 \(2\) .对于第 \(i\) 种商品 \(a_i\) 件.对于商品 \(i\) 给出一个值 \(b_i\) ,如果 ...

  4. hadoop ——完全分布式环境搭建

    hadoop 完全分布式环境搭建 1.虚拟机角色分配: 192.168.44.184 hadoop02 NameNode/DataNode ResourceManager/NodeManager 19 ...

  5. EasyUI学后总结第一集

    1,创建Easyui组件-使用html还是使用js方式? 如果在创建Easyui组件的时候,组件再被更改,那么属于静态组件,对于静态组件不要使用js方式创建--会增加js代码量. 如果创建的Easyu ...

  6. xshell工具使用

    一.下载安装 参考见:https://www.bilibili.com/video/BV1hh411k7vy?from=search&seid=2244124597826079746 流程: ...

  7. shell脚本(6)-shell数组

    一.数组介绍 一个变量只能存一个值,现实中很多值需要存储,可以定义数组来存储一类的值. 二.基本数组  1.概念: 数组可以让用户一次性赋予多个值,需要读取数据时只需通过索引调用就可以方便读出. 2. ...

  8. 微信小程序云开发-数据库-删除数据

    一.js文件使用.remove()删除单条数据 在js文件中写updategood函数,在函数中使用.doc()指定要删除的数据id,调用.remove()方法删除数据. 二.wxml文件添加[删除] ...

  9. Java 将Word转为XML,XML转为Word的方法

    本文介绍将Word和XML文档进行双向互转的方法.转换时,Word支持.docx/.doc等格式. 代码环境如下: Word测试文档:.docx或.doc 编译环境:IntelliJ IDEA JDK ...

  10. Linux + .net core 开发升讯威在线客服系统:首个经过实际验证的高性能版本

    业余时间用 .net core 写了一个在线客服系统.并在博客园写了一个系列的文章,写介绍这个开发过程: .net core 和 WPF 开发升讯威在线客服系统:目录 https://blog.she ...