// Path: src/main/java/org/firepick/firebom/IPartComparable.java
// public interface IPartComparable extends Comparable<IPartComparable> {
//     Part getPart();
// }
// 
// Path: src/main/java/org/firepick/firebom/IRefreshableProxy.java
// public interface IRefreshableProxy {
// 
//     /**
//      * Synchronize proxy with remote resource
//      */
//     void refresh();
// 
//     /**
//      * A newly constructed proxy is not fresh until it is refreshed.
//      * Freshness lasts until a refresh timeout. Unsampled proxies stay fresh
//      * forever.
//      * @return true if proxy has been recently refreshed or never sampled
//      */
//     boolean isFresh();
// 
//     /**
//      * Use the information provided by the proxy. Frequently sampled proxies should be
//      * refreshed more often than rarely sampled proxies. Sampling a proxy affects its
//      * freshness as well as the refresh interval.
//      */
//     void sample();
// 
//     /**
//      * A resolved proxy is one that has been successfully refreshed at least once in its
//      * lifetime.
//      * @return
//      */
//     boolean isResolved();
// 
//     /**
//      * Return age since last refresh or construction.
//      * @return
//      */
//     long getAge();
// 
// }
// 
// Path: src/main/java/org/firepick/firebom/RefreshableTimer.java
// public class RefreshableTimer implements IRefreshableProxy, Serializable {
//     private long minRefreshInterval;
//     private long lastRefreshMillis;
//     private long lastSampleMillis;
//     private double sensitivity;
//     private boolean isResolved;
//     private long samplesSinceRefresh;
//     private long sampleInterval;
// 
//     public RefreshableTimer() {
//         this(0.8d);
//     }
// 
//     public RefreshableTimer(double sensitivity) {
//         if (sensitivity < 0 || 1 < sensitivity) {
//             throw new IllegalArgumentException("sensitivity must be between [0..1]");
//         }
//         this.sensitivity = sensitivity;
//         this.lastRefreshMillis = System.currentTimeMillis();
//         this.lastSampleMillis = lastRefreshMillis;
//     }
// 
//     public void refresh() {
//         lastRefreshMillis = System.currentTimeMillis();
//         samplesSinceRefresh = 0;
//         isResolved = true;
//     }
// 
//     public void sample() {
//         samplesSinceRefresh++;
//         long nowMillis = System.currentTimeMillis();
//         long msElapsed = nowMillis - lastSampleMillis;
//         if (isResolved()) {
//             sampleInterval =(long)(getSensitivity() * msElapsed + (1 - getSensitivity()) * sampleInterval);
//         } else {
//             sampleInterval = Math.max(1, msElapsed);
//         }
//         lastSampleMillis = nowMillis;
//     }
// 
//     public boolean isFresh() {
//         long refreshInterval = getRefreshInterval();
//         long ageDiff = refreshInterval - getAge();
//         return isResolved() && ageDiff >= 0;
//     }
// 
//     public double getSensitivity() {
//         return sensitivity;
//     }
// 
//     public long getSamplesSinceRefresh() {
//         return samplesSinceRefresh;
//     }
// 
//     public boolean isResolved() {
//         return isResolved;
//     }
// 
//     protected RefreshableTimer setResolved(boolean value) {
//         isResolved = value;
//         return this;
//     }
// 
//     public long getAge() {
//         return System.currentTimeMillis() - lastRefreshMillis;
//     }
// 
//     public long getRefreshInterval() {
//         Long value  = getSampleInterval();
//         return Math.max(getMinRefreshInterval(), value);
//     }
// 
//     public long getSampleInterval() {
//         return sampleInterval;
//     }
// 
//     public long getMinRefreshInterval() {
//         return minRefreshInterval;
//     }
// 
//     public RefreshableTimer setMinRefreshInterval(long minRefreshInterval) {
//         this.minRefreshInterval = minRefreshInterval;
//         return this;
//     }
// }
// 
// Path: src/main/java/org/firepick/firebom/exception/CyclicReferenceException.java
// public class CyclicReferenceException extends ProxyResolutionException {
//     public CyclicReferenceException(Exception e) {
//         super(e);
//     }
// 
//     public CyclicReferenceException(String message) {
//         super(message);
//     }
// 
//     public CyclicReferenceException(String message, Exception e) {
//         super(message, e);
//     }
// }
// 
// 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 java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.regex.Pattern;
import org.firepick.firebom.IPartComparable;
import org.firepick.firebom.IRefreshableProxy;
import org.firepick.firebom.RefreshableTimer;
import org.firepick.firebom.exception.CyclicReferenceException;
import org.firepick.firebom.exception.ProxyResolutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
    }

    return result;
  }

  public synchronized String getTitle() {
    String value = title;
    if (value == null) {
      if (getRefreshException() != null) {
        value = getRefreshException().getMessage();
      } else if (sourcePartUsage != null && sourcePartUsage.getPart().isResolved()) {
        value = sourcePartUsage.getPart().getTitle();
      } else {
        value = getId();
      }
    }
    return value;
  }

  public synchronized Part setTitle(String title) {
    this.title = title == null ? null : title.trim();
    return this;
  }

  @Override
  public Part getPart() {
    return this;
  }

  @Override
