// Path: src/main/java/de/aaschmid/gradle/plugins/cpd/internal/worker/CpdWorkParameters.java
// abstract class Report implements Serializable {
//     private final File destination;
// 
//     Report(File destination) {
//         this.destination = requireNonNull(destination, "'destination' must not be null for any report.");
//     }
// 
//     File getDestination() {
//         return destination;
//     }
// 
//     public static class Csv extends Report {
//         private final Character separator;
//         private final boolean includeLineCount;
// 
//         public Csv(File destination, Character separator, boolean includeLineCount) {
//             super(destination);
//             this.separator = separator;
//             this.includeLineCount = includeLineCount;
//         }
// 
//         Character getSeparator() {
//             return separator;
//         }
// 
//         boolean isIncludeLineCount() {
//             return includeLineCount;
//         }
//     }
// 
//     public static class Text extends Report {
//         private final String lineSeparator;
//         private final boolean trimLeadingCommonSourceWhitespaces;
// 
//         public Text(File destination, String lineSeparator, boolean trimLeadingCommonSourceWhitespaces) {
//             super(destination);
//             this.lineSeparator = lineSeparator;
//             this.trimLeadingCommonSourceWhitespaces = trimLeadingCommonSourceWhitespaces;
//         }
// 
//         String getLineSeparator() {
//             return lineSeparator;
//         }
// 
//         boolean isTrimLeadingCommonSourceWhitespaces() {
//             return trimLeadingCommonSourceWhitespaces;
//         }
//     }
// 
//     public static class Vs extends Report {
//         public Vs(File destination) {
//             super(destination);
//         }
//     }
// 
//     public static class Xml extends Report {
//         private final String encoding;
// 
//         public Xml(File destination, String encoding) {
//             super(destination);
//             this.encoding = encoding;
//         }
// 
//         String getEncoding() {
//             return encoding;
//         }
//     }
// }


import java.io.File;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Properties;
import javax.inject.Inject;
import de.aaschmid.gradle.plugins.cpd.internal.worker.CpdWorkParameters.Report;
import net.sourceforge.pmd.cpd.AnyLanguage;
import net.sourceforge.pmd.cpd.CPDConfiguration;
import net.sourceforge.pmd.cpd.Language;
import net.sourceforge.pmd.cpd.LanguageFactory;
import net.sourceforge.pmd.cpd.Match;
import net.sourceforge.pmd.cpd.Tokenizer;
import org.gradle.api.GradleException;
import org.gradle.workers.WorkAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
            }
            if (getParameters().getIgnoreFailures().get()) {
                if (logger.isWarnEnabled()) {
                    logger.warn(message);
                }
            } else {
                throw new GradleException(message);
            }
        }
    }

    private Properties createLanguageProperties(CpdWorkParameters config) {
        Properties languageProperties = new Properties();

        if (config.getIgnoreAnnotations().get()) {
            languageProperties.setProperty(Tokenizer.IGNORE_ANNOTATIONS, "true");
        }
        if (config.getIgnoreIdentifiers().get()) {
            languageProperties.setProperty(Tokenizer.IGNORE_IDENTIFIERS, "true");
        }
        if (config.getIgnoreLiterals().get()) {
            languageProperties.setProperty(Tokenizer.IGNORE_LITERALS, "true");
        }
        languageProperties.setProperty(Tokenizer.OPTION_SKIP_BLOCKS, Boolean.toString(config.getSkipBlocks().get()));
        languageProperties.setProperty(Tokenizer.OPTION_SKIP_BLOCKS_PATTERN, config.getSkipBlocksPattern().get());
        return languageProperties;
    }

    private Language createLanguage(String language, Properties languageProperties) {
        Language result = LanguageFactory.createLanguage(language, languageProperties);
// Path: src/main/java/de/aaschmid/gradle/plugins/cpd/internal/worker/CpdWorkParameters.java
// abstract class Report implements Serializable {
//     private final File destination;
// 
//     Report(File destination) {
//         this.destination = requireNonNull(destination, "'destination' must not be null for any report.");
//     }
// 
//     File getDestination() {
//         return destination;
//     }
// 
//     public static class Csv extends Report {
//         private final Character separator;
//         private final boolean includeLineCount;
// 
//         public Csv(File destination, Character separator, boolean includeLineCount) {
//             super(destination);
//             this.separator = separator;
//             this.includeLineCount = includeLineCount;
//         }
// 
//         Character getSeparator() {
//             return separator;
//         }
// 
//         boolean isIncludeLineCount() {
//             return includeLineCount;
//         }
//     }
// 
//     public static class Text extends Report {
//         private final String lineSeparator;
//         private final boolean trimLeadingCommonSourceWhitespaces;
// 
//         public Text(File destination, String lineSeparator, boolean trimLeadingCommonSourceWhitespaces) {
//             super(destination);
//             this.lineSeparator = lineSeparator;
//             this.trimLeadingCommonSourceWhitespaces = trimLeadingCommonSourceWhitespaces;
//         }
// 
//         String getLineSeparator() {
//             return lineSeparator;
//         }
// 
//         boolean isTrimLeadingCommonSourceWhitespaces() {
//             return trimLeadingCommonSourceWhitespaces;
//         }
//     }
// 
//     public static class Vs extends Report {
//         public Vs(File destination) {
//             super(destination);
//         }
//     }
// 
//     public static class Xml extends Report {
//         private final String encoding;
// 
//         public Xml(File destination, String encoding) {
//             super(destination);
//             this.encoding = encoding;
//         }
// 
//         String getEncoding() {
//             return encoding;
//         }
//     }
// }


// Path: src/main/java/de/aaschmid/gradle/plugins/cpd/internal/worker/CpdAction.java
import java.io.File;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Properties;
import javax.inject.Inject;
import de.aaschmid.gradle.plugins.cpd.internal.worker.CpdWorkParameters.Report;
import net.sourceforge.pmd.cpd.AnyLanguage;
import net.sourceforge.pmd.cpd.CPDConfiguration;
import net.sourceforge.pmd.cpd.Language;
import net.sourceforge.pmd.cpd.LanguageFactory;
import net.sourceforge.pmd.cpd.Match;
import net.sourceforge.pmd.cpd.Tokenizer;
import org.gradle.api.GradleException;
import org.gradle.workers.WorkAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

            }
            if (getParameters().getIgnoreFailures().get()) {
                if (logger.isWarnEnabled()) {
                    logger.warn(message);
                }
            } else {
                throw new GradleException(message);
            }
        }
    }

    private Properties createLanguageProperties(CpdWorkParameters config) {
        Properties languageProperties = new Properties();

        if (config.getIgnoreAnnotations().get()) {
            languageProperties.setProperty(Tokenizer.IGNORE_ANNOTATIONS, "true");
        }
        if (config.getIgnoreIdentifiers().get()) {
            languageProperties.setProperty(Tokenizer.IGNORE_IDENTIFIERS, "true");
        }
        if (config.getIgnoreLiterals().get()) {
            languageProperties.setProperty(Tokenizer.IGNORE_LITERALS, "true");
        }
        languageProperties.setProperty(Tokenizer.OPTION_SKIP_BLOCKS, Boolean.toString(config.getSkipBlocks().get()));
        languageProperties.setProperty(Tokenizer.OPTION_SKIP_BLOCKS_PATTERN, config.getSkipBlocksPattern().get());
        return languageProperties;
    }

    private Language createLanguage(String language, Properties languageProperties) {
        Language result = LanguageFactory.createLanguage(language, languageProperties);
        logger.info("Using CPD language class '{}' for checking duplicates.", result);