SiLeBAT/FSK-Lab

View on GitHub

Showing 14,752 of 14,752 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    private static List<KnimeTuple> getTuples(DataTable table) {
        boolean isTertiaryModel = SchemaFactory.createM12Schema().conforms(
                table);
        boolean containsData = SchemaFactory.createDataSchema().conforms(table);
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/predictorview/PredictorViewNodeModel.java on lines 360..383

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            for (PmmXmlElementConvertable el : indepVarMap.get(id)
                    .getElementSet()) {
                IndepXml element = (IndepXml) el;

                arguments.put(element.name,
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/secondarymodelanddataview/TableReader.java on lines 340..351

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            for (PmmXmlElementConvertable el : paramMap.get(id).getElementSet()) {
                ParamXml element = (ParamXml) el;

                constants.put(element.name, element.value);
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/secondarypredictorview/TableReader.java on lines 346..359

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if (!plotable.isPlotable()) {
                stringColumns.get(ChartConstants.STATUS).add(
                        ChartConstants.FAILED);
            } else if (PmmUtilities.isOutOfRange(paramMap.get(id))) {
                stringColumns.get(ChartConstants.STATUS).add(
de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/secondarymodelanddataview/TableReader.java on lines 456..467

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    private Object getAgentAttribute(boolean id, boolean name, boolean detail) throws PmmException {
        PmmXmlDoc agentXmlDoc = getAgent();
        if (agentXmlDoc == null) agentXmlDoc = new PmmXmlDoc();
        AgentXml ax = null;
        for (PmmXmlElementConvertable el : agentXmlDoc.getElementSet()) {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/PmmTimeSeries.java on lines 199..213

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    private Object getMatrixAttribute(boolean id, boolean name, boolean detail) throws PmmException {
        PmmXmlDoc matrixXmlDoc = getMatrix();
        if (matrixXmlDoc == null) matrixXmlDoc = new PmmXmlDoc();
        MatrixXml mx = null;
        for (PmmXmlElementConvertable el : matrixXmlDoc.getElementSet()) {
de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/PmmTimeSeries.java on lines 214..228

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

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);
Severity
Category
Status
Source
Language