// Path: measures/src/main/java/io/apisense/network/Measurement.java
// public abstract class Measurement {
//   public final String taskName;
// 
//   protected Measurement(String taskName) {
//     this.taskName = taskName;
//   }
// 
//   /**
//    * Ensure that the measurement is asynchronously called in an {@link ExecutorService}.
//    *
//    * @param callback The {@link MeasurementCallback} used
//    *                 for reporting success or failure of this measurement.
//    */
//   public final void call(MeasurementCallback callback) {
//     AsyncTask.execute(new MeasurementExecutor(this, callback));
//   }
// 
//   /**
//    * Actual, synchronous, process of a measurement.
//    * This method has to be called from another thread than the UI one.
//    *
//    * @return The results of this measurement.
//    * @throws MeasurementError If anything goes wrong during measurement.
//    */
//   public abstract MeasurementResult execute() throws MeasurementError;
// }
// 
// Path: measures/src/main/java/io/apisense/network/MeasurementError.java
// public class MeasurementError extends Exception {
//   public final String taskName;
// 
//   public MeasurementError(String taskName, String reason) {
//     super(reason);
//     this.taskName = taskName;
//   }
// 
//   public MeasurementError(String taskName, String reason, Throwable e) {
//     super(reason, e);
//     this.taskName = taskName;
//   }
// 
//   public MeasurementError(String taskName, Exception e) {
//     this(taskName, e.getMessage(), e);
//   }
// }
// 
// Path: measures/src/main/java/io/apisense/network/MeasurementResult.java
// public abstract class MeasurementResult {
//   /**
//    * Name of the task (ie TCP download, Traceroute, etc)
//    */
//   private final String taskName;
// 
//   /**
//    * Time of the beginning of the task in milliseconds
//    */
//   private final long startTime;
// 
//   /**
//    * Time of the end of the task in milliseconds
//    */
//   private final long endTime;
// 
//   /**
//    * Number of milliseconds representing the duration of the task
//    */
//   private final long duration;
// 
//   protected MeasurementResult(String taskName, long startTime, long endTime) {
//     this.taskName = taskName;
//     this.startTime = startTime;
//     this.endTime = endTime;
//     this.duration = endTime - startTime;
//   }
// 
//   public String getTaskName() {
//     return taskName;
//   }
// 
//   public long getStartTime() {
//     return startTime;
//   }
// 
//   public long getEndTime() {
//     return endTime;
//   }
// 
//   public long getDuration() {
//     return duration;
//   }
// 
//   @Override
//   public String toString() {
//     return "MeasurementResult{" +
//         "taskName='" + taskName + '\'' +
//         ", startTime=" + startTime +
//         ", endTime=" + endTime +
//         ", duration=" + duration +
//         '}';
//   }
// }


import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import io.apisense.network.Measurement;
import io.apisense.network.MeasurementError;
import io.apisense.network.MeasurementResult;
package io.apisense.network.ping;





/**
 * Measurement class used to realise a Traceroute
 */
public class TracerouteTask extends Measurement {
  private static final String TAG = "ICMPTraceroute";
  private final TracerouteConfig config;
  private String destIp;
  private ICMPConfig icmpConfig;

  public TracerouteTask(TracerouteConfig tracerouteConfig) {
    super(TAG);
    this.config = tracerouteConfig;
    this.icmpConfig = new ICMPConfig(config.getUrl());
  }

  @Override
// Path: measures/src/main/java/io/apisense/network/Measurement.java
// public abstract class Measurement {
//   public final String taskName;
// 
//   protected Measurement(String taskName) {
//     this.taskName = taskName;
//   }
// 
//   /**
//    * Ensure that the measurement is asynchronously called in an {@link ExecutorService}.
//    *
//    * @param callback The {@link MeasurementCallback} used
//    *                 for reporting success or failure of this measurement.
//    */
//   public final void call(MeasurementCallback callback) {
//     AsyncTask.execute(new MeasurementExecutor(this, callback));
//   }
// 
//   /**
//    * Actual, synchronous, process of a measurement.
//    * This method has to be called from another thread than the UI one.
//    *
//    * @return The results of this measurement.
//    * @throws MeasurementError If anything goes wrong during measurement.
//    */
//   public abstract MeasurementResult execute() throws MeasurementError;
// }
// 
// Path: measures/src/main/java/io/apisense/network/MeasurementError.java
// public class MeasurementError extends Exception {
//   public final String taskName;
// 
//   public MeasurementError(String taskName, String reason) {
//     super(reason);
//     this.taskName = taskName;
//   }
// 
//   public MeasurementError(String taskName, String reason, Throwable e) {
//     super(reason, e);
//     this.taskName = taskName;
//   }
// 
//   public MeasurementError(String taskName, Exception e) {
//     this(taskName, e.getMessage(), e);
//   }
// }
// 
// Path: measures/src/main/java/io/apisense/network/MeasurementResult.java
// public abstract class MeasurementResult {
//   /**
//    * Name of the task (ie TCP download, Traceroute, etc)
//    */
//   private final String taskName;
// 
//   /**
//    * Time of the beginning of the task in milliseconds
//    */
//   private final long startTime;
// 
//   /**
//    * Time of the end of the task in milliseconds
//    */
//   private final long endTime;
// 
//   /**
//    * Number of milliseconds representing the duration of the task
//    */
//   private final long duration;
// 
//   protected MeasurementResult(String taskName, long startTime, long endTime) {
//     this.taskName = taskName;
//     this.startTime = startTime;
//     this.endTime = endTime;
//     this.duration = endTime - startTime;
//   }
// 
//   public String getTaskName() {
//     return taskName;
//   }
// 
//   public long getStartTime() {
//     return startTime;
//   }
// 
//   public long getEndTime() {
//     return endTime;
//   }
// 
//   public long getDuration() {
//     return duration;
//   }
// 
//   @Override
//   public String toString() {
//     return "MeasurementResult{" +
//         "taskName='" + taskName + '\'' +
//         ", startTime=" + startTime +
//         ", endTime=" + endTime +
//         ", duration=" + duration +
//         '}';
//   }
// }


// Path: measures/src/main/java/io/apisense/network/ping/TracerouteTask.java
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import io.apisense.network.Measurement;
import io.apisense.network.MeasurementError;
import io.apisense.network.MeasurementResult;

package io.apisense.network.ping;





/**
 * Measurement class used to realise a Traceroute
 */
public class TracerouteTask extends Measurement {
  private static final String TAG = "ICMPTraceroute";
  private final TracerouteConfig config;
  private String destIp;
  private ICMPConfig icmpConfig;

  public TracerouteTask(TracerouteConfig tracerouteConfig) {
    super(TAG);
    this.config = tracerouteConfig;
    this.icmpConfig = new ICMPConfig(config.getUrl());
  }

  @Override
  public MeasurementResult execute() throws MeasurementError {