// Path: plugins-compat-tester/src/main/java/org/jenkins/tools/test/exception/ExecutedTestNamesSolverException.java
// public class ExecutedTestNamesSolverException  extends Exception {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public ExecutedTestNamesSolverException() {
//             super();
//     }
// 
//     public ExecutedTestNamesSolverException(String msg) {
//             super(msg);
//     }
// 
//     public ExecutedTestNamesSolverException(String msg, Exception e) {
//             super(msg, e);
//     }
// 
//     public ExecutedTestNamesSolverException(Exception e) {
//             super(e);
//     }
// } 


import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.jenkins.tools.test.exception.ExecutedTestNamesSolverException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
package org.jenkins.tools.test.util;


public class ExecutedTestNamesSolver {

    private static final String WARNING_MSG = "[WARNING] Unable to retrieve info from: %s";

    private static final String TEST_PLACEHOLDER = "TEST-%s.xml";

    /*
        Element names for failure and error as declared at
        https://maven.apache.org/surefire/maven-failsafe-plugin/xsd/failsafe-test-report-3.0.xsd and
        https://gitbox.apache.org/repos/asf?p=maven-surefire.git;a=blob;f=maven-surefire-plugin/src/site/resources/xsd/surefire-test-report-3.0.xsd
     */
    private static final String FAILURE_ELEMENT = "failure";
    private static final String ERROR_ELEMENT = "error";

// Path: plugins-compat-tester/src/main/java/org/jenkins/tools/test/exception/ExecutedTestNamesSolverException.java
// public class ExecutedTestNamesSolverException  extends Exception {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public ExecutedTestNamesSolverException() {
//             super();
//     }
// 
//     public ExecutedTestNamesSolverException(String msg) {
//             super(msg);
//     }
// 
//     public ExecutedTestNamesSolverException(String msg, Exception e) {
//             super(msg, e);
//     }
// 
//     public ExecutedTestNamesSolverException(Exception e) {
//             super(e);
//     }
// } 


// Path: plugins-compat-tester/src/main/java/org/jenkins/tools/test/util/ExecutedTestNamesSolver.java
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.jenkins.tools.test.exception.ExecutedTestNamesSolverException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

package org.jenkins.tools.test.util;


public class ExecutedTestNamesSolver {

    private static final String WARNING_MSG = "[WARNING] Unable to retrieve info from: %s";

    private static final String TEST_PLACEHOLDER = "TEST-%s.xml";

    /*
        Element names for failure and error as declared at
        https://maven.apache.org/surefire/maven-failsafe-plugin/xsd/failsafe-test-report-3.0.xsd and
        https://gitbox.apache.org/repos/asf?p=maven-surefire.git;a=blob;f=maven-surefire-plugin/src/site/resources/xsd/surefire-test-report-3.0.xsd
     */
    private static final String FAILURE_ELEMENT = "failure";
    private static final String ERROR_ELEMENT = "error";

    public ExecutedTestNamesDetails solve(Set<String> types, Set<String> executedTests, File baseDirectory) throws ExecutedTestNamesSolverException {