<p>
generator.
</p>

@param repeat a int.
@return a {@link java.lang.String} object.
512496
public String generator(int repeat) {
    String repeater = "&nbsp;";
    StringBuilder returnval = new StringBuilder();
    for (int i = 0; i < repeat; i++) {
      returnval.append(repeater);
    }
    return returnval.toString();
  }
617823
public static String generate(final int length) {
    final StringBuilder password = new StringBuilder(length);

    double pik = random.nextDouble(); // random number [0,1]
    long ranno = (long) (pik * sigma); // weight by sum of frequencies

    long sum = 0;
    outer:
    for (int c1 = 0; c1 < 26; c1++) {
      for (int c2 = 0; c2 < 26; c2++) {
        for (int c3 = 0; c3 < 26; c3++) {
          sum += get(c1, c2, c3);
          if (sum > ranno) {
            password.append(alphabet.charAt(c1));
            password.append(alphabet.charAt(c2));
            password.append(alphabet.charAt(c3));
            break outer; // Found start.
          }
        }
      }
    }

    // Now do a random walk.
    int nchar = 3;
    while (nchar < length) {
      final int c1 = alphabet.indexOf(password.charAt(nchar - 2));
      final int c2 = alphabet.indexOf(password.charAt(nchar - 1));
      sum = 0;
      for (int c3 = 0; c3 < 26; c3++) {
        sum += get(c1, c2, c3);
      }

      if (sum == 0) {
        break;
      }

      pik = random.nextDouble();
      ranno = (long) (pik * sum);
      sum = 0;
      for (int c3 = 0; c3 < 26; c3++) {
        sum += get(c1, c2, c3);
        if (sum > ranno) {
          password.append(alphabet.charAt(c3));
          break;
        }
      }
      nchar++;
    }
    return password.toString();
  }
1166563
public static JsonElementConverter getConverter(JsonSchema schema, boolean repeated) {

    InputType fieldType = schema.getInputType();
    switch (fieldType) {
      case INT:
        return new IntConverter(schema, repeated);

      case LONG:
        return new LongConverter(schema, repeated);

      case FLOAT:
        return new FloatConverter(schema, repeated);

      case DOUBLE:
        return new DoubleConverter(schema, repeated);

      case BOOLEAN:
        return new BooleanConverter(schema, repeated);

      case STRING:
        return new StringConverter(schema, repeated);

      case ARRAY:
        return new ArrayConverter(schema);

      case ENUM:
        return new EnumConverter(schema);

      case RECORD:
        return new RecordConverter(schema);

      case MAP:
        return new MapConverter(schema);

      case DATE:
      case TIMESTAMP:
        return new StringConverter(schema, repeated);

      default:
        throw new UnsupportedOperationException(fieldType + " is unsupported");
    }
  }
636172
public static int getRetryFrequency(StringBuffer interfaceConfig, StringBuffer methodConfig){
        methodConfig.append(".retry.frequency");
        interfaceConfig.append(".retry.frequency");
        String retryFrequencyConf = ConfigUtils.getProperty(methodConfig.toString(), ConfigUtils.getProperty(interfaceConfig.toString(), ConfigUtils.getProperty("dubbo.reference.default.retry.frequency", DEFAULT_RETRY_FREQUENCY)));
        return Integer.parseInt(retryFrequencyConf);
    }
