Computes line coverage information over a provided set of tests for
        the program inside a given container.
346268
def coverage(self,
                 container: Container,
                 tests: Optional[Iterable[TestCase]] = None,
                 *,
                 instrument: bool = True
                 ) -> TestSuiteCoverage:
        
        extractor = self.coverage_extractor(container)
        if tests is None:
            bugs = self.__installation.bugs
            bug = bugs[container.bug]
            tests = bug.tests
        return extractor.run(tests, instrument=instrument)
976347
def record_coverage(self, rule):
        """"""
        log(DEBUG, u'Rule ({}): {}'.format(*rule).encode('utf-8'))
        self.coverage_lines.append('DA:{},1'.format(rule[0]))
442822
def total_coverage
      return 0.0 if lines.size.zero?
      ran_lines.size.to_f / lines.size.to_f
    end
388439
void analyzeIfNeeded(JCTree tree, Env<AttrContext> env) {
        if (!analyzerModes.isEmpty() &&
                !env.info.isSpeculative &&
                TreeInfo.isStatement(tree)) {
            JCStatement stmt = (JCStatement)tree;
            analyze(stmt, env);
        }
    }
720644
function addDerivedInfo(coverage) {
    Object.keys(coverage).forEach(function (k) {
      addDerivedInfoForFile(coverage[k]);
    });
  }
788455
def coverage(ctx, opts=""):
    
    return test(ctx, coverage=True, include_slow=True, opts=opts)
