/////////////////////////////////////////////////////////////////////////////////////////////////////////
174396
function messageItem( text, optionalOptions = {} ) {
      const {
         level = 'ERROR',
         replacements = [],
         sourceInfo = { file: 'a.js', line: 100 }
      } = optionalOptions;
      return { text, level, replacements, sourceInfo };
   }
643889
I parse(String text) throws ParseException {

        ParseLog plog = new ParseLog();
        AttributeQuery attrs = this.startFormat.getAttributes();
        I ret = this.parse(text, plog, attrs);
        int pos = plog.getPosition();
        int len = text.length();

        if ((ret == null) || plog.isError()) {
            throw new ParseException(
                plog.getErrorMessage(),
                plog.getErrorIndex());
        } else if (
            (pos < len)
            && !attrs.get(TRAILING_CHARACTERS, Boolean.FALSE).booleanValue()
        ) {
            String suffix;

            if (len - pos <= 10) {
                suffix = text.subSequence(pos, len).toString();
            } else {
                suffix = text.subSequence(pos, pos + 10).toString() + "...";
            }

            throw new ParseException("Unparsed trailing characters: " + suffix, pos);
        }

        return ret;

    }
953692
@Override
    protected void configureFindbugsEngine() {
        addBoolOption("-formatDates", formatDates);
        addBoolOption("-noTabs", noTabs);
        addBoolOption("-summary", summary);
        addArg(inputFile.getName());
        if (outputFile != null) {
            // Don't use .getName() because it discards path
            addArg(outputFile.getAbsolutePath());
        }
    }
671649
public static void main(String args[]){
        if (args.length != 4){            
            displayHelp();
            System.exit(1);
        }
        
        try{
            JVnSenSegmenter senSegmenter = new JVnSenSegmenter();
            senSegmenter.init(args[1]);
            
            String option = args[2];
            if (option.equalsIgnoreCase("-inputfile"))
            {
               senSegmentFile(args[3], args[3] + ".sent", senSegmenter);
            }
            
            else if (option.equalsIgnoreCase("-inputdir")){
                //segment only files ends with .txt
                File inputDir = new File(args[3]);
                File [] childrent = inputDir.listFiles(new FilenameFilter() {
                    public boolean accept(File dir, String name) {
                        return name.endsWith(".txt");
                    }
                });
                
                for (int i = 0; i <childrent.length; ++i)
                {
                    System.out.println("Segmenting sentences in " + childrent[i]);
                    senSegmentFile(childrent[i].getPath(), childrent[i].getPath() + ".sent", senSegmenter);
                }                
            }
            else 
                displayHelp();
        }
        catch (Exception e)
        {            
            System.out.println(e.getMessage());
            return;
        }
        
    }
