{"results":{"result":{"added-files":{"code-health":10.0,"old-code-health":0.0,"files":[{"file":"tests/load_data/test_cxr.py","loc":92,"code-health":10.0},{"file":"tests/load_data/test_ecg.py","loc":168,"code-health":10.0},{"file":"tests/load_data/test_echo.py","loc":119,"code-health":10.0},{"file":"tests/load_data/test_ehr.py","loc":129,"code-health":10.0},{"file":"tests/load_data/test_molecule.py","loc":61,"code-health":10.0},{"file":"tests/load_data/test_protein.py","loc":68,"code-health":10.0},{"file":"tests/load_data/test_supervised_labels.py","loc":70,"code-health":10.0},{"file":"tests/load_data/test_tabular.py","loc":105,"code-health":10.0},{"file":"tests/load_data/test_text.py","loc":111,"code-health":10.0},{"file":"tests/test_dataset.py","loc":69,"code-health":10.0}]},"external-review-url":"https://github.com/pykale/mmai-hackathon/pull/4","old-code-health":9.536395545562794,"modified-files":{"code-health":9.119947480218402,"old-code-health":9.536395545562794,"files":[{"file":"mmai25_hackathon/load_data/tabular.py","loc":256,"old-loc":183,"code-health":7.777037320014901,"old-code-health":8.612182000040617},{"file":"mmai25_hackathon/load_data/ehr.py","loc":226,"old-loc":152,"code-health":7.589947037113211,"old-code-health":9.536386775820924},{"file":"mmai25_hackathon/load_data/cxr.py","loc":141,"old-loc":52,"code-health":9.636288422716657,"old-code-health":9.458490982776196},{"file":"mmai25_hackathon/load_data/ecg.py","loc":139,"old-loc":46,"code-health":10.0,"old-code-health":10.0},{"file":"mmai25_hackathon/load_data/echo.py","loc":140,"old-loc":82,"code-health":10.0,"old-code-health":10.0},{"file":"mmai25_hackathon/load_data/molecule.py","loc":119,"old-loc":74,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"mmai25_hackathon/load_data/protein.py","loc":123,"old-loc":74,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"mmai25_hackathon/load_data/supervised_labels.py","loc":119,"old-loc":80,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"mmai25_hackathon/load_data/text.py","loc":187,"old-loc":113,"code-health":9.532775845509098,"old-code-health":9.325347368221317},{"file":"mmai25_hackathon/dataset.py","loc":101,"old-loc":69,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"4","analysis-time":"2025-09-12T14:15:53Z","negative-impact-count":8,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":1,"commits":["74324fe5bffb63f752a431cfb1e49ac21150aa49","38e64299ab798ccc7461e0151c2915f033fd2fce","d7350e7275ff94b305d49fc653ba67180b0c50e2","97e7a146125a3753a0e8d4506923b49840076eec","1ca9143da270e65ff6ec4c897186ff64526afcaf","b76932ec58bd6540d013940ce08d354286e344ad","6b25e1df3153332abe5cddacc8ed82606d14e997","700249b6c4a25294f70f94ce49de45cc068898c5","fb7c8f4988ad3cb602f2ac668a8f0359e43f788a","4c036c303306d352579cf66767fd41411b0c0b7b","03804195e839c8f6a347d06e8d72f24f858a6b59","6c356ff709dade28f431eae48e4455155ead27e3","bbfe351bda11d989bdbb615322da4c46e384c386","b4bf0377bdc9585c632d6cfc70e3c450e4aad8dd","9bbd77621ccea374d377baf09de627ff778e00df","7e761d979ae4aca2ec1cbe7dc48da4daa24080e9","07970c0b418d73c1e44cbf8b9b88b81adc06f6e6","8184c64dfbde36e0e5a665da019ccc0d125b7ac9","fdf338f6a70fcf924337b65f479124e6fc155d25","799b4a48d68e1a96cc2f40180f49f3de45cddfe8","63fe37e6e77b8fead169903b53fdd49231c1e578","db5cf20ec9e9dd5029e468690c36128534058574","c6aa21e90ac28acacdf44f9d9b642aae6d14cace","2205919e9c05c80bfa4f603518f08e6c6dff7323","ea838c8a73f212e179181fa5dd070dc20a4151de","ace563dc90cee9962c9a0fe350d93273b5216b18","e8faaf22db96c2eeb21e5cedbbfca776654aba23","9c9dda2dcc6e6ef763746d27a6c7270b008cc068","ad78ad77adc2e2db2a2b21fc5adc6939aaccbbe7","ff60d06069f3ee3e8e33e38e71ef130a1fafef4d","8b500ffdc3d62b658c135c0a85cac7705b622599","98cdcc91111b5aff665a95de808b36218ab6ba6a","cfeb7954a8f5ab891edf30541841917ff2e8be74","4b58859040f40b5f2060c8c4dbf011907c227374","150b5547afd5d278104e3969495272bd0900e4ca","ba08515e3cf8ca072bbeb5dacbb957082b744616","c422248f5b15254b12556d5b8005e8d947a5bfcb","afaef7aecd2de656a67406a63c19fe4be9fb1181","db5c4543f606a6401cac189aa8ac076fcaa19222","fda48e3b942f402a66cb4d0815dd0b8f5bf97984","1840157c802554a0e4b24058f63f40d664a39772","7451568f60e5f308f424abc6b5dae027aef3ec2c","f865f1f92dd8ee782ec9365bfc996f9b5bdf26d0","48ebd79020c07dbf02ae38709a5db2422b58f29a","30a5f30e1b5d2061338b8a9a11447428ebdee844","fdca46e62eb25e30dd112a77cdb47ed9b100cd7a"],"is-negative-review":true,"negative-findings":{"number-of-types":4,"number-of-files-touched":5,"findings":[{"method":"read_tabular","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/tabular.py","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":"python","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":41,"what-changed":"read_tabular has a cyclomatic complexity of 16, 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":"read_tabular","why-it-occurs":"A complex conditional is an expression inside a branch such as an <code>if</code>-statmeent which consists of multiple, logical operations. Example: <code>if (x.started() && y.running())</code>.Complex conditionals make the code even harder to read, and contribute to the Complex Method code smell. Encapsulate them.","name":"Complex Conditional","file":"mmai25_hackathon/load_data/tabular.py","refactoring-examples":[{"diff":"diff --git a/complex_conditional.js b/complex_conditional.js\nindex c43da09584..94259ce874 100644\n--- a/complex_conditional.js\n+++ b/complex_conditional.js\n@@ -1,16 +1,34 @@\n function messageReceived(message, timeReceived) {\n-   // Ignore all messages which aren't from known customers:\n-   if (!message.sender &&\n-       customers.getId(message.name) == null) {\n+   // Refactoring #1: encapsulate the business rule in a\n+   // function. A clear name replaces the need for the comment:\n+   if (!knownCustomer(message)) {\n      log('spam received -- ignoring');\n      return;\n    }\n \n-  // Provide an auto-reply when outside business hours:\n-  if ((timeReceived.getHours() > 17) ||\n-      (timeReceived.getHours() < 8)) {\n+  // Refactoring #2: encapsulate the business rule.\n+  // Again, note how a clear function name replaces the\n+  // need for a code comment:\n+  if (outsideBusinessHours(timeReceived)) {\n     return autoReplyTo(message);\n   }\n \n   pingAgentFor(message);\n+}\n+\n+function outsideBusinessHours(timeReceived) {\n+  // Refactoring #3: replace magic numbers with\n+  // symbols that communicate with the code reader:\n+  const closingHour = 17;\n+  const openingHour = 8;\n+\n+  const hours = timeReceived.getHours();\n+\n+  // Refactoring #4: simple conditional rules can\n+  // be further clarified by introducing a variable:\n+  const afterClosing = hours > closingHour;\n+  const beforeOpening = hours < openingHour;\n+\n+  // Yeah -- look how clear the business rule is now!\n+  return afterClosing || beforeOpening;\n }\n\\ No newline at end of file\n","language":"python","improvement-type":"Complex Conditional"}],"change-level":"warning","is-hotspot?":false,"line":111,"what-changed":"read_tabular has 2 complex conditionals with 4 branches, threshold = 2","how-to-fix":"Apply the [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring so that the complex conditional is encapsulated in a separate function with a good name that captures the business rule. Optionally, for simple expressions, introduce a new variable which holds the result of the complex conditional.","change-type":"introduced"},{"method":"load_mimic_iv_ehr","why-it-occurs":"A Brain Method is a large and complex function that centralizes the behavior of the module. The more complex the brain method, the lower the code health. Brain Methods are detected using a combination of: Deeply Nested Logic + High Cyclomatic Complexity + Many Lines of Code + Accesses Many Arguments as described in Object-Oriented Metrics in Practice, by Lanza and Marinescu.\n\nThe complexity and accumulated behavior make Brain Methods hard to understand and extend. Research on Brain Methods show that developers categorize them as very severe for maintenance (see F. Palomba, et. al. (2014). Do They Really Smell Bad? A Study on Developers Perception of Bad Code Smells).\n\nSeverity: Brain Method - Complex Method - Long Method.","name":"Brain Method","file":"mmai25_hackathon/load_data/ehr.py","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":88,"what-changed":"load_mimic_iv_ehr is a brain method","how-to-fix":"A Brain Method lacks modularity and violates the Single Responsibility Principle. Refactor by identifying the different responsibilities of the brain method and extract them into separate well-named and cohesive functions. Often, a brain method can -- and should -- be extracted to a new class that encapsulates the responsibilities and can be tested in isolation.","change-type":"introduced"},{"method":"load_mimic_iv_ehr","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/ehr.py","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":"python","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":88,"what-changed":"load_mimic_iv_ehr has a cyclomatic complexity of 26, 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":"load_mimic_iv_ehr","why-it-occurs":"Deep nested logic means that you have control structures like if-statements or loops inside other control structures. Deep nested logic increases the cognitive load on the programmer reading the code. The human working memory has a maximum capacity of 3-4 items; beyond that threshold, we struggle with keeping things in our head. Consequently, deep nested logic has a strong correlation to defects and accounts for roughly 20% of all programming mistakes.\n\nCodeScene measures the maximum nesting depth inside each function. The deeper the nesting, the lower the code health. The threshold for the Python language is 4 levels of nesting.","name":"Deep, Nested Complexity","file":"mmai25_hackathon/load_data/ehr.py","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":88,"what-changed":"load_mimic_iv_ehr has a nested complexity depth of 4, threshold = 4","how-to-fix":"Occassionally, it's possible to get rid of the nested logic by [Replacing Conditionals with Guard Clauses](https://refactoring.com/catalog/replaceNestedConditionalWithGuardClauses.html).\n\nAnother viable strategy is to identify smaller building blocks inside the nested chunks of logic and extract those responsibilities into smaller, cohesive, and well-named functions. The [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html) refactoring explains the steps.","change-type":"introduced"},{"method":"fetch_smiles_from_dataframe","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/molecule.py","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":"python","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":37,"what-changed":"fetch_smiles_from_dataframe has a cyclomatic complexity of 9, 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":"fetch_protein_sequences_from_dataframe","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/protein.py","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":"python","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":41,"what-changed":"fetch_protein_sequences_from_dataframe has a cyclomatic complexity of 9, 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":"fetch_supervised_labels_from_dataframe","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/supervised_labels.py","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":"python","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":40,"what-changed":"fetch_supervised_labels_from_dataframe 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":7,"repo":"mmai-hackathon","code-health":9.463247558717555,"version":"3.0","authors":["L. M. Riza Rizky"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":2,"number-of-files-touched":4,"findings":[{"method":"merge_multiple_dataframes","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/tabular.py","change-level":"improvement","is-hotspot?":false,"line":149,"what-changed":"merge_multiple_dataframes decreases in cyclomatic complexity from 25 to 24, 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":"improved"},{"method":"get_tabular_mimic","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/ehr.py","change-level":"improvement","is-hotspot?":false,"line":79,"what-changed":"get_tabular_mimic is no longer above the threshold for cyclomatic complexity","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":"fixed"},{"method":"merge_tables","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":"mmai25_hackathon/load_data/ehr.py","change-level":"improvement","is-hotspot?":false,"line":141,"what-changed":"merge_tables is no longer above the threshold for logical blocks with deeply nested code","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":"fixed"},{"method":"get_cxr_paths","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/cxr.py","change-level":"improvement","is-hotspot?":false,"line":17,"what-changed":"get_cxr_paths is no longer above the threshold for cyclomatic complexity","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":"fixed"},{"method":"get_cxr_paths","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":"mmai25_hackathon/load_data/cxr.py","change-level":"improvement","is-hotspot?":false,"line":17,"what-changed":"get_cxr_paths is no longer above the threshold for logical blocks with deeply nested code","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":"fixed"},{"method":"get_text_notes","why-it-occurs":"A Complex Method has a high cyclomatic complexity. The recommended threshold for the Python language is a cyclomatic complexity lower than 9.","name":"Complex Method","file":"mmai25_hackathon/load_data/text.py","change-level":"improvement","is-hotspot?":false,"line":16,"what-changed":"get_text_notes is no longer above the threshold for cyclomatic complexity","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":"fixed"},{"method":"get_text_notes","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":"mmai25_hackathon/load_data/text.py","change-level":"improvement","is-hotspot?":false,"line":16,"what-changed":"get_text_notes is no longer above the threshold for logical blocks with deeply nested code","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":"fixed"}]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2025-09-12T14:15:53.000Z","project-name":"mmai-hackathon","repository":"https://github.com/pykale/mmai-hackathon.git"}}