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. hdu 3117 Fibonacci Numbers 矩阵快速幂+公式

    斐波那契数列后四位可以用快速幂取模(模10000)算出.前四位要用公式推 HDU 3117 Fibonacci Numbers(矩阵快速幂+公式) f(n)=(((1+√5)/2)^n+((1-√5) ...

  2. 部署JAX-WS Web服务作为战争中的Apache Tomcat(Deploying JAX-WS webservice as War in Apache Tomcat)

    问 题   I have developed a webservice using JAXWS and able to run it from the eclipse on Tomcat 7 with ...

  3. Vector ArrayList LinkedList

    三者都实现了List接口! Vector与ArrayList:采用顺序存储的方式,但是Vector是线程安全的,ArrayList是线程不安全的,按需使用: 当存储空间不足的时候,ArrayList默 ...

  4. ESP32构建系统(CMake版)

    ESP32 芯片是一款 2.4 GHz Wi-Fi 和蓝牙双模芯片,内置 1 或 2 个 32 位处理器,运算能力最高可达 600 DMIPS. ESP-IDF 即乐鑫物联网开发框架,可为在 Wind ...

  5. git配置多个ssh key

    随着工作的深入,我们通常都会有多个git账户.比如公司gitlab一个账户,github或gitee有一个账户.而平时我们又回通过 配置ssh公私钥认证的方式省去繁琐的登录远程仓库的操作,不同的git ...

  6. QT单进程下载

    QT    同步下载 #include <QNetworkAccessManager> #include <QNetworkRequest> #include <QNet ...

  7. 理解Python中的闭包

    1.定义 闭包是函数式编程的一个重要的语法结构,函数式编程是一种编程范式 (而面向过程编程和面向对象编程也都是编程范式).在面向过程编程中,我们见到过函数(function):在面向对象编程中,我们见 ...

  8. 没事就要多做多练,Shell脚本循环例题做一做

    Shell脚本循环例题                 一.示例1                 二.示例2                 三.示例3                 四.示例4 ...

  9. Spring Boot入门学习必知道企业常用的Starter

    SpringBoot企业常用的 starter SpringBoot简介 SpringBoot运行 SpringBoot目录结构 整合JdbcTemplate @RestController 整合JS ...

  10. [刘阳Java]_BeanNameViewResolver视图解析器_第8讲

    BeanNameViewResolver:这个视图解析器跟XmlViewResolver有点类似,也是通过把返回的逻辑视图名称去匹配定义好的视图bean对象.它要求视图bean对象都定义在Spring ...