This method will analyze the JWK object using all analyzers.
It returns a message bag that may contains messages.
178014
public function analyze(JWK $jwk): MessageBag
    {
        $bag = new MessageBag();
        foreach ($this->analyzers as $analyzer) {
            $analyzer->analyze($jwk, $bag);
        }

        return $bag;
    }
395843
@Override
    public FBClassReader analyze(IAnalysisCache analysisCache, ClassDescriptor descriptor) throws CheckedAnalysisException {

        ClassData classData = analysisCache.getClassAnalysis(ClassData.class, descriptor);

        FBClassReader classReader = new FBClassReader(classData.getData());

        return classReader;
    }
1062779
def get_analyses(self):
        
        analyses = self.context.getAnalyses(full_objects=True)
        return filter(self.is_analysis_attachment_allowed, analyses)
921848
def _dissect_msg(self, match):
        
        recvfrom = match.group(1)
        frame = bytes.fromhex(match.group(2))
        if recvfrom == 'E':
            _LOGGER.warning("Received erroneous message, ignoring: %s", frame)
            return (None, None, None, None, None)
        msgtype = self._get_msgtype(frame[0])
        if msgtype in (READ_ACK, WRITE_ACK, READ_DATA, WRITE_DATA):
            # Some info is best read from the READ/WRITE_DATA messages
            # as the boiler may not support the data ID.
            # Slice syntax is used to prevent implicit cast to int.
            data_id = frame[1:2]
            data_msb = frame[2:3]
            data_lsb = frame[3:4]
            return (recvfrom, msgtype, data_id, data_msb, data_lsb)
        return (None, None, None, None, None)
1206000
@Override
    public BlockTypeDataflow analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor) throws CheckedAnalysisException {
        CFG cfg = getCFG(analysisCache, descriptor);
        DepthFirstSearch dfs = getDepthFirstSearch(analysisCache, descriptor);
        BlockTypeAnalysis analysis = new BlockTypeAnalysis(dfs);
        BlockTypeDataflow dataflow = new BlockTypeDataflow(cfg, analysis);
        dataflow.execute();
        return dataflow;
    }
1071188
@Override
    public CompactLocationNumbering analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor)
            throws CheckedAnalysisException {
        Method method = analysisCache.getMethodAnalysis(Method.class, descriptor);

        if (method.getCode() == null) {
            return null;
        }

        CFG cfg = getCFG(analysisCache, descriptor);
        return new CompactLocationNumbering(cfg);
    }
234500
@Override
    public CallListDataflow analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor) throws CheckedAnalysisException {
        CallListAnalysis analysis = new CallListAnalysis(getCFG(analysisCache, descriptor), getDepthFirstSearch(analysisCache,
                descriptor), getConstantPoolGen(analysisCache, descriptor.getClassDescriptor()));

        CallListDataflow dataflow = new CallListDataflow(getCFG(analysisCache, descriptor), analysis);
        dataflow.execute();

        return dataflow;

    }
536017
def _analyze_case(model_dir, bench_dir, config):
    
    bundle = livvkit.verification_model_module
    model_out = functions.find_file(model_dir, "*"+config["output_ext"])
    bench_out = functions.find_file(bench_dir, "*"+config["output_ext"])
    model_config = functions.find_file(model_dir, "*"+config["config_ext"])
    bench_config = functions.find_file(bench_dir, "*"+config["config_ext"])
    model_log = functions.find_file(model_dir, "*"+config["logfile_ext"])
    el = [
            bit_for_bit(model_out, bench_out, config),
            diff_configurations(model_config, bench_config, bundle, bundle),
            bundle.parse_log(model_log)
         ]
    return el
