Showing 28 of 106 total issues
File SimpleDatasafeServiceImpl.java
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
package de.adorsys.datasafe.simple.adapter.impl;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.Protocol;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
Method useAmazonS3
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static SystemRootAndStorageService useAmazonS3(AmazonS3DFSCredentials dfsCredentials, PathEncryptionConfig pathEncryptionConfig) {
AmazonS3DFSCredentials amazonS3DFSCredentials = dfsCredentials;
LogStringFrame lsf = new LogStringFrame();
lsf.add("AMAZON S3");
lsf.add("root bucket : " + amazonS3DFSCredentials.getRootBucket());
File filetree.component.ts
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {CollectionViewer, SelectionChange} from '@angular/cdk/collections';
import {FlatTreeControl} from '@angular/cdk/tree';
import {Component, Inject, Injectable} from '@angular/core';
import {BehaviorSubject, merge, Observable} from 'rxjs';
import {map} from 'rxjs/operators';
Method useAmazonS3
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private static SystemRootAndStorageService useAmazonS3(AmazonS3DFSCredentials dfsCredentials, PathEncryptionConfig pathEncryptionConfig) {
AmazonS3DFSCredentials amazonS3DFSCredentials = dfsCredentials;
LogStringFrame lsf = new LogStringFrame();
lsf.add("AMAZON S3");
lsf.add("root bucket : " + amazonS3DFSCredentials.getRootBucket());
- 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 main
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
Method process
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
RuntimeDelegateGenerator generator = new RuntimeDelegateGenerator();
for (TypeElement annotation : annotations) {
- 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 process
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
RuntimeDelegateGenerator generator = new RuntimeDelegateGenerator();
for (TypeElement annotation : annotations) {
Method main
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
- 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 deregister
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void deregister(UserIDAuth userID) {
if (!retrievalService.userExists(userID.getUserID())) {
log.debug("User deregistation failed. User '{}' does not exist", userID);
throw new UserNotFoundException("User not found: " + userID);
Method getStorageService
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static S3StorageService getStorageService(String accessKey, String secretKey, String url, String region,
String bucket) {
AmazonS3ClientBuilder amazonS3ClientBuilder = AmazonS3ClientBuilder.standard()
.withCredentials(
new AWSStaticCredentialsProvider(
Function createWindow
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createWindow() {
var electronScreen = electron_1.screen;
var size = electronScreen.getPrimaryDisplay().workAreaSize;
// Create the browser window.
win = new electron_1.BrowserWindow({
Function createWindow
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createWindow() {
const electronScreen = screen;
const size = electronScreen.getPrimaryDisplay().workAreaSize;
Method constructor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private MethodSpec constructor(TypeElement forClass, Class contextClass,
ExecutableElement usingConstructor, Set<Class> addAnnotations) {
MethodSpec.Builder method = MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC);
ParameterSpec contextParam = ParameterSpec.builder(
ClassName.get(contextClass),
Method getSimpleDataSafeServiceWithSubdir
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public SimpleDatasafeService getSimpleDataSafeServiceWithSubdir(String subdirBelowRoot) {
if (dfsCredentials instanceof AmazonS3DFSCredentials) {
AmazonS3DFSCredentials amazonS3DFSCredentials = (AmazonS3DFSCredentials) dfsCredentials;
return new SimpleDatasafeServiceImpl(
amazonS3DFSCredentials.toBuilder().rootBucket(
- 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 run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void run() {
String user = profile.getCli().auth().getUserID().getValue();
Uri publicKeys = inpPath("Public keys", atRoot(user, "pubkeys"));
Uri inbox = inpPath("Your INBOX folder", atRoot(user, "inbox/"));
Function exports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
Method readVersionedDocument
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void readVersionedDocument(@RequestHeader String user,
@RequestHeader String password,
@RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId,
@PathVariable String path,
HttpServletResponse response) {
Method readDocument
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void readDocument(@RequestHeader String user,
@RequestHeader String password,
@RequestHeader(defaultValue = StorageIdentifier.DEFAULT_ID) String storageId,
@PathVariable String path,
HttpServletResponse response) {
Method getStorageService
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static S3StorageService getStorageService(String accessKey, String secretKey, String url, String region,
String bucket) {
Method generate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
void generate(TypeElement forClass,
Class contextClass,
ExecutableElement usingConstructor,
Set<Class> addAnnotations,
Filer filer) {