teco-kit/PointAndControl

View on GitHub

Showing 95 of 172 total issues

Method InterpretCommand has a Cognitive Complexity of 112 (exceeds 20 allowed). Consider refactoring.
Open

        public String InterpretCommand(object sender, HttpEventArgs args)
        {
            String devId = args.Dev;
            String cmd = args.Cmd;
            String value = args.Val;
Severity: Minor
Found in IGS/MainComponents/PointAndControlMain.cs - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method InterpretCommand has 234 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public String InterpretCommand(object sender, HttpEventArgs args)
        {
            String devId = args.Dev;
            String cmd = args.Cmd;
            String value = args.Val;
Severity: Major
Found in IGS/MainComponents/PointAndControlMain.cs - About 1 day to fix

    File XMLComponentHandler.cs has 519 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using PointAndControl.Classifier;
    using System;
    using System.Collections.Generic;
    using System.Windows.Media.Media3D;
    using System.Xml;
    Severity: Major
    Found in IGS/Helperclasses/XMLComponentHandler.cs - About 1 day to fix

      File Room3DView.xaml.cs has 510 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Windows;
      using System.Windows.Media;
      Severity: Major
      Found in IGS/Room3DView.xaml.cs - About 1 day to fix

        File PointAndControlMain.cs has 501 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System;
        using System.Collections.Generic;
        using System.Linq;
        using System.Windows.Media.Media3D;
        using System.Diagnostics;
        Severity: Major
        Found in IGS/MainComponents/PointAndControlMain.cs - About 1 day to fix

          Method Reader_MultiSourceFrameArrived has a Cognitive Complexity of 65 (exceeds 20 allowed). Consider refactoring.
          Open

              private void Reader_MultiSourceFrameArrived(object sender, MultiSourceFrameArrivedEventArgs e)
              {
          
                  List<ModelVisual3D> models = new List<ModelVisual3D>();
                  List<ulong> skelIDs = new List<ulong>();
          Severity: Minor
          Found in IGS/MainWindow.xaml.cs - About 7 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          File SimpleHttpServer.cs has 486 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          using System;
          using System.Collections;
          using System.Collections.Specialized;
          using System.IO;
          using System.Net;
          Severity: Minor
          Found in IGS/WebServer/SimpleHttpServer.cs - About 7 hrs to fix

            Method reader_FramesReady has a Cognitive Complexity of 58 (exceeds 20 allowed). Consider refactoring.
            Open

                    public void reader_FramesReady(object sender, BodyFrameArrivedEventArgs e)
                    {
            
                        if (e == null)
                            return;
            Severity: Minor
            Found in IGS/Kinect/UserTracker.cs - About 6 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            File adapter.js has 434 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
             *
             *  Use of this source code is governed by a BSD-style license
             *  that can be found in the LICENSE file in the root of the source
            Severity: Minor
            Found in IGS/Resources/HttpRoot/js/adapter.js - About 6 hrs to fix

              File site.js has 407 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              // check if vibration is supported
              var supportsVibrate = "vibrate" in navigator;
              var trackingId = null;
              var beforeRegister;
              var editDevice = "";
              Severity: Minor
              Found in IGS/Resources/HttpRoot/js/site.js - About 5 hrs to fix

                File MainWindow.xaml.cs has 385 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using IGS;
                using Microsoft.Kinect;
                using PointAndControl.ComponentHandling;
                using PointAndControl.Kinect;
                using PointAndControl.MainComponents;
                Severity: Minor
                Found in IGS/MainWindow.xaml.cs - About 5 hrs to fix

                  Function RTCPeerConnection has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                  Open

                    window.RTCPeerConnection = function(pcConfig, pcConstraints) {
                      if (webrtcDetectedVersion < 38) {
                        // .urls is not supported in FF < 38.
                        // create RTCIceServers with a single url.
                        if (pcConfig && pcConfig.iceServers) {
                  Severity: Minor
                  Found in IGS/Resources/HttpRoot/js/adapter.js - About 4 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method createBody has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public void createBody(Body body)
                          {
                              //Decide if one skeleton have to be replaced, created, or is already existing
                              int IDPlace = -1;
                              bool IDfound = false;
                  Severity: Major
                  Found in IGS/Room3DView.xaml.cs - About 3 hrs to fix

                    Method Filter has a Cognitive Complexity of 40 (exceeds 20 allowed). Consider refactoring.
                    Open

                            public override List<TrackedSkeleton> Filter(Body[] bodies, List<TrackedSkeleton> trackedSkeletons, int id, BodyFrameReader reader)
                            {
                                if (trackedSkeletons == null)
                                    return trackedSkeletons;
                    
                    Severity: Minor
                    Found in IGS/Kinect/HandsUp.cs - About 3 hrs to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Class EnvironmentInfoHandler has 29 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                        public class EnvironmentInfoHandler
                        {
                    
                            public EnvironmentInfoHandler() { }
                    
                    Severity: Minor
                    Found in IGS/ComponentHandling/EnvironmentInfoHandler.cs - About 3 hrs to fix

                      File DeviceHolder.cs has 304 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      using PointAndControl.ComponentHandling;
                      using PointAndControl.Devices;
                      using PointAndControl.ThirdPartyRepos;
                      using System;
                      using System.Collections.Generic;
                      Severity: Minor
                      Found in IGS/MainComponents/DeviceHolder.cs - About 3 hrs to fix

                        Method Reader_MultiSourceFrameArrived has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private void Reader_MultiSourceFrameArrived(object sender, MultiSourceFrameArrivedEventArgs e)
                            {
                        
                                List<ModelVisual3D> models = new List<ModelVisual3D>();
                                List<ulong> skelIDs = new List<ulong>();
                        Severity: Major
                        Found in IGS/MainWindow.xaml.cs - About 3 hrs to fix

                          Method Transmit has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public override String Transmit(String cmdId,String value)
                                      {
                                          if (cmdId == "on")
                                          {
                                              Process p = Process.Start(_absolutePathToKodi);
                          Severity: Major
                          Found in IGS/Devices/Kodi.cs - About 3 hrs to fix

                            Method writeWallProjectionAndPositionSampleToXML has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    public static void writeWallProjectionAndPositionSampleToXML(WallProjectionAndPositionSample sample, String fileName)
                                    {
                            
                            
                                        String p = AppDomain.CurrentDomain.BaseDirectory + "\\" + fileName + ".xml";
                            Severity: Major
                            Found in IGS/Helperclasses/XMLComponentHandler.cs - About 2 hrs to fix

                              Method writeSampleToXML has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public static void writeSampleToXML(Point3D[] positions, String deviceIdentifier)
                                      {
                                          XmlDocument docConfig = new XmlDocument();
                                          docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\samples.xml");
                                          XmlNode node = docConfig.SelectSingleNode("/devices");
                              Severity: Major
                              Found in IGS/Helperclasses/XMLComponentHandler.cs - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language