{"results":{"result":{"added-files":{"code-health":9.702421211991156,"old-code-health":0.0,"files":[{"file":"src/mips/tests/psyqo/psyqo-tests.cpp","loc":20,"code-health":10.0},{"file":"src/mips/tests/psyqo/test-adler32.cpp","loc":53,"code-health":10.0},{"file":"src/mips/tests/psyqo/test-bezier.cpp","loc":84,"code-health":10.0},{"file":"src/mips/tests/psyqo/test-fixed-point.cpp","loc":183,"code-health":10.0},{"file":"src/mips/tests/psyqo/test-msf.cpp","loc":125,"code-health":10.0},{"file":"src/mips/tests/psyqo/test-primitives.cpp","loc":62,"code-health":10.0},{"file":"src/mips/tests/psyqo/test-soft-math.cpp","loc":158,"code-health":10.0},{"file":"src/mips/tests/psyqo/test-trigonometry.cpp","loc":74,"code-health":10.0},{"file":"src/mips/tests/psyqo/test-vector.cpp","loc":133,"code-health":9.387218218812514},{"file":"tests/pcsxrunner/psyqo.cc","loc":14,"code-health":10.0},{"file":"third_party/arith64/arith64.c","loc":197,"code-health":8.747566364082143}]},"external-review-url":"https://github.com/grumpycoders/pcsx-redux/pull/2008","old-code-health":9.842730062691357,"modified-files":{"code-health":9.842730062691357,"old-code-health":9.842730062691357,"files":[{"file":"src/mips/common/crt0/cxxglue.c","loc":103,"old-loc":100,"code-health":9.842730062691357,"old-code-health":9.842730062691357}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"2008","analysis-time":"2026-04-17T03:52:14Z","negative-impact-count":4,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["2347a7508f0a0c29c615fee1d8c3ed111c095502","820d237107e554f55f1cd20843ac609c8b7eee3c","b5b7b17eeb866f6649aea196e2830c6cc36521f2","45ac260885dfdb03bcca218d93cfabbab25379de"],"is-negative-review":true,"negative-findings":{"number-of-types":3,"number-of-files-touched":2,"findings":[{"why-it-occurs":"Duplicated code often leads to code that's harder to change since the same logical change has to be done in multiple functions. More duplication gives lower code health.","name":"Code Duplication","file":"src/mips/tests/psyqo/test-vector.cpp","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":98,"what-changed":"The module contains 2 functions with similar structure: TEST_CASE,TEST_CASE","how-to-fix":"A certain degree of duplicated code might be acceptable. The problems start when it is the same behavior that is duplicated across the functions in the module, ie. a violation of the Don't Repeat Yourself (DRY) principle. DRY violations lead to code that is changed together in predictable patterns, which is both expensive and risky. DRY violations can be identified using CodeScene's X-Ray analysis to detect clusters of change coupled functions with high code similarity. [Read More](https://codescene.com/blog/software-revolution-part3/)\n\nOnce you have identified the similarities across functions, look to extract and encapsulate the concept that varies into its own function(s). These shared abstractions can then be re-used, which minimizes the amount of duplication and simplifies change.","change-type":"introduced"},{"why-it-occurs":"Duplicated code often leads to code that's harder to change since the same logical change has to be done in multiple functions. More duplication gives lower code health.","name":"Code Duplication","file":"third_party/arith64/arith64.c","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":63,"what-changed":"The module contains 5 functions with similar structure: __ashldi3,__ashrdi3,__clzdi2,__ctzdi2 and 1 more functions","how-to-fix":"A certain degree of duplicated code might be acceptable. The problems start when it is the same behavior that is duplicated across the functions in the module, ie. a violation of the Don't Repeat Yourself (DRY) principle. DRY violations lead to code that is changed together in predictable patterns, which is both expensive and risky. DRY violations can be identified using CodeScene's X-Ray analysis to detect clusters of change coupled functions with high code similarity. [Read More](https://codescene.com/blog/software-revolution-part3/)\n\nOnce you have identified the similarities across functions, look to extract and encapsulate the concept that varies into its own function(s). These shared abstractions can then be re-used, which minimizes the amount of duplication and simplifies change.","change-type":"introduced"},{"method":"__divmoddi4","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the C language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"third_party/arith64/arith64.c","refactoring-examples":[{"diff":"diff --git a/complex_method.js b/complex_method.js\nindex 10cce78e6d..0c1a8cabaf 100644\n--- a/complex_method.js\n+++ b/complex_method.js\n@@ -1,15 +1,20 @@\n function postItem(item) {\n   if (!item.id) {\n-    if (item.x != null && item.y != null) {\n-      post(item);\n-    } else {\n-      throw Error(\"Item must have x and y\");\n-    }\n+    // extract a separate function for creating new item\n+    postNew(item);\n   } else {\n-    if (item.x < 10 && item.y > 25) {\n-      put(item);\n-    } else {\n-      throw Error(\"Item must have an x and y value between 10 and 25\");\n-    }\n+    // and one for updating existing items\n+    updateItem(item);\n   }\n }\n+\n+function postNew(item) {\n+  validateNew(item);\n+  post(item);\n+}\n+\n+function updateItem(item) {\n+  validateUpdate(item);\n+  put(item);\n+}\n+\n","language":"c","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":149,"what-changed":"__divmoddi4 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"},{"method":"__divmoddi4","why-it-occurs":"A Bumpy Road is a function that contains multiple chunks of nested conditional logic inside the same function. The deeper the nesting and the more bumps, the lower the code health.\n\nA bumpy code road represents a lack of encapsulation which becomes an obstacle to comprehension. In imperative languages there’s also an increased risk for feature entanglement, which leads to complex state management. CodeScene considers the following rules for the code health impact: 1) The deeper the nested conditional logic of each bump, the higher the tax on our working memory. 2) The more bumps inside a function, the more expensive it is to refactor as each bump represents a missing abstraction. 3) The larger each bump – that is, the more lines of code it spans – the harder it is to build up a mental model of the function. The nesting depth for what is considered a bump is  levels of conditionals.","name":"Bumpy Road Ahead","file":"third_party/arith64/arith64.c","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":149,"what-changed":"__divmoddi4 has 4 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is 2 blocks per function","how-to-fix":"Bumpy Road implementations indicate a lack of encapsulation. Check out the detailed description of the [Bumpy Road code health issue](https://codescene.com/blog/bumpy-road-code-complexity-in-context/).\n\nA Bumpy Road often suggests that the function/method does too many things. The first refactoring step is to identify the different possible responsibilities of the function. Consider extracting those responsibilities into smaller, cohesive, and well-named functions. The [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html) refactoring is the primary response.","change-type":"introduced"}]},"positive-impact-count":0,"repo":"pcsx-redux","code-health":9.714404472042666,"version":"3.0","authors":["Nicolas 'Pixel' Noble","Nicolas \"Pixel\" Noble"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-04-17T03:52:14.000Z","project-name":"pcsx-redux","repository":"https://github.com/grumpycoders/pcsx-redux.git"}}