1180475
def individual_report(coverage_path, current_project_path)
      if File.exist? coverage_path
        committed_files = git.modified_files + git.added_files

        unless current_project_path.nil?
          committed_files = committed_files.map do |s|
            current_project_path + '/' + s
          end
        end

        covered_files = JSON.parse(File.read(coverage_path), symbolize_names: true)[:files]
                            .select { |f| committed_files.include?(f[:filename]) }

        unless current_project_path.nil?
          covered_files.each { |f| f[:filename].sub!(%r{^#{current_project_path}/?}, '') }
        end

        return if covered_files.nil? || covered_files.empty?
        markdown individual_coverage_message(covered_files)
      else
        fail('Code coverage data not found')
      end
    end
1024380
private function processRawData()
    {
        // Get the raw data from Xdebug
        $data = xdebug_get_code_coverage();

        // Create an array for storing processed coverage data
        $processed = [
            'classes' => [],
            'files'   => [],
        ];

        // Loop through each of the files in the coverage data
        foreach ($data as $file => $lines) {
            // Check if this file is covered
            if ($this->isCovered($file)) {
                // Filter out dead code from the results
                $filter = function ($value, $line = null) {
                    return $value !== self::DEAD;
                };
                $executable = array_filter($lines, $filter);

                // Filter out unused code to get the lines covered
                $object = $this;
                $filter = function ($value, $line) use ($object, $file) {
                    if (in_array($line, $object->covered[$file])) {
                        return $value === 1;
                    }
                };
                $covered = array_filter($lines, $filter, ARRAY_FILTER_USE_BOTH);

                // Store the counts for this file
                $coverage = [
                    'covered' => count($covered),
                    'total'   => count($executable),
                ];

                // If a classname exists in the file,
                // store the counts against it
                if ($class = $this->getClassForFile($file)) {
                    $processed['classes'][$class] = $coverage;
                    continue;
                }

                // If no class has been found, store the counts
                // directly against the file name
                $name = str_replace($this->runner->pwd.'/', '', $file);

                $processed['files'][$name] = $coverage;
            }
        }

        // Store the processed data
        return $this->processed = $processed;
    }
492727
protected final void verify() {
        collectInitialisers();
        verifyCandidates();
        verifyInitialisers();
        collectPossibleInitialValues();
        verifyPossibleInitialValues();
        collectEffectiveAssignmentInstructions();
        verifyEffectiveAssignmentInstructions();
        collectAssignmentGuards();
        verifyAssignmentGuards();
        end();
    }
620387
function coverage(filename, data) {
  var ret = {
    filename: filename,
    coverage: 0,
    hits: 0,
    misses: 0,
    sloc: 0,
    source: {}
  };

  data.source.forEach(function(line, num){
    num++;

    if (data[num] === 0) {
      ret.misses++;
      ret.sloc++;
    } else if (data[num] !== undefined) {
      ret.hits++;
      ret.sloc++;
    }

    ret.source[num] = {
        source: line
      , coverage: data[num] === undefined
        ? ''
        : data[num]
    };
  });

  ret.coverage = ret.hits / ret.sloc * 100;

  return ret;
}
828732
public boolean evaluate(FieldContainer container, Map<GenericCriteriaPrompt, Object> promptValues)
   {
      boolean result = true;
      if (m_criteria != null)
      {
         result = m_criteria.evaluate(container, promptValues);

         //
         // If this row has failed, but it is a summary row, and we are
         // including related summary rows, then we need to recursively test
         // its children
         //
         if (!result && m_showRelatedSummaryRows && container instanceof Task)
         {
            for (Task task : ((Task) container).getChildTasks())
            {
               if (evaluate(task, promptValues))
               {
                  result = true;
                  break;
               }
            }
         }
      }

      return (result);
   }
923734
def parse_coverage(coverage_report, parser):
    
    if parser in PARSERS:
        if coverage_report:
            return PARSERS[parser].parse_coverage_report(coverage_report)
        return None
    return NotImplemented
726809
private IAtomContainerSet getHyperconjugationInteractions(IAtomContainer ac, IAtomContainerSet iSet)
            throws IOException, ClassNotFoundException, CDKException {
        IAtomContainerSet set = ac.getBuilder().newInstance(IAtomContainerSet.class);
        IReactionProcess type = new HeterolyticCleavageSBReaction();
        cleanFlagReactiveCenter(ac);
        boolean found = false; /* control obtained containers */
        IAtomContainerSet setOfReactants = ac.getBuilder().newInstance(IAtomContainerSet.class);
        /* search of reactive center. */
        out: for (int i = 0; i < ac.getBondCount(); i++) {
            if (ac.getBond(i).getOrder() != IBond.Order.SINGLE) {
                for (int j = 0; j < iSet.getAtomContainerCount(); j++) {
                    IAtomContainer ati = iSet.getAtomContainer(j);
                    if (!ati.equals(ac))
                        for (int k = 0; k < ati.getBondCount(); k++) {
                            IAtom a0 = ati.getBond(k).getBegin();
                            IAtom a1 = ati.getBond(k).getEnd();
                            if (!a0.getSymbol().equals("H") || !a1.getSymbol().equals("H"))
                                if ((a0.getID().equals(ac.getBond(i).getBegin().getID()) && a1.getID().equals(
                                        ac.getBond(i).getEnd().getID()))
                                        || (a1.getID().equals(ac.getBond(i).getBegin().getID()) && a0.getID().equals(
                                                ac.getBond(i).getEnd().getID()))) {
                                    if (a0.getFormalCharge() != 0 || a1.getFormalCharge() != 0) continue out;
                                }
                        }
                }
                ac.getBond(i).getBegin().setFlag(CDKConstants.REACTIVE_CENTER, true);
                ac.getBond(i).getEnd().setFlag(CDKConstants.REACTIVE_CENTER, true);
                ac.getBond(i).setFlag(CDKConstants.REACTIVE_CENTER, true);
                found = true;
            }
        }
        if (!found) return null;

        setOfReactants.addAtomContainer(ac);

        List<IParameterReact> paramList = new ArrayList<IParameterReact>();
        IParameterReact param = new SetReactionCenter();
        param.setParameter(Boolean.TRUE);
        paramList.add(param);
        type.setParameterList(paramList);
        IReactionSet setOfReactions = type.initiate(setOfReactants, null);
        for (int i = 0; i < setOfReactions.getReactionCount(); i++) {
            type = new HyperconjugationReaction();
            IAtomContainerSet setOfM2 = ac.getBuilder().newInstance(IAtomContainerSet.class);
            IAtomContainer mol = setOfReactions.getReaction(i).getProducts().getAtomContainer(0);
            for (int k = 0; k < mol.getBondCount(); k++) {
                mol.getBond(k).setFlag(CDKConstants.REACTIVE_CENTER, false);
                mol.getBond(k).getBegin().setFlag(CDKConstants.REACTIVE_CENTER, false);
                mol.getBond(k).getEnd().setFlag(CDKConstants.REACTIVE_CENTER, false);
            }
            setOfM2.addAtomContainer(mol);
            List<IParameterReact> paramList2 = new ArrayList<IParameterReact>();
            IParameterReact param2 = new SetReactionCenter();
            param2.setParameter(Boolean.FALSE);
            paramList2.add(param);
            type.setParameterList(paramList2);
            IReactionSet setOfReactions2 = type.initiate(setOfM2, null);
            if (setOfReactions2.getReactionCount() > 0) {

                IAtomContainer react = setOfReactions2.getReaction(0).getReactants().getAtomContainer(0);

                set.addAtomContainer(react);
            }
        }

        return set;
    }
1050005
def _bam_coverage(name, bam_input, data):
    """"""
    cmd = ("{bam_coverage} -b {bam_input} -o {bw_output} "
          "--binSize 20 --effectiveGenomeSize {size} "
          "--smoothLength 60 --extendReads 150 --centerReads -p {cores}")
    size = bam.fasta.total_sequence_length(dd.get_ref_file(data))
    cores = dd.get_num_cores(data)
    try:
        bam_coverage = config_utils.get_program("bamCoverage", data)
    except config_utils.CmdNotFound:
        logger.info("No bamCoverage found, skipping bamCoverage.")
        return None
    resources = config_utils.get_resources("bamCoverage", data["config"])
    if resources:
        options = resources.get("options")
        if options:
            cmd += " %s" % " ".join([str(x) for x in options])
    bw_output = os.path.join(os.path.dirname(bam_input), "%s.bw" % name)
    if utils.file_exists(bw_output):
        return bw_output
    with file_transaction(bw_output) as out_tx:
        do.run(cmd.format(**locals()), "Run bamCoverage in %s" % name)
    return bw_output
1101865
public void optimizeLineSection() {

/* Some debugging code
        for (int i = 0; i < lineData.size(); i++) {
            LineInfo li = (LineInfo)lineData.get(i);
            System.out.print(li.toString());
        }
*/
        //Incorporate each LineInfo into the previous LineInfo's 
        //outputLineIncrement, if possible
        int i = 0;
        while (i < lineData.size() - 1) {
            LineInfo li = lineData.get(i);
            LineInfo liNext = lineData.get(i + 1);
            if (!liNext.lineFileIDSet
                && liNext.inputStartLine == li.inputStartLine
                && liNext.inputLineCount == 1
                && li.inputLineCount == 1
                && liNext.outputStartLine
                    == li.outputStartLine
                        + li.inputLineCount * li.outputLineIncrement) {
                li.setOutputLineIncrement(
                    liNext.outputStartLine
                        - li.outputStartLine
                        + liNext.outputLineIncrement);
                lineData.remove(i + 1);
            } else {
                i++;
            }
        }

        //Incorporate each LineInfo into the previous LineInfo's
        //inputLineCount, if possible
        i = 0;
        while (i < lineData.size() - 1) {
            LineInfo li = lineData.get(i);
            LineInfo liNext = lineData.get(i + 1);
            if (!liNext.lineFileIDSet
                && liNext.inputStartLine == li.inputStartLine + li.inputLineCount
                && liNext.outputLineIncrement == li.outputLineIncrement
                && liNext.outputStartLine
                    == li.outputStartLine
                        + li.inputLineCount * li.outputLineIncrement) {
                li.setInputLineCount(li.inputLineCount + liNext.inputLineCount);
                lineData.remove(i + 1);
            } else {
                i++;
            }
        }
    }
581162
def ls(checks):
    """"""
    if checks:
        checks = sorted(get_testable_checks() & set(checks))

        for check in checks:
            envs = get_available_tox_envs(check, e2e_only=True)

            if envs:
                echo_success('{}:'.format(check))
                for env in envs:
                    echo_info(env, indent=True)

    else:
        for check in get_configured_checks():
            envs = get_configured_envs(check)

            if envs:
                echo_success('{}:'.format(check))
                for env in envs:
                    echo_info(env, indent=True)
927068
def record_coverage_zero(self, rule, offset):
        """"""
        self.coverage_lines.append('DA:{},0'.format(rule.source_line + offset))