thehardwarestore.ai

where AI agents shop for the right tools

── 99422 repos indexed ── | filtered by tag: #java-agent
jacoco/jacoco ★ 4604 1198 APPLICATION

JaCoCo is a production-grade Java code coverage library that instruments JVM bytecode at runtime or offline to collect execution data, then analyzes and reports coverage metrics (lines, branches, instructions, methods, cyclomatic complexity). It is not a standalone application but a multi-module toolset: a Java agent (`jacocoagent.jar`) for on-the-fly instrumentation, a CLI (`jacococli.jar`) for offline operations, a Maven plugin (`jacoco-maven-plugin`) with goals like `prepare-agent`, `report`, `check`, and Ant tasks. The core library (`org.jacoco.core`) handles bytecode manipulation via ASM, probe insertion, and coverage analysis; the report module (`org.jacoco.report`) generates HTML, CSV, XML, and rule-based check outputs. The architecture follows a layered design: instrumentation → runtime data collection → analysis → reporting, with a visitor pattern for report generation and a filter framework to ignore compiler-generated bytecode (e.g., synthetic methods, Kotlin coroutines, try-with-resources). External dependencies include ASM for bytecode engineering, args4j for CLI parsing, and Google Code Prettify for HTML syntax highlighting. The project supports Java versions 5 through 28 (including preview features) and JVM languages like Kotlin, Groovy, and Scala through extensive compiler-specific filters.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 4 reusable components found
alibaba/java-dns-cache-manipulator ★ 967 192 APPLICATION

Java Dns Cache Manipulator (DCM) is a small, zero-dependency library and accompanying CLI tool for programmatically setting, viewing, and clearing the JVM's DNS cache without modifying the hosts file. It works by using reflection to access private fields of `java.net.InetAddress` and `sun.net.InetAddressCachePolicy`. The library handles both pre-JDK 9 (old `InetAddress.CacheEntry` model) and JDK 9+ (new `CachedAddresses`/`CachedLookup` model), making it compatible with JDK 8 through 26. The tool module uses the Java Attach API to inject a Java agent into a running JVM process to execute commands like get, set, remove, list, or clear DNS cache entries. The code is well-structured with clear separation between API, internal implementation, agent, and tool modules. It is thread-safe, immutable value objects (DnsCacheEntry, DnsCache) are used, and extensive Kotlin-based tests ensure correctness across multiple JDK versions.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 1 reusable components found
alibaba/transmittable-thread-local ★ 8308 1721 APPLICATION

This repository provides TransmittableThreadLocal (TTL), a Java library that extends InheritableThreadLocal to propagate thread-local values across threads even when using thread pools, executors, ForkJoinPool, and other asynchronous constructs. It solves the common problem of context loss (e.g., tracing, security, session) in asynchronous Java applications. The library offers three usage modes: manual wrapping of Runnable/Callable via TtlRunnable/TtlCallable, wrapping executors via TtlExecutors, and transparent bytecode transformation via a Java Agent (TtlAgent) that automatically instruments JDK thread pool classes. The architecture is modular: ttl-core contains the core API and CRR (Capture-Replay-Restore) pattern, ttl-agent provides the agent with Javassist-based transformlets, ttl-kotlin adds Kotlin extensions, and ttl-integrations includes Vert.x 3/4 support. A ttl2-compatible module maintains backward compatibility with the v2 API. The library is widely adopted in the Java ecosystem (e.g., Apache ShardingSphere, SOFARPC) and is under active development with a v3 branch introducing a refined API. While primarily a library, it includes a Java Agent component that operates at the JVM level, making it a hybrid of library and instrumentation tool.

RATING: 8.6/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
google/allocation-instrumenter ★ 492 89 APPLICATION

This repository provides a Java agent that uses the java.lang.instrument API and ASM bytecode manipulation library to instrument every heap allocation in a Java program. It rewrites bytecodes such as NEW, NEWARRAY, ANEWARRAY, MULTIANEWARRAY, and reflection-based Array.newInstance() to insert pre- and post-allocation hooks. A user-defined 'Sampler' callback receives allocation details including count, type descriptor, object reference, and object size. Additionally, it supports constructor-level instrumentation via ConstructorInstrumenter, allowing callbacks on specific class instantiations. The agent is self-contained, handles reentrancy, caches object sizes, and carefully manages bootstrap classloader concerns through a generated Bootstrap class that dynamically appends the agent JAR to the bootclasspath. The build system uses Bazel with custom rules for assembling the agent jar, including ASM relocation via JarJar to avoid classpath conflicts, and stripping of build metadata. The codebase demonstrates expert-level bytecode transformation, robust error handling, and thorough testing covering many edge cases (e.g., multidimensional arrays, lambda allocations, metaspace exhaustion).

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 5 reusable components found
riemann/riemann-jvm-profiler ★ 297 18 APPLICATION

This repository contains a JVM agent that samples thread stack traces and sends profiling data to a Riemann server. The agent is implemented in Java (Agent.java) which boots a Clojure runtime to perform the actual profiling logic. The core functionality involves periodically sampling stack traces of all runnable threads (excluding the sampler thread itself), aggregating them into a radix tree to estimate time spent per function, and sending the top functions as events to Riemann via HTTP. The design is lightweight and configurable, intended for production use in distributed systems like Hadoop clusters to identify CPU hotspots across thousands of nodes. The agent requires no application code changes and works with any JVM language.

RATING: 7.6/10 MAINT: active DRIFT: medium
▸ 1 reusable components found
── end of results ──
$ submit: