Commit 3fd6bef3 authored by Vít Kabele's avatar Vít Kabele

Optimized imports in ch.usi.dag.disl and dislserver package

parent 11c2a6dc
Pipeline #3385 canceled with stages
......@@ -7,6 +7,7 @@
package ch.usi.dag.dislserver;
import ch.usi.dag.dislserver.Protocol.*;
import ch.usi.dag.util.logging.Logger;
import com.google.protobuf.CodedInputStream;
import com.google.protobuf.CodedOutputStream;
......@@ -17,12 +18,6 @@ import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.SocketChannel;
import ch.usi.dag.dislserver.Protocol.ClientMessage;
import ch.usi.dag.dislserver.Protocol.ServerMessage;
import ch.usi.dag.dislserver.Protocol.SessionInitResponse;
import ch.usi.dag.dislserver.Protocol.InstrumentationDelivery;
import ch.usi.dag.dislserver.Protocol.InstrumentationAcceptConfirmation;
/**
* Handle one connection to the client.
......
package ch.usi.dag.dislserver;
import ch.usi.dag.util.logging.Logger;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
......@@ -15,8 +17,6 @@ import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import ch.usi.dag.util.logging.Logger;
public final class DiSLServer {
......
package ch.usi.dag.dislserver;
import ch.usi.dag.disl.DiSL;
import ch.usi.dag.disl.DiSL.CodeOption;
import ch.usi.dag.disl.DiSLException;
import ch.usi.dag.disl.JavaNames;
import ch.usi.dag.dislserver.Protocol.InstrumentClassRequest;
import ch.usi.dag.dislserver.Protocol.InstrumentClassResponse;
import ch.usi.dag.util.Strings;
import ch.usi.dag.util.logging.Logger;
import com.google.protobuf.ByteString;
import org.objectweb.asm.ClassReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
......@@ -11,19 +22,6 @@ import java.util.List;
import java.util.Set;
import java.util.UUID;
import org.objectweb.asm.ClassReader;
import com.google.protobuf.ByteString;
import ch.usi.dag.disl.DiSL;
import ch.usi.dag.disl.DiSL.CodeOption;
import ch.usi.dag.disl.DiSLException;
import ch.usi.dag.disl.JavaNames;
import ch.usi.dag.dislserver.Protocol.InstrumentClassRequest;
import ch.usi.dag.dislserver.Protocol.InstrumentClassResponse;
import ch.usi.dag.util.Strings;
import ch.usi.dag.util.logging.Logger;
final class RequestProcessor {
......
package ch.usi.dag.disl;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.annotation.*;
/**
......
package ch.usi.dag.disl;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.SyntheticLocal.Initialize;
import ch.usi.dag.util.logging.Logger;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.AnnotationNode;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.FieldInsnNode;
import org.objectweb.asm.tree.FieldNode;
import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.IntInsnNode;
import org.objectweb.asm.tree.LabelNode;
import org.objectweb.asm.tree.LdcInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.VarInsnNode;
import org.objectweb.asm.tree.*;
import org.objectweb.asm.tree.analysis.Frame;
import org.objectweb.asm.tree.analysis.SourceValue;
import ch.usi.dag.disl.SyntheticLocal.Initialize;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.util.logging.Logger;
import java.util.*;
/**
* Parses DiSL class with local variables.
......
package ch.usi.dag.disl;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AnnotationNode;
import org.objectweb.asm.tree.MethodNode;
import java.lang.reflect.Method;
import java.util.*;
import java.util.function.BiConsumer;
......@@ -7,12 +13,6 @@ import java.util.function.Predicate;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AnnotationNode;
import org.objectweb.asm.tree.MethodNode;
final class AnnotationMapper {
......
package ch.usi.dag.disl;
import java.lang.reflect.Method;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import ch.usi.dag.util.Strings;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.util.Strings;
import java.lang.reflect.Method;
import java.util.*;
import java.util.stream.Collectors;
class ArgProcessorParser extends AbstractParser {
......
package ch.usi.dag.disl;
import org.objectweb.asm.Type;
import java.util.HashMap;
import java.util.Map;
import org.objectweb.asm.Type;
public enum ContextKind {
......
package ch.usi.dag.disl;
import java.lang.reflect.Method;
import java.util.*;
import ch.usi.dag.util.logging.Logger;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AnnotationNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.util.logging.Logger;
import java.lang.reflect.Method;
import java.util.*;
/**
......
package ch.usi.dag.disl;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
import java.util.Collections;
import java.util.List;
import java.util.Set;
/**
* Represents an analyzed and partially expanded code template. Instances of
......
package ch.usi.dag.disl;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.MethodNode;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Set;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.MethodNode;
/**
* Captures the set of context kinds and static context types referenced by
......
package ch.usi.dag.disl;
import java.util.List;
import java.util.stream.Collectors;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.LabelNode;
import ch.usi.dag.disl.AsmHelper.Insns;
import java.util.List;
import java.util.stream.Collectors;
/**
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.*;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.stream.Collectors;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.FieldInsnNode;
import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
import ch.usi.dag.disl.AsmHelper.Insns;
/**
* Represents a snippet or argument processor code template. This template only
......
package ch.usi.dag.disl;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.Reflection;
import ch.usi.dag.disl.Reflection.Class;
import ch.usi.dag.disl.Reflection.Method;
import ch.usi.dag.disl.AbstractStaticContext;
import org.objectweb.asm.tree.MethodNode;
/**
......
......@@ -8,8 +8,8 @@
*/
package ch.usi.dag.disl;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode;
/**
......
package ch.usi.dag.disl;
import ch.usi.dag.util.logging.Logger;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Properties;
import java.util.*;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import ch.usi.dag.util.logging.Logger;
/**
* Provides access to DiSL and transformer class names discovered from manifest
......
package ch.usi.dag.disl;
import java.util.List;
import java.util.Set;
import java.util.function.IntConsumer;
import java.util.stream.IntStream;
import ch.usi.dag.disl.dynamicbypass.BypassCheck;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.commons.CodeSizeEvaluator;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.JumpInsnNode;
import org.objectweb.asm.tree.LabelNode;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
import org.objectweb.asm.tree.*;
import ch.usi.dag.disl.dynamicbypass.BypassCheck;
import java.util.List;
import java.util.Set;
import java.util.function.IntConsumer;
import java.util.stream.IntStream;
abstract class CodeMerger {
......
......@@ -4,11 +4,7 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.*;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.stream.Collectors;
......
......@@ -14,7 +14,10 @@ import org.objectweb.asm.tree.ClassNode;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import java.util.jar.Manifest;
......
package ch.usi.dag.disl;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
/**
* Maintains reflective information about instrumented classes.
......
package ch.usi.dag.disl;
import java.util.Set;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.*;
import org.objectweb.asm.commons.AdviceAdapter;
import java.util.Set;
final class TLVInserter extends ClassVisitor {
......
package ch.usi.dag.disl;
import java.util.List;
import org.objectweb.asm.tree.MethodNode;
import java.util.List;
/**
* AbstractDWRMarker is an enhancement of AbstractMarker automatically computing
* weaving region. This includes correct position of end region (not after jump)
......
package ch.usi.dag.disl;
import java.util.LinkedList;
import java.util.List;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import java.util.LinkedList;
import java.util.List;
abstract class AbstractInsnMarker extends AbstractMarker {
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import org.objectweb.asm.tree.*;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.LabelNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
import ch.usi.dag.disl.Shadow.WeavingRegion;
/**
* Simplifies {@link Marker} implementation by providing a
......
package ch.usi.dag.disl;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.AdviceAdapter;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import ch.usi.dag.disl.AsmHelper.Insns;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
/**
......
package ch.usi.dag.disl;
import java.util.LinkedList;
import java.util.List;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.AsmHelper.Insns;
import java.util.LinkedList;
import java.util.List;
/**
......
package ch.usi.dag.disl;
import java.util.LinkedList;
import java.util.List;
import ch.usi.dag.disl.AsmHelper.Insns;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.Shadow.WeavingRegion;
import ch.usi.dag.disl.AsmHelper.Insns;
import java.util.LinkedList;
import java.util.List;
/**
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.AsmHelper.Insns;
/**
* Marks one bytecode instruction.
......
package ch.usi.dag.disl;
import org.objectweb.asm.tree.MethodNode;
import java.util.LinkedList;
import java.util.List;
import org.objectweb.asm.tree.MethodNode;
/**
* Marker does not create any marking.
......
package ch.usi.dag.disl;
import java.util.LinkedList;
import java.util.List;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
import ch.usi.dag.disl.AsmHelper.Insns;
import java.util.LinkedList;
import java.util.List;
/**
......
package ch.usi.dag.disl;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.AsmHelper.Insns;
/**
* Marks bytecode instructions depending on the ASM class type.
* <p>
......
package ch.usi.dag.disl;
import java.util.List;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import java.util.List;
/**
* <p>
......
package ch.usi.dag.disl;
import java.util.LinkedList;
import java.util.List;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import ch.usi.dag.disl.AsmHelper.Insns;
import java.util.LinkedList;
import java.util.List;
/**
......
package ch.usi.dag.disl;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
/**
* <p>
......
package ch.usi.dag.disl;
import java.util.LinkedList;
import java.util.List;
import ch.usi.dag.disl.AsmHelper.Insns;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TryCatchBlockNode;
import ch.usi.dag.disl.AsmHelper.Insns;
import java.util.LinkedList;
import java.util.List;
/**
* Marks a try block.
......
package ch.usi.dag.disl;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.MethodNode;