XLXinrui Li

Xinrui Li

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

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Xinrui Li has a total of 10 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    Breaking Waiting: Accelerating Android GUI Testing via Widget Readiness Analysis

    by Xinrui Li, Xin Yin, Chao Ni, Xiaohua Xin, Carolyn Sun, Jue Wang, Xiaohu Yang

    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

    Hunk-Constrained DPO: Segment-Level Optimization for Secure and Correct LLM Code Generation

    by Qianshuo Huang, Xin Yin, Xinrui Li, Chao Ni

    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

    MoPRec: Multi-modal Fusion with Developer Preference Modeling for Enhanced GitHub Topic Recommendations

    by Jiahao Li, Xinrui Li, Chao Ni

    Topic tagging is crucial for enhancing the discoverability and comprehensibility of open-source projects. However, existing recommendation systems often overlook developer-specific interests, struggle with noisy textual data, and lack effective multi-modal fusion. To address these limitations, we propose a novel multi-modal topic recommendation system for the GitHub platform. Our approach introduces a developer-centric model that quantifies developers' technical preferences via a developer-topic interaction matrix, modeled using explicit statistics, Non-negative Matrix Factorization (NMF), and Graph Attention Networks (GATs). To combat noise in project documentation, we design a semantic distillation framework leveraging a Large Language Model (LLM) with tailored prompts to extract high-fidelity textual features. Furthermore, a hierarchical attention mechanism is developed to effectively integrate heterogeneous data modalities. Comprehensive experiments on a dataset of 5,590 projects demonstrate that our system achieves an F1-score of 0.4546, surpassing the best-performing baseline (IR-TFIDF) by 23.40\%. Case studies further validate its superiority in recognizing technical terms, offering new insights for software comprehension on knowledge-intensive platforms.

  • Top Cited Papers
    Open Access

    Abundant Modalities Offer More Nutrients: Multi-Modal-Based Function-Level Vulnerability Detection

    by Chao Ni, Xin Yin, Xinrui Li, Xiaodan Xu, Zhi Yu

    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.