{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/sventorben/keycloak-home-idp-discovery/pull/653","old-code-health":9.810938638999382,"modified-files":{"code-health":9.777582526343272,"old-code-health":9.810938638999382,"files":[{"file":"src/main/java/de/sventorben/keycloak/authentication/hidpd/discovery/email/EmailHomeIdpDiscoverer.java","loc":159,"old-loc":117,"code-health":8.95517096544394,"old-code-health":9.240656298427343},{"file":"src/main/java/de/sventorben/keycloak/authentication/hidpd/discovery/email/EmailHomeIdpDiscovererConfig.java","loc":77,"old-loc":63,"code-health":10.0,"old-code-health":10.0},{"file":"src/test/java/de/sventorben/keycloak/authentication/AuthenticatorConfig.java","loc":114,"old-loc":104,"code-health":9.387218218812514,"old-code-health":9.387218218812514},{"file":"src/test/java/de/sventorben/keycloak/authentication/HomeIdpDiscoveryIT.java","loc":563,"old-loc":494,"code-health":10.0,"old-code-health":10.0},{"file":"src/test/java/de/sventorben/keycloak/authentication/hidpd/discovery/email/EmailHomeIdpDiscovererTest.java","loc":148,"old-loc":29,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"653","analysis-time":"2026-07-19T20:58:40Z","negative-impact-count":1,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":2,"commits":["cbde99b8a892344279133dcb221dfc000c0cd369","057eb0396a93e2df7ec4a6a4a816c5f18bd5ecfc","4563a5c9e51c9a39220e32aea0de02eb24ef18c4","00f1166ce76c51ea92299b7da90509a8f89eed1a","625e9d271b266066ae3694c7688b366e3c1ddc44","b9da7722efbe8409fdf59a7531cc18ab0bc6c5d4","e795b5874993eadc2f166c62c021ffb90a6ca9a9","a537e790b1d7fc007c91127a623897f7f774cb28","041d2dc711188fa7f4a57f7329b4dc9a37494fc7"],"is-negative-review":true,"negative-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"method":"discoverForUser","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Java language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"src/main/java/de/sventorben/keycloak/authentication/hidpd/discovery/email/EmailHomeIdpDiscoverer.java","refactoring-examples":[{"diff":"diff --git a/ComplexMethod.java b/ComplexMethod.java\nindex 842ae72ed1..540a630f78 100644\n--- a/ComplexMethod.java\n+++ b/ComplexMethod.java\n@@ -1,19 +1,19 @@\n public class ComplexMethod {\n \tpublic void postItem(Item a) throws ValidationException {\n \t\tif (a.isNew()) {\n-\t\t\t// Validate new object\n-\t\t\tif (a.getX() != null && a.getY() != null && a.getZ() != null) {\n-\t\t\t\tpost(a);\n-\t\t\t} else {\n-\t\t\t\tthrow new ValidationException(\"incomplete new object\");\n-\t\t\t}\n+\t\t\tpostNew(a);\n \t\t} else {\n-\t\t\t// Validate update\n-\t\t\tif (a.getX() < 10 && a.getY() > 25 && a.getZ() > 0) {\n-\t\t\t\tpost(a);\n-\t\t\t} else {\n-\t\t\t\tthrow new ValidationException(\"invalid update\");\n-\t\t\t}\n+\t\t\tpostUpdate(a);\n \t\t}\n \t}\n+\n+\tprivate void postNew(Item a) throws ValidationException {\n+\t\ta.ensureComplete();\n+\t\tpost(a);\n+\t}\n+\n+\tprivate void postUpdate(Item a) throws ValidationException {\n+\t\ta.ensureValidUpdate();\n+\t\tpost(a);\n+\t}\n }\n","language":"java","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":32,"what-changed":"discoverForUser has a cyclomatic complexity of 11, threshold = 9","how-to-fix":"There are many reasons for Complex Method. Sometimes, another design approach is beneficial such as a) modeling state using an explicit state machine rather than conditionals, or b) using table lookup rather than long chains of logic. In other scenarios, the function can be split using [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html). Just make sure you extract natural and cohesive functions. Complex Methods can also be addressed by identifying complex conditional expressions and then using the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring.","change-type":"introduced"}]},"positive-impact-count":1,"repo":"keycloak-home-idp-discovery","code-health":9.777582526343272,"version":"3.0","authors":["HadleySo"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"name":"String Heavy Function Arguments","file":"src/test/java/de/sventorben/keycloak/authentication/AuthenticatorConfig.java","change-type":"improved","change-level":"improvement","is-hotspot?":true,"why-it-occurs":"String is a generic type that fail to capture the constraints of the domain object it represents. In this module, 50 % of all function arguments are string types.","how-to-fix":"Heavy string usage indicates a missing domain language. Introduce data types that encapsulate the semantics. For example, a user_name is better represented as a constrained User type rather than a pure string, which could be anything.","what-changed":"The ratio of strings in function arguments decreases from 53.85% to 50.00%, threshold = 39.0%"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-07-19T20:58:39.000Z","project-name":"keycloak-home-idp-discovery","repository":"https://github.com/sventorben/keycloak-home-idp-discovery.git"}}