// Path: src/main/java/org/firepick/firebom/IPartComparable.java
// public interface IPartComparable extends Comparable<IPartComparable> {
//     Part getPart();
// }
// 
// Path: src/main/java/org/firepick/firebom/IRefreshableProxy.java
// public interface IRefreshableProxy {
// 
//     /**
//      * Synchronize proxy with remote resource
//      */
//     void refresh();
// 
//     /**
//      * A newly constructed proxy is not fresh until it is refreshed.
//      * Freshness lasts until a refresh timeout. Unsampled proxies stay fresh
//      * forever.
//      * @return true if proxy has been recently refreshed or never sampled
//      */
//     boolean isFresh();
// 
//     /**
//      * Use the information provided by the proxy. Frequently sampled proxies should be
//      * refreshed more often than rarely sampled proxies. Sampling a proxy affects its
//      * freshness as well as the refresh interval.
//      */
//     void sample();
// 
//     /**
//      * A resolved proxy is one that has been successfully refreshed at least once in its
//      * lifetime.
//      * @return
//      */
//     boolean isResolved();
// 
//     /**
//      * Return age since last refresh or construction.
//      * @return
//      */
//     long getAge();
// 
// }
// 
// Path: src/main/java/org/firepick/firebom/RefreshableTimer.java
// public class RefreshableTimer implements IRefreshableProxy, Serializable {
//     private long minRefreshInterval;
//     private long lastRefreshMillis;
//     private long lastSampleMillis;
//     private double sensitivity;
//     private boolean isResolved;
//     private long samplesSinceRefresh;
//     private long sampleInterval;
// 
//     public RefreshableTimer() {
//         this(0.8d);
//     }
// 
//     public RefreshableTimer(double sensitivity) {
//         if (sensitivity < 0 || 1 < sensitivity) {
//             throw new IllegalArgumentException("sensitivity must be between [0..1]");
//         }
//         this.sensitivity = sensitivity;
//         this.lastRefreshMillis = System.currentTimeMillis();
//         this.lastSampleMillis = lastRefreshMillis;
//     }
// 
//     public void refresh() {
//         lastRefreshMillis = System.currentTimeMillis();
//         samplesSinceRefresh = 0;
//         isResolved = true;
//     }
// 
//     public void sample() {
//         samplesSinceRefresh++;
//         long nowMillis = System.currentTimeMillis();
//         long msElapsed = nowMillis - lastSampleMillis;
//         if (isResolved()) {
//             sampleInterval =(long)(getSensitivity() * msElapsed + (1 - getSensitivity()) * sampleInterval);
//         } else {
//             sampleInterval = Math.max(1, msElapsed);
//         }
//         lastSampleMillis = nowMillis;
//     }
// 
//     public boolean isFresh() {
//         long refreshInterval = getRefreshInterval();
//         long ageDiff = refreshInterval - getAge();
//         return isResolved() && ageDiff >= 0;
//     }
// 
//     public double getSensitivity() {
//         return sensitivity;
//     }
// 
//     public long getSamplesSinceRefresh() {
//         return samplesSinceRefresh;
//     }
// 
//     public boolean isResolved() {
//         return isResolved;
//     }
// 
//     protected RefreshableTimer setResolved(boolean value) {
//         isResolved = value;
//         return this;
//     }
// 
//     public long getAge() {
//         return System.currentTimeMillis() - lastRefreshMillis;
//     }
// 
//     public long getRefreshInterval() {
//         Long value  = getSampleInterval();
//         return Math.max(getMinRefreshInterval(), value);
//     }
// 
//     public long getSampleInterval() {
//         return sampleInterval;
//     }
// 
//     public long getMinRefreshInterval() {
//         return minRefreshInterval;
//     }
// 
//     public RefreshableTimer setMinRefreshInterval(long minRefreshInterval) {
//         this.minRefreshInterval = minRefreshInterval;
//         return this;
//     }
// }
// 
// Path: src/main/java/org/firepick/firebom/exception/CyclicReferenceException.java
// public class CyclicReferenceException extends ProxyResolutionException {
//     public CyclicReferenceException(Exception e) {
//         super(e);
//     }
// 
//     public CyclicReferenceException(String message) {
//         super(message);
//     }
// 
//     public CyclicReferenceException(String message, Exception e) {
//         super(message, e);
//     }
// }
// 
// 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/Part.java
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.regex.Pattern;
import org.firepick.firebom.IPartComparable;
import org.firepick.firebom.IRefreshableProxy;
import org.firepick.firebom.RefreshableTimer;
import org.firepick.firebom.exception.CyclicReferenceException;
import org.firepick.firebom.exception.ProxyResolutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;

    }

    return result;
  }

  public synchronized String getTitle() {
    String value = title;
    if (value == null) {
      if (getRefreshException() != null) {
        value = getRefreshException().getMessage();
      } else if (sourcePartUsage != null && sourcePartUsage.getPart().isResolved()) {
        value = sourcePartUsage.getPart().getTitle();
      } else {
        value = getId();
      }
    }
    return value;
  }

  public synchronized Part setTitle(String title) {
    this.title = title == null ? null : title.trim();
    return this;
  }

  @Override
  public Part getPart() {
    return this;
  }

  @Override
  public int compareTo(IPartComparable that) {