prasadtalasila/BITS-Darshini

View on GitHub
src/main/java/in/ac/bits/protocolanalyzer/mvc/model/StoredPacket.java

Summary

Maintainability
A
0 mins
Test Coverage

'package' should be separated from previous line.
Open

package in.ac.bits.protocolanalyzer.mvc.model;

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.

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.

The class 'StoredPacket' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=8, WMC=8)
Open

public class StoredPacket {

    private long packetId;
    private LinkAnalyzerEntity linkAnalyzerEntity;
    private NetworkAnalyzerEntity networkAnalyzerEntity;

DataClass

Since: PMD 6.0.0

Priority: Medium

Categories: Style

Remediation Points: 50000

Data Classes are simple data holders, which reveal most of their state, and without complex functionality. The lack of functionality may indicate that their behaviour is defined elsewhere, which is a sign of poor data-behaviour proximity. By directly exposing their internals, Data Classes break encapsulation, and therefore reduce the system's maintainability and understandability. Moreover, classes tend to strongly rely on their data representation, which makes for a brittle design. Refactoring a Data Class should focus on restoring a good data-behaviour proximity. In most cases, that means moving the operations defined on the data back into the class. In some other cases it may make sense to remove entirely the class and move the data into the former client classes.

Example:

public class DataClass {

 public int bar = 0;
 public int na = 0;
 private int bee = 0;

 public void setBee(int n) {
 bee = n;
 }
}

There are no issues that match your filters.

Category
Status