跳至主要内容

Detecting Design Patterns in Object-Oriented Program Source Code by Using Metrics and Machine Learning

Read full paper at:
http://www.scirp.org/journal/PaperInformation.aspx?PaperID=51394#.VGlWmWfHRK0

Detecting well-known design patterns in object-oriented program source code can help maintainers understand the design of a program. Through the detection, the understandability, maintainability, and reusability of object-oriented programs can be improved. There are automated detection techniques; however, many existing techniques are based on static analysis and use strict conditions composed on class structure data. Hence, it is difficult for them to detect and distinguish design patterns in which the class structures are similar. Moreover, it is difficult for them to deal with diversity in design pattern applications. To solve these problems in existing techniques, we propose a design pattern detection technique using source code metrics and machine learning. Our technique judges candidates for the roles that compose design patterns by using machine learning and measurements of several metrics, and it detects design patterns by analyzing the relations between candidates. It suppresses false negatives and distinguishes patterns in which the class structures are similar. As a result of experimental evaluations with a set of programs, we confirmed that our technique is more accurate than two conventional techniques.
Cite this paper
Uchiyama, S. , Kubo, A. , Washizaki, H. and Fukazawa, Y. (2014) Detecting Design Patterns in Object-Oriented Program Source Code by Using Metrics and Machine Learning. Journal of Software Engineering and Applications, 7, 983-998. doi: 10.4236/jsea.2014.712086
 

[1] Gamma, E., Helm, R., Johnson, R. and Vlissides, J. (1994) Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston.
[2] Lorenz, M. and Kidd, J. (1994) Object-Oriented Software Metrics. Prentice Hall, Upper Saddle River.
[3] Uchiyama, S., Kubo, A., Washizaki, H. and Fukazawa, Y. (2011) Design Pattern Detection Using Software Metrics and Machine Learning. Proceedings of the 5th International Workshop on Software Quality and Maintainability, Oldenburg, 1 March 2011, 38-47.
[4] Tsantalis, N., Chatzigeorgiou, A., Stephanides, G. and Halkidis, S. (2006) Design Pattern Detection Using Similarity Scoring. IEEE Transactions on Software Engineering, 32, 896-909.
http://dx.doi.org/10.1109/TSE.2006.112
[5] Blewitt, A., Bundy, A. and Stark, L. (2005) Automatic Verification of Design Patterns in Java. Proceedings of the 20th International Conference on Automated Software Engineering, Long Beach, 7-11 November 2005, 224-232.
[6] Kim, H. and Boldyreff, C. (2000) A Method to Recover Design Patterns Using Software Product Metrics. In: Proceedings of the 6th International Conference on Software Reuse: Advances in Software Reusability, Vienna, 27-29 June 2000, 318-335.
[7] Ferenc, R., Beszedes, A., Fulop, L. and Lele, J. (2005) Design Pattern Mining Enhanced by Machine Learning. Proceedings of the 21st IEEE International Conference on Software Maintenance, Budapest, 26-29 September 2005, 295-304. http://dx.doi.org/10.1109/ICSM.2005.40
[8] Washizaki, H., Fukaya, K., Kubo, A. and Fukazawa, Y. (2009) Detecting Design Patterns Using Source Code of before Applying Design Patterns. In: Proceedings of the 8th IEEE/ACIS International Conference on Computer and Information Science, Shanghai, 1-3 June 2009, 933-938.
[9] Shi, N. and Olsson, R.A. (2006) Reverse Engineering of Design Patterns from Java Source Code. In: Proceedings of the 21st IEEE/ACM International Conference on Automated Software Engineering, Tokyo, 18-22 September 2006, 123-134. http://dx.doi.org/10.1109/ASE.2006.57
[10] Lee, H., Youn, H. and Lee, S. (2007) Automatic Detection of Design Pattern for Reverse Engineering. In: Proceedings of the 5th ACIS International Conference on Software Engineering Research, Management and Applications, Busan, 20-22 August 2007, 577-583.
[11] Wendehals, L. and Orso, A. (2006) Recognizing Behavioral Patterns at Runtime Using Finite Automata. Proceedings of the 4th ICSE 2006 Workshop on Dynamic Analysis, Shanghai, 26 May 2006, 33-40. http://dx.doi.org/10.1145/1138912.1138920
[12] Hayashi, S., Katada, J., Sakamoto, R., Kobayashi, T. and Saeki, M. (2008) Design Pattern Detection by Using Meta Patterns. IEICE Transactions on Information and Systems, 91-D, 933-944.
http://dx.doi.org/10.1093/ietisy/e91-d.4.933
[13] Lucia, A., Deufemia, V., Gravino, C. and Risi, M. (2009) Design Pattern Recovery through Visual Language Parsing and Source Code Analysis. Journal of Systems and Software, 82, 1177-1193.
http://dx.doi.org/10.1016/j.jss.2009.02.012
[14] Guéhéneuc, Y. and Antoniol, G. (2008) DeMIMA: A Multilayered Approach for Design Pattern Identification. IEEE Transactions on Software Engineering, 34, 667-684.
http://dx.doi.org/10.1109/TSE.2008.48
[15] Dietrich, J. and Elgar, C. (2007) Towards a Web of Patterns. Journal of Web Semantics, 5, 108-116. http://dx.doi.org/10.1016/j.websem.2006.11.007
[16] Basili, V.R. and Weiss, D.M. (1984) A Methodology for Collecting Valid Software Engineering Data. IEEE Transactions on Software Engineering, 10, 728-738.
http://dx.doi.org/10.1109/TSE.1984.5010301
[17] Segaran, T. (2007) Programming Collective Intelligence. O’Reilly, Sebastopol.
[18] Hirano, H. (2008) Neural Network Implemented with C++ and Java. Personal Media, Tokyo.
[19] Kurita, T. (1990) Deciding Unit Number of Hidden Layer in Three-Layer-Neural Network by Using Information Criteria. IEICE Transactions on Information and Systems, 73, 1872-1878.
[20] Yuki, H. (2014) An Introduction to Design Patterns to Study by Java. http://www.hyuki.com/dp/
[21] Tanaka, H. (2010) Hello World with Java! http://web.archive.org/web/20100808072152/
[22] Oracle. Oracle Technology Network for Java Developers.
http://www.oracle.com/technetwork/java/index.html             eww141117lx
[23] JUnit.org. Resources for Test Driven Development. http://www.junit.org/
[24] SpringSource.org. Spring Source. http://www.springsource.org/

