Showing 6,111 of 13,975 total issues
Builder
has 214 methods (exceeds 20 allowed). Consider refactoring. Open
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:org.nd4j.ir.MappingRule)
org.nd4j.ir.MapperNamespace.MappingRuleOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
Method initAttributes
has a Cognitive Complexity of 220 (exceeds 20 allowed). Consider refactoring. Open
override fun <GRAPH_TYPE : GeneratedMessageV3, NODE_TYPE : GeneratedMessageV3, OP_DEF_TYPE : GeneratedMessageV3, TENSOR_TYPE : GeneratedMessageV3, ATTR_DEF_TYPE : GeneratedMessageV3, ATTR_VALUE_TYPE : GeneratedMessageV3, DATA_TYPE : ProtocolMessageEnum> initAttributes(
df: DifferentialFunction,
sd: SameDiff,
descriptorAndContext: Pair<MappingContext<GRAPH_TYPE, NODE_TYPE, OP_DEF_TYPE, TENSOR_TYPE, ATTR_DEF_TYPE, ATTR_VALUE_TYPE, DATA_TYPE>, OpNamespace.OpDescriptor>
) {
- 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
File BaseCudaDataBuffer.java
has 1552 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
NDArrayFactory
has 202 methods (exceeds 20 allowed). Consider refactoring. Open
public interface NDArrayFactory {
char FORTRAN = 'f';
char C = 'c';
MultiLayerNetwork
has 195 methods (exceeds 20 allowed). Consider refactoring. Open
@Slf4j
public class MultiLayerNetwork implements Serializable, Classifier, Layer, NeuralNetwork {
//the hidden neural network layers (including output layer)
protected Layer[] layers;
File StaticInfoEncoder.java
has 1456 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
ComputationGraph
has 190 methods (exceeds 20 allowed). Consider refactoring. Open
@Slf4j
public class ComputationGraph implements Serializable, Model, NeuralNetwork {
protected ComputationGraphConfiguration configuration;
protected boolean initCalled = false;
File TrainModule.java
has 1428 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
File Math.kt
has 1408 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
NDMath
has 185 methods (exceeds 20 allowed). Consider refactoring. Open
public class NDMath {
public NDMath() {
}
/**
StaticInfoDecoder
has 183 methods (exceeds 20 allowed). Consider refactoring. Open
@javax.annotation.Generated(value = {"org.deeplearning4j.ui.stats.sbe.StaticInfoDecoder"})
@SuppressWarnings("all")
public class StaticInfoDecoder {
public static final int BLOCK_LENGTH = 40;
public static final int TEMPLATE_ID = 1;
Function readGraphStructure
has a Cognitive Complexity of 178 (exceeds 5 allowed). Consider refactoring. Open
function readGraphStructure(){
//First: load data
if (file) {
var fr = new FileReader();
var fileData = new Blob([file]); //TODO Don't load the whole file into memory at once!
- 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 processClazz
has 726 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void processClazz(Map<String, List<ArgDescriptorProposal>> ret, Set<String> opNamesForDifferentialFunction, Class<?> clazz) {
try {
Object funcInstance = clazz.newInstance();
String name = null;
Method Bitwise
has a Cognitive Complexity of 190 (exceeds 20 allowed). Consider refactoring. Open
fun Bitwise() = Namespace("Bitwise"){
val namespaceJavaPackage = "org.nd4j.linalg.api.ops.impl.transforms.custom"
Op("leftShift") {
javaPackage = namespaceJavaPackage
- 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 doExec
has a Cognitive Complexity of 172 (exceeds 5 allowed). Consider refactoring. Open
public ExecutionResult doExec(DifferentialFunction op,
OpContext opContext,
FrameIter outputFrameIter,
Set<VarId> opInputs, Set<VarId> allIterInputs,
Set<String> constAndPhInputs,
- 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
File dl4j-ui.js
has 1332 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
Method outputOfLayersDetached
has a Cognitive Complexity of 170 (exceeds 5 allowed). Consider refactoring. Open
protected INDArray[] outputOfLayersDetached(boolean train, @NonNull FwdPassType fwdPassType, @NonNull int[] layerIndexes, @NonNull INDArray[] features,
INDArray[] fMask, INDArray[] lMasks, boolean clearLayerInputs, boolean detachedInputs, MemoryWorkspace outputWorkspace){
if(features.length != numInputArrays){
throw new IllegalArgumentException("Invalid number of input arrays: network has " + numInputArrays
+ " inputs, got " + features.length + " input arrays");
- 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
File NativeOpExecutioner.java
has 1305 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
File UpdateEncoder.java
has 1298 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
NDBase
has 166 methods (exceeds 20 allowed). Consider refactoring. Open
public class NDBase {
public NDBase() {
}
/**