An Anomaly-Based Approach for Detecting Modularity Violations on Method Placement
An Anomaly-Based Approach for Detecting Modularity Violations on Method Placement
复制标题
DOI:
10.1109/qrs57517.2022.00038
复制
发表时间:
2022-12
期刊:
影响因子:
--
通讯作者:
Kazuki Yoda;Tomoki Nakamaru;Soramichi Akiyama;S. Chiba
中科院分区:
文献类型:
--
作者:
Kazuki Yoda;Tomoki Nakamaru;Soramichi Akiyama;S. Chiba
This paper presents a technique for detecting an anomaly in method placements in Java packages. This anomaly detection helps code reviewers discover a method belonging to an inappropriate package in modularity when developers commit changes in their software development projects. Moving such a method to an appropriate package will contribute to the maintenance of good modularity in their projects. This is particularly beneficial in the later stage of development, where modularity is often violated by adding new features not anticipated in the initial plan. Our technique is based on few-shot classification in machine learning. This paper empirically reveals that our neural network model can detect an anomaly in method placements and a significant portion of the anomalies is considered as inappropriate method placements in modularity. Our model can discover even a method placement that violates a project-specific coding rule that its developers would choose for some reason of maintainability or readability. Our technique is useful for maintaining the consistency in such a project-specific rule.