评论

此博客中的热门博文

A Comparison of Methods Used to Determine the Oleic/Linoleic Acid Ratio in Cultivated Peanut (Arachis hypogaea L.)

Cultivated peanut ( Arachis hypogaea L.) is an important oil and food crop. It is also a cheap source of protein, a good source of essential vitamins and minerals, and a component of many food products. The fatty acid composition of peanuts has become increasingly important with the realization that oleic acid content significantly affects the development of rancidity. And oil content of peanuts significantly affects flavor and shelf-life. Early generation screening of breeding lines for high oleic acid content greatly increases the efficiency of developing new peanut varieties. The objective of this study was to compare the accuracy of methods used to classify individual peanut seed as high oleic or not high oleic. Three hundred and seventy-four (374) seeds, spanning twenty-three (23) genotypes varying in oil composition (i.e. high oleic (H) or normal/not high oleic (NH) inclusive of all four peanut market-types (runner, Spanish, Valencia and Virginia), were individually tested ...

Location Optimization of a Coal Power Plant to Balance Costs against Plant’s Emission Exposure

Fuel and its delivery cost comprise the biggest expense in coal power plant operations. Delivery of electricity from generation to consumers requires investment in power lines and transmission grids. Placing a coal power plant or multiple power plants near dense population centers can lower transmission costs. If a coalmine is nearby, transportation costs can also be reduced. However, emissions from coal plants play a key role in worsening health crises in many countries. And coal upon combustion produces CO 2 , SO 2 , NO x , CO, Metallic and Particle Matter (PM10 & PM2.5). The presence of these chemical compounds in the atmosphere in close vicinity to humans, livestock, and agriculture carries detrimental health consequences. The goal of the research was to develop a methodology to minimize the public’s exposure to harmful emissions from coal power plants while maintaining minimal operational costs related to electric distribution losses and coal logistics. The objective was...

Evaluation of the Safety and Efficacy of Continuous Use of a Home-Use High-Frequency Facial Treatment Appliance

At present, many home-use beauty devices are available in the market. In particular, many products developed for facial treatment use light, e.g., a flash lamp or a light-emitting diode (LED). In this study, the safety of 4 weeks’ continuous use of NEWA TM , a high-frequency facial treatment appliance, every alternate day at home was verified, and its efficacy was evaluated in Japanese individuals with healthy skin aged 30 years or older who complained of sagging of the facial skin.  Transepidermal water loss (TEWL), melanin levels, erythema levels, sebum secretion levels, skin color changes and wrinkle improvement in the facial skin were measured before the appliance began to be used (study baseline), at 2 and 4 weeks after it had begun to be used, and at 2 weeks after completion of the 4-week treatment period (6 weeks from the study baseline). In addition, data obtained by subjective evaluation by the subjects themselves on a visual analog scale (VAS) were also analyzed. Fur...