nlpub/watset-java

View on GitHub

Showing 638 of 638 total issues

Line is longer than 100 characters (found 102).
Open

        throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");

Checks for long lines.

Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.

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 'java.io.IOException'
Open

import java.io.IOException;

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 'java.util.Map' import. Should be before 'org.jgrapht.graph.SimpleWeightedGraph'.
Open

import java.util.Map;

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 'java.util.Objects.requireNonNull'
Open

import static java.util.Objects.requireNonNull;

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.

'.' should be on a new line.
Open

                sorted((smaller, larger) -> Integer.compare(larger.size(), smaller.size())).

Line is longer than 100 characters (found 117).
Open

        @DynamicParameter(description = "Global clustering algorithm parameters", names = {"-gp", "--global-params"})

Checks for long lines.

Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.

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

Line is longer than 100 characters (found 102).
Open

        throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");

Checks for long lines.

Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.

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

Line is longer than 100 characters (found 132).
Open

                final var clusterer = new KMeansPlusPlusClusterer<NodeEmbedding<V>>(kSpectral, -1, new EuclideanDistance(), random);

Checks for long lines.

Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.

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

Parameter name 'k' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
Open

    public static <V> List<NodeEmbedding<V>> computeSpectralEmbedding(Graph<V, ?> graph, VertexToIntegerMapping<V> mapping, int k) {

Checks that method parameter names conform to a specified pattern.By using accessModifiers property it is possibleto specify different formats for methods at different visibility levels.

To validate catch parameters please useCatchParameterName.

To validate lambda parameters please useLambdaParameterName.

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

Local variable name 'i' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
Open

        var i = 0;

Checks that local, non-final variable names conform to a specified pattern.A catch parameter is considered to be a local variable.

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

'.' should be on a new line.
Open

        return cluster.stream().

<p> tag should be preceded with an empty line.</p>
Open

 * <p>

Checks the Javadoc paragraph.

Checks that:

  • There is one blank line between each of two paragraphs.
  • Each paragraph but the first has <p> immediately before the first word, withno space after.

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 'java.util.Objects.requireNonNull'
Open

import static java.util.Objects.requireNonNull;

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.

Each variable declaration must be in its own statement.
Open

    final boolean normalized, modified;

Checks that each variable declaration is in its own statement and onits own line.

Rationale: the Java code conventions chapter 6.1 recommends thatdeclarations should be one per line/statement.

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

'.' should be on a new line.
Open

                addVertices("a", "b", "c", "d", "e").
Severity: Minor
Found in examples/FuzzyClustering.java by checkstyle

Wrong lexicographical order for 'java.util.function.Function.identity' import. Should be before 'java.util.stream.Collectors'.
Open

import static java.util.function.Function.identity;

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 'java.io.IOException' import. Should be before 'org.nlpub.watset.eval.Pairwise'.
Open

import java.io.IOException;

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.

'.' should be on a new line.
Open

                    mapToDouble(cluster -> cluster.values().stream().mapToDouble(Double::doubleValue).sum()).

Line is longer than 100 characters (found 107).
Open

        watset.getClustering(); // getClustering() is memoized and we do not want to mix STDOUT with STDERR
Severity: Minor
Found in examples/FuzzyClustering.java by checkstyle

Checks for long lines.

Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.

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

'static' modifier out of order with the JLS suggestions.
Open

    public final static class MainParameters {

Checks that the order of modifiers conforms to the suggestions inthe JavaLanguage specification, § 8.1.1, 8.3.1, 8.4.3 and9.4. The correct order is:

  1. public
  2. protected
  3. private
  4. abstract
  5. default
  6. static
  7. final
  8. transient
  9. volatile
  10. synchronized
  11. native
  12. strictfp

In additional, modifiers are checked to ensure all annotations aredeclared before all other modifiers.

Rationale: Code is easier to read if everybody follows a standard.

ATTENTION: We skiptype annotations from validation.

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

Severity
Category
Status
Source
Language