repeat while matches
548243
private static int repeat(char[] data, int off, int out, Term term) {
        switch (term.type) {
            case Term.CHAR: {
                char c = term.c;
                int i = off;
                while (i < out) {
                    if (data[i] != c) break;
                    i++;
                }
                return i - off;
            }
            case Term.ANY_CHAR: {
                return out - off;
            }
            case Term.ANY_CHAR_NE: {
                int i = off;
                char c;
                while (i < out) {
                    if ((c = data[i]) == '\r' || c == '\n') break;
                    i++;
                }
                return i - off;
            }
            case Term.BITSET: {
                IntBitSet arr = term.bitset;
                int i = off;
                char c;
                if (term.inverse) while (i < out) {
                    if ((c = data[i]) <= 255 && arr.get(c)) break;
                    else i++;
                }
                else while (i < out) {
                    if ((c = data[i]) <= 255 && arr.get(c)) i++;
                    else break;
                }
                return i - off;
            }
            case Term.BITSET2: {
                int i = off;
                IntBitSet[] bitset2 = term.bitset2;
                char c;
                if (term.inverse) while (i < out) {
                    IntBitSet arr = bitset2[(c = data[i]) >> 8];
                    if (arr != null && arr.get(c & 0xff)) break;
                    else i++;
                }
                else while (i < out) {
                    IntBitSet arr = bitset2[(c = data[i]) >> 8];
                    if (arr != null && arr.get(c & 0xff)) i++;
                    else break;
                }
                return i - off;
            }
        }
        throw new Error("this kind of term can't be quantified:" + term.type);
    }
801889
def repeat(col, n):
    
    sc = SparkContext._active_spark_context
    return Column(sc._jvm.functions.repeat(_to_java_column(col), n))
273318
function reqeueBatch(times,interval,batch) {
    async.retry({times: times, interval: interval}, function(cb) {
      syncBatch(batch,cb);
    }, function done(err) {
      if (err) {
        log.error("failed to sync message batch", {err: err, data: batch});
      }
    });
  }
846938
function repeat(string, times) {
            var result = ""
            // Optimized repeat function concatenates concatenated
            // strings.
            while (times > 0) {
                if (times & 1) result += string
                times >>= 1
                string += string
            }
            return result
        }
729716
def _match_show(self, show):
        """"""
        if self.show:
            return match_list(self.show, show)
        else:
            return True
469643
function repeat(coll, n) {
  if (arguments.length === 1) {
    n = coll;
    return function(xform) {
      return new Repeat(n, xform);
    };
  }
  return seq(coll, repeat(n));
}
1370695
def OnCellText(self, event):
        """"""

        row, col, _ = self.grid.actions.cursor
        self.grid.GetTable().SetValue(row, col, event.code)

        event.Skip()
169717
def repeat(self, count=2):
        
        # Subtracting one from the count means the code mentioned is
        # truly repeated exactly `count` times.
        # Control().move_up().repeat(3) ==
        # Control().move_up().move_up().move_up()
        try:
            return self.__class__(''.join((
                str(self),
                self.last_code() * (count - 1),
            )))
        except TypeError as ex:
            raise TypeError(
                '`count` must be an integer. Got: {!r}'.format(count)
            ) from ex
393734
def emulate_repeat(self, value, timeval):
        """"""
        repeat_event = self.create_event_object(
            "Repeat",
            2,
            value,
            timeval)
        return repeat_event
659581
def repeat(self, rid, count, index=0):
        
        elems = None
        if rid in self.__repeat_ids:
            elems = self.__repeat_ids[rid]
        elif rid in self.__element_ids:
            elems = self.__element_ids

        if elems and index < len(elems):
            elem = elems[index]
            self.__repeat(elem, count)
393600
def exclude_matches(self, matches):
        
        for match in matches:
            for exclude_pattern in self.exclude_patterns:
                if re.match(exclude_pattern, match) is not None:
                    break
            else:
                yield match
949402
function(str, times) {
        if (String.prototype.repeat) return str.repeat(times);
        return Array.apply(null, new Array(times)).map(function() {
          return str;
        }).join('');
      }
