// Path: src/main/java/org/tap4j/plugin/model/TestSetMap.java
// public class TestSetMap implements Serializable {
// 
//     private static final long serialVersionUID = 7300386936718557088L;
//     
//     private final String fileName;
//     private final TestSet testSet;
//     
//     public TestSetMap( String fileName, TestSet testSet )
//     {
//         this.fileName = fileName;
//         this.testSet = testSet;
//     }
//     
//     public String getFileName()
//     {
//         return this.fileName;
//     }
//     
//     public TestSet getTestSet()
//     {
//         return this.testSet;
//     }
//     
// }
// 
// Path: src/main/java/org/tap4j/plugin/util/Constants.java
// public final class Constants {
// 
//     public static final String TAP_DIR_NAME = "tap-master-files";
//     
// }


import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import org.apache.commons.lang.BooleanUtils;
import org.kohsuke.stapler.DataBoundConstructor;
import org.tap4j.model.Plan;
import org.tap4j.model.TestSet;
import org.tap4j.plugin.model.TestSetMap;
import org.tap4j.plugin.util.Constants;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.matrix.MatrixAggregatable;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.BuildListener;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.BuildStepMonitor;
import hudson.tasks.Publisher;
import hudson.tasks.Recorder;
import hudson.tasks.test.TestResultAggregator;
import jenkins.tasks.SimpleBuildStep;

        return Boolean.TRUE;
    }

    /**
     * Return {@code true} if the build is ongoing, if the user did not ask to fail when
     * failed, or otherwise if the build result is not better or equal to unstable.
     * @param build Run
     * @return whether to perform the publisher or not, based on user provided configuration
     */
    private boolean isPerformPublisher(Run<?, ?> build) {
        Result result = build.getResult();
        // may be null if build is ongoing
        if (result == null) {
            return true;
        }

        if (!getSkipIfBuildNotOk()) {
            return true;
        }

        return result.isBetterOrEqualTo(Result.UNSTABLE);
    }

    /**
     * Iterates through the list of test sets and validates its plans and
     * test results.
     *
     * @param testSets
     * @return <true> if there are any test case that doesn't follow the plan
     */

// Path: src/main/java/org/tap4j/plugin/model/TestSetMap.java
// public class TestSetMap implements Serializable {
// 
//     private static final long serialVersionUID = 7300386936718557088L;
//     
//     private final String fileName;
//     private final TestSet testSet;
//     
//     public TestSetMap( String fileName, TestSet testSet )
//     {
//         this.fileName = fileName;
//         this.testSet = testSet;
//     }
//     
//     public String getFileName()
//     {
//         return this.fileName;
//     }
//     
//     public TestSet getTestSet()
//     {
//         return this.testSet;
//     }
//     
// }
// 
// Path: src/main/java/org/tap4j/plugin/util/Constants.java
// public final class Constants {
// 
//     public static final String TAP_DIR_NAME = "tap-master-files";
//     
// }


// Path: src/main/java/org/tap4j/plugin/TapPublisher.java
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import org.apache.commons.lang.BooleanUtils;
import org.kohsuke.stapler.DataBoundConstructor;
import org.tap4j.model.Plan;
import org.tap4j.model.TestSet;
import org.tap4j.plugin.model.TestSetMap;
import org.tap4j.plugin.util.Constants;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.matrix.MatrixAggregatable;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.BuildListener;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.BuildStepMonitor;
import hudson.tasks.Publisher;
import hudson.tasks.Recorder;
import hudson.tasks.test.TestResultAggregator;
import jenkins.tasks.SimpleBuildStep;

        return Boolean.TRUE;
    }

    /**
     * Return {@code true} if the build is ongoing, if the user did not ask to fail when
     * failed, or otherwise if the build result is not better or equal to unstable.
     * @param build Run
     * @return whether to perform the publisher or not, based on user provided configuration
     */
    private boolean isPerformPublisher(Run<?, ?> build) {
        Result result = build.getResult();
        // may be null if build is ongoing
        if (result == null) {
            return true;
        }

        if (!getSkipIfBuildNotOk()) {
            return true;
        }

        return result.isBetterOrEqualTo(Result.UNSTABLE);
    }

    /**
     * Iterates through the list of test sets and validates its plans and
     * test results.
     *
     * @param testSets
     * @return <true> if there are any test case that doesn't follow the plan
     */

    private boolean validateNumberOfTests(List<TestSetMap> testSets) {
