Abstract
Bad smells are indicators of inappropriate code design and implementation. They suggest a need for refactoring, i.e. restructuring the program towards better readability, understandability and eligibility for changes. Smells are defined only in terms of general, subjective criteria, which makes them difficult for automatic identification. Existing approaches to smell detection base mainly on human intuition, usually supported by code metrics. Unfortunately, these models do not comprise the full spectrum of possible smell symptoms and still are uncertain. In the paper we propose a multi-criteria approach for detecting smells adopted from UTA method. It learns from programmer’s preferences, and then combines the signals coming from different sensors in the code and computes their utility functions. The final result reflects the intensity of an examined smell, which allows the programmer to make a ranking of most onerous odors.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Beck, K.: Extreme Programming Explained. In: Embrace Change, Addison-Wesley, Reading (2000)
Fowler, M.: Refactoring. In: Improving Design of Existing Code, Addison-Wesley, Reading (1999)
Jacquet-Lagreze, E., Siskos, J.: Assessing a Set of Additive Utility Functions for Multicriteria Decision-making, the UTA Method. European Journal on Operational Research 10(2), 151–164 (1982)
van Emden, E., Moonen, L.: Java Quality Assurance by Detecting Code Smells. In: Proceedings of the 9th Working Conference on Reverse Engineering, IEEE Computer Press, Los Alamitos (2003)
Simon, F., Steinbrueckner, F., Lewerentz, C.: Metrics Based Refactoring. In: Proceedings of CSMR Conference, Lisbon (2001)
JUnit (January 2005), http://www.junit.org
Pietrzak, B., Walter, B.: Automated Detection of Data Class smell. In: Inż. Oprogramowania, N. (ed.) WNT, pp. 465–477 (2004) (in Polish)
Walter, B., Pietrzak, B.: Automated Generation of Unit Tests for Refactoring. In: Eckstein, J., Baumeister, H. (eds.) XP 2004. LNCS, vol. 3092, pp. 211–214. Springer, Heidelberg (2004)
Ratju, D., Ducasse, S., Gybra, T., Marinescu, R.: Using History Information to Improve Design Flaws Detection. In: Proceedings of 8th European Conference on Software Maintenance and Reengineering, pp. 223–232. IEEE Computer Society Press, Washington (2004)
Beuthe, M., Scannella, G.: Comparative Analysis of UTA Multicriteria Methods. European Journal of Operational Research 130(2), 246–262 (2001)
NASA Software Assurance Technology Center: SATC Historical Metrics Database (January 2005), http://satc.gsfc.nasa.gov/metrics/codemetrics/oo/java/index.html
Chidamber, S.R., Kemerer, C.F.: A Metrics Suite from Object-Oriented Design. IEEE Transactions on Software Engineering 20(6), 476–493 (1994)
The Apache Jakarta Project: Tomcat 5.5.4 January (2005), http://jakarta.apache.org/tomcat/index.html
Pietrzak, B.: XSmells: Computer Aided Refactoring of Software. M. Sc Thesis, Poznań University of Technology. Poznań, Poland (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Walter, B., Pietrzak, B. (2005). Multi-criteria Detection of Bad Smells in Code with UTA Method. In: Baumeister, H., Marchesi, M., Holcombe, M. (eds) Extreme Programming and Agile Processes in Software Engineering. XP 2005. Lecture Notes in Computer Science, vol 3556. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11499053_18
Download citation
DOI: https://doi.org/10.1007/11499053_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-26277-0
Online ISBN: 978-3-540-31487-5
eBook Packages: Computer ScienceComputer Science (R0)