test_class.declarator: CLASS_NAMES = new ArrayList<String>()
test_class.modifier: static final
test_class.original_string: static final List<String> CLASS_NAMES = new ArrayList<String>();
test_class.type: List<String>
test_class.var_name: CLASS_NAMES
test_class.declarator: XLOG_METHODS = new ArrayList<XLogMethod>()
test_class.modifier: static final
test_class.original_string: static final List<XLogMethod> XLOG_METHODS = new ArrayList<XLogMethod>();
test_class.type: List<XLogMethod>
test_class.var_name: XLOG_METHODS
test_class.file: xlog-base/src/test/java/com/promegu/xlog/base/XLogUtilsTest.java
test_class.identifier: XLogUtilsTest
test_case.body: @Test
      public void testGetPkgPrefixesForCoarseMatch3() {
          List<String> expected = new ArrayList<String>();
          expected.add("com.promegu");
          expected.add("java.lang");
          expected.add("retrofit");
          assertThat(XLogUtils.getPkgPrefixesForCoarseMatch(CLASS_NAMES, 2), is(expected));
  
          expected.clear();
          expected.add("com.promegu.xlog");
          expected.add("com.promegu.other");
          expected.add("java.lang.Object");
          expected.add("java.lang.test");
          expected.add("retrofit");
          //CHECKSTYLE:OFF
          assertThat(XLogUtils.getPkgPrefixesForCoarseMatch(CLASS_NAMES, 3), is(expected));
          //CHECKSTYLE:ON
      }
test_case.class_method_signature: XLogUtilsTest.testGetPkgPrefixesForCoarseMatch3()
test_case.full_signature: @Test public void testGetPkgPrefixesForCoarseMatch3()
test_case.identifier: testGetPkgPrefixesForCoarseMatch3
test_case.invocations: add add add assertThat getPkgPrefixesForCoarseMatch is clear add add add add add assertThat getPkgPrefixesForCoarseMatch is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetPkgPrefixesForCoarseMatch3()
focal_class.declarator: TYPE_METHOD = 0
focal_class.modifier: public static final
focal_class.original_string: public static final int TYPE_METHOD = 0;
focal_class.type: int
focal_class.var_name: TYPE_METHOD
focal_class.declarator: TYPE_CONSTRUCTOR = 1
focal_class.modifier: public static final
focal_class.original_string: public static final int TYPE_CONSTRUCTOR = 1;
focal_class.type: int
focal_class.var_name: TYPE_CONSTRUCTOR
focal_class.declarator: PKG_NAME = "com.promegu.xlogger"
focal_class.modifier: public static final
focal_class.original_string: public static final String PKG_NAME = "com.promegu.xlogger";
focal_class.type: String
focal_class.var_name: PKG_NAME
focal_class.declarator: CLASS_NAME = "XLoggerMethods"
focal_class.modifier: public static final
focal_class.original_string: public static final String CLASS_NAME = "XLoggerMethods";
focal_class.type: String
focal_class.var_name: CLASS_NAME
focal_class.declarator: FIELD_NAME_METHODS = "METHODS_TO_LOG"
focal_class.modifier: public static final
focal_class.original_string: public static final String FIELD_NAME_METHODS = "METHODS_TO_LOG";
focal_class.type: String
focal_class.var_name: FIELD_NAME_METHODS
focal_class.declarator: FIELD_NAME_CLASSES = "CLASSES_TO_LOG"
focal_class.modifier: public static final
focal_class.original_string: public static final String FIELD_NAME_CLASSES = "CLASSES_TO_LOG";
focal_class.type: String
focal_class.var_name: FIELD_NAME_CLASSES
focal_class.file: xlog-base/src/main/java/com/promegu/xlog/base/XLogUtils.java
focal_class.identifier: XLogUtils
focal_class.class_method_signature: XLogUtils.XLogUtils()
focal_class.full_signature: private  XLogUtils()
focal_class.identifier: XLogUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  XLogUtils()
focal_class.class_method_signature: XLogUtils.getRemainingClassNames(Set<Class<?>> classes,
              Set<String> classNames)
focal_class.full_signature: public static Set<String> getRemainingClassNames(Set<Class<?>> classes,
              Set<String> classNames)
focal_class.identifier: getRemainingClassNames
focal_class.modifiers: public static
focal_class.parameters: (Set<Class<?>> classes,
              Set<String> classNames)
focal_class.return: Set<String>
focal_class.signature: Set<String> getRemainingClassNames(Set<Class<?>> classes,
              Set<String> classNames)
