DOI QR코드

DOI QR Code

Validation Technique for Class Name Postfixes Based on the Machine Learning of Class Properties

클래스 특성 기계학습에 기반한 클래스 이름의 접미사 검증 기법

  • Received : 2014.12.24
  • Accepted : 2015.04.07
  • Published : 2015.06.30

Abstract

As software has gotten bigger in magnitude and the complexity of software has been increased, the maintenance has gained in-creasing attention for its significant impact on the cost. Identifiers have an impact on more than 90 percent of the readability which accounts for a majority portion of the maintenance activities. For this reason, the existing works focus on domain-specific features based on identifiers. However, their approaches have a limitation when either a class name does not reflect the intention of its context or a class naming is incorrect. Therefore, this paper suggests a series of class name validation process by extracting properties of classes, building learning model by applying a decision tree technique of machine learning, and generating a validation report containing the list of recommendable postfixes of classes to be validated. To evaluate this, four open source projects are selected and indicators such as precision, recall, and ROC curve present the value of this work when it comes to five specific postfixes including functional information on class names.

소프트웨어의 규모가 커지고 복잡성이 증가함에 따라 소프트웨어의 유지보수가 보다 중요해지고 있으며 유지보수성에 많은 영향을 미치는 요인 중 하나는 소스코드 가독성이다. 가독성의 90% 이상 영향을 끼치는 요인은 소스코드에서 사용되는 식별자들의 이름이며 이를 위한 기존 연구들에서는 클래스의 식별자로 사용된 어휘를 이용하여 식별자의 이름을 검증한다. 하지만 대부분의 관련 연구는 그 특성상 개체의 도메인 관련 특성만을 고려하게 되며 클래스 내의 어휘가 적절하지 못한 경우 적용할 수 있는 범위가 한정적이라는 한계점이 있다. 본 논문에서는 클래스의 특성을 추출하여 의사결정트리 기법을 통해 기계학습을 시킨 후 클래스 역할 모델을 생성하며 이를 이용하여 이름을 검증할 대상 클래스의 역할에 해당하는 접미사를 추천하게 되어 클래스 이름 검증 보고서를 생성한다. 본 연구 기법의 효용성을 검증하기 위해 4개의 오픈소스 프로젝트에 대하여 본 연구 기법을 적용하였고 클래스 역할 정보를 담고 있는 5개의 접미사에 대해 정확도와 재현율, ROC 곡선과 같은 지표를 제시하였다.

Keywords

References

  1. Y. Ren, T. Xing, and X. Chai, "Research on Software Maintenance Cost of Influence Factor Analysis and Estimation Method," 3rd International Workshop on Intelligent Systems and Applications, pp.1-4, 2011.
  2. M. Fowler, "Refactoring: Improving the Design of Existing Code," Addison-Wesley, 1999.
  3. B. Boehm, V. R. Basili, "Software Defect Reduction Top 10 List," Computer, Vol.34, No.1, pp.135-137, 2001. https://doi.org/10.1109/2.962984
  4. Robert C. Martin, "Clean Code: A Handbook of Agile Software Craftsmanship," Pearson Education, p.309, 2008.
  5. William C. Wake, "Refactoring Workbook," Pearson Education, p.39, 2003.
  6. Simon Butler, Michel Wermelinger, Yijun Yu, and Helen Sharp, "Mining Java Class Naming Conventions," 27th IEEE International Conference on Software Maintenance, pp.93-102, 2011.
  7. Jeremy Singer, Chris Kirkham, "Exploiting the Correspondence between Micro Patterns and Class Names," 8th IEEE International working conference on Source Code Analysis and Manipulation, pp.67-76, 2008.
  8. Samir Gupta, Sana Malik, Lori Pollock, and K. Vijay-Shanker, "Part-of-Speech Tagging of Program Identifiers for Improved Text-Based Software Engineering Tools," IEEE 21st International Conference on Program Comprehension(ICPC), pp.3-12, 2013.
  9. JHotDraw [Internet], http://www.jhotdraw.org.
  10. ArgoUML [Internet], http://argouml.tigris.org.
  11. jEdit [Internet], http://www.jedit.org.
  12. JMeter [Internet], http://jmeter.apache.org.
  13. ORACLE Java Documentation [Internet], https://docs.oracle.com/javase/tutorial/java/javaOO/classdecl.html.
  14. J. Ross Quinlan, "C4.5: Programs for machine learning," Morgan Kaufmann Publishers, 1993.
  15. Y. Gil, I. Maman. "Micro Patterns in Java Code," 20th annual ACM SIGPLAN conference on Object Oriented Programming Systems Languages and Applications, pp.97-116, 2005.