Showing 95 of 172 total issues
Method writeWallProjectionAndPositionSampleToXML
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void writeWallProjectionAndPositionSampleToXML(WallProjectionAndPositionSample sample)
{
XmlDocument docConfig = new XmlDocument();
docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\WallProjectionAndPositionSamples.xml");
XmlNode node = docConfig.SelectSingleNode("/devices");
Method writeSampleToXML
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void writeSampleToXML(Point3D upPoint, Vector3D direction, String deviceIdentifier, String path)
{
XmlDocument docConfig = new XmlDocument();
docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\" + path + ".xml");
Class DataHolder
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class DataHolder
{
private List<Device> _newDevices { get; set; }
public Room _roomModel { get; set; }
public EnvironmentInfoHandler _environmentHandler { get; set; }
Method reader_FramesReady
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void reader_FramesReady(object sender, BodyFrameArrivedEventArgs e)
{
if (e == null)
return;
Function pollStatus
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
var pollStatus = function () {
// get status from server and generate toast
$.getJSON('/?dev=server&cmd=popup', function (data) {
var items = [];
- 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 updateWeight
has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring. Open
Open
private static void updateWeight(List<Ray3D> list)
{
DateTime currentTime = DateTime.Now;
//Console.Out.WriteLine("currentTime:"+currentTime.ToString());
- 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 PointAndControlMain
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class PointAndControlMain
{
/// <summary>
Class DeviceHolder
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class DeviceHolder
{
public List<Device> devices { get; set; }
public DeviceStorageFileHandlerJSON storageFileHandler { get; set; }
public Deviceproducer deviceProducer { get; set; }
Method Transmit
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override String Transmit(String cmdId, String value)
{
String response;
switch (cmdId)
{
File UserTracker.cs
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Media.Media3D;
using Microsoft.Kinect;
Method Transmit
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override String Transmit(String cmdId,String value)
{
String response = "";
switch (cmdId)
{
Method Filter
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override List<TrackedSkeleton> Filter(Body[] bodies, List<TrackedSkeleton> trackedSkeletons, int id, BodyFrameReader reader)
{
if (trackedSkeletons == null)
return trackedSkeletons;
Function constraintsToChrome
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var constraintsToChrome = function(c) {
if (typeof c !== 'object' || c.mandatory || c.optional) {
return c;
}
var cc = {};
Method writeWallProjectionSampleToXML
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void writeWallProjectionSampleToXML(WallProjectionSample sample, String fileName)
{
String p = AppDomain.CurrentDomain.BaseDirectory + "\\" + fileName + ".xml";
XmlDocument docConfig = new XmlDocument();
Method updateWeight
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static void updateWeight(List<Ray3D> list)
{
DateTime currentTime = DateTime.Now;
//Console.Out.WriteLine("currentTime:"+currentTime.ToString());
Method writeWallProjectionSampleToXML
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void writeWallProjectionSampleToXML(WallProjectionSample sample)
{
XmlDocument docConfig = new XmlDocument();
docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\WallProjectionSamples.xml");
Method writeWallProjectionSampleToConfig
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void writeWallProjectionSampleToConfig(WallProjectionSample sample)
{
XmlDocument docConfig = new XmlDocument();
docConfig.Load(AppDomain.CurrentDomain.BaseDirectory + "\\configuration.xml");
XmlNode node = docConfig.SelectSingleNode("/config");
Function RTCPeerConnection
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Method responseToFileRequest
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private bool responseToFileRequest(HttpProcessor p, string pathString)
{
string fileEnding = getFileEnding(pathString);
switch (fileEnding)
Method Kinect_Replace_Button_Click
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void Kinect_Replace_Button_Click(object sender, RoutedEventArgs e)
{
String oldPlace = "";
String newPlace = "";