test_class.declarator: logger = LoggerFactory.getLogger(RandomUtilTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(RandomUtilTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/RandomUtilTest.java
test_class.identifier: RandomUtilTest
test_case.body: @Test
      public void generateString() {
          // can really only test the length since its a random num
          String result = RandomUtil.generateString(2);
          Assert.assertEquals(2, result.length());
  
          result = RandomUtil.generateString(20);
          Assert.assertEquals(20, result.length());
  
          result = RandomUtil.generateString(8);
          Assert.assertEquals(8, result.length());
      }
test_case.class_method_signature: RandomUtilTest.generateString()
test_case.full_signature: @Test public void generateString()
test_case.identifier: generateString
test_case.invocations: generateString assertEquals length generateString assertEquals length generateString assertEquals length
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void generateString()
focal_class.declarator: chars = "abcdefghijklmonpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
focal_class.modifier: private static final
focal_class.original_string: private static final String chars = "abcdefghijklmonpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
focal_class.type: String
focal_class.var_name: chars
focal_class.declarator: random = new Random()
focal_class.modifier: private static
focal_class.original_string: private static Random random = new Random();
focal_class.type: Random
focal_class.var_name: random
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/RandomUtil.java
focal_class.identifier: RandomUtil
focal_class.class_method_signature: RandomUtil.generateString(int length)
focal_class.full_signature: public static String generateString(int length)
focal_class.identifier: generateString
focal_class.modifiers: public static
focal_class.parameters: (int length)
focal_class.return: String
focal_class.signature: String generateString(int length)
focal_method.body: public static String generateString(int length) {
          char[] buf = new char[length];
          for (int i = 0; i < buf.length; i++) {
              buf[i] = chars.charAt(random.nextInt(chars.length()));
          }
          return new String(buf);
      }
focal_method.class_method_signature: RandomUtil.generateString(int length)
focal_method.full_signature: public static String generateString(int length)
focal_method.identifier: generateString
focal_method.invocations: charAt nextInt length
focal_method.modifiers: public static
focal_method.parameters: (int length)
focal_method.return: String
focal_method.signature: String generateString(int length)