{"results":{"result":{"added-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-url":"https://github.com/autowarefoundation/autoware_universe/pull/12085","old-code-health":4.932177737904592,"modified-files":{"code-health":4.92641887270523,"old-code-health":4.932177737904592,"files":[{"file":"planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/parking_departure/geometric_parallel_parking.cpp","loc":489,"old-loc":485,"code-health":6.802358805704002,"old-code-health":6.802358805704002},{"file":"planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/parking_departure/utils.cpp","loc":100,"old-loc":99,"code-health":9.536386775820924,"old-code-health":9.536386775820924},{"file":"planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/path_utils.cpp","loc":421,"old-loc":419,"code-health":8.207341892489644,"old-code-health":8.207341892489644},{"file":"planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp","loc":1436,"old-loc":1413,"code-health":3.8841859078057213,"old-code-health":3.8933525576472006},{"file":"planning/behavior_path_planner/autoware_behavior_path_avoidance_by_lane_change_module/src/scene.cpp","loc":255,"old-loc":254,"code-health":10.0,"old-code-health":10.0},{"file":"planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp","loc":1656,"old-loc":1648,"code-health":5.001692734171014,"old-code-health":5.011864192893678},{"file":"planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/calculation.cpp","loc":439,"old-loc":438,"code-health":8.545379580978913,"old-code-health":8.545379580978913},{"file":"planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/path.cpp","loc":644,"old-loc":640,"code-health":7.005926241130704,"old-code-health":7.005926241130704},{"file":"planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/utils.cpp","loc":1193,"old-loc":1179,"code-health":5.761049220503568,"old-code-health":5.761049220503568},{"file":"planning/behavior_path_planner/autoware_behavior_path_sampling_planner_module/src/sampling_planner_module.cpp","loc":828,"old-loc":825,"code-health":5.8600982042971745,"old-code-health":5.866270956496187},{"file":"planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/utils.cpp","loc":2292,"old-loc":2283,"code-health":2.9874440589610964,"old-code-health":2.9874440589610964},{"file":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/examples/plot_map_case1.cpp","loc":567,"old-loc":564,"code-health":7.1291446299198125,"old-code-health":7.13303567121121},{"file":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/examples/plot_map_case2.cpp","loc":567,"old-loc":564,"code-health":6.9168094915267675,"old-code-health":6.920565733455287},{"file":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp","loc":2267,"old-loc":2257,"code-health":2.836907435907917,"old-code-health":2.8486022752127234},{"file":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_searcher.cpp","loc":558,"old-loc":544,"code-health":7.510961439587471,"old-code-health":7.5316548711331075},{"file":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/pull_over_planner/bezier_pull_over.cpp","loc":355,"old-loc":349,"code-health":8.783707840159959,"old-code-health":8.793593833748389},{"file":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/pull_over_planner/shift_pull_over.cpp","loc":263,"old-loc":258,"code-health":9.193143972244572,"old-code-health":9.203549985733513},{"file":"planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/clothoid_pull_out.cpp","loc":983,"old-loc":984,"code-health":4.211178635866886,"old-code-health":4.211178635866886},{"file":"planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/start_planner_module.cpp","loc":1883,"old-loc":1874,"code-health":4.377947571841709,"old-code-health":4.395141455932787},{"file":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/util.cpp","loc":1065,"old-loc":1058,"code-health":5.874857231650543,"old-code-health":5.874857231650543},{"file":"planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp","loc":1479,"old-loc":1475,"code-health":2.80977876705403,"old-code-health":2.862209072535805},{"file":"planning/behavior_path_planner/autoware_behavior_path_planner_common/src/turn_signal_decider.cpp","loc":922,"old-loc":920,"code-health":4.219340774520589,"old-code-health":4.219340774520589}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"12085","analysis-time":"2026-02-20T06:00:53Z","negative-impact-count":18,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":7,"commits":["0d6cd9e5d0c8a7548e501ec4dd36a61106c55b2b","60b317291cfecfe84a0ffff7035168448eb3f30a","3c13e15b34aa67df446aec0f0336b87b13cc6a44","5b66d8de8cfff853e2a2104c33d4346383364107","8e8ba5bd039ffd77fc0472cee9e07dce2f43b2ef","2c5d57434e7349a19cd9e55e1b383179d377a96a","9f5e493b95c480760ce3a182b521166e726acc5a","63d3b4512ce33c39f0b6406db93bc3807a028da8","9329cf1ae980639b3e19bd32713ecc5ce90d52f0","835ccb9c8f93953fc5fac54553a4180b917a9038","a2a1a1d2fc7ea5f814a98d20af00e7fceb3d82a7","cf5d6b1cd03759161a7c5f1a84368368e70cc731","a2e9029258f8e2114c0cacfa58477dbc45f4f7a5","d3fc9e621c9d78a59cce696195c6fd14c3604bbe","79d66e3dde70b26943e0d64c592a1264c89904e7","46af4fcff10de7a5f9bd51fef0bc9d653619dc52","9251a82312dc1ff0fc17064efbc772ab18504618","af129819df5f38ac3179d51ae9dce52b394ec0a1","306452b16f7874d057a3d8b1cdea30d661864f17","3dff694ed0b5c3d401a04d9b58971f7627c6f2c5","e168db4606d4bd01e2bdf0e25fd12ccbce74419d","ce6832fe8c93a29ba67882f4a41db94295cf4d7a"],"is-negative-review":true,"negative-findings":{"number-of-types":2,"number-of-files-touched":11,"findings":[{"method":"getSignedDistanceFromBoundary","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":"planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":990,"what-changed":"getSignedDistanceFromBoundary increases in cyclomatic complexity from 16 to 17, 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":"NormalLaneChange::get_path_using_path_shifter","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":"planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":1248,"what-changed":"NormalLaneChange::get_path_using_path_shifter already has high cyclomatic complexity, and now it increases in Lines of Code from 95 to 96","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":"NormalLaneChange::calcAbortPath","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":"planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":1624,"what-changed":"NormalLaneChange::calcAbortPath already has high cyclomatic complexity, and now it increases in Lines of Code from 113 to 114","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":"NormalLaneChange::compute_terminal_lane_change_path","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":"planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":1422,"what-changed":"NormalLaneChange::compute_terminal_lane_change_path already has high cyclomatic complexity, and now it increases in Lines of Code from 73 to 74","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":"NormalLaneChange::update_transient_data","why-it-occurs":"Overly long functions make the code harder to read. The recommended maximum function length for the C++ language is 70 lines of code. Severity: Brain Method - Complex Method - Long Method.","name":"Large Method","file":"planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp","refactoring-examples":null,"change-level":"warning","is-hotspot?":true,"line":151,"what-changed":"NormalLaneChange::update_transient_data increases from 76 to 77 lines of code, threshold = 70","how-to-fix":"We recommend to be careful here -- just splitting long functions don't necessarily make the code easier to read. Instead, look for natural chunks inside the functions that expresses a specific task or concern. Often, such concerns are indicated by a Code Comment followed by an if-statement. Use the [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html) refactoring to encapsulate that concern.","change-type":"degraded"},{"method":"SamplingPlannerModule::plan","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":"planning/behavior_path_planner/autoware_behavior_path_sampling_planner_module/src/sampling_planner_module.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":407,"what-changed":"SamplingPlannerModule::plan already has high cyclomatic complexity, and now it increases in Lines of Code from 247 to 249","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":"selectPullOverPaths","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/examples/plot_map_case1.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":288,"what-changed":"selectPullOverPaths already has high cyclomatic complexity, and now it increases in Lines of Code from 121 to 122","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":"selectPullOverPaths","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/examples/plot_map_case2.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":287,"what-changed":"selectPullOverPaths already has high cyclomatic complexity, and now it increases in Lines of Code from 130 to 131","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":"GoalPlannerModule::generateStopPath","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":1876,"what-changed":"GoalPlannerModule::generateStopPath already has high cyclomatic complexity, and now it increases in Lines of Code from 95 to 98","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":"GoalPlannerModule::selectPullOverPath","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":1254,"what-changed":"GoalPlannerModule::selectPullOverPath already has high cyclomatic complexity, and now it increases in Lines of Code from 89 to 90","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":"GoalPlannerModule::isSafePath","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":2549,"what-changed":"GoalPlannerModule::isSafePath increases in cyclomatic complexity from 11 to 12, 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":"GoalPlannerModule::calcTurnSignalInfo","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":2123,"what-changed":"GoalPlannerModule::calcTurnSignalInfo already has high cyclomatic complexity, and now it increases in Lines of Code from 70 to 71","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":"GoalSearcher::search","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_searcher.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":293,"what-changed":"GoalSearcher::search increases in cyclomatic complexity from 18 to 19, 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":"BezierPullOver::generateBezierPath","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/pull_over_planner/bezier_pull_over.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":127,"what-changed":"BezierPullOver::generateBezierPath already has high cyclomatic complexity, and now it increases in Lines of Code from 199 to 201","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":"ShiftPullOver::generatePullOverPath","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":"planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/pull_over_planner/shift_pull_over.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":117,"what-changed":"ShiftPullOver::generatePullOverPath already has high cyclomatic complexity, and now it increases in Lines of Code from 146 to 148","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":"StartPlannerModule::planWaitingApproval","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":"planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/start_planner_module.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":true,"line":989,"what-changed":"StartPlannerModule::planWaitingApproval already has high cyclomatic complexity, and now it increases in Lines of Code from 110 to 114","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":"StartPlannerModule::plan","why-it-occurs":"Overly long functions make the code harder to read. The recommended maximum function length for the C++ language is 70 lines of code. Severity: Brain Method - Complex Method - Long Method.","name":"Large Method","file":"planning/behavior_path_planner/autoware_behavior_path_start_planner_module/src/start_planner_module.cpp","refactoring-examples":null,"change-level":"warning","is-hotspot?":true,"line":849,"what-changed":"StartPlannerModule::plan increases from 84 to 88 lines of code, threshold = 70","how-to-fix":"We recommend to be careful here -- just splitting long functions don't necessarily make the code easier to read. Instead, look for natural chunks inside the functions that expresses a specific task or concern. Often, such concerns are indicated by a Code Comment followed by an if-statement. Use the [EXTRACT FUNCTION](https://refactoring.com/catalog/extractFunction.html) refactoring to encapsulate that concern.","change-type":"degraded"},{"method":"expandLanelets","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":"planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp","refactoring-examples":[{"architectural-component-id":null,"author-name":"Taekjin LEE","training-data":{"loc-added":"11","loc-deleted":"14","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"taekjin.lee@tier4.jp","commit-full-message":"* feat(tracker_processor): set existence probability for tracked objects\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* refactor(tracker): rename classification parameter for clarity in updateClassification method\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): ensure minimum covariance values to prevent large Mahalanobis distance\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* feat(tracker): disable trust in existence probability for input channels\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(tracker): update decay rate for existence probability to reflect a 0.5s half-life\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* style(pre-commit): autofix\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n* fix(association): correct spelling of \"mahalanobis\" in comment for clarity\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\n\n---------\n\nSigned-off-by: Taekjin LEE <taekjin.lee@tier4.jp>\nCo-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>","commit-date":"2025-08-04T07:38:26Z","current-rev":"47a0fb82f4","filename":"autoware_universe/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp","previous-rev":"70be106253","commit-title":"fix(autoware_multi_object_tracker): existence probability adjustment to mitigate tracker lost  (#11109)","language":"C++","id":"410ebd13723902158abcb4c2d1698bc1c3c4c442","model-score":0.54,"author-id":null,"project-id":29372,"delta-file-score":0.31179166,"diff":"diff --git a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\nindex 094c9537a9..7c34b30b36 100644\n--- a/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n+++ b/perception/autoware_multi_object_tracker/lib/tracker/model/tracker_base.cpp\n@@ -46,3 +46,3 @@ float decayProbability(const float & prior, const float & delta_time)\n   constexpr float minimum_probability = 0.001;\n-  const float decay_rate = log(0.5f) / 0.3f;  // half-life (50% decay) of 0.3s\n+  const float decay_rate = log(0.5f) / 0.5f;  // half-life (50% decay) of 0.5s\n   return std::max(prior * std::exp(decay_rate * delta_time), minimum_probability);\n@@ -135,7 +135,4 @@ bool Tracker::updateWithMeasurement(\n     // update total existence probability\n-    const double existence_probability = channel_info.trust_existence_probability\n-                                           ? object.existence_probability\n-                                           : types::default_existence_probability;\n     total_existence_probability_ = updateProbability(\n-      total_existence_probability_, existence_probability * probability_true_detection,\n+      total_existence_probability_, object.existence_probability * probability_true_detection,\n       probability_false_detection);\n@@ -195,3 +192,3 @@ bool Tracker::updateWithoutMeasurement(const rclcpp::Time & timestamp)\n void Tracker::updateClassification(\n-  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & classification)\n+  const std::vector<autoware_perception_msgs::msg::ObjectClassification> & input)\n {\n@@ -223,6 +220,6 @@ void Tracker::updateClassification(\n   // Normalize the input\n-  auto classification_input = classification;\n+  auto classification_input = input;\n   normalizeProbabilities(classification_input);\n \n-  auto & classification_ = object_.classification;\n+  auto & classification = object_.classification;\n \n@@ -231,3 +228,3 @@ void Tracker::updateClassification(\n     bool found = false;\n-    for (auto & old_class : classification_) {\n+    for (auto & old_class : classification) {\n       if (new_class.label == old_class.label) {\n@@ -242,3 +239,3 @@ void Tracker::updateClassification(\n       adding_class.probability *= gain;\n-      classification_.push_back(adding_class);\n+      classification.push_back(adding_class);\n     }\n@@ -247,10 +244,10 @@ void Tracker::updateClassification(\n   // If the probability is less than the threshold, remove the class\n-  classification_.erase(\n+  classification.erase(\n     std::remove_if(\n-      classification_.begin(), classification_.end(),\n+      classification.begin(), classification.end(),\n       [remove_threshold](const auto & a_class) { return a_class.probability < remove_threshold; }),\n-    classification_.end());\n+    classification.end());\n \n   // Normalize tracking classification\n-  normalizeProbabilities(classification_);\n+  normalizeProbabilities(classification);\n }\n","improvement-type":"Complex Method"}],"change-level":"warning","is-hotspot?":false,"line":992,"what-changed":"expandLanelets 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"}]},"positive-impact-count":0,"repo":"autoware_universe","code-health":4.92641887270523,"version":"3.0","authors":["Sarun Mukdapitak","pre-commit-ci-lite[bot]"],"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-02-20T06:00:53.000Z","project-name":"autoware.universe","repository":"https://github.com/autowarefoundation/autoware_universe.git"}}