Nan Niu
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Previous Organizations / Institutes
The organizations / institutes from the scholar's other articles in the past ten years
Research Subjects
Research Interests
Nan Niu has a total of 147 co-authors. Here are the top co-authors by number of shared publications:
- Hui Liu
Beijing Institute of Technology
12 shared publications Jing-Ru C. Cheng
Information Technology Laboratory, U.S. Army Engineer Research and Development Center, Vicksburg, MS, USA
9 shared publicationsJuha Savolainen
Global Software and Control Research and Development, Danfoss Drives A/S, Gråsten, Denmark
7 shared publications- Wentao Wang
Department of Electrical Engineering and Computer Science, University of Cincinnati, Cincinnati, OH, USA
7 shared publications - Yanjie Jiang
Tianjin University, Tianjin, China
6 shared publications - Yuxia Zhang
Beijing Institute of Technology, Beijing, China
6 shared publications
Latest Publications
- Open Access
- 7 October 2026
- Published by Association for Computing Machinery (ACM)
- p. 222-233
A Scalable Rule-Based Deep Reinforcement Learning Framework for the Next Release Problem
Next-release planning and feature selection remain critical challenges in the software deployment cycle, especially with the rapid introduction of updates and AI-driven functionalities. Selecting a subset of high-impact features that balances customer satisfaction with stakeholder business goals requires scalable models capable of producing near real-time predictions from requirements descriptions. However, uncertainty about which features truly align with customer needs makes this task difficult. This paper proposes a scalable feature prioritization framework that leverages rules derived from feature perplexity, probabilistic relevance, and customer-oriented criteria. We introduce a dual deep-reinforcement learning (DDRL) architecture that recommends high-value requirements through a hierarchical strategy. The first level applies graph reinforcement learning (GRL) guided by rule-based reasoning to structure tasks and reduce search space, while the second level uses deep reinforcement learning (DRL) to refine predictions. Experimental results on Zoom, Webex, and Teams datasets show that the approach maintains linear complexity (O(m)) compared to the cubic complexity (O(m^3)) of traditional graph-based methods, where m is the number of edges. The model achieves up to 85.56
- 7 October 2026
- Published by Association for Computing Machinery (ACM)
- p. 222-233
Open AccessA Scalable Rule-Based Deep Reinforcement Learning Framework for the Next Release Problem
Next-release planning and feature selection remain critical challenges in the software deployment cycle, especially with the rapid introduction of updates and AI-driven functionalities. Selecting a subset of high-impact features that balances customer satisfaction with stakeholder business goals requires scalable models capable of producing near real-time predictions from requirements descriptions. However, uncertainty about which features truly align with customer needs makes this task difficult. This paper proposes a scalable feature prioritization framework that leverages rules derived from feature perplexity, probabilistic relevance, and customer-oriented criteria. We introduce a dual deep-reinforcement learning (DDRL) architecture that recommends high-value requirements through a hierarchical strategy. The first level applies graph reinforcement learning (GRL) guided by rule-based reasoning to structure tasks and reduce search space, while the second level uses deep reinforcement learning (DRL) to refine predictions. Experimental results on Zoom, Webex, and Teams datasets show that the approach maintains linear complexity (O(m)) compared to the cubic complexity (O(m^3)) of traditional graph-based methods, where m is the number of edges. The model achieves up to 85.56
- Open Access
- 23 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 199-204
Requirements Classification Using Fine-Tuned Transformer Models: A Comparative Study of BERT, RoBERTa, and GPT-4o
Classifying software requirements as functional requirements (FRs) and non-functional requirements (NFRs) is an important step in the software requirements engineering (RE) process. Recent developments in Natural Language Processing (NLP) have enabled the use of pre-trained transformer-based language models for this classification task. In this study, we fine-tune three pre-trained models, BERT, RoBERTa, and GPT-4o on two different requirements datasets. The fine-tuned models are evaluated using a synthetic medical requirements dataset generated using ChatGPT. Our results show that GPT-4o outperforms both BERT and RoBERTa in terms of F1-score, achieving up to 96% accuracy for both FR and NFR classification tasks. These findings highlight the potential of transformer-based models for effective requirements classification across various domains and datasets.
- 23 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 199-204
Open AccessRequirements Classification Using Fine-Tuned Transformer Models: A Comparative Study of BERT, RoBERTa, and GPT-4o
Classifying software requirements as functional requirements (FRs) and non-functional requirements (NFRs) is an important step in the software requirements engineering (RE) process. Recent developments in Natural Language Processing (NLP) have enabled the use of pre-trained transformer-based language models for this classification task. In this study, we fine-tune three pre-trained models, BERT, RoBERTa, and GPT-4o on two different requirements datasets. The fine-tuned models are evaluated using a synthetic medical requirements dataset generated using ChatGPT. Our results show that GPT-4o outperforms both BERT and RoBERTa in terms of F1-score, achieving up to 96% accuracy for both FR and NFR classification tasks. These findings highlight the potential of transformer-based models for effective requirements classification across various domains and datasets.
- Open Access
- 13 February 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (3) , 1-33
POS Tagging on Code Identifiers: How Far Are We?
Part-of-Speech (POS) tags are natural attributes of words in natural languages, and they are fundamental for natural language analysis. Many automated approaches have been proposed to tag natural language texts. Identifiers in source code have POS tags as well, which are useful for various source code analysis tasks, like code search, code comment generation, and code completion. Currently, state-of-the-art POS taggers originally designed for natural languages are often employed to tag source code identifiers. However, identifiers in source code are significantly different from natural languages. Consequently, POS taggers designed for natural languages could be less accurate in source code identifiers. Recently, several identifier-specific taggers have been proposed within the field of software engineering, but their adoption in practical software engineering tasks remains limited. This raises the question of why these taggers have not been more widely utilized in such tasks. In this article, we investigate the performance of natural language POS taggers on source code identifiers, specifically method names, parameter names, and class names. To do so, we manually annotated identifiers from open source projects in Java, C, and Python, creating a large dataset IDData for evaluation. We then evaluated six widely used natural language POS taggers: NLTK, CoreNLP, OpenNLP, spaCy, Flair, and Stanza, alongside three identifier-specific taggers: SWUM, POSSE, and Ensemble Tagger. Our evaluation reveals that while natural language-oriented POS taggers outperform identifier-specific taggers, their performance on identifiers is still significantly lower compared to their performance on natural language sentences. To understand the underlying reasons for this, we conducted an in-depth analysis, examining factors such as identifier length, POS distribution, syntactic structures, and special tags, which differentiate identifiers from natural language sentences. To further improve POS tagging performance on identifiers, we created a large-scale method name dataset MNTrain with manually labeled tags and retrained the natural language taggers on this new dataset. The results show substantial improvements in method name POS tagging performance, with taggers achieving performance comparable to their results on natural language sentences. Finally, we discuss the significance and practical implications of our findings, offering insights for future research.
- 13 February 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (3) , 1-33
Open AccessPOS Tagging on Code Identifiers: How Far Are We?
Part-of-Speech (POS) tags are natural attributes of words in natural languages, and they are fundamental for natural language analysis. Many automated approaches have been proposed to tag natural language texts. Identifiers in source code have POS tags as well, which are useful for various source code analysis tasks, like code search, code comment generation, and code completion. Currently, state-of-the-art POS taggers originally designed for natural languages are often employed to tag source code identifiers. However, identifiers in source code are significantly different from natural languages. Consequently, POS taggers designed for natural languages could be less accurate in source code identifiers. Recently, several identifier-specific taggers have been proposed within the field of software engineering, but their adoption in practical software engineering tasks remains limited. This raises the question of why these taggers have not been more widely utilized in such tasks. In this article, we investigate the performance of natural language POS taggers on source code identifiers, specifically method names, parameter names, and class names. To do so, we manually annotated identifiers from open source projects in Java, C, and Python, creating a large dataset IDData for evaluation. We then evaluated six widely used natural language POS taggers: NLTK, CoreNLP, OpenNLP, spaCy, Flair, and Stanza, alongside three identifier-specific taggers: SWUM, POSSE, and Ensemble Tagger. Our evaluation reveals that while natural language-oriented POS taggers outperform identifier-specific taggers, their performance on identifiers is still significantly lower compared to their performance on natural language sentences. To understand the underlying reasons for this, we conducted an in-depth analysis, examining factors such as identifier length, POS distribution, syntactic structures, and special tags, which differentiate identifiers from natural language sentences. To further improve POS tagging performance on identifiers, we created a large-scale method name dataset MNTrain with manually labeled tags and retrained the natural language taggers on this new dataset. The results show substantial improvements in method name POS tagging performance, with taggers achieving performance comparable to their results on natural language sentences. Finally, we discuss the significance and practical implications of our findings, offering insights for future research.
- Open Access
- 13 October 2025
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (10) , 1-61
Requirements-Based Test Generation: A Comprehensive Survey
As an important way of assuring software quality, software testing generates and executes test cases to identify software failures. Many strategies have been proposed to guide test-case generation, such as source-code-based approaches and methods based on bug reports. Requirements-based test generation (RBTG) constructs test cases based on specified requirements, aligning with user needs and expectations, without requiring access to the source code. Since its introduction in 1994, there have been many contributions to the development of RBTG, including various approaches, implementations, tools, assessment and evaluation methods, and applications. This paper provides a comprehensive survey on RBTG, categorizing requirements types, classifying approaches, investigating types of test cases, summarizing available tools, and analyzing experimental evaluations. This paper also summarizes the domains and industrial applications of RBTG, and discusses some open research challenges and potential future work.
- 13 October 2025
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (10) , 1-61
Open AccessRequirements-Based Test Generation: A Comprehensive Survey
As an important way of assuring software quality, software testing generates and executes test cases to identify software failures. Many strategies have been proposed to guide test-case generation, such as source-code-based approaches and methods based on bug reports. Requirements-based test generation (RBTG) constructs test cases based on specified requirements, aligning with user needs and expectations, without requiring access to the source code. Since its introduction in 1994, there have been many contributions to the development of RBTG, including various approaches, implementations, tools, assessment and evaluation methods, and applications. This paper provides a comprehensive survey on RBTG, categorizing requirements types, classifying approaches, investigating types of test cases, summarizing available tools, and analyzing experimental evaluations. This paper also summarizes the domains and industrial applications of RBTG, and discusses some open research challenges and potential future work.
- Open Access
- 7 October 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. PP, 1
Environmental Assumptions in System Design: A Phenomenon-Based and Operational Perspective
Invalid environment assumptions have been identified as a root cause of failures in many systems. Industrial experience shows that it is often easier to overlook environmental behaviors than system specifications, largely because environment assumptions are rarely documented and tend to evolve during system development. This lack of explicit handling introduces uncertainty, which can compromise system safety and correctness. While several approaches address this issue at the code level, their impact at the model level remains underexplored. In this paper, we empirically investigate howenvironmental assumptions influence the satisfaction of safety requirements in behavioral system models.We collected 473 environment assumptions from 95 human modelers and examined them using Jackson’s formalization of the environment and the machine. Based on this analysis, we identify five reusable modeling patterns that enable the explicit integration of environment assumptions into state machine designs and demonstrate how these patterns support the safe evolution of models.
- 7 October 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. PP, 1
Open AccessEnvironmental Assumptions in System Design: A Phenomenon-Based and Operational Perspective
Invalid environment assumptions have been identified as a root cause of failures in many systems. Industrial experience shows that it is often easier to overlook environmental behaviors than system specifications, largely because environment assumptions are rarely documented and tend to evolve during system development. This lack of explicit handling introduces uncertainty, which can compromise system safety and correctness. While several approaches address this issue at the code level, their impact at the model level remains underexplored. In this paper, we empirically investigate howenvironmental assumptions influence the satisfaction of safety requirements in behavioral system models.We collected 473 environment assumptions from 95 human modelers and examined them using Jackson’s formalization of the environment and the machine. Based on this analysis, we identify five reusable modeling patterns that enable the explicit integration of environment assumptions into state machine designs and demonstrate how these patterns support the safe evolution of models.
- 5 September 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 51 (11) , 3013-3037
An Empirical Study of Software Refactorings in Real-World Open-Source Java Projects
Software refactoring is widely conducted in the industry and well-studied in the academic community. There are dozens of software refactoring types, and each type of refactoring often requires its unique tool support and algorithms. Consequently, knowing which types of refactorings are popular in real-world practice and which are less supported by existing tools is highly valuable. To this end, in this paper, we present a large-scale empirical study on software refactorings in real-world open-source Java projects. We first retrieved by keywords 15,860 code commits from GitHub that might contain software refactorings. From the resulting commits, we manually analyzed 1,200 of them and successfully identified 100 types of refactorings from 420 commits. We built a taxonomy for the discovered refactorings, and compared them against the refactoring types supported by state-of-the-art refactoring engines and miners. The comparison results suggest that 61 out of the 100 refactoring types have not yet been explicitly supported by any of the refactoring engines, and any refactoring miners have not explicitly supported 62. The empirical study has identified and revealed 31 under-explored refactorings observed in Java real-world open-source applications but not yet supported by existing refactoring tools. These refactorings may have implications for the development of future tool support and enhancements in the refactoring ecosystem.
- 5 September 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 51 (11) , 3013-3037
An Empirical Study of Software Refactorings in Real-World Open-Source Java Projects
Software refactoring is widely conducted in the industry and well-studied in the academic community. There are dozens of software refactoring types, and each type of refactoring often requires its unique tool support and algorithms. Consequently, knowing which types of refactorings are popular in real-world practice and which are less supported by existing tools is highly valuable. To this end, in this paper, we present a large-scale empirical study on software refactorings in real-world open-source Java projects. We first retrieved by keywords 15,860 code commits from GitHub that might contain software refactorings. From the resulting commits, we manually analyzed 1,200 of them and successfully identified 100 types of refactorings from 420 commits. We built a taxonomy for the discovered refactorings, and compared them against the refactoring types supported by state-of-the-art refactoring engines and miners. The comparison results suggest that 61 out of the 100 refactoring types have not yet been explicitly supported by any of the refactoring engines, and any refactoring miners have not explicitly supported 62. The empirical study has identified and revealed 31 under-explored refactorings observed in Java real-world open-source applications but not yet supported by existing refactoring tools. These refactorings may have implications for the development of future tool support and enhancements in the refactoring ecosystem.
- Open Access
- 31 July 2025
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 34 (6) , 1-26
An Empirical Study on Common Sense-Violating Bugs in Mobile Apps
Mobile applications are widely used by billions of users in their daily work and life. Such GUI software is prone to bugs, potentially degrading user experience. Notably, many bugs in mobile apps are reported by end-users who cannot access the requirements of the app or test cases accompanied by explicitly specified test oracles. It may suggest that such bugs are not identified in the traditional way, i.e., by comparing the actual behaviors of the apps against their expected behaviors explicitly specified in the requirements or test cases. Instead, such bugs are often identified by comparing the actual behaviors against users’ common knowledge of apps, noted as common sense. We refer to such bugs as common sense-violating bugs. Although it is well-known that common sense-violating bugs are common in mobile apps, it remains unclear how popular they are and what kind of common sense principles are violated by them, let alone the relationship among the violated common sense principles. To this end, in this paper, we conduct the first large-scale empirical study on common sense-violating bugs in open-source mobile apps. We manually analyzed 2,808 real-world bug reports across 948 open-sourced mobile apps on GitHub. Our analysis results suggest that 1,006 (35.8%) out of the 2,808 bugs pertain to common sense-violating bugs. From those common sense-violating bugs, we identified a set of common sense principles violated by the buggy behaviors, and built a taxonomy for the common sense principles. Such principles fall into three categories: UI content-related common sense principles, UI layout-related common sense principles, and interaction-related common sense principles. By analyzing the frequency of the common sense principles being violated, we observed that a small set of common sense principles were frequently violated by the majority of common sense-violating bugs: 18 common sense principles, accounting for only 5% of the violated common sense principles, were violated by more than half of the common sense-violating bugs. These findings suggest that identifying the most frequent common sense-violating bugs could be achieved by using a small set of critical common sense principles, which may significantly reduce the cost of common sense-based bug detection. Finally, to demonstrate the feasibility of automated bug detection with common sense-based test oracles, we propose an automated approach to validating whether a given test run violates the most frequently violated common sense principle: No raw error message. Our evaluation results suggest that the automated approach is accurate, whose precision and recall are 91.3% and 91.6%, respectively.
- 31 July 2025
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 34 (6) , 1-26
Open AccessAn Empirical Study on Common Sense-Violating Bugs in Mobile Apps
Mobile applications are widely used by billions of users in their daily work and life. Such GUI software is prone to bugs, potentially degrading user experience. Notably, many bugs in mobile apps are reported by end-users who cannot access the requirements of the app or test cases accompanied by explicitly specified test oracles. It may suggest that such bugs are not identified in the traditional way, i.e., by comparing the actual behaviors of the apps against their expected behaviors explicitly specified in the requirements or test cases. Instead, such bugs are often identified by comparing the actual behaviors against users’ common knowledge of apps, noted as common sense. We refer to such bugs as common sense-violating bugs. Although it is well-known that common sense-violating bugs are common in mobile apps, it remains unclear how popular they are and what kind of common sense principles are violated by them, let alone the relationship among the violated common sense principles. To this end, in this paper, we conduct the first large-scale empirical study on common sense-violating bugs in open-source mobile apps. We manually analyzed 2,808 real-world bug reports across 948 open-sourced mobile apps on GitHub. Our analysis results suggest that 1,006 (35.8%) out of the 2,808 bugs pertain to common sense-violating bugs. From those common sense-violating bugs, we identified a set of common sense principles violated by the buggy behaviors, and built a taxonomy for the common sense principles. Such principles fall into three categories: UI content-related common sense principles, UI layout-related common sense principles, and interaction-related common sense principles. By analyzing the frequency of the common sense principles being violated, we observed that a small set of common sense principles were frequently violated by the majority of common sense-violating bugs: 18 common sense principles, accounting for only 5% of the violated common sense principles, were violated by more than half of the common sense-violating bugs. These findings suggest that identifying the most frequent common sense-violating bugs could be achieved by using a small set of critical common sense principles, which may significantly reduce the cost of common sense-based bug detection. Finally, to demonstrate the feasibility of automated bug detection with common sense-based test oracles, we propose an automated approach to validating whether a given test run violates the most frequently violated common sense principle: No raw error message. Our evaluation results suggest that the automated approach is accurate, whose precision and recall are 91.3% and 91.6%, respectively.
- Open Access
Requirements-Based Test Generation: A Comprehensive Survey
As an important way of assuring software quality, software testing generates and executes test cases to identify software failures. Many strategies have been proposed to guide test-case generation, such as source-code-based approaches and methods based on bug reports. Requirements-based test generation (RBTG) constructs test cases based on specified requirements, aligning with user needs and expectations, without requiring access to the source code. Since its introduction in 1994, there have been many contributions to the development of RBTG, including various approaches, implementations, tools, assessment and evaluation methods, and applications. This paper provides a comprehensive survey on RBTG, categorizing requirement types, classifying approaches, investigating types of test cases, summarizing available tools, and analyzing experimental evaluations. This paper also summarizes the domains and industrial applications of RBTG, and discusses some open research challenges and potential future work.
Open AccessRequirements-Based Test Generation: A Comprehensive Survey
As an important way of assuring software quality, software testing generates and executes test cases to identify software failures. Many strategies have been proposed to guide test-case generation, such as source-code-based approaches and methods based on bug reports. Requirements-based test generation (RBTG) constructs test cases based on specified requirements, aligning with user needs and expectations, without requiring access to the source code. Since its introduction in 1994, there have been many contributions to the development of RBTG, including various approaches, implementations, tools, assessment and evaluation methods, and applications. This paper provides a comprehensive survey on RBTG, categorizing requirement types, classifying approaches, investigating types of test cases, summarizing available tools, and analyzing experimental evaluations. This paper also summarizes the domains and industrial applications of RBTG, and discusses some open research challenges and potential future work.
- 6 March 2025
- Published by Springer Nature
- p. 153-176
Automated Requirements Terminology Extraction