// Path: src/main/java/org/firepick/firebom/exception/ProxyResolutionException.java
// public class ProxyResolutionException extends RuntimeException {
//     public ProxyResolutionException(Exception e) {
//         super(e);
//     }
// 
//     public ProxyResolutionException(String message) {
//         super(message);
//     }
// 
//     public ProxyResolutionException(String message, Exception e) {
//         super(message, e);
//     }
// }


import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.Element;
import org.firepick.firebom.exception.ProxyResolutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.URL;
import java.util.*;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
    } else if ("www.sparkfun.com".equalsIgnoreCase(host)) {
      part = new SparkfunPart(this, url, urlResolver);
    } else if ("www.adafruit.com".equalsIgnoreCase(host)) {
      part = new AdafruitPart(this, url, urlResolver);
    } else if ("www.digikey.com".equalsIgnoreCase(host)) {
      part = new DigiKeyPart(this, url, urlResolver);
    } else if ("synthetos.myshopify.com".equalsIgnoreCase(host)) {
      part = new SynthetosPart(this, url, urlResolver);
    } else {
      part = new HtmlPart(this, url, urlResolver);
    }
    return part;
  }

  @Override
  public ListIterator<Part> iterator() {
    Ehcache cache = getCache("org.firepick.firebom.part.Part");
    return new CacheIterator(cache);
  }

  @Override
  public void run() {
    while (refreshQueue.size() > 0) {
      Part part = refreshQueue.poll();
      if (part != null && !part.isFresh()) {
        try {
          part.refresh();
        }
        catch (Exception e) {
          if (e != part.getRefreshException()) {
// Path: src/main/java/org/firepick/firebom/exception/ProxyResolutionException.java
// public class ProxyResolutionException extends RuntimeException {
//     public ProxyResolutionException(Exception e) {
//         super(e);
//     }
// 
//     public ProxyResolutionException(String message) {
//         super(message);
//     }
// 
//     public ProxyResolutionException(String message, Exception e) {
//         super(message, e);
//     }
// }


// Path: src/main/java/org/firepick/firebom/part/PartFactory.java
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.Element;
import org.firepick.firebom.exception.ProxyResolutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.URL;
import java.util.*;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

    } else if ("www.sparkfun.com".equalsIgnoreCase(host)) {
      part = new SparkfunPart(this, url, urlResolver);
    } else if ("www.adafruit.com".equalsIgnoreCase(host)) {
      part = new AdafruitPart(this, url, urlResolver);
    } else if ("www.digikey.com".equalsIgnoreCase(host)) {
      part = new DigiKeyPart(this, url, urlResolver);
    } else if ("synthetos.myshopify.com".equalsIgnoreCase(host)) {
      part = new SynthetosPart(this, url, urlResolver);
    } else {
      part = new HtmlPart(this, url, urlResolver);
    }
    return part;
  }

  @Override
  public ListIterator<Part> iterator() {
    Ehcache cache = getCache("org.firepick.firebom.part.Part");
    return new CacheIterator(cache);
  }

  @Override
  public void run() {
    while (refreshQueue.size() > 0) {
      Part part = refreshQueue.poll();
      if (part != null && !part.isFresh()) {
        try {
          part.refresh();
        }
        catch (Exception e) {
          if (e != part.getRefreshException()) {
            throw new ProxyResolutionException("Uncaught exception", e);