Defining ethically sourced code generation

📅 2025-07-25
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Ethical governance remains critically underdeveloped across the full lifecycle of AI-powered code generation models. Method: We propose the Ethics-Sensitive Code Generation (ES-CodeGen) framework, grounded in a two-phase systematic literature review (803 papers) and empirical fieldwork with 32 professional developers—including contextualized user feedback. Contribution/Results: This study introduces the first comprehensive ES-CodeGen taxonomy, spanning 11 dimensions—innovatively incorporating “code quality” as an ethically salient dimension—and uncovers practitioners’ persistent blind spots regarding socio-ethical considerations (e.g., fairness, labor impact, societal accountability). It systematically maps critical ethical dimensions, associated risks, deliverables, and actionable implementation pathways per development stage. The framework demonstrably enhances developer ethical awareness and delivers a practical, sustainability-oriented guideline for industry stakeholders to institutionalize responsible AI code generation practices.

Technology Category

Application Category

📝 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 attentions 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 read 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 sourcing 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 tend to ignore social-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 attentions of various ethical issues towards ES-CodeGen.
Problem

Research questions and friction points this paper is trying to address.

Defining ethical practices for code generation models
Addressing ethical issues in AI-based code development
Creating taxonomy for ethically sourced code generation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Ethically sourced code generation framework
Two-phase literature review methodology
Practitioner survey refining dimensions
🔎 Similar Papers
No similar papers found.
Z
Zhuolin Xu
Concordia University
C
Chenglin Li
Concordia University
Q
Qiushi Li
Concordia University
Shin Hwei Tan
Shin Hwei Tan
Associate Professor, Concordia University
Automated Program RepairSoftware TestingGenetic ImprovementOpen-source Software Development