public void analyze(ScenarioModel scenarioModel) {
        if (scenarioModel.getScenarioCases().size() == 1) {
            return;
        }

        if (!isStructuralIdentical(scenarioModel)) {
            log.debug("Cases are structurally different, cannot create data table");
            return;
        }
        scenarioModel.setCasesAsTable(true);

        // get all words that are arguments
        List<List<Word>> argumentWords = collectArguments(scenarioModel);
        AssertionUtil.assertFalse(argumentCountDiffer(argumentWords), "Argument count differs");

        // filter out arguments that are the same in all cases
        // only keep arguments that actually differ between cases
        List<List<Word>> differentArguments = getDifferentArguments(argumentWords);

        // now join arguments that are the same within each case
        List<List<JoinedArgs>> joinedArgs = joinEqualArguments(differentArguments);

        // finally we try to use the parameter names of the scenario
        List<List<String>> explicitParameterValues = getExplicitParameterValues(scenarioModel.getScenarioCases());
        List<String> argumentNames =
            findArgumentNames(joinedArgs, explicitParameterValues, scenarioModel.getExplicitParameters());

        List<List<Word>> arguments = getFirstWords(joinedArgs);

        setParameterNames(joinedArgs, argumentNames);
        scenarioModel.setDerivedParameters(argumentNames);

        for (int caseCounter = 0; caseCounter < arguments.size(); caseCounter++) {
            scenarioModel.getCase(caseCounter).setDerivedArguments(getFormattedValues(arguments.get(caseCounter)));
        }
    }
Analyzes a report model and tries to infer which step method arguments match to which case argument.

This is done by comparing all cases of a scenario and find out which method arguments
match in all cases to the same parameter.

The algorithm is rather complex, but I could not find an easier one yet.
jgiven-core/src/main/java/com/tngtech/jgiven/report/analysis/CaseArgumentAnalyser.java