190842
def _iterative_matches(self, nodes):
        """"""
        nodelen = len(nodes)
        if 0 >= self.min:
            yield 0, {}

        results = []
        # generate matches that use just one alt from self.content
        for alt in self.content:
            for c, r in generate_matches(alt, nodes):
                yield c, r
                results.append((c, r))

        # for each match, iterate down the nodes
        while results:
            new_results = []
            for c0, r0 in results:
                # stop if the entire set of nodes has been matched
                if c0 < nodelen and c0 <= self.max:
                    for alt in self.content:
                        for c1, r1 in generate_matches(alt, nodes[c0:]):
                            if c1 > 0:
                                r = {}
                                r.update(r0)
                                r.update(r1)
                                yield c0 + c1, r
                                new_results.append((c0 + c1, r))
            results = new_results
364192
function repeatString(str, len) {
  return Array.apply(null, {length: len + 1}).join(str).slice(0, len)
}
1144003
def _repeat(self, index, stage, stop):
        
        times = None
        if 'iterations' in stage.kwargs:
            times = stage.kwargs['iterations'] - 1
        stages_back = 1
        if 'stages' in stage.kwargs:
            stages_back = stage.kwargs['stages']
        i = 0
        while i != times:
            if stop.is_set():
                break
            for forward in range(stages_back):
                if stop.is_set():
                    break
                stage_index = index - stages_back + forward
                self._execute_stage(stage_index, self._pipe[stage_index], stop)
            i += 1
926088
public static String repeatString( String pattern, int repeats )
    {
        StringBuilder buffer = new StringBuilder( pattern.length() * repeats );
        for( int i = 0; i < repeats; i++ )
        {
            buffer.append( pattern );
        }

        return new String( buffer );
    }
1363595
@Override
    public int matches(Replaceable text,
            int[] offset,
            int limit,
            boolean incremental) {

        if (offset[0] == limit) {
            // Strings, if any, have length != 0, so we don't worry
            // about them here.  If we ever allow zero-length strings
            // we much check for them here.
            if (contains(UnicodeMatcher.ETHER)) {
                return incremental ? U_PARTIAL_MATCH : U_MATCH;
            } else {
                return U_MISMATCH;
            }
        } else {
            if (strings.size() != 0) { // try strings first

                // might separate forward and backward loops later
                // for now they are combined

                // TODO Improve efficiency of this, at least in the forward
                // direction, if not in both.  In the forward direction we
                // can assume the strings are sorted.

                boolean forward = offset[0] < limit;

                // firstChar is the leftmost char to match in the
                // forward direction or the rightmost char to match in
                // the reverse direction.
                char firstChar = text.charAt(offset[0]);

                // If there are multiple strings that can match we
                // return the longest match.
                int highWaterLength = 0;

                for (String trial : strings) {
                    //if (trial.length() == 0) {
                    //    return U_MATCH; // null-string always matches
                    //}
                    // assert(trial.length() != 0); // We ensure this elsewhere

                    char c = trial.charAt(forward ? 0 : trial.length() - 1);

                    // Strings are sorted, so we can optimize in the
                    // forward direction.
                    if (forward && c > firstChar) break;
                    if (c != firstChar) continue;

                    int length = matchRest(text, offset[0], limit, trial);

                    if (incremental) {
                        int maxLen = forward ? limit-offset[0] : offset[0]-limit;
                        if (length == maxLen) {
                            // We have successfully matched but only up to limit.
                            return U_PARTIAL_MATCH;
                        }
                    }

                    if (length == trial.length()) {
                        // We have successfully matched the whole string.
                        if (length > highWaterLength) {
                            highWaterLength = length;
                        }
                        // In the forward direction we know strings
                        // are sorted so we can bail early.
                        if (forward && length < highWaterLength) {
                            break;
                        }
                        continue;
                    }
                }

                // We've checked all strings without a partial match.
                // If we have full matches, return the longest one.
                if (highWaterLength != 0) {
                    offset[0] += forward ? highWaterLength : -highWaterLength;
                    return U_MATCH;
                }
            }
            return super.matches(text, offset, limit, incremental);
        }
    }