473333
function (force) {

/*Line 30 - 'AtomErrors.js' */                if (this.refreshing)
/*Line 31 - 'AtomErrors.js' */                    return this.errors;

/*Line 33 - 'AtomErrors.js' */                if (!force && this.errors)
/*Line 34 - 'AtomErrors.js' */                    return this.errors;

/*Line 36 - 'AtomErrors.js' */                var e = [];

/*Line 38 - 'AtomErrors.js' */                var v ;

/*Line 40 - 'AtomErrors.js' */                var ve = this.list.invalid;
/*Line 41 - 'AtomErrors.js' */                if (ve !== undefined) {
/*Line 42 - 'AtomErrors.js' */                    if (!ve) {
/*Line 43 - 'AtomErrors.js' */                        this.errors = e;
/*Line 44 - 'AtomErrors.js' */                        return e;
/*Line 45 - 'AtomErrors.js' */                    }
/*Line 46 - 'AtomErrors.js' */                    v = ve();
/*Line 47 - 'AtomErrors.js' */                    if (v) {
/*Line 48 - 'AtomErrors.js' */                        if ($.isArray(v)) {
/*Line 49 - 'AtomErrors.js' */                            e = e.concat(v);
/*Line 50 - 'AtomErrors.js' */                        } else {
/*Line 51 - 'AtomErrors.js' */                            e.push(v);
/*Line 52 - 'AtomErrors.js' */                        }
/*Line 53 - 'AtomErrors.js' */                    }
/*Line 54 - 'AtomErrors.js' */                    this.errors = e;
/*Line 55 - 'AtomErrors.js' */                    return e;
/*Line 56 - 'AtomErrors.js' */                }
/*Line 57 - 'AtomErrors.js' */                else {
/*Line 58 - 'AtomErrors.js' */                    for (var i in this.list) {
/*Line 59 - 'AtomErrors.js' */                        v = this.list[i];
/*Line 60 - 'AtomErrors.js' */                        if (!v) continue;
/*Line 61 - 'AtomErrors.js' */                        v = v();
/*Line 62 - 'AtomErrors.js' */                        if (v) {
/*Line 63 - 'AtomErrors.js' */                            if ($.isArray(v)) {
/*Line 64 - 'AtomErrors.js' */                                e = e.concat(v);
/*Line 65 - 'AtomErrors.js' */                            } else {
/*Line 66 - 'AtomErrors.js' */                                e.push(v);
/*Line 67 - 'AtomErrors.js' */                            }
/*Line 68 - 'AtomErrors.js' */                        }
/*Line 69 - 'AtomErrors.js' */                    }
/*Line 70 - 'AtomErrors.js' */                }
/*Line 71 - 'AtomErrors.js' */                if (e.length) {
/*Line 72 - 'AtomErrors.js' */                    this.errors = e;
/*Line 73 - 'AtomErrors.js' */                    return e;
/*Line 74 - 'AtomErrors.js' */                }
/*Line 75 - 'AtomErrors.js' */                return null;
/*Line 76 - 'AtomErrors.js' */            }
156328
public static void main(String[] args) throws Exception {
		
		NERTagger tag = new NERTagger("../models/seg.m","../models/pos.m");
		String str = " 新浪体育讯　北京时间4月15日03:00(英国当地时间14日20:00)，2009/10赛季英格兰足球超级联赛第34轮一场焦点战在白鹿巷球场展开角逐，阿森纳客场1比2不敌托特纳姆热刺，丹尼-罗斯和拜尔先入两球，本特纳扳回一城。阿森纳仍落后切尔西6分(净胜球少15个)，夺冠几成泡影。热刺近 7轮联赛取得6胜，继续以1分之差紧逼曼城。";
		HashMap<String, String> map = new HashMap<String, String>();
		tag.tag(str,map);
		System.out.println(map);
		map = tag.tagFile("../example-data/data-tag.txt");
		System.out.println(map);
		System.out.println("Done!");
	}
1029477
synchronized ArrayList<CTMessageDAO> getMessages(String userId){
        final String tName = Table.INBOX_MESSAGES.getName();
        Cursor cursor;
        ArrayList<CTMessageDAO> messageDAOArrayList = new ArrayList<>();
        try{
            final SQLiteDatabase db = dbHelper.getWritableDatabase();
            cursor= db.rawQuery("SELECT * FROM "+tName+" WHERE " + USER_ID + " = ? ORDER BY " + KEY_CREATED_AT+ " DESC", new String[]{userId});
            if(cursor != null) {
                while(cursor.moveToNext()){
                    CTMessageDAO ctMessageDAO = new CTMessageDAO();
                    ctMessageDAO.setId(cursor.getString(cursor.getColumnIndex(_ID)));
                    ctMessageDAO.setJsonData(new JSONObject(cursor.getString(cursor.getColumnIndex(KEY_DATA))));
                    ctMessageDAO.setWzrkParams(new JSONObject(cursor.getString(cursor.getColumnIndex(WZRKPARAMS))));
                    ctMessageDAO.setDate(cursor.getLong(cursor.getColumnIndex(KEY_CREATED_AT)));
                    ctMessageDAO.setExpires(cursor.getLong(cursor.getColumnIndex(EXPIRES)));
                    ctMessageDAO.setRead(cursor.getInt(cursor.getColumnIndex(IS_READ)));
                    ctMessageDAO.setUserId(cursor.getString(cursor.getColumnIndex(USER_ID)));
                    ctMessageDAO.setTags(cursor.getString(cursor.getColumnIndex(TAGS)));
                    ctMessageDAO.setCampaignId(cursor.getString(cursor.getColumnIndex(CAMPAIGN)));
                    messageDAOArrayList.add(ctMessageDAO);
                }
                cursor.close();
            }
            return messageDAOArrayList;
        }catch (final SQLiteException e){
            getConfigLogger().verbose("Error retrieving records from " + tName, e);
            return null;
        } catch (JSONException e) {
            getConfigLogger().verbose("Error retrieving records from " + tName, e.getMessage());
            return null;
        } finally {
            dbHelper.close();
        }
    }
