Supplementary code and data of the paper Evaluating network embedding techniques' performances in software bug prediction.
收藏资源简介:
Supplementary code and data of the paper <strong><em>Evaluating network embedding techniques' performances in software bug prediction</em>.</strong> This repo can also be used as a complementary material for our previous paper: Qu, Yu, Ting Liu, Jianlei Chi, Yangxu Jin, Di Cui, Ancheng He, and Qinghua Zheng. "node2defect: using network embedding to improve software defect prediction." In 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 844-849. IEEE, 2018. https://dl.acm.org/doi/abs/10.1145/3238147.3240469 <strong>Steps to Run this dataset:</strong> <strong>First: Generating Class Dependency Network</strong> In each subdirectory, we have already included the corresponding Class Dependency Network (CDN) (classgraph.dot). If you want to generate your own CDN, you can use the Understand Perl Script file -- Class-Graph.pl, after installing the Understand tool, by using the commend: <pre><code class="language-bash">uperl Class-Graph.pl %YourOwnProjectDirectory%</code></pre> <strong>Second: Generating the input file for network embedding algorithms</strong> After generating the CDN, we can use the Driver.py to generate the input file for network embedding algorithms. <pre><code class="language-bash">python Driver.py</code></pre> After executing Driver.py, we can get the "edgelist" file in each directory. Then, for instance, we can use the ProNE implementation to generate the embedding file (classgraph.emd): <pre><code class="language-bash">python proNE.py -graph edgelist -emb1 classgraph.emd -emb2 classgraph-2.emd -dimension 32 -step 10 -theta 0.5 -mu 0.2</code></pre> <strong>Third: Run the experiment</strong> After generating the classgraph.emd file, we can run the experiment by executing Node2Defect-Final-CrossValidation.py: <pre><code class="language-bash">python Node2Defect-Final-CrossValidation.py</code></pre> The overall results are listed in the files like "All-Popt-%s-%s-%s.csv" <strong>Requirements:</strong> python==3.7<br> scipy==1.5.2<br> networkx==2.5<br> scikit-learn==0.23.2<br> numpy==1.19.1<br> pandas==1.1.2 We have used the following implementations of different network embedding algorithms, please refer to their repos for their dependencies: OpenNE<br> ProNE<br> Walklets
本仓库为论文《Evaluating network embedding techniques' performances in software bug prediction》(软件缺陷预测中的网络嵌入技术性能评估)的补充代码与数据集。本仓库亦可作为我们此前发表论文的补充材料:Yu Qu、Ting Liu、Jianlei Chi、Yangxu Jin、Di Cui、Ancheng He与Qinghua Zheng所著《node2defect: using network embedding to improve software defect prediction》(node2defect:利用网络嵌入技术改进软件缺陷预测),收录于2018年第33届IEEE/ACM国际自动化软件工程会议(ASE)论文集,页码844-849,IEEE出版社,2018年。DOI链接:https://dl.acm.org/doi/abs/10.1145/3238147.3240469 ### 数据集运行步骤 #### 第一步:生成类依赖网络(Class Dependency Network,CDN) 每个子目录中均已包含对应的类依赖网络(CDN)文件classgraph.dot。若需自行生成CDN,可在安装Understand工具后,使用以下命令调用对应的Perl脚本文件Class-Graph.pl: bash uperl Class-Graph.pl %YourOwnProjectDirectory% #### 第二步:生成网络嵌入算法的输入文件 生成类依赖网络后,可通过Driver.py生成网络嵌入算法所需的输入文件,执行命令如下: bash python Driver.py 运行Driver.py后,各目录下将生成edgelist文件。以ProNE实现为例,可通过以下命令生成嵌入文件classgraph.emd: bash python proNE.py -graph edgelist -emb1 classgraph.emd -emb2 classgraph-2.emd -dimension 32 -step 10 -theta 0.5 -mu 0.2 #### 第三步:运行实验 生成classgraph.emd文件后,可通过运行Node2Defect-Final-CrossValidation.py执行实验,命令如下: bash python Node2Defect-Final-CrossValidation.py 实验整体结果将保存至类似`All-Popt-%s-%s-%s.csv`的文件中。 ### 环境要求 本项目的基础依赖如下: - Python==3.7 - scipy==1.5.2 - networkx==2.5 - scikit-learn==0.23.2 - numpy==1.19.1 - pandas==1.1.2 本项目使用了以下不同网络嵌入算法的实现,其依赖项请参考对应仓库:OpenNE、ProNE、Walklets



