On Prompt Learning for FQN Inference: Sensitivity and Usefulness Analysis
Open Access
- 2 July 2026
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Knowledge Discovery From Data
- Vol. 20 (7) , 1-29
Abstract
The success of prompt learning when adapted to the fully-qualified type name (FQN) inference has been demonstrated in the literature. However, the understanding of its success is limited in model outputs and model structures. In this paper, we conduct a thorough study on the behaviors of prompt learning in FQN inference from the perspectives of sensitivity and usefulness. Rather than simply masking some knowledge, we first perform sensitivity analysis on five aspects to reveal how much FQN knowledge to include, how much to mask, and where to mask, and then yield an efficient configuration strategy. We further conduct a usefulness analysis in three aspects to demonstrate the superiority of the proposed configuration strategy. This suggests that the strong performance of our model is attributable to the homogeneity among large code pre-training, FQN prompt learning, and type inference as a fill-in-blank task. Finally, we summarize a practical guideline on best practices and pitfalls to avoid when applying prompt learning to FQN inference and other software engineering tasks.Keywords
Funding Information
- Frontier Technology Project of the Natural Science Foundation of Jiangxi Province (20253BAC260003)
- Distinguished Youth Fund Project of the Natural Science Foundation of Jiangxi Province (20242BAB23011)
This publication has 30 references indexed in Scilit:
- Prompt-based Learning2024
- NLP based on prompt-based learning and prompting methods: a surveyIET Conference Proceedings, 2023
- Prompt-Learning for Short Text ClassificationIEEE Transactions on Knowledge and Data Engineering, 2023
- Efficient utilization of pre-trained models: A review of sentiment analysis via prompt learningKnowledge-Based Systems, 2023
- APIzation: Generating Reusable APIs from StackOverflow Code Snippets2021
- Learning from Examples to Find Fully Qualified Names of API Elements in Code Snippets2019
- Automated Program Repair by Using Similar Code Containing Fix Ingredients2016
- Static Analysis of Implicit Control Flow: Resolving Java Reflection and Android Intents (T)2015
- SPOON: A library for implementing analyses and transformations of Java source codeSoftware: Practice and Experience, 2015
- Automating Software Testing Using Program AnalysisIEEE Software, 2008