data7/src/main/java/data7/importer/Data7Importer.java
/**
     * Retrieve the list of cve from all considered feed
     * @param pathOfXMLFiles
     * @return
     */
Retrieve the list of cve from all considered feed
@param pathOfXMLFiles
@return
Retrieve the list of cve from all considered feed @param pathOfXMLFiles @return
private List<CVE> listOfNewCVE(List<String> pathOfXMLFiles) {
        ExecutorService executor = Executors.newFixedThreadPool(NB_THREADS);
        int errornb = 0;
        List<CVE> cves = new ArrayList<>();
        try {
            CompletionService<List<CVE>> completionService = new ExecutorCompletionService(executor);
            int count = 0;
            for (String xml : pathOfXMLFiles) {
                completionService.submit(new CVEParser(project, xml));
                count++;
            }
            int received = 0;
            while (received < count) {
                Future<List<CVE>> fut = completionService.take();
                try {
                    List<CVE> result = fut.get();
                    if (result != null) {
                        cves.addAll(result);
                    }
                } catch (ExecutionException e) {
                    e.printStackTrace();
                    errornb++;
                } finally {
                    received++;
                }
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        } finally {
            System.err.println("error : " + errornb);
            executor.shutdown();
            return cves;
        }
    }
private List < CVE > listOfNewCVE ( List < String > pathOfXMLFiles ) { ExecutorService executor = Executors . newFixedThreadPool ( NB_THREADS ) ; int errornb = 0 ; List < CVE > cves = new ArrayList < > ( ) ; try { CompletionService < List < CVE > > completionService = new ExecutorCompletionService ( executor ) ; int count = 0 ; for ( String xml : pathOfXMLFiles ) { completionService . submit ( new CVEParser ( project , xml ) ) ; count ++ ; } int received = 0 ; while ( received < count ) { Future < List < CVE > > fut = completionService . take ( ) ; try { List < CVE > result = fut . get ( ) ; if ( result != null ) { cves . addAll ( result ) ; } } catch ( ExecutionException e ) { e . printStackTrace ( ) ; errornb ++ ; } finally { received ++ ; } } } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } finally { System . err . println ( "error : " + errornb ) ; executor . shutdown ( ) ; return cves ; } }
Retrieve the list of cve from all considered feed
 @param pathOfXMLFiles
 @return
Retrieve the list of cve from all considered feed @param pathOfXMLFiles @return