// Path: src/main/java/org/pantsbuild/jarjar/util/EntryStruct.java
// public class EntryStruct {
//     public byte[] data;
//     public String name;
//     public long time;
//     public boolean skipTransform;
// }
// 
// Path: src/main/java/org/pantsbuild/jarjar/util/IoUtil.java
// public class IoUtil {
//     private IoUtil() {}
// 
//     public static void pipe(InputStream is, OutputStream out, byte[] buf) throws IOException {
//         for (;;) {
//             int amt = is.read(buf);
//             if (amt < 0)
//                 break;
//             out.write(buf, 0, amt);
//         }
//     }
// 
//     public static void copy(File from, File to, byte[] buf) throws IOException {
//         InputStream in = new FileInputStream(from);
//         try {
//             OutputStream out = new FileOutputStream(to);
//             try {
//                 pipe(in, out, buf);
//             } finally {
//                 out.close();
//             }
//         } finally {
//             in.close();
//         }
//     }
// 
//     /**
//      * Create a copy of an zip file without its empty directories.
//      * @param inputFile
//      * @param outputFile
//      * @throws IOException
//      */
//     public static void copyZipWithoutEmptyDirectories(final File inputFile, final File outputFile) throws IOException
//     {
//         final byte[] buf = new byte[0x2000];
// 
//         final ZipFile inputZip = new ZipFile(inputFile);
//         BufferedOutputStream buffered = new BufferedOutputStream(new FileOutputStream(outputFile));
// 
//         final ZipOutputStream outputStream = new ZipOutputStream(buffered);
//         try
//         {
//             // read a the entries of the input zip file and sort them
//             final Enumeration<? extends ZipEntry> e = inputZip.entries();
//             final ArrayList<ZipEntry> sortedList = new ArrayList<ZipEntry>();
//             while (e.hasMoreElements()) {
//                 final ZipEntry entry = e.nextElement();
//                 sortedList.add(entry);
//             }
// 
//             Collections.sort(sortedList, new Comparator<ZipEntry>()
//             {
//                 public int compare(ZipEntry o1, ZipEntry o2)
//                 {
//                     return o1.getName().compareTo(o2.getName());
//                 }
//             });
// 
//             // treat them again and write them in output, wenn they not are empty directories
//             for (int i = sortedList.size()-1; i>=0; i--)
//             {
//                 final ZipEntry inputEntry = sortedList.get(i);
//                 final String name = inputEntry.getName();
//                 final boolean isEmptyDirectory;
//                 if (inputEntry.isDirectory())
//                 {
//                     if (i == sortedList.size()-1)
//                     {
//                         // no item afterwards; it was an empty directory
//                         isEmptyDirectory = true;
//                     }
//                     else
//                     {
//                         final String nextName = sortedList.get(i+1).getName();
//                         isEmptyDirectory  = !nextName.startsWith(name);
//                     }
//                 }
//                 else
//                 {
//                     isEmptyDirectory = false;
//                 }
// 
// 
//                 // write the entry
//                 if (isEmptyDirectory)
//                 {
//                     sortedList.remove(inputEntry);
//                 }
//                 else
//                 {
//                     final ZipEntry outputEntry = new ZipEntry(inputEntry);
//                     outputStream.putNextEntry(outputEntry);
//                     ByteArrayOutputStream baos = new ByteArrayOutputStream();
//                     final InputStream is = inputZip.getInputStream(inputEntry);
//                     IoUtil.pipe(is, baos, buf);
//                     is.close();
//                     outputStream.write(baos.toByteArray());
//                 }
//             }
//         } finally {
//             outputStream.close();
//         }
// 
//     }
// 
// }


