Spoon is a metaprogramming library to analyze and transform Java source code. :spoon: is made with :heart:, :beers: and :sparkles:. It parses source files to build a well-designed AST with powerful analysis and transformation API.
This report summarizes scanner evidence for INRIA/spoon, a Java project with 1,959 GitHub stars. SynthScan examined 287,757 lines of code across 2747 source files, recording 534 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 14.1 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 54 finding(s).
Are imports declared and package/API names verified? 478 finding(s).
Are wrappers, guards, and repeated structures necessary? 9 finding(s).
Which changes need focused human review? 534 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 534 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | doc/js/search.min.js | 25 | var t,n,r,i,o,s=[],a=z.call(arguments),u=(yt.get(this,"events")||{})[e.type]||[],l=K.event.special[e.type]||{};if(a[0]=e | CODE |
| CRITICAL⚡ | …oon-smpl/src/test/java/spoon/smpl/C4JGetColorTest.java | 115 | assertTrue(method.toString().contains("context.getResources().getColor(com.kickstarter.libs.utils.KSColorUtils.darkCol | CODE |
| CRITICAL⚡ | …oon-smpl/src/test/java/spoon/smpl/C4JGetColorTest.java | 118 | assertFalse(method.toString().contains("context.getResources().getColor(com.kickstarter.libs.utils.KSColorUtils.darkCo | CODE |
| CRITICAL⚡ | …oon-smpl/src/test/java/spoon/smpl/C4JGetColorTest.java | 119 | assertTrue(method.toString().contains("ContextCompat.getColor(context, com.kickstarter.libs.utils.KSColorUtils.darkCol | CODE |
| CRITICAL⚡ | …oon-smpl/src/test/java/spoon/smpl/C4JGetColorTest.java | 128 | assertTrue(method.toString().contains("context.getResources().getColor(com.kickstarter.libs.utils.KSColorUtils.lightCo | CODE |
| CRITICAL⚡ | …oon-smpl/src/test/java/spoon/smpl/C4JGetColorTest.java | 131 | assertFalse(method.toString().contains("context.getResources().getColor(com.kickstarter.libs.utils.KSColorUtils.lightC | CODE |
| CRITICAL⚡ | …oon-smpl/src/test/java/spoon/smpl/C4JGetColorTest.java | 132 | assertTrue(method.toString().contains("ContextCompat.getColor(context, com.kickstarter.libs.utils.KSColorUtils.lightCo | CODE |
| CRITICAL | src/test/resources/compilation5/A.java | 88 | new me.ccrama.redditslide.Activities.A.AsyncGetSubredditName().execute(name); | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 104 | me.ccrama.redditslide.Authentication.me = me.ccrama.redditslide.Authentication.reddit.me(); | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 105 | me.ccrama.redditslide.Authentication.mod = me.ccrama.redditslide.Authentication.me.isMod(); | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 106 | me.ccrama.redditslide.Authentication.authentication.edit().putBoolean(me.ccrama.redditslide. | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 109 | me.ccrama.redditslide.Reddit.notifications.start(getApplicationContext()); | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 111 | if (me.ccrama.redditslide.Reddit.cachedData.contains("toCache")) { | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 113 | me.ccrama.redditslide.Reddit.autoCache.start(getApplicationContext()); | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 115 | final java.lang.String name = me.ccrama.redditslide.Authentication.me.getFullName(); | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 117 | me.ccrama.redditslide.util.LogUtil.v("AUTHENTICATED"); | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 119 | if (me.ccrama.redditslide.Authentication.reddit.isAuthenticated()) { | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 120 | final java.util.Set<java.lang.String> accounts = me.ccrama.redditslide.Authentication.au | CODE |
| CRITICAL⚡ | src/test/resources/compilation5/A.java | 125 | me.ccrama.redditslide.Authentication.authentication.edit().putStringSet("accounts", | CODE |
| CRITICAL | src/test/resources/compilation5/A.java | 153 | comments = new me.ccrama.redditslide.Activities.A.OverviewPagerAdapter(getSupportFragmentManager()); | CODE |
| CRITICAL | src/test/resources/compilation5/A.java | 157 | pager.setOnPageChangeListener(new android.support.v4.view.ViewPager.OnPageChangeListener() { | CODE |
| CRITICAL | src/test/resources/compilation5/A.java | 195 | final net.dean.jraw.models.Submission s = me.ccrama.redditslide.Authentication.reddit.getSubmission(para | CODE |
| CRITICAL | src/test/resources/compilation4/A.java | 35 | android.support.design.widget.Snackbar s = android.support.design.widget.Snackbar.make(v | CODE |
| CRITICAL | src/test/resources/compilation4/A.java | 54 | android.support.design.widget.Snackbar s = android.support.design.widget.Snackbar.make(v, me | CODE |
| CRITICAL | …ses2/apachetestsuite/staticjava3/AllLangTestJava3.java | 56 | suite.add(spoon.test.imports.testclasses2.apachetestsuite.enums.EnumTestSuite.suite()); | CODE |
| CRITICAL | …/apachetestsuite/staticcollision/AllLangTestSuite.java | 56 | suite.add(spoon.test.imports.testclasses2.apachetestsuite.enum2.EnumTestSuite.suite()); | CODE |
| CRITICAL | …/spoon/test/query_function/VariableReferencesTest.java | 366 | assertEquals("org.junit.jupiter.api.Assertions.assertTrue(field == 2)", stmt.toString()); | CODE |
| CRITICAL | src/test/java/spoon/test/generics/GenericsTest.java | 518 | assertEquals("spoon.test.generics.testclasses.Tacos.makeTacos()", invocation2.toString()); | CODE |
| CRITICAL | …est/java/spoon/test/fieldaccesses/FieldAccessTest.java | 233 | String expectedLambda = "() -> {" + System.lineSeparator() + " spoon.test.fieldaccesses.testclasses.MyClass.LOG.inf | CODE |
| CRITICAL | …spoon/test/variable/AccessFullyQualifiedFieldTest.java | 144 | assertTrue(!result.contains("spoon.test.variable.testclasses.MultiBurritos.toto();"), "The result should not contain a | CODE |
| CRITICAL | …spoon/test/variable/AccessFullyQualifiedFieldTest.java | 146 | assertTrue(!result.contains("spoon.test.variable.testclasses.ForStaticVariables.foo();"), "The result should not conta | CODE |
| CRITICAL | …spoon/test/variable/AccessFullyQualifiedFieldTest.java | 158 | assertTrue(!result.contains("spoon.test.variable.testclasses.ForStaticVariables.foo()"), "The result should not contai | CODE |
| CRITICAL | src/test/java/spoon/test/casts/CastTest.java | 117 | assertEquals("((java.lang.@spoon.test.casts.testclasses.Castings.TypeAnnotation(integer = 1)" + System.lineSeparator() | CODE |
| CRITICAL | src/test/java/spoon/test/path/PathTest.java | 167 | equals(new CtPathStringBuilder().fromString(".spoon.test.path.testclasses.Foo.bar(int,int)/CtParameter"), | CODE |
| CRITICAL | src/test/java/spoon/test/path/PathTest.java | 173 | equals(new CtPathStringBuilder().fromString(".spoon.test.path.testclasses.Foo.bar(int)/CtParameter"), | CODE |
| CRITICAL | …spoon/test/prettyprinter/DefaultPrettyPrinterTest.java | 262 | + " localField = spoon.test.prettyprinter.testclasses.sub.TypeIdentifierCollision.ENUM.E1.ordinal();" + nl | CODE |
| CRITICAL | …t/java/spoon/test/prettyprinter/TestSniperPrinter.java | 283 | testSniper(spoon.test.prettyprinter.testclasses.Simple.class.getName(), type -> { | CODE |
| CRITICAL | …prettyprinter/testclasses/TypeIdentifierCollision.java | 23 | localField = spoon.test.prettyprinter.testclasses.sub.TypeIdentifierCollision.ENUM.E1.ordinal(); | CODE |
| CRITICAL | src/test/java/spoon/test/template/TemplateTest.java | 670 | assertEquals("spoon.test.template.testclasses.logger.Logger.exit(\"enter\")", aTry.getFinalizer().getStatement(0).toSt | CODE |
| CRITICAL | src/test/java/spoon/test/template/TemplateTest.java | 672 | assertEquals("spoon.test.template.testclasses.logger.Logger.enter(\"Logger\", \"enter\")", aTry.getBody().getStatement | CODE |
| CRITICAL | src/test/java/spoon/test/template/TemplateTest.java | 934 | assertEquals("java.lang.System.out.println(spoon.test.template.testclasses.Params.value1())", result.getMethodsByName | CODE |
| CRITICAL | src/test/java/spoon/test/template/TemplateTest.java | 1119 | assertEquals("o = spoon.test.template.TypeReferenceClassAccess.Example.currentTimeMillis()", method.getBody().getState | CODE |
| CRITICAL | …t/java/spoon/test/template/TemplateEnumAccessTest.java | 47 | assertEquals("java.lang.annotation.ElementType.FIELD.name()", resultKlass.getMethod("method").getBody().getStatement(0 | CODE |
| CRITICAL | src/test/java/spoon/test/template/PatternTest.java | 1579 | assertEquals("spoon.test.template.testclasses.logger.Logger.exit(\"enter\")", aTry.getFinalizer().getStatement(0).toSt | CODE |
| CRITICAL | src/test/java/spoon/test/template/PatternTest.java | 1581 | assertEquals("spoon.test.template.testclasses.logger.Logger.enter(\"Logger\", \"enter\")", aTry.getBody().getStatement | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1273 | assertTrue(classContent.contains("@spoon.test.annotation.testclasses.repeatable.Tag(\"machin\")"), "Content of the fil | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1274 | assertTrue(classContent.contains("@spoon.test.annotation.testclasses.repeatable.Tag(\"truc\")"), "Content of the file: | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1304 | assertTrue(classContent.contains("@spoon.test.annotation.testclasses.repeatable.Tag(\"foo\")"), "Content of the file: | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1305 | assertTrue(classContent.contains("@spoon.test.annotation.testclasses.repeatable.Tag(\"bar\")"), "Content of the file: | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1326 | assertTrue(classContent.contains("@spoon.test.annotation.testclasses.repeatandarrays.TagArrays({ \"machin\", \"truc\" | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1327 | assertTrue(classContent.contains("@spoon.test.annotation.testclasses.repeatandarrays.TagArrays({ \"truc\", \"bidule\" | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1355 | assertTrue(classContent.contains("@spoon.test.annotation.testclasses.repeatandarrays.TagArrays(\"foo\")"), "Content of | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1356 | assertTrue(classContent.contains("@spoon.test.annotation.testclasses.repeatandarrays.TagArrays(\"bar\")"), "Content of | CODE |
| CRITICAL | src/test/java/spoon/test/annotation/AnnotationTest.java | 1372 | assertTrue(methodContent.contains("@spoon.test.annotation.testclasses.notrepeatable.StringAnnot(\"foo\")"), "Content: | CODE |
| CRITICAL | src/test/java/spoon/test/imports/ImportTest.java | 228 | assertEquals("new spoon.test.imports.testclasses.SubClass.Item(\"\")", ctConstructorCall.toString()); | CODE |
| CRITICAL | src/test/java/spoon/test/imports/ImportTest.java | 234 | + " new spoon.test.imports.testclasses.SubClass.Item(\"\");"+ System.lineSeparator() + " }" | CODE |
| CRITICAL | src/test/java/spoon/test/imports/ImportTest.java | 1141 | assertThat("The call to the last EnumTestSuite should be in FQN", output, containsString("suite.add(spoon.test.imports | CODE |
| CRITICAL | src/test/java/spoon/test/imports/ImportTest.java | 1171 | assertThat("The call to the last EnumTestSuite should be in FQN", output, containsString("suite.add(spoon.test.imports | CODE |
| CRITICAL | src/test/java/spoon/test/imports/ImportTest.java | 1471 | " java.lang.System.out.println(spoon.test.imports.testclasses.JavaLongUse.method());" + nl + | CODE |
| CRITICAL | src/test/java/spoon/test/arrays/ArraysTest.java | 54 | assertEquals("@spoon.test.arrays.testclasses.ArrayClass.TypeAnnotation(integer = 1)", arrayTypeReference.getArrayType( | CODE |
| 410 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/scorecards.yml | 41 | persist-credentials: false | COMMENT |
| LOW | doc/js/jquery.shuffle.min.js | 941 | // could fit, ignoring the current positions of items. | COMMENT |
| LOW | doc/jenkins/build.sh | 1 | #!/bin/bash | COMMENT |
| LOW | spoon-smpl/src/main/java/spoon/smpl/SmPLParser.java | 141 | COMMENT | |
| LOW | spoon-smpl/src/main/java/spoon/smpl/SmPLParser.java | 161 | // | COMMENT |
| LOW | src/test/resources/noclasspath/FileIO.java | 441 | // newppt.ppt_name.setVisibility("public"); | COMMENT |
| LOW | src/test/resources/noclasspath/FileIO.java | 621 | // COMPARABILITY TEST | COMMENT |
| LOW | src/test/resources/noclasspath/FileIO.java | 901 | all_program_points = all_program_points && is_program_point; | COMMENT |
| LOW | src/test/resources/noclasspath/FileIO.java | 1401 | // is true and isCombinedExitPoint() is false. "Combined" exit points | COMMENT |
| LOW | src/test/resources/noclasspath/Daikon.java | 361 | * calculated by joining the invariants from each of their children | COMMENT |
| LOW | src/test/resources/noclasspath/Daikon.java | 1961 | // continue; | COMMENT |
| LOW | src/test/resources/noclasspath/Daikon.java | 2181 | // /** | COMMENT |
| LOW | src/test/resources/noclasspath/Solver.java | 821 | // without limitation the rights to use, copy, modify, merge, publish, | COMMENT |
| LOW | src/test/resources/variable/PropPanelUseCase_1.40.java | 1 | // $Id: PropPanelUseCase.java,v 1.40 2003-12-06 07:56:44 mkl Exp $ | COMMENT |
| LOW | src/test/resources/variable/PropPanelUseCase_1.40.java | 21 | // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF | COMMENT |
| LOW | src/test/resources/comment/MarkdownCommentExamples.java | 21 | /// | COMMENT |
| LOW | src/test/resources/spoon/test/api/CommentedClass.java | 1 | //package spoon.test.api.testclasses; | COMMENT |
| LOW | src/test/java/spoon/test/generics/GenericsTest.java | 901 | + "X" | COMMENT |
| LOW | …t/java/spoon/test/ctType/testclasses/SubtypeModel.java | 61 | listAll = listExtendsY; | COMMENT |
| LOW | …t/java/spoon/test/ctType/testclasses/SubtypeModel.java | 101 | // listExtendsY = listExtendsX; | COMMENT |
| LOW | src/test/java/spoon/test/module/TestModule.java | 381 | } | COMMENT |
| LOW | src/test/java/spoon/test/template/PatternTest.java | 601 | } | COMMENT |
| LOW | …n/test/architecture/SpoonArchitectureEnforcerTest.java | 281 | // and crashes with a dirty exception | COMMENT |
| LOW | …n/test/architecture/SpoonArchitectureEnforcerTest.java | 301 | // @Override | COMMENT |
| LOW | src/test/java/spoon/test/factory/FactoryTest.java | 201 | // so we remove that test in order to proceed with other key features with strong contracts (incl. wrt to parents) | COMMENT |
| LOW | src/test/java/spoon/test/factory/FactoryTest.java | 221 | // // Feed some new inputResources | COMMENT |
| LOW | …oon/testing/assertions/CtReferenceAssertInterface.java | 41 | // is implemented. | COMMENT |
| LOW | …sitor/filter/PotentialVariableDeclarationFunction.java | 221 | } | COMMENT |
| LOW | …sitor/filter/PotentialVariableDeclarationFunction.java | 241 | // | COMMENT |
| LOW | …sitor/filter/PotentialVariableDeclarationFunction.java | 261 | // CtBinaryOperator && | COMMENT |
| LOW | …sitor/filter/PotentialVariableDeclarationFunction.java | 281 | // | COMMENT |
| LOW | …sitor/filter/PotentialVariableDeclarationFunction.java | 601 | // FIXME: The JLS states for enhanced for statements: | COMMENT |
| LOW | …sitor/filter/PotentialVariableDeclarationFunction.java | 621 | // The generated definition for the variable might introduce a pattern variable, but this does not seem possible | COMMENT |
| LOW | …sitor/filter/PotentialVariableDeclarationFunction.java | 701 | operator.getLeftHandOperand() == child ? operator.getRightHandOperand() : operator.getLeftHandOperand(); | COMMENT |
| LOW | src/main/java/spoon/reflect/factory/PackageFactory.java | 161 | // it were ever allowed) does not allow overlapping packages, one of them will be a synthetic | COMMENT |
| LOW | …ort/sniper/internal/AbstractSourceFragmentPrinter.java | 61 | // We DO NOT want to print spaces between `index` and `prevIndex` in the case that there | COMMENT |
| LOW | …in/java/spoon/support/compiler/jdt/JDTTreeBuilder.java | 481 | } | COMMENT |
| LOW | …in/java/spoon/support/compiler/jdt/ContextBuilder.java | 401 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | doc/architecture_test.md | 92 | // Step 1: create model | COMMENT |
| LOW⚡ | doc/architecture_test.md | 98 | // Step 3: Remove fields not matching conditions. Our conditions here are: | COMMENT |
| LOW⚡ | doc/architecture_test.md | 105 | // Step 4: Query the model for all fieldReads | COMMENT |
| LOW⚡ | doc/architecture_test.md | 110 | // Step 5: Query every fieldRead for there declaring field | COMMENT |
| LOW⚡ | doc/architecture_test.md | 115 | // Step 6: Lookup every field in the set. The set contains all fields, that have a read. | COMMENT |
| LOW⚡ | doc/architecture_test.md | 120 | // Step 7: Remove the fields having a read from the set of fields. | COMMENT |
| LOW⚡ | doc/architecture_test.md | 122 | // Step 8: Lets compare our result. if the set is empty, every field has a read, otherwise print the fields without | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | spoon-smpl/tools/gen-e2e-testsuite.py | 86 | if (results.size() > 0 && rule.getMethodsAdded().size() > 0) { | CODE |
| HIGH | spoon-smpl/tools/gen-e2e-testsuite.py | 92 | assertEquals(expected.toString(), input.toString()); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc/js/jekyll-search.js | 1 | !function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0) | CODE |
| LOW | chore/check-javadoc-regressions.py | 61 | def print_quality_check_not_parseable_error(): | CODE |
| LOW | chore/check-javadoc-regressions.py | 119 | def find_added_violation_lines(reference: 'Counter[str]', other: 'Counter[str]') -> 'Counter[str]': | CODE |
| LOW | chore/check-javadoc-regressions.py | 176 | def command_compare_with_branch(target_branch: str) -> None: | CODE |
| LOW | chore/check-javadoc-regressions.py | 196 | def handle_compare_with_branch_output(target_branch: str, reference_output: str, other_output: str): | CODE |
| LOW | chore/check-javadoc-regressions.py | 230 | def print_status_deteriorated(reference_output: str, other_output: str): | STRING |
| LOW | chore/check-javadoc-regressions.py | 238 | def command_filtered_quality_check_errors(regex_str: str) -> None: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc/jenkins/inject_spoon_snapshot.py | 13 | CODE | |
| LOW | chore/check-links-in-doc.py | 6 | CODE | |
| LOW | spoon-smpl/tools/smplgui.py | 10 | CODE | |
| LOW | spoon-smpl/tools/smplgui.py | 14 | CODE | |
| LOW | spoon-smpl/tools/smplgui.py | 15 | CODE | |
| LOW | spoon-smpl/tools/smplgui.py | 17 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | chore/check-javadoc-regressions.py | 316 | print("Error executing native command:", e.cmd) | STRING |
| MEDIUM | chore/check-javadoc-regressions.py | 317 | print("Error output:") | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | chore/check-links-in-doc.py | 40 | CODE | |
| LOW | spoon-smpl/tools/smplgui.py | 92 | CODE |