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;
- Read upRead up
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;
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;
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;
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;
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>();
- Read upRead up
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;
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;
- Read upRead up
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
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 = "";
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;
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) {
- Read upRead up
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;
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;
- Read upRead up
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() { }
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;
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>();
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);
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";
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");