focal_class.class_method_signature: XLogUtils.shouldLogMember(List<XLogMethod> xLogMethods, Member member)
focal_class.full_signature: public static boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member)
focal_class.identifier: shouldLogMember
focal_class.modifiers: public static
focal_class.parameters: (List<XLogMethod> xLogMethods, Member member)
focal_class.return: boolean
focal_class.signature: boolean shouldLogMember(List<XLogMethod> xLogMethods, Member member)
focal_class.class_method_signature: XLogUtils.filterResult(String className, XLogSetting xLogSetting)
focal_class.full_signature: public static boolean filterResult(String className, XLogSetting xLogSetting)
focal_class.identifier: filterResult
focal_class.modifiers: public static
focal_class.parameters: (String className, XLogSetting xLogSetting)
focal_class.return: boolean
focal_class.signature: boolean filterResult(String className, XLogSetting xLogSetting)
focal_class.class_method_signature: XLogUtils.getPkgPrefixesForCoarseMatch(List<String> classNames,
              int pkgSectionSize)
focal_class.full_signature: public static List<String> getPkgPrefixesForCoarseMatch(List<String> classNames,
              int pkgSectionSize)
focal_class.identifier: getPkgPrefixesForCoarseMatch
focal_class.modifiers: public static
focal_class.parameters: (List<String> classNames,
              int pkgSectionSize)
focal_class.return: List<String>
focal_class.signature: List<String> getPkgPrefixesForCoarseMatch(List<String> classNames,
              int pkgSectionSize)
focal_class.class_method_signature: XLogUtils.getPkgPrefixesForCoarseMatchXLogMethods(List<XLogMethod> xLogMethods,
              int pkgSectionSize)
focal_class.full_signature: public static List<String> getPkgPrefixesForCoarseMatchXLogMethods(List<XLogMethod> xLogMethods,
              int pkgSectionSize)
focal_class.identifier: getPkgPrefixesForCoarseMatchXLogMethods
focal_class.modifiers: public static
focal_class.parameters: (List<XLogMethod> xLogMethods,
              int pkgSectionSize)
focal_class.return: List<String>
focal_class.signature: List<String> getPkgPrefixesForCoarseMatchXLogMethods(List<XLogMethod> xLogMethods,
              int pkgSectionSize)
focal_class.class_method_signature: XLogUtils.getClassNameSectionSize(String className)
focal_class.full_signature: static int getClassNameSectionSize(String className)
focal_class.identifier: getClassNameSectionSize
focal_class.modifiers: static
focal_class.parameters: (String className)
focal_class.return: int
focal_class.signature: int getClassNameSectionSize(String className)
focal_class.class_method_signature: XLogUtils.getClassNameSection(String className, int section)
focal_class.full_signature: static String getClassNameSection(String className, int section)
focal_class.identifier: getClassNameSection
focal_class.modifiers: static
focal_class.parameters: (String className, int section)
focal_class.return: String
focal_class.signature: String getClassNameSection(String className, int section)
focal_method.body: public static List<String> getPkgPrefixesForCoarseMatch(List<String> classNames,
              int pkgSectionSize) {
          if (pkgSectionSize <= 0) {
              return classNames;
          }
          List<String> result = new ArrayList<String>();
          if (classNames != null) {
              for (String className : classNames) {
                  if (getClassNameSectionSize(className) < pkgSectionSize) {
                      if (!result.contains(className)) {
                          result.add(className);
                      }
                  } else {
                      String prefix = getClassNameSection(className, pkgSectionSize);
                      if (!result.contains(prefix)) {
                          result.add(prefix);
                      }
                  }
              }
          }
  
          Set<String> names = new HashSet<String>(result);
          Iterator<String> iterator = result.iterator();
          while (iterator.hasNext()) {
              String className = iterator.next();
              for (String s : names) {
                  if (className.startsWith(s) && !className.equals(s)) {
                      // there is a B in result list which is the prefix of A, should remove A
                      iterator.remove();
                  }
              }
          }
  
          return result;
      }
focal_method.class_method_signature: XLogUtils.getPkgPrefixesForCoarseMatch(List<String> classNames,
              int pkgSectionSize)
focal_method.full_signature: public static List<String> getPkgPrefixesForCoarseMatch(List<String> classNames,
              int pkgSectionSize)
focal_method.identifier: getPkgPrefixesForCoarseMatch
focal_method.invocations: getClassNameSectionSize contains add getClassNameSection contains add iterator hasNext next startsWith equals remove
focal_method.modifiers: public static
focal_method.parameters: (List<String> classNames,
              int pkgSectionSize)
focal_method.return: List<String>
focal_method.signature: List<String> getPkgPrefixesForCoarseMatch(List<String> classNames,
              int pkgSectionSize)