teco-kit/PointAndControl

View on GitHub

Showing 95 of 172 total issues

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

        Function updateMapFromList has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        var updateMapFromList = function () {
            $.getJSON('/?dev=server&cmd=list', function (data) {
                var a = document.getElementById("mapSvg");
                var svgDoc = a.contentDocument;
                var circles = svgDoc.getElementsByTagName("a");
        Severity: Minor
        Found in IGS/Resources/HttpRoot/js/site.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 HandleGetRequest has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public override void HandleGetRequest(HttpProcessor p)
                {
        
                    string querystring = null;
                    string pathstring = null;
        Severity: Minor
        Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

          Method HandlePostRequest has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public void HandlePostRequest()
                  {
                      // this post data processing just reads everything into a memory stream.
                      // this is fine for smallish things, but for large stuff we should really
                      // hand an input stream to the request processor. However, the input stream 
          Severity: Minor
          Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

            Method GetCoordinatesWindow has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public List<Point3D[]> GetCoordinatesWindow(int id)
                    {
            
                        List<Point3D[]> returnList = new List<Point3D[]>();
                        workingOnWindow = true;
            Severity: Minor
            Found in IGS/Kinect/UserTracker.cs - About 1 hr to fix

              Function getStats has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  pc.getStats = function(selector, successCallback, errorCallback) { // jshint ignore: line
                    var self = this;
                    var args = arguments;
              
                    // If selector is a function then we are in the old style stats so just
              Severity: Minor
              Found in IGS/Resources/HttpRoot/js/adapter.js - About 1 hr to fix

                Method setKinect has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private bool setKinect(String x, String y, String z, String horizontal, String tilt)
                        {
                            double parsedX; 
                            double parsedY;
                            double parsedZ;
                Severity: Minor
                Found in IGS/MainComponents/PointAndControlMain.cs - About 1 hr to fix

                  Method Mute has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private String Mute()
                          {
                              byte[] msg = new byte[15];
                              byte[] message = new byte[] { 0x01, 0x30, 0x41, 0x30, 0x43, 0x30, 0x36, 0x02, 0x30, 0x30, 0x38, 0x3D, 0x03 };
                  
                  Severity: Minor
                  Found in IGS/Devices/NECLCDmonitorMultiSyncV421.cs - About 1 hr to fix

                    Method readWallProjectionAndPositionSamplesFromXML has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public static List<WallProjectionAndPositionSample> readWallProjectionAndPositionSamplesFromXML()
                            {
                                List<WallProjectionAndPositionSample> sampleList = new List<WallProjectionAndPositionSample>();
                    
                                XmlDocument docConfig = new XmlDocument();
                    Severity: Minor
                    Found in IGS/Helperclasses/XMLComponentHandler.cs - About 1 hr to fix

                      Method produceDevice has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public Device produceDevice(string type, string id, string name, string path, List<Device> devices)
                              {
                                  string idparam = "";
                      
                                  if (id != "")
                      Severity: Minor
                      Found in IGS/MainComponents/Deviceproducer.cs - About 1 hr to fix

                        Method sendData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                private void sendData(HttpProcessor p)
                                {
                                    //TODO: Write Flexible Header usage
                                    String pathstring = null;
                                    int iqs = p.HttpUrl.IndexOf("?");
                        Severity: Minor
                        Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

                          Method initBodyBones has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private void initBodyBones(int bodyNr, List<Point3D> pList, List<Point3D> midSection)
                                  {
                          
                          
                                      //from right to center;
                          Severity: Minor
                          Found in IGS/Room3DView.xaml.cs - About 1 hr to fix

                            Method replaceBodyBones has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    private void replaceBodyBones(int bodyNr, List<Point3D> pList, List<Point3D> midSection)
                                    {
                            
                                        for (int i = 0; i < 4; i++)
                                        {
                            Severity: Minor
                            Found in IGS/Room3DView.xaml.cs - About 1 hr to fix

                              Method GetCoordinates has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public Point3D[] GetCoordinates(int id)
                                      {
                                          foreach (TrackedSkeleton sTracked in Bodies.Where(sTracked => sTracked.Id == id))
                                          {
                                              sTracked.Actions = sTracked.Actions + 1;
                              Severity: Minor
                              Found in IGS/Kinect/UserTracker.cs - About 1 hr to fix

                                Method RenderClippedEdges has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private static void RenderClippedEdges(Body body, DrawingContext drawingContext)
                                    {
                                        if (body.ClippedEdges.HasFlag(FrameEdges.Bottom))
                                        {
                                            drawingContext.DrawRectangle(
                                Severity: Minor
                                Found in IGS/MainWindow.xaml.cs - About 1 hr to fix

                                  Method readWallProjectionSamplesFromXML has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          public static List<WallProjectionSample> readWallProjectionSamplesFromXML()
                                          {
                                              List<WallProjectionSample> sampleList = new List<WallProjectionSample>();
                                  
                                              XmlDocument docConfig = new XmlDocument();
                                  Severity: Minor
                                  Found in IGS/Helperclasses/XMLComponentHandler.cs - About 1 hr to fix

                                    Method jointFilter has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            public Point3D[] jointFilter(List<Point3D[]> jointLists)
                                            {
                                    
                                                Point3D[] filtered = new Point3D[4];
                                                double minDist = 0;
                                    Severity: Minor
                                    Found in IGS/Kinect/MedianJointFilter.cs - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language