Showing 24 of 50 total issues
Method getJsonParser
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
private JsonParser getJsonParser(final String value) {
return new JsonParser() {
@Override
public ObjectCodec getCodec() {
return null;
- Create a ticketCreate a ticket
CustomDateDeserializerTest
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
public class CustomDateDeserializerTest {
public static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
@Test(enabled = false)
- Create a ticketCreate a ticket
JToggl
has 38 methods (exceeds 20 allowed). Consider refactoring. Open
public class JToggl {
/**
* Root URL for API.
*/
- Create a ticketCreate a ticket
File JToggl.java
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jtoggl - Java Wrapper for Toggl REST API https://www.toggl.com/public/api
*
* Copyright (C) 2011 by simas GmbH, Moosentli 7, 3235 Erlach, Switzerland
* http://www.simas.ch
- Create a ticketCreate a ticket
TimeEntry
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
@JsonRootName("time_entry")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TimeEntry implements Cloneable, WithWorkspace, WithId, WithProject {
@JsonProperty("id")
- Create a ticketCreate a ticket
User
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
@JsonRootName("user")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class User implements Cloneable, WithId {
@JsonProperty("id")
- Create a ticketCreate a ticket
File JTogglTest.java
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jtoggl - Java Wrapper for Toggl REST API https://www.toggl.com/public/api
*
* Copyright (C) 2011 by simas GmbH, Moosentli 7, 3235 Erlach, Switzerland
* http://www.simas.ch
- Create a ticketCreate a ticket
JTogglTest
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
@Test
public class JTogglTest {
private static JToggl jToggl;
private static TimeEntry timeEntry;
- Create a ticketCreate a ticket
Task
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
@JsonRootName("task")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Task implements Cloneable, WithWorkspace, WithUser, WithProject, WithId {
@JsonProperty("id")
- Create a ticketCreate a ticket
ProjectUser
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
@JsonRootName("user")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ProjectUser implements Cloneable, WithWorkspace, WithUser, WithId {
@JsonProperty("id")
- Create a ticketCreate a ticket
Method stripe
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private static <T extends Cloneable & WithId> T stripe(T clientObject) {
if (clientObject instanceof WithWorkspace) {
WithWorkspace ww = (WithWorkspace) clientObject;
if (((WithWorkspace) clientObject).getWorkspaceId() == null && ((WithWorkspace) clientObject).getWorkspace() != null) {
ww.setWorkspaceId(ww.getWorkspace().getId());
- Read upRead up
- Create a ticketCreate a ticket
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 beforeClass
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
@BeforeClass
public static void beforeClass() throws Exception {
String togglUsername = System.getenv("TOGGL_USERNAME");
if (togglUsername == null) {
- Create a ticketCreate a ticket
Method beforeClass
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
@BeforeClass
public static void beforeClass() throws Exception {
String togglUsername = System.getenv("TOGGL_USERNAME");
if (togglUsername == null) {
- Read upRead up
- Create a ticketCreate a ticket
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 startStopTimeEntry
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Test(dependsOnMethods = "createProject")
public void startStopTimeEntry() throws Exception {
TimeEntry current = jToggl.getCurrentTimeEntry();
Assert.assertNull(current);
- Create a ticketCreate a ticket
Method createProject
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Test(dependsOnMethods = {"createClient"})
public void createProject() {
List<Project> projects = jToggl.getProjects();
if (projects != null) {
for (Project project : projects) {
- Read upRead up
- Create a ticketCreate a ticket
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 createClient
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Test(dependsOnMethods = {"getWorkspaces"})
public void createClient() {
ProjectClient cl = new ProjectClient();
cl.setName("JUnit Client");
cl.setWorkspace(workspace);
- Read upRead up
- Create a ticketCreate a ticket
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 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
- Read upRead up
- Create a ticketCreate a ticket
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 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
- Read upRead up
- Create a ticketCreate a ticket
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 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
- Read upRead up
- Create a ticketCreate a ticket
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 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
- Read upRead up
- Create a ticketCreate a ticket
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"