CHECKSTYLE:CONSTANTS-OFF
777295
public static String createSummary(final TasksResult result) {
        StringBuilder summary = new StringBuilder();
        int tasks = result.getNumberOfAnnotations();

        summary.append(Messages.Tasks_ResultAction_Summary());
        summary.append(" ");
        if (tasks > 0) {
            summary.append("<a href=\"tasksResult\">");
        }
        if (tasks == 1) {
            summary.append(Messages.Tasks_ResultAction_OneWarning());
        }
        else {
            summary.append(Messages.Tasks_ResultAction_MultipleWarnings(tasks));
        }
        if (tasks > 0) {
            summary.append("</a>");
        }
        summary.append(" ");
        if (result.getNumberOfFiles() > 1) {
            summary.append(Messages.Tasks_ResultAction_MultipleFiles(result.getNumberOfFiles()));
        }
        else {
            summary.append(Messages.Tasks_ResultAction_OneFile());
        }
        summary.append(".");
        return summary.toString();
    }
950275
def constant(name, value = name)
      value = value.freeze rescue value
      define_method(name) { value }
    end
1290254
function setChecksum(fs, path, checksum, callback) {
  fs.setxattr(path, constants.attributes.checksum, checksum, callback);
}
170489
function _checksums(dir) {
  const checksums = {};

  glob.sync(resolve(dir, '**/!(*.pack.+(s[ac]ss|js))'), { mark: true }).forEach((file) => {
    if (Utils.endsWith(file, '/')) { return; }

    const relativePath = relative(dir, file);
    checksums[relativePath] = Utils.checksum(file);
  });

  return checksums;
}
568976
def get_secchan_offs(type_, data):
    
    if data[0] < len(ht_secondary_offset):
        return "{0} ({1})".format(ht_secondary_offset[data[0]], data[0])
    return "{0}".format(data[0])
1083832
def getStuckRelayCheckEnabled(self):
    """"""
    command = '$GE'
    settings = self.sendCommand(command)
    flags = int(settings[2], 16)
    return not (flags & 0x0010)
209085
public void setChecksum(final String checksum) {
        if (checksum == null && this.checksum == null) {
            return;
        } else if (checksum == null) {
            removeChild(this.checksum);
            this.checksum = null;
        } else if (this.checksum == null) {
            this.checksum = new KeyValueNode<String>(CommonConstants.CS_CHECKSUM_TITLE, checksum);
            appendChild(this.checksum, false);
        } else {
            this.checksum.setValue(checksum);
        }
    }
1158471
function checkStylesheet(i) {
  const start = i;
  let l;

  while (i < tokensLength) {
    if (l = checkSC(i)) tokens[i].stylesheet_child = 1;
    else if (l = checkRuleset(i)) tokens[i].stylesheet_child = 2;
    else if (l = checkAtrule(i)) tokens[i].stylesheet_child = 3;
    else if (l = checkDeclDelim(i)) tokens[i].stylesheet_child = 4;
    else throwError(i);

    i += l;
  }

  return i - start;
}
1005739
def remove_unloadable_constants!
      autoloaded_constants.each { |const| remove_constant const }
      autoloaded_constants.clear
      explicitly_unloadable_constants.each { |const| remove_constant const }
    end
1345177
function Checksum(type, val) {
    this.type = type;
    this.val = val || 0;
    switch (this.type) {
        case 0x00:
            this._compute = this._computeNone;
            break;
        case 0x01:
            this._compute = this._computeCrc32;
            break;
        case 0x02:
            this._compute = this._computeFarm32;
            break;
        case 0x03:
            this._compute = this._computeCrc32C;
            break;
        default:
            assert(false, 'invalid checksum type ' + this.type);
    }
}
1102638
def constants_from_value(data=@value)
      data.scan(escape_pattern).flatten.collect { |value| value.strip }
    end
207597
def _sanitize_config(config):
        ''''''
        if 'checks' in config:
            checks = config['checks']
            if 'structural_checks' not in checks:
                checks['structural_checks'] = []
            if 'neuron_checks' not in checks:
                checks['neuron_checks'] = []
        else:
            raise ConfigError('Need to have "checks" in the config')

        if 'options' not in config:
            L.debug('Using default options')
            config['options'] = {}

        if 'color' not in config:
            config['color'] = False

        return config
188932
function compareDottedVersion(v1, v2) {
  const parts1 = /([0-9.]+)(.*)$/.exec(v1)
  const parts2 = /([0-9.]+)(.*)$/.exec(v2)
  if (parts1 != null && parts2 != null) {
    const numbers1 = parts1[1]
    const numbers2 = parts2[1]
    const distinguisher1 = parts1[2]
    const distinguisher2 = parts2[2]
    const numlist1 = numbers1.split('.').map(e => +e)
    const numlist2 = numbers2.split('.').map(e => +e)
    const cmp = listCompare(numlist1, numlist2)
    if (cmp !== 0) {
      return cmp
    } else {
      return distinguisher1 < distinguisher2
        ? -1
        : distinguisher1 > distinguisher2
        ? 1
        : 0
    }
  }
  return v1 < v2 ? -1 : v1 > v2 ? 1 : 0
}
375156
def constantize(str)
      str = str.to_s
      call_or_yield str do
        raise(NameError, "#{s.inspect} is not a valid constant name!") unless m = VALID_CONSTANT_NAME_REGEXP.match(str)
        Object.module_eval("::#{m[1]}", __FILE__, __LINE__)
      end
    end
382139
def inspect_constants(source = constant, ignore = [])
      names          = []
      source_name    = source.name
      have_children  = []
      include_source = source != Object

      if include_source and !ignore.include?(source_name)
        names  << source_name
        ignore << source_name
      end

      source.constants.each do |name|
        next if skip_constant?(source, name)

        full_name = include_source ? "#{source_name}::#{name}" : name.to_s

        # In certain cases this code tries to load a constant that apparently
        # *is* defined but craps out upon error (e.g. Bundler::Specification).
        begin
          constant = source.const_get(name)
        rescue Exception => error
          warn error.message
          next
        end

        # Skip those that we've already processed.
        if ignore.include?(full_name) or source == constant
          next
        end

        names         << full_name
        ignore        << full_name
        have_children << constant if process_child_constants?(constant)
      end

      have_children.each do |const|
        names |= inspect_constants(const, ignore)
      end

      # Reject every constant that, if we should include the source name, was
      # not defined under that constant. This applies on for example Rubinius
      # since `Range::Enumerator` is a constant that points to
      # `Enumerable::Enumerator`.
      if include_source
        names = names.select { |name| name.start_with?(source_name) }
      end

      return names
    end
237063
function getConstantViolationsBefore(binding, path, functions) {
  var violations = binding.constantViolations.slice();
  violations.unshift(binding.path);
  return violations.filter(function (violation) {
    violation = violation.resolve();
    var status = violation._guessExecutionStatusRelativeTo(path);
    if (functions && status === "function") functions.push(violation);
    return status === "before";
  });
}
509199
function(style, stylename)
	{
		if (style != null && stylename != null)
		{
			var tokens = style.split(';');
			var pos = 0;
			
			for (var i = 0; i < tokens.length; i++)
			{
				if (tokens[i] == stylename)
				{
					return pos;
				}
				
				pos += tokens[i].length + 1;
			}
		}

		return -1;
	}