alsutton/enterprisepasswordsafe

View on GitHub

Showing 189 of 206 total issues

Avoid too many return statements within this method.
Open

        return ACCESIBILITY_ALLOWED;

    Avoid too many return statements within this method.
    Open

                    return password;

      Avoid too many return statements within this method.
      Open

                      return theNode.getName();

        Avoid too many return statements within this method.
        Open

                return "<< UNKNOWN >>";

          Avoid too many return statements within this method.
          Open

                      return "node with the id " + variableId;

            Avoid too many return statements within this method.
            Open

                        return ACCESIBILITY_ALLOWED;

              Avoid too many return statements within this method.
              Open

                              return keyComparison == 0 ? passwordObject0.getId().compareTo(passwordObject1.getId()) : keyComparison;
              Severity: Major
              Found in src/main/java/com/enterprisepasswordsafe/ui/web/servlets/Explorer.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return ACCESIBILITY_DENIED;

                  Avoid too many return statements within this method.
                  Open

                                  return;
                  Severity: Major
                  Found in src/main/java/com/enterprisepasswordsafe/ui/web/servlets/Welcome.java - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return "Expires in " + expiryDistance + " days";
                    Severity: Major
                    Found in src/main/java/com/enterprisepasswordsafe/database/PasswordBase.java - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return ACCESIBILITY_ALLOWED;

                        Avoid too many return statements within this method.
                        Open

                                    return "Expires Tomorrow";
                        Severity: Major
                        Found in src/main/java/com/enterprisepasswordsafe/database/PasswordBase.java - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return value;
                          Severity: Major
                          Found in src/main/java/com/enterprisepasswordsafe/database/ConfigurationDAO.java - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return userRule;

                              Method determineHierarchyEditability has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private void determineHierarchyEditability(HttpServletRequest request, User user)
                                          throws SQLException {
                                      request.setAttribute("edithierarchy_allowed", "N");
                                      if(userClassifier.isNonViewingUser(user)) {
                                          return;
                              Severity: Minor
                              Found in src/main/java/com/enterprisepasswordsafe/ui/web/servlets/Explorer.java - About 25 mins to fix

                              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 performAction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private String performAction(final HttpServletRequest request, final User user, final String action,
                                                               final HierarchyNode node)
                                          throws SQLException, GeneralSecurityException, IOException {
                                      if (action.equals(EditHierarchy.ADD_ACTION)) {
                                          return "/subadmin/add_subnode.jsp";

                              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 importPermission has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private void importPermission(final Password thePassword, final String permission)
                                          throws SQLException, GeneralSecurityException, UnsupportedEncodingException {
                                      char permissionType = permission.charAt(1);
                                      if (permissionType != 'M' && permissionType != 'V') {
                                          return;

                              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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  @Override
                                  public final void process(final HierarchyNode node, final AccessControledObject aco) {
                                      if (aco == null) {
                                          return;
                                      }

                              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 doPost has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  @Override
                                  protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
                                      throws ServletException, IOException {
                                      User thisUser = SecurityUtils.getRemoteUser(request);
                              
                              

                              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 convertSemisToLineBreaks has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private String convertSemisToLineBreaks(final String original) {
                                      if (original == null) {
                                          return null;
                                      }
                              
                              
                              Severity: Minor
                              Found in src/main/java/com/enterprisepasswordsafe/ui/web/servlets/ViewSystem.java - About 25 mins to fix

                              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

                              Severity
                              Category
                              Status
                              Source
                              Language