import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import junit.framework.TestCase;
import org.junit.Test;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.pantsbuild.jarjar.util.EntryStruct;
import org.pantsbuild.jarjar.util.IoUtil;
        super(Opcodes.ASM7);
      }

      @Override
      public void visitLdcInsn(Object value) {
        if (value instanceof String) {
          assertFalse(((String) value).contains("com.google."));
          assertFalse("Value was: " + value, ((String) value).contains("com/google/"));
        }
      }
    }

    private VerifyingClassVisitor() {
      super(Opcodes.ASM7);
    }

    @Override
    public MethodVisitor visitMethod(
        int access,
        java.lang.String name,
        java.lang.String descriptor,
        java.lang.String signature,
        java.lang.String[] exceptions) {
      return new VerifyingMethodVisitor();
    }
  }

  private static byte[] readInputStream(InputStream inputStream) throws IOException {
    byte[] buf = new byte[0x2000];
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
// Path: src/main/java/org/pantsbuild/jarjar/util/EntryStruct.java
// public class EntryStruct {
//     public byte[] data;
//     public String name;
//     public long time;
//     public boolean skipTransform;
// }
// 
// Path: src/main/java/org/pantsbuild/jarjar/util/IoUtil.java
// public class IoUtil {
//     private IoUtil() {}
// 
//     public static void pipe(InputStream is, OutputStream out, byte[] buf) throws IOException {
//         for (;;) {
//             int amt = is.read(buf);
//             if (amt < 0)
//                 break;
//             out.write(buf, 0, amt);
//         }
//     }
// 
//     public static void copy(File from, File to, byte[] buf) throws IOException {
//         InputStream in = new FileInputStream(from);
//         try {
//             OutputStream out = new FileOutputStream(to);
//             try {
//                 pipe(in, out, buf);
//             } finally {
//                 out.close();
//             }
//         } finally {
//             in.close();
//         }
//     }
// 
//     /**
//      * Create a copy of an zip file without its empty directories.
//      * @param inputFile
//      * @param outputFile
//      * @throws IOException
//      */
//     public static void copyZipWithoutEmptyDirectories(final File inputFile, final File outputFile) throws IOException
//     {
//         final byte[] buf = new byte[0x2000];
// 
//         final ZipFile inputZip = new ZipFile(inputFile);
//         BufferedOutputStream buffered = new BufferedOutputStream(new FileOutputStream(outputFile));
// 
//         final ZipOutputStream outputStream = new ZipOutputStream(buffered);
//         try
//         {
//             // read a the entries of the input zip file and sort them
//             final Enumeration<? extends ZipEntry> e = inputZip.entries();
//             final ArrayList<ZipEntry> sortedList = new ArrayList<ZipEntry>();
//             while (e.hasMoreElements()) {
//                 final ZipEntry entry = e.nextElement();
//                 sortedList.add(entry);
//             }
// 
//             Collections.sort(sortedList, new Comparator<ZipEntry>()
//             {
//                 public int compare(ZipEntry o1, ZipEntry o2)
//                 {
//                     return o1.getName().compareTo(o2.getName());
//                 }
//             });
// 
//             // treat them again and write them in output, wenn they not are empty directories
//             for (int i = sortedList.size()-1; i>=0; i--)
//             {
//                 final ZipEntry inputEntry = sortedList.get(i);
//                 final String name = inputEntry.getName();
//                 final boolean isEmptyDirectory;
//                 if (inputEntry.isDirectory())
//                 {
//                     if (i == sortedList.size()-1)
//                     {
//                         // no item afterwards; it was an empty directory
//                         isEmptyDirectory = true;
//                     }
//                     else
//                     {
//                         final String nextName = sortedList.get(i+1).getName();
//                         isEmptyDirectory  = !nextName.startsWith(name);
//                     }
//                 }
//                 else
//                 {
//                     isEmptyDirectory = false;
//                 }
// 
// 
//                 // write the entry
//                 if (isEmptyDirectory)
//                 {
//                     sortedList.remove(inputEntry);
//                 }
//                 else
//                 {
//                     final ZipEntry outputEntry = new ZipEntry(inputEntry);
//                     outputStream.putNextEntry(outputEntry);
//                     ByteArrayOutputStream baos = new ByteArrayOutputStream();
//                     final InputStream is = inputZip.getInputStream(inputEntry);
//                     IoUtil.pipe(is, baos, buf);
//                     is.close();
//                     outputStream.write(baos.toByteArray());
//                 }
//             }
//         } finally {
//             outputStream.close();
//         }
// 
//     }
// 
// }


// Path: src/test/java/org/pantsbuild/jarjar/MethodRewriterTest.java
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import junit.framework.TestCase;
import org.junit.Test;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.pantsbuild.jarjar.util.EntryStruct;
import org.pantsbuild.jarjar.util.IoUtil;

        super(Opcodes.ASM7);
      }

      @Override
      public void visitLdcInsn(Object value) {
        if (value instanceof String) {
          assertFalse(((String) value).contains("com.google."));
          assertFalse("Value was: " + value, ((String) value).contains("com/google/"));
        }
      }
    }

    private VerifyingClassVisitor() {
      super(Opcodes.ASM7);
    }

    @Override
    public MethodVisitor visitMethod(
        int access,
        java.lang.String name,
        java.lang.String descriptor,
        java.lang.String signature,
        java.lang.String[] exceptions) {
      return new VerifyingMethodVisitor();
    }
  }

  private static byte[] readInputStream(InputStream inputStream) throws IOException {
    byte[] buf = new byte[0x2000];
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    IoUtil.pipe(inputStream, baos, buf);