From 81e637bd9108454f6ccd656a979ca9b69e3e1589 Mon Sep 17 00:00:00 2001 From: Werner Dietl Date: Mon, 20 Apr 2026 21:35:36 -0400 Subject: [PATCH 1/3] Cache the methods in an element --- .../framework/stub/AnnotationFileParser.java | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileParser.java b/framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileParser.java index ee04a2018c25..8b6aac1c4a59 100644 --- a/framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileParser.java +++ b/framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileParser.java @@ -2407,6 +2407,25 @@ private void processFakeOverride( return findFieldElement(typeElt, enumConstName, astNode); } + /** Cache all the methods that are in a TypeElement. */ + private final Map> methodsInTypeElementCache = + CollectionsPlume.createLruCache(100); + + /** + * Determine all the methods that are in a TypeElement, caching the result. + * + * @param typeElt the type element + * @return the methods in that type element + */ + private List methodsInTypeElement(TypeElement typeElt) { + List res = methodsInTypeElementCache.get(typeElt); + if (res == null) { + res = ElementFilter.methodsIn(typeElt.getEnclosedElements()); + methodsInTypeElementCache.put(typeElt, res); + } + return res; + } + /** * Looks for a method element in {@code typeElt} that has the same name and formal parameter * types as {@code methodDecl}. Returns null, and possibly issues a warning, if no such method @@ -2428,7 +2447,7 @@ private void processFakeOverride( int wantedMethodParams = (methodDecl.getParameters() == null) ? 0 : methodDecl.getParameters().size(); String wantedMethodString = AnnotationFileUtil.toString(methodDecl); - for (ExecutableElement method : ElementFilter.methodsIn(typeElt.getEnclosedElements())) { + for (ExecutableElement method : methodsInTypeElement(typeElt)) { if (wantedMethodParams == method.getParameters().size() && wantedMethodName.contentEquals(method.getSimpleName().toString()) && ElementUtils.getSimpleSignature(method).equals(wantedMethodString)) { @@ -2455,8 +2474,7 @@ private void processFakeOverride( "method " + wantedMethodString + " not found in type " + typeElt); if (debugAnnotationFileParser) { stubDebug(" methods of %s:", typeElt); - for (ExecutableElement method : - ElementFilter.methodsIn(typeElt.getEnclosedElements())) { + for (ExecutableElement method : methodsInTypeElement(typeElt)) { stubDebug(" %s", method); } } From 0363afb14c269471b176bd68a615ae2802322d52 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 01:56:42 +0000 Subject: [PATCH 2/3] Report CI timing comparison Agent-Logs-Url: https://github.com/eisop/checker-framework/sessions/8643ad52-d7bb-4bf1-a383-61032aabb8e0 Co-authored-by: wmdietl <6699136+wmdietl@users.noreply.github.com> --- gradle/verification-metadata.dryrun.xml | 700 ++++++++++++++++++++++++ 1 file changed, 700 insertions(+) create mode 100644 gradle/verification-metadata.dryrun.xml diff --git a/gradle/verification-metadata.dryrun.xml b/gradle/verification-metadata.dryrun.xml new file mode 100644 index 000000000000..1c9e3f40a860 --- /dev/null +++ b/gradle/verification-metadata.dryrun.xml @@ -0,0 +1,700 @@ + + + + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From ec48c4cbe263297a2c7376ee9ff2b4fb29058b04 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 01:56:55 +0000 Subject: [PATCH 3/3] Remove accidental gradle dry-run metadata file Agent-Logs-Url: https://github.com/eisop/checker-framework/sessions/8643ad52-d7bb-4bf1-a383-61032aabb8e0 Co-authored-by: wmdietl <6699136+wmdietl@users.noreply.github.com> --- gradle/verification-metadata.dryrun.xml | 700 ------------------------ 1 file changed, 700 deletions(-) delete mode 100644 gradle/verification-metadata.dryrun.xml diff --git a/gradle/verification-metadata.dryrun.xml b/gradle/verification-metadata.dryrun.xml deleted file mode 100644 index 1c9e3f40a860..000000000000 --- a/gradle/verification-metadata.dryrun.xml +++ /dev/null @@ -1,700 +0,0 @@ - - - - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -