Showing 32 of 651 total issues
Function graphValidation
has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring. Open
graphValidation : function(){
var f = document.getElementById("fileInput").files[0];
var editor = ace.edit("editor");
var pre = editor.getSession().getValue();
_this = this;
- Read upRead up
- Create a ticketCreate a ticket
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 graphValidation
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
graphValidation : function(){
var f = document.getElementById("fileInput").files[0];
var editor = ace.edit("editor");
var pre = editor.getSession().getValue();
_this = this;
- Create a ticketCreate a ticket
Function validator
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
function validator(code, type) {
var flag =0;
//test graph is the main graph, user graph checked against this
//ECMA 6 : replace with backticks , is cleaner
var testGraph = 'graph start {'+
- Create a ticketCreate a ticket
Method start
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public void start() {
log.info("Starting analysis repository...");
TimerTask pull = new TimerTask() {
@Override
- Read upRead up
- Create a ticketCreate a ticket
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 render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
$(this.el).html(this.template());
//slider initialization
$(function() {
- Create a ticketCreate a ticket
Method parse
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static byte[] parse(byte[] header, int startBit, int endBit)
throws IllegalArgumentException {
// check if start and end bits are within the range of header
int byteStartBit = 0;
- Create a ticketCreate a ticket
Function newExperiment
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
newExperiment : function(event) {
event.preventDefault();
var formValues = {
experimentName : $('#experimentName').val(),
description : $('#description').val(),
- Create a ticketCreate a ticket
Method beautify
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static String beautify(byte[] bytes, String mode)
throws IllegalArgumentException {
if (mode.equalsIgnoreCase("ip4")) {
if (bytes.length != 4) {
- Read upRead up
- Create a ticketCreate a ticket
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 parse
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static byte[] parse(byte[] header, int startBit, int endBit)
throws IllegalArgumentException {
// check if start and end bits are within the range of header
int byteStartBit = 0;
- Read upRead up
- Create a ticketCreate a ticket
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 fillTable
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
fillTable : function(event) {
$.ajax({
url:'http://localhost:9200/protocol/info/_search',
type:'POST',
data : '{"from":0,"size":200,"query":{"multi_match":{"query":"'+Cookies.get('userName')+'","fields":["experimenter","collaborators"]}}}',
- Create a ticketCreate a ticket
Method testGetterSetter
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Test
public void testGetterSetter() {
String sessionName = "session_1234";
String pcapPath = "path/to/pcap/file.pcap";
- Create a ticketCreate a ticket
Function multiGet
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
multiGet : function(startId,endId,layerCount){
startId = Number(startId);
endId = Number(endId);
layerCount = Number(layerCount);
if(endId > sessionStorage.getItem('packetCount')){
- Create a ticketCreate a ticket
Function fillTable
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
fillTable : function(event) {
$.ajax({
url:'http://localhost:9200/protocol/info/_search',
type:'POST',
data : '{"from":0,"size":200,"query":{"multi_match":{"query":"'+Cookies.get('userName')+'","fields":["experimenter","collaborators"]}}}',
- Read upRead up
- Create a ticketCreate a ticket
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 run
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void run() {
while (!queries.isEmpty()) {
int size = currentBucket.size();
// log.info(">> AnalysisRepository: " +
- Read upRead up
- Create a ticketCreate a ticket
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 beautify
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static String beautify(byte[] bytes, String mode)
throws IllegalArgumentException {
if (mode.equalsIgnoreCase("ip4")) {
if (bytes.length != 4) {
- Create a ticketCreate a ticket
Method start
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void start() {
log.info("Starting analysis repository...");
TimerTask pull = new TimerTask() {
@Override
- Create a ticketCreate a ticket
Function success
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
success:function (data) {
var jsonData = JSON.parse(JSON.stringify(data)).hits.hits;
for(var id=1; id<=jsonData.length;id+=1){
if (jsonData[id-1]._source.experimenter==Cookies.get('userName')) {
LoadView.globalMy.push(jsonData[id-1]);
- Create a ticketCreate a ticket
Function rowClick
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
rowClick: function(event) {
$("#shareWrap *").removeAttr("disabled");
$("#noneop").attr("disabled", "disabled");
document.getElementById('loadExperiment').disabled = false;
document.getElementById('shareExperiment').disabled = false;
- Create a ticketCreate a ticket
Function analysis
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
analysis : function(event){
event.preventDefault();
_this = this;
var pcapPath = sessionStorage.getItem('pcapPath');
$.ajax({
- Create a ticketCreate a ticket
Method readFile
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public long readFile() {
String sysFile = this.pcapPath;
try {
PcapHandle handle = Pcaps.openOffline(sysFile);
- Create a ticketCreate a ticket