List of usage examples for org.json.simple.parser ParseException getCause
public synchronized Throwable getCause()
From source file:mas.MAS_TOP_PAPERS.java
public static String getConferenceName(int id) { String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Conference?$filter=ID%20eq%20" + id + "&$format=json"; while (true) { try {/*from ww w . ja v a 2 s. c o m*/ StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, 0); JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { // System.out.println("Conf: results# = " + results.size()); for (Object conf : results) { JSONObject confObj = (JSONObject) conf; String shortName = normalized((String) confObj.get("ShortName")); if (!shortName.equals("")) { return shortName; } else { String fullName = normalized((String) confObj.get("FullName")); return fullName; } } } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex); try { Thread.sleep(5000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex1); } } } return null; }
From source file:mas.MAS_VLDB.java
public static String getConferenceName(int id) { String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Conference?$filter=ID%20eq%20" + id + "&$format=json"; while (true) { try {//from w ww .j ava2 s . co m StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, 0); JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { // System.out.println("Conf: results# = " + results.size()); for (Object conf : results) { JSONObject confObj = (JSONObject) conf; String shortName = normalized((String) confObj.get("ShortName")); if (!shortName.equals("")) { return shortName; } else { String fullName = normalized((String) confObj.get("FullName")); return fullName; } } } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex); try { Thread.sleep(5000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex1); } } } return null; }
From source file:mas.MAS_TOP_PAPERS.java
public static void extractCitation(int start, String papers_filter) { String csv_file_path = "data/citations_30_conf.csv"; String json_dump_file_path = "data/citations_30_conf_dump.json"; String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper_Ref?$select=SrcID,DstID,SeqID&$filter=" + papers_filter + "&$format=json"; while (true) { IOUtils.writeDataIntoFile(start + "", paper_last, false); try {/* ww w.j a v a 2 s .c o m*/ StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, start); // System.out.println("json=" + json); if (json == null) { System.out.println("json is null. skip. old start=" + start); start += 100; Thread.sleep(1000L); continue; } JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { System.out.println("Paper: start = " + start + " results# = " + results.size()); for (Object cite : results) { JSONObject citeObj = (JSONObject) cite; // Long docType = (Long) paperObj.get("DocType"); // Long year = (Long) paperObj.get("Year"); // Long jourID = (Long) paperObj.get("JourID"); Long srcID = (Long) citeObj.get("SrcID"); Long dstID = (Long) citeObj.get("DstID"); // String title = (String) citeObj.get("Title"); // title = normalized(title); csv_str.append(srcID).append(SEPERATOR).append(dstID).append(NEWLINE); } IOUtils.writeDataIntoFile(json + "\n", json_dump_file_path); IOUtils.writeDataIntoFile(csv_str.toString(), csv_file_path); start += 100; Thread.sleep(300L); } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(5000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex1); } } catch (InterruptedException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(5000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex1); } } } }
From source file:mas.MAS_TOP_PAPERS.java
public static void extractPapers(int start, int conf) { String csv_file_path = "data/papers_200_conf.csv"; String json_dump_file_path = "data/papers_200_conf_dump.json"; String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper?$select=ID,Title,Year,ConfID,JourID&$filter=Year%20ge%202000%20and%20ConfID%20eq%20" + conf + "&$format=json"; // String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper?$select=ID,DocType,Title,Year,ConfID,JourID&$filter=Year%20gt%202001&$format=json"; while (true) { IOUtils.writeDataIntoFile(start + "", paper_last, false); try {/* ww w . j av a 2 s . c o m*/ StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, start); // System.out.println("json=" + json); if (json == null) { System.out.println("json is null. skip. old start=" + start); start += 100; Thread.sleep(10000L); continue; } JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { System.out.println("Paper: start = " + start + " results# = " + results.size()); for (Object paper : results) { JSONObject paperObj = (JSONObject) paper; // Long docType = (Long) paperObj.get("DocType"); // Long year = (Long) paperObj.get("Year"); // Long jourID = (Long) paperObj.get("JourID"); Long confID = (Long) paperObj.get("ConfID"); Long id = (Long) paperObj.get("ID"); String title = (String) paperObj.get("Title"); title = normalized(title); csv_str.append(id).append(SEPERATOR).append(confID).append(SEPERATOR).append(title) .append(NEWLINE); } IOUtils.writeDataIntoFile(json + "\n", json_dump_file_path); IOUtils.writeDataIntoFile(csv_str.toString(), csv_file_path); start += 100; Thread.sleep(250L); } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(1000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex1); } } catch (InterruptedException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(1000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_TOP_PAPERS.class.getName()).log(Level.SEVERE, null, ex1); } } } }
From source file:mas.MAS_VLDB.java
public static void extractCitation(int start, String papers_filter, String csv_file, String json_file) { String csv_file_path = csv_file; String json_dump_file_path = json_file; String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper_Ref?$select=SrcID,DstID&$filter=" + papers_filter + "&$format=json"; while (true) { IOUtils.writeDataIntoFile(start + "", paper_last, false); try {/* www.j av a 2 s .c om*/ StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, start); // System.out.println("json=" + json); if (json == null) { System.out.println("json is null. skip. old start=" + start); start += 100; Thread.sleep(1000L); continue; } JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { System.out.println("Paper: start = " + start + " results# = " + results.size()); for (Object cite : results) { JSONObject citeObj = (JSONObject) cite; // Long docType = (Long) paperObj.get("DocType"); // Long year = (Long) paperObj.get("Year"); // Long jourID = (Long) paperObj.get("JourID"); Long srcID = (Long) citeObj.get("SrcID"); Long dstID = (Long) citeObj.get("DstID"); // String title = (String) citeObj.get("Title"); // title = normalized(title); csv_str.append(srcID).append(SEPERATOR).append(dstID).append(NEWLINE); } IOUtils.writeDataIntoFile(json + "\n", json_dump_file_path); IOUtils.writeDataIntoFile(csv_str.toString(), csv_file_path); start += 100; Thread.sleep(300L); } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(5000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex1); } } catch (InterruptedException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(5000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex1); } } } }
From source file:mas.MAS_VLDB.java
public static void extractPapers(int start, int conf) { String csv_file_path = "data/papers_200_conf.csv"; String json_dump_file_path = "data/papers_200_conf_dump.json"; String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper?$select=ID,Title,Year,ConfID,JourID&$filter=Year%20ge%202000%20and%20ConfID%20eq%20" + conf + "&$format=json"; // String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper?$select=ID,DocType,Title,Year,ConfID,JourID&$filter=Year%20gt%202001&$format=json"; while (true) { IOUtils.writeDataIntoFile(start + "", paper_last, false); try {//w ww .jav a 2 s. c om StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, start); // System.out.println("json=" + json); if (json == null) { System.out.println("json is null. skip. old start=" + start); start += 100; Thread.sleep(10000L); continue; } JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { System.out.println("Paper: start = " + start + " results# = " + results.size()); for (Object paper : results) { JSONObject paperObj = (JSONObject) paper; // Long docType = (Long) paperObj.get("DocType"); // Long year = (Long) paperObj.get("Year"); // Long jourID = (Long) paperObj.get("JourID"); Long confID = (Long) paperObj.get("ConfID"); Long id = (Long) paperObj.get("ID"); String title = (String) paperObj.get("Title"); title = normalized(title); csv_str.append(id).append(SEPERATOR).append(confID).append(SEPERATOR).append(title) .append(NEWLINE); } IOUtils.writeDataIntoFile(json + "\n", json_dump_file_path); IOUtils.writeDataIntoFile(csv_str.toString(), csv_file_path); start += 100; Thread.sleep(250L); } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(1000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex1); } } catch (InterruptedException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(1000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex1); } } } }
From source file:mas.MAS.java
public static void extractPaperCategory(int start, int domain, int subdomain) { String csv_file_path = "data/papers_d" + domain + "_sd" + subdomain + ".csv"; String json_dump_file_path = "data/papers_dump_d" + domain + "_sd" + subdomain + ".json"; String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper_Category?$filter=DomainID%20eq%20" + domain + "%20and%20SubDomainID%20eq%20" + subdomain + "&$format=json"; // String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper?$select=ID,DocType,Title,Year,ConfID,JourID&$filter=Year%20gt%202001&$format=json"; while (true) { IOUtils.writeDataIntoFile(start + "", paper_last, false); try {/*from w ww .java 2 s .c o m*/ StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, start); // System.out.println("json=" + json); if (json == null) { System.out.println("json is null. skip. old start=" + start); start += 100; Thread.sleep(1000L); continue; } JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { System.out.println("Paper: start = " + start + " results# = " + results.size()); for (Object paper : results) { JSONObject paperObj = (JSONObject) paper; Long cPaperID = (Long) paperObj.get("CPaperID"); Long domainID = (Long) paperObj.get("DomainID"); Long subDomainID = (Long) paperObj.get("SubDomainID"); csv_str.append(cPaperID).append(SEPERATOR).append(domainID).append(SEPERATOR) .append(subDomainID).append(NEWLINE); } IOUtils.writeDataIntoFile(json + "\n", json_dump_file_path); IOUtils.writeDataIntoFile(csv_str.toString(), csv_file_path); start += 100; Thread.sleep(400L); } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(10000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex1); } } catch (InterruptedException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(10000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex1); } } } }
From source file:mas.MAS.java
public static void getPapers(int start, String papers_filter, String csvFile, String jsonFile) { String csv_file_path = csvFile; String json_dump_file_path = jsonFile; String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper?$select=ID,Title&$filter=" + papers_filter + "&$format=json"; while (true) { IOUtils.writeDataIntoFile(start + "", paper_last, false); try {/*from w ww. j a v a 2 s. co m*/ StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, start); // System.out.println("json=" + json); if (json == null) { System.out.println("json is null. skip. old start=" + start); start += 100; Thread.sleep(1000L); continue; } JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { System.out.println("Paper: start = " + start + " results# = " + results.size()); for (Object paper : results) { JSONObject paperObj = (JSONObject) paper; // Long docType = (Long) paperObj.get("DocType"); // Long year = (Long) paperObj.get("Year"); // Long jourID = (Long) paperObj.get("JourID"); // Long confID = (Long) paperObj.get("ConfID"); Long id = (Long) paperObj.get("ID"); String title = (String) paperObj.get("Title"); title = normalized(title); csv_str.append(id).append(SEPERATOR).append(title).append(NEWLINE); } IOUtils.writeDataIntoFile(json + "\n", json_dump_file_path); IOUtils.writeDataIntoFile(csv_str.toString(), csv_file_path); start += 100; Thread.sleep(400L); } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(10000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex1); } } catch (InterruptedException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(10000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex1); } } } }
From source file:mas.MAS.java
public static void getAuthors(int start, String authors_filter, String csvFile, String jsonFile) { String csv_file_path = csvFile; String json_dump_file_path = jsonFile; String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Author?$select=ID,Name,NativeName,AffiliationID&$filter=" + authors_filter + "&$format=json"; // String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper_Author?$select=PaperID,SeqID,AuthorID,Name,AffiliationID&$filter=" + papers_filter + "&$format=json"; while (true) { IOUtils.writeDataIntoFile(start + "", paper_last, false); try {// w w w .j a va2 s. co m StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, start); // System.out.println("json=" + json); if (json == null) { System.out.println("json is null. skip. old start=" + start); start += 100; Thread.sleep(1000L); continue; } JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { System.out.println("Paper: start = " + start + " results# = " + results.size()); for (Object paper : results) { JSONObject paperObj = (JSONObject) paper; Long id = (Long) paperObj.get("ID"); String name = normalized((String) paperObj.get("Name")); String nativeName = normalized((String) paperObj.get("NativeName")); // String affiliation = normalized((String) paperObj.get("Affiliation")); Long affiliationID = (Long) paperObj.get("AffiliationID"); // Long version = (Long) paperObj.get("Version"); csv_str.append(id).append(SEPERATOR).append(name).append(SEPERATOR).append(nativeName) .append(SEPERATOR).append(affiliationID).append(NEWLINE); } IOUtils.writeDataIntoFile(json + "\n", json_dump_file_path); IOUtils.writeDataIntoFile(csv_str.toString(), csv_file_path); start += 100; Thread.sleep(400L); } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(5000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex1); } } catch (InterruptedException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(5000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS_VLDB.class.getName()).log(Level.SEVERE, null, ex1); } } } }
From source file:mas.MAS.java
public static void extractPapers(int start) { String csv_file_path = "data/papers_" + start + ".csv"; String json_dump_file_path = "data/papers_dump_" + start + ".json"; String url = "https://api.datamarket.azure.com/MRC/MicrosoftAcademic/v2/Paper?$select=ID,DocType,Title,Year,ConfID,JourID&$filter=Year%20gt%202001&$format=json"; while (true) { IOUtils.writeDataIntoFile(start + "", paper_last, false); try {// w ww. j av a2s.c o m StringBuilder csv_str = new StringBuilder(); final String json = getData2(url, start); // System.out.println("json=" + json); if (json == null) { System.out.println("json is null. skip. old start=" + start); start += 100; Thread.sleep(1000L); continue; } JSONParser parser = new JSONParser(); JSONObject jsonObj = (JSONObject) parser.parse(json); final JSONObject dObj = (JSONObject) jsonObj.get("d"); final JSONArray results = (JSONArray) dObj.get("results"); if (results.size() == 0) { System.out.println("results is Empty, break."); break; } else { System.out.println("Paper: start = " + start + " results# = " + results.size()); for (Object paper : results) { JSONObject paperObj = (JSONObject) paper; Long docType = (Long) paperObj.get("DocType"); Long year = (Long) paperObj.get("Year"); Long jourID = (Long) paperObj.get("JourID"); Long confID = (Long) paperObj.get("ConfID"); Long id = (Long) paperObj.get("ID"); String title = (String) paperObj.get("Title"); title = normalized(title); csv_str.append(id).append(SEPERATOR).append(docType).append(SEPERATOR).append(year) .append(SEPERATOR).append(jourID).append(SEPERATOR).append(confID).append(SEPERATOR) .append(title).append(NEWLINE); } IOUtils.writeDataIntoFile(json + "\n", json_dump_file_path); IOUtils.writeDataIntoFile(csv_str.toString(), csv_file_path); start += 100; Thread.sleep(400L); } // System.out.println("json= " + jsonObj); } catch (ParseException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(10000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex1); } } catch (InterruptedException ex) { System.out.println(ex.getMessage() + " Cause: " + ex.getCause()); Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex); start += 100; try { Thread.sleep(10000L); } catch (InterruptedException ex1) { Logger.getLogger(MAS.class.getName()).log(Level.SEVERE, null, ex1); } } } }