← Lab /Software

Security features in Java code are large, scattered, and tangled, not just library calls

Security features require substantial custom code beyond simple library calls

Software arXiv 5 Oct 2026 Measurement Maturity unclear

Published as “Security Is More Than a Library Call: How Security Features Live in Code”

Why it matters

Understanding the extensive, scattered, and tangled nature of security features can improve feature-location tools, static analysis, and AI-assisted development by accounting for project-specific security code beyond library calls.

Summary

The study manually annotated 561 security features in 9 popular Java systems (2,127,761 lines of code) and found that security-feature code is largely internal but overlaps with other features: 21.12% of security-feature code co-occurs with another feature and access-control and cryptography are the most interacting. External security libraries are used, yet they require substantial integration code. The evidence is based on a large, real-world codebase with detailed manual annotation, but no external baselines are provided.

What they found 3

  1. Security features are far more than mere calls to external libraries

    “Our findings show that security features are far more than mere calls to external libraries.”

  2. 21.12% of security feature code overlaps with another security feature

    “Overall, 21.12% of security feature code overlaps with another security feature.”

  3. Most security-relevant functionality is implemented internally

    “Across the studied systems, most security-relevant functionality is implemented internally, although custom implementations frequently use external functionality.”

Caveats 5

  • External functionality is concentrated in few APIs, with 21 namespace roots accounting for 97.3% of all external uses, showing heavy reliance on libraries despite the claim of extensive internal code.
  • Internal Validity: author bias in system selection and feature identification, mitigated by reviews.
  • External Validity: study limited to Java open-source projects on GitHub; may not generalize to other languages or less popular systems.
  • Conclusion Validity: reported correlations may be prone to outliers in the dataset.
  • Construct Validity: reliance on a predefined taxonomy may constrain the scope of considered security features.

What’s new here 3

  • Provides a manually curated dataset of security-feature annotations across full-system Java projects.
  • Quantifies scattering, tangling, and cross-feature overlap of security functionality beyond library calls.
  • Analyzes the balance of internal versus external implementation for each security feature category.