Replication Package for the Paper: Towards Automated Identification of Violation Symptoms of Architecture Erosion
收藏NIAID Data Ecosystem2026-05-02 收录
下载链接:
https://zenodo.org/record/13989440
下载链接
链接失效反馈官方服务:
资源简介:
Abstract of this Study
Architecture erosion has a detrimental effect on maintenance and evolution, as the implementation drifts away from the intended architecture. To prevent this, development teams need to understand early enough the symptoms of erosion, and particularly violations of the intended architecture. One way to achieve this, is through the automated identification of architecture violations from textual artifacts, and particularly code reviews. In this paper, we developed 15 machine learning-based and 4 deep learning-based classifiers with three pre-trained word embeddings to identify violation symptoms of architecture erosion from developer discussions in code reviews. Specifically, we looked at code review comments from four large open-source projects from the OpenStack (Nova and Neutron) and Qt (Qt Base and Qt Creator) communities. We then conducted a survey and semi-structured interviews to acquire feedback from the involved participants who discussed architecture violations in code reviews, to validate the usefulness of our trained classifiers. The results show that the SVM classifier based on word2vec pre-trained word embedding performs the best with an F1-score of 0.779. In most cases, classifiers with the fastText pre-trained word embedding model can achieve relatively good performance. Furthermore, 200-dimensional pre-trained word embedding models outperform classifiers that use 100 and 300-dimensional models. In addition, an ensemble classifier based on the majority voting strategy can further enhance the classifier and outperforms the individual classifiers. Finally, the findings derived from the online survey and interviews conducted with the involved developers reveal that the violation symptoms identified by our approaches have practical value and can provide early warnings for impending architecture erosion.
Structure of the Replication Package
data.zip includes: (1) extracted features (extracted_features) as inputs of classifiers, that is, word vectors of the extracted violation symptoms based on the three pre-trained word embedding models (i.e., word2vec, fastText, GloVe). (2) word_embedding includes pre-trained word embedding models. Due to the large size, we listed the download URL Download_url.txt, and we used embedding_dim.py to change the dimensions of the fastText models. (3) Violation symptoms.xlsx and Randomly_selected_comments.xlsx represent the review comments labeled as violations and non-violations, respectively.
scripts.zip includes the Python scripts used to run the experiments, including data preprocessing and classifier training.
survey and interview.zip include the survey form, interview protocol and questions, and the template of customized emails that we sent to participants.
Experiment Steps
1. Preprocessing and feature extraction:
Run feature_extraction.py to conduct preprocessing and feature extraction after adjusting appropriate parameters.
It includes five steps: (1) Tokenization (2) Noise Removal (3) Stop words Removal (4) Capitalization Conversion (5) Stemming.
Feature selection methods: word2vec, fastText, and Glove.
2. Training classifiers:
Run Classifiers_ML.py to train machine learning-based classifiers.
Run Classifiers_DL_classifiers.py to train deep learning-based classifiers.
Machine learning algorithms: Support Vector Machine (SVM), Logistic Regression (LR), Decision Tree (DT), Bernoulli Naive Bayes (NB), and k-Nearest Neighbor (kNN).
Deep learning algorithm: TextCNN
Experiment Environment
Required packages and their versions:
torch==1.11.0
numpy==1.22.3
gensim==4.1.2
fasttext==0.9.2
pandas==1.4.1
torchtext==0.12.0
sklearn==0.0
scikit-learn==1.0.2
w2vembeddings==0.1.2
matplotlib==3.5.1
tqdm==4.62.3
nltk==3.7
创建时间:
2024-10-25



