{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T02:28:13Z","timestamp":1760149693001,"version":"build-2065373602"},"reference-count":44,"publisher":"MDPI AG","issue":"9","license":[{"start":{"date-parts":[[2023,9,8]],"date-time":"2023-09-08T00:00:00Z","timestamp":1694131200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Future Internet"],"abstract":"<jats:p>Sequential programs can benefit from parallel execution to improve their performance. When developing a parallel application, several techniques are employed to achieve the desired behavior: identifying parts that can run in parallel, synchronizing access to shared data, tuning performance, etc. Admittedly, manually transforming a sequential application to make it parallel can be tedious due to the large number of lines of code to inspect, the possibility of errors arising from inaccurate data dependence analysis leading to unpredictable behavior, and inefficiencies when the workload between parallel threads is unbalanced. This paper proposes an automatic approach that analyzes Java source code to identify method calls that are suitable for parallel execution and transforms them so that they run in another thread. The approach is based on data dependence and control dependence analyses to determine the execution flow and data accessed. Based on the proposed method, a tool has been developed to enhance applications by incorporating parallelism, i.e., transforming suitable method calls to execute on parallel threads, and synchronizing data access where needed. The developed tool has been extensively tested to verify the accuracy of its analysis in finding parallel execution opportunities, the correctness of the source code alterations, and the resultant performance gain.<\/jats:p>","DOI":"10.3390\/fi15090306","type":"journal-article","created":{"date-parts":[[2023,9,8]],"date-time":"2023-09-08T07:57:17Z","timestamp":1694159837000},"page":"306","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":2,"title":["An Automatic Transformer from Sequential to Parallel Java Code"],"prefix":"10.3390","volume":"15","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-9575-8054","authenticated-orcid":false,"given":"Alessandro","family":"Midolo","sequence":"first","affiliation":[{"name":"Dipartimento di Matematica e Informatica, University of Catania, 95125 Catania, Italy"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7169-659X","authenticated-orcid":false,"given":"Emiliano","family":"Tramontana","sequence":"additional","affiliation":[{"name":"Dipartimento di Matematica e Informatica, University of Catania, 95125 Catania, Italy"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2023,9,8]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Yang, C., Lu, T., Yan, S., Zhang, J., and Yu, X. (2022). N-Trans: Parallel Detection Algorithm for DGA Domain Names. Future Internet, 14.","DOI":"10.3390\/fi14070209"},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Murugappan, M., Thomas, J.V.J., Fiore, U., Jinila, Y.B., and Radhakrishnan, S. (2021). COVIDNet: Implementing Parallel Architecture on Sound and Image for High Efficacy. Future Internet, 13.","DOI":"10.3390\/fi13110269"},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Iqbal, U., Abosekeen, A., Georgy, J., Umar, A., Noureldin, A., and Korenberg, M.J. (2021). Implementation of Parallel Cascade Identification at Various Phases for Integrated Navigation System. Future Internet, 13.","DOI":"10.3390\/fi13080191"},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Kaddoura, S., Haraty, R.A., Al Kontar, K., and Alfandi, O. (2021). A Parallelized Database Damage Assessment Approach after Cyberattack for Healthcare Systems. Future Internet, 13.","DOI":"10.3390\/fi13040090"},{"key":"ref_5","unstructured":"Herlihy, M., Shavit, N., Luchangco, V., and Spear, M. (2020). The art of Multiprocessor Programming, Morgan Kaufmann."},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Ahmed, S., and Bagherzadeh, M. (2018, January 11\u201312). What Do Concurrency Developers Ask about? A Large-Scale Study Using Stack Overflow. Proceedings of the 12th ACM\/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), Oulu, Finland.","DOI":"10.1145\/3239235.3239524"},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Pinto, G., Torres, W., and Castor, F. (2015, January 26). A Study on the Most Popular Questions about Concurrent Programming. Proceedings of the 6th Workshop on Evaluation and Usability of Programming Languages and Tools, Pittsburgh, PA, USA.","DOI":"10.1145\/2846680.2846687"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"59","DOI":"10.1016\/j.jss.2015.04.064","article-title":"A large-scale study on the usage of Java\u2019s concurrent programming constructs","volume":"106","author":"Pinto","year":"2015","journal-title":"J. Syst. Softw."},{"key":"ref_9","unstructured":"Fox, G.C., Williams, R.D., and Messina, P.C. (2014). Parallel Computing Works!, Morgan Kaufmann."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"319","DOI":"10.1177\/1063293X20958932","article-title":"A survey of concurrency-oriented refactoring","volume":"28","author":"Zhang","year":"2020","journal-title":"Concurr. Eng."},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Ishizaki, K., Daijavad, S., and Nakatani, T. (2011, January 17). Refactoring Java Programs Using Concurrent Libraries. Proceedings of the Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging (PADTAD), Toronto, ON, Canada.","DOI":"10.1145\/2002962.2002970"},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Dig, D., Marrero, J., and Ernst, M.D. (2009, January 16\u201324). Refactoring Sequential Java Code for Concurrency via Concurrent Libraries. Proceedings of the 31st IEEE International Conference on Software Engineering (ICSE), Vancouver, BC, Canada.","DOI":"10.1109\/ICSE.2009.5070539"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Dig, D., Tarce, M., Radoi, C., Minea, M., and Johnson, R. (2009, January 25\u201329). Relooper: Refactoring for Loop Parallelism in Java. Proceedings of the 24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications (OOPSLA), Orlando, FL, USA.","DOI":"10.1145\/1639950.1640018"},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"102476","DOI":"10.1016\/j.scico.2020.102476","article-title":"Safe automated refactoring for intelligent parallelization of Java 8 streams","volume":"195","author":"Khatchadourian","year":"2020","journal-title":"Sci. Comput. Program."},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Lin, Y., Radoi, C., and Dig, D. (2014, January 16\u201321). Retrofitting concurrency for android applications through refactoring. Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE), Hong Kong, China.","DOI":"10.1145\/2635868.2635903"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3485537","article-title":"Automatic Migration from Synchronous to Asynchronous JavaScript APIs","volume":"5","author":"Gokhale","year":"2021","journal-title":"Proc. ACM Program. Lang."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Wloka, J., Sridharan, M., and Tip, F. (2009, January 24\u201328). Refactoring for reentrancy. Proceedings of the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC\/FSE), Amsterdam, The Netherlands.","DOI":"10.1145\/1595696.1595723"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Sch\u00e4fer, M., Sridharan, M., Dolby, J., and Tip, F. (2011, January 21\u201328). Refactoring Java Programs for Flexible Locking. Proceedings of the 33rd International Conference on Software Engineering (ICSE), Honolulu, HI, USA.","DOI":"10.1145\/1985793.1985804"},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Ozkan, B.K., Emmi, M., and Tasiran, S. (2015, January 18\u201324). Systematic asynchrony bug exploration for android apps. Proceedings of the International Conference on Computer Aided Verification, LNCS 9206, San Francisco, CA, USA.","DOI":"10.1007\/978-3-319-21690-4_28"},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"66292","DOI":"10.1109\/ACCESS.2019.2919203","article-title":"Refactoring Java Programs for Customizable Locks Based on Bytecode Transformation","volume":"7","author":"Zhang","year":"2019","journal-title":"IEEE Access"},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Zhang, Y., Shao, S., Zhai, J., and Ma, S. (2020, January 18\u201322). FineLock: Automatically refactoring coarse-grained locks into fine-grained locks. Proceedings of the ACM International Symposium on Software Testing and Analysis (ISSTA), Virtual Event, USA.","DOI":"10.1145\/3395363.3404368"},{"key":"ref_22","unstructured":"Arteca, E., Tip, F., and Sch\u00e4fer, M. (2021, January 11\u201317). Enabling Additional Parallelism in Asynchronous JavaScript Applications. Proceedings of the 35th European Conference on Object-Oriented Programming (ECOOP), Virtual Event, Aarhus, Denmark."},{"key":"ref_23","unstructured":"Kaminsky, A. (2014, January 16\u201321). Parallel Java Library. Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, New Orleans, LA, USA."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Haidl, M., and Gorlatch, S. (2014, January 17). PACXX: Towards a Unified Programming Model for Programming Accelerators Using C++14. Proceedings of the LLVM Compiler Infrastructure in HPC (LLVM-HPC), New Orleans, LA, USA.","DOI":"10.1109\/LLVM-HPC.2014.9"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Kimura, K., Taguchi, G., and Kasahara, H. (2016, January 21\u201323). Accelerating Multicore Architecture Simulation Using Application Profile. Proceedings of the 10th IEEE International Symposium on Embedded Multicore\/Many-core Systems-on-Chip (MCSOC), Lyon, France.","DOI":"10.1109\/MCSoC.2016.16"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Kasahara, H., Kimura, K., Adhi, B.A., Hosokawa, Y., Kishimoto, Y., and Mase, M. (2017, January 4\u20138). Multicore Cache Coherence Control by a Parallelizing Compiler. Proceedings of the 41st IEEE Annual Computer Software and Applications Conference (COMPSAC), Torino, Italy.","DOI":"10.1109\/COMPSAC.2017.174"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Felber, P.A. (2003, January 3\u20137). Semi-automatic Parallelization of Java Applications. Proceedings of the on the Move to Meaningful Internet Systems 2003: CoopIS, DOA, and ODBASE, Catania, Italy.","DOI":"10.1007\/978-3-540-39964-3_86"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"757","DOI":"10.1109\/PGEC.1966.264565","article-title":"Analysis of Programs for Parallel Processing","volume":"EC-15","author":"Bernstein","year":"1966","journal-title":"IEEE Trans. Electron. Comput."},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/113446.113447","article-title":"Efficient and Exact Data Dependence Analysis","volume":"26","author":"Maydan","year":"1991","journal-title":"SIGPLAN Not."},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"137","DOI":"10.1007\/BF01379099","article-title":"Data Dependence and Its Application to Parallel Processing","volume":"16","author":"Wolfe","year":"1987","journal-title":"Int. J. Parallel Program."},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/390013.808479","article-title":"Control flow analysis","volume":"5","author":"Allen","year":"1970","journal-title":"ACM Sigplan Notices"},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Dig, D., Marrero, J., and Ernst, M.D. (2011, January 21). How Do Programs Become More Concurrent: A Story of Program Transformations. Proceedings of the 4th ACM International Workshop on Multicore Software Engineering (IWMSE), Honolulu, HI, USA.","DOI":"10.1145\/1984693.1984700"},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"112","DOI":"10.1002\/cae.21784","article-title":"Improving the learning of parallel programming using software refactoring","volume":"25","author":"Zhang","year":"2017","journal-title":"Comput. Appl. Eng. Educ."},{"key":"ref_34","doi-asserted-by":"crossref","unstructured":"Larsen, P., Ladelsky, R., Lidman, J., McKee, S.A., Karlsson, S., and Zaks, A. (2012, January 10\u201313). Parallelizing more Loops with Compiler Guided Refactoring. Proceedings of the 2012 41st International Conference on Parallel Processing (ICPP), Pittsburgh, PA, USA.","DOI":"10.1109\/ICPP.2012.48"},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"303","DOI":"10.1145\/1594835.1504226","article-title":"Towards concurrency refactoring for x10","volume":"44","author":"Markstrum","year":"2009","journal-title":"A Sigplan Not."},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"52","DOI":"10.1109\/MS.2015.133","article-title":"Refactoring for Asynchronous Execution on Mobile Devices","volume":"32","author":"Dig","year":"2015","journal-title":"IEEE Softw."},{"key":"ref_37","unstructured":"Smith, N., Van Bruggen, D., and Tomassetti, F. (2017). Javaparser: Visited, Leanpub, oct. de. Available online: https:\/\/scholar.google.com.tw\/citations?view_op=view_citation&hl=zh-TW&user=9u0kf8UAAAAJ&citation_for_view=9u0kf8UAAAAJ:HDshCWvjkbEC."},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Midolo, A., and Tramontana, E. (2022, January 29\u201331). An API for Analysing and Classifying Data Dependence in View of Parallelism. Proceedings of the ACM International Conference on Computer and Communications Management (ICCCM), Okayama, Japan.","DOI":"10.1145\/3556223.3556232"},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"127","DOI":"10.1145\/1594834.1480898","article-title":"SPEED: Precise and Efficient Static Estimation of Program Computational Complexity","volume":"44","author":"Gulwani","year":"2009","journal-title":"SIGPLAN Not."},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Sinn, M., Zuleger, F., and Veith, H. (2014, January 18\u201322). A Simple and Scalable Static Analysis for Bound Analysis and Amortized Complexity Analysis. Proceedings of the International Conference on Computer Aided Verification (CAV), Vienna, Austria.","DOI":"10.1007\/978-3-319-08867-9_50"},{"key":"ref_41","unstructured":"Gustafsson, J., Betts, A., Ermedahl, A., and Lisper, B. (2010, January 6). The M\u00e4lardalen WCET benchmarks: Past, present and future. Proceedings of the 10th International Workshop on Worst-Case Execution Time Analysis (WCET), Brussels, Belgium."},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Lokuciejewski, P., and Marwedel, P. (2009, January 1\u20133). Combining Worst-Case Timing Models, Loop Unrolling, and Static Loop Analysis for WCET Minimization. Proceedings of the 21st Euromicro Conference on Real-Time Systems (ECRTS), Dublin, Ireland.","DOI":"10.1109\/ECRTS.2009.9"},{"key":"ref_43","unstructured":"Lokuciejewski, P., Cordes, D., Falk, H., and Marwedel, P. (2009, January 22\u201325). A Fast and Precise Static Loop Analysis Based on Abstract Interpretation, Program Slicing and Polytope Models. Proceedings of the International Symposium on Code Generation and Optimization (CGO), Seattle, WA, USA."},{"key":"ref_44","unstructured":"(2023, July 21). Amazon Book Reviews Dataset. Available online: https:\/\/www.kaggle.com\/datasets\/mohamedbakhet\/amazon-books-reviews."}],"container-title":["Future Internet"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1999-5903\/15\/9\/306\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T20:47:24Z","timestamp":1760129244000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1999-5903\/15\/9\/306"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,9,8]]},"references-count":44,"journal-issue":{"issue":"9","published-online":{"date-parts":[[2023,9]]}},"alternative-id":["fi15090306"],"URL":"https:\/\/doi.org\/10.3390\/fi15090306","relation":{},"ISSN":["1999-5903"],"issn-type":[{"type":"electronic","value":"1999-5903"}],"subject":[],"published":{"date-parts":[[2023,9,8]]}}}