Xin Yin
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Research Subjects
Xin Yin has a total of 42 co-authors. Here are the top co-authors by number of shared publications:
- Chao Ni
Innovation and Management Center (Ningbo) for School of Software Technology, Zhejiang University; The State Key Laboratory of Blockchain and Data Security, Zhejiang University, China
10 shared publications - Xiaohu Yang
Zhejiang University, Hangzhou, China
5 shared publications - Xinrui Li
Innovation and Management Center (Ningbo) for School of Software Technology, Zhejiang University; The State Key Laboratory of Blockchain and Data Security, Zhejiang University, China
4 shared publications - Chenhao Ying
Shanghai Jiao Tong University, Shanghai, China
2 shared publications - Shaohua Wang
Central University of Finance and Economics, Beijing, China
2 shared publications - Yuan Luo
Shanghai Jiao Tong University, Shanghai, China
2 shared publications
Latest Publications
- Open Access
- 8 October 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
MOCA: A Hierarchical Semantic-Enhanced Code Edit Framework for Multilingual Code Co-Evolution
Multilingual code co-evolution aims to propagate code edits across programming languages while preserving functional consistency, yet the task remains challenging in real-world repositories. Our motivating examples reveal two key challenges: (1) Existing models fail to infer the rationale behind source edits and may omit or misidentify the corresponding edits in the target code; and (2) Models do not capture repository-level semantics such as API usages and cross-file dependencies required for correct adaptations. To address these limitations, we introduce MOCA, a hierarchical semantic-enhanced framework that operationalizes two complementary strategies: (1) edit-wise intent interpretation, which explicates the intent of each source edit and guides its cross-lingual mapping, and (2) project-wise context integration, which injects repository-level semantics to ensure that propagated edits adhere to project constraints. MOCA implements these strategies through four coordinated steps: a Summarizer that provides multi-perspective explanations of each source edit, a Locator that identifies corresponding edit regions in the target code, a Retriever that supplies and filters repository context, and a Modifier that integrates all reasoning signals to synthesize the final edits. Experiments on eight real-world Java–C# projects demonstrate that MOCA achieves substantial improvements under both unseen-project ( \(S_{proj}\) ) and time-split seen-project ( \(S_{time}\) ) settings, reaching 73.06%/71.84% exact match for C#→Java/Java→C# under \(S_{proj}\) and 85.99%/79.36% under \(S_{time}\) . Compared with the state-of-the-art fine-tuning-based method Codeditor, MOCA improves exact match by 11.69–32.04%; compared with prompt-engineering-based baselines, it further yields 5.10–6.54% under \(S_{proj}\) and 5.63–5.81% under \(S_{time}\) . Our ablation studies confirm the contribution of all designed agents, while generalization experiments show that MOCA consistently outperforms each model's strongest prompt baseline by 3.56–15.63%. Qualitative analyses further indicate that MOCA handles a broader range of multi-hunk and semantically complex edits. Overall, MOCA provides a practical paradigm for multilingual code co-evolution by jointly strengthening edit-wise semantics and project-wise grounding.- 8 October 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
Open AccessMOCA: A Hierarchical Semantic-Enhanced Code Edit Framework for Multilingual Code Co-Evolution
Multilingual code co-evolution aims to propagate code edits across programming languages while preserving functional consistency, yet the task remains challenging in real-world repositories. Our motivating examples reveal two key challenges: (1) Existing models fail to infer the rationale behind source edits and may omit or misidentify the corresponding edits in the target code; and (2) Models do not capture repository-level semantics such as API usages and cross-file dependencies required for correct adaptations. To address these limitations, we introduce MOCA, a hierarchical semantic-enhanced framework that operationalizes two complementary strategies: (1) edit-wise intent interpretation, which explicates the intent of each source edit and guides its cross-lingual mapping, and (2) project-wise context integration, which injects repository-level semantics to ensure that propagated edits adhere to project constraints. MOCA implements these strategies through four coordinated steps: a Summarizer that provides multi-perspective explanations of each source edit, a Locator that identifies corresponding edit regions in the target code, a Retriever that supplies and filters repository context, and a Modifier that integrates all reasoning signals to synthesize the final edits. Experiments on eight real-world Java–C# projects demonstrate that MOCA achieves substantial improvements under both unseen-project ( \(S_{proj}\) ) and time-split seen-project ( \(S_{time}\) ) settings, reaching 73.06%/71.84% exact match for C#→Java/Java→C# under \(S_{proj}\) and 85.99%/79.36% under \(S_{time}\) . Compared with the state-of-the-art fine-tuning-based method Codeditor, MOCA improves exact match by 11.69–32.04%; compared with prompt-engineering-based baselines, it further yields 5.10–6.54% under \(S_{proj}\) and 5.63–5.81% under \(S_{time}\) . Our ablation studies confirm the contribution of all designed agents, while generalization experiments show that MOCA consistently outperforms each model's strongest prompt baseline by 3.56–15.63%. Qualitative analyses further indicate that MOCA handles a broader range of multi-hunk and semantically complex edits. Overall, MOCA provides a practical paradigm for multilingual code co-evolution by jointly strengthening edit-wise semantics and project-wise grounding. - Open Access
- 7 October 2026
- Published by Association for Computing Machinery (ACM)
- p. 2767-2779
ArkEval: Benchmarking and Evaluating Automated Code Repair for ArkTS
- 7 October 2026
- Published by Association for Computing Machinery (ACM)
- p. 2767-2779
Open AccessArkEval: Benchmarking and Evaluating Automated Code Repair for ArkTS
- Open Access
- 30 September 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
Breaking Waiting: Accelerating Android GUI Testing via Widget Readiness Analysis
Automated GUI testing for Android applications faces a challenge: determining when to execute test actions during interface rendering. Common approaches either use fixed delays between events or wait for complete GUI rendering, resulting in a trade-off between test reliability and efficiency. Fixed short waits cause flaky tests when elements are not ready, while conservative approaches waste testing time waiting for irrelevant widgets. To address this limitation, we present TurboDroid, a technique that detects widget-level readiness through method dependency analysis. TurboDroid identifies methods that affect widget rendering through static analysis, then monitors their execution alongside dynamic dependencies during testing. This enables a widget-specific “test-when-ready” approach that executes actions as soon as the target widget is determined to be ready. TurboDroid combines: (1) static analysis to identify dependencies between methods and UI elements, (2) runtime monitoring to detect widget readiness based on these dependencies, and (3) a specialized event dispatching mechanism for partially rendered GUIs. Experiments on real-world Android applications show that TurboDroid outperforms the evaluated state-of-the-art baselines. TurboDroid accelerates bug reproduction by 17.4% and detects 26 more crashes (83 vs. 57), while achieving higher activity coverage, greater code coverage, and broader GUI state exploration, with all improvements being statistically significant.
- 30 September 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
Open AccessBreaking Waiting: Accelerating Android GUI Testing via Widget Readiness Analysis
Automated GUI testing for Android applications faces a challenge: determining when to execute test actions during interface rendering. Common approaches either use fixed delays between events or wait for complete GUI rendering, resulting in a trade-off between test reliability and efficiency. Fixed short waits cause flaky tests when elements are not ready, while conservative approaches waste testing time waiting for irrelevant widgets. To address this limitation, we present TurboDroid, a technique that detects widget-level readiness through method dependency analysis. TurboDroid identifies methods that affect widget rendering through static analysis, then monitors their execution alongside dynamic dependencies during testing. This enables a widget-specific “test-when-ready” approach that executes actions as soon as the target widget is determined to be ready. TurboDroid combines: (1) static analysis to identify dependencies between methods and UI elements, (2) runtime monitoring to detect widget readiness based on these dependencies, and (3) a specialized event dispatching mechanism for partially rendered GUIs. Experiments on real-world Android applications show that TurboDroid outperforms the evaluated state-of-the-art baselines. TurboDroid accelerates bug reproduction by 17.4% and detects 26 more crashes (83 vs. 57), while achieving higher activity coverage, greater code coverage, and broader GUI state exploration, with all improvements being statistically significant.
- Open Access
- 15 September 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
Hunk-Constrained DPO: Segment-Level Optimization for Secure and Correct LLM Code Generation
Large Language Models (LLMs) have been widely applied in code generation tasks like code completion and automated development, demonstrating significant potential for improving coding efficiency. However, research has shown that LLM-generated code frequently contains security vulnerabilities, raising concerns about its reliability in production environments. To address these security issues, various mitigation approaches have been proposed, but these methods typically impact the LLM’s ability to generate functionally correct code, which may limit their practical application in real-world development environments. In this work, we address this problem through a key observation: security patches and functional bug fixes in real-world software exhibit structural similarities as small, localized modifications. This shared characteristic suggests that a unified learning model could address both objectives jointly. Building on this insight, we introduce HPO (Hunk-Constrained Direct Preference Optimization), a training framework that unifies security hardening and functional correction. Our framework features two key technical components: a novel segment-weighted preference optimization objective to focus learning on repair logic, and an automated data synthesis pipeline to provide high-quality training data. Experiments across multiple models and programming languages demonstrate that HPO achieves substantial security improvements—up to 28 percentage points—while preserving or enhancing functional correctness.
- 15 September 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
Open AccessHunk-Constrained DPO: Segment-Level Optimization for Secure and Correct LLM Code Generation
Large Language Models (LLMs) have been widely applied in code generation tasks like code completion and automated development, demonstrating significant potential for improving coding efficiency. However, research has shown that LLM-generated code frequently contains security vulnerabilities, raising concerns about its reliability in production environments. To address these security issues, various mitigation approaches have been proposed, but these methods typically impact the LLM’s ability to generate functionally correct code, which may limit their practical application in real-world development environments. In this work, we address this problem through a key observation: security patches and functional bug fixes in real-world software exhibit structural similarities as small, localized modifications. This shared characteristic suggests that a unified learning model could address both objectives jointly. Building on this insight, we introduce HPO (Hunk-Constrained Direct Preference Optimization), a training framework that unifies security hardening and functional correction. Our framework features two key technical components: a novel segment-weighted preference optimization objective to focus learning on repair logic, and an automated data synthesis pipeline to provide high-quality training data. Experiments across multiple models and programming languages demonstrate that HPO achieves substantial security improvements—up to 28 percentage points—while preserving or enhancing functional correctness.
- Open Access
- 30 June 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (FSE) , 2003-2026
PlayCoder: Making LLM-Generated GUI Code Playable
Large language models (LLMs) have transformed code generation, but their ability to generate code for applications with graphical user interfaces (GUIs), particularly games, remains underexplored. Prior code-generation benchmarks assess correctness using test cases, but this is insufficient for GUI applications. These applications are interactive and event-driven, and their correctness depends on stateful behavior over sequences of user actions. Consequently, evaluation should account for interaction flows and UI state transitions rather than relying solely on pass or fail test outcomes. To explore the performance of LLMs on GUI applications, we construct PlayEval, a repository-aware evaluation dataset from 43 multilingual (Python, TypeScript, and JavaScript) GUI applications. Different from existing GUI benchmarks which are difficult to transplant to Desktop platform, PlayEval consists of 6 major categories of GUI applications and directly facilitates evaluation on code generation tasks. To enable more reliable assessment beyond simple execution and unit tests, we propose Play@k, which measures whether at least one of k generated candidates yields an application that can be played end-to-end without logical errors. We further develop an LLM-based agent, PlayTester, that automates interactive evaluation by driving the GUI through task-oriented playthroughs and checking for logic violations. Through systematic evaluation, we demonstrate that 10 state-of-the-art code LLMs struggle to generate logically correct GUI applications, achieving near-zero Play@3 scores despite high compilation rates. To address these, we introduce PlayCoder, a multi-agent, repository-aware framework that writes, evaluates and refines GUI application code via closed-loop control. PlayCoder substantially improves functional correctness and semantic alignment for both open-source and closed-source models, achieving up to 38.1% Exec@3 and 20.3% Play@3. Case studies show that it detects silent logic flaws missed by traditional metrics and repairs them through targeted edits. These results indicate that coupling an end-to-end GUI testing agent with repository-aware automated program repair is an effective path towards reliable GUI code generation. Our implementation is publicly available at https://github.com/Tencent/PlayCoder.
- 30 June 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (FSE) , 2003-2026
Open AccessPlayCoder: Making LLM-Generated GUI Code Playable
Large language models (LLMs) have transformed code generation, but their ability to generate code for applications with graphical user interfaces (GUIs), particularly games, remains underexplored. Prior code-generation benchmarks assess correctness using test cases, but this is insufficient for GUI applications. These applications are interactive and event-driven, and their correctness depends on stateful behavior over sequences of user actions. Consequently, evaluation should account for interaction flows and UI state transitions rather than relying solely on pass or fail test outcomes. To explore the performance of LLMs on GUI applications, we construct PlayEval, a repository-aware evaluation dataset from 43 multilingual (Python, TypeScript, and JavaScript) GUI applications. Different from existing GUI benchmarks which are difficult to transplant to Desktop platform, PlayEval consists of 6 major categories of GUI applications and directly facilitates evaluation on code generation tasks. To enable more reliable assessment beyond simple execution and unit tests, we propose Play@k, which measures whether at least one of k generated candidates yields an application that can be played end-to-end without logical errors. We further develop an LLM-based agent, PlayTester, that automates interactive evaluation by driving the GUI through task-oriented playthroughs and checking for logic violations. Through systematic evaluation, we demonstrate that 10 state-of-the-art code LLMs struggle to generate logically correct GUI applications, achieving near-zero Play@3 scores despite high compilation rates. To address these, we introduce PlayCoder, a multi-agent, repository-aware framework that writes, evaluates and refines GUI application code via closed-loop control. PlayCoder substantially improves functional correctness and semantic alignment for both open-source and closed-source models, achieving up to 38.1% Exec@3 and 20.3% Play@3. Case studies show that it detects silent logic flaws missed by traditional metrics and repairs them through targeted edits. These results indicate that coupling an end-to-end GUI testing agent with repository-aware automated program repair is an effective path towards reliable GUI code generation. Our implementation is publicly available at https://github.com/Tencent/PlayCoder.
- Open Access
- 30 June 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (FSE) , 2560-2582
Adaptive Mutation Scheduling with Deep Reinforcement Learning for Smart Contract Fuzzing
Smart contracts underpin a wide range of decentralized applications—from financial services to supply-chain management—but their immutability and direct control of assets magnify the impact of any security bugs. Although many fuzz approaches have been proposed and have demonstrated their effectiveness in uncovering vulnerabilities, existing methods often rely on unguided random mutation scheduling, generate redundant inputs, and fail to adapt to smart contract-specific characteristics. To overcome these challenges, we present FuzzMaster, a feedback-driven fuzzing framework that combines deep reinforcement learning (DRL) with lightweight probabilistic scheduling to steer mutation selection at runtime intelligently. By continuously analyzing execution feedback—code coverage, function-call sequences, and vulnerability signals—FuzzMaster’s DRL agent and probabilistic tables prioritize high-impact mutations and avoid wasted effort on redundant seeds. On standard VeriSmart and SmartBugs benchmarks, FuzzMaster achieves a 66.2% detection rate with 100% precision (versus 46.9% for ItyFuzz and 43.1% for Confuzzius) and uncovers most bugs within the first second of execution. Meanwhile, in real-world Ethereum contracts, FuzzMaster identified 97 vulnerabilities in 6 categories. These results demonstrate that dynamic, vulnerability-aware mutation scheduling can dramatically improve both the efficiency and effectiveness of smart contract fuzz testing.
- 30 June 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (FSE) , 2560-2582
Open AccessAdaptive Mutation Scheduling with Deep Reinforcement Learning for Smart Contract Fuzzing
Smart contracts underpin a wide range of decentralized applications—from financial services to supply-chain management—but their immutability and direct control of assets magnify the impact of any security bugs. Although many fuzz approaches have been proposed and have demonstrated their effectiveness in uncovering vulnerabilities, existing methods often rely on unguided random mutation scheduling, generate redundant inputs, and fail to adapt to smart contract-specific characteristics. To overcome these challenges, we present FuzzMaster, a feedback-driven fuzzing framework that combines deep reinforcement learning (DRL) with lightweight probabilistic scheduling to steer mutation selection at runtime intelligently. By continuously analyzing execution feedback—code coverage, function-call sequences, and vulnerability signals—FuzzMaster’s DRL agent and probabilistic tables prioritize high-impact mutations and avoid wasted effort on redundant seeds. On standard VeriSmart and SmartBugs benchmarks, FuzzMaster achieves a 66.2% detection rate with 100% precision (versus 46.9% for ItyFuzz and 43.1% for Confuzzius) and uncovers most bugs within the first second of execution. Meanwhile, in real-world Ethereum contracts, FuzzMaster identified 97 vulnerabilities in 6 categories. These results demonstrate that dynamic, vulnerability-aware mutation scheduling can dramatically improve both the efficiency and effectiveness of smart contract fuzz testing.
- Open Access
- 30 June 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (FSE) , 2373-2395
Aligning with Human Coding Preferences for Improving Code Generation
Large Language Models (LLMs) have demonstrated remarkable potential in automating software development tasks. While recent advances leverage Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) to align models with human preferences, the optimal training strategy remains unclear across diverse code preference types. This paper systematically investigates the roles of SFT and DPO in aligning LLMs with different code preferences. Through both theoretical analysis and empirical observation, we hypothesize that SFT excels in types with objectively verifiable optimal solutions, while applying SFT followed by DPO (S&D) enables models to explore superior solutions in types without objectively verifiable optimal solutions. Based on the analysis and experimental evidence, we propose A daptive P reference O ptimization (APO), a dynamic integration approach that adaptively amplifies preferred responses, suppresses dispreferred ones, and encourages exploration of potentially superior solutions during training. Extensive experiments across six representative code preference tasks validate our theoretical hypotheses and demonstrate that APO consistently matches or surpasses the performance of existing SFT and S&D strategies. Our work provides both theoretical foundations and practical guidance for selecting appropriate training strategies in different code preference alignment types.
- 30 June 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (FSE) , 2373-2395
Open AccessAligning with Human Coding Preferences for Improving Code Generation
Large Language Models (LLMs) have demonstrated remarkable potential in automating software development tasks. While recent advances leverage Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) to align models with human preferences, the optimal training strategy remains unclear across diverse code preference types. This paper systematically investigates the roles of SFT and DPO in aligning LLMs with different code preferences. Through both theoretical analysis and empirical observation, we hypothesize that SFT excels in types with objectively verifiable optimal solutions, while applying SFT followed by DPO (S&D) enables models to explore superior solutions in types without objectively verifiable optimal solutions. Based on the analysis and experimental evidence, we propose A daptive P reference O ptimization (APO), a dynamic integration approach that adaptively amplifies preferred responses, suppresses dispreferred ones, and encourages exploration of potentially superior solutions during training. Extensive experiments across six representative code preference tasks validate our theoretical hypotheses and demonstrate that APO consistently matches or surpasses the performance of existing SFT and S&D strategies. Our work provides both theoretical foundations and practical guidance for selecting appropriate training strategies in different code preference alignment types.
- Open Access
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 1109-1121
Input Reduction Enhanced LLM-based Program Repair
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 1109-1121
Open AccessInput Reduction Enhanced LLM-based Program Repair
- Open Access
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 34-37
JUnitGenie: A Framework for Path-Sensitive Unit Test Generation with Large Language Models
Unit testing is essential for software quality assurance, yet writing and maintaining tests remains time-consuming and error-prone. To address this challenge, researchers have proposed techniques for automating unit test generation, including heuristic-based methods and more recent approaches that leverage large language models (LLMs). However, these approaches are inherently path-insensitive because they rely on fixed heuristics or limited contextual information and fail to reason about deep control-flow structures, which leads to inadequate coverage, especially for deep execution paths. JUnitGenie extracts code knowledge from Java projects, distills it into structured prompts, and guides LLMs to generate high-coverage tests. We evaluate JUnitGenie on 2,258 complex focal methods from ten real-world Java projects. Results show that JUnitGenie improves branch coverage by an average of 29.60% and line coverage by 31.00% over both heuristic and LLM-based baselines, and generalizes effectively across both closed- and open-source foundation models. JUnitGenie is available at https://github.com/Dianshu-Liao/JUnitGenie-ICSE-Demo, and the demo video is available at https://www.youtube.com/watch?v=-jWJaf661mw.
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 34-37
Open AccessJUnitGenie: A Framework for Path-Sensitive Unit Test Generation with Large Language Models
Unit testing is essential for software quality assurance, yet writing and maintaining tests remains time-consuming and error-prone. To address this challenge, researchers have proposed techniques for automating unit test generation, including heuristic-based methods and more recent approaches that leverage large language models (LLMs). However, these approaches are inherently path-insensitive because they rely on fixed heuristics or limited contextual information and fail to reason about deep control-flow structures, which leads to inadequate coverage, especially for deep execution paths. JUnitGenie extracts code knowledge from Java projects, distills it into structured prompts, and guides LLMs to generate high-coverage tests. We evaluate JUnitGenie on 2,258 complex focal methods from ten real-world Java projects. Results show that JUnitGenie improves branch coverage by an average of 29.60% and line coverage by 31.00% over both heuristic and LLM-based baselines, and generalizes effectively across both closed- and open-source foundation models. JUnitGenie is available at https://github.com/Dianshu-Liao/JUnitGenie-ICSE-Demo, and the demo video is available at https://www.youtube.com/watch?v=-jWJaf661mw.
- Top Cited PapersOpen Access
- 20 January 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (2) , 1-31
Abundant Modalities Offer More Nutrients: Multi-Modal-Based Function-Level Vulnerability Detection
Software vulnerabilities are weaknesses in software systems that can lead to significant cybersecurity risks. Recently, several deep learning (DL)-based approaches have been proposed to detect vulnerabilities at the function level. These approaches typically utilize one or a few different modalities (e.g., text representation and graph-based representation) of the function, and have shown promising performance. However, existing studies have not fully leveraged diverse modalities, particularly those that use images to represent functions for vulnerability detection. These approaches often fail to make sufficient use of the important graph structure underlying the images. In this article, we propose MVulD+, a multi-modal-based function-level vulnerability detection approach, which fuses multi-modal features of the function (i.e., text representation, graph representation, and image representation) to detect vulnerabilities. Specifically, MVulD+ leverages a pre-trained model (i.e., UniXcoder) to capture the semantic information of the textual source code, uses a graph neural network to extract graph representations, and employs computer vision techniques to obtain image representations while preserving the graph structure of the function. To investigate the effectiveness of MVulD+, we conduct a large-scale experiment by comparing our approach with nine state-of-the-art baselines. Experimental results demonstrate that MVulD+ improves the DL-based baselines by 24.3–125.7%, 5.2–31.4%, 40.6–192.2%, and 22.3–186.9% in terms of F1-score, Accuracy, Precision, and PR-AUC, respectively.
- 20 January 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (2) , 1-31
Top Cited PapersOpen AccessAbundant Modalities Offer More Nutrients: Multi-Modal-Based Function-Level Vulnerability Detection
Software vulnerabilities are weaknesses in software systems that can lead to significant cybersecurity risks. Recently, several deep learning (DL)-based approaches have been proposed to detect vulnerabilities at the function level. These approaches typically utilize one or a few different modalities (e.g., text representation and graph-based representation) of the function, and have shown promising performance. However, existing studies have not fully leveraged diverse modalities, particularly those that use images to represent functions for vulnerability detection. These approaches often fail to make sufficient use of the important graph structure underlying the images. In this article, we propose MVulD+, a multi-modal-based function-level vulnerability detection approach, which fuses multi-modal features of the function (i.e., text representation, graph representation, and image representation) to detect vulnerabilities. Specifically, MVulD+ leverages a pre-trained model (i.e., UniXcoder) to capture the semantic information of the textual source code, uses a graph neural network to extract graph representations, and employs computer vision techniques to obtain image representations while preserving the graph structure of the function. To investigate the effectiveness of MVulD+, we conduct a large-scale experiment by comparing our approach with nine state-of-the-art baselines. Experimental results demonstrate that MVulD+ improves the DL-based baselines by 24.3–125.7%, 5.2–31.4%, 40.6–192.2%, and 22.3–186.9% in terms of F1-score, Accuracy, Precision, and PR-AUC, respectively.