{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,6]],"date-time":"2026-10-06T15:16:50Z","timestamp":1791299810829,"version":"4.1.0"},"reference-count":68,"publisher":"Association for Computing Machinery (ACM)","issue":"2","license":[{"start":{"date-parts":[[2019,2,26]],"date-time":"2019-02-26T00:00:00Z","timestamp":1551139200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"name":"European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program","award":["647544"],"award-info":[{"award-number":["647544"]}]},{"DOI":"10.13039\/501100000923","name":"Australia Research Council","doi-asserted-by":"crossref","award":["DP170103956"],"award-info":[{"award-number":["DP170103956"]}],"id":[{"id":"10.13039\/501100000923","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2019,4,30]]},"abstract":"<jats:p>Java reflection has been widely used in a variety of applications and frameworks. It allows a software system to inspect and change the behaviour of its classes, interfaces, methods, and fields at runtime, enabling the software to adapt to dynamically changing runtime environments. However, this dynamic language feature imposes significant challenges to static analysis, because the behaviour of reflection-rich software is logically complex and statically hard to predict. As a result, existing static analysis tools either ignore reflection or handle it partially, resulting in missed, important behaviours, i.e., unsound results. Therefore, improving or even achieving soundness in static reflection analysis\u2014an analysis that infers statically the behaviour of reflective code\u2014will provide significant benefits to many analysis clients, such as bug detectors, security analyzers, and program verifiers.<\/jats:p>\n          <jats:p>\n            In this article, we provide a comprehensive understanding of Java reflection through examining its underlying concept, API, and real-world usage, and, building on this, we introduce a new static approach to resolving Java reflection effectively in practice. We have implemented our reflection analysis in an open-source tool, called S\n            <jats:sc>OLAR<\/jats:sc>\n            , and evaluated its effectiveness extensively with large Java programs and libraries. Our experimental results demonstrate that S\n            <jats:sc>OLAR<\/jats:sc>\n            is able to (1) resolve reflection more soundly than the state-of-the-art reflection analyses; (2) automatically and accurately identify the parts of the program where reflection is resolved unsoundly or imprecisely; and (3) guide users to iteratively refine the analysis results by using lightweight annotations until their specific requirements are satisfied.\n          <\/jats:p>","DOI":"10.1145\/3295739","type":"journal-article","created":{"date-parts":[[2019,2,26]],"date-time":"2019-02-26T15:05:33Z","timestamp":1551193533000},"page":"1-50","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":60,"title":["Understanding and Analyzing Java Reflection"],"prefix":"10.1145","volume":"28","author":[{"given":"Yue","family":"Li","sequence":"first","affiliation":[{"name":"UNSW Sydney, NSW, Australia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Tian","family":"Tan","sequence":"additional","affiliation":[{"name":"UNSW Sydney, NSW, Australia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jingling","family":"Xue","sequence":"additional","affiliation":[{"name":"UNSW Sydney, NSW, Australia"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2019,2,26]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/2594291.2594299"},{"key":"e_1_2_1_2_1","volume-title":"Proceedings of the 30th IEEE\/ACM International Conference on Automated Software Engineering (ASE\u201915)","author":"Barros Paulo","unstructured":"Paulo Barros , Ren\u00e9 Just , Suzanne Millstein , Paul Vines , Werner Dietl , Marcelo d\u2019 Amorim , and Michael D. Ernst . 2015. Static analysis of implicit control flow: Resolving java reflection and android intents (T) . In Proceedings of the 30th IEEE\/ACM International Conference on Automated Software Engineering (ASE\u201915) . 669--679. Paulo Barros, Ren\u00e9 Just, Suzanne Millstein, Paul Vines, Werner Dietl, Marcelo d\u2019Amorim, and Michael D. Ernst. 2015. Static analysis of implicit control flow: Resolving java reflection and android intents (T). In Proceedings of the 30th IEEE\/ACM International Conference on Automated Software Engineering (ASE\u201915). 669--679."},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/1167473.1167488"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/781131.781153"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/1985793.1985827"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/1028976.1029004"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/328690.328693"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/1640089.1640108"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.5381\/jot.2004.3.11.a6"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.5555\/646157.679856"},{"key":"e_1_2_1_11_1","volume-title":"Proceedings of the 10th International Symposium on Static Analysis (SAS\u201903)","author":"Christensen Aske Simon","unstructured":"Aske Simon Christensen , Anders M\u00f8ller , and Michael I. Schwartzbach . 2003. Precise analysis of string expressions . In Proceedings of the 10th International Symposium on Static Analysis (SAS\u201903) . 1--18. Aske Simon Christensen, Anders M\u00f8ller, and Michael I. Schwartzbach. 2003. Precise analysis of string expressions. In Proceedings of the 10th International Symposium on Static Analysis (SAS\u201903). 1--18."},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/512529.512538"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/1370018.1370033"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.5555\/646153.679523"},{"key":"e_1_2_1_15_1","volume-title":"International Joint Conference on Artificial Intelligence (IJCAI\u201995)","author":"Demers Fran\u00c3\u011fois-Nicola","year":"1995","unstructured":"Fran\u00c3\u011fois-Nicola Demers and Jacques Malenfant . 1995 . Reflection in logic, functional and object-oriented programming: A short comparative study . In International Joint Conference on Artificial Intelligence (IJCAI\u201995) . 29--38. Fran\u00c3\u011fois-Nicola Demers and Jacques Malenfant. 1995. Reflection in logic, functional and object-oriented programming: A short comparative study. In International Joint Conference on Artificial Intelligence (IJCAI\u201995). 29--38."},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-74792-5_11"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/502034.502041"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/2660267.2660343"},{"key":"e_1_2_1_19_1","volume-title":"Forman and Nate Forman","author":"Ira","year":"2004","unstructured":"Ira R. Forman and Nate Forman . 2004 . Java Reflection in Action. Manning Publications Co. Ira R. Forman and Nate Forman. 2004. Java Reflection in Action. Manning Publications Co."},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/3213846.3213864"},{"key":"e_1_2_1_21_1","volume-title":"Proceedings of the IEEE CS International Symposium on Human-Centric Computing Languages and Environments (HCC\u201902)","author":"Paul","unstructured":"Paul V. Gestwicki and Bharat Jayaraman. 2002. Interactive visualization of java programs . In Proceedings of the IEEE CS International Symposium on Human-Centric Computing Languages and Environments (HCC\u201902) . 226--235. Paul V. Gestwicki and Bharat Jayaraman. 2002. Interactive visualization of java programs. In Proceedings of the IEEE CS International Symposium on Human-Centric Computing Languages and Environments (HCC\u201902). 226--235."},{"key":"e_1_2_1_22_1","volume-title":"Proceedings of the 32nd European Conference on Object-Oriented Programming (ECOOP\u201918)","author":"Grech Neville","year":"2018","unstructured":"Neville Grech , George Kastrinis , and Yannis Smaragdakis . 2018 . Efficient reflection string analysis via graph coloring . In Proceedings of the 32nd European Conference on Object-Oriented Programming (ECOOP\u201918) . 26:1--26:25. Neville Grech, George Kastrinis, and Yannis Smaragdakis. 2018. Efficient reflection string analysis via graph coloring. In Proceedings of the 32nd European Conference on Object-Oriented Programming (ECOOP\u201918). 26:1--26:25."},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-89275-5_6"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/1216374.1216379"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/2491956.2462191"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2017.53"},{"key":"e_1_2_1_27_1","volume-title":"Proceedings of the 12th International Conference on Compiler Construction (CC\u201903), Held as Part of the Joint European Conferences on Theory and Practice of Software (ETAPS\u201903)","volume":"2622","author":"Lhot\u00e1k Ondrej","unstructured":"Ondrej Lhot\u00e1k and Laurie J. Hendren . 2003. Scaling Java points-to analysis using SPARK . In Proceedings of the 12th International Conference on Compiler Construction (CC\u201903), Held as Part of the Joint European Conferences on Theory and Practice of Software (ETAPS\u201903) (Lecture Notes in Computer Science), G\u00f6rel Hedin (Ed.) , Vol. 2622 . Springer, 153--169. Ondrej Lhot\u00e1k and Laurie J. Hendren. 2003. Scaling Java points-to analysis using SPARK. In Proceedings of the 12th International Conference on Compiler Construction (CC\u201903), Held as Part of the Joint European Conferences on Theory and Practice of Software (ETAPS\u201903) (Lecture Notes in Computer Science), G\u00f6rel Hedin (Ed.), Vol. 2622. Springer, 153--169."},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/2931037.2931044"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3033019.3033029"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276511"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236024.3236041"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-44202-9_2"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-48288-9_10"},{"key":"e_1_2_1_34_1","volume-title":"Proceedings of the 30th European Conference on Object-Oriented Programming (ECOOP\u201916)","volume":"56","author":"Li Yue","year":"2016","unstructured":"Yue Li , Tian Tan , Yifei Zhang , and Jingling Xue . 2016 . Program tailoring: Slicing by sequential criteria . In Proceedings of the 30th European Conference on Object-Oriented Programming (ECOOP\u201916) (LIPIcs), Shriram Krishnamurthi and Benjamin S. Lerner (Eds.) , Vol. 56 . Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 15:1--15:27. Yue Li, Tian Tan, Yifei Zhang, and Jingling Xue. 2016. Program tailoring: Slicing by sequential criteria. In Proceedings of the 30th European Conference on Object-Oriented Programming (ECOOP\u201916) (LIPIcs), Shriram Krishnamurthi and Benjamin S. Lerner (Eds.), Vol. 56. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 15:1--15:27."},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1109\/ISSRE.2017.36"},{"key":"e_1_2_1_36_1","volume-title":"Proceedings of the 14th USENIX Security Symposium, Patrick D. McDaniel (Ed.). USENIX Association.","author":"Livshits Benjamin","unstructured":"Benjamin Livshits and Monica S. Lam . 2005. Finding security vulnerabilities in Java applications with static analysis . In Proceedings of the 14th USENIX Security Symposium, Patrick D. McDaniel (Ed.). USENIX Association. Benjamin Livshits and Monica S. Lam. 2005. Finding security vulnerabilities in Java applications with static analysis. In Proceedings of the 14th USENIX Security Symposium, Patrick D. McDaniel (Ed.). USENIX Association."},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/2644805"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1007\/11575467_11"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/38765.38821"},{"key":"e_1_2_1_40_1","volume-title":"Proceedings of the Reflection Conference. 1--20","author":"Malenfant J.","unstructured":"J. Malenfant , M. Jacques , and F. N. Demers . 1996. A tutorial on behavioral reflection and its implementation . In Proceedings of the Reflection Conference. 1--20 . J. Malenfant, M. Jacques, and F. N. Demers. 1996. A tutorial on behavioral reflection and its implementation. In Proceedings of the Reflection Conference. 1--20."},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/566172.566174"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/1044834.1044835"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/1133981.1134018"},{"key":"e_1_2_1_44_1","volume-title":"Proceedings of the 28th Australasian Computer Science Conference (ACSC\u201905)","author":"Nguyen Phung Hua","year":"2005","unstructured":"Phung Hua Nguyen and Jingling Xue . 2005 . Interprocedural side-effect analysis and optimisation in the presence of dynamic class loading . In Proceedings of the 28th Australasian Computer Science Conference (ACSC\u201905) . 9--18. Retrieved from http:\/\/crpit.com\/confpapers\/CRPITV38Nguyen.pdf. Phung Hua Nguyen and Jingling Xue. 2005. Interprocedural side-effect analysis and optimisation in the presence of dynamic class loading. In Proceedings of the 28th Australasian Computer Science Conference (ACSC\u201905). 9--18. Retrieved from http:\/\/crpit.com\/confpapers\/CRPITV38Nguyen.pdf."},{"key":"e_1_2_1_45_1","volume-title":"Proceedings of the 37th IEEE\/ACM International Conference on Software Engineering (ICSE\u201915)","author":"Octeau Damien","unstructured":"Damien Octeau , Daniel Luchaup , Matthew Dering , Somesh Jha , and Patrick D . McDaniel. 2015. Composite constant propagation: Application to android inter-component communication analysis . In Proceedings of the 37th IEEE\/ACM International Conference on Software Engineering (ICSE\u201915) . 77--88. Damien Octeau, Daniel Luchaup, Matthew Dering, Somesh Jha, and Patrick D. McDaniel. 2015. Composite constant propagation: Application to android inter-component communication analysis. In Proceedings of the 37th IEEE\/ACM International Conference on Software Engineering (ICSE\u201915). 77--88."},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/643603.643616"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.14722\/ndss.2016.23066"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/2484313.2484355"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10515-009-0049-9"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1561\/2500000014"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-26529-2_26"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926390"},{"key":"e_1_2_1_54_1","volume-title":"Friedman","author":"Sobel J. M.","year":"1996","unstructured":"J. M. Sobel and Daniel P . Friedman . 1996 . An Introduction to Reflection-Oriented Programming. University of Indiana . J. M. Sobel and Daniel P. Friedman. 1996. An Introduction to Reflection-Oriented Programming. University of Indiana."},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.2174"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1145\/2048066.2048145"},{"key":"e_1_2_1_57_1","volume-title":"Proceedings of the Conference on Aliasing in Object-Oriented Programming","author":"Sridharan Manu","unstructured":"Manu Sridharan , Satish Chandra , Julian Dolby , Stephen J. Fink , and Eran Yahav . 2013. Alias analysis for object-oriented programs . In Proceedings of the Conference on Aliasing in Object-Oriented Programming . Types, Analysis, and Verification, Dave Clarke, James Noble, and Tobias Wrigstad (Eds.). Lecture Notes in Computer Science, Vol. 7850 . Springer , 196--232. Manu Sridharan, Satish Chandra, Julian Dolby, Stephen J. Fink, and Eran Yahav. 2013. Alias analysis for object-oriented programs. In Proceedings of the Conference on Aliasing in Object-Oriented Programming. Types, Analysis, and Verification, Dave Clarke, James Noble, and Tobias Wrigstad (Eds.). Lecture Notes in Computer Science, Vol. 7850. Springer, 196--232."},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/1250734.1250748"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1109\/CGO.2013.6494978"},{"key":"e_1_2_1_60_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-53413-7_24"},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.1145\/3062341.3062360"},{"key":"e_1_2_1_62_1","doi-asserted-by":"publisher","DOI":"10.1145\/3062341.3062359"},{"key":"e_1_2_1_63_1","volume-title":"Proceedings of the Conference of the Centre for Advanced Studies on Collaborative Research, Stephen A. MacKay and J. Howard Johnson (Eds.). IBM, 13","author":"Vall\u00e9e-Rai Raja","year":"1999","unstructured":"Raja Vall\u00e9e-Rai , Phong Co , Etienne Gagnon , Laurie J. Hendren , Patrick Lam , and Vijay Sundaresan . 1999 . Soot\u2014A Java bytecode optimization framework . In Proceedings of the Conference of the Centre for Advanced Studies on Collaborative Research, Stephen A. MacKay and J. Howard Johnson (Eds.). IBM, 13 . Raja Vall\u00e9e-Rai, Phong Co, Etienne Gagnon, Laurie J. Hendren, Patrick Lam, and Vijay Sundaresan. 1999. Soot\u2014A Java bytecode optimization framework. In Proceedings of the Conference of the Centre for Advanced Studies on Collaborative Research, Stephen A. MacKay and J. Howard Johnson (Eds.). IBM, 13."},{"key":"e_1_2_1_64_1","unstructured":"WALA. {n. d.}. T. J. Watson Libraries for Analysis. Retrieved from http:\/\/wala.sf.net.  WALA. {n. d.}. T. J. Watson Libraries for Analysis. Retrieved from http:\/\/wala.sf.net."},{"key":"e_1_2_1_65_1","doi-asserted-by":"publisher","DOI":"10.1145\/996841.996859"},{"key":"e_1_2_1_66_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-31985-6_21"},{"key":"e_1_2_1_67_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.2577"},{"key":"e_1_2_1_68_1","doi-asserted-by":"publisher","DOI":"10.1145\/3029806.3029814"},{"key":"e_1_2_1_69_1","doi-asserted-by":"publisher","DOI":"10.1145\/2699026.2699105"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3295739","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3295739","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T23:12:50Z","timestamp":1750201970000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3295739"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019,2,26]]},"references-count":68,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2019,4,30]]}},"alternative-id":["10.1145\/3295739"],"URL":"https:\/\/doi.org\/10.1145\/3295739","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2019,2,26]]},"assertion":[{"value":"2018-05-01","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2018-12-01","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2019-02-26","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}