544786
def interpret_association_request(message)
      info = Hash.new
      msg = Stream.new(message, @net_endian)
      # Protocol version (2 bytes)
      info[:protocol_version] = msg.decode(2, "HEX")
      # Reserved (2 bytes)
      msg.skip(2)
      # Called AE (shall be returned in the association response) (16 bytes)
      info[:called_ae] = msg.decode(16, "STR")
      # Calling AE (shall be returned in the association response) (16 bytes)
      info[:calling_ae] = msg.decode(16, "STR")
      # Reserved (32 bytes)
      msg.skip(32)
      # APPLICATION CONTEXT:
      # Item type (1 byte)
      info[:application_item_type] = msg.decode(1, "HEX") # 10H
      # Reserved (1 byte)
      msg.skip(1)
      # Application item length (2 bytes)
      info[:application_item_length] = msg.decode(2, "US")
      # Application context (variable length)
      info[:application_context] = msg.decode(info[:application_item_length], "STR")
      # PRESENTATION CONTEXT:
      # As multiple presentation contexts may occur, we need a loop to catch them all:
      # Each presentation context hash will be put in an array, which will be put in the info hash.
      presentation_contexts = Array.new
      pc_loop = true
      while pc_loop do
        # Item type (1 byte)
        item_type = msg.decode(1, "HEX")
        if item_type == ITEM_PRESENTATION_CONTEXT_REQUEST
          pc = Hash.new
          pc[:presentation_item_type] = item_type
          # Reserved (1 byte)
          msg.skip(1)
          # Presentation context item length (2 bytes)
          pc[:presentation_item_length] = msg.decode(2, "US")
          # Presentation context id (1 byte)
          pc[:presentation_context_id] = msg.decode(1, "BY")
          # Reserved (3 bytes)
          msg.skip(3)
          presentation_contexts << pc
          # A presentation context contains an abstract syntax and one or more transfer syntaxes.
          # ABSTRACT SYNTAX SUB-ITEM:
          # Abstract syntax item type (1 byte)
          pc[:abstract_syntax_item_type] = msg.decode(1, "HEX")
          # Reserved (1 byte)
          msg.skip(1)
          # Abstract syntax item length (2 bytes)
          pc[:abstract_syntax_item_length] = msg.decode(2, "US")
          # Abstract syntax (variable length)
          pc[:abstract_syntax] = msg.decode(pc[:abstract_syntax_item_length], "STR")
          ## TRANSFER SYNTAX SUB-ITEM(S):
          # As multiple transfer syntaxes may occur, we need a loop to catch them all:
          # Each transfer syntax hash will be put in an array, which will be put in the presentation context hash.
          transfer_syntaxes = Array.new
          ts_loop = true
          while ts_loop do
            # Item type (1 byte)
            item_type = msg.decode(1, "HEX")
            if item_type == ITEM_TRANSFER_SYNTAX
              ts = Hash.new
              ts[:transfer_syntax_item_type] = item_type
              # Reserved (1 byte)
              msg.skip(1)
              # Transfer syntax item length (2 bytes)
              ts[:transfer_syntax_item_length] = msg.decode(2, "US")
              # Transfer syntax name (variable length)
              ts[:transfer_syntax] = msg.decode(ts[:transfer_syntax_item_length], "STR")
              transfer_syntaxes << ts
            else
              # Break the transfer syntax loop, as we have probably reached the next stage,
              # which is either user info or a new presentation context entry. Rewind:
              msg.skip(-1)
              ts_loop = false
            end
          end
          pc[:ts] = transfer_syntaxes
        else
          # Break the presentation context loop, as we have probably reached the next stage, which is user info. Rewind:
          msg.skip(-1)
          pc_loop = false
        end
      end
      info[:pc] = presentation_contexts
      # USER INFORMATION:
      # Item type (1 byte)
      info[:user_info_item_type] = msg.decode(1, "HEX")
      # Reserved (1 byte)
      msg.skip(1)
      # User information item length (2 bytes)
      info[:user_info_item_length] = msg.decode(2, "US")
      # User data (variable length):
      while msg.index < msg.length do
        # Item type (1 byte)
        item_type = msg.decode(1, "HEX")
        # Reserved (1 byte)
        msg.skip(1)
        # Item length (2 bytes)
        item_length = msg.decode(2, "US")
        case item_type
          when ITEM_MAX_LENGTH
            info[:max_pdu_length] = msg.decode(item_length, "UL")
          when ITEM_IMPLEMENTATION_UID
            info[:implementation_class_uid] = msg.decode(item_length, "STR")
          when ITEM_MAX_OPERATIONS_INVOKED
            # Asynchronous operations window negotiation (PS 3.7: D.3.3.3) (2*2 bytes)
            info[:maxnum_operations_invoked] = msg.decode(2, "US")
            info[:maxnum_operations_performed] = msg.decode(2, "US")
          when ITEM_ROLE_NEGOTIATION
            # SCP/SCU Role Selection Negotiation (PS 3.7 D.3.3.4)
            # Note: An association request may contain several instances of this item type (each with a different abstract syntax).
            uid_length = msg.decode(2, "US")
            role = Hash.new
            # SOP Class UID (Abstract syntax):
            role[:sop_uid] = msg.decode(uid_length, "STR")
            # SCU Role (1 byte):
            role[:scu] = msg.decode(1, "BY")
            # SCP Role (1 byte):
            role[:scp] = msg.decode(1, "BY")
            if info[:role_negotiation]
              info[:role_negotiation] << role
            else
              info[:role_negotiation] = [role]
            end
          when ITEM_IMPLEMENTATION_VERSION
            info[:implementation_version] = msg.decode(item_length, "STR")
          else
            # Unknown item type:
            # Value (variable length)
            value = msg.decode(item_length, "STR")
            logger.warn("Unknown user info item type received. Please update source code or contact author. (item type: " + item_type + ")")
        end
      end
      stop_receiving
      info[:valid] = true
      return info
    end
