Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Phodal
Coca
提交
aad02b94
C
Coca
项目概览
Phodal
/
Coca
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Coca
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
aad02b94
编写于
12月 27, 2019
作者:
P
Phodal Huang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs: update example data
上级
f9ee6c60
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
19 deletion
+33
-19
README.md
README.md
+2
-0
core/support/file_analysis_helper.go
core/support/file_analysis_helper.go
+0
-1
docs/patterns/evaluate.md
docs/patterns/evaluate.md
+28
-18
test/bug.go
test/bug.go
+3
-0
未找到文件。
README.md
浏览文件 @
aad02b94
...
...
@@ -26,6 +26,8 @@ Todo:
-
[ ] monolithic
-
[ ] microservice
-
[ ] big data
-
Badsmell
-
[ ] sort method size
## Usage
...
...
core/support/file_analysis_helper.go
浏览文件 @
aad02b94
...
...
@@ -25,7 +25,6 @@ func GetJavaFiles(codeDir string) []string {
}
}
fmt
.
Println
(
path
)
if
strings
.
HasSuffix
(
path
,
".java"
)
&&
!
strings
.
Contains
(
path
,
"Test.java"
)
&&
!
strings
.
Contains
(
path
,
"Tests.java"
){
files
=
append
(
files
,
path
)
}
...
...
docs/patterns/evaluate.md
浏览文件 @
aad02b94
url: https://github.com/macrozheng/mall
```
+------------------------+-------+-----------------------+-------+-----------+
| TYPE | COUNT | LEVEL | TOTAL | RATE |
+------------------------+-------+-----------------------+-------+-----------+
| Nullable / Return Null | 22 | Method | 12682 | 0.17% |
| Utils | 2 | Class | 458 | 0.44% |
| Static Method | 7 | Method | 12682 | 0.02% |
| Average Method Num | 12682 | Method/Class | 458 | 27.689956 |
| Average Method Length | 45091 | Without Getter/Setter | 10205 | 4.418520 |
+------------------------+-------+-----------------------+-------+-----------+
+--------------------------------+-------+-----------------------+-------+-----------+
| TYPE | COUNT | LEVEL | TOTAL | RATE |
+--------------------------------+-------+-----------------------+-------+-----------+
| Nullable / Return Null | 22 | Method | 12682 | 0.17% |
| Utils | 2 | Class | 458 | 0.44% |
| Static Method | 7 | Method | 12682 | 0.02% |
| Average Method Num. | 12682 | Method/Class | 458 | 27.689956 |
| Method Num. Std Dev / 标准差 | 12682 | Class | - | 58.993564 |
| Average Method Length | 45091 | Without Getter/Setter | 10205 | 4.418520 |
| Method Length Std Dev / 标准差 | 12682 | Method | - | 2.904016 |
+--------------------------------+-------+-----------------------+-------+-----------+
```
// issues: big data class / god service
...
...
@@ -17,15 +19,17 @@ url: https://github.com/macrozheng/mall
url: https://github.com/shuzheng/zheng
```
+------------------------+-------+-----------------------+-------+-----------+
| TYPE | COUNT | LEVEL | TOTAL | RATE |
+------------------------+-------+-----------------------+-------+-----------+
| Nullable / Return Null | 0 | Method | 5256 | 0.00% |
| Utils | 18 | Class | 366 | 4.92% |
| Static Method | 0 | Method | 5256 | 0.34% |
| Average Method Num | 5256 | Method/Class | 366 | 14.360656 |
| Average Method Length | 19644 | Without Getter/Setter | 4328 | 4.538817 |
+------------------------+-------+-----------------------+-------+-----------+
+--------------------------------+-------+-----------------------+-------+-----------+
| TYPE | COUNT | LEVEL | TOTAL | RATE |
+--------------------------------+-------+-----------------------+-------+-----------+
| Nullable / Return Null | 0 | Method | 5256 | 0.00% |
| Utils | 18 | Class | 366 | 4.92% |
| Static Method | 0 | Method | 5256 | 0.34% |
| Average Method Num. | 5256 | Method/Class | 366 | 14.360656 |
| Method Num. Std Devv / 标准差 | 5256 | Class | - | 32.965336 |
| Average Method Length | 19644 | Without Getter/Setter | 4328 | 4.538817 |
| Method Length Std Devv / 标准差 | 5256 | Method | - | 4.467935 |
+--------------------------------+-------+-----------------------+-------+-----------+
```
// data class
...
...
@@ -40,7 +44,9 @@ big data
| Utils | 18 | Class | 496 | 7.06% |
| Static Method | 400 | Method | 3041 | 1.15% |
| Average Method Num | 3041 | Method/Class | 496 | 6.13 |
| Method Num. Std Dev | 3041 | Class | - | 11.03 |
| Average Method Length | 17730 | Without Getter/Setter | 1551 | 11.43 |
| Method Length Std Dev | 3041 | Method | - | 14.22 |
+------------------------+-------+-----------------------+-------+-----------+
```
...
...
@@ -56,7 +62,9 @@ Common Project
| Utils | 26 | Class | 1007 | 7.06% |
| Static Method | 2062 | Method | 16642 | 0.16% |
| Average Method Num | 16642 | Method/Class | 1007 | 16.52 |
| Method Num. Std Dev | 16642 | Class | - | 29.86 |
| Average Method Length | 69012 | Without Getter/Setter | 6020 | 11.46 |
| Method Length Std Dev | 16642 | Method | - | 19.30 |
+------------------------+-------+-----------------------+-------+-----------+
```
...
...
@@ -72,7 +80,9 @@ Algo Project
| Utils | 43 | Class | 926 | 4.64% |
| Static Method | 542 | Method | 4914 | 0.88% |
| Average Method Num | 4914 | Method/Class | 927 | 5.30 |
| Method Num. Std Dev | 4914 | Class | - | 9.24 |
| Average Method Length | 51056 | Without Getter/Setter | 2603 | 19.61 |
| Method Length Std Dev | 4914 | Method | - | 24.39 |
+------------------------+-------+-----------------------+-------+-----------+
```
...
...
test/bug.go
浏览文件 @
aad02b94
...
...
@@ -5,9 +5,12 @@ import (
"fmt"
"github.com/phodal/coca/core/adapter/call"
"github.com/phodal/coca/core/adapter/identifier"
"github.com/pkg/profile"
)
func
main
()
{
defer
profile
.
Start
(
profile
.
MemProfile
,
profile
.
ProfilePath
(
"."
),
profile
.
NoShutdownHook
)
path
:=
"_fixtures/abug"
identifierApp
:=
identifier
.
NewJavaIdentifierApp
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录