1373324
public String formatErrors() {

		if (errors.size() > 0) {

			StringBuilder results = new StringBuilder();

			for (Throwable t : errors) {
				results.append(t.getMessage());
				results.append("\n");
				if (t instanceof NullPointerException
						|| t instanceof CompilerError) {

					results.append(formatStackTrace(t));

				} else if (t instanceof SystemException) {

					results.append(formatStackTrace(t));

					Throwable cause = t.getCause();
					if (cause != null) {
						results.append("\nCause:\n");
						results.append(cause.getMessage());
						results.append("\n");
					}
					results.append(formatStackTrace(t));
				}
			}
			return results.toString();
		} else {
			return null;
		}
	}
458318
@Override
    public Map<String, SegmentData> getTRSegments(String trId,
        DocumentType type, String documentId, String language)
            throws ServiceException {
        if (trId == null || trId.isEmpty()) {
            throw new IllegalArgumentException("Non-empty trId must be specified.");
        }
        if (documentId == null || documentId.isEmpty()) {
            throw new IllegalArgumentException("Non-empty documentId must be specified.");
        }
        if (language == null || language.isEmpty()) {
            throw new IllegalArgumentException("Non-empty languageId must be specified.");
        }

        GetSegmentsResponse resp = invokeApiJson(
                "GET",
                escapePathSegment(account.getInstanceId()) + "/v2/doc-trs/"
                    + escapePathSegment(trId) + "/" + type.toString().toLowerCase() + "/"
                    + escapePathSegment(documentId) + "/" + language,
                null,
                GetSegmentsResponse.class);

        if (resp.getStatus() == Status.ERROR) {
            throw new ServiceException(resp.getMessage());
        }

        Map<String, SegmentData> resultEntries = new TreeMap<String, SegmentData>();
        if (resp.segments != null && !resp.segments.isEmpty()) {
            for (Entry<String, RestSegmentData> entry : resp.segments.entrySet()) {
                resultEntries.put(entry.getKey(),
                        new SegmentDataImpl(entry.getValue()));
            }
        }
        return resultEntries;
    }
