private static void processAvailableTraces(RunConfigurationBase configuration) {
    final String tracesDirectory = getTracesDirectory(configuration);
    final TestDiscoveryIndex coverageIndex =
        TestDiscoveryIndex.getInstance(configuration.getProject());
    synchronized (ourTracesLock) {
      final File tracesDirectoryFile = new File(tracesDirectory);
      final File[] testMethodTraces =
          tracesDirectoryFile.listFiles(
              new FilenameFilter() {
                @Override
                public boolean accept(File dir, String name) {
                  return name.endsWith(".tr");
                }
              });
      if (testMethodTraces != null) {
        for (File testMethodTrace : testMethodTraces) {
          try {
            coverageIndex.updateFromTestTrace(testMethodTrace);
            FileUtil.delete(testMethodTrace);
          } catch (IOException e) {
            LOG.error("Can not load " + testMethodTrace, e);
          }
        }

        final String[] filesInTracedDirectories = tracesDirectoryFile.list();
        if (filesInTracedDirectories == null || filesInTracedDirectories.length == 0) {
          FileUtil.delete(tracesDirectoryFile);
        }
      }
    }
  }
 private static void processAvailableTraces(
     RunConfigurationBase configuration, String[] fullTestNames) {
   final String tracesDirectory = getTracesDirectory(configuration);
   final TestDiscoveryIndex coverageIndex =
       TestDiscoveryIndex.getInstance(configuration.getProject());
   synchronized (ourTracesLock) {
     for (String fullTestName : fullTestNames) {
       final String className = StringUtil.getPackageName(fullTestName);
       final String methodName = StringUtil.getShortName(fullTestName);
       if (!StringUtil.isEmptyOrSpaces(className) && !StringUtil.isEmptyOrSpaces(methodName)) {
         final File testMethodTrace =
             new File(tracesDirectory, className + "-" + methodName + ".tr");
         if (testMethodTrace.exists()) {
           try {
             coverageIndex.updateFromTestTrace(testMethodTrace);
             FileUtil.delete(testMethodTrace);
           } catch (IOException e) {
             LOG.error("Can not load " + testMethodTrace, e);
           }
         }
       }
     }
   }
 }