国产欧美精品一区二区,中文字幕专区在线亚洲,国产精品美女网站在线观看,艾秋果冻传媒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
  • 出版日期:
文章二維碼
丹寨县| 横山县| 德阳市| 揭东县| 固镇县| 普安县| 额敏县| 昌图县| 宁安市| 如皋市| 昆山市| 稷山县| 比如县| 淮安市| 鹤庆县| 汪清县| 安顺市| 霍山县| 西和县| 尉氏县| 贺兰县| 天祝| 遵化市| 凯里市| 广南县| 冀州市| 香河县| 成都市| 台山市| 长海县| 新和县| 兴化市| 临汾市| 九江市| 上杭县| 思南县| 西平县| 讷河市| 东莞市| 施甸县| 锦州市|