class RollbackCommandStep extends AbstractRollbackCommandStep {

    public static final String[] COMMAND_NAME = {"rollback"};

    public static final CommandArgumentDefinition<String> TAG_ARG;
    public static final CommandArgumentDefinition<String> TAG_VERSION_ARG;

    static {
        CommandBuilder builder = new CommandBuilder(COMMAND_NAME);
        TAG_ARG = builder.argument("tag", String.class).required()
            .description("Tag to rollback to").build();

        TAG_VERSION_ARG = builder.argument("tagVersion",String.class)
                .description("Tag version to use for multiple occurrences of a tag")
                .setValueHandler(TagVersionEnum::handleTagVersionInput)
                .defaultValue(TagVersionEnum.OLDEST.name())
                .build();

        builder.addArgument(AbstractRollbackCommandStep.ROLLBACK_SCRIPT_ARG).build();
    }

    @Override
    public void run(CommandResultsBuilder resultsBuilder) throws Exception {<FILL_FUNCTION_BODY>}

    @Override
    public String[][] defineCommandNames() {
        return new String[][] { COMMAND_NAME };
    }

    @Override
    public void adjustCommandDefinition(CommandDefinition commandDefinition) {
        commandDefinition.setShortDescription("Rollback changes made to the database based on the specific tag");
    }


}

        RollbackReportParameters rollbackReportParameters = new RollbackReportParameters();
        rollbackReportParameters.setCommandTitle(
                StringUtil.upperCaseFirst(Arrays.toString(
                        defineCommandNames()[0]).replace("[","").replace("]","").replace("rollback", "rollback ").trim()));
        resultsBuilder.addResult("rollbackReport", rollbackReportParameters);
        CommandScope commandScope = resultsBuilder.getCommandScope();

        String tagToRollBackTo = commandScope.getArgumentValue(TAG_ARG);
        Scope.getCurrentScope().addMdcValue(MdcKey.ROLLBACK_TO_TAG, tagToRollBackTo);

        Database database = (Database) commandScope.getDependency(Database.class);
        rollbackReportParameters.setupDatabaseInfo(database);
        rollbackReportParameters.setRollbackTag(tagToRollBackTo);

        List<RanChangeSet> ranChangeSetList = database.getRanChangeSetList();
        TagVersionEnum tagVersion = TagVersionEnum.valueOf(commandScope.getArgumentValue(TAG_VERSION_ARG));
        try {
            AfterTagChangeSetFilter afterTagChangeSetFilter = new AfterTagChangeSetFilter(tagToRollBackTo, ranChangeSetList, tagVersion); // This can throw an exception
            this.doRollback(resultsBuilder, ranChangeSetList, afterTagChangeSetFilter, rollbackReportParameters);
        } catch (Exception exception) {
            rollbackReportParameters.setSuccess(false);
            String source = ExceptionDetails.findSource(database);
            ExceptionDetails exceptionDetails = new ExceptionDetails(exception, source);
            rollbackReportParameters.setRollbackException(exceptionDetails);
            throw exception;
        }
    
<methods>public non-sealed void <init>() ,public void adjustCommandDefinition(liquibase.command.CommandDefinition) ,public static void doRollback(liquibase.database.Database, java.lang.String, java.lang.String, liquibase.changelog.ChangeLogIterator, liquibase.changelog.ChangeLogParameters, liquibase.changelog.DatabaseChangeLog, liquibase.changelog.visitor.ChangeExecListener) throws java.lang.Exception,public static void doRollback(liquibase.database.Database, java.lang.String, java.lang.String, liquibase.changelog.ChangeLogIterator, liquibase.changelog.ChangeLogParameters, liquibase.changelog.DatabaseChangeLog, liquibase.changelog.visitor.ChangeExecListener, liquibase.report.RollbackReportParameters) throws java.lang.Exception,public List<Class<?>> requiredDependencies() <variables>public static final non-sealed CommandArgumentDefinition<java.lang.String> ROLLBACK_SCRIPT_ARG