// Path: src/util/FixPath.java
// public class FixPath {
// 
// 	public static Path getAbsolutePath(Path path) {
// 		// User executed form commands/ directory, but working directory is ../ from there.
// 		// If specified a relative directory, need to base it correctly from user perspective.
// 		if(!path.isAbsolute()) {
// 			path = Paths.get("commands/").toAbsolutePath().resolve(path);
// 		}
// 		return path;
// 	}
// 	
// }


import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.Callable;
import picocli.CommandLine;
import util.FixPath;

                "your tool manually. This is automatically used with the detectClones command.",
        mixinStandardHelpOptions = true,
        versionProvider = util.Version.class)
public class PartitionInput implements Callable<Void> {
    @CommandLine.Spec
    private CommandLine.Model.CommandSpec spec;

    @CommandLine.Option(
            names = {"-i", "--input"},
            description = "The directory of source code to partition.",
            required = true,
            paramLabel = "<PATH>"
    )
    private void setInput(Path input) {
        if (!Files.exists(input))
            throw new CommandLine.ParameterException(spec.commandLine(), "Input directory does not exist.");
        if (!Files.isDirectory(input))
            throw new CommandLine.ParameterException(spec.commandLine(), "Input must be a directory.");
        this.input = input;
    }

    private Path input;

    @CommandLine.Option(
            names = {"-o", "--output"},
            description = "The directory to write the subsets to (each pair of partitions).",
            paramLabel = "<PATH>",
            required = true
    )
    private void setOutput(Path output) {

// Path: src/util/FixPath.java
// public class FixPath {
// 
// 	public static Path getAbsolutePath(Path path) {
// 		// User executed form commands/ directory, but working directory is ../ from there.
// 		// If specified a relative directory, need to base it correctly from user perspective.
// 		if(!path.isAbsolute()) {
// 			path = Paths.get("commands/").toAbsolutePath().resolve(path);
// 		}
// 		return path;
// 	}
// 	
// }


// Path: src/tasks/PartitionInput.java
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.Callable;
import picocli.CommandLine;
import util.FixPath;

                "your tool manually. This is automatically used with the detectClones command.",
        mixinStandardHelpOptions = true,
        versionProvider = util.Version.class)
public class PartitionInput implements Callable<Void> {
    @CommandLine.Spec
    private CommandLine.Model.CommandSpec spec;

    @CommandLine.Option(
            names = {"-i", "--input"},
            description = "The directory of source code to partition.",
            required = true,
            paramLabel = "<PATH>"
    )
    private void setInput(Path input) {
        if (!Files.exists(input))
            throw new CommandLine.ParameterException(spec.commandLine(), "Input directory does not exist.");
        if (!Files.isDirectory(input))
            throw new CommandLine.ParameterException(spec.commandLine(), "Input must be a directory.");
        this.input = input;
    }

    private Path input;

    @CommandLine.Option(
            names = {"-o", "--output"},
            description = "The directory to write the subsets to (each pair of partitions).",
            paramLabel = "<PATH>",
            required = true
    )
    private void setOutput(Path output) {

        output = FixPath.getAbsolutePath(output);
