teco-kit/PointAndControl

View on GitHub

Showing 95 of 172 total issues

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

        public string changeDeviceCoord(string devId, Ball ball)
        {
            List<Device> devices = readDevices();

            if (devices == null || devices.Count == 0 || devices.Exists(d => d.Id == devId))
Severity: Minor
Found in IGS/ComponentHandling/DeviceStorageFileHandlerJSON.cs - About 1 hr to fix

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

            public void WriteRedirect(String new_location, int errorNumber)
            {
                String error = "";
    
                switch (errorNumber)
    Severity: Minor
    Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

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

              private String xmlChangeDeviceLocation(Device device, Vector3D position)
              {
                  //add device to configuration XML
                  XmlDocument docConfig = new XmlDocument();
                  docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\configuration.xml");
      Severity: Minor
      Found in IGS/MainComponents/CollisionMethod.cs - About 1 hr to fix

        Method Send has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public override String Send(String command)
                {
                    HttpWebRequest request = null;
                    try
                    {
        Severity: Minor
        Found in IGS/Devices/HTTP.cs - About 1 hr to fix

          Method updateDevice has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public string updateDevice(Device dev)
                  {
                      List<Device> devices = readDevices();
          
                      if (devices == null || devices.Count == 0)
          Severity: Minor
          Found in IGS/ComponentHandling/DeviceStorageFileHandlerJSON.cs - About 1 hr to fix

            Method updateDevices has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public void updateDevices()
                    {
                        if (deviceHolder == null || deviceHolder.devices == null)
                            return;
            
            
            Severity: Minor
            Found in IGS/ThirdPartyRepos/RepositoryRepresentation.cs - About 1 hr to fix

              Method creatTriangleModelRoom has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      private ModelVisual3D creatTriangleModelRoom(Point3D p0, Point3D p1, Point3D p2, bool site)
                      {
                          ModelVisual3D group = new ModelVisual3D();
                          MeshGeometry3D triangleMesh = new MeshGeometry3D();
                          Vector3D normal = new Vector3D();
              Severity: Minor
              Found in IGS/Room3DView.xaml.cs - About 1 hr to fix

                Method isFileEnding has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public bool isFileEnding(string pathstring)
                        {
                            string ending = getFileEnding(pathstring);
                
                            switch (ending)
                Severity: Minor
                Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

                  Function updateDeviceList has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var updateDeviceList = function () {
                      $.getJSON('/?dev=server&cmd=list', function (data) {
                          var listItems = [];
                  
                          if (editMode) {
                  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

                  Function pollDevice has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var pollDevice = function () {
                      $.getJSON('/?dev=server&cmd=pollDevice', function (data) {
                          // restart request if we are still on the ar page
                          var hash = $.mobile.path.parseLocation().hash;
                          if (hash == '#ar')
                  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 ReadHeaders has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private void ReadHeaders()
                          {
                              Debug.WriteLine("readHeaders()");
                              String line;
                              while ((line = StreamReadLine(InputStream)) != null)
                  Severity: Minor
                  Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

                    Function updateProgressBar has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var updateProgressBar = function (curVectors, minVectors) {
                        if (minVectors <= 0) {
                            text = curVectors + " Eingaben gespeichert";
                            // hide progressbar
                            $('#positionprogressbar').hide();
                    Severity: Minor
                    Found in IGS/Resources/HttpRoot/js/site.js - About 1 hr to fix

                      Method Process has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public void Process()
                              {
                                  // we can't use a StreamReader for input, because it buffers up extra data on us inside it's
                                  // "processed" view of the world, and we want the data raw after the headers
                                  InputStream = new BufferedStream(Socket.GetStream());
                      Severity: Minor
                      Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

                        Method WindowLoaded has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private void WindowLoaded(object sender, RoutedEventArgs e)
                            {
                               
                                // Create the drawing group we'll use for drawing
                                _drawingGroup = new DrawingGroup();
                        Severity: Minor
                        Found in IGS/MainWindow.xaml.cs - About 1 hr to fix

                          Function updateDeviceList has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var updateDeviceList = function () {
                              $.getJSON('/?dev=server&cmd=list', function (data) {
                                  var listItems = [];
                          
                                  if (editMode) {
                          Severity: Minor
                          Found in IGS/Resources/HttpRoot/js/site.js - About 1 hr to fix

                            Function selectDevice has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                            Open

                            var selectDevice = function () {
                                $.getJSON('/?dev=server&cmd=selectDevice', function (data) {
                                    if (!data || !data.devices) {
                                        return;
                                    }
                            Severity: Minor
                            Found in IGS/Resources/HttpRoot/js/site.js - About 55 mins 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

                            Function RTCPeerConnection has a Cognitive Complexity of 8 (exceeds 5 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 45 mins 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 getKinectPosition has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    public bool getKinectPosition(Dictionary<String, String> values, out String x, out String y, out String z, out String horizontal, out String tilt)
                            Severity: Minor
                            Found in IGS/Helperclasses/JSON_ParameterReader.cs - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                        if (server.hasOwnProperty('urls')) {
                                          for (var j = 0; j < server.urls.length; j++) {
                                            var newServer = {
                                              url: server.urls[j]
                                            };
                              Severity: Major
                              Found in IGS/Resources/HttpRoot/js/adapter.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                if ((int)body.TrackingId == ts.Id)
                                                                {
                                                                    RenderClippedEdges(body, dc);
                                
                                                                    if (body.IsTracked)
                                Severity: Major
                                Found in IGS/MainWindow.xaml.cs - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language