Alejandro Velasco
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Previous Organizations / Institutes
The organizations / institutes from the scholar's other articles in the past ten years
Research Subjects
Alejandro Velasco has a total of 26 co-authors. Here are the top co-authors by number of shared publications:
- Denys Poshyvanyk
William & Mary, Williamsburg, VA, USA
7 shared publications - David Nader Palacio
Microsoft, Redmond, USA
5 shared publications - Daniel Rodriguez-Cardenas
William & Mary, Williamsburg, USA
4 shared publications - Dipin Khati
William & Mary, Williamsburg, USA
3 shared publications - Jairo Aponte
Universidad Nacional de Colombia
2 shared publications - Alvaro Rodriguez
Department of Computer Science, Universidad Nacional de Colombia, Bogotá, Colombia
1 shared publication
Latest Publications
- Open Access
- 7 October 2026
- Published by Association for Computing Machinery (ACM)
- p. 4548-4553
ECLAIR: A Causally-Grounded AI Framework for Scientific Discovery in Empirical Software Engineering
- 7 October 2026
- Published by Association for Computing Machinery (ACM)
- p. 4548-4553
Open AccessECLAIR: A Causally-Grounded AI Framework for Scientific Discovery in Empirical Software Engineering
- Open Access
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 554-566
How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 554-566
Open AccessHow Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?
- Open Access
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 642-654
Enabling Global, Human-Centered Explanations for LLMs: From Tokens to Interpretable Code and Test Generation
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 642-654
Open AccessEnabling Global, Human-Centered Explanations for LLMs: From Tokens to Interpretable Code and Test Generation
- Open Access
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 1122-1133
A Causal Perspective on Measuring, Explaining and Mitigating Smells in LLM-Generated Code
Recent advances in large language models (LLMs) have accelerated their adoption in software engineering contexts. However, concerns persist about the structural quality of the code they produce. In particular, LLMs often replicate poor coding practices, introducing code smells (i.e., patterns that hinder readability, maintainability, or design integrity). Although prior research has examined the detection or repair of smells, we still lack a clear understanding of how and when these issues emerge in generated code. This paper addresses this gap by systematically measuring, explaining and mitigating smell propensity in LLM-generated code. We build on the Propensity Smelly Score (PSC), a probabilistic metric that estimates the likelihood of generating particular smell types, and establish its robustness as a signal of structural quality. Using PSC as an instrument for causal analysis, we identify how generation strategy, model size, model architecture and prompt formulation shape the structural properties of generated code. Our findings show that prompt design and architectural choices play a decisive role in smell propensity and motivate practical mitigation strategies that reduce its occurrence. A user study further demonstrates that PSC helps developers interpret model behavior and assess code quality, providing evidence that smell propensity signals can support human judgement. Taken together, our work lays the groundwork for integrating quality-aware assessments into the evaluation and deployment of LLMs for code.
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 1122-1133
Open AccessA Causal Perspective on Measuring, Explaining and Mitigating Smells in LLM-Generated Code
Recent advances in large language models (LLMs) have accelerated their adoption in software engineering contexts. However, concerns persist about the structural quality of the code they produce. In particular, LLMs often replicate poor coding practices, introducing code smells (i.e., patterns that hinder readability, maintainability, or design integrity). Although prior research has examined the detection or repair of smells, we still lack a clear understanding of how and when these issues emerge in generated code. This paper addresses this gap by systematically measuring, explaining and mitigating smell propensity in LLM-generated code. We build on the Propensity Smelly Score (PSC), a probabilistic metric that estimates the likelihood of generating particular smell types, and establish its robustness as a signal of structural quality. Using PSC as an instrument for causal analysis, we identify how generation strategy, model size, model architecture and prompt formulation shape the structural properties of generated code. Our findings show that prompt design and architectural choices play a decisive role in smell propensity and motivate practical mitigation strategies that reduce its occurrence. A user study further demonstrates that PSC helps developers interpret model behavior and assess code quality, providing evidence that smell propensity signals can support human judgement. Taken together, our work lays the groundwork for integrating quality-aware assessments into the evaluation and deployment of LLMs for code.
- Top Cited Papers
- 4 July 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 51 (8) , 2329-2345
On the Effectiveness of LLM-as-a-Judge for Code Generation and Summarization
Large Language Models (LLMs) have been recently exploited as judges for complex natural language processing tasks, such as Q&A (Question & Answer). The basic idea is to delegate to an LLM the assessment of the “quality” of the output provided by an automated technique (often another LLM) for tasks for which: (i) quantitative metrics would only tell part of the story, and; (ii) a large-scale human-based evaluation would be too expensive. LLMs-as-a-judge, if proven effective for a specific task, can also unlock new possibilities for automation, with several LLMs proposing a solution for a given instance of the task (e.g., an answer to a question) and others judging and deciding what is the best output to show the user. We study the effectiveness of LLMs-as-a-judge for two code-related tasks, namely code generation and code summarization. The rationale for choosing these tasks is two-fold. First, quantitative metrics are usually not enough for the assessment of code summarizers/generators. For example, it is well documented that metrics such as BLEU are quite weak proxies for the quality of the generated summaries. Second, even state-of-the-art techniques still struggle with handling complex instances of these tasks (e.g., summarizing a quite long / complex function), making them good candidates for benefiting from more advanced solutions envisioning collaboration among LLMs. For code generation, we check whether eight LLMs are able to judge the correctness of 1,405 Java methods and 1,281 Python functions generated by the same LLMs or implemented by humans. For code summarization, we compare the judgment of five LLMs to those provided by nine humans for ç1.2k summaries, related to both Java and Python functions. Our findings show that GPT-4-turbo is the best LLM in terms of judging capabilities for both tasks, with “smaller” LLMs featuring tens of billions parameters not being able to cope with judging tasks. However, even the best-performing LLM frequently misjudges the correctness of the code and summary quality.
- 4 July 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 51 (8) , 2329-2345
Top Cited PapersOn the Effectiveness of LLM-as-a-Judge for Code Generation and Summarization
Large Language Models (LLMs) have been recently exploited as judges for complex natural language processing tasks, such as Q&A (Question & Answer). The basic idea is to delegate to an LLM the assessment of the “quality” of the output provided by an automated technique (often another LLM) for tasks for which: (i) quantitative metrics would only tell part of the story, and; (ii) a large-scale human-based evaluation would be too expensive. LLMs-as-a-judge, if proven effective for a specific task, can also unlock new possibilities for automation, with several LLMs proposing a solution for a given instance of the task (e.g., an answer to a question) and others judging and deciding what is the best output to show the user. We study the effectiveness of LLMs-as-a-judge for two code-related tasks, namely code generation and code summarization. The rationale for choosing these tasks is two-fold. First, quantitative metrics are usually not enough for the assessment of code summarizers/generators. For example, it is well documented that metrics such as BLEU are quite weak proxies for the quality of the generated summaries. Second, even state-of-the-art techniques still struggle with handling complex instances of these tasks (e.g., summarizing a quite long / complex function), making them good candidates for benefiting from more advanced solutions envisioning collaboration among LLMs. For code generation, we check whether eight LLMs are able to judge the correctness of 1,405 Java methods and 1,281 Python functions generated by the same LLMs or implemented by humans. For code summarization, we compare the judgment of five LLMs to those provided by nine humans for ç1.2k summaries, related to both Java and Python functions. Our findings show that GPT-4-turbo is the best LLM in terms of judging capabilities for both tasks, with “smaller” LLMs featuring tens of billions parameters not being able to cope with judging tasks. However, even the best-performing LLM frequently misjudges the correctness of the code and summary quality.
- Open Access
- 14 April 2024
- Published by Association for Computing Machinery (ACM)
- p. 162-164
Beyond Accuracy: Evaluating Source Code Capabilities in Large Language Models for Software Engineering
- 14 April 2024
- Published by Association for Computing Machinery (ACM)
- p. 162-164
Open AccessBeyond Accuracy: Evaluating Source Code Capabilities in Large Language Models for Software Engineering
- Open Access
- 14 April 2024
- Published by Association for Computing Machinery (ACM)
- p. 72-76
Which Syntactic Capabilities Are Statistically Learned by Masked Language Models for Code?
- 14 April 2024
- Published by Association for Computing Machinery (ACM)
- p. 72-76
Open AccessWhich Syntactic Capabilities Are Statistically Learned by Masked Language Models for Code?
- 21 March 2024
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 50 (5) , 1215-1243
Toward a Theory of Causation for Interpreting Neural Code Models
Neural Language Models of Code, or Neural Code Models (NCMs), are rapidly progressing from research prototypes to commercial developer tools. As such, understanding the capabilities and limitations of such models is becoming critical. However, the abilities of these models are typically measured using automated metrics that often only reveal a portion of their real-world performance. While, in general, the performance of NCMs appears promising, currently much is unknown about how such models arrive at decisions. To this end, this paper introduces docode , a post hoc interpretability method specific to NCMs that is capable of explaining model predictions. docode is based upon causal inference to enable programming language-oriented explanations. While the theoretical underpinnings of docode are extensible to exploring different model properties, we provide a concrete instantiation that aims to mitigate the impact of spurious correlations by grounding explanations of model behavior in properties of programming languages. To demonstrate the practical benefit of docode , we illustrate the insights that our framework can provide by performing a case study on two popular deep learning architectures and ten NCMs. The results of this case study illustrate that our studied NCMs are sensitive to changes in code syntax. All our NCMs, except for the BERT-like model, statistically learn to predict tokens related to blocks of code (e.g., brackets, parenthesis, semicolon) with less confounding bias as compared to other programming language constructs. These insights demonstrate the potential of docode as a useful method to detect and facilitate the elimination of confounding bias in NCMs.
- 21 March 2024
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 50 (5) , 1215-1243
Toward a Theory of Causation for Interpreting Neural Code Models
Neural Language Models of Code, or Neural Code Models (NCMs), are rapidly progressing from research prototypes to commercial developer tools. As such, understanding the capabilities and limitations of such models is becoming critical. However, the abilities of these models are typically measured using automated metrics that often only reveal a portion of their real-world performance. While, in general, the performance of NCMs appears promising, currently much is unknown about how such models arrive at decisions. To this end, this paper introduces docode , a post hoc interpretability method specific to NCMs that is capable of explaining model predictions. docode is based upon causal inference to enable programming language-oriented explanations. While the theoretical underpinnings of docode are extensible to exploring different model properties, we provide a concrete instantiation that aims to mitigate the impact of spurious correlations by grounding explanations of model behavior in properties of programming languages. To demonstrate the practical benefit of docode , we illustrate the insights that our framework can provide by performing a case study on two popular deep learning architectures and ten NCMs. The results of this case study illustrate that our studied NCMs are sensitive to changes in code syntax. All our NCMs, except for the BERT-like model, statistically learn to predict tokens related to blocks of code (e.g., brackets, parenthesis, semicolon) with less confounding bias as compared to other programming language constructs. These insights demonstrate the potential of docode as a useful method to detect and facilitate the elimination of confounding bias in NCMs.
- Open Access
- 19 June 2020
- Published by ITI Research Group in ParadigmPlus
- Vol. 1 (2) , 18-41
Automated Fine Grained Traceability Links Recovery between High Level Requirements and Source Code Implementations
Software Traceability has been a matter of discussion in the Software Engineering community for a long time. The process of keeping and recover traces among software artifacts in any system represents a fundamental aspect to properly perform software maintenance tasks and requirements compliance verification. Furthermore, there exist application contexts where this becomes a mandatory process, for instance, banking and healthcare. Software traceability has dedicated efforts in proposing alternatives to recover lost traceability links in a coarse-grained and middle-grained detail by so far, however, proposed techniques are not enough to meet the desired levels of granularity in critical contexts. In this work we propose a fine-grained traceability algorithm designed to recover traces between high level requirements written in human natural language and source code statements where they are implemented. We tested our approach in four open-source healthcare systems to trace constraints requirements specified by the HIPAA law, and we evaluated the results as presented is this paper.
- 19 June 2020
- Published by ITI Research Group in ParadigmPlus
- Vol. 1 (2) , 18-41
Open AccessAutomated Fine Grained Traceability Links Recovery between High Level Requirements and Source Code Implementations
Software Traceability has been a matter of discussion in the Software Engineering community for a long time. The process of keeping and recover traces among software artifacts in any system represents a fundamental aspect to properly perform software maintenance tasks and requirements compliance verification. Furthermore, there exist application contexts where this becomes a mandatory process, for instance, banking and healthcare. Software traceability has dedicated efforts in proposing alternatives to recover lost traceability links in a coarse-grained and middle-grained detail by so far, however, proposed techniques are not enough to meet the desired levels of granularity in critical contexts. In this work we propose a fine-grained traceability algorithm designed to recover traces between high level requirements written in human natural language and source code statements where they are implemented. We tested our approach in four open-source healthcare systems to trace constraints requirements specified by the HIPAA law, and we evaluated the results as presented is this paper.
- Open Access
- 28 October 2019
- Published by Springer Nature
- p. 517-532
Recovering Fine Grained Traceability Links Between Software Mandatory Constraints and Source Code
- 28 October 2019
- Published by Springer Nature
- p. 517-532
Open AccessRecovering Fine Grained Traceability Links Between Software Mandatory Constraints and Source Code