{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,1,30]],"date-time":"2026-01-30T00:31:18Z","timestamp":1769733078317,"version":"3.49.0"},"reference-count":72,"publisher":"Association for Computing Machinery (ACM)","issue":"1","license":[{"start":{"date-parts":[[2014,10,14]],"date-time":"2014-10-14T00:00:00Z","timestamp":1413244800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2014,10,14]]},"abstract":"<jats:p>Code smells represent design situations that can affect the maintenance and evolution of software. They make the system difficult to evolve. Code smells are detected, in general, using quality metrics that represent some symptoms. However, the selection of suitable quality metrics is challenging due to the absence of consensus in identifying some code smells based on a set of symptoms and also the high calibration effort in determining manually the threshold value for each metric. In this article, we propose treating the generation of code-smell detection rules as a bilevel optimization problem. Bilevel optimization problems represent a class of challenging optimization problems, which contain two levels of optimization tasks. In these problems, only the optimal solutions to the lower-level problem become possible feasible candidates to the upper-level problem. In this sense, the code-smell detection problem can be treated as a bilevel optimization problem, but due to lack of suitable solution techniques, it has been attempted to be solved as a single-level optimization problem in the past. In our adaptation here, the upper-level problem generates a set of detection rules, a combination of quality metrics, which maximizes the coverage of the base of code-smell examples and artificial code smells generated by the lower level. The lower level maximizes the number of generated artificial code smells that cannot be detected by the rules produced by the upper level. The main advantage of our bilevel formulation is that the generation of detection rules is not limited to some code-smell examples identified manually by developers that are difficult to collect, but it allows the prediction of new code-smell behavior that is different from those of the base of examples. The statistical analysis of our experiments over 31 runs on nine open-source systems and one industrial project shows that seven types of code smells were detected with an average of more than 86% in terms of precision and recall. The results confirm the outperformance of our bilevel proposal compared to state-of-art code-smell detection techniques. The evaluation performed by software engineers also confirms the relevance of detected code smells to improve the quality of software systems.<\/jats:p>","DOI":"10.1145\/2675067","type":"journal-article","created":{"date-parts":[[2014,10,21]],"date-time":"2014-10-21T12:36:57Z","timestamp":1413895017000},"page":"1-44","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":80,"title":["Code-Smell Detection as a Bilevel Problem"],"prefix":"10.1145","volume":"24","author":[{"given":"Dilan","family":"Sahin","sequence":"first","affiliation":[{"name":"University of Michigan, Dearborn"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Marouane","family":"Kessentini","sequence":"additional","affiliation":[{"name":"University of Michigan, Dearborn"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Slim","family":"Bechikh","sequence":"additional","affiliation":[{"name":"University of Michigan, Dearborn"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Kalyanmoy","family":"Deb","sequence":"additional","affiliation":[{"name":"Michigan State University"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2014,10,14]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1002\/smr.4360050202"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSMC.1981.4308712"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2007.4362633"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-013-9249-9"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1109\/32.979986"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1016\/0305-0548(82)90007-7"},{"key":"e_1_2_1_7_1","doi-asserted-by":"crossref","unstructured":"J. Bard. 1998. Practical Bilevel Optimization: Algorithms and Applications. Kluwer Academic Publishers The Netherlands.   J. Bard. 1998. Practical Bilevel Optimization: Algorithms and Applications. Kluwer Academic Publishers The Netherlands.","DOI":"10.1007\/978-1-4757-2836-1"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1109\/32.544352"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/336512.336534"},{"key":"e_1_2_1_10_1","volume-title":"Technical Report 80-2, Operations Research Program","author":"Bialas Wayne F.","year":"1980"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-39742-4_6"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1287\/opre.21.1.37"},{"key":"e_1_2_1_13_1","volume-title":"Proceedings of the International Software Engineering Research Network.","author":"Briand Lionel C.","year":"1995"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/32.748920"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.5555\/525586.823874"},{"key":"e_1_2_1_16_1","volume-title":"Proceedings of the European Conference on Object--Oriented Programming (ECOOP'95)","author":"Abreu Fernando Brito","year":"1995"},{"key":"e_1_2_1_17_1","unstructured":"William J. Brown Raphael C. Malveau Hays W. McCormick III and Thomas J. Mowbray. 1998. Antipatterns: Refactoring Software Architectures and Projects in Crisis. John Wiley & Sons Inc. New York NY.   William J. Brown Raphael C. Malveau Hays W. McCormick III and Thomas J. Mowbray. 1998. Antipatterns: Refactoring Software Architectures and Projects in Crisis. John Wiley & Sons Inc. New York NY."},{"key":"e_1_2_1_18_1","doi-asserted-by":"crossref","unstructured":"Herminia\n     I.\n      \n  \n   \n  Calvete and Carmen Gal\u00e9\n  . \n  2010\n  . A multiobjective bilevel program for production-distribution planning in a supply chain. In Multiple Criteria Decision Making for Sustainable Energy and Transportation Systems Lecture Notes in Computer Science vol. \n  634 Springer-Verlag Berlin\/Heidelberg 155--165.  Herminia I. Calvete and Carmen Gal\u00e9. 2010. A multiobjective bilevel program for production-distribution planning in a supply chain. In Multiple Criteria Decision Making for Sustainable Energy and Transportation Systems Lecture Notes in Computer Science vol. 634 Springer-Verlag Berlin\/Heidelberg 155--165.","DOI":"10.1007\/978-3-642-04045-0_13"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1016\/0305-0548(82)90006-5"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/32.295895"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1109\/32.372153"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.5555\/832257.833062"},{"key":"e_1_2_1_23_1","unstructured":"Peter Coad and Edward Yourdon. 1991. Object-Oriented Design. Yourdon Press Upper Saddle River NJ.   Peter Coad and Edward Yourdon. 1991. Object-Oriented Design. Yourdon Press Upper Saddle River NJ."},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10589-005-4612-4"},{"key":"e_1_2_1_25_1","doi-asserted-by":"crossref","unstructured":"Benoit Colson Patrice Marcotte and Gilles Savard. 2005b. Bilevel programming: A survey. 4OR 3 2 (2005) 87--107.  Benoit Colson Patrice Marcotte and Gilles Savard. 2005b. Bilevel programming: A survey. 4OR 3 2 (2005) 87--107.","DOI":"10.1007\/s10288-005-0071-0"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1109\/QSIC.2010.58"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0164-1212(02)00054-7"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0164-1212(03)00240-1"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1109\/CSMR.2008.4493326"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.5555\/525586.823879"},{"key":"e_1_2_1_31_1","unstructured":"Norman E. Fenton and Shari Lawrence Pfleeger. 1998. Software Metrics: A Rigorous and Practical Approach 2nd Ed. PWS Pub. Co. Boston MA.   Norman E. Fenton and Shari Lawrence Pfleeger. 1998. Software Metrics: A Rigorous and Practical Approach 2nd Ed. PWS Pub. Co. Boston MA."},{"key":"e_1_2_1_32_1","volume-title":"Refactoring: Improving the Design of Existing Code","author":"Fowler Martin","year":"1999","edition":"1"},{"key":"e_1_2_1_33_1","unstructured":"David E. Goldberg. 1989. Genetic Algorithms in Search Optimization and Machine Learning 1st Ed. Addison-Wesley Longman Publishing Co. Inc. Boston MA.   David E. Goldberg. 1989. Genetic Algorithms in Search Optimization and Machine Learning 1st Ed. Addison-Wesley Longman Publishing Co. Inc. Boston MA."},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/2379776.2379787"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1109\/FOSE.2007.29"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1109\/32.689404"},{"key":"e_1_2_1_37_1","first-page":"65","article-title":"A simple sequentially rejective multiple test procedure","volume":"6","author":"Holm Sture","year":"1979","journal-title":"Scand. J. Stat."},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/1858996.1859015"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2011.22"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1109\/QSIC.2009.47"},{"key":"e_1_2_1_41_1","volume-title":"Metaheuristics for Bi-level Optimization, Studies in Computational Intelligence","author":"Koh Andrew"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1023\/B:SQJO.0000024058.90885.6a"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/1101908.1101941"},{"key":"e_1_2_1_45_1","volume-title":"Proceedings of the IEEE Congress on Evolutionary Computation (CEC'12)","author":"Legillon Fran\u00e7ois"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2006.10.018"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/1595696.1595738"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.5555\/1018431.1021443"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-006-9002-8"},{"key":"e_1_2_1_50_1","volume-title":"Proceedings of the International Conference on Software Maintenance (ICSM'03)","author":"Mika M\u00e4ntyl\u00e4","year":"2003"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2010.5609545"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1051\/ro\/1994280100011"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2009.50"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.5555\/823457.824038"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1109\/METRICS.2005.38"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10515-011-0098-8"},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2013.6693086"},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-011-9195-3"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.5555\/977397.977733"},{"key":"e_1_2_1_60_1","unstructured":"Arthur J. Riel. 1996. Object-Oriented Design Heuristics (1st ed.). Addison-Wesley Boston MA.   Arthur J. Riel. 1996. Object-Oriented Design Heuristics (1st ed.). Addison-Wesley Boston MA."},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2006.6"},{"key":"e_1_2_1_62_1","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6377(94)90086-8"},{"key":"e_1_2_1_63_1","unstructured":"Ankur Sinha Pekka Malo and Kalyanmoy Deb. 2013a. Efficient evolutionary algorithm for single-objective bilevel optimization. KanGAL Report No. 2013003.  Ankur Sinha Pekka Malo and Kalyanmoy Deb. 2013a. Efficient evolutionary algorithm for single-objective bilevel optimization. KanGAL Report No. 2013003."},{"key":"e_1_2_1_64_1","doi-asserted-by":"publisher","DOI":"10.1109\/CEC.2013.6557607"},{"key":"e_1_2_1_65_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2012.89"},{"key":"e_1_2_1_66_1","doi-asserted-by":"publisher","DOI":"10.1145\/320384.320389"},{"key":"e_1_2_1_67_1","doi-asserted-by":"publisher","DOI":"10.1016\/0164-1212(81)90031-5"},{"key":"e_1_2_1_68_1","volume-title":"Proceedings of the 9th Working Conference on Reverse Engineering (WCRE'02)","author":"Van Emden E."},{"key":"e_1_2_1_69_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01096458"},{"key":"e_1_2_1_70_1","volume-title":"Proceedings of the 20th Working Conference on Reverse Engineering (WCRE'13)","author":"Aiko"},{"key":"e_1_2_1_71_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.infsof.2013.08.002"},{"key":"e_1_2_1_72_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2012.6405287"},{"key":"e_1_2_1_73_1","doi-asserted-by":"publisher","DOI":"10.1002\/smr.521"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/2675067","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/2675067","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T19:03:50Z","timestamp":1750273430000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/2675067"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2014,10,14]]},"references-count":72,"journal-issue":{"issue":"1","published-print":{"date-parts":[[2014,10,14]]}},"alternative-id":["10.1145\/2675067"],"URL":"https:\/\/doi.org\/10.1145\/2675067","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2014,10,14]]},"assertion":[{"value":"2013-11-01","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2014-08-01","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2014-10-14","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}