prasadtalasila/BITS-Darshini

View on GitHub
src/main/java/in/ac/bits/protocolanalyzer/analyzer/PcapAnalyzer.java

Summary

Maintainability
A
1 hr
Test Coverage

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);

This block of commented-out lines of code should be removed.
Open

        //log.info("readFromPcap = " + readFromPcap);

Programmers should not comment out code as it bloats programs and reduces readability.

Unused code should be deleted and can be retrieved from source control history if required.

This block of commented-out lines of code should be removed.
Open

        //log.info("RECEIVED SIGNAL FROM SAVE REPO");

Programmers should not comment out code as it bloats programs and reduces readability.

Unused code should be deleted and can be retrieved from source control history if required.

Extra separation in import group before 'in.ac.bits.protocolanalyzer.analyzer.event.BucketLimitEvent'
Open

import in.ac.bits.protocolanalyzer.analyzer.event.BucketLimitEvent;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Wrong lexicographical order for 'in.ac.bits.protocolanalyzer.protocol.Protocol' import. Should be before 'org.springframework.stereotype.Component'.
Open

import in.ac.bits.protocolanalyzer.protocol.Protocol;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Extra separation in import group before 'org.pcap4j.core.NotOpenException'
Open

import org.pcap4j.core.NotOpenException;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Wrong lexicographical order for 'in.ac.bits.protocolanalyzer.analyzer.event.BucketLimitEvent' import. Should be before 'org.springframework.stereotype.Component'.
Open

import in.ac.bits.protocolanalyzer.analyzer.event.BucketLimitEvent;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Summary javadoc is missing.
Open

/**

Checks thatJavadoc summary sentence does not contain phrases that are not recommended to use.Summaries that contain only the {@inheritDoc} tag are skipped. Check alsoviolate Javadoc that does not contain first sentence.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Extra separation in import group before 'com.google.common.eventbus.Subscribe'
Open

import com.google.common.eventbus.Subscribe;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Wrong lexicographical order for 'com.google.common.eventbus.Subscribe' import. Should be before 'lombok.extern.log4j.Log4j'.
Open

import com.google.common.eventbus.Subscribe;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

'package' should be separated from previous line.
Open

package in.ac.bits.protocolanalyzer.analyzer;

Checks for empty line separators before package, all import declarations,fields, constructors, methods, nested classes,static initializers and instance initializers.

Checks for empty line separators before not only statements butimplementation and documentation comments and blocks as well.

ATTENTION: empty line separator is required between token siblings,not after line where token is found.If token does not have same type sibling then empty lineis required at its end (for example for CLASS_DEF it is after '}').Also, trailing comments are skipped.

ATTENTION: violations from multiple empty lines cannot be suppressed via XPath:#8179.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Extra separation in import group before 'lombok.Setter'
Open

import lombok.Setter;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Wrong lexicographical order for 'in.ac.bits.protocolanalyzer.analyzer.event.SaveRepoEndEvent' import. Should be before 'org.springframework.stereotype.Component'.
Open

import in.ac.bits.protocolanalyzer.analyzer.event.SaveRepoEndEvent;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

There are no issues that match your filters.

Category
Status