631783
def interpret(self, msg):
        
        for gallery in msg.get('galleries', []):
            self.add_folder(gallery)
            
        image_file = msg.get('image')
        if not image_file: return

        return self.find_image(image_file)
112024
def analyze(self, args):
        
        self.log.info("Running catalog analysis")

        if args.count:
            self.count()

        return
1076361
@Override
    public boolean analyzeJar(Analyzer analyzer) throws Exception {

        try {
        if (scanAgain) {

            //this will only have an effect on the first scan, because subsequent scanAgain
            //will use the errorMarker to decide if to scan again
            resetErrorMarker();

            List<String> newlyAddedPackages = new ArrayList<String>();

            System.out.println("ImportlessPackager plugin: iteration " + iteration);
            // set up exclude filter
            setupFilters(analyzer);
            // collect dependency packages
            Set<PackageRef> importedPackages = collectDependencies(analyzer);
            
            Jar outputJar = analyzer.getJar();
            //loop through the referred packages
            for (PackageRef ref : importedPackages) {

                String packageName = ref.getFQN();

                System.out.println("Seeking package " + packageName);

                boolean foundPackage = false;
                // locate the package in the classpath and add it the the export
                for (Jar src : analyzer.getClasspath()) {
               		if (src.getPackages().contains(packageName)) {
               			foundPackage = true;
                        System.out.println("Found matching pkg " + packageName + " from " +src.getSource().getAbsolutePath());
                         //only want to include the package itself, not any sub-packages
                         //can provide an Instruction to bnd for this, but it gets a bit weird:
                         //match the package name plus a / since everything in the package will
                         //have the package path followed by a separator.
                         //We use [/|/] to match the single / because bnd needs something to serve
                         //as a wildcard to enable regex matching (otherwise it just does an equals match)
                         //we can't use the other wildcards e.g. * ? because bnd processes them into
                         //.?, .* to do an any character match
                         //If we don't want any sub package content we can't allow any more slashes
                         //so use [^/]+ (i.e. not / 1 or more times)
                         outputJar.addAll(src, new Instruction(ref.getPath() + "[/|/][^/]+"));

                         newlyAddedPackages.add(packageName);

                         //we don't break the outer loop in case of split packages (ick!)
                         //since we might find some additional content for this package in another jar
                     }
                 }
                 if (!foundPackage) {
                	 //we couldn't find the package on the classpath, fail the build
                     //with a helpful message

                     String errorMsg = "Package " + packageName + " not found for inclusion in jar. Is the package available on the projects classpath?";
                     error(errorMsg);
                }
            }

            //add all the newly added packages to our global list so we don't check them again
            if (newlyAddedPackages.isEmpty()) {
                //no new packages, no further scanning required
                scanAgain = false;
            } else {
                addedPackages.addAll(newlyAddedPackages);
                iteration++;
                if (iteration > LAST_ITERATION) {
                    //there are new packages but we've run out of iterations, fail the build
                    error("Maximum number of plugin iterations reached, but there were still new packages to analyze. Consider adding more iterations.");
                }
            }

            //don't bother scanning again if we've already had an error
            if (scanAgain == true && errorMarker.exists())
                scanAgain = false;

        }
        } catch(Exception ex) {
            ex.printStackTrace();
            System.out.println(ex.getMessage());
        }

        //tell bnd to reanalyze the classpath if we are going to scan again
        return scanAgain;
    }
