// Path: src/main/java/fr/brouillard/oss/cssfx/impl/log/CSSFXLogger.java
// public static Logger logger(String loggerName) {
//     if (!isInitialized()) {
//         noop();
//     }
//     return loggerFactory.getLogger(loggerName);
// }
// 
// Path: src/main/java/fr/brouillard/oss/cssfx/api/URIToPathConverter.java
// @FunctionalInterface
// public interface URIToPathConverter {
//     public Path convert(String uri);
// }


import fr.brouillard.oss.cssfx.api.URIToPathConverter;
import static fr.brouillard.oss.cssfx.impl.log.CSSFXLogger.logger;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
                if (uri.contains("target/classes")) {
                    String[] classesTransform = {
                            "src/main/java", "src/main/resources" };
                    for (String ct : classesTransform) {
                        String potentialSourceURI = uri.replace("target/classes", ct);
                        try {
                            Path p = Paths.get(new URI(potentialSourceURI));
                            if (Files.exists(p)) {
                                return p;
                            }
                        } catch (URISyntaxException e) {
                            e.printStackTrace();
                        }
                    }
                } else if (uri.contains("target/test-classes")) {
                    String[] testClassesTransform = {
                            "src/test/java", "src/test/resources" };
                    for (String tct : testClassesTransform) {
                        String potentialSourceURI = uri.replace("target/test-classes", tct);
                        try {
                            Path p = Paths.get(new URI(potentialSourceURI));
                            if (Files.exists(p)) {
                                return p;
                            }
                        } catch (URISyntaxException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }
// Path: src/main/java/fr/brouillard/oss/cssfx/impl/log/CSSFXLogger.java
// public static Logger logger(String loggerName) {
//     if (!isInitialized()) {
//         noop();
//     }
//     return loggerFactory.getLogger(loggerName);
// }
// 
// Path: src/main/java/fr/brouillard/oss/cssfx/api/URIToPathConverter.java
// @FunctionalInterface
// public interface URIToPathConverter {
//     public Path convert(String uri);
// }


// Path: src/main/java/fr/brouillard/oss/cssfx/impl/URIToPathConverters.java
import fr.brouillard.oss.cssfx.api.URIToPathConverter;
import static fr.brouillard.oss.cssfx.impl.log.CSSFXLogger.logger;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

                if (uri.contains("target/classes")) {
                    String[] classesTransform = {
                            "src/main/java", "src/main/resources" };
                    for (String ct : classesTransform) {
                        String potentialSourceURI = uri.replace("target/classes", ct);
                        try {
                            Path p = Paths.get(new URI(potentialSourceURI));
                            if (Files.exists(p)) {
                                return p;
                            }
                        } catch (URISyntaxException e) {
                            e.printStackTrace();
                        }
                    }
                } else if (uri.contains("target/test-classes")) {
                    String[] testClassesTransform = {
                            "src/test/java", "src/test/resources" };
                    for (String tct : testClassesTransform) {
                        String potentialSourceURI = uri.replace("target/test-classes", tct);
                        try {
                            Path p = Paths.get(new URI(potentialSourceURI));
                            if (Files.exists(p)) {
                                return p;
                            }
                        } catch (URISyntaxException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }
            logger(URIToPathConverters.class).debug("MAVEN converter failed to map css[%s] to a source file", uri);