teco-kit/PointAndControl

View on GitHub

Showing 95 of 172 total issues

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

        public static void writeWallProjectionAndPositionSampleToXML(WallProjectionAndPositionSample sample)
        {
            XmlDocument docConfig = new XmlDocument();
            docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\WallProjectionAndPositionSamples.xml");
            XmlNode node = docConfig.SelectSingleNode("/devices");
Severity: Major
Found in IGS/Helperclasses/XMLComponentHandler.cs - About 2 hrs to fix

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

            public static void writeSampleToXML(Point3D upPoint, Vector3D direction, String deviceIdentifier, String path)
            {
                XmlDocument docConfig = new XmlDocument();
                
                docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\" + path + ".xml");
    Severity: Major
    Found in IGS/Helperclasses/XMLComponentHandler.cs - About 2 hrs to fix

      Class DataHolder has 25 methods (exceeds 20 allowed). Consider refactoring.
      Open

          public class DataHolder
          {
              private List<Device> _newDevices { get; set; }
              public Room _roomModel { get; set; }
              public EnvironmentInfoHandler _environmentHandler { get; set; }
      Severity: Minor
      Found in IGS/MainComponents/DataHolder.cs - About 2 hrs to fix

        Method reader_FramesReady has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Function pollStatus has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

          var pollStatus = function () {
              // get status from server and generate toast
              $.getJSON('/?dev=server&cmd=popup', function (data) {
                  var items = [];
          
          Severity: Minor
          Found in IGS/Resources/HttpRoot/js/site.js - About 2 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 updateWeight has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring.
          Open

                  private static void updateWeight(List<Ray3D> list)
                  {
                      DateTime currentTime = DateTime.Now;
                      //Console.Out.WriteLine("currentTime:"+currentTime.ToString());
          
          Severity: Minor
          Found in IGS/Locator/Locator.cs - About 2 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 PointAndControlMain has 21 methods (exceeds 20 allowed). Consider refactoring.
          Open

              public class PointAndControlMain
              {
          
          
                  /// <summary>
          Severity: Minor
          Found in IGS/MainComponents/PointAndControlMain.cs - About 2 hrs to fix

            Class DeviceHolder has 21 methods (exceeds 20 allowed). Consider refactoring.
            Open

                public class DeviceHolder
                {
                    public List<Device> devices { get; set; }
                    public DeviceStorageFileHandlerJSON storageFileHandler { get; set; }
                    public Deviceproducer deviceProducer { get; set; }
            Severity: Minor
            Found in IGS/MainComponents/DeviceHolder.cs - About 2 hrs to fix

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

                      public override String Transmit(String cmdId, String value)
                      {
                          String response;
                          switch (cmdId)
                          {
              Severity: Major
              Found in IGS/Devices/Boxee.cs - About 2 hrs to fix

                File UserTracker.cs has 253 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using System.Collections.Generic;
                using System.IO;
                using System.Linq;
                using System.Windows.Media.Media3D;
                using Microsoft.Kinect;
                Severity: Minor
                Found in IGS/Kinect/UserTracker.cs - About 2 hrs to fix

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

                          public override String Transmit(String cmdId,String value)
                              {
                                  String response = "";
                                  switch (cmdId)
                                  {
                  Severity: Minor
                  Found in IGS/Devices/XBMCv11.cs - About 2 hrs to fix

                    Method Filter has 48 lines of code (exceeds 25 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 1 hr to fix

                      Function constraintsToChrome has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var constraintsToChrome = function(c) {
                          if (typeof c !== 'object' || c.mandatory || c.optional) {
                            return c;
                          }
                          var cc = {};
                      Severity: Minor
                      Found in IGS/Resources/HttpRoot/js/adapter.js - About 1 hr to fix

                        Method writeWallProjectionSampleToXML has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                public static void writeWallProjectionSampleToXML(WallProjectionSample sample, String fileName)
                                {
                                    String p = AppDomain.CurrentDomain.BaseDirectory + "\\" + fileName + ".xml";
                                              
                                    XmlDocument docConfig = new XmlDocument();
                        Severity: Minor
                        Found in IGS/Helperclasses/XMLComponentHandler.cs - About 1 hr to fix

                          Method updateWeight has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private static void updateWeight(List<Ray3D> list)
                                  {
                                      DateTime currentTime = DateTime.Now;
                                      //Console.Out.WriteLine("currentTime:"+currentTime.ToString());
                          
                          Severity: Minor
                          Found in IGS/Locator/Locator.cs - About 1 hr to fix

                            Method writeWallProjectionSampleToXML has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    public static void writeWallProjectionSampleToXML(WallProjectionSample sample)
                                    {
                                        XmlDocument docConfig = new XmlDocument();
                            
                                        docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\WallProjectionSamples.xml");
                            Severity: Minor
                            Found in IGS/Helperclasses/XMLComponentHandler.cs - About 1 hr to fix

                              Method writeWallProjectionSampleToConfig has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public static void writeWallProjectionSampleToConfig(WallProjectionSample sample)
                                      {
                                          XmlDocument docConfig = new XmlDocument();
                                          docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\configuration.xml");
                                          XmlNode node = docConfig.SelectSingleNode("/config");
                              Severity: Minor
                              Found in IGS/Helperclasses/XMLComponentHandler.cs - About 1 hr to fix

                                Function RTCPeerConnection has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  window.RTCPeerConnection = function(pcConfig, pcConstraints) {
                                    // Translate iceTransportPolicy to iceTransports,
                                    // see https://code.google.com/p/webrtc/issues/detail?id=4869
                                    if (pcConfig && pcConfig.iceTransportPolicy) {
                                      pcConfig.iceTransports = pcConfig.iceTransportPolicy;
                                Severity: Minor
                                Found in IGS/Resources/HttpRoot/js/adapter.js - About 1 hr to fix

                                  Method responseToFileRequest has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          private bool responseToFileRequest(HttpProcessor p, string pathString)
                                          {
                                              string fileEnding = getFileEnding(pathString);
                                  
                                              switch (fileEnding)
                                  Severity: Minor
                                  Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

                                    Method Kinect_Replace_Button_Click has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private void Kinect_Replace_Button_Click(object sender, RoutedEventArgs e)
                                        {
                                            String oldPlace = "";
                                            String newPlace = "";
                                    
                                    Severity: Minor
                                    Found in IGS/MainWindow.xaml.cs - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language