遇见数据集

Enhanced Bug Prediction in JavaScript Programs with Hybrid Call-Graph Based Invocation Metrics (Training Dataset)

收藏
Zenodo2020-11-21 更新2026-05-25 收录
数据链接:
官方服务:

资源简介:

This dataset consists of multiple files which contain bug prediction training data. The entries in the dataset are JavaScript functions either being buggy or non-buggy. Bug related information was obtained from the project EsLint contained in BugsJS (https://github.com/BugsJS/eslint). The buggy instances were collected throughout the lifetime of the project, however we added non-buggy entries from the latest version which is tagged as fix (entries which were previously included as buggy were not included as non-buggy later on). The dataset is based on hybrid call graphs which are constructed by https://github.com/sed-szeged/hcg-js-framework. The result of this tool is a call graph where the edges are associated with a confidence level which shows how likely the given edge is a valid call edge. We used different threshold values from which we considered the edges to be valid. The following threshold values were used: 0.00 0.05 0.20 0.30 The prefix in the dataset file names are coming from the used threshold. The the datasets include coupling metrics NII (Nubmer of Incoming Invocations) and NOI (Number of Outgoing Invocations) which were calculated by a static source code analyzer called SourceMeter. Hybrid counterparts of these metrics (HNII and HNOI) are based on the given threshold values. There are four variants for all of these datasets: Both static (NII, NOi) and hybrid (HNII, HNOI) coupling metrics are included with additional static source code metrics and information about the entries (file without any postfix). Column contained only in this dataset are: ID Name Longname Parent ID Component ID Path Line Column EndLine EndColumn Both static (NII, NOi) and hybrid (HNII, HNOI) coupling metrics are included with additional static source code metrics (file with '_h+s' postfix) Only static (NII, NOI) coupling metrics are included with additional static source code metrics (file with '_s' postfix) Only hybrid (HNII, HNOI) coupling metrics are included with additional static source code metrics (file with '_h' postfix) Static source code metrics which are contained in all dataset are the following: McCC - McCabe Cyclomatic Complexity NL - Nesting Level NLE - Nesting Level Else If CD - Comment Density CLOC - Comment Lines of Code DLOC - Documentation Lines of Code TCD - Total Comment Density (Comment Lines in an emedded function will be also considered) TCLOC - Total Comment Lines of Code (Comment Lines in an emedded function will be also considered) LLOC - Logical Lines of Code (Comment and empty lines not counted) LOC - Lines of Code (Comment and empty lines are counted) NOS - Number of Statements NUMPAR - Number of Parameters TLLOC - Logical Lines of Code (Lines in embedded functions are also counted) TLOC - Lines of Code (Lines in embedded functions are also counted) TNOS - Total Number of Statements (Statements in embedded functions are also counted)

本数据集包含多个存储缺陷预测训练数据的文件。数据集中的条目均为JavaScript函数,分为存在缺陷(buggy)与无缺陷(non-buggy)两类。缺陷相关信息取自BugsJS项目中的EsLint仓库(https://github.com/BugsJS/eslint)。缺陷实例是在项目全生命周期中收集得到,而无缺陷条目则取自最新的已标记为修复(fix)的版本——此前被标记为存在缺陷的条目后续不会被归类为无缺陷条目。 本数据集基于混合调用图(hybrid call graphs),该调用图由https://github.com/sed-szeged/hcg-js-framework构建。该工具生成的调用图中,边均关联有置信度分值,用以表征该边为有效调用边的可能性。我们采用了多组阈值判定边的有效性,具体阈值为:0.00、0.05、0.20、0.30。数据集文件名的前缀即对应所使用的阈值。 数据集包含耦合度量指标:NII(传入调用次数,Number of Incoming Invocations)与NOI(传出调用次数,Number of Outgoing Invocations),二者由静态源代码分析工具SourceMeter计算得到。基于上述阈值,还有对应混合版本的耦合指标HNII与HNOI。 所有数据集均存在四种变体: 1. 同时包含静态(NII、NOI)与混合(HNII、HNOI)耦合度量,附带额外静态源代码度量及条目相关信息(文件无后缀) 该类数据集独有字段包括:ID、Name、Longname、Parent ID、Component ID、Path、Line、Column、EndLine、EndColumn 2. 同时包含静态与混合耦合度量,附带额外静态源代码度量(文件后缀为`_h+s`) 3. 仅包含静态(NII、NOI)耦合度量,附带额外静态源代码度量(文件后缀为`_s`) 4. 仅包含混合(HNII、HNOI)耦合度量,附带额外静态源代码度量(文件后缀为`_h`) 所有数据集均包含的静态源代码度量指标如下: - McCC:McCabe环形复杂度(McCabe Cyclomatic Complexity) - NL:嵌套层级(Nesting Level) - NLE:Else If嵌套层级(Nesting Level Else If) - CD:注释密度(Comment Density) - CLOC:注释代码行(Comment Lines of Code) - DLOC:文档代码行(Documentation Lines of Code) - TCD:总注释密度(Total Comment Density,嵌入式函数中的注释行亦会被纳入统计) - TCLOC:总注释代码行(Total Comment Lines of Code,嵌入式函数中的注释行亦会被纳入统计) - LLOC:逻辑代码行(Logical Lines of Code,不计注释与空行) - LOC:代码行(Lines of Code,包含注释与空行) - NOS:语句总数(Number of Statements) - NUMPAR:参数总数(Number of Parameters) - TLLOC:总逻辑代码行(Logical Lines of Code,嵌入式函数中的代码行亦会被纳入统计) - TLOC:总代码行(Lines of Code,嵌入式函数中的代码行亦会被纳入统计) - TNOS:总语句数(Total Number of Statements,嵌入式函数中的语句亦会被纳入统计)

提供机构:
Zenodo
创建时间:
2020-11-21
二维码
社区交流群
二维码
科研交流群
商业服务