An efficient computational framework for abstracting program slices from Java code
Abstract
Over the past decades, Java-based applications have formed the backbone of enterprise, web, and mobile software systems, often containing complex business logic and domain-specific requirements embedded in older codebases (Java SE 1.2-8). Maintaining and migrating such systems is difficult due to unstructured code, missing documentation, and outdated design artifacts. To address these challenges, the paper introduces a computationally efficient static-backward slicing framework for Java programs. The framework restructures the source code, abstracts control and data flow information, computes functional dependencies using a data flow table (DFT), and extracts precise program slices. Extracted slices are further represented using object-Z notation to formalize software specifications. Furthermore, the extracted backward slices and object-Z specifications can be leveraged with artificial intelligence (AI) and large language models (LLMs) to automatically generate human-readable software requirements. This integration also ensures structured, accurate, and minimal requirements outputs, facilitating AI-assisted software modernization. Experimental evaluations on Java programs such as automated teller machine (ATM), student grading, and quadratic root calculators exhibit significant reductions in extracted code size while preserving functional dependencies. In comparison with traditional dynamic and machine learning (ML)-based slicing approaches, the proposed framework offers improved precision, computational efficiency, and scalability, making it suitable for modernizing legacy Java systems and supporting AI-driven software engineering tasks.
Keywords
Artificial intelligence; Java code; Large language models; Program slicing; Software reengineering; Static analysis
Full Text:
PDFDOI: http://doi.org/10.11591/ijai.v15.i5.pp4969-4979
Refbacks
- There are currently no refbacks.
Copyright (c) 2026 Aparna Kudloor Siddalingaiah, Rajkumar Kulkarni

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
IAES International Journal of Artificial Intelligence (IJ-AI)
ISSN/e-ISSN 2089-4872/2252-8938
This journal is published by the Institute of Advanced Engineering and Science (IAES).