Attention-Based Method for Design Pattern Detection

被引:1
|
作者
Mzid, Rania [1 ,2 ]
Rezgui, Ilyes [1 ]
Ziadi, Tewfik [3 ]
机构
[1] Univ Tunis El Manar, ISI, 2 Rue Abourraihan Al Bayrouni, Ariana, Tunisia
[2] Univ Sfax, CES Lab ENIS, Sfax, Tunisia
[3] Sorbonne Univ, CNRS, LIP6, F-75005 Paris, France
来源
关键词
Design pattern detection; Feature extraction; classification; Transformer architecture;
D O I
10.1007/978-3-031-70797-1_6
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Design patterns are standard solutions to recurrent software engineering problems. The use of design patterns helps developers improve software quality. However, when integrating design patterns into their systems, software developers usually do not document their use. To this end, the use of an automatic approach for their detection may accelerate program comprehension, assist developers in software refactoring, and reduce efforts during the maintenance task. In this paper, we propose an attention-based approach for design pattern detection. Specifically, we utilize an automatic feature extraction step with a transformer-based model incorporating the attention mechanism. Based on an unsupervised approach, this step learns from source code to identify code attributes and then produces embedding vectors. These vectors capture syntactic and semantic information related to design pattern implementations and serve as input to train a classifier for the design pattern detection task. The attention mechanism is used to produce important representative features of design pattern implementations and improve the accuracy of the classification model. The evaluation shows that our classifier detects GoF design patterns with an accuracy score of 86%, precision of 87%, recall of 86%, and F1-score of 86%. The comparison of our findings with state-of-the-art methods shows an improvement in (i) precision of 25%, (ii) recall of 6%, and (iii) F1-score of 8%.
引用
收藏
页码:86 / 101
页数:16
相关论文
共 50 条
  • [31] Attention-Based Graph Convolution Networks for Event Detection
    National University of Defense Technology, Science and Technology on Information Systems Engineering Laboratory, Changsha, China
    Proc. - Int. Conf. Big Data Inf. Anal., BigDIA, (185-190):
  • [32] Visual attention-based deepfake video forgery detection
    Ganguly, Shreyan
    Mohiuddin, Sk
    Malakar, Samir
    Cuevas, Erik
    Sarkar, Ram
    PATTERN ANALYSIS AND APPLICATIONS, 2022, 25 (04) : 981 - 992
  • [33] Attention-Based Fully Convolutional DenseNet for Earthquake Detection
    Elsayed, Hagar S.
    Saad, Omar M.
    Soliman, M. Sami
    Chen, Yangkang
    Youness, Hassan A.
    IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING, 2022, 60
  • [34] Attention-based fusion factor in FPN for object detection
    Yuancheng Li
    Shenglong Zhou
    Hui Chen
    Applied Intelligence, 2022, 52 : 15547 - 15556
  • [35] Attention-based efficient robot grasp detection network
    Qin, Xiaofei
    Hu, Wenkai
    Xiao, Chen
    He, Changxiang
    Pei, Songwen
    Zhang, Xuedian
    FRONTIERS OF INFORMATION TECHNOLOGY & ELECTRONIC ENGINEERING, 2023, 24 (10) : 1430 - 1444
  • [36] Visual Attention-Based Object Detection in Cluttered Environments
    Machado, Eduardo
    Carrillo, Ivan
    Collado, Miguel
    Chen, Liming
    2019 IEEE SMARTWORLD, UBIQUITOUS INTELLIGENCE & COMPUTING, ADVANCED & TRUSTED COMPUTING, SCALABLE COMPUTING & COMMUNICATIONS, CLOUD & BIG DATA COMPUTING, INTERNET OF PEOPLE AND SMART CITY INNOVATION (SMARTWORLD/SCALCOM/UIC/ATC/CBDCOM/IOP/SCI 2019), 2019, : 133 - 139
  • [37] A regional attention-based detector for SAR ship detection
    Qi, Xinyue
    Lang, Ping
    Fu, Xiongjun
    Qin, Rui
    Dong, Jian
    Liu, Chang
    REMOTE SENSING LETTERS, 2022, 13 (01) : 55 - 64
  • [38] Attention-based Neural Network for Traffic Sign Detection
    Zhang, Jing
    Hui, Le
    Lu, Jianfeng
    Zhu, Yuhua
    2018 24TH INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION (ICPR), 2018, : 1839 - 1844
  • [39] Hybrid Attention-based Approach for Arabic Paraphrase Detection
    Mahmoud, Adnen
    Zrigui, Mounir
    APPLIED ARTIFICIAL INTELLIGENCE, 2021, 35 (15) : 1271 - 1286
  • [40] Efficient attention-based networks for fire and smoke detection
    Xiao, Bowei
    Yan, Chunman
    JOURNAL OF ELECTRONIC IMAGING, 2024, 33 (05)