# tech-srl/code2vec

TensorFlow code for the neural network presented in the paper: "code2vec: Learning Distributed Representations of Code"

Repository: https://github.com/tech-srl/code2vec
Canonical: https://ross.abutalabs.com/products/code2vec
Homepage: https://code2vec.org
Language: Python
License: MIT
License Family: permissive
Topics: code2vec, learning, distributed, representations, of, code, technion
Last push: 2023-09-20T14:34:38+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2962, "days_push": 1078, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1147, forks 290 (observed 2026-08-28T04:03:45.918337+00:00)

## What it is
Official TensorFlow implementation of the code2vec model from the POPL'2019 paper, which learns distributed vector representations of code snippets from abstract syntax tree paths. It is trained by default to predict Java method names but is language-agnostic and intended for research in machine learning on code.

## Use cases
- generate vector embeddings for code snippets
- predict method names from Java code
- research machine learning on source code
- train a code representation model on a new programming language
- extract code2vec embeddings for downstream ML tasks
- reproduce results from the code2vec paper

## When to choose
- you need code embeddings based on AST paths for research or classification
- you want to experiment with neural models of source code in TensorFlow
- you want to reproduce or extend the code2vec model

## When to avoid
- you need a production-ready code intelligence service
- you want modern transformer-based code models like CodeBERT
- you need active development or new features
- you don't work in Python/TensorFlow

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, nlp, parser
- domain: machine-learning, programming-languages, developer-tools, artificial-intelligence
- platform: python, cross-platform
- tags: code-embeddings, tensorflow, research, code-analysis, method-name-prediction, academic

## Member repositories
- tech-srl/code2vec (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:45.918337+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:34:04.183992+00:00, confidence not recorded.
  - readme: https://github.com/tech-srl/code2vec (fetched 2026-08-28T04:03:45.918337+00:00, sha 292a24dac822)
  - homepage: https://code2vec.org (fetched 2026-08-29T12:39:23.764447+00:00, sha 37e3a81b31ca)
- Data as of 2026-08-30T08:39:29.467469+00:00.
