ref)関連論文
http://dspace.mit.edu/handle/1721.1/79551
ref)関連資料
http://www.jaspic.org/event/2014/SPIJapan/session1C/1C1_ID016.pdf
ref)関連セミナー(2013.12.03 ソフトウェア品質向上セミナー ソフトウェア構造を見れば品質がわかる!構造メトリクスとバグの関係)
https://www.techmatrix.co.jp/es/seminar/lattix_20131203.html
今回データ分析用に使用する主なライブラリは以下。
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from pandas import Series, DataFrame
from numpy.random import normal
import os
import plotly
import plotly.graph_objects as go
import plotly.express as px
from IPython.display import display
plotly.offline.init_notebook_mode(connected=False)
dirPath = "C:\work\src\c\httpd-2.0.55"
projectName=""
ltxMetricsFileName ="httpd-2_システム メトリクス_メトリクス_ システム.xlsx"
filePath = dirPath + "\\"+ltxMetricsFileName
ltx_org_xlsxFile = pd.ExcelFile(filePath)
C:\Users\fukase\Anaconda3\lib\site-packages\openpyxl\styles\stylesheet.py:226: UserWarning: Workbook contains no default style, apply openpyxl's default
#sheetName_System="Metrics System"
sheetName_System="メトリクス システム"
#sheetName_Architecture="Metrics Architecture"
sheetName_Architecture="メトリクス アーキテクチャ"
#sheetName_Object="Metrics Object Oriented"
sheetName_Object="メトリクス オブジェクト指向"
df_ltx_org_System = ltx_org_xlsxFile.parse(sheetName_System,skiprows = 2)
df_ltx_org_Architecture = ltx_org_xlsxFile.parse(sheetName_Architecture,skiprows = 2)
df_ltx_org_Object = ltx_org_xlsxFile.parse(sheetName_Object,skiprows = 2)
# アーキテクチャメトリクス
df_ltx_org_Architecture
サブシステム | システム安定性 | 影響度平均 | 循環度 | システム間循環度 | 重み付き影響度 | 依存関係数 | 依存度平均 | 要素数 | ルール違反数(使用禁止・使用強制) | ... | 多対多関係度 | 逆依存関係率 | 正規化累積依存度 | システム複雑度 | 連結度 | 連結濃度 | 連結強度 | 結合度 | 結合濃度 | 結合強度 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | $root | 0.964619 | 33.258511 | 0.085106 | 0.020213 | 6.459910e-02 | 4731.0 | 5.032979 | 940.0 | 0.0 | ... | 4.0 | 0.5 | 3.853877 | 0.444714 | 0.035419 | 0.183897 | 15.899638 | 0.001108 | 0.031042 | 0.141047 |
1 | C:.work.src.c.httpd-2.0.55 | 0.964619 | 33.258511 | 0.085106 | 0.020213 | 6.459910e-02 | 4731.0 | 5.032979 | 940.0 | 0.0 | ... | 4.0 | 0.5 | NaN | NaN | 0.035419 | NaN | NaN | 0.001108 | NaN | NaN |
2 | C:.work.src.c.httpd-2.0.55.* | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 2.432103e-11 | 0.0 | 0.000000 | 1.0 | 0.0 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
3 | C:.work.src.c.httpd-2.0.55.acconfig.h | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 2.432103e-11 | 0.0 | 0.000000 | 1.0 | 0.0 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
4 | C:.work.src.c.httpd-2.0.55.include | 0.836525 | 153.666667 | 0.000000 | 0.000000 | 6.542778e-03 | 56.0 | 1.866667 | 30.0 | 0.0 | ... | 1.0 | 0.0 | NaN | NaN | 0.054023 | NaN | NaN | 0.000000 | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
1093 | C:.work.src.c.httpd-2.0.55.test.test... | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 2.432103e-07 | 0.0 | 0.000000 | 1.0 | 0.0 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1094 | C:.work.src.c.httpd-2.0.55.test.test... | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 3.420144e-08 | 3.0 | 3.000000 | 1.0 | 0.0 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1095 | C:.work.src.c.httpd-2.0.55.test.test... | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 1.286582e-08 | 0.0 | 0.000000 | 1.0 | 0.0 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1096 | C:.work.src.c.httpd-2.0.55.test.time... | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 2.102212e-06 | 2.0 | 2.000000 | 1.0 | 0.0 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1097 | C:.work.src.c.httpd-2.0.55.test.zb.c | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 1.954736e-06 | 1.0 | 1.000000 | 1.0 | 0.0 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1098 rows × 23 columns
# システムメトリクス
df_ltx_org_System
サブシステム | Lines of Code | Cyclomatic Complexity | Header File | Source File | C/C++ (Understand) の合計要素 | |
---|---|---|---|---|---|---|
0 | $root | 405545.0 | 318.0 | 253.0 | 687.0 | 940.0 |
1 | C:.work.src.c.httpd-2.0.55 | 405545.0 | 318.0 | 253.0 | 687.0 | 940.0 |
2 | C:.work.src.c.httpd-2.0.55.* | 2.0 | 0.0 | 1.0 | 0.0 | 1.0 |
3 | C:.work.src.c.httpd-2.0.55.acconfig.h | 2.0 | 0.0 | 1.0 | 0.0 | 1.0 |
4 | C:.work.src.c.httpd-2.0.55.include | 8121.0 | 0.0 | 30.0 | 0.0 | 30.0 |
... | ... | ... | ... | ... | ... | ... |
1093 | C:.work.src.c.httpd-2.0.55.test.test... | 200.0 | 25.0 | 0.0 | 1.0 | 1.0 |
1094 | C:.work.src.c.httpd-2.0.55.test.test... | 75.0 | 3.0 | 0.0 | 1.0 | 1.0 |
1095 | C:.work.src.c.httpd-2.0.55.test.test... | 46.0 | 2.0 | 0.0 | 1.0 | 1.0 |
1096 | C:.work.src.c.httpd-2.0.55.test.time... | 588.0 | 12.0 | 0.0 | 1.0 | 1.0 |
1097 | C:.work.src.c.httpd-2.0.55.test.zb.c | 567.0 | 19.0 | 0.0 | 1.0 | 1.0 |
1098 rows × 6 columns
df_ltx_org=pd.merge(df_ltx_org_System,df_ltx_org_Architecture, on="サブシステム")
# マージ後のデータ
df_ltx_org
サブシステム | Lines of Code | Cyclomatic Complexity | Header File | Source File | C/C++ (Understand) の合計要素 | システム安定性 | 影響度平均 | 循環度 | システム間循環度 | ... | 多対多関係度 | 逆依存関係率 | 正規化累積依存度 | システム複雑度 | 連結度 | 連結濃度 | 連結強度 | 結合度 | 結合濃度 | 結合強度 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | $root | 405545.0 | 318.0 | 253.0 | 687.0 | 940.0 | 0.964619 | 33.258511 | 0.085106 | 0.020213 | ... | 4.0 | 0.5 | 3.853877 | 0.444714 | 0.035419 | 0.183897 | 15.899638 | 0.001108 | 0.031042 | 0.141047 |
1 | C:.work.src.c.httpd-2.0.55 | 405545.0 | 318.0 | 253.0 | 687.0 | 940.0 | 0.964619 | 33.258511 | 0.085106 | 0.020213 | ... | 4.0 | 0.5 | NaN | NaN | 0.035419 | NaN | NaN | 0.001108 | NaN | NaN |
2 | C:.work.src.c.httpd-2.0.55.* | 2.0 | 0.0 | 1.0 | 0.0 | 1.0 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
3 | C:.work.src.c.httpd-2.0.55.acconfig.h | 2.0 | 0.0 | 1.0 | 0.0 | 1.0 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
4 | C:.work.src.c.httpd-2.0.55.include | 8121.0 | 0.0 | 30.0 | 0.0 | 30.0 | 0.836525 | 153.666667 | 0.000000 | 0.000000 | ... | 1.0 | 0.0 | NaN | NaN | 0.054023 | NaN | NaN | 0.000000 | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
1093 | C:.work.src.c.httpd-2.0.55.test.test... | 200.0 | 25.0 | 0.0 | 1.0 | 1.0 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1094 | C:.work.src.c.httpd-2.0.55.test.test... | 75.0 | 3.0 | 0.0 | 1.0 | 1.0 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1095 | C:.work.src.c.httpd-2.0.55.test.test... | 46.0 | 2.0 | 0.0 | 1.0 | 1.0 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1096 | C:.work.src.c.httpd-2.0.55.test.time... | 588.0 | 12.0 | 0.0 | 1.0 | 1.0 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1097 | C:.work.src.c.httpd-2.0.55.test.zb.c | 567.0 | 19.0 | 0.0 | 1.0 | 1.0 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | ... | 0.0 | 0.0 | NaN | NaN | 0.000000 | NaN | NaN | 0.000000 | NaN | NaN |
1098 rows × 28 columns
# 使用するメトリクスの指定
default_culumn = ["サブシステム","Header File","Source File","C/C++ (Understand) の合計要素"]
metrics = ["影響度平均","平均累積依存度","Cyclomatic Complexity"]
culumn_use = default_culumn + metrics
df_ltx=df_ltx_org.loc[:,culumn_use]
# ファイル要素のみ抽出(サブシステムに対するメトリクスデータを除外)
df_ltx_file=df_ltx[df_ltx["C/C++ (Understand) の合計要素"]==1.0]
# VFI,VFOの計算(VFI = 影響度平均+1, VFO = 平均累積依存度)
df_ltx_file.loc[:,"VFI"]=pd.DataFrame(df_ltx_file["影響度平均"].copy(deep=True)+1)
df_ltx_file.loc[:,"VFO"]=pd.DataFrame(df_ltx_file["平均累積依存度"].copy(deep=True))
df_ltx_file.loc[:,"SQRT(VFI*VFO)"]=pd.DataFrame(np.sqrt(df_ltx_file["VFI"].copy(deep=True)*df_ltx_file["VFO"].copy(deep=True)))
C:\Users\fukase\Anaconda3\lib\site-packages\pandas\core\indexing.py:1667: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
# VFI,VFOの閾値を計算(ここでは最大値の半分と定義)
threshold_VFI = df_ltx_file["VFI"].max()/2.0
threshold_VFO = df_ltx_file["VFO"].max()/2.0
groupname = {0:"0_periferal",1:"1_utility",2:"2_control",3:"3_core"}
cyc_groupname = {0:"0_nothing", 1:"1_low", 2:"2_medium", 3:"3_high", 4:"4_untestable"}
def judge_vfio(df_input):
judgeVFI = df_input["VFI"].apply(lambda x: 1 if (x>threshold_VFI) else 0)
judgeVFO = df_input["VFO"].apply(lambda x: 2 if (x>threshold_VFO) else 0)
return judgeVFI+judgeVFO
def judge_cyc(df_input):
low_min=1
medium_min = 11
high_min = 21
untestable_min = 51
low = df_input["Cyclomatic Complexity"].apply(lambda x: 1 if (x>=low_min) else 0)
medium = df_input["Cyclomatic Complexity"].apply(lambda x: 1 if (x>=medium_min) else 0)
high = df_input["Cyclomatic Complexity"].apply(lambda x: 1 if (x>=high_min) else 0)
untestable = df_input["Cyclomatic Complexity"].apply(lambda x: 1 if (x>=untestable_min) else 0)
return low+medium+high+untestable
def get_groupName(df_input):
return df_input["group"].apply(lambda x: groupname[x])
def get_cycgroupName(df_input):
return df_input["cyc_group"].apply(lambda x: cyc_groupname[x])
df_ltx_file.loc[:,"group"]=judge_vfio(df_ltx_file)
df_ltx_file.loc[:,"groupName"]=get_groupName(df_ltx_file)
df_ltx_file.loc[:,"cyc_group"]=judge_cyc(df_ltx_file)
df_ltx_file.loc[:,"cyc_groupName"]=get_cycgroupName(df_ltx_file)
df_ltx_file
サブシステム | Header File | Source File | C/C++ (Understand) の合計要素 | 影響度平均 | 平均累積依存度 | Cyclomatic Complexity | VFI | VFO | SQRT(VFI*VFO) | group | groupName | cyc_group | cyc_groupName | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | C:.work.src.c.httpd-2.0.55.* | 1.0 | 0.0 | 1.0 | 0.0 | 1.0 | 0.0 | 1.0 | 1.0 | 1.000000 | 0 | 0_periferal | 0 | 0_nothing |
3 | C:.work.src.c.httpd-2.0.55.acconfig.h | 1.0 | 0.0 | 1.0 | 0.0 | 1.0 | 0.0 | 1.0 | 1.0 | 1.000000 | 0 | 0_periferal | 0 | 0_nothing |
5 | C:.work.src.c.httpd-2.0.55.include.a... | 1.0 | 0.0 | 1.0 | 0.0 | 3.0 | 0.0 | 1.0 | 3.0 | 1.732051 | 0 | 0_periferal | 0 | 0_nothing |
6 | C:.work.src.c.httpd-2.0.55.include.a... | 1.0 | 0.0 | 1.0 | 239.0 | 10.0 | 0.0 | 240.0 | 10.0 | 48.989795 | 0 | 0_periferal | 0 | 0_nothing |
7 | C:.work.src.c.httpd-2.0.55.include.a... | 1.0 | 0.0 | 1.0 | 177.0 | 26.0 | 0.0 | 178.0 | 26.0 | 68.029405 | 0 | 0_periferal | 0 | 0_nothing |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
1093 | C:.work.src.c.httpd-2.0.55.test.test... | 0.0 | 1.0 | 1.0 | 0.0 | 1.0 | 25.0 | 1.0 | 1.0 | 1.000000 | 0 | 0_periferal | 3 | 3_high |
1094 | C:.work.src.c.httpd-2.0.55.test.test... | 0.0 | 1.0 | 1.0 | 0.0 | 114.0 | 3.0 | 1.0 | 114.0 | 10.677078 | 2 | 2_control | 1 | 1_low |
1095 | C:.work.src.c.httpd-2.0.55.test.test... | 0.0 | 1.0 | 1.0 | 0.0 | 1.0 | 2.0 | 1.0 | 1.0 | 1.000000 | 0 | 0_periferal | 1 | 1_low |
1096 | C:.work.src.c.httpd-2.0.55.test.time... | 0.0 | 1.0 | 1.0 | 0.0 | 115.0 | 12.0 | 1.0 | 115.0 | 10.723805 | 2 | 2_control | 2 | 2_medium |
1097 | C:.work.src.c.httpd-2.0.55.test.zb.c | 0.0 | 1.0 | 1.0 | 0.0 | 10.0 | 19.0 | 1.0 | 10.0 | 3.162278 | 0 | 0_periferal | 2 | 2_medium |
974 rows × 14 columns
print("閾値:VFO:"+str(threshold_VFO)+" "+"VFI:"+str(threshold_VFI))
閾値:VFO:75.5 VFI:406.0
# 構造複雑度別に各ファイルをプロットする関数
def plot_xy(x_metrics,y_metrics,df,title=""):
if title == "":
title = str(x_metrics)+"-"+str(y_metrics)+"のグラフ(構造複雑度別)"
x_metrics = x_metrics
y_metrics = y_metrics
x = df[x_metrics]
y = df[y_metrics]
group = df["group"]
import plotly.express as px
symbols =["circle","square","star","x","cross"]
data = [
go.Scatter(
x=x[group==i], y=y[group==i],
name=groupname[i],
mode = 'markers',
marker = dict(color=px.colors.qualitative.Plotly[i],
size=6,
symbol='star'
),
text = df["サブシステム"][group==i]
)
for i in range(len(groupname))
]
fig = go.Figure(data=data)
fig.update_xaxes(title_text=x_metrics)
fig.update_yaxes(title_text=y_metrics, hoverformat=".3f")
fig.update_layout(title=dict(text='<b>'+title,
font=dict(size=26,
color='black'),
xref='paper', # container or paper
x=0.5,
y=0.9,
xanchor='center'
))
plotly.offline.iplot(fig)
return fig
# クロス集計した結果をプロットする関数
def plot_xy_cross(x_metrics,y_metrics,df,title=""):
if title == "":
title = str(x_metrics)+"-"+str(y_metrics)+"のグラフ(クロス集計)"
x_metrics = x_metrics
y_metrics = y_metrics
x = df[x_metrics]
y = df[y_metrics]
group = df["group"]
cyc_group = df["cyc_group"]
symbols =["circle","square","star","x","cross"]
data = [
go.Scatter(
x=x[cyc_group==i][group==j], y=y[cyc_group==i][group==j],
name=cyc_groupname[i]+" & "+groupname[j],
mode = 'markers',
marker = dict(color=px.colors.qualitative.Plotly[i],
size=4,
symbol=symbols[j]
),
text = df["サブシステム"][group==j][cyc_group==i]
)
for i in range(len(cyc_groupname)) for j in range(len(groupname))
]
fig = go.Figure(data=data)
fig.update_xaxes(title_text=x_metrics)
fig.update_yaxes(title_text=y_metrics, hoverformat=".3f")
fig.update_layout(title=dict(text='<b>'+title,
font=dict(size=26,
color='black'),
xref='paper', # container or paper
x=0.5,
y=0.9,
xanchor='center'
))
plotly.offline.iplot(fig)
return fig
# VFI-VFOグラフの描画
fig = plot_xy("VFI","VFO",df_ltx_file,"VFIとVFOの各ファイル分布(構造複雑度別)")
fig.write_html("VFIとVFOの各ファイル分布(構造複雑度別).html")
fig = plot_xy_cross("VFI","VFO",df_ltx_file,"VFIとVFOの各ファイル分布(クロス集計)")
fig.write_html("VFIとVFOの各ファイル分布(クロス集計).html")
fig = plot_xy("SQRT(VFI*VFO)","Cyclomatic Complexity",df_ltx_file,"構造複雑度とCyclomatic複雑度の各ファイル分布(構造複雑度別)")
fig.write_html("構造複雑度とCyclomatic複雑度の各ファイル分布(構造複雑度別).html")
fig = plot_xy_cross("SQRT(VFI*VFO)","Cyclomatic Complexity",df_ltx_file,"構造複雑度とCyclomatic複雑度の各ファイル分布(クロス集計)")
fig.write_html("構造複雑度とCyclomatic複雑度の各ファイル分布(クロス集計).html")
#各グループに属するファイルの個数
df_crosstab=pd.crosstab(df_ltx_file["groupName"],df_ltx_file["cyc_groupName"],margins=True)
df_crosstab
cyc_groupName | 0_nothing | 1_low | 2_medium | 3_high | 4_untestable | All |
---|---|---|---|---|---|---|
groupName | ||||||
0_periferal | 258 | 423 | 46 | 46 | 18 | 791 |
1_utility | 13 | 0 | 0 | 0 | 2 | 15 |
2_control | 1 | 66 | 42 | 41 | 18 | 168 |
All | 272 | 489 | 88 | 87 | 38 | 974 |
#各グループに属するファイルの割合(百分率)
df_crosstab_norm=pd.crosstab(df_ltx_file["groupName"],df_ltx_file["cyc_groupName"],normalize=True,margins=True)
df_crosstab_norm.applymap("{0:.2%}".format)
cyc_groupName | 0_nothing | 1_low | 2_medium | 3_high | 4_untestable | All |
---|---|---|---|---|---|---|
groupName | ||||||
0_periferal | 26.49% | 43.43% | 4.72% | 4.72% | 1.85% | 81.21% |
1_utility | 1.33% | 0.00% | 0.00% | 0.00% | 0.21% | 1.54% |
2_control | 0.10% | 6.78% | 4.31% | 4.21% | 1.85% | 17.25% |
All | 27.93% | 50.21% | 9.03% | 8.93% | 3.90% | 100.00% |
# 表示オプション表示
dir(pd.options.display)
['chop_threshold', 'colheader_justify', 'column_space', 'date_dayfirst', 'date_yearfirst', 'encoding', 'expand_frame_repr', 'float_format', 'html', 'large_repr', 'latex', 'max_categories', 'max_columns', 'max_colwidth', 'max_info_columns', 'max_info_rows', 'max_rows', 'max_seq_items', 'memory_usage', 'min_rows', 'multi_sparse', 'notebook_repr_html', 'pprint_nest_depth', 'precision', 'show_dimensions', 'unicode', 'width']
# 1カラムあたりの文字数変更
pd.set_option("display.max_colwidth", 80)
# control & unstestableなファイルを表示
df_ltx_file[(df_ltx_file["groupName"]=="2_control") & (df_ltx_file["cyc_groupName"]=="4_untestable")]
サブシステム | Header File | Source File | C/C++ (Understand) の合計要素 | 影響度平均 | 平均累積依存度 | Cyclomatic Complexity | VFI | VFO | SQRT(VFI*VFO) | group | groupName | cyc_group | cyc_groupName | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
46 | C:.work.src.c.httpd-2.0.55.modules.arch.netware.mod_nw_ssl.c | 0.0 | 1.0 | 1.0 | 0.0 | 114.0 | 61.0 | 1.0 | 114.0 | 10.677078 | 2 | 2_control | 4 | 4_untestable |
48 | C:.work.src.c.httpd-2.0.55.modules.arch.win32.mod_isapi.c | 0.0 | 1.0 | 1.0 | 0.0 | 117.0 | 94.0 | 1.0 | 117.0 | 10.816654 | 2 | 2_control | 4 | 4_untestable |
81 | C:.work.src.c.httpd-2.0.55.modules.experimental.mod_cache.c | 0.0 | 1.0 | 1.0 | 4.0 | 120.0 | 52.0 | 5.0 | 120.0 | 24.494897 | 2 | 2_control | 4 | 4_untestable |
95 | C:.work.src.c.httpd-2.0.55.modules.filters.mod_deflate.c | 0.0 | 1.0 | 1.0 | 0.0 | 114.0 | 65.0 | 1.0 | 114.0 | 10.677078 | 2 | 2_control | 4 | 4_untestable |
97 | C:.work.src.c.httpd-2.0.55.modules.filters.mod_include.c | 0.0 | 1.0 | 1.0 | 0.0 | 115.0 | 141.0 | 1.0 | 115.0 | 10.723805 | 2 | 2_control | 4 | 4_untestable |
101 | C:.work.src.c.httpd-2.0.55.modules.generators.mod_autoindex.c | 0.0 | 1.0 | 1.0 | 0.0 | 114.0 | 72.0 | 1.0 | 114.0 | 10.677078 | 2 | 2_control | 4 | 4_untestable |
106 | C:.work.src.c.httpd-2.0.55.modules.generators.mod_status.c | 0.0 | 1.0 | 1.0 | 0.0 | 115.0 | 78.0 | 1.0 | 115.0 | 10.723805 | 2 | 2_control | 4 | 4_untestable |
112 | C:.work.src.c.httpd-2.0.55.modules.http.http_protocol.c | 0.0 | 1.0 | 1.0 | 164.0 | 113.0 | 70.0 | 165.0 | 113.0 | 136.546695 | 2 | 2_control | 4 | 4_untestable |
125 | C:.work.src.c.httpd-2.0.55.modules.mappers.mod_imap.c | 0.0 | 1.0 | 1.0 | 0.0 | 114.0 | 56.0 | 1.0 | 114.0 | 10.677078 | 2 | 2_control | 4 | 4_untestable |
127 | C:.work.src.c.httpd-2.0.55.modules.mappers.mod_rewrite.c | 0.0 | 1.0 | 1.0 | 1.0 | 120.0 | 54.0 | 2.0 | 120.0 | 15.491933 | 2 | 2_control | 4 | 4_untestable |
146 | C:.work.src.c.httpd-2.0.55.modules.proxy.proxy_ftp.c | 0.0 | 1.0 | 1.0 | 0.0 | 117.0 | 128.0 | 1.0 | 117.0 | 10.816654 | 2 | 2_control | 4 | 4_untestable |
147 | C:.work.src.c.httpd-2.0.55.modules.proxy.proxy_http.c | 0.0 | 1.0 | 1.0 | 1.0 | 117.0 | 58.0 | 2.0 | 117.0 | 15.297059 | 2 | 2_control | 4 | 4_untestable |
156 | C:.work.src.c.httpd-2.0.55.modules.ssl.ssl_engine_kernel.c | 0.0 | 1.0 | 1.0 | 0.0 | 147.0 | 57.0 | 1.0 | 147.0 | 12.124356 | 2 | 2_control | 4 | 4_untestable |
161 | C:.work.src.c.httpd-2.0.55.modules.ssl.ssl_engine_vars.c | 0.0 | 1.0 | 1.0 | 13.0 | 146.0 | 53.0 | 14.0 | 146.0 | 45.210618 | 2 | 2_control | 4 | 4_untestable |
165 | C:.work.src.c.httpd-2.0.55.modules.ssl.ssl_expr_parse.c | 0.0 | 1.0 | 1.0 | 17.0 | 127.0 | 60.0 | 18.0 | 127.0 | 47.812132 | 2 | 2_control | 4 | 4_untestable |
167 | C:.work.src.c.httpd-2.0.55.modules.ssl.ssl_expr_scan.c | 0.0 | 1.0 | 1.0 | 17.0 | 127.0 | 75.0 | 18.0 | 127.0 | 47.812132 | 2 | 2_control | 4 | 4_untestable |
225 | C:.work.src.c.httpd-2.0.55.server.core.c | 0.0 | 1.0 | 1.0 | 164.0 | 113.0 | 61.0 | 165.0 | 113.0 | 136.546695 | 2 | 2_control | 4 | 4_untestable |
235 | C:.work.src.c.httpd-2.0.55.server.request.c | 0.0 | 1.0 | 1.0 | 164.0 | 113.0 | 57.0 | 165.0 | 113.0 | 136.546695 | 2 | 2_control | 4 | 4_untestable |
df_ltx_file.to_csv('df_Sturtevant.csv',sep=',',encoding='cp932')
df_ltx_file[(df_ltx_file["groupName"]=="2_control") & (df_ltx_file["cyc_groupName"]=="4_untestable")].to_csv('df_Sturtevant_control_untestable.csv',sep=',',encoding='cp932')
df_crosstab.to_csv('df_Sturtevant_crosstab.csv',sep=',',encoding='cp932')
df_crosstab_norm.applymap("{0:.2%}".format).to_csv('df_Sturtevant_crosstab_norm.csv',sep=',',encoding='cp932')