Lune

ICSE2026Top-tier venue

What Makes Code Generation Ethically Sourced?

Zhuolin Xu, Chenglin Li, Qiushi Li, Shin Hwei Tan

Abstract

Several code generation models have been proposed to help reduce time and effort in solving software-related tasks. To ensure responsible AI, there are growing interests over various ethical issues (e.g., unclear licensing, privacy, fairness, and environment impact). These studies have the overarching goal of ensuring ethically sourced generation, which has gained growing attention in speech synthesis and image generation. In this paper, we introduce the novel notion of Ethically Sourced Code Generation (ES-CodeGen) to refer to managing all processes involved in code generation model development from data collection to post-deployment via ethical and sustainable practices. To build a taxonomy of ES-CodeGen, we perform a two-phase literature review where we reviewed 803 papers across various domains and specific to AI-based code generation. We identified 71 relevant papers with 10 initial dimensions of ES-CodeGen. To refine our dimensions and gain insights on consequences of ES-CodeGen, we surveyed 32 practitioners, which include six developers who submitted GitHub issues to opt-out from the Stack dataset (these impacted users have real-world experience of ethically sourced issues in code generation models). The results lead to 11 dimensions of ES-CodeGen with a new dimension on code quality as practitioners have noted its importance. We also identified consequences, artifacts, and stages relevant to ES-CodeGen. Our post-survey reflection showed that most practitioners tended to ignore society-related dimensions despite their importance. Most practitioners either agreed or strongly agreed that our survey help improve their understanding of ES-CodeGen. Our study calls for attention of various ethical issues towards ES-CodeGen.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Coverage-Based Harmfulness Testing for LLM Code Transformation cites CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code Completion
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on6

  1. An Empirical Study on Software Bill of Materials: Where We Stand and the Road AheadBoming Xia, Tingting Bi, Zhenchang Xing, Qinghua Lu et al.ICSE 2023 · 82 citations
  2. Uncovering and Quantifying Social Biases in Code GenerationYan Liu, Xiaokang Chen, Yan Gao, Zhe Su et al.NeurIPS 2023 · 47 citations
  3. CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code CompletionQibing Ren, Chang Gao, Jing Shao, Junchi Yan et al.ACL Findings 2024 · 22 citations
  4. Using AI Assistants in Software Development: A Qualitative Study on Security Practices and ConcernsJan H. Klemmer, Stefan Albert Horstmann, Nikhil Patnaik, Cordelia Ludden et al.CCS 2024 · 14 citations
  5. Coverage-Based Harmfulness Testing for LLM Code TransformationHonghao Tan, Haibo Wang, Diany Pressato, Yisen Xu et al.ASE 2025 · 2 citations

Related papers

  1. An Empirical Study of Code Clones from Commercial AI Code GeneratorsWeibin Wu, Haoxuan Hu, Zhaoji Fan, Yitong Qiao et al.FSE 2025 · 2 citations
  2. RAI Guidelines: Method for Generating Responsible AI Guidelines Grounded in Regulations and Usable by (Non-)Technical RolesMarios Constantinides, Edyta Paulina Bogucka, Daniele Quercia, Susanna Kallio et al.CSCW 2024 · 28 citations
  3. Emerging Data Practices: Data Work in the Era of Large Language ModelsAdriana Alvarado Garcia, Heloisa Candello, Karla Badillo-Urquiola, Marisol Wong-VillacresCHI 2025 · 6 citations
  4. Navigating Uncertainties: How GenAI Developers Document Their Models on Open-Source PlatformsNingjing Tang, Megan Li, Amy A. Winecoff, Michael Madaio et al.CHI 2026 · 3 citations
  5. Carbon-Taxed Transformers: A Green Compression Pipeline for Overgrown Language ModelsAjmain Inqiad Alam, Palash Ranjan Roy, Chanchal K. Roy, Banani Roy et al.FSE 2026
Dusk over the sea between two cliffs drawn in fine vertical lines