// Path: src/main/java/org/avmframework/localsearch/LocalSearch.java
// public abstract class LocalSearch {
// 
//   protected AtomicVariable var;
//   protected Vector vector;
//   protected ObjectiveFunction objFun;
// 
//   public void search(AtomicVariable var, Vector vector, ObjectiveFunction objFun)
//       throws TerminationException {
//     this.var = var;
//     this.objFun = objFun;
//     this.vector = vector;
// 
//     performSearch();
//   }
// 
//   protected abstract void performSearch() throws TerminationException;
// 
//   public static LocalSearch instantiate(String name) {
//     try {
//       String localSearchClassName = "org.avmframework.localsearch." + name;
//       Class<?> localSearchClass = Class.forName(localSearchClassName);
//       return (LocalSearch) localSearchClass.newInstance();
//     } catch (ClassNotFoundException | InstantiationException | IllegalAccessException exception) {
//       throw new RuntimeException("Unable to instantiate search \"" + name + "\"");
//     }
//   }
// }


import org.apache.commons.lang3.StringUtils;
import org.avmframework.localsearch.LocalSearch;
import java.util.LinkedHashMap;
import java.util.Map;
        "[search]",
        "an optional parameter denoting which search to use "
            + "(e.g., \"IteratedPatternSearch\", \"GeometricSearch\" or \"LatticeSearch\")");
  }

  public void addParam(String name, String description) {
    params.put(name, description);
  }

  public void error(String error) {
    System.out.println("ERROR: " + error);
    usage();
    System.exit(1);
  }

  public void usage() {
    String usage =
        "USAGE: java "
            + classWithMainMethod
            + " "
            + StringUtils.join(params.keySet(), " ")
            + " \n"
            + "  where: \n";
    for (String paramName : params.keySet()) {
      usage += "    - " + paramName + " is " + params.get(paramName) + "\n";
    }

    System.out.println(usage);
  }

// Path: src/main/java/org/avmframework/localsearch/LocalSearch.java
// public abstract class LocalSearch {
// 
//   protected AtomicVariable var;
//   protected Vector vector;
//   protected ObjectiveFunction objFun;
// 
//   public void search(AtomicVariable var, Vector vector, ObjectiveFunction objFun)
//       throws TerminationException {
//     this.var = var;
//     this.objFun = objFun;
//     this.vector = vector;
// 
//     performSearch();
//   }
// 
//   protected abstract void performSearch() throws TerminationException;
// 
//   public static LocalSearch instantiate(String name) {
//     try {
//       String localSearchClassName = "org.avmframework.localsearch." + name;
//       Class<?> localSearchClass = Class.forName(localSearchClassName);
//       return (LocalSearch) localSearchClass.newInstance();
//     } catch (ClassNotFoundException | InstantiationException | IllegalAccessException exception) {
//       throw new RuntimeException("Unable to instantiate search \"" + name + "\"");
//     }
//   }
// }


// Path: src/main/java/org/avmframework/examples/util/ArgsParser.java
import org.apache.commons.lang3.StringUtils;
import org.avmframework.localsearch.LocalSearch;
import java.util.LinkedHashMap;
import java.util.Map;

        "[search]",
        "an optional parameter denoting which search to use "
            + "(e.g., \"IteratedPatternSearch\", \"GeometricSearch\" or \"LatticeSearch\")");
  }

  public void addParam(String name, String description) {
    params.put(name, description);
  }

  public void error(String error) {
    System.out.println("ERROR: " + error);
    usage();
    System.exit(1);
  }

  public void usage() {
    String usage =
        "USAGE: java "
            + classWithMainMethod
            + " "
            + StringUtils.join(params.keySet(), " ")
            + " \n"
            + "  where: \n";
    for (String paramName : params.keySet()) {
      usage += "    - " + paramName + " is " + params.get(paramName) + "\n";
    }

    System.out.println(usage);
  }

  public LocalSearch parseSearchParam(String defaultSearch) {