Serviceeinschränkungen vom 12.-22.02.2026 - weitere Infos auf der UB-Homepage

Treffer: Java Code Generation Using Prompt Engineering Techniques.

Title:
Java Code Generation Using Prompt Engineering Techniques.
Authors:
Truong, A.1,2 (AUTHOR) anhtt@hcmut.edu.vn, Le, Phuong1,2 (AUTHOR), Tran, Hau1,2 (AUTHOR)
Source:
International Journal of Software Engineering & Knowledge Engineering. Jan2026, p1-28. 28p. 4 Illustrations.
Database:
Business Source Premier

Weitere Informationen

Automated code generation using large language models (LLMs) has attracted significant attention due to its potential to enhance software development. However, ensuring both accuracy and efficiency in generated code remains challenging. Prior research has mainly advanced along two directions: (i) enhancing models through architectural improvements, larger parameter scaling, and domain-specific fine-tuning; and (ii) refining prompt engineering techniques to better structure inputs and guide outputs. In this work, we pursue the latter direction and introduce a prompt engineering-based approach for Java code generation. Rather than directly generating Java code from natural language specifications, we propose a two-step pipeline: (i) generating intermediate Python code and, (ii) translating Python into Java. This design leverages the strong performance of LLMs on Python while enabling systematic optimization of the translation stage. To achieve this, we propose a set of translation strategies combining prompt engineering principles — including explicit instructions, syntax guidance, and domain keyword constraints — with advanced reasoning strategies such as Zero-shot Chain of Thought (Zero-shot-CoT) to efficiently generate Java code. Experiments on the HumanEval-X benchmark using the CodeGeeX3 model show that the proposed strategies significantly improve the accuracy of Java code generation. We further evaluate across diverse programming tasks, including file operations, HTTP APIs, database connectivity, parallel computing, and graphical applications, confirming the robustness of our approach. Finally, we validate the generality of our findings using ChatGPT (GPT-4o), observing substantial improvements over baseline prompt designs. [ABSTRACT FROM AUTHOR]

Copyright of International Journal of Software Engineering & Knowledge Engineering is the property of World Scientific Publishing Company and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)