254783
function () {
/*Line 57 - 'AtomDateListBox.js' */                base.init.apply(this);
/*Line 58 - 'AtomDateListBox.js' */                var _this = this;
/*Line 59 - 'AtomDateListBox.js' */                this.toggleDateCommand = function (scope, sender) {
/*Line 60 - 'AtomDateListBox.js' */                    _this.toggleDate.apply(_this, arguments);
/*Line 61 - 'AtomDateListBox.js' */                };
/*Line 62 - 'AtomDateListBox.js' */            }
710495
function () {
/*Line 86 - 'AtomFormLayout.js' */                var element = this._element;
/*Line 87 - 'AtomFormLayout.js' */                $(element).addClass("atom-form");
/*Line 88 - 'AtomFormLayout.js' */                var ae = new AtomEnumerator($(element).children());

/*Line 90 - 'AtomFormLayout.js' */                // add table...
/*Line 91 - 'AtomFormLayout.js' */                var table = document.createElement("TABLE");

/*Line 93 - 'AtomFormLayout.js' */                $(table).addClass("atom-form-table");

/*Line 95 - 'AtomFormLayout.js' */                var tbody = document.createElement("TBODY");

/*Line 97 - 'AtomFormLayout.js' */                AtomUI.removeAllChildren(element);
/*Line 98 - 'AtomFormLayout.js' */                //element.innerHTML = "";

/*Line 100 - 'AtomFormLayout.js' */                element.appendChild(table);
/*Line 101 - 'AtomFormLayout.js' */                table.appendChild(tbody);

/*Line 103 - 'AtomFormLayout.js' */                var child;
/*Line 104 - 'AtomFormLayout.js' */                this.getTemplate("fieldTemplate");

/*Line 106 - 'AtomFormLayout.js' */                while (ae.next()) {
/*Line 107 - 'AtomFormLayout.js' */                    child = ae.current();
/*Line 108 - 'AtomFormLayout.js' */                    if (!child)
/*Line 109 - 'AtomFormLayout.js' */                        continue;

/*Line 111 - 'AtomFormLayout.js' */                    this.createField(tbody, child);

/*Line 113 - 'AtomFormLayout.js' */                }

/*Line 115 - 'AtomFormLayout.js' */            }
393092
@Override
    public void characters(char ch[], int start, int length) {
        if (debug) logger.debug(new String(ch, start, length));
        conv.characterData(xpath, ch, start, length);
    }
1100757
@Override
    protected void configureFindbugsEngine() {
        addArg("-output");
        addArg(outputFile.getPath());
        if (overrideRevisionNames) {
            addArg("-overrideRevisionNames");
        }
        if (noPackageMoves) {
            addArg("-noPackageMoves");
        }
        if (preciseMatch) {
            addArg("-preciseMatch");
        }
        if (precisePriorityMatch) {
            addArg("-precisePriorityMatch");
        }
        if (quiet) {
            addArg("-quiet");
        }
        if (withMessages) {
            addArg("-withMessages");
        }

        for (DataFile dataFile : dataFileList) {
            addArg(dataFile.getName());
        }
    }
629715
function () {
    var tmp = this.elements[0*4+1];
    this.elements[0*4+1] = this.elements[1*4+0];
    this.elements[1*4+0] = tmp;

    tmp = this.elements[0*4+2];
    this.elements[0*4+2] = this.elements[2*4+0];
    this.elements[2*4+0] = tmp;

    tmp = this.elements[0*4+3];
    this.elements[0*4+3] = this.elements[3*4+0];
    this.elements[3*4+0] = tmp;

    tmp = this.elements[1*4+2];
    this.elements[1*4+2] = this.elements[2*4+1];
    this.elements[2*4+1] = tmp;

    tmp = this.elements[1*4+3];
    this.elements[1*4+3] = this.elements[3*4+1];
    this.elements[3*4+1] = tmp;

    tmp = this.elements[2*4+3];
    this.elements[2*4+3] = this.elements[3*4+2];
    this.elements[3*4+2] = tmp;

    return this;
  }
1289783
private void recurseAndAddFiles(GraphRewrite event, FileService fileService, WindupJavaConfigurationService javaConfigurationService, FileModel file)
    {
        if (javaConfigurationService.checkIfIgnored(event, file))
            return;

        String filePath = file.getFilePath();
        File fileReference = new File(filePath);
        Long directorySize = new Long(0);

        if (fileReference.isDirectory())
        {
            File[] subFiles = fileReference.listFiles();
            if (subFiles != null)
            {
                for (File reference : subFiles)
                {
                    FileModel subFile = fileService.createByFilePath(file, reference.getAbsolutePath());
                    recurseAndAddFiles(event, fileService, javaConfigurationService, subFile);
                    if (subFile.isDirectory())
                    {
                        directorySize = directorySize + subFile.getDirectorySize();
                    }
                    else
                    {
                        directorySize = directorySize + subFile.getSize();
                    }
                }
            }
            file.setDirectorySize(directorySize);
        }
    }