462683
private void generateResumeGenerator(ClassFileWriter cfw)
    {
        boolean hasGenerators = false;
        for (int i=0; i < scriptOrFnNodes.length; i++) {
            if (isGenerator(scriptOrFnNodes[i]))
                hasGenerators = true;
        }

        // if there are no generators defined, we don't implement a
        // resumeGenerator(). The base class provides a default implementation.
        if (!hasGenerators)
            return;

        cfw.startMethod("resumeGenerator",
                        "(Lorg/mozilla/javascript/Context;" +
                        "Lorg/mozilla/javascript/Scriptable;" +
                        "ILjava/lang/Object;" +
                        "Ljava/lang/Object;)Ljava/lang/Object;",
                        (short)(ACC_PUBLIC | ACC_FINAL));

        // load arguments for dispatch to the corresponding *_gen method
        cfw.addALoad(0);
        cfw.addALoad(1);
        cfw.addALoad(2);
        cfw.addALoad(4);
        cfw.addALoad(5);
        cfw.addILoad(3);

        cfw.addLoadThis();
        cfw.add(ByteCode.GETFIELD, cfw.getClassName(), ID_FIELD_NAME, "I");

        int startSwitch = cfw.addTableSwitch(0, scriptOrFnNodes.length - 1);
        cfw.markTableSwitchDefault(startSwitch);
        int endlabel = cfw.acquireLabel();

        for (int i = 0; i < scriptOrFnNodes.length; i++) {
            ScriptNode n = scriptOrFnNodes[i];
            cfw.markTableSwitchCase(startSwitch, i, (short)6);
            if (isGenerator(n)) {
                String type = "(" +
                              mainClassSignature +
                              "Lorg/mozilla/javascript/Context;" +
                              "Lorg/mozilla/javascript/Scriptable;" +
                              "Ljava/lang/Object;" +
                              "Ljava/lang/Object;I)Ljava/lang/Object;";
                cfw.addInvoke(ByteCode.INVOKESTATIC,
                              mainClassName,
                              getBodyMethodName(n) + "_gen",
                              type);
                cfw.add(ByteCode.ARETURN);
            } else {
                cfw.add(ByteCode.GOTO, endlabel);
            }
        }

        cfw.markLabel(endlabel);
        pushUndefined(cfw);
        cfw.add(ByteCode.ARETURN);


        // this method uses as many locals as there are arguments (hence 6)
        cfw.stopMethod((short)6);
    }
80049
public long getRepeatDelay (int keyCode)
    {
        KeyRecord krec = _keys.get(keyCode);
        return (krec == null) ? DEFAULT_REPEAT_DELAY : krec.repeatDelay;
    }
15455
function repeat(str, n) {
    n = n ? Number(n) : 0;
    if(n != n){ // NAN
        n = 0;
    }

    n = Math.floor(n);

    if(n <= -1){
        n = 0;
    }
    
    str = '' + str;

    var ret = '';
    while(n !== 0){
        if(n & 1 === 1){
            ret += str;
        }
        str += str;
        n >>>= 1;
    }
    return ret;
}
629589
public <T> Iterator<T> reorder( Iterator<T> sequence)
    {
    return reorder( IteratorUtils.toList( sequence)).iterator();
    }
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
        }
1112259
private void setRepeat(final boolean repeat)
	{
		final boolean flag = mc == MC_LDATA_IND ? !repeat : repeat;
		if (flag)
			ctrl1 |= 0x20;
		else
			ctrl1 &= 0xDF;
	}
751965
public String process(final String in) {
		String retVal = in;
		String old;
		do {
			old = retVal;
			retVal = from.matcher(retVal).replaceAll(to);
		} while (repeatUntilUnchanged && !old.equals(retVal));

		return retVal;
	}
424090
public static String replicate(String s, int times) {
        if (s==null) return null;
        if (times <= 0 || s.length() == 0) return "";

        StringBuilder b = new StringBuilder(s.length() * times);
        for (int k = 1; k <= times; ++k) b.append(s);
        return b.toString();
    }
1315513
public WordBuilder<I> repeatAppend(int num, I symbol) {
        if (num == 0) {
            return this;
        }

        ensureAdditionalCapacity(num);
        if (symbol == null) {
            length += num;
        } else {
            for (int i = num; i > 0; i--) {
                array[length++] = symbol;
            }
        }
        return this;
    }
692612
public final Parser<List<T>> atLeast(int min) {
    return new RepeatAtLeastParser<T>(this, Checks.checkMin(min));
  }
472118
@Override
    public T next() {
        int retryCount = 0;
        do {
            T next = delegate.next();
            if (!alreadyGenerated.contains(next)) {
                alreadyGenerated.add(next);
                return next;
            }

            retryCount++;
        } while (retryCount <= numberOfRetries);

        throw new IllegalStateException(on(" ").join("Exhausted", numberOfRetries, "retries trying to generate unique value"));
    }
1013440
function repeat ($n)
  {
    $this->setIterator ($it = new LoopIterator ($this->getIterator ()));
    $it->repeat ($n);
    return $this;
  }
190975
public function generate(&$result,GeneratorInterface $generator)
    {
        if($this->literals->count() === 0) {
            throw new GeneratorException('There are no literals to choose from');
        }
        
       $repeat_x = $this->calculateRepeatQuota($generator);
        
        while($repeat_x > 0) {
             $randomIndex = 0;
             
             if($this->literals->count() > 1) {
                $randomIndex = \round($generator->generate(1,($this->literals->count())));        
             }
             
             $result     .= $this->literals->getAt($randomIndex);
             
             --$repeat_x;
        }
        
        return $result;
        
    }