Showing 91 of 111 total issues
Method executeImpl
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected Map<String, Object> executeImpl(final WebScriptRequest request, final Status status, final Cache cache)
{
Map<String, Object> result = null;
String targetPath = null;
Method run
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void run()
{
boolean inPlacePossible = false;
Method categoriseFile
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private void categoriseFile(final Map<String, SortedMap<BigDecimal, Pair<File, File>>> categorisedFiles, final File file)
{
if (file != null)
{
if (file.canRead())
- 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 importVersionMetadata
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final void importVersionMetadata(final NodeRef nodeRef,
final BulkImportItemVersion version,
final boolean dryRun)
throws InterruptedException
{
Method toString
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public String toString()
{
final StringBuilder result = new StringBuilder(1024);
final Collection<Model> dataDictionary = getDataDictionary();
Method classDefinitionToString
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
private String classDefinitionToString(final ClassDefinition definition)
{
StringBuilder result = null;
if (definition != null)
Function getStatusInfo
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getStatusInfo()
{
log.debug('Retrieving import status information...');
$.getJSON(statusURI, function(data)
Method scanDirectory
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void scanDirectory(final BulkImportSourceStatus status,
final BulkImportCallback callback,
final File sourceDirectory,
final File directory,
final boolean submitFiles)
Method findOrCreateNode
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final NodeRef findOrCreateNode(final NodeRef target,
final BulkImportItem<BulkImportItemVersion> item,
final boolean replaceExisting,
final boolean dryRun)
{
Method importVersion
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private final void importVersion(final NodeRef nodeRef,
final BulkImportItemVersion previousVersion,
final BulkImportItemVersion version,
final boolean dryRun,
final boolean onlyOneVersion)
- 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 importFile
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private final void importFile(final NodeRef nodeRef,
final BulkImportItem<BulkImportItemVersion> item,
final boolean dryRun)
throws InterruptedException
{
- 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 start
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void start(final BulkImportSource source,
final Map<String, List<String>> parameters,
final NodeRef target)
{
Method loadMetadataIfNecessary
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final synchronized void loadMetadataIfNecessary()
{
if (cachedMetadata == null)
{
cachedMetadata = metadataLoader.loadMetadata(metadataReference);
Method categoriseFile
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void categoriseFile(final Map<String, SortedMap<BigDecimal, Pair<File, File>>> categorisedFiles, final File file)
{
if (file != null)
{
if (file.canRead())
Method execute
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void execute(final Runnable command)
{
try
{
Function refreshTextElements
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function refreshTextElements(cd)
{
log.debug('Refreshing text elements...');
if (cd != null)
Function startBytesPerSecondChart
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function startBytesPerSecondChart()
{
log.debug('Starting bytes per second chart...');
var canvasElement = document.getElementById('bytesPerSecondChart');
Function startNodesPerSecondChart
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function startNodesPerSecondChart()
{
log.debug('Starting nodes per second chart...');
var canvasElement = document.getElementById('nodesPerSecondChart');
Method importVersionContent
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final void importVersionContent(final NodeRef nodeRef,
final BulkImportItemVersion version,
final boolean dryRun)
throws InterruptedException
{
Method importComplete
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public final void importComplete(BulkImportStatus importStatus)
{
if (info(log))
{