{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,28]],"date-time":"2026-08-28T04:06:51Z","timestamp":1787890011322,"version":"build-2784847793"},"reference-count":33,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2018,10,24]],"date-time":"2018-10-24T00:00:00Z","timestamp":1540339200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2018,10,24]]},"abstract":"<jats:p>Refactoring is a program transformation that restructures existing code without altering its behaviour and is a key practice in popular software design movements, such as Agile. Identification of potential refactoring opportunities is an important step in the refactoring process. In large systems, manual identification of useful refactoring opportunities requires a lot of effort and time. Hence, there is a need for automatic identification of refactoring opportunities. However, this problem has not been addressed well for many non-trivial refactorings. Two such non-trivial, yet popular refactorings are \u201cReplace Type Code with Subclass\u201d\u00a0(SC) and \u201cReplace Type Code with State\u201d\u00a0(ST) refactorings. In this paper, we present new approaches to identify SC and ST refactoring opportunities.<\/jats:p>\n          <jats:p>\n            Our proposed approach is based around the notion of\n            <jats:italic>control-fields<\/jats:italic>\n            . A control-field is a field of a class that exposes the different underlying behaviors of the class. Each control-field can lead to a possible SC\/ST refactoring of the associated\/interacting classes. We first present a formal definition of control-fields and then present algorithms to identify and prune them; each of these pruned control-fields represents a refactoring opportunity. Further, we present a novel flow- and context-sensitive analysis to classify each of these refactoring opportunities into one of the SC and ST opportunities. We have implemented our proposed approach in a tool called Auto-SCST, and demonstrated its effectiveness by evaluating it against eight open-source Java applications.\n          <\/jats:p>","DOI":"10.1145\/3276508","type":"journal-article","created":{"date-parts":[[2018,10,24]],"date-time":"2018-10-24T11:57:18Z","timestamp":1540382238000},"page":"1-28","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":5,"title":["Identifying refactoring opportunities for replacing type code with subclass and state"],"prefix":"10.1145","volume":"2","author":[{"given":"Jyothi","family":"Vedurada","sequence":"first","affiliation":[{"name":"IIT Madras, India"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"V. Krishna","family":"Nandivada","sequence":"additional","affiliation":[{"name":"IIT Madras, India"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2018,10,24]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-013-9256-x"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/1167473.1167488"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/292540.292554"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.infsof.2012.05.004"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.5555\/646153.679523"},{"key":"e_1_2_2_6_1","doi-asserted-by":"crossref","unstructured":"Serge Demeyer St\u00e9phane Ducasse and Oscar Nierstrasz. 2002. Object-oriented reengineering patterns. Elsevier.   Serge Demeyer St\u00e9phane Ducasse and Oscar Nierstrasz. 2002. Object-oriented reengineering patterns. Elsevier.","DOI":"10.1016\/B978-155860639-5\/50006-7"},{"key":"e_1_2_2_7_1","volume-title":"Eclipse: A Java Integrated Development Environment (IDE). https:\/\/eclipse.org\/","year":"2017"},{"key":"e_1_2_2_8_1","volume-title":"Refactoring: Improving the Design of Existing Code","author":"Fowler M.","year":"1999"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.infsof.2014.10.010"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.1977.231133"},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1109\/AQTR.2010.5520665"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.5555\/785409.785835"},{"key":"e_1_2_2_13_1","doi-asserted-by":"publisher","DOI":"10.4038\/icter.v7i2.7176"},{"key":"e_1_2_2_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2001.972794"},{"key":"e_1_2_2_15_1","doi-asserted-by":"crossref","unstructured":"Joshua Kerievsky. 2005. Refactoring to patterns. Pearson Deutschland GmbH.   Joshua Kerievsky. 2005. Refactoring to patterns. Pearson Deutschland GmbH.","DOI":"10.1007\/978-3-540-27777-4_54"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2015.7332467"},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/2134254.2134257"},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.1109\/WCRE.2007.40"},{"key":"e_1_2_2_19_1","doi-asserted-by":"crossref","unstructured":"Ond\u0159ej Lhot\u00e1k and Laurie Hendren. 2003. Scaling Java Points-to Analysis Using Spark. In Compiler Construction G\u00f6rel Hedin (Ed.). Springer Berlin Heidelberg Berlin Heidelberg 153\u2013169.   Ond\u0159ej Lhot\u00e1k and Laurie Hendren. 2003. Scaling Java Points-to Analysis Using Spark. In Compiler Construction G\u00f6rel Hedin (Ed.). Springer Berlin Heidelberg Berlin Heidelberg 153\u2013169.","DOI":"10.1007\/3-540-36579-6_12"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.1976.233837"},{"key":"e_1_2_2_21_1","unstructured":"William F. Opdyke. 1992. Refactoring Object-oriented Frameworks. Ph.D. Dissertation. University of Illinois at UrbanaChampaign Champaign IL USA. UMI Order No. GAX93-05645.   William F. Opdyke. 1992. Refactoring Object-oriented Frameworks. Ph.D. Dissertation. University of Illinois at UrbanaChampaign Champaign IL USA. UMI Order No. GAX93-05645."},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/170791.170804"},{"key":"e_1_2_2_23_1","unstructured":"Alexandru D. Salcianu. 2006. Pointer Analysis for Java Programs: Novel Techniques and Applications. Ph.D. Dissertation. Cambridge MA USA. Advisor(s) Rinard Martin C. AAI0818179.   Alexandru D. Salcianu. 2006. Pointer Analysis for Java Programs: Novel Techniques and Applications. Ph.D. Dissertation. Cambridge MA USA. Advisor(s) Rinard Martin C. AAI0818179."},{"key":"e_1_2_2_24_1","unstructured":"Sourceforge. 2016. SoureForge. https:\/\/sourceforge.net\/  Sourceforge. 2016. SoureForge. https:\/\/sourceforge.net\/"},{"key":"e_1_2_2_25_1","volume-title":"Boomerang: Demand-Driven Flow- and Context-Sensitive Pointer Analysis for Java. In 30th European Conference on Object-Oriented Programming, ECOOP 2016","author":"Sp\u00e4th Johannes","year":"2016"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/1028976.1029003"},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1023\/A:1008715808855"},{"key":"e_1_2_2_28_1","unstructured":"Nikolaos Tsantalis. 2018. https:\/\/users.encs.concordia.ca\/~nikolaos\/stats.html .  Nikolaos Tsantalis. 2018. https:\/\/users.encs.concordia.ca\/~nikolaos\/stats.html ."},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2009.1"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2009.09.017"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE-C.2017.97"},{"key":"e_1_2_2_32_1","unstructured":"Jyothi Vedurada and V. Krishna Nandivada. 2018. Supplementary Material. https:\/\/github.com\/anony-user\/Auto-SCST .  Jyothi Vedurada and V. Krishna Nandivada. 2018. Supplementary Material. https:\/\/github.com\/anony-user\/Auto-SCST ."},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/320384.320400"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3276508","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3276508","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T19:03:39Z","timestamp":1750273419000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3276508"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2018,10,24]]},"references-count":33,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2018,10,24]]}},"alternative-id":["10.1145\/3276508"],"URL":"https:\/\/doi.org\/10.1145\/3276508","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2018,10,24]]},"assertion":[{"value":"2018-10-24","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}