Showing 67 of 91 total issues
Method ingestServiceData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public TaskReport ingestServiceData(PluginTask task, RecordImporter recordImporter, int taskIndex, PageBuilder pageBuilder)
{
// query by date range and incremental import and not preview
if (task.getQueryBy().isPresent() && task.getQueryBy().get() == QueryBy.DATE_RANGE && task.getIncremental() && !Exec.isPreview()) {
- 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 getCustomObjectRecordWithPagination
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private <T> RecordPagingIterable<T> getCustomObjectRecordWithPagination(final String endPoint, final String customObjectFilterType, final String customObjectFields, final Integer fromValue, final Integer toValue, final Class<T> recordClass)
Method doPost
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected <T> T doPost(final String target, final Map<String, String> headers, final Multimap<String, String> params, final String content, Jetty94ResponseReader<T> responseReader)
Method extractAllActivity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public File extractAllActivity(List<Integer> activityTypeIds, Date startTime, Date endTime, int pollingTimeIntervalSecond, int bulkJobTimeoutSecond)
Method extractAllActivity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
File extractAllActivity(List<Integer> activityTypeIds, Date startTime, Date endTime, int pollingTimeIntervalSecond, int bulkJobTimeoutSecond);
Method getCustomObject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Iterable<ObjectNode> getCustomObject(String customObjectAPIName, String customObjectFilterType, String customObjectFields, Integer fromValue, Integer toValue);
Method doPost
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected <T> T doPost(final String target, final Map<String, String> headers, final Multimap<String, String> params, Jetty94ResponseReader<T> responseReader, final ContentProvider content)
Method getCustomObject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public Iterable<ObjectNode> getCustomObject(String customObjectAPIName, String customObjectFilterType, String customObjectFields, Integer fromValue, Integer toValue)
Method getCustomObject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public Iterable<ObjectNode> getCustomObject(String customObjectAPIName, String customObjectFilterType, String customObjectFields, Integer fromValue, Integer toValue)
Method getTokenPage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
private RecordPagingIterable.TokenPage<T> getTokenPage(RecordPagingIterable.TokenPage page)
{
ImmutableListMultimap.Builder params = new ImmutableListMultimap.Builder<>();
params.put("_method", "GET");
- 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 doRequestWithWrappedException
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private <T> T doRequestWithWrappedException(final String target, final HttpMethod method, final Map<String, String> headers, final Multimap<String, String> params, final ContentProvider contentProvider, Jetty94ResponseReader<T> responseReader)
{
try {
return doRequest(target, method, headers, params, contentProvider, responseReader);
}
- 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 buildConfigDiff
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public ConfigDiff buildConfigDiff(PluginTask task, Schema schema, int taskCount, List<TaskReport> taskReports)
{
ConfigDiff configDiff = super.buildConfigDiff(task, schema, taskCount, taskReports);
// set next next earliestUpdatedAt, latestUpdatedAt
- 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 equals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o)
{
if (this == o) {
return true;
- 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
Avoid too many return
statements within this method. Open
return "";
Avoid too many return
statements within this method. Open
return quotedValue.toString();
Avoid too many return
statements within this method. Open
return line.substring(valueStartPos, valueEndPos);
Avoid too many return
statements within this method. Open
return quotedValue.toString();
Avoid too many return
statements within this method. Open
return "";
Avoid too many return
statements within this method. Open
return line.substring(valueStartPos, valueEndPos);
Avoid too many return
statements within this method. Open
return line.substring(valueStartPos, valueEndPos);