TransDPR: Design Pattern Recognition Using Programming Language Models
Paper in proceeding, 2023

Current Design Pattern Recognition (DPR) methods have limitations, such as the reliance on semantic information, limited recognition of novel or modified pattern versions, and other factors. We present an introductory DPR technique by using a Programming Language Model (PLM) called TransDPR, which utilizes a Facebook pre-trained model (TransCoder), which is a Cross-lingual programming Language Model (XLM) based on a transformer architecture. We leverage an n-dimensional vector representation of programs and apply logistic regression to learn design patterns (DPs). Our approach utilizes the GitHub repository to collect singleton and prototype DP programs written in C++ source code. Our results indicate that TransDPR achieves 90% accuracy and an F1-score of 0.88 on open-source projects. We evaluate the proposed model on two developed modules from Volvo Cars and invite the original developers to validate the prediction results.

Author

Sushant Kumar Pandey

Software Engineering 1

University of Gothenburg

Miroslaw Staron

University of Gothenburg

Chalmers, Computer Science and Engineering (Chalmers), Software Engineering (Chalmers)

Jennifer Horkoff

Software Engineering 1

University of Gothenburg

Miroslaw ochodek

Poznan University of Technology

Nicholas Mucci

Volvo Cars

Darko Durisic

Volvo Cars

Proceedings of the ACM-IEEE International Symposium on Empirical Software Engineering and Measurement

19493770 (ISSN)


9781665452236 (ISBN)

17th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2023
New Orleans, USA,

Subject Categories (SSIF 2025)

Software Engineering

Computer Sciences

DOI

10.55060/j.jseas.231018.001

More information

Latest update

6/26/2025