983041
void analyze(final MethodResult methodResult) {
        lock.lock();
        try {
            buildPackagePrefix(methodResult.getParentResource().getOriginalClass());

            final List<Instruction> visitedInstructions = interpretRelevantInstructions(methodResult.getInstructions());

            // find project defined methods in invoke occurrences
            final Set<ProjectMethod> projectMethods = findProjectMethods(visitedInstructions);

            // add project methods to global method pool
            projectMethods.forEach(MethodPool.getInstance()::addProjectMethod);

            Element returnedElement = new MethodSimulator().simulate(visitedInstructions);
            final String returnType = methodResult.getOriginalMethodSignature().getReturnType();

            // void resource methods are interpreted later; stop analyzing on error
            if (Types.PRIMITIVE_VOID.equals(returnType)) {
                return;
            }

            if (returnedElement == null) {
                // happens for abstract methods or if there is no return
                return;
            }

            final Set<Object> possibleObjects = returnedElement.getPossibleValues().stream().filter(o -> !(o instanceof HttpResponse))
                    .collect(Collectors.toSet());

            // for non-Response methods add a default if there are non-Response objects or none objects at all
            if (!Types.RESPONSE.equals(returnType)) {
                final HttpResponse defaultResponse = new HttpResponse();

                if (Types.OBJECT.equals(returnType))
                    defaultResponse.getEntityTypes().addAll(returnedElement.getTypes());
                else
                    defaultResponse.getEntityTypes().add(returnType);

                possibleObjects.stream().filter(o -> o instanceof JsonValue).map(o -> (JsonValue) o).forEach(defaultResponse.getInlineEntities()::add);

                defaultResponse.getContentTypes().addAll(methodResult.getResponseMediaTypes());

                methodResult.getResponses().add(defaultResponse);
            }

            // add Response results as well
            returnedElement.getPossibleValues().stream().filter(o -> o instanceof HttpResponse).map(o -> (HttpResponse) o).forEach(methodResult.getResponses()::add);
        } finally {
            lock.unlock();
        }
    }
1036458
private void processPartitionReplyMsg(PartitionReplyMsg msg) {

        if (analyzerProxy == null) {
            return;
        }

        switch (msg.getMsgType()) {
            case PARTITION_COLLECTOR_DATA:
                Serializable collectorData = deserializeCollectorData(msg.getCollectorData());
                logger.finer("Analyze collector data: " + collectorData);
                analyzerProxy.analyzeCollectorData(collectorData);
                break;

            case PARTITION_FINAL_STATUS:
                logger.fine("Calling analyzeStatus(): " + msg);
                analyzerProxy.analyzeStatus(msg.getBatchStatus(), msg.getExitStatus());
                break;
        }
    }
606677
def unpack_messages(self, partitions_msgs):
        

        for pmsg in partitions_msgs:
            key = pmsg['_key']
            partition = pmsg['partition']
            offset = pmsg['offset']
            msg = pmsg.pop('message')
            if msg:
                try:
                    record = self.deserialize_fun(msg)
                except Exception as e:
                    log.error('Error unpacking record at partition:offset {}:{} (key: {} : {})'.format(partition, offset, key, repr(e)))
                    continue
                else:
                    if isinstance(record, dict):
                        pmsg['record'] = record
                        yield pmsg
                    else:
                        log.info('Record {} has wrong type'.format(key))
            else:
                yield pmsg
506421
def Analyze(self, hashes):
    
    logger.debug(
        'Opening connection to {0:s}:{1:d}'.format(self._host, self._port))

    nsrl_socket = self._GetSocket()
    if not nsrl_socket:
      self.SignalAbort()
      return []

    hash_analyses = []
    for digest in hashes:
      response = self._QueryHash(nsrl_socket, digest)
      if response is None:
        continue

      hash_analysis = interface.HashAnalysis(digest, response)
      hash_analyses.append(hash_analysis)

    nsrl_socket.close()

    logger.debug(
        'Closed connection to {0:s}:{1:d}'.format(self._host, self._port))

    return hash_analyses
736701
function deserializeKafkaMessage(kafkaMessage) {
    kafkaMessage.message = objectFactory(kafkaMessage.value);

    kafkaMessage.message._kafka = {
        topic:     kafkaMessage.topic,
        partition: kafkaMessage.partition,
        offset:    kafkaMessage.offset,
        timestamp: kafkaMessage.timestamp || null,
        key:       kafkaMessage.key,
    };

    return kafkaMessage;
}