1342817
private void aboutMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aboutMenuItemActionPerformed
        String version = MainFrame.class.getPackage().getImplementationVersion();
        if (version == null) {
            version = "unknown";
        }
        JTextPane textPane = new JTextPane();
        textPane.setEditable(false);
        textPane.setContentType("text/html");
        textPane.setText(
                "<font face=sans-serif><strong><font size=+2>ProCamTracker</font></strong> version " + version + "<br>" +
                "Copyright (C) 2009-2014 Samuel Audet &lt;<a href=\"mailto:saudet@ok.ctrl.titech.ac.jp%28Samuel%20Audet%29\">saudet@ok.ctrl.titech.ac.jp</a>&gt;<br>" +
                "Web site: <a href=\"http://www.ok.ctrl.titech.ac.jp/~saudet/procamtracker/\">http://www.ok.ctrl.titech.ac.jp/~saudet/procamtracker/</a><br>" +
                "<br>" +
                "Licensed under the GNU General Public License version 2 (GPLv2).<br>" +
                "Please refer to LICENSE.txt or <a href=\"http://www.gnu.org/licenses/\">http://www.gnu.org/licenses/</a> for details."
                );
        textPane.setCaretPosition(0);
        Dimension dim = textPane.getPreferredSize();
        dim.height = dim.width*3/4;
        textPane.setPreferredSize(dim);

        textPane.addHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if(e.getEventType() == EventType.ACTIVATED) {
                    try {
                        Desktop.getDesktop().browse(e.getURL().toURI());
                    } catch(Exception ex) {
                        Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE,
                                "Could not launch browser to \"" + e.getURL()+ "\"", ex);
                    }
                }
            }
        });

        // pass the scrollpane to the joptionpane.
        JDialog dialog = new JOptionPane(textPane, JOptionPane.PLAIN_MESSAGE).
                createDialog(this, "About");

        if ("com.sun.java.swing.plaf.gtk.GTKLookAndFeel".equals(UIManager.getLookAndFeel().getClass().getName())) {
            // under GTK, frameBackground is white, but rootPane color is OK...
            // but under Windows, the rootPane's color is funny...
            Color c = dialog.getRootPane().getBackground();
            textPane.setBackground(new Color(c.getRGB()));
        } else {
            Color frameBackground = this.getBackground();
            textPane.setBackground(frameBackground);
        }
        dialog.setVisible(true);
    }
397961
function () {
/*Line 89 - 'AtomDataPager.js' */                    var v = this._items;
/*Line 90 - 'AtomDataPager.js' */                    if (v.length === undefined) {
/*Line 91 - 'AtomDataPager.js' */                        var val = v[this._itemsPath];

/*Line 93 - 'AtomDataPager.js' */                        AtomBinder.setValue(this, "total", v[this._totalPath]);
/*Line 94 - 'AtomDataPager.js' */                        AtomBinder.setValue(this, "value", val);
/*Line 95 - 'AtomDataPager.js' */                    } else {
/*Line 96 - 'AtomDataPager.js' */                        if (v.total) {
/*Line 97 - 'AtomDataPager.js' */                            AtomBinder.setValue(this, "total", v.total);
/*Line 98 - 'AtomDataPager.js' */                        } else {
/*Line 99 - 'AtomDataPager.js' */                            AtomBinder.setValue(this, "pages", []);
/*Line 100 - 'AtomDataPager.js' */                        }
/*Line 101 - 'AtomDataPager.js' */                        AtomBinder.setValue(this, "value", v);
/*Line 102 - 'AtomDataPager.js' */                    }

/*Line 104 - 'AtomDataPager.js' */                    this.preparePages();
/*Line 105 - 'AtomDataPager.js' */                }