LearnPAd/learnpad

View on GitHub
lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/ado/impl/DocumentRootImpl.java

Summary

Maintainability
F
6 days
Test Coverage

DocumentRootImpl has 73 methods (exceeds 20 allowed). Consider refactoring.
Open

public class DocumentRootImpl extends MinimalEObjectImpl.Container implements DocumentRoot {
    /**
     * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->

    File DocumentRootImpl.java has 585 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     */
    package eu.learnpad.transformations.metamodel_corpus.ado.impl;
    
    import org.eclipse.emf.common.notify.NotificationChain;

      Method eUnset has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @Override
          public void eUnset(int featureID) {
              switch (featureID) {
                  case AdoPackage.DOCUMENT_ROOT__MIXED:
                      getMixed().clear();

        Method eSet has 75 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            @Override
            public void eSet(int featureID, Object newValue) {
                switch (featureID) {
                    case AdoPackage.DOCUMENT_ROOT__MIXED:
                        ((FeatureMap.Internal)getMixed()).set(newValue);

          Method eGet has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Override
              public Object eGet(int featureID, boolean resolve, boolean coreType) {
                  switch (featureID) {
                      case AdoPackage.DOCUMENT_ROOT__MIXED:
                          if (coreType) return getMixed();

            Method eInverseRemove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
                    switch (featureID) {
                        case AdoPackage.DOCUMENT_ROOT__MIXED:
                            return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs);

              Method eIsSet has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Override
                  public boolean eIsSet(int featureID) {
                      switch (featureID) {
                          case AdoPackage.DOCUMENT_ROOT__MIXED:
                              return mixed != null && !mixed.isEmpty();

                Method eGet has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    @Override
                    public Object eGet(int featureID, boolean resolve, boolean coreType) {
                        switch (featureID) {
                            case AdoPackage.DOCUMENT_ROOT__MIXED:
                                if (coreType) return getMixed();

                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;

                    Avoid too many return statements within this method.
                    Open

                                    return;

                      Avoid too many return statements within this method.
                      Open

                                      if (coreType) return getXSISchemaLocation();

                        Avoid too many return statements within this method.
                        Open

                                        return;

                          Avoid too many return statements within this method.
                          Open

                                          return;

                            Avoid too many return statements within this method.
                            Open

                                            return;

                              Avoid too many return statements within this method.
                              Open

                                              return;

                                Avoid too many return statements within this method.
                                Open

                                                return;

                                  Avoid too many return statements within this method.
                                  Open

                                                  return;

                                    Avoid too many return statements within this method.
                                    Open

                                                    return;

                                      Avoid too many return statements within this method.
                                      Open

                                                      return;

                                        Avoid too many return statements within this method.
                                        Open

                                                        else return getXSISchemaLocation().map();

                                          Avoid too many return statements within this method.
                                          Open

                                                          return;

                                            Avoid too many return statements within this method.
                                            Open

                                                            return;

                                              Avoid too many return statements within this method.
                                              Open

                                                              return;

                                                Avoid too many return statements within this method.
                                                Open

                                                                return;

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                  return;

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                    return;

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                      return;

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                        return;

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                          return;

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                            return;

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                              return;

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                return;

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                  return;

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                    return;

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                      return;

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                        return;

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                          return;

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                    return super.eGet(featureID, resolve, coreType);

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                              return;

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                                return;

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                  return;

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                    return;

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                                      return;

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                        return;

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                          return;

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                            return;

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                              return;

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                                return;

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                                  return;

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                    return;

                                                                                                      There are no issues that match your filters.

                                                                                                      Category
                                                                                                      Status