All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lu.uni.serval.ikora.smells.SmellCheck Maven / Gradle / Ivy

There is a newer version: 0.1.19
Show newest version
package lu.uni.serval.ikora.smells;

import lu.uni.serval.ikora.core.analytics.difference.Edit;
import lu.uni.serval.ikora.core.model.*;

import java.util.Arrays;
import java.util.Set;

public interface SmellCheck {
    SmellResult computeMetric(TestCase testCase, SmellConfiguration configuration);
    boolean isFix(Edit edit, Set nodes, SmellConfiguration configuration);

    static boolean isFix(Edit edit, Set nodes, Edit.Type... types){
        if(Arrays.stream(types).noneMatch(t -> edit.getType() == t)){
            return false;
        }

        return nodes.contains(edit.getLeft());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy