Showing 586 of 966 total issues
Method run
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void run() {
try (
final BBoxDBCluster bboxdbClient = new BBoxDBCluster(connectionPoint, clustername);
){
Method updateAircraft
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Aircraft updateAircraft(final String[] data, final String transmissionType)
throws InputParseException, ParseException {
final String hexIdent = data[4];
Method buildTuple
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Tuple buildTuple(final String valueData, final String keyData) {
// Ignore the header
if("Moid,Tripid,Tstart,Tend,Xstart,Ystart,Xend,Yend".equals(valueData)) {
Method run
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void run() {
try (
Method run
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void run() {
try (
- 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 handleQuery
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
@Override
/**
* Handle a bounding box query
*/
public void handleQuery(final ByteBuffer encodedPackage,
- 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 fetchAndSendNextTuples
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void fetchAndSendNextTuples(final short packageSequence) throws IOException, PacketEncodeException {
long sendTuplesInThisPage = 0;
clientConnectionHandler.writeResultPackage(new MultipleTupleStartResponse(packageSequence));
- 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 getSystemsToConnectForStateSync
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
@VisibleForTesting
public Set<BBoxDBInstance> getSystemsToConnectForStateSync(final DistributionRegion region) {
final Set<BBoxDBInstance> systemsToRequst = new HashSet<>();
if(region.isLeafRegion()) {
- 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 equals
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
- 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 decodePackage
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static ContinuousQueryStateResponse decodePackage(final ByteBuffer encodedPackage) throws PacketEncodeException {
final short requestId = NetworkPackageDecoder.getRequestIDFromResponsePackage(encodedPackage);
final boolean decodeResult = NetworkPackageDecoder.validateResponsePackageHeader(encodedPackage, NetworkConst.RESPONSE_CONTINUOUS_QUERY_STATE);
- 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 equals
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
- 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 performReadRepairForResult
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void performReadRepairForResult(final List<Tuple> allTuples, int resultId)
throws InterruptedException, BBoxDBException, ZookeeperException {
@SuppressWarnings("unchecked")
final List<Tuple> tupleResult = (List<Tuple>) futures.get(resultId).get(true);
Method main
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void main(final String[] args)
throws InputParseException, StorageManagerException, ZookeeperException {
if (args.length != 7) {
System.err.println(
Method fromGeoJson
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static GeoJsonPolygon fromGeoJson(final String jsonData) {
final JSONTokener tokener = new JSONTokener(jsonData);
final JSONObject jsonObject = new JSONObject(tokener);
final Long objectId = jsonObject.optLong(JSON_ID, -1);
Method updateDistributionRegion
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void updateDistributionRegion() throws ZookeeperException,
ZookeeperNotFoundException {
logger.info("Reread distribution group: {}", distributionGroup);
Method fromJSON
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static ContinuousQueryPlan fromJSON(final String jsonString) throws BBoxDBException {
Objects.requireNonNull(jsonString);
try {
Method handleRequest
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
/**
* Handle the insert tuple request
*/
public boolean handleRequest(final ByteBuffer encodedPackage,
Method getExecuteAction
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
private Action getExecuteAction(final JComboBox<String> queryTypeBox,
final JComboBox<String> table1Field, final JComboBox<String> color1Box,
final JComboBox<String> table2Field, final JComboBox<String> color2Box,
final JTextField longBegin, final JTextField longEnd, final JTextField latBegin,
final JTextField latEnd, final JTextField filterField, final JTextField valueField,
Method getBuilderForFormat
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static TupleBuilder getBuilderForFormat(final String format) {
switch(format) {
case Name.GEOJSON:
return new GeoJSONTupleBuilder();
Method fetchAndSendNextTuples
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void fetchAndSendNextTuples(final short packageSequence) throws IOException, PacketEncodeException {
clientConnectionHandler.writeResultPackage(new MultipleTupleStartResponse(packageSequence));