id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
10,100 | cogroo/cogroo4 | cogroo-nlp/src/main/java/org/cogroo/tools/featurizer/DefaultFeaturizerContextGenerator.java | DefaultFeaturizerContextGenerator.createWindowFeats | private void createWindowFeats(int i, String[] toks, String[] tags,
String[] preds, List<String> feats) {
// Words in a 5-word window
String w_2, w_1, w0, w1, w2;
// Tags in a 5-word window
String t_2, t_1, t0, t1, t2;
// Previous predictions
String p_2, p_1;
w_2 = w_1 = w0 = w1 = ... | java | private void createWindowFeats(int i, String[] toks, String[] tags,
String[] preds, List<String> feats) {
// Words in a 5-word window
String w_2, w_1, w0, w1, w2;
// Tags in a 5-word window
String t_2, t_1, t0, t1, t2;
// Previous predictions
String p_2, p_1;
w_2 = w_1 = w0 = w1 = ... | [
"private",
"void",
"createWindowFeats",
"(",
"int",
"i",
",",
"String",
"[",
"]",
"toks",
",",
"String",
"[",
"]",
"tags",
",",
"String",
"[",
"]",
"preds",
",",
"List",
"<",
"String",
">",
"feats",
")",
"{",
"// Words in a 5-word window",
"String",
"w_2... | 0.9674293472168595 | [
"0",
".",
"9674293472168595"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-nlp/src/main/java/org/cogroo/tools/featurizer/DefaultFeaturizerContextGenerator.java#L234-L317 |
10,101 | cogroo/cogroo4 | cogroo-nlp/src/main/java/org/cogroo/tools/featurizer/DefaultFeaturizerContextGenerator.java | DefaultFeaturizerContextGenerator.create3WindowFeats | private void create3WindowFeats(int i, String[] toks, String[] tags,
String[] preds, List<String> feats) {
// Words in a 5-word window
String w_1, w0, w1;
// Tags in a 5-word window
String t_1, t0, t1;
// Previous predictions
String p_2, p_1;
w0 = w1 = null;
t_1 = t0 = t1 = nul... | java | private void create3WindowFeats(int i, String[] toks, String[] tags,
String[] preds, List<String> feats) {
// Words in a 5-word window
String w_1, w0, w1;
// Tags in a 5-word window
String t_1, t0, t1;
// Previous predictions
String p_2, p_1;
w0 = w1 = null;
t_1 = t0 = t1 = nul... | [
"private",
"void",
"create3WindowFeats",
"(",
"int",
"i",
",",
"String",
"[",
"]",
"toks",
",",
"String",
"[",
"]",
"tags",
",",
"String",
"[",
"]",
"preds",
",",
"List",
"<",
"String",
">",
"feats",
")",
"{",
"// Words in a 5-word window",
"String",
"w_... | 0.9670307770871996 | [
"0",
".",
"9670307770871996"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-nlp/src/main/java/org/cogroo/tools/featurizer/DefaultFeaturizerContextGenerator.java#L320-L390 |
10,102 | DataArt/CalculationEngine | calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/DependencyExtractors.java | DependencyExtractors.resolveCellDependencies | static List<IA1Address> resolveCellDependencies(IA1Address cellAddress, Sheet sheet, FormulaParsingWorkbook workbook) {
Row row = sheet.getRow(cellAddress.row());
if (row == null) { return emptyList(); }
Cell cell = row.getCell(cellAddress.column());
if (cell == null) { return emptyL... | java | static List<IA1Address> resolveCellDependencies(IA1Address cellAddress, Sheet sheet, FormulaParsingWorkbook workbook) {
Row row = sheet.getRow(cellAddress.row());
if (row == null) { return emptyList(); }
Cell cell = row.getCell(cellAddress.column());
if (cell == null) { return emptyL... | [
"static",
"List",
"<",
"IA1Address",
">",
"resolveCellDependencies",
"(",
"IA1Address",
"cellAddress",
",",
"Sheet",
"sheet",
",",
"FormulaParsingWorkbook",
"workbook",
")",
"{",
"Row",
"row",
"=",
"sheet",
".",
"getRow",
"(",
"cellAddress",
".",
"row",
"(",
"... | For given cell address gives a list of this cell's dependencies. | [
"For",
"given",
"cell",
"address",
"gives",
"a",
"list",
"of",
"this",
"cell",
"s",
"dependencies",
"."
] | 34ce1d9c1f9b57a502906b274311d28580b134e5 | https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/DependencyExtractors.java#L176-L207 |
10,103 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/entities/Sentence.java | Sentence.getSentence | public String getSentence() {
if(sentence != null)
return this.sentence;
else if(doc != null) {
return span.getCoveredText(doc).toString();
} else {
return null;
}
} | java | public String getSentence() {
if(sentence != null)
return this.sentence;
else if(doc != null) {
return span.getCoveredText(doc).toString();
} else {
return null;
}
} | [
"public",
"String",
"getSentence",
"(",
")",
"{",
"if",
"(",
"sentence",
"!=",
"null",
")",
"return",
"this",
".",
"sentence",
";",
"else",
"if",
"(",
"doc",
"!=",
"null",
")",
"{",
"return",
"span",
".",
"getCoveredText",
"(",
"doc",
")",
".",
"toSt... | Gets the original sentence.
@return the original sentence | [
"Gets",
"the",
"original",
"sentence",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/entities/Sentence.java#L90-L98 |
10,104 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/util/SecurityUtil.java | SecurityUtil.encrypt | public byte[] encrypt(PrivateKey privateKey, byte[] encryptedSecretKey, String data) throws InvalidKeyException {
byte[] encryptedData = null;
try {
byte[] chave = privateKey.getEncoded();
// Decrypt secret symmetric key with private key
Cipher rsacf = Cipher.getInsta... | java | public byte[] encrypt(PrivateKey privateKey, byte[] encryptedSecretKey, String data) throws InvalidKeyException {
byte[] encryptedData = null;
try {
byte[] chave = privateKey.getEncoded();
// Decrypt secret symmetric key with private key
Cipher rsacf = Cipher.getInsta... | [
"public",
"byte",
"[",
"]",
"encrypt",
"(",
"PrivateKey",
"privateKey",
",",
"byte",
"[",
"]",
"encryptedSecretKey",
",",
"String",
"data",
")",
"throws",
"InvalidKeyException",
"{",
"byte",
"[",
"]",
"encryptedData",
"=",
"null",
";",
"try",
"{",
"byte",
... | Encrypt data using an key encrypted with a private key.
@param privateKey the private key to decrypt the secret key
@param encryptedSecretKey a encrypted secret key
@param data the data to encrypt
@return the encrypted data
@throws InvalidKeyException one of the keys is invalid | [
"Encrypt",
"data",
"using",
"an",
"key",
"encrypted",
"with",
"a",
"private",
"key",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/util/SecurityUtil.java#L55-L70 |
10,105 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/util/SecurityUtil.java | SecurityUtil.encrypt | public synchronized String encrypt(String plaintext) {
MessageDigest md = null;
try {
md = MessageDigest.getInstance("SHA");
md.update(plaintext.getBytes(UTF8));
} catch (Exception e) {
LOG.log(Level.SEVERE, "Should not happen!", e);
}
byte raw... | java | public synchronized String encrypt(String plaintext) {
MessageDigest md = null;
try {
md = MessageDigest.getInstance("SHA");
md.update(plaintext.getBytes(UTF8));
} catch (Exception e) {
LOG.log(Level.SEVERE, "Should not happen!", e);
}
byte raw... | [
"public",
"synchronized",
"String",
"encrypt",
"(",
"String",
"plaintext",
")",
"{",
"MessageDigest",
"md",
"=",
"null",
";",
"try",
"{",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"SHA\"",
")",
";",
"md",
".",
"update",
"(",
"plaintext",
".",
... | Encrypt a string using SHA
@param plaintext the original text
@return resultant hash | [
"Encrypt",
"a",
"string",
"using",
"SHA"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/util/SecurityUtil.java#L189-L200 |
10,106 | DataArt/CalculationEngine | calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/ConverterUtils.java | ConverterUtils.isFunctionInFormula | static boolean isFunctionInFormula(String formula, String function) {
String filteredFormula = formula.replace(POI_FUNCTION_PREFIX, "");
return filteredFormula.startsWith(function) && filteredFormula.replace(function, "").startsWith("(");
} | java | static boolean isFunctionInFormula(String formula, String function) {
String filteredFormula = formula.replace(POI_FUNCTION_PREFIX, "");
return filteredFormula.startsWith(function) && filteredFormula.replace(function, "").startsWith("(");
} | [
"static",
"boolean",
"isFunctionInFormula",
"(",
"String",
"formula",
",",
"String",
"function",
")",
"{",
"String",
"filteredFormula",
"=",
"formula",
".",
"replace",
"(",
"POI_FUNCTION_PREFIX",
",",
"\"\"",
")",
";",
"return",
"filteredFormula",
".",
"startsWith... | Checks if formula string contains given function. | [
"Checks",
"if",
"formula",
"string",
"contains",
"given",
"function",
"."
] | 34ce1d9c1f9b57a502906b274311d28580b134e5 | https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/ConverterUtils.java#L165-L168 |
10,107 | DataArt/CalculationEngine | calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/ConverterUtils.java | ConverterUtils.isFormula | static boolean isFormula(String value, EvaluationWorkbook workbook) {
try { return FormulaParser.parse(value, (FormulaParsingWorkbook) workbook, 0, 0).length > 1; } // TODO: formulaType and sheet index are 0
catch (FormulaParseException e) { return false; }
} | java | static boolean isFormula(String value, EvaluationWorkbook workbook) {
try { return FormulaParser.parse(value, (FormulaParsingWorkbook) workbook, 0, 0).length > 1; } // TODO: formulaType and sheet index are 0
catch (FormulaParseException e) { return false; }
} | [
"static",
"boolean",
"isFormula",
"(",
"String",
"value",
",",
"EvaluationWorkbook",
"workbook",
")",
"{",
"try",
"{",
"return",
"FormulaParser",
".",
"parse",
"(",
"value",
",",
"(",
"FormulaParsingWorkbook",
")",
"workbook",
",",
"0",
",",
"0",
")",
".",
... | Returns true if value string is formula | [
"Returns",
"true",
"if",
"value",
"string",
"is",
"formula"
] | 34ce1d9c1f9b57a502906b274311d28580b134e5 | https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/ConverterUtils.java#L260-L263 |
10,108 | cogroo/cogroo4 | cogroo-nlp/src/main/java/org/cogroo/dictionary/impl/FSAFeatureDictionary.java | FSAFeatureDictionary.getFeatures | public String[] getFeatures(String word, String pos) {
return lookup(new WordTag(word, pos));
} | java | public String[] getFeatures(String word, String pos) {
return lookup(new WordTag(word, pos));
} | [
"public",
"String",
"[",
"]",
"getFeatures",
"(",
"String",
"word",
",",
"String",
"pos",
")",
"{",
"return",
"lookup",
"(",
"new",
"WordTag",
"(",
"word",
",",
"pos",
")",
")",
";",
"}"
] | add all features if pos == null | [
"add",
"all",
"features",
"if",
"pos",
"==",
"null"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-nlp/src/main/java/org/cogroo/dictionary/impl/FSAFeatureDictionary.java#L76-L78 |
10,109 | cogroo/cogroo4 | cogroo-eval/UIMAWrappers/UIMAFeaturizer/src/main/java/opennlp/uima/featurizer/Featurizer.java | Featurizer.process | public void process(CAS tcas) {
final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
mSentenceType, mTokenType);
for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {
final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<Annot... | java | public void process(CAS tcas) {
final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
mSentenceType, mTokenType);
for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {
final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<Annot... | [
"public",
"void",
"process",
"(",
"CAS",
"tcas",
")",
"{",
"final",
"AnnotationComboIterator",
"comboIterator",
"=",
"new",
"AnnotationComboIterator",
"(",
"tcas",
",",
"mSentenceType",
",",
"mTokenType",
")",
";",
"for",
"(",
"AnnotationIteratorPair",
"annotationIt... | Performs featurizer on the given tcas object. | [
"Performs",
"featurizer",
"on",
"the",
"given",
"tcas",
"object",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/UIMAWrappers/UIMAFeaturizer/src/main/java/opennlp/uima/featurizer/Featurizer.java#L138-L175 |
10,110 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/EqualsUtils.java | EqualsUtils.areElementEquals | public static boolean areElementEquals(Element element1, Element element2) {
for (Mask mask1 : element1.getMask()) {
if (!areBooleanEquals(element1.isNegated(), element2.isNegated())) {
// Negated.
return false;
}
for (Mask mask2 : element2.getMask()) {
if (!areStringEquals(mask1.getLexeme... | java | public static boolean areElementEquals(Element element1, Element element2) {
for (Mask mask1 : element1.getMask()) {
if (!areBooleanEquals(element1.isNegated(), element2.isNegated())) {
// Negated.
return false;
}
for (Mask mask2 : element2.getMask()) {
if (!areStringEquals(mask1.getLexeme... | [
"public",
"static",
"boolean",
"areElementEquals",
"(",
"Element",
"element1",
",",
"Element",
"element2",
")",
"{",
"for",
"(",
"Mask",
"mask1",
":",
"element1",
".",
"getMask",
"(",
")",
")",
"{",
"if",
"(",
"!",
"areBooleanEquals",
"(",
"element1",
".",... | Checks if two elements are equals.
@param element1 from tree element {@link Element}
@param element2 from rule element {@link Element}
@return true if the elements are equal, false otherwise | [
"Checks",
"if",
"two",
"elements",
"are",
"equals",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/EqualsUtils.java#L68-L88 |
10,111 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/EqualsUtils.java | EqualsUtils.areTagMaskEquals | public static boolean areTagMaskEquals(TagMask tagMask1, TagMask tagMask2) {
if ((tagMask1 == null && tagMask2 != null)
|| (tagMask1 != null && tagMask2 == null)) {
return false;
} else if (tagMask1 != null && tagMask2 != null) {
if (tagMask1.getCase() != tagMask2.getCase()) {
return false;
... | java | public static boolean areTagMaskEquals(TagMask tagMask1, TagMask tagMask2) {
if ((tagMask1 == null && tagMask2 != null)
|| (tagMask1 != null && tagMask2 == null)) {
return false;
} else if (tagMask1 != null && tagMask2 != null) {
if (tagMask1.getCase() != tagMask2.getCase()) {
return false;
... | [
"public",
"static",
"boolean",
"areTagMaskEquals",
"(",
"TagMask",
"tagMask1",
",",
"TagMask",
"tagMask2",
")",
"{",
"if",
"(",
"(",
"tagMask1",
"==",
"null",
"&&",
"tagMask2",
"!=",
"null",
")",
"||",
"(",
"tagMask1",
"!=",
"null",
"&&",
"tagMask2",
"==",... | Checks if two tag masks are equals.
The tag masks can be both null, one of them null or none of them null.
@param tagMask1 from tree element {@link TagMask}
@param tagMask2 from rule element {@link TagMask}
@return true if equals, otherwise | [
"Checks",
"if",
"two",
"tag",
"masks",
"are",
"equals",
".",
"The",
"tag",
"masks",
"can",
"be",
"both",
"null",
"one",
"of",
"them",
"null",
"or",
"none",
"of",
"them",
"null",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/EqualsUtils.java#L98-L125 |
10,112 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/EqualsUtils.java | EqualsUtils.areBooleanEquals | public static boolean areBooleanEquals(Boolean boolean1, Boolean boolean2) {
if (boolean1 != null && !boolean1.equals(boolean2)) {
return false;
} else if (boolean2 != null && !boolean2.equals(boolean1)) {
return false;
}
return true;
} | java | public static boolean areBooleanEquals(Boolean boolean1, Boolean boolean2) {
if (boolean1 != null && !boolean1.equals(boolean2)) {
return false;
} else if (boolean2 != null && !boolean2.equals(boolean1)) {
return false;
}
return true;
} | [
"public",
"static",
"boolean",
"areBooleanEquals",
"(",
"Boolean",
"boolean1",
",",
"Boolean",
"boolean2",
")",
"{",
"if",
"(",
"boolean1",
"!=",
"null",
"&&",
"!",
"boolean1",
".",
"equals",
"(",
"boolean2",
")",
")",
"{",
"return",
"false",
";",
"}",
"... | Checks if two Booleans are equals.
The booleans can be both null, one of them null or none of them null.
@param boolean1 from tree tree element
@param boolean2 from rule element
@return true if and only if the two booleans are equal (both equal or both null) | [
"Checks",
"if",
"two",
"Booleans",
"are",
"equals",
".",
"The",
"booleans",
"can",
"be",
"both",
"null",
"one",
"of",
"them",
"null",
"or",
"none",
"of",
"them",
"null",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/EqualsUtils.java#L135-L142 |
10,113 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/EqualsUtils.java | EqualsUtils.areStringEquals | public static boolean areStringEquals(String string1, String string2) {
/* string1 string2 outcome
* null null true
* null x false
* x null false
* x y false
* x x true
*/
// XXX both null must be unequal? If yes, boolean must be too?
if (string1 == null && string2 == null) {
... | java | public static boolean areStringEquals(String string1, String string2) {
/* string1 string2 outcome
* null null true
* null x false
* x null false
* x y false
* x x true
*/
// XXX both null must be unequal? If yes, boolean must be too?
if (string1 == null && string2 == null) {
... | [
"public",
"static",
"boolean",
"areStringEquals",
"(",
"String",
"string1",
",",
"String",
"string2",
")",
"{",
"/* string1\tstring2\toutcome\r\n\t\t * null\t\tnull\ttrue\r\n\t\t * null\t\tx\t\tfalse\r\n\t\t * x\t\tnull\tfalse\r\n\t\t * x\t\ty\t\tfalse\r\n\t\t * x\t\tx\t\ttrue\r\n\t\t */",
... | Checks if two strings are equals.
The strings can be both null, one of them null or none of them null.
@param string1 from tree element
@param string2 from rule element
@return true if and only if the two strings are equal (both equal or both null) | [
"Checks",
"if",
"two",
"strings",
"are",
"equals",
".",
"The",
"strings",
"can",
"be",
"both",
"null",
"one",
"of",
"them",
"null",
"or",
"none",
"of",
"them",
"null",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/EqualsUtils.java#L152-L169 |
10,114 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/SuggestionBuilder.java | SuggestionBuilder.discardBeginningHyphen | private static String discardBeginningHyphen(String string) {
String noHyphenString = string;
if (string.startsWith("-")) {
noHyphenString = string.substring(1); // Oh well, just throw away
// the awful "-". No one
// will ever notice...
}
return noHyphenString;
} | java | private static String discardBeginningHyphen(String string) {
String noHyphenString = string;
if (string.startsWith("-")) {
noHyphenString = string.substring(1); // Oh well, just throw away
// the awful "-". No one
// will ever notice...
}
return noHyphenString;
} | [
"private",
"static",
"String",
"discardBeginningHyphen",
"(",
"String",
"string",
")",
"{",
"String",
"noHyphenString",
"=",
"string",
";",
"if",
"(",
"string",
".",
"startsWith",
"(",
"\"-\"",
")",
")",
"{",
"noHyphenString",
"=",
"string",
".",
"substring",
... | Removes the beginning hyphen from the string, if any.
@param string
the string that will have the beginning hyphen removed
@return the string without the beginning hyphen | [
"Removes",
"the",
"beginning",
"hyphen",
"from",
"the",
"string",
"if",
"any",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/SuggestionBuilder.java#L666-L674 |
10,115 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/addon/conf/DefaultConfiguration.java | DefaultConfiguration.commit | public void commit(Object root) {
try {
XChangesBatch xUpdateControl = (XChangesBatch) UnoRuntime
.queryInterface(XChangesBatch.class, root);
xUpdateControl.commitChanges();
} catch (WrappedTargetException e) {
e.printStackTrace();
}
} | java | public void commit(Object root) {
try {
XChangesBatch xUpdateControl = (XChangesBatch) UnoRuntime
.queryInterface(XChangesBatch.class, root);
xUpdateControl.commitChanges();
} catch (WrappedTargetException e) {
e.printStackTrace();
}
} | [
"public",
"void",
"commit",
"(",
"Object",
"root",
")",
"{",
"try",
"{",
"XChangesBatch",
"xUpdateControl",
"=",
"(",
"XChangesBatch",
")",
"UnoRuntime",
".",
"queryInterface",
"(",
"XChangesBatch",
".",
"class",
",",
"root",
")",
";",
"xUpdateControl",
".",
... | Commit the XChangeBatch control
@param root | [
"Commit",
"the",
"XChangeBatch",
"control"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/addon/conf/DefaultConfiguration.java#L185-L193 |
10,116 | cogroo/cogroo4 | cogroo-ann/src/main/java/org/cogroo/config/LanguageConfigurationUtil.java | LanguageConfigurationUtil.generateName | private static String generateName(Locale locale) {
StringBuilder str = new StringBuilder();
str.append("models_").append(locale.getLanguage());
if (locale.getCountry() != null && !locale.getCountry().isEmpty())
str.append("_").append(locale.getCountry());
str.append(".xml");
return str.toS... | java | private static String generateName(Locale locale) {
StringBuilder str = new StringBuilder();
str.append("models_").append(locale.getLanguage());
if (locale.getCountry() != null && !locale.getCountry().isEmpty())
str.append("_").append(locale.getCountry());
str.append(".xml");
return str.toS... | [
"private",
"static",
"String",
"generateName",
"(",
"Locale",
"locale",
")",
"{",
"StringBuilder",
"str",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"str",
".",
"append",
"(",
"\"models_\"",
")",
".",
"append",
"(",
"locale",
".",
"getLanguage",
"(",
")",... | Generates the name of the file to be used according to the language chosen.
@param locale
contains the language that will be used
@return the <code>String</code> which names the .xml file to be used
according to the language | [
"Generates",
"the",
"name",
"of",
"the",
"file",
"to",
"be",
"used",
"according",
"to",
"the",
"language",
"chosen",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-ann/src/main/java/org/cogroo/config/LanguageConfigurationUtil.java#L85-L95 |
10,117 | cogroo/cogroo4 | cogroo-eval/GramEval/src/main/java/cogroo/uima/eval/Error.java | Error.getCoveredText | public CharSequence getCoveredText(CharSequence text) {
if (getEnd() > text.length()) {
throw new IllegalArgumentException("The span " + toString()
+ " is outside the given text!");
}
return text.subSequence(getStart(), getEnd());
} | java | public CharSequence getCoveredText(CharSequence text) {
if (getEnd() > text.length()) {
throw new IllegalArgumentException("The span " + toString()
+ " is outside the given text!");
}
return text.subSequence(getStart(), getEnd());
} | [
"public",
"CharSequence",
"getCoveredText",
"(",
"CharSequence",
"text",
")",
"{",
"if",
"(",
"getEnd",
"(",
")",
">",
"text",
".",
"length",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The span \"",
"+",
"toString",
"(",
")",
"... | Retrieves the string covered by the current span of the specified text.
@param text
@return the substring covered by the current span | [
"Retrieves",
"the",
"string",
"covered",
"by",
"the",
"current",
"span",
"of",
"the",
"specified",
"text",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/GramEval/src/main/java/cogroo/uima/eval/Error.java#L199-L206 |
10,118 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.connectIfNeeded | public boolean connectIfNeeded() {
if (getDDP().getState() == CONNSTATE.Disconnected) {
// make connection to Meteor server
getDDP().connect();
return true;
} else if (getDDP().getState() == CONNSTATE.Closed) {
// try to reconnect w/ a new connection
... | java | public boolean connectIfNeeded() {
if (getDDP().getState() == CONNSTATE.Disconnected) {
// make connection to Meteor server
getDDP().connect();
return true;
} else if (getDDP().getState() == CONNSTATE.Closed) {
// try to reconnect w/ a new connection
... | [
"public",
"boolean",
"connectIfNeeded",
"(",
")",
"{",
"if",
"(",
"getDDP",
"(",
")",
".",
"getState",
"(",
")",
"==",
"CONNSTATE",
".",
"Disconnected",
")",
"{",
"// make connection to Meteor server",
"getDDP",
"(",
")",
".",
"connect",
"(",
")",
";",
"re... | Requests DDP connect if needed
@return true if connect was issue, otherwise false | [
"Requests",
"DDP",
"connect",
"if",
"needed"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L324-L335 |
10,119 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.logout | public void logout() {
saveResumeToken(null);
mDDPState = DDPSTATE.NotLoggedIn;
mUserId = null;
broadcastConnectionState(mDDPState);
} | java | public void logout() {
saveResumeToken(null);
mDDPState = DDPSTATE.NotLoggedIn;
mUserId = null;
broadcastConnectionState(mDDPState);
} | [
"public",
"void",
"logout",
"(",
")",
"{",
"saveResumeToken",
"(",
"null",
")",
";",
"mDDPState",
"=",
"DDPSTATE",
".",
"NotLoggedIn",
";",
"mUserId",
"=",
"null",
";",
"broadcastConnectionState",
"(",
"mDDPState",
")",
";",
"}"
] | Logs out from server and removes the resume token | [
"Logs",
"out",
"from",
"server",
"and",
"removes",
"the",
"resume",
"token"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L357-L362 |
10,120 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.saveResumeToken | public void saveResumeToken(String token) {
SharedPreferences settings = mContext.getSharedPreferences(PREF_DDPINFO, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = settings.edit();
//REVIEW: should token be encrypted?
editor.putString(PREF_RESUMETOKEN, token);
editor.ap... | java | public void saveResumeToken(String token) {
SharedPreferences settings = mContext.getSharedPreferences(PREF_DDPINFO, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = settings.edit();
//REVIEW: should token be encrypted?
editor.putString(PREF_RESUMETOKEN, token);
editor.ap... | [
"public",
"void",
"saveResumeToken",
"(",
"String",
"token",
")",
"{",
"SharedPreferences",
"settings",
"=",
"mContext",
".",
"getSharedPreferences",
"(",
"PREF_DDPINFO",
",",
"Context",
".",
"MODE_PRIVATE",
")",
";",
"SharedPreferences",
".",
"Editor",
"editor",
... | Saves resume token to Android's internal app storage
@param token resume token | [
"Saves",
"resume",
"token",
"to",
"Android",
"s",
"internal",
"app",
"storage"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L368-L374 |
10,121 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.getResumeToken | public String getResumeToken() {
SharedPreferences settings = mContext.getSharedPreferences(PREF_DDPINFO, Context.MODE_PRIVATE);
return settings.getString(PREF_RESUMETOKEN, null);
} | java | public String getResumeToken() {
SharedPreferences settings = mContext.getSharedPreferences(PREF_DDPINFO, Context.MODE_PRIVATE);
return settings.getString(PREF_RESUMETOKEN, null);
} | [
"public",
"String",
"getResumeToken",
"(",
")",
"{",
"SharedPreferences",
"settings",
"=",
"mContext",
".",
"getSharedPreferences",
"(",
"PREF_DDPINFO",
",",
"Context",
".",
"MODE_PRIVATE",
")",
";",
"return",
"settings",
".",
"getString",
"(",
"PREF_RESUMETOKEN",
... | Gets resume token from Android's internal app storage
@return resume token or null if not found | [
"Gets",
"resume",
"token",
"from",
"Android",
"s",
"internal",
"app",
"storage"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L380-L383 |
10,122 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.handleLoginResult | @SuppressWarnings("unchecked")
public void handleLoginResult(Map<String, Object> jsonFields) {
if (jsonFields.containsKey("result")) {
Map<String, Object> result = (Map<String, Object>) jsonFields
.get(DdpMessageField.RESULT);
mResumeToken = (String) result.get("t... | java | @SuppressWarnings("unchecked")
public void handleLoginResult(Map<String, Object> jsonFields) {
if (jsonFields.containsKey("result")) {
Map<String, Object> result = (Map<String, Object>) jsonFields
.get(DdpMessageField.RESULT);
mResumeToken = (String) result.get("t... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"handleLoginResult",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"jsonFields",
")",
"{",
"if",
"(",
"jsonFields",
".",
"containsKey",
"(",
"\"result\"",
")",
")",
"{",
"Map",
"<",
"St... | Handles callback from login command
@param jsonFields fields from result | [
"Handles",
"callback",
"from",
"login",
"command"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L389-L404 |
10,123 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.broadcastConnectionState | public void broadcastConnectionState(DDPSTATE ddpstate) {
Intent broadcastIntent = new Intent();
broadcastIntent.setAction(MESSAGE_CONNECTION);
broadcastIntent.putExtra(MESSAGE_EXTRA_STATE, ddpstate.ordinal());
broadcastIntent.putExtra(MESSAGE_EXTRA_USERID, mUserId);
broadcastInt... | java | public void broadcastConnectionState(DDPSTATE ddpstate) {
Intent broadcastIntent = new Intent();
broadcastIntent.setAction(MESSAGE_CONNECTION);
broadcastIntent.putExtra(MESSAGE_EXTRA_STATE, ddpstate.ordinal());
broadcastIntent.putExtra(MESSAGE_EXTRA_USERID, mUserId);
broadcastInt... | [
"public",
"void",
"broadcastConnectionState",
"(",
"DDPSTATE",
"ddpstate",
")",
"{",
"Intent",
"broadcastIntent",
"=",
"new",
"Intent",
"(",
")",
";",
"broadcastIntent",
".",
"setAction",
"(",
"MESSAGE_CONNECTION",
")",
";",
"broadcastIntent",
".",
"putExtra",
"("... | Used to notify event system of connection events.
Default behavior uses Android's LocalBroadcastManager.
Override if you want to use a different eventbus.
@param ddpstate current DDP state | [
"Used",
"to",
"notify",
"event",
"system",
"of",
"connection",
"events",
".",
"Default",
"behavior",
"uses",
"Android",
"s",
"LocalBroadcastManager",
".",
"Override",
"if",
"you",
"want",
"to",
"use",
"a",
"different",
"eventbus",
"."
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L581-L589 |
10,124 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.broadcastDDPError | public void broadcastDDPError(String errorMsg) {
// let core know there was an error subscribing to a collection
Intent broadcastIntent = new Intent();
broadcastIntent.setAction(MESSAGE_ERROR);
broadcastIntent.putExtra(MESSAGE_EXTRA_MSG, errorMsg);
LocalBroadcastManager.getInstan... | java | public void broadcastDDPError(String errorMsg) {
// let core know there was an error subscribing to a collection
Intent broadcastIntent = new Intent();
broadcastIntent.setAction(MESSAGE_ERROR);
broadcastIntent.putExtra(MESSAGE_EXTRA_MSG, errorMsg);
LocalBroadcastManager.getInstan... | [
"public",
"void",
"broadcastDDPError",
"(",
"String",
"errorMsg",
")",
"{",
"// let core know there was an error subscribing to a collection",
"Intent",
"broadcastIntent",
"=",
"new",
"Intent",
"(",
")",
";",
"broadcastIntent",
".",
"setAction",
"(",
"MESSAGE_ERROR",
")",... | Used to notify event system of error events.
Default behavior uses Android's LocalBroadcastManager.
Override if you want to use a different eventbus.
@param errorMsg error message | [
"Used",
"to",
"notify",
"event",
"system",
"of",
"error",
"events",
".",
"Default",
"behavior",
"uses",
"Android",
"s",
"LocalBroadcastManager",
".",
"Override",
"if",
"you",
"want",
"to",
"use",
"a",
"different",
"eventbus",
"."
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L597-L604 |
10,125 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.broadcastSubscriptionChanged | public void broadcastSubscriptionChanged(String subscriptionName,
String changetype, String docId) {
Intent broadcastIntent = new Intent();
broadcastIntent.setAction(MESSAGE_SUBUPDATED);
broadcastIntent.putExtra(MESSAGE_EXTRA_SUBNAME, subscriptionName);
broadcastIntent.putExt... | java | public void broadcastSubscriptionChanged(String subscriptionName,
String changetype, String docId) {
Intent broadcastIntent = new Intent();
broadcastIntent.setAction(MESSAGE_SUBUPDATED);
broadcastIntent.putExtra(MESSAGE_EXTRA_SUBNAME, subscriptionName);
broadcastIntent.putExt... | [
"public",
"void",
"broadcastSubscriptionChanged",
"(",
"String",
"subscriptionName",
",",
"String",
"changetype",
",",
"String",
"docId",
")",
"{",
"Intent",
"broadcastIntent",
"=",
"new",
"Intent",
"(",
")",
";",
"broadcastIntent",
".",
"setAction",
"(",
"MESSAGE... | Used to notify event system of subscription change events.
Default behavior uses Android's LocalBroadcastManager.
Override if you want to use a different eventbus.
@param subscriptionName subscription name (this can be different from collection name)
@param changetype "change", "add" or "remove"
@param docId document I... | [
"Used",
"to",
"notify",
"event",
"system",
"of",
"subscription",
"change",
"events",
".",
"Default",
"behavior",
"uses",
"Android",
"s",
"LocalBroadcastManager",
".",
"Override",
"if",
"you",
"want",
"to",
"use",
"a",
"different",
"eventbus",
"."
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L614-L623 |
10,126 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.update | @SuppressWarnings("unchecked")
@Override
public void update(Observable client, Object msg) {
// handle subscription updates and othre messages that aren't associated
// w/ a specific command
if (msg instanceof Map<?, ?>) {
Map<String, Object> jsonFields = (Map<String, Object>... | java | @SuppressWarnings("unchecked")
@Override
public void update(Observable client, Object msg) {
// handle subscription updates and othre messages that aren't associated
// w/ a specific command
if (msg instanceof Map<?, ?>) {
Map<String, Object> jsonFields = (Map<String, Object>... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"void",
"update",
"(",
"Observable",
"client",
",",
"Object",
"msg",
")",
"{",
"// handle subscription updates and othre messages that aren't associated",
"// w/ a specific command",
"if",
"(",
... | handles callbacks from DDP client websocket callbacks | [
"handles",
"callbacks",
"from",
"DDP",
"client",
"websocket",
"callbacks"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L628-L679 |
10,127 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.updateDoc | @SuppressWarnings("unchecked")
public boolean updateDoc(Map<String, Object> jsonFields, String collName,
String docId) {
if (mCollections.containsKey(collName)) {
Map<String, Map<String,Object>> collection = mCollections.get(collName);
Map<String, Object> doc = collection... | java | @SuppressWarnings("unchecked")
public boolean updateDoc(Map<String, Object> jsonFields, String collName,
String docId) {
if (mCollections.containsKey(collName)) {
Map<String, Map<String,Object>> collection = mCollections.get(collName);
Map<String, Object> doc = collection... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"boolean",
"updateDoc",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"jsonFields",
",",
"String",
"collName",
",",
"String",
"docId",
")",
"{",
"if",
"(",
"mCollections",
".",
"containsKey",
"("... | Handles updating a document in a collection.
Override if you want to use your own collection data store.
@param jsonFields fields for document
@param collName collection name
@param docId documement ID for update
@return true if changed; false if document not found | [
"Handles",
"updating",
"a",
"document",
"in",
"a",
"collection",
".",
"Override",
"if",
"you",
"want",
"to",
"use",
"your",
"own",
"collection",
"data",
"store",
"."
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L689-L722 |
10,128 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.removeDoc | public boolean removeDoc(String collName, String docId) {
if (mCollections.containsKey(collName)) {
// remove IDs from collection
Map<String, Map<String,Object>> collection = mCollections.get(collName);
if (BuildConfig.DEBUG) {
log.debug("Removed doc: " + docI... | java | public boolean removeDoc(String collName, String docId) {
if (mCollections.containsKey(collName)) {
// remove IDs from collection
Map<String, Map<String,Object>> collection = mCollections.get(collName);
if (BuildConfig.DEBUG) {
log.debug("Removed doc: " + docI... | [
"public",
"boolean",
"removeDoc",
"(",
"String",
"collName",
",",
"String",
"docId",
")",
"{",
"if",
"(",
"mCollections",
".",
"containsKey",
"(",
"collName",
")",
")",
"{",
"// remove IDs from collection",
"Map",
"<",
"String",
",",
"Map",
"<",
"String",
",... | Handles deleting a document in a collection.
Override if you want to use your own collection data store.
@param collName collection name
@param docId document ID
@return true if doc was deleted, false otherwise | [
"Handles",
"deleting",
"a",
"document",
"in",
"a",
"collection",
".",
"Override",
"if",
"you",
"want",
"to",
"use",
"your",
"own",
"collection",
"data",
"store",
"."
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L731-L745 |
10,129 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.addDoc | @SuppressWarnings("unchecked")
public void addDoc(Map<String, Object> jsonFields, String collName,
String docId) {
if (!mCollections.containsKey(collName)) {
// add new collection
log.debug("Added collection " + collName);
mCollections.put(collName, new Concur... | java | @SuppressWarnings("unchecked")
public void addDoc(Map<String, Object> jsonFields, String collName,
String docId) {
if (!mCollections.containsKey(collName)) {
// add new collection
log.debug("Added collection " + collName);
mCollections.put(collName, new Concur... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"addDoc",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"jsonFields",
",",
"String",
"collName",
",",
"String",
"docId",
")",
"{",
"if",
"(",
"!",
"mCollections",
".",
"containsKey",
"(... | Handles adding a document to collection.
Override if you want to use your own collection data store.
@param jsonFields fields for document
@param collName collection name
@param docId document ID | [
"Handles",
"adding",
"a",
"document",
"to",
"collection",
".",
"Override",
"if",
"you",
"want",
"to",
"use",
"your",
"own",
"collection",
"data",
"store",
"."
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L754-L777 |
10,130 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.getCollection | public Map<String, Map<String,Object>> getCollection(String collectionName) {
// return specified collection Map which is indexed by document ID
return mCollections.get(collectionName);
} | java | public Map<String, Map<String,Object>> getCollection(String collectionName) {
// return specified collection Map which is indexed by document ID
return mCollections.get(collectionName);
} | [
"public",
"Map",
"<",
"String",
",",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"getCollection",
"(",
"String",
"collectionName",
")",
"{",
"// return specified collection Map which is indexed by document ID",
"return",
"mCollections",
".",
"get",
"(",
"collection... | Gets local Meteor collection
@param collectionName collection name
@return collection as a Map or null if not found | [
"Gets",
"local",
"Meteor",
"collection"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L784-L787 |
10,131 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.getDocument | public Map<String, Object> getDocument(String collectionName, String docId) {
Map<String, Map<String,Object>> docs = DDPStateSingleton.getInstance()
.getCollection(collectionName);
if (docs != null) {
return docs.get(docId);
}
return null;
} | java | public Map<String, Object> getDocument(String collectionName, String docId) {
Map<String, Map<String,Object>> docs = DDPStateSingleton.getInstance()
.getCollection(collectionName);
if (docs != null) {
return docs.get(docId);
}
return null;
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getDocument",
"(",
"String",
"collectionName",
",",
"String",
"docId",
")",
"{",
"Map",
"<",
"String",
",",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"docs",
"=",
"DDPStateSingleton",
".",
"getIns... | Gets a document out of a collection
@param collectionName collection name
@param docId document ID
@return null if not found or a collection of the document's fields | [
"Gets",
"a",
"document",
"out",
"of",
"a",
"collection"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L795-L802 |
10,132 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.getUser | public Map<String, Object> getUser() {
Map<String, Object> userFields = DDPStateSingleton.getInstance()
.getDocument("users", getUserId());
if (userFields != null) {
return userFields;
}
return null;
} | java | public Map<String, Object> getUser() {
Map<String, Object> userFields = DDPStateSingleton.getInstance()
.getDocument("users", getUserId());
if (userFields != null) {
return userFields;
}
return null;
} | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getUser",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"userFields",
"=",
"DDPStateSingleton",
".",
"getInstance",
"(",
")",
".",
"getDocument",
"(",
"\"users\"",
",",
"getUserId",
"(",
")"... | Gets current Meteor user info
@return user Info or null if not logged in | [
"Gets",
"current",
"Meteor",
"user",
"info"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L808-L815 |
10,133 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.getUserEmail | @SuppressWarnings("unchecked")
public String getUserEmail(String userId) {
if (userId == null) {
return null;
}
// map userId to email
// NOTE: this gets convoluted if they use OAuth logins because the email
// field is in the service!
Map<String, Object> ... | java | @SuppressWarnings("unchecked")
public String getUserEmail(String userId) {
if (userId == null) {
return null;
}
// map userId to email
// NOTE: this gets convoluted if they use OAuth logins because the email
// field is in the service!
Map<String, Object> ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"String",
"getUserEmail",
"(",
"String",
"userId",
")",
"{",
"if",
"(",
"userId",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"// map userId to email",
"// NOTE: this gets convoluted if they use O... | Gets email address for user
@param userId user ID
@return email address for that user (lookup via users collection) | [
"Gets",
"email",
"address",
"for",
"user"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L830-L850 |
10,134 | kenyee/android-ddp-client | src/com/keysolutions/ddpclient/android/DDPStateSingleton.java | DDPStateSingleton.call | public int call(String method, Object[] params,
DDPListener resultListener) {
return getDDP().call(method, params, resultListener);
} | java | public int call(String method, Object[] params,
DDPListener resultListener) {
return getDDP().call(method, params, resultListener);
} | [
"public",
"int",
"call",
"(",
"String",
"method",
",",
"Object",
"[",
"]",
"params",
",",
"DDPListener",
"resultListener",
")",
"{",
"return",
"getDDP",
"(",
")",
".",
"call",
"(",
"method",
",",
"params",
",",
"resultListener",
")",
";",
"}"
] | Calls a Meteor method
@param method name of corresponding Meteor method
@param params arguments to be passed to the Meteor method
@param resultListener DDP command listener for this method call
@return command ID | [
"Calls",
"a",
"Meteor",
"method"
] | 6ab416e415570a03f96c383497144dd742de3f08 | https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/DDPStateSingleton.java#L859-L862 |
10,135 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/TagMaskUtils.java | TagMaskUtils.createTagMaskFromToken | public static TagMask createTagMaskFromToken(Token token, String text) {
TagMask tm = new TagMask();
Matcher m = REPLACE_R2.matcher(text);
while (m.find()) {
String property = m.group(1);
switch (property) {
case "number":
tm.setNumber(token.getMorphologicalTag().getNumberE());
break;
... | java | public static TagMask createTagMaskFromToken(Token token, String text) {
TagMask tm = new TagMask();
Matcher m = REPLACE_R2.matcher(text);
while (m.find()) {
String property = m.group(1);
switch (property) {
case "number":
tm.setNumber(token.getMorphologicalTag().getNumberE());
break;
... | [
"public",
"static",
"TagMask",
"createTagMaskFromToken",
"(",
"Token",
"token",
",",
"String",
"text",
")",
"{",
"TagMask",
"tm",
"=",
"new",
"TagMask",
"(",
")",
";",
"Matcher",
"m",
"=",
"REPLACE_R2",
".",
"matcher",
"(",
"text",
")",
";",
"while",
"("... | Returns a TagMask with the attributes collected from the given token.
@param token
the token whose attributes will be collected.
@param text
a string containing the attributes to get from the token,
e.g., "number gender"
@returna a TagMask object with the attributes collected | [
"Returns",
"a",
"TagMask",
"with",
"the",
"attributes",
"collected",
"from",
"the",
"given",
"token",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/TagMaskUtils.java#L115-L146 |
10,136 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesXmlAccess.java | RulesXmlAccess.validate | public void validate() {
Validator validator = this.schema.newValidator();
InputStream in = null;
try {
if(this.xmlFile != null) {
in = this.xmlFile.openStream();
} else {
// TODO: check if we need to specify the encoding
in = new ByteArrayInputStream(this.serializedRule.... | java | public void validate() {
Validator validator = this.schema.newValidator();
InputStream in = null;
try {
if(this.xmlFile != null) {
in = this.xmlFile.openStream();
} else {
// TODO: check if we need to specify the encoding
in = new ByteArrayInputStream(this.serializedRule.... | [
"public",
"void",
"validate",
"(",
")",
"{",
"Validator",
"validator",
"=",
"this",
".",
"schema",
".",
"newValidator",
"(",
")",
";",
"InputStream",
"in",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"this",
".",
"xmlFile",
"!=",
"null",
")",
"{",
"in",... | Checks the xml against the xsd. | [
"Checks",
"the",
"xml",
"against",
"the",
"xsd",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesXmlAccess.java#L111-L134 |
10,137 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesXmlAccess.java | RulesXmlAccess.getRule | public Rule getRule(int id) {
Rule returnRule = null;
for (Rule rule : this.getRules().getRule()) {
if (rule.getId() == id) {
returnRule = rule;
break;
}
}
return returnRule;
} | java | public Rule getRule(int id) {
Rule returnRule = null;
for (Rule rule : this.getRules().getRule()) {
if (rule.getId() == id) {
returnRule = rule;
break;
}
}
return returnRule;
} | [
"public",
"Rule",
"getRule",
"(",
"int",
"id",
")",
"{",
"Rule",
"returnRule",
"=",
"null",
";",
"for",
"(",
"Rule",
"rule",
":",
"this",
".",
"getRules",
"(",
")",
".",
"getRule",
"(",
")",
")",
"{",
"if",
"(",
"rule",
".",
"getId",
"(",
")",
... | Gets a rule by its id.
@param id
the id of the rule
@param rereadRules
states if the rules must be read from the file or to reuse the
in-memory representation, if it already exists
@return the rule | [
"Gets",
"a",
"rule",
"by",
"its",
"id",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesXmlAccess.java#L146-L155 |
10,138 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/DialogBuilder.java | DialogBuilder.addTextField | public XTextComponent addTextField(String content, String name, int x,
int y, int width, int height) throws Exception {
Object labelModel = multiServiceFactory.createInstance("com.sun.star.awt.UnoControlEditModel");
XPropertySet textFieldProperties = (XPropertySet) UnoRuntime.queryInterface(... | java | public XTextComponent addTextField(String content, String name, int x,
int y, int width, int height) throws Exception {
Object labelModel = multiServiceFactory.createInstance("com.sun.star.awt.UnoControlEditModel");
XPropertySet textFieldProperties = (XPropertySet) UnoRuntime.queryInterface(... | [
"public",
"XTextComponent",
"addTextField",
"(",
"String",
"content",
",",
"String",
"name",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"width",
",",
"int",
"height",
")",
"throws",
"Exception",
"{",
"Object",
"labelModel",
"=",
"multiServiceFactory",
"."... | Create a single line textfield with the given content.
@param content
@param name
@param x
@param y
@param width
@param height
@return
@throws Exception | [
"Create",
"a",
"single",
"line",
"textfield",
"with",
"the",
"given",
"content",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/DialogBuilder.java#L314-L337 |
10,139 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/DialogBuilder.java | DialogBuilder.addPasswordField | public XTextComponent addPasswordField(char[] password, String name, int x,
int y, int width, int height) throws Exception {
Object labelModel = multiServiceFactory.createInstance("com.sun.star.awt.UnoControlEditModel");
XPropertySet passwordFieldProperties = (XPropertySet) UnoRuntime.queryI... | java | public XTextComponent addPasswordField(char[] password, String name, int x,
int y, int width, int height) throws Exception {
Object labelModel = multiServiceFactory.createInstance("com.sun.star.awt.UnoControlEditModel");
XPropertySet passwordFieldProperties = (XPropertySet) UnoRuntime.queryI... | [
"public",
"XTextComponent",
"addPasswordField",
"(",
"char",
"[",
"]",
"password",
",",
"String",
"name",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"width",
",",
"int",
"height",
")",
"throws",
"Exception",
"{",
"Object",
"labelModel",
"=",
"multiServi... | Create a password field
@param password
, the content will be overriden after setting to the field
@param name
@param x
@param y
@param width
@param height
@return
@throws Exception | [
"Create",
"a",
"password",
"field"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/DialogBuilder.java#L430-L461 |
10,140 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/DialogBuilder.java | DialogBuilder.createUniqueName | public static String createUniqueName(XNameAccess _xElementContainer, String _sElementName) {
boolean bElementexists = true;
int i = 1;
String sIncSuffix = "";
String BaseName = _sElementName;
while (bElementexists) {
bElementexists = _xElementContainer.hasByName(_sEl... | java | public static String createUniqueName(XNameAccess _xElementContainer, String _sElementName) {
boolean bElementexists = true;
int i = 1;
String sIncSuffix = "";
String BaseName = _sElementName;
while (bElementexists) {
bElementexists = _xElementContainer.hasByName(_sEl... | [
"public",
"static",
"String",
"createUniqueName",
"(",
"XNameAccess",
"_xElementContainer",
",",
"String",
"_sElementName",
")",
"{",
"boolean",
"bElementexists",
"=",
"true",
";",
"int",
"i",
"=",
"1",
";",
"String",
"sIncSuffix",
"=",
"\"\"",
";",
"String",
... | makes a String unique by appending a numerical suffix
@param _xElementContainer the com.sun.star.container.XNameAccess container
that the new Element is going to be inserted to
@param _sElementName the StemName of the Element | [
"makes",
"a",
"String",
"unique",
"by",
"appending",
"a",
"numerical",
"suffix"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/DialogBuilder.java#L579-L592 |
10,141 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/verbs/VerbPlusPreps.java | VerbPlusPreps.findWord | public Prep findWord(String word) {
if (prepsMap.containsKey("*")) {
word = "*";
}
return prepsMap.get(word);
} | java | public Prep findWord(String word) {
if (prepsMap.containsKey("*")) {
word = "*";
}
return prepsMap.get(word);
} | [
"public",
"Prep",
"findWord",
"(",
"String",
"word",
")",
"{",
"if",
"(",
"prepsMap",
".",
"containsKey",
"(",
"\"*\"",
")",
")",
"{",
"word",
"=",
"\"*\"",
";",
"}",
"return",
"prepsMap",
".",
"get",
"(",
"word",
")",
";",
"}"
] | that should be linking them, otherwise returns null | [
"that",
"should",
"be",
"linking",
"them",
"otherwise",
"returns",
"null"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/verbs/VerbPlusPreps.java#L42-L49 |
10,142 | cogroo/cogroo4 | cogroo-nlp/src/main/java/org/cogroo/tools/sentdetect/PortugueseSDContextGenerator.java | PortugueseSDContextGenerator.collectFeatures | protected void collectFeatures(String prefix, String suffix, String previous,
String next, char eosChar) {
buf.append("x=");
buf.append(prefix);
collectFeats.add(buf.toString());
buf.setLength(0);
if (!prefix.equals("")) {
collectFeats.add(Integer.toString(prefix.length()));
if (is... | java | protected void collectFeatures(String prefix, String suffix, String previous,
String next, char eosChar) {
buf.append("x=");
buf.append(prefix);
collectFeats.add(buf.toString());
buf.setLength(0);
if (!prefix.equals("")) {
collectFeats.add(Integer.toString(prefix.length()));
if (is... | [
"protected",
"void",
"collectFeatures",
"(",
"String",
"prefix",
",",
"String",
"suffix",
",",
"String",
"previous",
",",
"String",
"next",
",",
"char",
"eosChar",
")",
"{",
"buf",
".",
"append",
"(",
"\"x=\"",
")",
";",
"buf",
".",
"append",
"(",
"prefi... | Determines some of the features for the sentence detector and adds them to
list features.
@param prefix
String preceeding the eos character in the eos token.
@param suffix
String following the eos character in the eos token.
@param previous
Space delimited token preceeding token containing eos character.
@param next
S... | [
"Determines",
"some",
"of",
"the",
"features",
"for",
"the",
"sentence",
"detector",
"and",
"adds",
"them",
"to",
"list",
"features",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-nlp/src/main/java/org/cogroo/tools/sentdetect/PortugueseSDContextGenerator.java#L181-L241 |
10,143 | cogroo/cogroo4 | cogroo-nlp/src/main/java/org/cogroo/tools/sentdetect/PortugueseSDContextGenerator.java | PortugueseSDContextGenerator.previousSpaceIndex | private static final int previousSpaceIndex(CharSequence sb, int seek) {
seek--;
while (seek > 0 && !StringUtil.isWhitespace(sb.charAt(seek))) {
seek--;
}
if (seek > 0 && StringUtil.isWhitespace(sb.charAt(seek))) {
while (seek > 0 && StringUtil.isWhitespace(sb.charAt(seek - 1)))
seek... | java | private static final int previousSpaceIndex(CharSequence sb, int seek) {
seek--;
while (seek > 0 && !StringUtil.isWhitespace(sb.charAt(seek))) {
seek--;
}
if (seek > 0 && StringUtil.isWhitespace(sb.charAt(seek))) {
while (seek > 0 && StringUtil.isWhitespace(sb.charAt(seek - 1)))
seek... | [
"private",
"static",
"final",
"int",
"previousSpaceIndex",
"(",
"CharSequence",
"sb",
",",
"int",
"seek",
")",
"{",
"seek",
"--",
";",
"while",
"(",
"seek",
">",
"0",
"&&",
"!",
"StringUtil",
".",
"isWhitespace",
"(",
"sb",
".",
"charAt",
"(",
"seek",
... | Finds the index of the nearest space before a specified index which is not
itself preceded by a space.
@param sb
The string buffer which contains the text being examined.
@param seek
The index to begin searching from.
@return The index which contains the nearest space. | [
"Finds",
"the",
"index",
"of",
"the",
"nearest",
"space",
"before",
"a",
"specified",
"index",
"which",
"is",
"not",
"itself",
"preceded",
"by",
"a",
"space",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-nlp/src/main/java/org/cogroo/tools/sentdetect/PortugueseSDContextGenerator.java#L257-L268 |
10,144 | cogroo/cogroo4 | cogroo-nlp/src/main/java/org/cogroo/tools/sentdetect/PortugueseSDContextGenerator.java | PortugueseSDContextGenerator.addCharPreds | private void addCharPreds(String key, char c, List<String> preds) {
preds.add(key + "=" + c);
if (Character.isLetter(c)) {
preds.add(key + "_alpha");
if (Character.isUpperCase(c)) {
preds.add(key + "_caps");
}
} else if (Character.isDigit(c)) {
preds.add(key + "_num");
} ... | java | private void addCharPreds(String key, char c, List<String> preds) {
preds.add(key + "=" + c);
if (Character.isLetter(c)) {
preds.add(key + "_alpha");
if (Character.isUpperCase(c)) {
preds.add(key + "_caps");
}
} else if (Character.isDigit(c)) {
preds.add(key + "_num");
} ... | [
"private",
"void",
"addCharPreds",
"(",
"String",
"key",
",",
"char",
"c",
",",
"List",
"<",
"String",
">",
"preds",
")",
"{",
"preds",
".",
"add",
"(",
"key",
"+",
"\"=\"",
"+",
"c",
")",
";",
"if",
"(",
"Character",
".",
"isLetter",
"(",
"c",
"... | Helper function for getContext. | [
"Helper",
"function",
"for",
"getContext",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-nlp/src/main/java/org/cogroo/tools/sentdetect/PortugueseSDContextGenerator.java#L331-L355 |
10,145 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/checkers/SpaceChecker.java | SpaceChecker.getsSupposedAbbreviation | private boolean getsSupposedAbbreviation(String text, int position) {
int ini;
boolean end = false;
String word = text;
// Indicates where the position of the supposed abbreviation begins
for (ini = position; ini >= 0; ini--)
if (Character.isWhitespace(text.charAt(ini))
|| isOpenBracket(text.... | java | private boolean getsSupposedAbbreviation(String text, int position) {
int ini;
boolean end = false;
String word = text;
// Indicates where the position of the supposed abbreviation begins
for (ini = position; ini >= 0; ini--)
if (Character.isWhitespace(text.charAt(ini))
|| isOpenBracket(text.... | [
"private",
"boolean",
"getsSupposedAbbreviation",
"(",
"String",
"text",
",",
"int",
"position",
")",
"{",
"int",
"ini",
";",
"boolean",
"end",
"=",
"false",
";",
"String",
"word",
"=",
"text",
";",
"// Indicates where the position of the supposed abbreviation begins\... | Analyze a sentence and gets the word which contains the position of the
error in the parameter and tells if it is an initial or if the
abbreviation dictionary contains it or not.
@param text
the entire sentence to be analyzed
@param position
where in the sentence the supposed error was found
@return true if the error ... | [
"Analyze",
"a",
"sentence",
"and",
"gets",
"the",
"word",
"which",
"contains",
"the",
"position",
"of",
"the",
"error",
"in",
"the",
"parameter",
"and",
"tells",
"if",
"it",
"is",
"an",
"initial",
"or",
"if",
"the",
"abbreviation",
"dictionary",
"contains",
... | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/checkers/SpaceChecker.java#L286-L326 |
10,146 | DataArt/CalculationEngine | calculation-engine/engine-functions/src/main/java/com/dataart/spreadsheetanalytics/functions/poi/data/DefineFunction.java | DefineFunction.evaluate | @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
log.debug("In evaluate() of DEFINE function. Args = {}", Arrays.toString(args));
return new StringEval(DefineFunction.class.getAnnotation(CustomFunctionMeta.class).value());
} | java | @Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
log.debug("In evaluate() of DEFINE function. Args = {}", Arrays.toString(args));
return new StringEval(DefineFunction.class.getAnnotation(CustomFunctionMeta.class).value());
} | [
"@",
"Override",
"public",
"ValueEval",
"evaluate",
"(",
"ValueEval",
"[",
"]",
"args",
",",
"OperationEvaluationContext",
"ec",
")",
"{",
"log",
".",
"debug",
"(",
"\"In evaluate() of DEFINE function. Args = {}\"",
",",
"Arrays",
".",
"toString",
"(",
"args",
")"... | This function does nothing, since it should never be evaluated.
DEFINE function is a spreadsheet metadata and it cannot have a value. | [
"This",
"function",
"does",
"nothing",
"since",
"it",
"should",
"never",
"be",
"evaluated",
".",
"DEFINE",
"function",
"is",
"a",
"spreadsheet",
"metadata",
"and",
"it",
"cannot",
"have",
"a",
"value",
"."
] | 34ce1d9c1f9b57a502906b274311d28580b134e5 | https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-functions/src/main/java/com/dataart/spreadsheetanalytics/functions/poi/data/DefineFunction.java#L40-L45 |
10,147 | cogroo/cogroo4 | cogroo-eval/GramEval/src/main/java/cogroo/uima/XmiWriterCasConsumer.java | XmiWriterCasConsumer.writeXmi | private void writeXmi(CAS aCas, File name, String modelFileName)
throws IOException, SAXException {
FileOutputStream out = null;
try {
// write XMI
out = new FileOutputStream(name);
XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem());
XMLSerializer xmlSer = new XMLSe... | java | private void writeXmi(CAS aCas, File name, String modelFileName)
throws IOException, SAXException {
FileOutputStream out = null;
try {
// write XMI
out = new FileOutputStream(name);
XmiCasSerializer ser = new XmiCasSerializer(aCas.getTypeSystem());
XMLSerializer xmlSer = new XMLSe... | [
"private",
"void",
"writeXmi",
"(",
"CAS",
"aCas",
",",
"File",
"name",
",",
"String",
"modelFileName",
")",
"throws",
"IOException",
",",
"SAXException",
"{",
"FileOutputStream",
"out",
"=",
"null",
";",
"try",
"{",
"// write XMI",
"out",
"=",
"new",
"FileO... | Serialize a CAS to a file in XMI format
@param aCas
CAS to serialize
@param name
output file
@throws SAXException
@throws Exception
@throws ResourceProcessException | [
"Serialize",
"a",
"CAS",
"to",
"a",
"file",
"in",
"XMI",
"format"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/GramEval/src/main/java/cogroo/uima/XmiWriterCasConsumer.java#L147-L162 |
10,148 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GrammarError.java | GrammarError.getRuleId | public String getRuleId() {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_ruleId == null)
jcasType.jcas.throwFeatMissing("ruleId", "cogroo.uima.GrammarError");
return jcasType.ll_cas.ll_getStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_ruleId);
} | java | public String getRuleId() {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_ruleId == null)
jcasType.jcas.throwFeatMissing("ruleId", "cogroo.uima.GrammarError");
return jcasType.ll_cas.ll_getStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_ruleId);
} | [
"public",
"String",
"getRuleId",
"(",
")",
"{",
"if",
"(",
"GrammarError_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GrammarError_Type",
")",
"jcasType",
")",
".",
"casFeat_ruleId",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing",
"(",
"\"r... | getter for ruleId - gets
@generated | [
"getter",
"for",
"ruleId",
"-",
"gets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GrammarError.java#L99-L105 |
10,149 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GrammarError.java | GrammarError.setRuleId | public void setRuleId(String v) {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_ruleId == null)
jcasType.jcas.throwFeatMissing("ruleId", "cogroo.uima.GrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_ruleId, v);
... | java | public void setRuleId(String v) {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_ruleId == null)
jcasType.jcas.throwFeatMissing("ruleId", "cogroo.uima.GrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_ruleId, v);
... | [
"public",
"void",
"setRuleId",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"GrammarError_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GrammarError_Type",
")",
"jcasType",
")",
".",
"casFeat_ruleId",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissin... | setter for ruleId - sets
@generated | [
"setter",
"for",
"ruleId",
"-",
"sets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GrammarError.java#L112-L118 |
10,150 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GrammarError.java | GrammarError.setError | public void setError(String v) {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_error == null)
jcasType.jcas.throwFeatMissing("error", "cogroo.uima.GrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_error, v);
} | java | public void setError(String v) {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_error == null)
jcasType.jcas.throwFeatMissing("error", "cogroo.uima.GrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_error, v);
} | [
"public",
"void",
"setError",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"GrammarError_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GrammarError_Type",
")",
"jcasType",
")",
".",
"casFeat_error",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing"... | setter for error - sets
@generated | [
"setter",
"for",
"error",
"-",
"sets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GrammarError.java#L170-L176 |
10,151 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GrammarError.java | GrammarError.getReplace | public String getReplace() {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_replace == null)
jcasType.jcas.throwFeatMissing("replace", "cogroo.uima.GrammarError");
return jcasType.ll_cas.ll_getStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_replace);... | java | public String getReplace() {
if (GrammarError_Type.featOkTst
&& ((GrammarError_Type) jcasType).casFeat_replace == null)
jcasType.jcas.throwFeatMissing("replace", "cogroo.uima.GrammarError");
return jcasType.ll_cas.ll_getStringValue(addr,
((GrammarError_Type) jcasType).casFeatCode_replace);... | [
"public",
"String",
"getReplace",
"(",
")",
"{",
"if",
"(",
"GrammarError_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GrammarError_Type",
")",
"jcasType",
")",
".",
"casFeat_replace",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing",
"(",
"\... | getter for replace - gets
@generated | [
"getter",
"for",
"replace",
"-",
"gets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GrammarError.java#L186-L192 |
10,152 | DataArt/CalculationEngine | calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/PoiExecutionGraphBuilder.java | PoiExecutionGraphBuilder.createVertex | @Override
public ExecutionGraphVertex createVertex(String address) {
// create new vertex object
ExecutionGraphVertex v = ExecutionGraph.createVertex(removeSymbol(address, '$'));
// add vertex to actual graph
this.graph.addVertex(v);
// put new vertex to set of vert... | java | @Override
public ExecutionGraphVertex createVertex(String address) {
// create new vertex object
ExecutionGraphVertex v = ExecutionGraph.createVertex(removeSymbol(address, '$'));
// add vertex to actual graph
this.graph.addVertex(v);
// put new vertex to set of vert... | [
"@",
"Override",
"public",
"ExecutionGraphVertex",
"createVertex",
"(",
"String",
"address",
")",
"{",
"// create new vertex object\r",
"ExecutionGraphVertex",
"v",
"=",
"ExecutionGraph",
".",
"createVertex",
"(",
"removeSymbol",
"(",
"address",
",",
"'",
"'",
")",
... | This method should be used when creating a new vertex from a cell, so
vertex name is a cell's address. New Vertex will be created any time this
method is invoked. New vertex will be stored in address-to-set-of-vertices map. | [
"This",
"method",
"should",
"be",
"used",
"when",
"creating",
"a",
"new",
"vertex",
"from",
"a",
"cell",
"so",
"vertex",
"name",
"is",
"a",
"cell",
"s",
"address",
".",
"New",
"Vertex",
"will",
"be",
"created",
"any",
"time",
"this",
"method",
"is",
"i... | 34ce1d9c1f9b57a502906b274311d28580b134e5 | https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/PoiExecutionGraphBuilder.java#L94-L109 |
10,153 | DataArt/CalculationEngine | calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/PoiExecutionGraphBuilder.java | PoiExecutionGraphBuilder.runPostProcessing | public void runPostProcessing(boolean multiRoot) {
// make identical vertices have the same set of properties
// two vertices are identical if they have the same address value.
// Id for every vertex is unique, so this is not a flag here
for (Set<ExecutionGraphVertex> vs : this.addre... | java | public void runPostProcessing(boolean multiRoot) {
// make identical vertices have the same set of properties
// two vertices are identical if they have the same address value.
// Id for every vertex is unique, so this is not a flag here
for (Set<ExecutionGraphVertex> vs : this.addre... | [
"public",
"void",
"runPostProcessing",
"(",
"boolean",
"multiRoot",
")",
"{",
"// make identical vertices have the same set of properties\r",
"// two vertices are identical if they have the same address value.\r",
"// Id for every vertex is unique, so this is not a flag here\r",
"for",
"(",
... | Do anything you want here. After graph is completed and we are out of POI
context you can add\remove\etc any information you want. | [
"Do",
"anything",
"you",
"want",
"here",
".",
"After",
"graph",
"is",
"completed",
"and",
"we",
"are",
"out",
"of",
"POI",
"context",
"you",
"can",
"add",
"\\",
"remove",
"\\",
"etc",
"any",
"information",
"you",
"want",
"."
] | 34ce1d9c1f9b57a502906b274311d28580b134e5 | https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/PoiExecutionGraphBuilder.java#L187-L253 |
10,154 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenGrammarError.java | GoldenGrammarError.getCategory | public String getCategory() {
if (GoldenGrammarError_Type.featOkTst
&& ((GoldenGrammarError_Type) jcasType).casFeat_category == null)
jcasType.jcas.throwFeatMissing("category",
"cogroo.uima.GoldenGrammarError");
return jcasType.ll_cas.ll_getStringValue(addr,
((GoldenGrammarError_... | java | public String getCategory() {
if (GoldenGrammarError_Type.featOkTst
&& ((GoldenGrammarError_Type) jcasType).casFeat_category == null)
jcasType.jcas.throwFeatMissing("category",
"cogroo.uima.GoldenGrammarError");
return jcasType.ll_cas.ll_getStringValue(addr,
((GoldenGrammarError_... | [
"public",
"String",
"getCategory",
"(",
")",
"{",
"if",
"(",
"GoldenGrammarError_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GoldenGrammarError_Type",
")",
"jcasType",
")",
".",
"casFeat_category",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing... | getter for category - gets
@generated | [
"getter",
"for",
"category",
"-",
"gets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenGrammarError.java#L99-L106 |
10,155 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenGrammarError.java | GoldenGrammarError.setCategory | public void setCategory(String v) {
if (GoldenGrammarError_Type.featOkTst
&& ((GoldenGrammarError_Type) jcasType).casFeat_category == null)
jcasType.jcas.throwFeatMissing("category",
"cogroo.uima.GoldenGrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GoldenGrammarError_T... | java | public void setCategory(String v) {
if (GoldenGrammarError_Type.featOkTst
&& ((GoldenGrammarError_Type) jcasType).casFeat_category == null)
jcasType.jcas.throwFeatMissing("category",
"cogroo.uima.GoldenGrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GoldenGrammarError_T... | [
"public",
"void",
"setCategory",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"GoldenGrammarError_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GoldenGrammarError_Type",
")",
"jcasType",
")",
".",
"casFeat_category",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
... | setter for category - sets
@generated | [
"setter",
"for",
"category",
"-",
"sets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenGrammarError.java#L113-L120 |
10,156 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenGrammarError.java | GoldenGrammarError.getError | public String getError() {
if (GoldenGrammarError_Type.featOkTst
&& ((GoldenGrammarError_Type) jcasType).casFeat_error == null)
jcasType.jcas.throwFeatMissing("error", "cogroo.uima.GoldenGrammarError");
return jcasType.ll_cas.ll_getStringValue(addr,
((GoldenGrammarError_Type) jcasType).cas... | java | public String getError() {
if (GoldenGrammarError_Type.featOkTst
&& ((GoldenGrammarError_Type) jcasType).casFeat_error == null)
jcasType.jcas.throwFeatMissing("error", "cogroo.uima.GoldenGrammarError");
return jcasType.ll_cas.ll_getStringValue(addr,
((GoldenGrammarError_Type) jcasType).cas... | [
"public",
"String",
"getError",
"(",
")",
"{",
"if",
"(",
"GoldenGrammarError_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GoldenGrammarError_Type",
")",
"jcasType",
")",
".",
"casFeat_error",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing",
"... | getter for error - gets
@generated | [
"getter",
"for",
"error",
"-",
"gets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenGrammarError.java#L130-L136 |
10,157 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenGrammarError.java | GoldenGrammarError.setReplace | public void setReplace(String v) {
if (GoldenGrammarError_Type.featOkTst
&& ((GoldenGrammarError_Type) jcasType).casFeat_replace == null)
jcasType.jcas.throwFeatMissing("replace",
"cogroo.uima.GoldenGrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GoldenGrammarError_Type... | java | public void setReplace(String v) {
if (GoldenGrammarError_Type.featOkTst
&& ((GoldenGrammarError_Type) jcasType).casFeat_replace == null)
jcasType.jcas.throwFeatMissing("replace",
"cogroo.uima.GoldenGrammarError");
jcasType.ll_cas.ll_setStringValue(addr,
((GoldenGrammarError_Type... | [
"public",
"void",
"setReplace",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"GoldenGrammarError_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GoldenGrammarError_Type",
")",
"jcasType",
")",
".",
"casFeat_replace",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"t... | setter for replace - sets
@generated | [
"setter",
"for",
"replace",
"-",
"sets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenGrammarError.java#L173-L180 |
10,158 | DataArt/CalculationEngine | calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/CellFormulaExpression.java | CellFormulaExpression.copyOf | public static CellFormulaExpression copyOf(CellFormulaExpression formula) {
if (formula == null) { return null; }
CellFormulaExpression copy = new CellFormulaExpression();
copy.formulaStr = formula.formulaStr().intern();
copy.formulaValues = formula.formulaValues().intern();
... | java | public static CellFormulaExpression copyOf(CellFormulaExpression formula) {
if (formula == null) { return null; }
CellFormulaExpression copy = new CellFormulaExpression();
copy.formulaStr = formula.formulaStr().intern();
copy.formulaValues = formula.formulaValues().intern();
... | [
"public",
"static",
"CellFormulaExpression",
"copyOf",
"(",
"CellFormulaExpression",
"formula",
")",
"{",
"if",
"(",
"formula",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"CellFormulaExpression",
"copy",
"=",
"new",
"CellFormulaExpression",
"(",
")",
";... | Does copy of provided instance. | [
"Does",
"copy",
"of",
"provided",
"instance",
"."
] | 34ce1d9c1f9b57a502906b274311d28580b134e5 | https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/CellFormulaExpression.java#L74-L88 |
10,159 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.initialize | public void initialize(String selectedText) {
LOG.finest(">>> initialize");
try {
this.theCommunityLogic = new CommunityLogic(m_xContext, selectedText);
// set properties of the dialog
String[] propNames = new String[] {
"Height", // 0
... | java | public void initialize(String selectedText) {
LOG.finest(">>> initialize");
try {
this.theCommunityLogic = new CommunityLogic(m_xContext, selectedText);
// set properties of the dialog
String[] propNames = new String[] {
"Height", // 0
... | [
"public",
"void",
"initialize",
"(",
"String",
"selectedText",
")",
"{",
"LOG",
".",
"finest",
"(",
"\">>> initialize\"",
")",
";",
"try",
"{",
"this",
".",
"theCommunityLogic",
"=",
"new",
"CommunityLogic",
"(",
"m_xContext",
",",
"selectedText",
")",
";",
... | Initializes the dialog with a selected text. The selected text can't be
enpty or null.
@param selectedText the selected text | [
"Initializes",
"the",
"dialog",
"with",
"a",
"selected",
"text",
".",
"The",
"selected",
"text",
"can",
"t",
"be",
"enpty",
"or",
"null",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L161-L216 |
10,160 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.populateStep1 | private void populateStep1() {
this.insertRoadmapItem(0, true, I18nLabelsLoader.REPORT_STEP_LOGIN, 1);
int y = 6;
this.insertFixedTextBold(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_LOGIN, I18nLabelsLoader.REPORT_STEP_LOGIN);
y += 12; // plus one line
this.insertMultilineF... | java | private void populateStep1() {
this.insertRoadmapItem(0, true, I18nLabelsLoader.REPORT_STEP_LOGIN, 1);
int y = 6;
this.insertFixedTextBold(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_LOGIN, I18nLabelsLoader.REPORT_STEP_LOGIN);
y += 12; // plus one line
this.insertMultilineF... | [
"private",
"void",
"populateStep1",
"(",
")",
"{",
"this",
".",
"insertRoadmapItem",
"(",
"0",
",",
"true",
",",
"I18nLabelsLoader",
".",
"REPORT_STEP_LOGIN",
",",
"1",
")",
";",
"int",
"y",
"=",
"6",
";",
"this",
".",
"insertFixedTextBold",
"(",
"this",
... | Populate the step one, that we put loggin stuf | [
"Populate",
"the",
"step",
"one",
"that",
"we",
"put",
"loggin",
"stuf"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L228-L262 |
10,161 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.populateStep2 | private void populateStep2() {
this.insertRoadmapItem(1, true, I18nLabelsLoader.REPORT_STEP_FALSE_ERRORS, 2);
// Bad intervention
int y = 6;
this.insertFixedTextBold(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_FALSE_ERRORS, I18nLabelsLoader.REPORT_STEP_FALSE_ERRORS);
y += 1... | java | private void populateStep2() {
this.insertRoadmapItem(1, true, I18nLabelsLoader.REPORT_STEP_FALSE_ERRORS, 2);
// Bad intervention
int y = 6;
this.insertFixedTextBold(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_FALSE_ERRORS, I18nLabelsLoader.REPORT_STEP_FALSE_ERRORS);
y += 1... | [
"private",
"void",
"populateStep2",
"(",
")",
"{",
"this",
".",
"insertRoadmapItem",
"(",
"1",
",",
"true",
",",
"I18nLabelsLoader",
".",
"REPORT_STEP_FALSE_ERRORS",
",",
"2",
")",
";",
"// Bad intervention",
"int",
"y",
"=",
"6",
";",
"this",
".",
"insertFi... | Populate with omissions | [
"Populate",
"with",
"omissions"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L267-L320 |
10,162 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.populateStep4 | private void populateStep4() {
this.insertRoadmapItem(3, true, I18nLabelsLoader.REPORT_STEP_THANKS, 4);
int y = 6;
// thanks
this.insertFixedTextBold(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_THANKS, I18nLabelsLoader.REPORT_STEP_THANKS);
y += 12; // plus one line
... | java | private void populateStep4() {
this.insertRoadmapItem(3, true, I18nLabelsLoader.REPORT_STEP_THANKS, 4);
int y = 6;
// thanks
this.insertFixedTextBold(this, DEFAULT_PosX, y, DEFAULT_WIDTH_LARGE, STEP_THANKS, I18nLabelsLoader.REPORT_STEP_THANKS);
y += 12; // plus one line
... | [
"private",
"void",
"populateStep4",
"(",
")",
"{",
"this",
".",
"insertRoadmapItem",
"(",
"3",
",",
"true",
",",
"I18nLabelsLoader",
".",
"REPORT_STEP_THANKS",
",",
"4",
")",
";",
"int",
"y",
"=",
"6",
";",
"// thanks",
"this",
".",
"insertFixedTextBold",
... | Populate with thanks | [
"Populate",
"with",
"thanks"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L383-L405 |
10,163 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.setCurrentStep | private void setCurrentStep(int nNewID) {
try {
XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel);
int nOldStep = getCurrentStep();
// in the following line "ID" and "Step" are mixed together.
//... | java | private void setCurrentStep(int nNewID) {
try {
XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel);
int nOldStep = getCurrentStep();
// in the following line "ID" and "Step" are mixed together.
//... | [
"private",
"void",
"setCurrentStep",
"(",
"int",
"nNewID",
")",
"{",
"try",
"{",
"XPropertySet",
"xDialogModelPropertySet",
"=",
"(",
"XPropertySet",
")",
"UnoRuntime",
".",
"queryInterface",
"(",
"XPropertySet",
".",
"class",
",",
"m_xMSFDialogModel",
")",
";",
... | Moves to another step
@param nNewID the step to move to. | [
"Moves",
"to",
"another",
"step"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L491-L503 |
10,164 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.getCurrentStep | private int getCurrentStep() {
int step = -1;
try {
XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel);
step = ((Integer) xDialogModelPropertySet.getPropertyValue("Step")).intValue();
} catch (com.sun.sta... | java | private int getCurrentStep() {
int step = -1;
try {
XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel);
step = ((Integer) xDialogModelPropertySet.getPropertyValue("Step")).intValue();
} catch (com.sun.sta... | [
"private",
"int",
"getCurrentStep",
"(",
")",
"{",
"int",
"step",
"=",
"-",
"1",
";",
"try",
"{",
"XPropertySet",
"xDialogModelPropertySet",
"=",
"(",
"XPropertySet",
")",
"UnoRuntime",
".",
"queryInterface",
"(",
"XPropertySet",
".",
"class",
",",
"m_xMSFDial... | Get the current step | [
"Get",
"the",
"current",
"step"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L508-L517 |
10,165 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.setIsStepEnabled | private void setIsStepEnabled(int step, boolean isEnabled) {
try {
Object oRoadmapItem = m_xRMIndexCont.getByIndex(step - 1);
XPropertySet xRMItemPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmapItem);
xRMItemPSet.setPropertyValue("Enabled", new Boo... | java | private void setIsStepEnabled(int step, boolean isEnabled) {
try {
Object oRoadmapItem = m_xRMIndexCont.getByIndex(step - 1);
XPropertySet xRMItemPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmapItem);
xRMItemPSet.setPropertyValue("Enabled", new Boo... | [
"private",
"void",
"setIsStepEnabled",
"(",
"int",
"step",
",",
"boolean",
"isEnabled",
")",
"{",
"try",
"{",
"Object",
"oRoadmapItem",
"=",
"m_xRMIndexCont",
".",
"getByIndex",
"(",
"step",
"-",
"1",
")",
";",
"XPropertySet",
"xRMItemPSet",
"=",
"(",
"XProp... | Configure the steps that are enabled.
@param step step to configure
@param isEnabled if it is enabled | [
"Configure",
"the",
"steps",
"that",
"are",
"enabled",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L524-L533 |
10,166 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.isStepEnabled | private boolean isStepEnabled(int step) {
if(step < 0) {
return false;
}
boolean isStepEnabled = false;
try {
Object oRoadmapItem = m_xRMIndexCont.getByIndex(step - 1);
XPropertySet xRMItemPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.cl... | java | private boolean isStepEnabled(int step) {
if(step < 0) {
return false;
}
boolean isStepEnabled = false;
try {
Object oRoadmapItem = m_xRMIndexCont.getByIndex(step - 1);
XPropertySet xRMItemPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.cl... | [
"private",
"boolean",
"isStepEnabled",
"(",
"int",
"step",
")",
"{",
"if",
"(",
"step",
"<",
"0",
")",
"{",
"return",
"false",
";",
"}",
"boolean",
"isStepEnabled",
"=",
"false",
";",
"try",
"{",
"Object",
"oRoadmapItem",
"=",
"m_xRMIndexCont",
".",
"get... | Checks if step is enabled.
@param step step to check
@return if the step is enabled | [
"Checks",
"if",
"step",
"is",
"enabled",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L540-L554 |
10,167 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.setEnabledSteps | private void setEnabledSteps() {
// gets the important data
boolean isAuth = isAuthenticated();
boolean hasFalseErrors = badIntListBox.getItemCount() > 0;
int currentStep = getCurrentStep();
boolean login = true;
boolean falseErrors = false;
boolean omissions = ... | java | private void setEnabledSteps() {
// gets the important data
boolean isAuth = isAuthenticated();
boolean hasFalseErrors = badIntListBox.getItemCount() > 0;
int currentStep = getCurrentStep();
boolean login = true;
boolean falseErrors = false;
boolean omissions = ... | [
"private",
"void",
"setEnabledSteps",
"(",
")",
"{",
"// gets the important data",
"boolean",
"isAuth",
"=",
"isAuthenticated",
"(",
")",
";",
"boolean",
"hasFalseErrors",
"=",
"badIntListBox",
".",
"getItemCount",
"(",
")",
">",
"0",
";",
"int",
"currentStep",
... | Sets the enabled steps acording to the current state | [
"Sets",
"the",
"enabled",
"steps",
"acording",
"to",
"the",
"current",
"state"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L559-L591 |
10,168 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.getNextStep | private int getNextStep(int currentStep) {
int nextStep = -1;
// we find the next available step.
for (int i = currentStep + 1; i <= STEP_THANKS; i++) {
if(isStepEnabled(i)) {
nextStep = i;
break;
}
}
return nextSt... | java | private int getNextStep(int currentStep) {
int nextStep = -1;
// we find the next available step.
for (int i = currentStep + 1; i <= STEP_THANKS; i++) {
if(isStepEnabled(i)) {
nextStep = i;
break;
}
}
return nextSt... | [
"private",
"int",
"getNextStep",
"(",
"int",
"currentStep",
")",
"{",
"int",
"nextStep",
"=",
"-",
"1",
";",
"// we find the next available step.",
"for",
"(",
"int",
"i",
"=",
"currentStep",
"+",
"1",
";",
"i",
"<=",
"STEP_THANKS",
";",
"i",
"++",
")",
... | Get the next step given the current. Will check available steps to confirm.
@param currentStep
@return | [
"Get",
"the",
"next",
"step",
"given",
"the",
"current",
".",
"Will",
"check",
"available",
"steps",
"to",
"confirm",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L637-L649 |
10,169 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java | ErrorReportDialog.getPreviousStep | private int getPreviousStep(int currentStep) {
int prevStep = -1;
// we find the next available step.
for (int i = currentStep - 1; i >= STEP_LOGIN; i--) {
if(isStepEnabled(i)) {
prevStep = i;
break;
}
}
return prevStep;
... | java | private int getPreviousStep(int currentStep) {
int prevStep = -1;
// we find the next available step.
for (int i = currentStep - 1; i >= STEP_LOGIN; i--) {
if(isStepEnabled(i)) {
prevStep = i;
break;
}
}
return prevStep;
... | [
"private",
"int",
"getPreviousStep",
"(",
"int",
"currentStep",
")",
"{",
"int",
"prevStep",
"=",
"-",
"1",
";",
"// we find the next available step.",
"for",
"(",
"int",
"i",
"=",
"currentStep",
"-",
"1",
";",
"i",
">=",
"STEP_LOGIN",
";",
"i",
"--",
")",... | Get the previous step given the current. Will check available steps to confirm.
@param currentStep
@return | [
"Get",
"the",
"previous",
"step",
"given",
"the",
"current",
".",
"Will",
"check",
"available",
"steps",
"to",
"confirm",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/ErrorReportDialog.java#L656-L668 |
10,170 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesTreesBuilder.java | RulesTreesBuilder.printRulesTree | public void printRulesTree(State rootState) {
List<State> nextStates = rootState.getNextStates();
if (nextStates.isEmpty()) {
return;
}
for (int i = 0; i < rootState.getNextStates().size(); i++) {
State currState = nextStates.get(i);
String accept = "";
if (currState instanceof AcceptState) ... | java | public void printRulesTree(State rootState) {
List<State> nextStates = rootState.getNextStates();
if (nextStates.isEmpty()) {
return;
}
for (int i = 0; i < rootState.getNextStates().size(); i++) {
State currState = nextStates.get(i);
String accept = "";
if (currState instanceof AcceptState) ... | [
"public",
"void",
"printRulesTree",
"(",
"State",
"rootState",
")",
"{",
"List",
"<",
"State",
">",
"nextStates",
"=",
"rootState",
".",
"getNextStates",
"(",
")",
";",
"if",
"(",
"nextStates",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"f... | Prints the contents of a rules tree.
@param rootState
the top state of the rules DFA | [
"Prints",
"the",
"contents",
"of",
"a",
"rules",
"tree",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesTreesBuilder.java#L188-L202 |
10,171 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/RuleUtils.java | RuleUtils.getElementAsString | public static String getElementAsString(Element element) {
StringBuilder sb = new StringBuilder();
if (element.isNegated() != null && element.isNegated().booleanValue()) {
sb.append("~");
}
int masks = element.getMask().size();
if (masks > 1) {
sb.append("(");
}
int maskCounter = 0;
for (Mask m... | java | public static String getElementAsString(Element element) {
StringBuilder sb = new StringBuilder();
if (element.isNegated() != null && element.isNegated().booleanValue()) {
sb.append("~");
}
int masks = element.getMask().size();
if (masks > 1) {
sb.append("(");
}
int maskCounter = 0;
for (Mask m... | [
"public",
"static",
"String",
"getElementAsString",
"(",
"Element",
"element",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"element",
".",
"isNegated",
"(",
")",
"!=",
"null",
"&&",
"element",
".",
"isNegated",
"... | Gets the string representation of an element.
@param element
the element to be planified to a string
@return the element as a string | [
"Gets",
"the",
"string",
"representation",
"of",
"an",
"element",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/util/RuleUtils.java#L136-L172 |
10,172 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/checkers/GovernmentChecker.java | GovernmentChecker.findNouns | public List<Token> findNouns(Sentence sentence) {
List<Token> nouns = new ArrayList<Token>();
List<SyntacticChunk> syntChunks = sentence.getSyntacticChunks();
for (int i = 0; i < syntChunks.size(); i++) {
String tag = syntChunks.get(i).getTag();
if (tag.equals("PIV") || tag.equals("ACC") || t... | java | public List<Token> findNouns(Sentence sentence) {
List<Token> nouns = new ArrayList<Token>();
List<SyntacticChunk> syntChunks = sentence.getSyntacticChunks();
for (int i = 0; i < syntChunks.size(); i++) {
String tag = syntChunks.get(i).getTag();
if (tag.equals("PIV") || tag.equals("ACC") || t... | [
"public",
"List",
"<",
"Token",
">",
"findNouns",
"(",
"Sentence",
"sentence",
")",
"{",
"List",
"<",
"Token",
">",
"nouns",
"=",
"new",
"ArrayList",
"<",
"Token",
">",
"(",
")",
";",
"List",
"<",
"SyntacticChunk",
">",
"syntChunks",
"=",
"sentence",
"... | Looks for a noun in the sentence's objects.
@param sentence
entered by the user
@return a <tt>List></tt> of every noun found in the sentence's objects and
its location in the sentence | [
"Looks",
"for",
"a",
"noun",
"in",
"the",
"sentence",
"s",
"objects",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/checkers/GovernmentChecker.java#L136-L156 |
10,173 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/checkers/GovernmentChecker.java | GovernmentChecker.findVerb | public Token findVerb(Sentence sentence) {
List<SyntacticChunk> syntChunks = sentence.getSyntacticChunks();
for (int i = 0; i < syntChunks.size(); i++) {
String tag = syntChunks.get(i).getTag();
if (tag.equals("P") || tag.equals("MV") || tag.equals("PMV")
|| tag.equals("AUX") || tag.equa... | java | public Token findVerb(Sentence sentence) {
List<SyntacticChunk> syntChunks = sentence.getSyntacticChunks();
for (int i = 0; i < syntChunks.size(); i++) {
String tag = syntChunks.get(i).getTag();
if (tag.equals("P") || tag.equals("MV") || tag.equals("PMV")
|| tag.equals("AUX") || tag.equa... | [
"public",
"Token",
"findVerb",
"(",
"Sentence",
"sentence",
")",
"{",
"List",
"<",
"SyntacticChunk",
">",
"syntChunks",
"=",
"sentence",
".",
"getSyntacticChunks",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"syntChunks",
".",
"size",... | Looks in a sentence for a verb.
@param sentence
entered by the user
@return the <tt>Token</tt> which contains the searched verb, in case none
was found returns <tt>null</tt> | [
"Looks",
"in",
"a",
"sentence",
"for",
"a",
"verb",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/checkers/GovernmentChecker.java#L166-L178 |
10,174 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesApplier.java | RulesApplier.check | public List<Mistake> check(Sentence sentence) {
long start = 0;
if(LOGGER.isDebugEnabled()) {
start = System.nanoTime();
}
insertOutOfBounds(sentence);
// mistakes will hold mistakes found in the sentence.
List<Mistake> mistakes = new ArrayList<Mistake>();
// rules will hold... | java | public List<Mistake> check(Sentence sentence) {
long start = 0;
if(LOGGER.isDebugEnabled()) {
start = System.nanoTime();
}
insertOutOfBounds(sentence);
// mistakes will hold mistakes found in the sentence.
List<Mistake> mistakes = new ArrayList<Mistake>();
// rules will hold... | [
"public",
"List",
"<",
"Mistake",
">",
"check",
"(",
"Sentence",
"sentence",
")",
"{",
"long",
"start",
"=",
"0",
";",
"if",
"(",
"LOGGER",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"start",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
"}",
"ins... | Applies all active rules described in Rules.xml given a sentence properly tokenized, tagged, chunked
and shallow parsed.
@param sentence
a tokenized, tagged, chunked and shallow parsed sentence.
@param dictionary
a word and tag dictionary
@return a list containing all the mistakes found in the sentence. Each mistake c... | [
"Applies",
"all",
"active",
"rules",
"described",
"in",
"Rules",
".",
"xml",
"given",
"a",
"sentence",
"properly",
"tokenized",
"tagged",
"chunked",
"and",
"shallow",
"parsed",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesApplier.java#L97-L158 |
10,175 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesApplier.java | RulesApplier.getMistakes | private List<Mistake> getMistakes(List<Mistake> mistakes, List<State> currentStates, List<SyntacticChunk> syntacticChunks, int baseChunkIndex, int currentChunkIndex, ArrayList<SyntacticChunk> matched, Sentence sentence) {
for (State state : currentStates) {
PatternElement pattern... | java | private List<Mistake> getMistakes(List<Mistake> mistakes, List<State> currentStates, List<SyntacticChunk> syntacticChunks, int baseChunkIndex, int currentChunkIndex, ArrayList<SyntacticChunk> matched, Sentence sentence) {
for (State state : currentStates) {
PatternElement pattern... | [
"private",
"List",
"<",
"Mistake",
">",
"getMistakes",
"(",
"List",
"<",
"Mistake",
">",
"mistakes",
",",
"List",
"<",
"State",
">",
"currentStates",
",",
"List",
"<",
"SyntacticChunk",
">",
"syntacticChunks",
",",
"int",
"baseChunkIndex",
",",
"int",
"curre... | A recursive method that iterates the sentence given a base chunk. Used to match subject-verb rules.
@param mistakes
a list of mistakes found in the process of checking the sentence
@param currentStates
the applier will check if these states match the current token
@param syntacticChunks
an array of chunks
@param baseC... | [
"A",
"recursive",
"method",
"that",
"iterates",
"the",
"sentence",
"given",
"a",
"base",
"chunk",
".",
"Used",
"to",
"match",
"subject",
"-",
"verb",
"rules",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesApplier.java#L314-L359 |
10,176 | cogroo/cogroo4 | cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesApplier.java | RulesApplier.match | private boolean match(Token token, Element element, int baseTokenIndex, Sentence sentence) {
boolean match;
boolean negated;
// Sees if the mask must or not match.
// Negated is optional, so it can be null, true or false.
// If null, consider as false.
if (element.isNegated() == null) {
match = fa... | java | private boolean match(Token token, Element element, int baseTokenIndex, Sentence sentence) {
boolean match;
boolean negated;
// Sees if the mask must or not match.
// Negated is optional, so it can be null, true or false.
// If null, consider as false.
if (element.isNegated() == null) {
match = fa... | [
"private",
"boolean",
"match",
"(",
"Token",
"token",
",",
"Element",
"element",
",",
"int",
"baseTokenIndex",
",",
"Sentence",
"sentence",
")",
"{",
"boolean",
"match",
";",
"boolean",
"negated",
";",
"// Sees if the mask must or not match.\r",
"// Negated is optiona... | Determines if a token is matched by a rule element.
@param token the token to be matched by the element
@param element the element to be matched against the token
@return <code>true</code> if there's a match, <code>false</code> otherwise | [
"Determines",
"if",
"a",
"token",
"is",
"matched",
"by",
"a",
"rule",
"element",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/rules/applier/RulesApplier.java#L433-L477 |
10,177 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/WizardDialog.java | WizardDialog.createWindowPeer | public XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) throws com.sun.star.script.BasicErrorException{
try{
if (_xWindowParentPeer == null){
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer);
xWindow.setVisible(false);
... | java | public XWindowPeer createWindowPeer(XWindowPeer _xWindowParentPeer) throws com.sun.star.script.BasicErrorException{
try{
if (_xWindowParentPeer == null){
XWindow xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, m_xDlgContainer);
xWindow.setVisible(false);
... | [
"public",
"XWindowPeer",
"createWindowPeer",
"(",
"XWindowPeer",
"_xWindowParentPeer",
")",
"throws",
"com",
".",
"sun",
".",
"star",
".",
"script",
".",
"BasicErrorException",
"{",
"try",
"{",
"if",
"(",
"_xWindowParentPeer",
"==",
"null",
")",
"{",
"XWindow",
... | create a peer for this
dialog, using the given
peer as a parent.
@param parentPeer
@return
@throws java.lang.Exception | [
"create",
"a",
"peer",
"for",
"this",
"dialog",
"using",
"the",
"given",
"peer",
"as",
"a",
"parent",
"."
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/WizardDialog.java#L198-L214 |
10,178 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/WizardDialog.java | WizardDialog.getWindowPeer | public XWindowPeer getWindowPeer(XTextDocument _xTextDocument){
XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, _xTextDocument);
XFrame xFrame = xModel.getCurrentController().getFrame();
XWindow xWindow = xFrame.getContainerWindow();
XWindowPeer xWindowPeer = (XWindowP... | java | public XWindowPeer getWindowPeer(XTextDocument _xTextDocument){
XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, _xTextDocument);
XFrame xFrame = xModel.getCurrentController().getFrame();
XWindow xWindow = xFrame.getContainerWindow();
XWindowPeer xWindowPeer = (XWindowP... | [
"public",
"XWindowPeer",
"getWindowPeer",
"(",
"XTextDocument",
"_xTextDocument",
")",
"{",
"XModel",
"xModel",
"=",
"(",
"XModel",
")",
"UnoRuntime",
".",
"queryInterface",
"(",
"XModel",
".",
"class",
",",
"_xTextDocument",
")",
";",
"XFrame",
"xFrame",
"=",
... | gets the WindowPeer of a frame
@param _XTextDocument the instance of a textdocument
@return the windowpeer of the frame | [
"gets",
"the",
"WindowPeer",
"of",
"a",
"frame"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/WizardDialog.java#L1212-L1218 |
10,179 | cogroo/cogroo4 | lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/WizardDialog.java | WizardDialog.insertRoadmapItem | public void insertRoadmapItem(int Index, boolean _bEnabled, String _sLabel, int _ID) {
try {
// a roadmap is a SingleServiceFactory that can only create roadmapitems that are the only possible
// element types of the container
Object oRoadmapItem = m_xSSFRoadmap.createInstanc... | java | public void insertRoadmapItem(int Index, boolean _bEnabled, String _sLabel, int _ID) {
try {
// a roadmap is a SingleServiceFactory that can only create roadmapitems that are the only possible
// element types of the container
Object oRoadmapItem = m_xSSFRoadmap.createInstanc... | [
"public",
"void",
"insertRoadmapItem",
"(",
"int",
"Index",
",",
"boolean",
"_bEnabled",
",",
"String",
"_sLabel",
",",
"int",
"_ID",
")",
"{",
"try",
"{",
"// a roadmap is a SingleServiceFactory that can only create roadmapitems that are the only possible",
"// element types... | To fully understand the example one has to be aware that the passed ???Index??? parameter
refers to the position of the roadmap item in the roadmapmodel container
whereas the variable ???_ID??? directyl references to a certain step of dialog. | [
"To",
"fully",
"understand",
"the",
"example",
"one",
"has",
"to",
"be",
"aware",
"that",
"the",
"passed",
"???Index???",
"parameter",
"refers",
"to",
"the",
"position",
"of",
"the",
"roadmap",
"item",
"in",
"the",
"roadmapmodel",
"container",
"whereas",
"the"... | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/reporterror/WizardDialog.java#L1489-L1504 |
10,180 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenSentence.java | GoldenSentence.getGoldenGrammarErrors | public FSArray getGoldenGrammarErrors() {
if (GoldenSentence_Type.featOkTst
&& ((GoldenSentence_Type) jcasType).casFeat_goldenGrammarErrors == null)
jcasType.jcas.throwFeatMissing("goldenGrammarErrors",
"cogroo.uima.GoldenSentence");
return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasT... | java | public FSArray getGoldenGrammarErrors() {
if (GoldenSentence_Type.featOkTst
&& ((GoldenSentence_Type) jcasType).casFeat_goldenGrammarErrors == null)
jcasType.jcas.throwFeatMissing("goldenGrammarErrors",
"cogroo.uima.GoldenSentence");
return (FSArray) (jcasType.ll_cas.ll_getFSForRef(jcasT... | [
"public",
"FSArray",
"getGoldenGrammarErrors",
"(",
")",
"{",
"if",
"(",
"GoldenSentence_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GoldenSentence_Type",
")",
"jcasType",
")",
".",
"casFeat_goldenGrammarErrors",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"t... | getter for goldenGrammarErrors - gets
@generated | [
"getter",
"for",
"goldenGrammarErrors",
"-",
"gets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenSentence.java#L129-L137 |
10,181 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenSentence.java | GoldenSentence.setGoldenGrammarErrors | public void setGoldenGrammarErrors(FSArray v) {
if (GoldenSentence_Type.featOkTst
&& ((GoldenSentence_Type) jcasType).casFeat_goldenGrammarErrors == null)
jcasType.jcas.throwFeatMissing("goldenGrammarErrors",
"cogroo.uima.GoldenSentence");
jcasType.ll_cas.ll_setRefValue(addr,
((G... | java | public void setGoldenGrammarErrors(FSArray v) {
if (GoldenSentence_Type.featOkTst
&& ((GoldenSentence_Type) jcasType).casFeat_goldenGrammarErrors == null)
jcasType.jcas.throwFeatMissing("goldenGrammarErrors",
"cogroo.uima.GoldenSentence");
jcasType.ll_cas.ll_setRefValue(addr,
((G... | [
"public",
"void",
"setGoldenGrammarErrors",
"(",
"FSArray",
"v",
")",
"{",
"if",
"(",
"GoldenSentence_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GoldenSentence_Type",
")",
"jcasType",
")",
".",
"casFeat_goldenGrammarErrors",
"==",
"null",
")",
"jcasType",
".",
"j... | setter for goldenGrammarErrors - sets
@generated | [
"setter",
"for",
"goldenGrammarErrors",
"-",
"sets"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenSentence.java#L144-L152 |
10,182 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenSentence.java | GoldenSentence.getGoldenGrammarErrors | public GoldenGrammarError getGoldenGrammarErrors(int i) {
if (GoldenSentence_Type.featOkTst
&& ((GoldenSentence_Type) jcasType).casFeat_goldenGrammarErrors == null)
jcasType.jcas.throwFeatMissing("goldenGrammarErrors",
"cogroo.uima.GoldenSentence");
jcasType.jcas.checkArrayBounds(jcasTyp... | java | public GoldenGrammarError getGoldenGrammarErrors(int i) {
if (GoldenSentence_Type.featOkTst
&& ((GoldenSentence_Type) jcasType).casFeat_goldenGrammarErrors == null)
jcasType.jcas.throwFeatMissing("goldenGrammarErrors",
"cogroo.uima.GoldenSentence");
jcasType.jcas.checkArrayBounds(jcasTyp... | [
"public",
"GoldenGrammarError",
"getGoldenGrammarErrors",
"(",
"int",
"i",
")",
"{",
"if",
"(",
"GoldenSentence_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GoldenSentence_Type",
")",
"jcasType",
")",
".",
"casFeat_goldenGrammarErrors",
"==",
"null",
")",
"jcasType",
... | indexed getter for goldenGrammarErrors - gets an indexed value -
@generated | [
"indexed",
"getter",
"for",
"goldenGrammarErrors",
"-",
"gets",
"an",
"indexed",
"value",
"-"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenSentence.java#L159-L170 |
10,183 | cogroo/cogroo4 | cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenSentence.java | GoldenSentence.setGoldenGrammarErrors | public void setGoldenGrammarErrors(int i, GoldenGrammarError v) {
if (GoldenSentence_Type.featOkTst
&& ((GoldenSentence_Type) jcasType).casFeat_goldenGrammarErrors == null)
jcasType.jcas.throwFeatMissing("goldenGrammarErrors",
"cogroo.uima.GoldenSentence");
jcasType.jcas.checkArrayBounds... | java | public void setGoldenGrammarErrors(int i, GoldenGrammarError v) {
if (GoldenSentence_Type.featOkTst
&& ((GoldenSentence_Type) jcasType).casFeat_goldenGrammarErrors == null)
jcasType.jcas.throwFeatMissing("goldenGrammarErrors",
"cogroo.uima.GoldenSentence");
jcasType.jcas.checkArrayBounds... | [
"public",
"void",
"setGoldenGrammarErrors",
"(",
"int",
"i",
",",
"GoldenGrammarError",
"v",
")",
"{",
"if",
"(",
"GoldenSentence_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GoldenSentence_Type",
")",
"jcasType",
")",
".",
"casFeat_goldenGrammarErrors",
"==",
"null"... | indexed setter for goldenGrammarErrors - sets an indexed value -
@generated | [
"indexed",
"setter",
"for",
"goldenGrammarErrors",
"-",
"sets",
"an",
"indexed",
"value",
"-"
] | b6228900c20c6b37eac10a03708a9669dd562f52 | https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-eval/TypeSystem/src/main/java/cogroo/uima/GoldenSentence.java#L177-L187 |
10,184 | opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/util/Utils.java | Utils.getFormattedDateTime | static public String getFormattedDateTime(long dt, TimeZone tz, String format)
{
SimpleDateFormat df = new SimpleDateFormat(format);
if(tz != null)
df.setTimeZone(tz);
return df.format(new Date(dt));
} | java | static public String getFormattedDateTime(long dt, TimeZone tz, String format)
{
SimpleDateFormat df = new SimpleDateFormat(format);
if(tz != null)
df.setTimeZone(tz);
return df.format(new Date(dt));
} | [
"static",
"public",
"String",
"getFormattedDateTime",
"(",
"long",
"dt",
",",
"TimeZone",
"tz",
",",
"String",
"format",
")",
"{",
"SimpleDateFormat",
"df",
"=",
"new",
"SimpleDateFormat",
"(",
"format",
")",
";",
"if",
"(",
"tz",
"!=",
"null",
")",
"df",
... | Returns the given date time formatted using the given format and timezone.
@param dt The date to format (in milliseconds)
@param tz The timezone for the date (or null)
@param format The format to use for the date
@return The formatted date | [
"Returns",
"the",
"given",
"date",
"time",
"formatted",
"using",
"the",
"given",
"format",
"and",
"timezone",
"."
] | 5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/util/Utils.java#L59-L65 |
10,185 | Sciss/abc4j | abc/src/main/java/abc/notation/Accidental.java | Accidental.getNearestOccidentalValue | public byte getNearestOccidentalValue() {
if (m_value == _NONE || m_value == _NATURAL)
return 0;
if ((m_value == _DOUBLE_FLAT) || (m_value == _DOUBLE_SHARP))
return (byte)m_value;
if (m_value < 0)
return -1;//flat
if (m_value > 0)
return 1;//sharp
return 0;
} | java | public byte getNearestOccidentalValue() {
if (m_value == _NONE || m_value == _NATURAL)
return 0;
if ((m_value == _DOUBLE_FLAT) || (m_value == _DOUBLE_SHARP))
return (byte)m_value;
if (m_value < 0)
return -1;//flat
if (m_value > 0)
return 1;//sharp
return 0;
} | [
"public",
"byte",
"getNearestOccidentalValue",
"(",
")",
"{",
"if",
"(",
"m_value",
"==",
"_NONE",
"||",
"m_value",
"==",
"_NATURAL",
")",
"return",
"0",
";",
"if",
"(",
"(",
"m_value",
"==",
"_DOUBLE_FLAT",
")",
"||",
"(",
"m_value",
"==",
"_DOUBLE_SHARP"... | Return the nearest non microtonal semitone
e.g. flat (-1) for a half-flat or flat-and-half | [
"Return",
"the",
"nearest",
"non",
"microtonal",
"semitone"
] | 117b405642c84a7bfca4e3e13668838258b90ca7 | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/Accidental.java#L120-L130 |
10,186 | opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/util/QueryParameterList.java | QueryParameterList.add | public boolean add(String name, Object value)
{
if(name == null)
throw new NullPointerException("name == null");
add(name);
add(value.toString());
return true;
} | java | public boolean add(String name, Object value)
{
if(name == null)
throw new NullPointerException("name == null");
add(name);
add(value.toString());
return true;
} | [
"public",
"boolean",
"add",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
"\"name == null\"",
")",
";",
"add",
"(",
"name",
")",
";",
"add",
"(",
"value",
"."... | Adds the given query parameter name and value.
@param name The name of the parameter
@param value The value of the parameter
@return <CODE>true</CODE> if the add was successful | [
"Adds",
"the",
"given",
"query",
"parameter",
"name",
"and",
"value",
"."
] | 5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/util/QueryParameterList.java#L35-L42 |
10,187 | Sciss/abc4j | abc/src/main/java/abc/notation/TuneInfos.java | TuneInfos.add | public void add(byte b, Collection c) {
if ((c != null) && (c.size() > 0)) {
String s2 = get(b);
for (Object aC : c) {
String s = (String) aC;
if (s2 == null)
s2 = s;
else
s2 += lineSeparator + s;
... | java | public void add(byte b, Collection c) {
if ((c != null) && (c.size() > 0)) {
String s2 = get(b);
for (Object aC : c) {
String s = (String) aC;
if (s2 == null)
s2 = s;
else
s2 += lineSeparator + s;
... | [
"public",
"void",
"add",
"(",
"byte",
"b",
",",
"Collection",
"c",
")",
"{",
"if",
"(",
"(",
"c",
"!=",
"null",
")",
"&&",
"(",
"c",
".",
"size",
"(",
")",
">",
"0",
")",
")",
"{",
"String",
"s2",
"=",
"get",
"(",
"b",
")",
";",
"for",
"(... | Add each element of collection c as new lines in field b | [
"Add",
"each",
"element",
"of",
"collection",
"c",
"as",
"new",
"lines",
"in",
"field",
"b"
] | 117b405642c84a7bfca4e3e13668838258b90ca7 | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/TuneInfos.java#L124-L136 |
10,188 | Sciss/abc4j | abc/src/main/java/abc/notation/TuneInfos.java | TuneInfos.add | public void add(byte b, String s) {
if (s != null) {
String s2 = get(b);
if (s2 == null)
s2 = s;
else
s2 += lineSeparator + s;
set(b, s2);
}
} | java | public void add(byte b, String s) {
if (s != null) {
String s2 = get(b);
if (s2 == null)
s2 = s;
else
s2 += lineSeparator + s;
set(b, s2);
}
} | [
"public",
"void",
"add",
"(",
"byte",
"b",
",",
"String",
"s",
")",
"{",
"if",
"(",
"s",
"!=",
"null",
")",
"{",
"String",
"s2",
"=",
"get",
"(",
"b",
")",
";",
"if",
"(",
"s2",
"==",
"null",
")",
"s2",
"=",
"s",
";",
"else",
"s2",
"+=",
... | Add the string s as new line to field b | [
"Add",
"the",
"string",
"s",
"as",
"new",
"line",
"to",
"field",
"b"
] | 117b405642c84a7bfca4e3e13668838258b90ca7 | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/TuneInfos.java#L139-L148 |
10,189 | Sciss/abc4j | abc/src/main/java/abc/notation/TuneInfos.java | TuneInfos.get | public String get(byte b) {
Object o = m_infos.get(key(b));
String o2 = null;
if (m_bookInfos != null)
o2 = m_bookInfos.get(b);
if ((o == null) && (o2 == null))
return null;
else {
String ret = "";
if (o != null) {
ret += (String)o;
if (o2 != null)
ret += lineSeparator;
... | java | public String get(byte b) {
Object o = m_infos.get(key(b));
String o2 = null;
if (m_bookInfos != null)
o2 = m_bookInfos.get(b);
if ((o == null) && (o2 == null))
return null;
else {
String ret = "";
if (o != null) {
ret += (String)o;
if (o2 != null)
ret += lineSeparator;
... | [
"public",
"String",
"get",
"(",
"byte",
"b",
")",
"{",
"Object",
"o",
"=",
"m_infos",
".",
"get",
"(",
"key",
"(",
"b",
")",
")",
";",
"String",
"o2",
"=",
"null",
";",
"if",
"(",
"m_bookInfos",
"!=",
"null",
")",
"o2",
"=",
"m_bookInfos",
".",
... | Returns the whole content of field b, null if not defined | [
"Returns",
"the",
"whole",
"content",
"of",
"field",
"b",
"null",
"if",
"not",
"defined"
] | 117b405642c84a7bfca4e3e13668838258b90ca7 | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/TuneInfos.java#L168-L186 |
10,190 | Sciss/abc4j | abc/src/main/java/abc/notation/TuneInfos.java | TuneInfos.getAsCollection | public Collection getAsCollection(byte b) {
String[] lines = getAsStringArray(b);
if (lines == null)
return new ArrayList();
else
return arrayToCollection(lines);
} | java | public Collection getAsCollection(byte b) {
String[] lines = getAsStringArray(b);
if (lines == null)
return new ArrayList();
else
return arrayToCollection(lines);
} | [
"public",
"Collection",
"getAsCollection",
"(",
"byte",
"b",
")",
"{",
"String",
"[",
"]",
"lines",
"=",
"getAsStringArray",
"(",
"b",
")",
";",
"if",
"(",
"lines",
"==",
"null",
")",
"return",
"new",
"ArrayList",
"(",
")",
";",
"else",
"return",
"arra... | Returns the content of field b, as a collection, each line is an element
of the collection | [
"Returns",
"the",
"content",
"of",
"field",
"b",
"as",
"a",
"collection",
"each",
"line",
"is",
"an",
"element",
"of",
"the",
"collection"
] | 117b405642c84a7bfca4e3e13668838258b90ca7 | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/TuneInfos.java#L192-L198 |
10,191 | Sciss/abc4j | abc/src/main/java/abc/notation/TuneInfos.java | TuneInfos.getAsStringArray | public String[] getAsStringArray(byte b) {
String s = get(b);
if (s == null)
return null;
else
return s.split(lineSeparator+"");
} | java | public String[] getAsStringArray(byte b) {
String s = get(b);
if (s == null)
return null;
else
return s.split(lineSeparator+"");
} | [
"public",
"String",
"[",
"]",
"getAsStringArray",
"(",
"byte",
"b",
")",
"{",
"String",
"s",
"=",
"get",
"(",
"b",
")",
";",
"if",
"(",
"s",
"==",
"null",
")",
"return",
"null",
";",
"else",
"return",
"s",
".",
"split",
"(",
"lineSeparator",
"+",
... | Returns the content of field b, as a string array, each
line is an element in the array | [
"Returns",
"the",
"content",
"of",
"field",
"b",
"as",
"a",
"string",
"array",
"each",
"line",
"is",
"an",
"element",
"in",
"the",
"array"
] | 117b405642c84a7bfca4e3e13668838258b90ca7 | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/TuneInfos.java#L204-L210 |
10,192 | Sciss/abc4j | abc/src/main/java/abc/notation/TuneInfos.java | TuneInfos.remove | public void remove(byte b, String s) {
Collection c = getAsCollection(b);
c.remove(s);
set(b, c);
} | java | public void remove(byte b, String s) {
Collection c = getAsCollection(b);
c.remove(s);
set(b, c);
} | [
"public",
"void",
"remove",
"(",
"byte",
"b",
",",
"String",
"s",
")",
"{",
"Collection",
"c",
"=",
"getAsCollection",
"(",
"b",
")",
";",
"c",
".",
"remove",
"(",
"s",
")",
";",
"set",
"(",
"b",
",",
"c",
")",
";",
"}"
] | Remove the line s from the field b | [
"Remove",
"the",
"line",
"s",
"from",
"the",
"field",
"b"
] | 117b405642c84a7bfca4e3e13668838258b90ca7 | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/TuneInfos.java#L229-L233 |
10,193 | Sciss/abc4j | abc/src/main/java/abc/notation/TuneInfos.java | TuneInfos.set | public void set(byte b, String s) {
if ((s != null) && (s.length() > 0))
m_infos.put(key(b), s);
else
remove(b);
} | java | public void set(byte b, String s) {
if ((s != null) && (s.length() > 0))
m_infos.put(key(b), s);
else
remove(b);
} | [
"public",
"void",
"set",
"(",
"byte",
"b",
",",
"String",
"s",
")",
"{",
"if",
"(",
"(",
"s",
"!=",
"null",
")",
"&&",
"(",
"s",
".",
"length",
"(",
")",
">",
"0",
")",
")",
"m_infos",
".",
"put",
"(",
"key",
"(",
"b",
")",
",",
"s",
")",... | Set the whole content of field b | [
"Set",
"the",
"whole",
"content",
"of",
"field",
"b"
] | 117b405642c84a7bfca4e3e13668838258b90ca7 | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/TuneInfos.java#L255-L260 |
10,194 | opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java | MobileApplicationService.list | public Collection<MobileApplication> list(List<String> queryParams)
{
return HTTP.GET("/v2/mobile_applications.json", null, queryParams, MOBILE_APPLICATIONS).get();
} | java | public Collection<MobileApplication> list(List<String> queryParams)
{
return HTTP.GET("/v2/mobile_applications.json", null, queryParams, MOBILE_APPLICATIONS).get();
} | [
"public",
"Collection",
"<",
"MobileApplication",
">",
"list",
"(",
"List",
"<",
"String",
">",
"queryParams",
")",
"{",
"return",
"HTTP",
".",
"GET",
"(",
"\"/v2/mobile_applications.json\"",
",",
"null",
",",
"queryParams",
",",
"MOBILE_APPLICATIONS",
")",
".",... | Returns the set of Mobile applications with the given query parameters.
@param queryParams The query parameters
@return The set of applications | [
"Returns",
"the",
"set",
"of",
"Mobile",
"applications",
"with",
"the",
"given",
"query",
"parameters",
"."
] | 5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java#L51-L54 |
10,195 | opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java | MobileApplicationService.list | public Collection<MobileApplication> list(String name)
{
List<MobileApplication> ret = new ArrayList<MobileApplication>();
Collection<MobileApplication> applications = list();
for(MobileApplication application : applications)
{
if(name == null || application.getName().equ... | java | public Collection<MobileApplication> list(String name)
{
List<MobileApplication> ret = new ArrayList<MobileApplication>();
Collection<MobileApplication> applications = list();
for(MobileApplication application : applications)
{
if(name == null || application.getName().equ... | [
"public",
"Collection",
"<",
"MobileApplication",
">",
"list",
"(",
"String",
"name",
")",
"{",
"List",
"<",
"MobileApplication",
">",
"ret",
"=",
"new",
"ArrayList",
"<",
"MobileApplication",
">",
"(",
")",
";",
"Collection",
"<",
"MobileApplication",
">",
... | Returns the set of Mobile applications for the given name.
@param name The name of the applications
@return The set of applications | [
"Returns",
"the",
"set",
"of",
"Mobile",
"applications",
"for",
"the",
"given",
"name",
"."
] | 5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java#L72-L82 |
10,196 | opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java | MobileApplicationService.show | public Optional<MobileApplication> show(long applicationId)
{
return HTTP.GET(String.format("/v2/mobile_applications/%d.json", applicationId), MOBILE_APPLICATION);
} | java | public Optional<MobileApplication> show(long applicationId)
{
return HTTP.GET(String.format("/v2/mobile_applications/%d.json", applicationId), MOBILE_APPLICATION);
} | [
"public",
"Optional",
"<",
"MobileApplication",
">",
"show",
"(",
"long",
"applicationId",
")",
"{",
"return",
"HTTP",
".",
"GET",
"(",
"String",
".",
"format",
"(",
"\"/v2/mobile_applications/%d.json\"",
",",
"applicationId",
")",
",",
"MOBILE_APPLICATION",
")",
... | Returns the Mobile application for the given application id.
@param applicationId The id for the application to return
@return The application | [
"Returns",
"the",
"Mobile",
"application",
"for",
"the",
"given",
"application",
"id",
"."
] | 5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java#L89-L92 |
10,197 | opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java | MobileApplicationService.metricNames | public Collection<Metric> metricNames(long applicationId, String name)
{
QueryParameterList queryParams = new QueryParameterList();
if(name != null && name.length() > 0)
queryParams.add("name", name);
return HTTP.GET(String.format("/v2/mobile_applications/%d/metrics.json", applic... | java | public Collection<Metric> metricNames(long applicationId, String name)
{
QueryParameterList queryParams = new QueryParameterList();
if(name != null && name.length() > 0)
queryParams.add("name", name);
return HTTP.GET(String.format("/v2/mobile_applications/%d/metrics.json", applic... | [
"public",
"Collection",
"<",
"Metric",
">",
"metricNames",
"(",
"long",
"applicationId",
",",
"String",
"name",
")",
"{",
"QueryParameterList",
"queryParams",
"=",
"new",
"QueryParameterList",
"(",
")",
";",
"if",
"(",
"name",
"!=",
"null",
"&&",
"name",
"."... | Returns the set of metrics for the given application.
@param applicationId The id of the application to return metrics for
@param name Filter metrics by name (or part of name)
@return The set of metrics | [
"Returns",
"the",
"set",
"of",
"metrics",
"for",
"the",
"given",
"application",
"."
] | 5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java#L100-L106 |
10,198 | opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java | MobileApplicationService.metricData | public Optional<MetricData> metricData(long applicationId, List<String> queryParams)
{
return HTTP.GET(String.format("/v2/mobile_applications/%d/metrics/data.json", applicationId), null, queryParams, METRIC_DATA);
} | java | public Optional<MetricData> metricData(long applicationId, List<String> queryParams)
{
return HTTP.GET(String.format("/v2/mobile_applications/%d/metrics/data.json", applicationId), null, queryParams, METRIC_DATA);
} | [
"public",
"Optional",
"<",
"MetricData",
">",
"metricData",
"(",
"long",
"applicationId",
",",
"List",
"<",
"String",
">",
"queryParams",
")",
"{",
"return",
"HTTP",
".",
"GET",
"(",
"String",
".",
"format",
"(",
"\"/v2/mobile_applications/%d/metrics/data.json\"",... | Returns the set of metric data for the given application.
@param applicationId The id of the application to return metric data for
@param queryParams The query parameters
@return The set of metric data | [
"Returns",
"the",
"set",
"of",
"metric",
"data",
"for",
"the",
"given",
"application",
"."
] | 5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/MobileApplicationService.java#L124-L127 |
10,199 | opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/services/BaseFluent.java | BaseFluent.encode | public static String encode(String str)
{
String encodedValue = str;
try
{
encodedValue = URLEncoder.encode(encodedValue, "UTF-8");
// Spaces in NRQL queries expected to be encoded as "%20" instead of "+".
encodedValue = encodedValue.replace("+", "%20");... | java | public static String encode(String str)
{
String encodedValue = str;
try
{
encodedValue = URLEncoder.encode(encodedValue, "UTF-8");
// Spaces in NRQL queries expected to be encoded as "%20" instead of "+".
encodedValue = encodedValue.replace("+", "%20");... | [
"public",
"static",
"String",
"encode",
"(",
"String",
"str",
")",
"{",
"String",
"encodedValue",
"=",
"str",
";",
"try",
"{",
"encodedValue",
"=",
"URLEncoder",
".",
"encode",
"(",
"encodedValue",
",",
"\"UTF-8\"",
")",
";",
"// Spaces in NRQL queries expected ... | Encode special character in query string to the URL encoded representation.
@param str The input string
@return The encoded String | [
"Encode",
"special",
"character",
"in",
"query",
"string",
"to",
"the",
"URL",
"encoded",
"representation",
"."
] | 5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/BaseFluent.java#L196-L213 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.