SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Function _create has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    async _create() {
        let O = this;
        _log('TABLE / _create', 'primary');

        // current state of view
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.js - About 1 hr 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 retrieveBackground has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private GenericModelDataBackground retrieveBackground(Sheet sheet) {

        final GenericModelDataBackground background = new GenericModelDataBackground();

        try {

Method retrieveAssay has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static Assay retrieveAssay(Row row, Map<String, Integer> columns) {

        // Check first mandatory properties
        final Cell nameCell = row.getCell(columns.get("name"));
        if (nameCell.getCellTypeEnum() != CellType.STRING) {

Method retrieveBackground has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private GenericModelDataBackground retrieveBackground(Sheet sheet) {

        final GenericModelDataBackground background = new GenericModelDataBackground();

        try {

Method retrieveBackground has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private GenericModelDataBackground retrieveBackground(Sheet sheet) {
        GenericModelDataBackground background = new GenericModelDataBackground();

        try {
            Study study = retrieveStudy(sheet);

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

    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case MetadataPackage.GENERAL_INFORMATION__NAME:
                return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);

Method retrieveBackground has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private GenericModelDataBackground retrieveBackground(Sheet sheet) {

        GenericModelDataBackground background = new GenericModelDataBackground();

        try {

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

    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case MetadataPackage.GENERAL_INFORMATION__NAME:
                return getName();

Method execute has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
            final ExecutionContext exec) throws Exception {
        BufferedDataContainer container = exec
                .createDataContainer(SchemaFactory.createDataSchema()

Method setIndependentVariableData has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  @Override
  void setIndependentVariableData() {

    // Declare list of variables
    List<VariableData> variables = new LinkedList<>();

Method mergeTuples has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private static KnimeTuple mergeTuples(final KnimeTuple dataTuple, final KnimeTuple m1Tuple,
      final KnimeTuple m2Tuple) {

    final KnimeTuple tuple = new KnimeTuple(SchemaFactory.createM12DataSchema());

Method createChart has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private void createChart() {
        String selectedID = null;

        if (configPanel.isDisplayFocusedRow()) {
            selectedID = selectionPanel.getFocusedID();

Method mergeTuples has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public static KnimeTuple mergeTuples(KnimeTuple dataTuple, KnimeTuple m1Tuple, KnimeTuple m2Tuple) {

    KnimeTuple tuple = new KnimeTuple(SchemaFactory.createM12DataSchema());

    tuple.setValue(TimeSeriesSchema.ATT_CONDID, dataTuple.getInt(TimeSeriesSchema.ATT_CONDID));

Method getSQL has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private String getSQL(MyTable myFT, String myMN) {
        String sql = "";
        MyTable mnT = (myMN == null || myMN.equals("INT") ? null : DBKernel.myDBi.getTable(myMN));
        String toSelect = DBKernel.delimitL(myFT.getTablename()) + "." + DBKernel.delimitL("ID");
        String toJoin = myFT.getMNJoin(mnT);
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/MyTable.java - About 1 hr to fix

Method getReihenfolgePrev has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private int getReihenfolgePrev(Vector<Integer[]> org_dst, Vector<Integer> indexReihenfolge) {
            int wegPfeile = 0; // Ein Knoten kann mehrere Pfeile haben, die ihn verlassen ..., z.B. Salami_Test_Britta, gleich der erste Knoten "Wareneingang" führt zum einen zu "Speck (Meat, Raw)" zum anderen zu "Schweinefleich , roh (Meat, Raw)"
            if (indexReihenfolge != null) {
                Vector<Vector<Integer>> rhflgn = new Vector<>();
                int firstIndex = indexReihenfolge.get(0);

Method insertDBL has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static Object insertDBL(final String tablename, final String fieldname, final Integer tableID, Object kzID, String kz, Object value) {
        try {
            if (kzID == null) {
                kzID = DBKernel.getValue(tablename, "ID", tableID + "", fieldname);
                if (kzID == null) {
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/DBKernel.java - About 1 hr to fix

Method LD has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static int LD (String s, String t) {
    int d[][]; // matrix
    int n; // length of s
    int m; // length of t
    int i; // iterates through s
Severity: Minor
Found in org.hsh.bfr.db/src/org/hsh/bfr/db/Levenshtein.java - About 1 hr to fix

Method retrievePopulationGroup has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static PopulationGroup retrievePopulationGroup(String[][] values) {

      int columnI = RakipColumn.I.ordinal();

      // Check mandatory properties

Method retrievePopulationGroup has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static PopulationGroup retrievePopulationGroup(String[][] values) {

      int columnI = RakipColumn.I.ordinal();

      // Check mandatory properties

Method retrievePopulationGroup has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static PopulationGroup retrievePopulationGroup(String[][] values) {

      int columnI = RakipColumn.I.ordinal();

      // Check mandatory properties
Severity
Category
Status
Source
Language