mlsanityData to 7 Oct 2026

COMEX: A Tool for Generating Customized Source Code Representations

arXiv 2307.04693 ↗First posted 10 Jul 2023cs.SE cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

Learning effective representations of source code is critical for any Machine Learning for Software Engineering (ML4SE) system. Inspired by natural language processing, large language models (LLMs) like Codex and CodeGen treat code as generic sequences of text and are trained on huge corpora of code data, achieving state of the art performance on several software engineering (SE) tasks. However, valid source code, unlike natural language, follows a strict structure and pattern governed by the underlying grammar of the programming language. Current LLMs do not exploit this property of the source code as they treat code like a sequence of tokens and overlook key structural and semantic properties of code that can be extracted from code-views like the Control Flow Graph (CFG), Data Flow Graph (DFG), Abstract Syntax Tree (AST), etc. Unfortunately, the process of generating and integrating code-views for every programming language is cumbersome and time consuming. To overcome this barrier, we propose our tool COMEX - a framework that allows researchers and developers to create and combine multiple code-views which can be used by machine learning (ML) models for various SE tasks. Some salient features of our tool are: (i) it works directly on source code (which need not be compilable), (ii) it currently supports Java and C#, (iii) it can analyze both method-level snippets and program-level snippets by using both intra-procedural and inter-procedural analysis, and (iv) it is easily extendable to other languages as it is built on tree-sitter - a widely used incremental parser that supports over 40 languages. We believe this easy-to-use code-view generation and customization tool will give impetus to research in source code representation learning methods and ML4SE. Tool: https://pypi.org/project/comex - GitHub: https://github.com/IBM/tree-sitter-codeviews - Demo: https://youtu.be/GER6U87FVbU

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 13 of its 24 references that are in the map. First posted on arXiv 10 Jul 2023.

Builds on

13 of 24 references.

References · 13

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  3. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  4. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  5. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  6. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  7. 2017Learning to Represent Programs with Graphscited by 219
  8. 2021Neural Program Generation Modulo Static Analysiscited by 13
  9. 2022Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptionscited by 11
  10. 2020Learning Graph Structure With A Finite-State Automaton Layercited by 10
  11. 2017Git Blame Who?: Stylistic Authorship Attribution of Small, Incomplete Source Code Fragmentscited by 7
  12. 2022Multi-View Graph Representation for Programming Language Processing: An Investigation into Algorithm Detectioncited by 6
1 more
  1. 2022A Library for Representing Python Programs as Graphs for Machine Learningcited by 4

Built on by

Cited by year

Citing papers per year: 2025: 3.

3 papers.