class ChangeLogSyncTask extends AbstractChangeLogBasedTask {
    private String toTag;

    @Override
    public void executeWithLiquibaseClassloader() throws BuildException {<FILL_FUNCTION_BODY>}

    public void setToTag(String toTag) {
        this.toTag = toTag;
    }
}

        Liquibase liquibase = getLiquibase();
        OutputStreamWriter writer = null;
        try {
            FileResource outputFile = getOutputFile();
            if (outputFile != null) {
                writer = new OutputStreamWriter(outputFile.getOutputStream(), getOutputEncoding());
                liquibase.changeLogSync(toTag, new Contexts(getContexts()), getLabelFilter(), writer);
            } else {
                liquibase.changeLogSync(toTag, new Contexts(getContexts()), getLabelFilter());
            }
        } catch (UnsupportedEncodingException e) {
            throw new BuildException("Unable to generate sync SQL. Encoding [" + getOutputEncoding() + "] is not supported.", e);
        } catch (IOException e) {
            throw new BuildException("Unable to generate sync SQL. Error creating output writer.", e);
        } catch (LiquibaseException e) {
            throw new BuildException("Unable to sync change log: " + e.getMessage(), e);
        } finally {
            FileUtils.close(writer);
        }
    
<methods>public non-sealed void <init>() ,public java.lang.String getChangeLogDirectory() ,public java.lang.String getChangeLogFile() ,public liquibase.LabelExpression getLabels() ,public java.lang.String getOutputEncoding() ,public java.lang.String getSearchPath() ,public void setLabelFilter(java.lang.String) ,public void setLabels(java.lang.String) <variables>private java.lang.String changeLogDirectory,private java.lang.String changeLogFile,private java.lang.String contexts,private liquibase.LabelExpression labelFilter,private java.lang.String outputEncoding,private FileResource outputFile,private java.lang.String searchPath