Showing 239 of 782 total issues
Method processService
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_ANONYMOUS" })
public SearchDocumentResponse processService(
final SearchDocumentRequest serviceRequest) {
final SearchDocumentResponse inputValidation = inputValidation(serviceRequest);
- 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 addViewApplicationActionEventPageElementDailySummaryValues
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private static void addViewApplicationActionEventPageElementDailySummaryValues(final String label,
final Series series, final List<ViewApplicationActionEventPageElementDailySummary> list,
final DataSeries dataSeries, final SimpleDateFormat simpleDateFormat,
final ToLongFunction<ViewApplicationActionEventPageElementDailySummary> t) {
Method addRequestInputFormFields
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public <T extends Serializable> void addRequestInputFormFields(final FormLayout panelContent, final T item,
final Class<T> beanType, final List<String> displayProperties,final String buttonLabel,final ClickListener buttonListener) {
Method createPagingControls
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
void createPagingControls(AbstractOrderedLayout content, String name, String pageId, Long size, int pageNr,
int resultPerPage);
Method createPagingControls
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void createPagingControls(final AbstractOrderedLayout content, final String name, final String pageId, final Long size, final int pageNr,
final int resultPerPage) {
Method addRequestInputFormFields
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
<T extends Serializable> void addRequestInputFormFields(FormLayout panelContent, T item, Class<T> beanType, List<String> displayProperties,String buttonLabel,ClickListener buttonListener);
Method entriesSortedByValues
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private SortedSet<Map.Entry<String, List<T>>> entriesSortedByValues(final Map<String, List<T>> map,
final StepMapping<T> stepMapping) {
final Comparator<? super Entry<String, List<T>>> compare = (o1, o2) -> {
final Comparator<T> compare1 = (o11, o21) -> {
- 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 findOrderedListByEmbeddedProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public final <T, V> List<T> findOrderedListByEmbeddedProperty(final Class<T> clazz, final SingularAttribute<T, V> property,
final Class<V> clazz2, final SingularAttribute<V, ? extends Object> property2, final Object value,
final SingularAttribute<V, ? extends Object> orderByProperty) {
Method findOrderedByPropertyListByEmbeddedProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public <T, V> List<T> findOrderedByPropertyListByEmbeddedProperty(final Class<T> clazz, final SingularAttribute<T, V> property,
final Class<V> clazz2, final SingularAttribute<V, ? extends Object> property2, final Object value,
final SingularAttribute<T, ? extends Object> orderByProperty) {
Method processService
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
@Secured({ "ROLE_ANONYMOUS" })
public RegisterUserResponse processService(final RegisterUserRequest serviceRequest) {
final RegisterUserResponse inputValidation = inputValidation(serviceRequest);
if (inputValidation != 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 findOrderedByPropertyListByEmbeddedProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
<T, V> List<T> findOrderedByPropertyListByEmbeddedProperty(Class<T> clazz, SingularAttribute<T, V> property,
Class<V> clazz2, SingularAttribute<V, ? extends Object> property2, Object value,
SingularAttribute<T, ? extends Object> orderByProperty);
Method findOrderedByPropertyListByEmbeddedProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
<T,V> List<T> findOrderedByPropertyListByEmbeddedProperty(Class<T> clazz,
SingularAttribute<T, V> property,Class<V> clazz2,
SingularAttribute<V, ? extends Object> property2, Object value,SingularAttribute<T, ? extends Object> orderByProperty);
Method findOrderedListByEmbeddedProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
<T, V> List<T> findOrderedListByEmbeddedProperty(Class<T> clazz, SingularAttribute<T, V> property, Class<V> clazz2,
SingularAttribute<V, ? extends Object> property2, Object value,
SingularAttribute<V, ? extends Object> orderByProperty);
Method findOrderedByPropertyListByEmbeddedProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public final <T, V> List<T> findOrderedByPropertyListByEmbeddedProperty(final Class<T> clazz, final SingularAttribute<T, V> property,
final Class<V> clazz2, final SingularAttribute<V, ? extends Object> property2, final Object value,
final SingularAttribute<T, ? extends Object> orderByProperty) {
Method findOrderedListByEmbeddedProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
<T,V> List<T> findOrderedListByEmbeddedProperty(Class<T> clazz,
SingularAttribute<T, V> property,Class<V> clazz2,
SingularAttribute<V, ? extends Object> property2, Object value,SingularAttribute<V, ? extends Object> orderByProperty);
Method findOrderedListByEmbeddedProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public <T, V> List<T> findOrderedListByEmbeddedProperty(final Class<T> clazz, final SingularAttribute<T, V> property,
final Class<V> clazz2, final SingularAttribute<V, ? extends Object> property2, final Object value,
final SingularAttribute<V, ? extends Object> orderByProperty) {
Method addDataSeries
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static void addDataSeries(final SimpleDateFormat simpleDateFormat,
final SimpleDateFormat parseInputDateFormat, final DataSeries dataSeries, final Series series,
final Entry<String, List<ViewRiksdagenDocumentTypeDailySummary>> entry) {
Method addPagingLink
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addPagingLink(final String label, final String name, final String pageId, final long maxPages, final HorizontalLayout pagingControls) {
Method unmarshallXml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public Object unmarshallXml(final Unmarshaller unmarshaller, final String accessUrl, final String nameSpace,
final String replace, final String with) throws XmlAgentException {
Method addBallotData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addBallotData(final DataValueCalculator dataValueCalculator, final DataSeries dataSeries,
final SimpleDateFormat simpleDateFormat, final Series series,
final Entry<String, List<ViewRiksdagenVoteDataBallotPartySummaryDaily>> entry) {