Yan Lei

Dr. Yan Lei

School of Big Data & Software Engineering, Chongqing University, Chongqing 400044, China
orcid

Research Focus & Metrics

Academic Career Length

8Years (2019-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
10 October 2022
Verified
Conference Paper
Open access
ZZZhuo Zhang
Zhuo Zhang
YLYan Lei
Yan Lei
MYMeng Yan
Meng Yan
YYYue Yu
Yue Yu
JCJiachi Chen
Jiachi Chen
XMXiaoguang Mao
Xiaoguang Mao
Smart contracts have been widely and rapidly used to automate financial and business transactions together with blockchains, helping people make agreements while minimizing trusts. With millions of smart contracts deployed on blockchain, various bugs and vulnerabilities in smart contracts have emerged. Following the rapid development of deep learning, many recent studies have used deep learning for vulnerability detection to conduct security checks before deploying smart contracts. These approaches show effective results on detecting whether a smart contract is vulnerable or not whereas their results on locating suspicious statements responsible for the detected vulnerability are still unsatisfactory. To address this problem, we propose a deep learning based two-phase smart contract debugger for reentrancy vulnerability, one of the most severe vulnerabilities, named as ReVulDL: Reentrancy Vulnerability Detection and Localization. ReVulDL integrates the vulnerability detection and localization into a unified debugging pipeline. For the detection phase, given a smart contract, ReVulDL uses a graph-based pre-training model to learn the complex relationships in propagation chains for detecting whether the smart contract contains a reentrancy vulnerability. For the localization phase, if a reentrancy vulnerability is detected, ReVulDL utilizes interpretable machine learning to locate the suspicious statements in smart contract to provide interpretations of the detected vulnerability. Our large-scale empirical study on 47,398 smart contracts shows that ReVulDL achieves promising results in detecting reentrancy vulnerabilities (e.g., outperforming 16 state-of-the-art vulnerability detection approaches) and locating vulnerable statements (e.g., 70.38% of the vulnerable statements are ranked within Top-10).

23 May 2023 in IEEE Transactions on Software Engineering
Verified
Journal Article
Open access
ZZZhuo Zhang
Zhuo Zhang
YLYan Lei
Yan Lei
XMXiaoguang Mao
Xiaoguang Mao
MYMeng Yan
Meng Yan
XXXin Xia
Xin Xia
DLDavid Lo
David Lo
Numerous fault localization techniques identify suspicious statements potentially responsible for program failures by discovering the statistical correlation between test results ( i.e., failing or passing ) and the executions of the different statements of a program ( i.e., covered or not covered ). They rarely incorporate a failure context into their suspiciousness evaluation despite the fact that a failure context showing how a failure is produced is useful for analyzing and locating faults. Since a failure context usually contains the transitive relationships among the statements of causing a failure, its relationship complexity becomes one major obstacle for the context incorporation in suspiciousness evaluation of fault localization. To overcome the obstacle, our insight is that leveraging the promising learning ability may be a candidate solution to learn a feasible model for incorporating a failure context into fault localization. Thus, we propose a context-aware neural fault localization approach (CAN). Specifically, CAN represents the failure context by constructing a program dependency graph, which shows how a set of statements interact with each other ( i.e., data and control dependencies) to cause a failure. Then, CAN utilizes graph neural networks to analyze and incorporate the context ( e.g., the dependencies among the statements) into suspiciousness evaluation. Our empirical results on the 12 large-sized programs show that CAN achieves promising results ( e.g., 29.23% faults are ranked within top 5), and it significantly improves the state-of-the-art baselines with a substantial margin.

10 September 2021 in Empirical Software Engineering
Verified
Journal Article
Closed access
PDF file
DYDeheng Yang
Deheng Yang
KLKui Liu
Kui Liu
DKDongsun Kim
Dongsun Kim
AKAnil Koyuncu
Anil Koyuncu
KKKisub Kim
Kisub Kim
Tegawendé F. BissyandéTegawendé F. Bissyandé
Tegawendé F. Bissyandé

23 November 2022 in IEEE Transactions on Software Engineering
Verified
Journal Article
Closed access
ZLZhixing Li
Zhixing Li
YYYue Yu
Yue Yu
TWTao Wang
Tao Wang
YLYan Lei
Yan Lei
YWYing Wang
Ying Wang
HWHuaimin Wang
Huaimin Wang
For most Open Source Software (OSS) projects, issues and Pull-requests (PR) are the primary means by which stakeholders of a project report and discuss software problems and code changes, and their descriptions are important for people to understand them. To help ensure the informational quality of issue/PR descriptions, GitHub introduced the issue/PR template feature, which pre-populates the description for anyone trying to open a new issue/PR. To better understand this feature, we report on a large-scale, mixed-methods empirical study of templates that explores contents, impacts, and perceptions. Our results show that templates typically contain elements to greet contributors, explain project guidelines, and collect relevant information. After template adoption, the monthly volume of incoming issues and PRs decreases, and issues have fewer monthly discussion comments and longer resolution duration. Although both contributors and maintainers positively rated the usefulness of templates from various aspects, they also reported challenges in using templates ( e . g . excessive and irrelevant information request) and suggested potential improvements of the template feature ( e . g . better user interaction and advanced automation). This work contributes to the informed use and targeted improvement of templates to enhance OSS practitioners' collaboration and interaction.

16 October 2023 in Proceedings of the ACM on Programming Languages
Verified
Journal Article
Open access
NTNATIONAL UNIVERSITY OF TECHNOLOGY
NATIONAL UNIVERSITY OF TECHNOLOGY
BLBo Lin
Bo Lin
ZSZhensu Sun
Zhensu Sun
MWMing Wen
Ming Wen
YLYepang Liu
Yepang Liu
XMXiaoguang Mao
Xiaoguang Mao
Automatically transforming developers' natural language descriptions into source code has been a longstanding goal in software engineering research. Two types of approaches have been proposed in the literature to achieve this: code generation, which involves generating a new code snippet, and code search, which involves reusing existing code. However, despite existing efforts, the effectiveness of the state-of-the-art techniques remains limited. To seek for further advancement, our insight is that code generation and code search can help overcome the limitation of each other: the code generator can benefit from feedback on the quality of its generated code, which can be provided by the code searcher, while the code searcher can benefit from the additional training data augmented by the code generator to better understand code semantics. Drawing on this insight, we propose a novel approach that combines code generation and code search techniques using a generative adversarial network (GAN), enabling mutual improvement through the adversarial training. Specifically, we treat code generation and code search as the generator and discriminator in the GAN framework, respectively, and incorporate several customized designs for our tasks. We evaluate our approach in eight different settings, and consistently observe significant performance improvements for both code generation and code search. For instance, when using NatGen, a state-of-the-art code generator, as the generator and GraphCodeBERT, a state-of-the-art code searcher, as the discriminator, we achieve a 32% increase in CodeBLEU score for code generation, and a 12% increase in mean reciprocal rank for code search on a large-scale Python dataset, compared to their original performances.

26 August 2020 in Journal of Software: Evolution and Process
Verified
Journal Article
Closed access
PDF file
ZZZhuo Zhang
Zhuo Zhang
YLYan Lei
Yan Lei
XMXiaoguang Mao
Xiaoguang Mao
MYMeng Yan
Meng Yan
LXLing Xu
Ling Xu
JWJunhao Wen
Junhao Wen