Skip to content
André Silva edited this page Jun 29, 2021 · 8 revisions

The two main classes of the flacoco API are Flacoco and FlacocoAPI.

Flacoco

This class serves as the main entry point of flacoco. Currently, it supports two output formats:

Default mode

The default mode returns a mapping between a string representation of a source code line (e.g. fr/spoonlabs/FLtest1/Calculator@-@14, where fr.spoonlabs.FLtest1.Calculator is the fully-qualified class name and 14 is the line number), and a suspiciousness score.

Flacoco flacoco = new Flacoco();
Map<String, Double> resultDefault = flacoco.runDefault();

Spoon mode

The Spoon mode returns a mapping between a CtStatement. More information on how source code lines are mapped to CtStatements can be found under SpoonConverter.

Flacoco flacoco = new Flacoco();
Map<CtStatement, Double> resultSpoon = flacoco.runSpoon();

Clone this wiki locally