lp-model-transformer/src/main/java/eu/learnpad/transformations/metamodel_corpus/xwiki/impl/DocumentRootImpl.java
File DocumentRootImpl.java
has 549 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
*/
package eu.learnpad.transformations.metamodel_corpus.xwiki.impl;
import java.util.Collection;
DocumentRootImpl
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
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 -->
Method eSet
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case XwikiPackage.DOCUMENT_ROOT__MIXED:
Method eUnset
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public void eUnset(int featureID) {
switch (featureID) {
case XwikiPackage.DOCUMENT_ROOT__MIXED:
getMixed().clear();
Method eGet
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case XwikiPackage.DOCUMENT_ROOT__MIXED:
if (coreType) return getMixed();
Method eInverseRemove
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case XwikiPackage.DOCUMENT_ROOT__MIXED:
return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs);
Method eIsSet
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case XwikiPackage.DOCUMENT_ROOT__MIXED:
return mixed != null && !mixed.isEmpty();
Method eGet
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case XwikiPackage.DOCUMENT_ROOT__MIXED:
if (coreType) return getMixed();
- 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
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
if (coreType) return getXSISchemaLocation();
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return super.eGet(featureID, resolve, coreType);
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
else return getXSISchemaLocation().map();
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;