国产欧美精品一区二区,中文字幕专区在线亚洲,国产精品美女网站在线观看,艾秋果冻传媒2021精品,在线免费一区二区,久久久久久青草大香综合精品,日韩美aaa特级毛片,欧美成人精品午夜免费影视

基于混合注意力機制的軟件缺陷預測方法
DOI:
CSTR:
作者:
作者單位:

上海機電工程研究所

作者簡(jiǎn)介:

通訊作者:

中圖分類(lèi)號:

基金項目:


Software Defect Prediction via Mixed Attention Mechanism
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 圖/表
  • |
  • 訪(fǎng)問(wèn)統計
  • |
  • 參考文獻
  • |
  • 相似文獻
  • |
  • 引證文獻
  • |
  • 資源附件
  • |
  • 文章評論
    摘要:

    軟件缺陷預測技術(shù)用于定位軟件中可能存在缺陷的代碼模塊,從而輔助開(kāi)發(fā)人員進(jìn)行測試與修復。傳統的軟件缺陷特征為基于軟件規模、復雜度和語(yǔ)言特點(diǎn)等人工提取的靜態(tài)度量元信息。然而,靜態(tài)度量元特征無(wú)法直接捕捉程序上下文中的缺陷信息,從而影響了軟件缺陷預測的性能。為了充分利用程序上下文中的語(yǔ)法語(yǔ)義信息,論文提出了一種基于混合注意力機制的軟件缺陷預測方法 DP-MHA(Defect Prediction via Mixed Attention Mechanism)。DP-MHA首先從程序模塊中提取基于A(yíng)ST樹(shù)的語(yǔ)法語(yǔ)義序列并進(jìn)行詞嵌入編碼和位置編碼,然后基于多頭注意力機制自學(xué)習上下文語(yǔ)法語(yǔ)義信息,最后利用全局注意力機制提取關(guān)鍵的語(yǔ)法語(yǔ)義特征,用于構建軟件缺陷預測模型并識別存在潛在缺陷的代碼模塊。為了驗證DP-MHA的有效性,論文選取了六個(gè)Apache的開(kāi)源Java數據集,與經(jīng)典的基于RF的靜態(tài)度量元方法、基于RBM+RF、DBN+RF無(wú)監督學(xué)習方法和基于CNN和RNN深度學(xué)習方法進(jìn)行對比,實(shí)驗結果表明,DP-MHA在F1值分別提升了16.6%、34.3%、26.4%、7.1%、4.9%。

    Abstract:

    In order to assist developers in testing and fixing bugs, software defect prediction technique is used to locate defective code snippets in programs. Traditional defect prediction features are manual static code metrics based on software scale, software complexity and language characteristic. However, these features cannot capture defect information from program context, resulting in the degradation of defect prediction performance. To take full advantage of the syntactic and semantic features in program context, we propose a method called Defect Prediction via Mixed Attention Mechanism (DP-MHA) in this paper. Specifically, DP-MHA first extracts the AST tree-based syntactic and semantic sequence from programs and performs word embedding and positional encoding. Then it learns the contextual syntax and semantic information by the Multi-head attention mechanism. Finally it uses the global attention mechanism to extract key syntactic and semantic features which are used to build a software defect prediction model and identify code snippets with potential defects. In order to verify the effectiveness of DP-MHA, we select six Apache open-source Java projects, and compare it with the state-of-the-art methods including classical static code metric method based on RF, unsupervised learning method based on RBM+RF, DBN+RF and deep learning method based on CNN, RNN. The experimental results show that DP-MHA improves F1-Measure by 16.6%, 34.3%, 26.4%, 7.1% and 4.9%, respectively.

    參考文獻
    相似文獻
    引證文獻
引用本文

刁旭煬,吳凱,陳都,周俊峰,高璞.基于混合注意力機制的軟件缺陷預測方法計算機測量與控制[J].,2023,31(3):56-62.

復制
分享
文章指標
  • 點(diǎn)擊次數:
  • 下載次數:
  • HTML閱讀次數:
  • 引用次數:
歷史
  • 收稿日期:2022-07-31
  • 最后修改日期:2022-09-04
  • 錄用日期:2022-09-05
  • 在線(xiàn)發(fā)布日期: 2023-03-15
  • 出版日期:
文章二維碼
汽车| 会东县| 云南省| 嘉荫县| 淮北市| 关岭| 通河县| 岑巩县| 凤城市| 百色市| 和龙市| 洪湖市| 衡阳市| 许昌县| 保山市| 益阳市| 临泉县| 广河县| 桂东县| 江孜县| 闻喜县| 宜川县| 扎赉特旗| 汉寿县| 镇雄县| 昭通市| 娄底市| 崇仁县| 和林格尔县| 兴文县| 东兰县| 右玉县| 阜康市| 方正县| 芦溪县| 博罗县| 威远县| 石首市| 山阴县| 东平县| 宁夏|