teco-kit/PointAndControl

View on GitHub

Showing 172 of 172 total issues

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

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

            $.getJSON('/?dev=server&cmd=addDeviceFromList&val=' + JSON.stringify(value), function (data) {
        
                if (!data) {
                    return;
                }
        Severity: Major
        Found in IGS/Resources/HttpRoot/js/site.js and 1 other location - About 2 hrs to fix
        IGS/Resources/HttpRoot/js/site.js on lines 109..123

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 75.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            $.getJSON('/?dev=server&cmd=addDevice&val=' + JSON.stringify(newDevice), function (data) {
        
                if (!data) {
                    return;
                }
        Severity: Major
        Found in IGS/Resources/HttpRoot/js/site.js and 1 other location - About 2 hrs to fix
        IGS/Resources/HttpRoot/js/site.js on lines 133..147

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 75.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                private String Input(byte b)
                {
                    byte[] msg = new byte[19];
                    byte[] message = new byte[] { 0x01, 0x30, 0x41, 0x30, 0x45, 0x30, 0x3A, 0x02, 0x30, 0x30, 0x36, 0x30, 0x30, 0x30, 0x30, b, 0x03 };
        
        Severity: Major
        Found in IGS/Devices/NECLCDmonitorMultiSyncV421.cs and 1 other location - About 2 hrs to fix
        IGS/Devices/NECLCDmonitorMultiSyncV421.cs on lines 176..187

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 148.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                private String Audio(byte b)
                {
                    byte[] msg = new byte[19];
                    byte[] message = new byte[] { 0x01, 0x30, 0x41, 0x30, 0x45, 0x30, 0x3A, 0x02, 0x30, 0x32, 0x32, 0x3E, 0x30, 0x30, 0x30, b, 0x03 };
        
        Severity: Major
        Found in IGS/Devices/NECLCDmonitorMultiSyncV421.cs and 1 other location - About 2 hrs to fix
        IGS/Devices/NECLCDmonitorMultiSyncV421.cs on lines 163..174

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 148.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        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

                          Function Urn has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          var Urn = function () {
                              this.count = 0;
                              this.collection = {};
                              this.lastDraw = "";
                          
                          
                          Severity: Minor
                          Found in IGS/Resources/HttpRoot/js/screen.js - About 1 hr 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 DrawBody has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private void DrawBody(IReadOnlyDictionary<JointType, Joint> joints, IDictionary<JointType, Point> jointPoints, DrawingContext drawingContext)
                              {
                                  // Draw the bones
                          
                                  // Torso
                          Severity: Minor
                          Found in IGS/MainWindow.xaml.cs - About 1 hr to fix

                            Function constraintsToFF37 has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Function Urn has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var Urn = function () {
                                  this.count = 0;
                                  this.collection = {};
                                  this.lastDraw = "";
                              
                              
                              Severity: Minor
                              Found in IGS/Resources/HttpRoot/js/screen.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language