{"results":{"result":{"added-files":{"code-health":9.6882083290695,"old-code-health":0.0,"files":[{"file":"gama.core/src/gama/core/runtime/concurrent/WriteController.java","loc":98,"code-health":9.6882083290695}]},"external-review-url":"https://github.com/gama-platform/gama/pull/183","old-code-health":8.031382399394278,"modified-files":{"code-health":7.993407339303076,"old-code-health":8.031382399394278,"files":[{"file":"gama.core/src/gama/core/runtime/GAMA.java","loc":377,"old-loc":361,"code-health":7.438368311304707,"old-code-health":7.6694205073174455},{"file":"gama.core/src/gama/core/kernel/simulation/SimulationAgent.java","loc":591,"old-loc":589,"code-health":7.7403397140855175,"old-code-health":7.7403397140855175},{"file":"gama.core/src/gama/gaml/statements/save/CSVSaver.java","loc":106,"old-loc":128,"code-health":7.9087644186687704,"old-code-health":7.9087644186687704},{"file":"gama.core/src/gama/gaml/statements/save/TextSaver.java","loc":43,"old-loc":60,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"gama.core/src/gama/core/common/interfaces/IKeyword.java","loc":419,"old-loc":418,"code-health":10.0,"old-code-health":10.0},{"file":"gama.core/src/gama/gaml/statements/SaveStatement.java","loc":387,"old-loc":351,"code-health":5.876576303829549,"old-code-health":5.6498981617114525},{"file":"gama.headless/src/gama/headless/runtime/GamaHeadlessWebSocketServer.java","loc":143,"old-loc":143,"code-health":8.156697608179734,"old-code-health":8.156697608179734},{"file":"gama.core/src/gama/core/common/interfaces/ISaveDelegate.java","loc":22,"old-loc":21,"code-health":10.0,"old-code-health":10.0},{"file":"gama.core/src/gama/gaml/statements/save/ASCSaver.java","loc":119,"old-loc":118,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"gama.core/src/gama/gaml/statements/save/AbstractShapeSaver.java","loc":266,"old-loc":265,"code-health":6.3146784700660135,"old-code-health":6.3146784700660135},{"file":"gama.core/src/gama/gaml/statements/save/GeoTiffSaver.java","loc":90,"old-loc":89,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"gama.core/src/gama/gaml/statements/save/GraphSaver.java","loc":35,"old-loc":34,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"gama.core/src/gama/gaml/statements/save/JsonSaver.java","loc":30,"old-loc":29,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"gama.core/src/gama/gaml/statements/save/KmlSaver.java","loc":25,"old-loc":24,"code-health":9.6882083290695,"old-code-health":9.6882083290695},{"file":"gama.extension.image/src/gama/extension/image/ImageSaver.java","loc":119,"old-loc":118,"code-health":9.21744523236767,"old-code-health":9.21744523236767}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"183","analysis-time":"2024-05-29T16:53:41Z","negative-impact-count":6,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":3,"commits":["d1fd02d0f0de9beec0ef8d0a8e1fe712028e37ea","c145e147af0608a4f47af0f323eb198257b59d4a","115f6c9d0938ee60826512431e625fa5bc1d8942","ae19b0be10401143a15485ab035bb68f39b9ecda","624db55d72090365230d8dbc7eb1cdc1eb358710","c82dc680b5d05c3b5bcc0fac6745349b3c8f5d23","232cd7fbf5990d0066aa8f2b0318c1349d3634b0"],"is-negative-review":true,"negative-findings":{"number-of-types":2,"number-of-files-touched":3,"findings":[{"method":"askWriteFile","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/core/runtime/GAMA.java","refactoring-examples":null,"change-level":"warning","is-hotspot?":true,"line":106,"what-changed":"askWriteFile has 5 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"},{"method":"askWriteFile","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/core/runtime/GAMA.java","refactoring-examples":null,"change-level":"warning","is-hotspot?":true,"line":109,"what-changed":"askWriteFile has 5 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"},{"method":"askWrite","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/core/runtime/concurrent/WriteController.java","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":32,"what-changed":"askWrite has 5 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"},{"method":"appendWriteRequestToMap","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/core/runtime/concurrent/WriteController.java","refactoring-examples":null,"change-level":"warning","is-hotspot?":false,"line":45,"what-changed":"appendWriteRequestToMap has 5 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"},{"method":"SaveStatement.SaveValidator.validate","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":"gama.core/src/gama/gaml/statements/SaveStatement.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":241,"what-changed":"SaveStatement.SaveValidator.validate increases in cyclomatic complexity from 50 to 51, 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":"degraded"},{"method":"privateExecuteIn","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":"gama.core/src/gama/gaml/statements/SaveStatement.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":419,"what-changed":"privateExecuteIn increases in cyclomatic complexity from 30 to 31, 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":"degraded"}]},"positive-impact-count":5,"repo":"gama","code-health":8.051278592612173,"version":"3.0","authors":["Baptiste Lesquoy"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":4,"number-of-files-touched":4,"findings":[{"name":"Primitive Obsession","file":"gama.core/src/gama/core/runtime/GAMA.java","change-type":"improved","change-level":"improvement","is-hotspot?":true,"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 37 % of all functions have primitive types as arguments.","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","what-changed":"The ratio of primitive types in function arguments decreases from 40.00% to 36.84%, threshold = 30.0%"},{"method":"save","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":"gama.core/src/gama/gaml/statements/save/CSVSaver.java","change-level":"improvement","is-hotspot?":false,"line":99,"what-changed":"save decreases in cyclomatic complexity from 24 to 20, 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":"SaveStatement.SaveValidator.validate","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":"gama.core/src/gama/gaml/statements/SaveStatement.java","change-level":"improvement","is-hotspot?":false,"line":241,"what-changed":"SaveStatement.SaveValidator.validate decreases from 5 to 4 logical blocks with deeply nested code, threshold is one single block 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":"improved"},{"name":"Overall Code Complexity","file":"gama.core/src/gama/gaml/statements/SaveStatement.java","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Overall Code Complexity is measured by the mean cyclomatic complexity across all functions in the file. The lower the number, the better.\n\nCyclomatic complexity is a function level metric that measures the number of logical branches (if-else, loops, etc.). Cyclomatic complexity is a rough complexity measure, but useful as a way of estimating the minimum number of unit tests you would need. As such, prefer functions with low cyclomatic complexity (2-3 branches).","how-to-fix":"You address the overall cyclomatic complexity by a) modularizing the code, and b) abstract away the complexity. Let's look at some examples:\n\nModularizing the Code: Do an X-Ray and inspect the local hotspots. Are there any complex conditional expressions? If yes, then do a [DECOMPOSE CONDITIONAL](https://refactoring.com/catalog/decomposeConditional.html) refactoring. Extract the conditional logic into a separate function and put a good name on that function. This clarifies the intent and makes the original function easier to read. Repeat until all complex conditional expressions have been simplified.\n\n","what-changed":"The mean cyclomatic complexity decreases from 13.43 to 12.38, threshold = 4"},{"name":"Primitive Obsession","file":"gama.core/src/gama/gaml/statements/save/AbstractShapeSaver.java","change-type":"improved","change-level":"improvement","is-hotspot?":false,"why-it-occurs":"Code that uses a high degree of built-in, primitives such as integers, strings, floats, lacks a domain language that encapsulates the validation and semantics of function arguments. Primitive Obsession has several consequences: 1) In a statically typed language, the compiler will detect less erroneous assignments. 2) Security impact since the possible value range of a variable/argument isn't retricted.\n\nIn this module, 37 % of all functions have primitive types as arguments.","how-to-fix":"Primitive Obsession indicates a missing domain language. Introduce data types that encapsulate the details and constraints of your domain. For example, instead of `int userId`, consider `User clicked`.","what-changed":"The ratio of primitive types in function arguments decreases from 37.84% to 36.84%, threshold = 30.0%"}]},"notices":{"number-of-types":2,"number-of-files-touched":9,"findings":[{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/CSVSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":78,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/CSVSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":99,"what-changed":"save has 5 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/TextSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":60,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/ASCSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":57,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"why-it-occurs":"This code health issue is measured as the average number of function arguments across the whole file. A function with many arguments can be simplified either by a) splitting the function if it has too many responsibilities, or b) by introducing an abstraction (class, record, struct, etc.) which encapsulates the arguments. ","name":"Missing Arguments Abstractions","file":"gama.core/src/gama/gaml/statements/save/AbstractShapeSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"what-changed":"The average number of function arguments increases from 4.11 to 4.22, threshold = 4.00","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/AbstractShapeSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":97,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/GeoTiffSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":64,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/GraphSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":47,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/JsonSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":34,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.core/src/gama/gaml/statements/save/KmlSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":38,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"},{"method":"save","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Java language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"gama.extension.image/src/gama/extension/image/ImageSaver.java","refactoring-examples":null,"change-level":"notice","is-hotspot?":false,"line":62,"what-changed":"save increases from 7 to 8 arguments, threshold = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"degraded"}]},"external-review-provider":"GitHub"},"analysistime":"2024-05-29T16:53:41.000Z","project-name":"gama","repository":"https://github.com/gama-platform/gama.git"}}