codecaliper
Copyright (c) 2026 Yuxiang Ji
Licensed under the MIT License (see LICENSE).

Provenance of measurement primitives
------------------------------------

Several measurement primitives in this repository descend from Spaghetti
Architect (MIT, same author) and are reused here with attribution:

- The Buse-Weimer (2010) 25-feature reference extractor
  (tests/_reference/bw_stdlib.py, and the canonical feature order in
  src/codecaliper/readability/bw2010.py) descends from bench/anchor.py.
- The Python-AST metric lane used as a test-only differential oracle
  (tests/_reference/py_ast_lane.py) descends from eval/metrics.py.
- The "optional oracle probe with honest SKIP" differential-testing pattern
  descends from bench/anchor.py.
- The pure-stdlib statistics helpers (spearman, mean, bootstrap CI) used by the
  BW faithfulness pipeline descend from bench/grade.py.

Please cite Spaghetti Architect via its concept DOI:

  Ji, Yuxiang. Spaghetti Architect: an anti-optimization transpiler with a
  compile-run oracle. Zenodo, 2026.
  https://doi.org/10.5281/zenodo.21033174

codecaliper is a general-purpose measurement instrument for arbitrary user
source code; it does not ingest Spaghetti Architect's IR, dataset, or
anti-pattern machinery (anti-salami boundary, see ARCHITECTURE.md §12).

Data attribution: the Buse-Weimer readability corpus
-----------------------------------------------------

This repository redistributes the Buse-Weimer code-readability corpus and
publishes data derived from it. Under validation/bw_faithfulness/derived/:

- arbitration_inputs/snippets/1.jsnp .. 100.jsnp: the 100 rated Java snippets,
  verbatim;
- arbitration_inputs/oracle.csv: the raw per-annotator score matrix (121 rows);
- arbitration_inputs/scores.csv: the per-snippet mean ratings derived from it;
- the derived material: feature vectors, training and arbitration results, and
  the generated reports.

Those are every raw input the reproduction consumes, so it re-runs from the git
tree alone, with no download. This material is used with the permission of an
author of the dataset (W. Weimer, personal communication, 2026-07-11), who
granted redistribution of the raw data and publication of derived results. The
permission is recorded in PERMISSIONS.md, which carries the message's date, its
DKIM authentication result, and the sha256 of the retained original. It is NOT
covered by this project's MIT licence; the corpus and everything derived from it
remain the work of its authors.

The author asked that the work be cited as both of the following, and this
project does so:

  Raymond P. L. Buse and Westley Weimer. Learning a Metric for Code Readability.
  IEEE Transactions on Software Engineering 36(4):546-558, 2010.
  https://doi.org/10.1109/TSE.2009.70

  Raymond P. L. Buse and Westley Weimer. A Metric for Software Readability.
  ISSTA 2008, 121-130. https://doi.org/10.1145/1390630.1390647

The Buse-Weimer corpus is the ONLY dataset content in this repository. Two
further corpora, Scalabrino et al. (2018) and Dorn (2012), are MEASURED but
never redistributed, and no permission has been sought or granted for either.
PERMISSIONS.md states the terms of all three corpora in prose;
validation/bw_faithfulness/dataset.toml carries the same facts in the
machine-readable form that fetch.py enforces, with URLs and checksums.
