I received my Ph.D. degree from National University of Defense Technology (NUDT) in 2026. During my Ph.D. study, I was fortunate to be supervised by Prof. Xinjun Mao and co-supervised by Prof. Yue Yu. I received the bachelor’s degree from Tsien Hsue-shen Class, NUDT, in June 2020. My research interests include AI4SE, code reuse, code snippet adaptation, and empirical software engineering. My papers have been published at top software engineering venues, including ICSE, FSE, ASE, ISSTA, TSE, TOSEM and EMSE, and have received 130+ citations on Google Scholar.

🔥 News

  • 2026.09: 🎉🎉 Our paper about Logical Context Enhanced Code Generation (LogiCoder) was accepted by TOSEM after major revision! This is the final part of my Ph.D dissertation!
  • 2026.07: 🎉🎉 Our paper about Block-aware Code Differencing was accepted by ASE 2026 after major revision! Congrats to Prof. Lu and Prof. Liu!
  • 2026.05:  🎉🎉I have successfully defended my PhD dissertation!
  • 2026.04:  🎉🎉 Our paper about Deprecated NPM Packages was directly accepted by ISSTA 2026 (10.1%)! This is the first ISSTA paper in our group! Congrats to Zezhou!
  • 2025.12:  🎉🎉 Our paper about Context Adaptation Bug Resolution was directly accepted by FSE 2026 (9.4%)! This is the first FSE paper in our group!
  • 2025.09:  🎉🎉 Our paper about Code Adaptation Benchmark (AdaptEval) was accepted by ASE 2025 after major revision! This is the first ASE paper in our group!
  • 2025.04:  🎉🎉 Thrilled to announce our ICPC paper won 🏆ACM SIGSOFT Distinguished Paper Award!
  • 2024.10:  🎉🎉 Our paper about LLM-based Code Adaptation was directly accepted by ICSE 2025 (10.3%)! This is the first CCF-A SE conference paper in our group!

📝 Publications

Representative Works

FSE 2026
sym

Coding in a Bubble? Evaluating LLMs in Resolving Context Adaptation Bugs During Code Adaptation

Tanghaoran Zhang, Xinjun Mao, Shangwen Wang, Yuxin Zhao, Yao Lu, Zezhou Tang, Wenyu Xu, Longfei Sun, Changrong Xie, Kang Yang and Yue Yu.

FSE 2026 (CCF-A)

Project

  • We propose CtxBugGen, a novel framework for generating CtxBugs through a four-step process: (1) Task Selection, (2) Syntax-based Perturbation, (3) LLM-based Variant Generation and (4) Hybrid Identification. Based on CtxBugGen, we reveal LLMs’ unsatisfactory performance in CtxBug resolution, highlighting their preference for local code correctness and critical weakness in cross-context reasoning.
TOSEM 2026
sym

LLM See, LLM Do: Enhancing Repository-Aware Code Generation in LLMs Through Logical Context and Usage Knowledge

Tanghaoran Zhang, Xinjun Mao, Yuxin Zhao, Kang Yang, Zhang Zhang, Yao Lu, Youren Chen and Yue Yu.

TOSEM (CCF-A), 2026

Project

  • We propose LogiCoder, a novel RAG approach that leverages logical relationships to improve LLMs’ repository awareness during code generation. Using a repository-level dependency graph, it retrieves candidate callees and their most contextually similar usage examples, then re-ranks them with semantic search results.
ASE 2025
sym

AdaptEval: A Benchmark for Evaluating Large Language Models on Code Snippet Adaptation

Tanghaoran Zhang, Xinjun Mao, Shangwen Wang, Yuxin Zhao, Yao Lu, Jin Zhang, Zhang Zhang, Kang Yang and Yue Yu.

ASE 2025 (CCF-A)

Project | Video

  • We construct AdaptEval, the first benchmark for evaluating LLM-based code snippet adaptation. It incorporates three distinctive features: (1) practical context derived from developers’ reuse practices; (2) multi-granularity annotations supporting evaluation across diverse adaptation scenarios; (3) fine-grained evaluation supporting evaluation across various individual adaptations.
ICSE 2025
sym

Instruct or Interact? Exploring and Eliciting LLMs’ Capability in Code Snippet Adaptation Through Prompt Engineering

Tanghaoran Zhang, Yue Yu, Xinjun Mao, Shangwen Wang, Kang Yang, Yao Lu, Zhang Zhang and Yuxin Zhao.

ICSE 2025 (CCF-A)

Project

  • We first empirically investigate the capability of LLMs on the code adaptation task and find the root causes of their sub-optimal performance: (1) Unclear Requirement, (2) Requirement Misalignment and (3) Context Misapplication. To resolve above issues, we propose an interactive prompting approach to eliciting LLMs’ ability in code snippet adaptation.
TSE 2024
sym

How Do Developers Adapt Code Snippets to Their Contexts? An Empirical Study of Context-Based Code Snippet Adaptations

Tanghaoran Zhang, Yao Lu, Yue Yu, Xinjun Mao, Yang Zhang and Yuxin Zhao.

TSE (CCF-A), 2024

Project

  • We investigate how developers adapt code snippets to their project context based on a semi-structured interview and a quantitative study on 300 real-world adaptation cases. We point out current challenges in the adaptation practices and obtain four typical context-based adaptation patterns.

All Publications

🎖 Honors and Awards

  • 2025.11, 💰First-Prize Merit Scholarship, NUDT.
  • 2025.04, 🏆ACM SIGSOFT Distinguished Paper Award in ICPC 2025.
  • 2023.03, 💰Second-Prize Merit Scholarship, NUDT.
  • 2020.05, 💰Qiangjun Scholarship, NUDT.
  • 2019.10, 🏅Outstanding Winner of M* Modeling Contest.
  • 2019.10, 🏆CCF Outstanding Undergraduate, CCF.
  • 2019.05, 💰Yinhe Scholarship, College of Computer Science and Technology, NUDT.
  • 2019.05, 🏅Meritorious Winner of MCM/ICM.
  • 2018.05, 🏅Meritorious Winner of MCM/ICM.

📖 Educations

  • 2020.09 - 2026.06, National University of Defense Technology (NUDT), Ph.D. in Software Engineering.
  • 2016.09 - 2020.06, Tsien Hsue-shen Class (1/30), National University of Defense Technology (NUDT), B.E. in Software Engineering.
  • 2010.09 - 2016.06, The High School Affiliated to Renmin University of China (RDFZ), Middle and High School.

⚙️ Services

  • Program Committee
    • ICSE’26 Shadow PC
  • Reviewer
    • TSE, EMSE, KAIS
  • External Reviewer
    • Journal: TSE, TOSEM, EMSE, JCST, JoS
    • Conference: FSE’26, SANER’26, ICLR’25, ASE’24, ESEM’24

💬 Invited Talks

  • 2026.04, FSE 2026 Paper Pre-conference Presentation | Video.
  • 2025.11, ASE 2025 Paper Pre-conference Presentation | Video.
  • 2024.12, ICSE 2025 Paper Pre-conference Presentation | Video.

💻 Internships

  • 2025.03 - 2025.10, Visiting student at Peng Cheng Laboratory, Shenzhen, Guangdong.
  • 2019.07 - 2019.10, Mitacs Research Internship, at SEAL in Queen’s University, Canada, supervised by Prof. Ying Zou.