This repo hasn't had a successful analysis for its default branch yet.

hrntsm/Tunny

View on GitHub

Showing 223 of 231 total issues

Method UpdateAttributes has a Cognitive Complexity of 89 (exceeds 20 allowed). Consider refactoring.
Open

private static Dictionary<string, object> UpdateAttributes(Fish fish)
{
var newAttributes = new Dictionary<string, object>();
 
foreach (KeyValuePair<string, object> attrs in fish.Attributes)
Severity: Minor
Found in Tunny/Type/Fish.cs - About 1 day to fix

File Algorithm.cs has 621 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
Severity: Major
Found in Tunny/Solver/Algorithm.cs - About 1 day to fix

    File Storage.cs has 608 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System;
    using System.Collections.Generic;
    using System.Data.SQLite;
    using System.IO;
    using System.Linq;
    Severity: Major
    Found in Optuna/Storage/RDB/Storage.cs - About 1 day to fix

      File OptimizeViewModel.cs has 601 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      using System;
      using System.Collections.ObjectModel;
      using System.Globalization;
      using System.IO;
      using System.Runtime.InteropServices;
      Severity: Major
      Found in Tunny/WPF/ViewModels/Optimize/OptimizeViewModel.cs - About 1 day to fix

        File Storage.cs has 546 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System;
        using System.Collections.Generic;
        using System.IO;
        using System.Linq;
         
         
        Severity: Major
        Found in Optuna/Storage/Journal/Storage.cs - About 1 day to fix

          File GrasshopperInOut.cs has 536 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          using System;
          using System.Collections.Generic;
          using System.Globalization;
          using System.Linq;
          using System.Threading.Tasks;
          Severity: Major
          Found in Tunny/Util/GrasshopperInOut.cs - About 1 day to fix

            File OutputViewModel.cs has 464 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            using System.Collections.Generic;
            using System.Collections.ObjectModel;
            using System.Globalization;
            using System.IO;
            using System.Linq;
            Severity: Minor
            Found in Tunny/WPF/ViewModels/Output/OutputViewModel.cs - About 7 hrs to fix

              Method ProcessLogEntry has a Cognitive Complexity of 52 (exceeds 20 allowed). Consider refactoring.
              Open

              private void ProcessLogEntry(JournalOperation opCode, JObject logObject)
              {
              switch (opCode)
              {
              case JournalOperation.CreateStudy:
              Severity: Minor
              Found in Optuna/Storage/Journal/Storage.cs - About 5 hrs to fix

              Method ProcessLogEntry has 139 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              private void ProcessLogEntry(JournalOperation opCode, JObject logObject)
              {
              switch (opCode)
              {
              case JournalOperation.CreateStudy:
              Severity: Major
              Found in Optuna/Storage/Journal/Storage.cs - About 5 hrs to fix

                Method GetTargetValue has a Cognitive Complexity of 50 (exceeds 20 allowed). Consider refactoring.
                Open

                private double GetTargetValue(Trial trial, string target)
                {
                if (target == "ID")
                {
                return trial.TrialId;
                Severity: Minor
                Found in Tunny/WPF/ViewModels/Output/AnalysisChartViewModel.cs - About 5 hrs to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                using System.Globalization;
                using System.Windows;
                using System.Windows.Controls;
                 
                using Optuna.Sampler.OptunaHub;
                Tunny/WPF/Views/Pages/Settings/Sampler/HEBOSettingsPage.xaml.cs on lines 1..59

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                using System.Globalization;
                using System.Windows;
                using System.Windows.Controls;
                 
                using Optuna.Sampler.OptunaHub;
                Tunny/WPF/Views/Pages/Settings/Sampler/AutoSettingsPage.xaml.cs on lines 1..59

                Class JournalStorage has 35 methods (exceeds 20 allowed). Consider refactoring.
                Open

                public class JournalStorage : IOptunaStorage
                {
                private readonly Dictionary<int, Study.Study> _studies = new Dictionary<int, Study.Study>();
                private readonly Dictionary<int, Trial.Trial> _trialCache = new Dictionary<int, Trial.Trial>();
                private readonly Dictionary<string, int> _studyNameToIdIndex = new Dictionary<string, int>();
                Severity: Minor
                Found in Optuna/Storage/Journal/Storage.cs - About 4 hrs to fix

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                  using System.Globalization;
                  using System.Windows;
                  using System.Windows.Controls;
                   
                  using Optuna.Sampler;
                  Tunny/WPF/Views/Pages/Settings/Sampler/PreferentialGpSettingsPage.xaml.cs on lines 1..57
                  Tunny/WPF/Views/Pages/Settings/Sampler/RandomSettingsPage.xaml.cs on lines 1..58

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                  using System;
                  using System.Globalization;
                  using System.Windows;
                  using System.Windows.Controls;
                   
                   
                  Tunny/WPF/Views/Pages/Settings/Sampler/BruteForceSettingsPage.xaml.cs on lines 1..57
                  Tunny/WPF/Views/Pages/Settings/Sampler/PreferentialGpSettingsPage.xaml.cs on lines 1..57

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                  using System.Globalization;
                  using System.Windows;
                  using System.Windows.Controls;
                   
                  using Optuna.Sampler.Dashboard;
                  Tunny/WPF/Views/Pages/Settings/Sampler/BruteForceSettingsPage.xaml.cs on lines 1..57
                  Tunny/WPF/Views/Pages/Settings/Sampler/RandomSettingsPage.xaml.cs on lines 1..58

                  Class SqliteStorage has 32 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  public class SqliteStorage : IOptunaStorage
                  {
                  private readonly Dictionary<int, Study.Study> _studies = new Dictionary<int, Study.Study>();
                  private readonly SQLiteConnectionStringBuilder _sqliteConnection;
                  private int _nextStudyId;
                  Severity: Minor
                  Found in Optuna/Storage/RDB/Storage.cs - About 4 hrs to fix

                    Method ChangeTargetSampler has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    public void ChangeTargetSampler(SamplerType samplerType)
                    {
                    ITrialNumberParam param;
                    switch (samplerType)
                    {
                    Severity: Major
                    Found in Tunny/WPF/ViewModels/Optimize/OptimizeViewModel.cs - About 3 hrs to fix

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                      private void DrawObjects(GH_Canvas canvas, Graphics graphics, GH_CanvasChannel channel)
                      {
                      var fillColor = Color.FromArgb(Convert.ToInt32("FFFFF176", 16));
                      var edgeColor = Color.FromArgb(Convert.ToInt32("FFFF9800", 16));
                      var textColor = Color.FromArgb(Convert.ToInt32("FF000000", 16));
                      Severity: Major
                      Found in Tunny/Component/Operation/ConstructFishEggAttributes.cs and 1 other location - About 3 hrs to fix
                      Tunny/Component/Operation/ConstructFishEggByCsvAttributes.cs on lines 48..64

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                      private void DrawObjects(GH_Canvas canvas, Graphics graphics, GH_CanvasChannel channel)
                      {
                      var fillColor = Color.FromArgb(Convert.ToInt32("FFFFF176", 16));
                      var edgeColor = Color.FromArgb(Convert.ToInt32("FFFF9800", 16));
                      var textColor = Color.FromArgb(Convert.ToInt32("FF000000", 16));
                      Severity: Major
                      Found in Tunny/Component/Operation/ConstructFishEggByCsvAttributes.cs and 1 other location - About 3 hrs to fix
                      Tunny/Component/Operation/ConstructFishEggAttributes.cs on lines 38..54
                      Severity
                      Category
                      Status
                      Source
                      Language