YZYuwei Zhang

Yuwei Zhang

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Yuwei Zhang has a total of 30 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • VIDA : Enhancing Vulnerability Detection and Impact Analysis via Diffusion‐Guided Heterogeneous Knowledge Aggregation

    by Ying Xing, Zujun Liu, Yonghao Xing, Chengyu Song, Bin Yang, Yun Yang, Yuwei Zhang, Hua Zhao

    Background: Detecting software vulnerabilities and analyzing their impacts on interconnected software components are crucial to ensuring the security of software‐driven edge computing and Artificial Intelligence of Things (AIoT) systems, especially with the growing prevalence of software supply chain attacks. Knowledge graphs (KGs) have been used to model complex semantic dependencies between vulnerabilities and software components. However, existing KGs often contain noisy or irrelevant relations, which significantly hinder their utility in downstream tasks. Objective: This study aims to improve vulnerability detection and impact analysis by denoising vulnerability KGs and generating task‐oriented vulnerability representations. Methods: We propose a diffusion‐based graph learning framework for denoising vulnerability KGs. The framework first employs a diffusion process to reconstruct relational structures within the KG, guided by a graph alignment mechanism that integrates collaborative signals from the software component–vulnerability bipartite graph. This alignment encourages the denoised KG to preserve relations most relevant to downstream tasks. Subsequently, a heterogeneous information network aggregates multi‐relational information from the denoised KG to produce knowledge‐enhanced embeddings for vulnerabilities. Results: Through this two‐stage learning paradigm, the framework effectively captures both semantic and relational dependencies among heterogeneous entities and generates task‐oriented representations for vulnerability detection and impact analysis. Experimental results on a widely used benchmark demonstrate that the framework can effectively identify latent relationships between vulnerabilities and software components and predict high‐risk vulnerabilities. Conclusion: The proposed framework improves the utility of vulnerability KGs by suppressing noisy relations and preserving task‐relevant information, providing practical insights for proactive vulnerability mitigation and patch recommendation.

  • Open Access

    Understanding Code Similarity across Instruction Set Architectures: An Empirical Study

    by Haonan Yu, Jiaxin Zhu, Yingying Zheng, Yuwei Zhang, Wei Wang, Jun Wei, Tao Huang

    Software interacts with hardware through Instruction Set Architectures (ISAs), such as x86, ARM, and RISC-V. Although many developers may be unaware of ISA heterogeneity, ISA-specific code is pervasive in foundational software systems that underpin the digital infrastructure of human society. Maintaining separate implementations is common when supporting multiple ISAs in such a foundational software project. This may introduce substantial additional effort. Meanwhile, separate ISA-specific implementations frequently exhibit code similarities across ISAs. While prior code similarity research has largely focused on general-purpose clones or cross-language settings, similarity in ISA-specific implementations remains underexplored. To understand ISA-specific code and their similarities, and to gain insights for better management, we conducted an empirical study of 20 open-source foundational projects that support multiple ISAs. We confirmed the need for separate ISA-specific implementations by identifying the roles and characteristics of large-scale ISA-specific code, with assistance from large language models (LLMs). Our analysis of the ISA-specific code revealed a weighted average similarity of 21.7% across ISAs. We also observed cross-ISA co-change and cross-ISA participation patterns in the development and maintenance of ISA-specific code. By centering on ISA-specific implementations rather than general-purpose clones, this study provides a dedicated empirical characterization of a practically important but underexplored code-similarity setting, yielding evidence that can inform both researchers and practitioners working on ISA-related software engineering.

  • Top Cited Papers
    Open Access

    CITYWALK : Enhancing LLM-Based C++ Unit Test Generation via Project-Dependency Awareness and Language-Specific Knowledge

    by Yuwei Zhang, Qingyuan Lu, Kai Liu, Wensheng Dou, Jiaxin Zhu, Li Qian, Chunxi Zhang, Zheng Lin, Jun Wei

    Unit testing plays a pivotal role in the software development lifecycle, as it ensures code quality. However, writing high-quality unit tests remains a time-consuming task for developers in practice. More recently, the application of large language models (LLMs) in automated unit test generation has demonstrated promising results. Existing approaches primarily focus on interpreted programming languages (e.g., Java), while mature solutions tailored to compiled programming languages like C++ are yet to be explored. The intricate language features of C++, such as pointers, templates, and virtual functions, pose particular challenges for LLMs in generating both executable and high-coverage unit tests. To tackle the aforementioned problems, this article introduces CITYWALK , a novel LLM-based framework for C++ unit test generation. CITYWALK enhances LLMs by providing a comprehensive understanding of the dependency relationships within the project under test via program analysis. Furthermore, CITYWALK incorporates language-specific knowledge about C++ derived from project documentation and empirical observations, significantly improving the correctness of the LLM-generated unit tests. We implement CITYWALK by employing the widely popular LLM GPT-4o. The experimental results show that CITYWALK outperforms current state-of-the-art approaches on a collection of ten popular C++ projects. Our findings demonstrate the effectiveness of CITYWALK in generating high-quality C++ unit tests.


  • Open Access

    Toward Efficient Package Maintenance: An Empirical Study of Patch Sharing across Four Linux Distributions

    by Jian Peng, Jiaxin Zhu, Yuwei Zhang, Wei Chen, Guoquan Wu, Wei Wang, Jun Wei

  • Open Access

    RISE: Rule-Driven SQL Dialect Translation via Query Reduction

    by Xudong Xie, Yuwei Zhang, Wensheng Dou, Yu Gao, Ziyu Cui, Jiansen Song, Rui Yang, Jun Wei

    Translating SQL dialects across different relational database management systems (RDBMSs) is crucial for migrating RDBMS-based applications to the cloud. Traditional SQL dialect translation tools rely on manually-crafted rules, necessitating significant manual effort to support new RDBMSs and dialects. Although large language models (LLMs) can assist in translating SQL dialects, they often struggle with lengthy and complex SQL queries. In this paper, we propose RISE, a novel LLM-based SQL dialect translation approach that can accurately handle lengthy and complex SQL queries. Given a complex source query Qc that contains a SQL dialect d, we first employ a dialect-aware query reduction technique to derive a simplified query Qs by removing d-irrelevant SQL elements from Qc. Subsequently, we utilize LLMs to translate Qs into \(Q_{s^{^{\prime }}}\) , and automatically extract the translation rule rd for dialect d based on the relationship between Qs and \(Q_{s^{^{\prime }}}\) . By applying rd to Qc, we can effectively translate the dialect d within Qc, thereby bypassing the complexity of the source query Qc. We evaluate RISE on two real-world benchmarks, i.e., TPC-DS and SQLProcBench, comparing its performance against both the traditional rule-based tools and the LLM-based approaches with respect to translation accuracy. RISE achieves accuracies of 97.98% on TPC-DS and 100% on SQLProcBench, outperforming the baselines by an average improvement of 24.62% and 238.41%, respectively.


  • Open Access

    PATCH : Empowering Large Language Model with Programmer-Intent Guidance and Collaborative-Behavior Simulation for Automatic Bug Fixing

    by Yuwei Zhang, Zhi Jin, Ying Xing, Ge Li, Fang Liu, Jiaxin Zhu, Wensheng Dou, Jun Wei

    Bug fixing holds significant importance in software development and maintenance. Recent research has made substantial strides in exploring the potential of large language models (LLMs) for automatically resolving software bugs. However, a noticeable gap in existing approaches lies in the oversight of collaborative facets intrinsic to bug resolution, treating the process as a single-stage endeavor. Moreover, most approaches solely take the buggy code snippet as input for LLMs during the patch generation stage. To mitigate the aforementioned limitations, we introduce a novel stage-wise framework named PATCH. Specifically, we first augment the buggy code snippet with corresponding dependence context and intent information to better guide LLMs in generating the correct candidate patches. Additionally, by taking inspiration from bug management practices, we decompose the bug-fixing task into four distinct stages: bug reporting, bug diagnosis, patch generation, and patch verification. These stages are performed interactively by LLMs, aiming to simulate the collaborative behavior of programmers during the resolution of software bugs. By harnessing these collective contributions, PATCH effectively enhances the bug-fixing capability of LLMs. We implement PATCH by employing the powerful dialogue-based LLM ChatGPT. Our evaluation on the widely used bug-fixing benchmark BFP demonstrates that PATCH has achieved better performance than state-of-the-art LLMs.