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
sequence | docstring
stringlengths 3
16k
| docstring_tokens
sequence | sha
stringlengths 40
40
| url
stringlengths 105
339
| partition
stringclasses 1
value |
---|---|---|---|---|---|---|---|---|---|---|---|
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.makeReaderAndWriter | public DocumentReaderAndWriter<IN> makeReaderAndWriter() {
DocumentReaderAndWriter<IN> readerAndWriter;
try {
readerAndWriter = ((DocumentReaderAndWriter<IN>)
Class.forName(flags.readerAndWriter).newInstance());
} catch (Exception e) {
throw new RuntimeException(String.format("Error loading flags.readerAndWriter: '%s'", flags.readerAndWriter), e);
}
readerAndWriter.init(flags);
return readerAndWriter;
} | java | public DocumentReaderAndWriter<IN> makeReaderAndWriter() {
DocumentReaderAndWriter<IN> readerAndWriter;
try {
readerAndWriter = ((DocumentReaderAndWriter<IN>)
Class.forName(flags.readerAndWriter).newInstance());
} catch (Exception e) {
throw new RuntimeException(String.format("Error loading flags.readerAndWriter: '%s'", flags.readerAndWriter), e);
}
readerAndWriter.init(flags);
return readerAndWriter;
} | [
"public",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"makeReaderAndWriter",
"(",
")",
"{",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerAndWriter",
";",
"try",
"{",
"readerAndWriter",
"=",
"(",
"(",
"DocumentReaderAndWriter",
"<",
"IN",
">",
")",
"Class",
".",
"forName",
"(",
"flags",
".",
"readerAndWriter",
")",
".",
"newInstance",
"(",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"String",
".",
"format",
"(",
"\"Error loading flags.readerAndWriter: '%s'\"",
",",
"flags",
".",
"readerAndWriter",
")",
",",
"e",
")",
";",
"}",
"readerAndWriter",
".",
"init",
"(",
"flags",
")",
";",
"return",
"readerAndWriter",
";",
"}"
] | Makes a DocumentReaderAndWriter based on the flags the CRFClassifier
was constructed with. Will create the flags.readerAndWriter and
initialize it with the CRFClassifier's flags. | [
"Makes",
"a",
"DocumentReaderAndWriter",
"based",
"on",
"the",
"flags",
"the",
"CRFClassifier",
"was",
"constructed",
"with",
".",
"Will",
"create",
"the",
"flags",
".",
"readerAndWriter",
"and",
"initialize",
"it",
"with",
"the",
"CRFClassifier",
"s",
"flags",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L204-L214 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.makePlainTextReaderAndWriter | public DocumentReaderAndWriter<IN> makePlainTextReaderAndWriter() {
String readerClassName = flags.plainTextDocumentReaderAndWriter;
// We set this default here if needed because there may be models
// which don't have the reader flag set
if (readerClassName == null) {
readerClassName = SeqClassifierFlags.DEFAULT_PLAIN_TEXT_READER;
}
DocumentReaderAndWriter<IN> readerAndWriter;
try {
readerAndWriter = ((DocumentReaderAndWriter<IN>) Class.forName(readerClassName).newInstance());
} catch (Exception e) {
throw new RuntimeException(String.format("Error loading flags.plainTextDocumentReaderAndWriter: '%s'", flags.plainTextDocumentReaderAndWriter), e);
}
readerAndWriter.init(flags);
return readerAndWriter;
} | java | public DocumentReaderAndWriter<IN> makePlainTextReaderAndWriter() {
String readerClassName = flags.plainTextDocumentReaderAndWriter;
// We set this default here if needed because there may be models
// which don't have the reader flag set
if (readerClassName == null) {
readerClassName = SeqClassifierFlags.DEFAULT_PLAIN_TEXT_READER;
}
DocumentReaderAndWriter<IN> readerAndWriter;
try {
readerAndWriter = ((DocumentReaderAndWriter<IN>) Class.forName(readerClassName).newInstance());
} catch (Exception e) {
throw new RuntimeException(String.format("Error loading flags.plainTextDocumentReaderAndWriter: '%s'", flags.plainTextDocumentReaderAndWriter), e);
}
readerAndWriter.init(flags);
return readerAndWriter;
} | [
"public",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"makePlainTextReaderAndWriter",
"(",
")",
"{",
"String",
"readerClassName",
"=",
"flags",
".",
"plainTextDocumentReaderAndWriter",
";",
"// We set this default here if needed because there may be models\r",
"// which don't have the reader flag set\r",
"if",
"(",
"readerClassName",
"==",
"null",
")",
"{",
"readerClassName",
"=",
"SeqClassifierFlags",
".",
"DEFAULT_PLAIN_TEXT_READER",
";",
"}",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerAndWriter",
";",
"try",
"{",
"readerAndWriter",
"=",
"(",
"(",
"DocumentReaderAndWriter",
"<",
"IN",
">",
")",
"Class",
".",
"forName",
"(",
"readerClassName",
")",
".",
"newInstance",
"(",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"String",
".",
"format",
"(",
"\"Error loading flags.plainTextDocumentReaderAndWriter: '%s'\"",
",",
"flags",
".",
"plainTextDocumentReaderAndWriter",
")",
",",
"e",
")",
";",
"}",
"readerAndWriter",
".",
"init",
"(",
"flags",
")",
";",
"return",
"readerAndWriter",
";",
"}"
] | Makes a DocumentReaderAndWriter based on
flags.plainTextReaderAndWriter. Useful for reading in
untokenized text documents or reading plain text from the command
line. An example of a way to use this would be to return a
edu.stanford.nlp.wordseg.Sighan2005DocumentReaderAndWriter for
the Chinese Segmenter. | [
"Makes",
"a",
"DocumentReaderAndWriter",
"based",
"on",
"flags",
".",
"plainTextReaderAndWriter",
".",
"Useful",
"for",
"reading",
"in",
"untokenized",
"text",
"documents",
"or",
"reading",
"plain",
"text",
"from",
"the",
"command",
"line",
".",
"An",
"example",
"of",
"a",
"way",
"to",
"use",
"this",
"would",
"be",
"to",
"return",
"a",
"edu",
".",
"stanford",
".",
"nlp",
".",
"wordseg",
".",
"Sighan2005DocumentReaderAndWriter",
"for",
"the",
"Chinese",
"Segmenter",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L224-L239 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.classify | public List<List<IN>> classify(String str) {
ObjectBank<List<IN>> documents =
makeObjectBankFromString(str, plainTextReaderAndWriter);
List<List<IN>> result = new ArrayList<List<IN>>();
for (List<IN> document : documents) {
classify(document);
List<IN> sentence = new ArrayList<IN>();
for (IN wi : document) {
// TaggedWord word = new TaggedWord(wi.word(), wi.answer());
// sentence.add(word);
sentence.add(wi);
}
result.add(sentence);
}
return result;
} | java | public List<List<IN>> classify(String str) {
ObjectBank<List<IN>> documents =
makeObjectBankFromString(str, plainTextReaderAndWriter);
List<List<IN>> result = new ArrayList<List<IN>>();
for (List<IN> document : documents) {
classify(document);
List<IN> sentence = new ArrayList<IN>();
for (IN wi : document) {
// TaggedWord word = new TaggedWord(wi.word(), wi.answer());
// sentence.add(word);
sentence.add(wi);
}
result.add(sentence);
}
return result;
} | [
"public",
"List",
"<",
"List",
"<",
"IN",
">",
">",
"classify",
"(",
"String",
"str",
")",
"{",
"ObjectBank",
"<",
"List",
"<",
"IN",
">>",
"documents",
"=",
"makeObjectBankFromString",
"(",
"str",
",",
"plainTextReaderAndWriter",
")",
";",
"List",
"<",
"List",
"<",
"IN",
">",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"List",
"<",
"IN",
">",
">",
"(",
")",
";",
"for",
"(",
"List",
"<",
"IN",
">",
"document",
":",
"documents",
")",
"{",
"classify",
"(",
"document",
")",
";",
"List",
"<",
"IN",
">",
"sentence",
"=",
"new",
"ArrayList",
"<",
"IN",
">",
"(",
")",
";",
"for",
"(",
"IN",
"wi",
":",
"document",
")",
"{",
"// TaggedWord word = new TaggedWord(wi.word(), wi.answer());\r",
"// sentence.add(word);\r",
"sentence",
".",
"add",
"(",
"wi",
")",
";",
"}",
"result",
".",
"add",
"(",
"sentence",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Classify the tokens in a String. Each sentence becomes a separate document.
@param str
A String with tokens in one or more sentences of text to be
classified.
@return {@link List} of classified sentences (each a List of something that
extends {@link CoreMap}). | [
"Classify",
"the",
"tokens",
"in",
"a",
"String",
".",
"Each",
"sentence",
"becomes",
"a",
"separate",
"document",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L413-L430 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.classifyRaw | public List<List<IN>> classifyRaw(String str,
DocumentReaderAndWriter<IN> readerAndWriter) {
ObjectBank<List<IN>> documents =
makeObjectBankFromString(str, readerAndWriter);
List<List<IN>> result = new ArrayList<List<IN>>();
for (List<IN> document : documents) {
classify(document);
List<IN> sentence = new ArrayList<IN>();
for (IN wi : document) {
// TaggedWord word = new TaggedWord(wi.word(), wi.answer());
// sentence.add(word);
sentence.add(wi);
}
result.add(sentence);
}
return result;
} | java | public List<List<IN>> classifyRaw(String str,
DocumentReaderAndWriter<IN> readerAndWriter) {
ObjectBank<List<IN>> documents =
makeObjectBankFromString(str, readerAndWriter);
List<List<IN>> result = new ArrayList<List<IN>>();
for (List<IN> document : documents) {
classify(document);
List<IN> sentence = new ArrayList<IN>();
for (IN wi : document) {
// TaggedWord word = new TaggedWord(wi.word(), wi.answer());
// sentence.add(word);
sentence.add(wi);
}
result.add(sentence);
}
return result;
} | [
"public",
"List",
"<",
"List",
"<",
"IN",
">",
">",
"classifyRaw",
"(",
"String",
"str",
",",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerAndWriter",
")",
"{",
"ObjectBank",
"<",
"List",
"<",
"IN",
">>",
"documents",
"=",
"makeObjectBankFromString",
"(",
"str",
",",
"readerAndWriter",
")",
";",
"List",
"<",
"List",
"<",
"IN",
">",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"List",
"<",
"IN",
">",
">",
"(",
")",
";",
"for",
"(",
"List",
"<",
"IN",
">",
"document",
":",
"documents",
")",
"{",
"classify",
"(",
"document",
")",
";",
"List",
"<",
"IN",
">",
"sentence",
"=",
"new",
"ArrayList",
"<",
"IN",
">",
"(",
")",
";",
"for",
"(",
"IN",
"wi",
":",
"document",
")",
"{",
"// TaggedWord word = new TaggedWord(wi.word(), wi.answer());\r",
"// sentence.add(word);\r",
"sentence",
".",
"add",
"(",
"wi",
")",
";",
"}",
"result",
".",
"add",
"(",
"sentence",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Classify the tokens in a String. Each sentence becomes a separate document.
Doesn't override default readerAndWriter.
@param str
A String with tokens in one or more sentences of text to be
classified.
@return {@link List} of classified sentences (each a List of something that
extends {@link CoreMap}). | [
"Classify",
"the",
"tokens",
"in",
"a",
"String",
".",
"Each",
"sentence",
"becomes",
"a",
"separate",
"document",
".",
"Doesn",
"t",
"override",
"default",
"readerAndWriter",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L442-L460 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.classifyFile | public List<List<IN>> classifyFile(String filename) {
ObjectBank<List<IN>> documents =
makeObjectBankFromFile(filename, plainTextReaderAndWriter);
List<List<IN>> result = new ArrayList<List<IN>>();
for (List<IN> document : documents) {
// System.err.println(document);
classify(document);
List<IN> sentence = new ArrayList<IN>();
for (IN wi : document) {
sentence.add(wi);
// System.err.println(wi);
}
result.add(sentence);
}
return result;
} | java | public List<List<IN>> classifyFile(String filename) {
ObjectBank<List<IN>> documents =
makeObjectBankFromFile(filename, plainTextReaderAndWriter);
List<List<IN>> result = new ArrayList<List<IN>>();
for (List<IN> document : documents) {
// System.err.println(document);
classify(document);
List<IN> sentence = new ArrayList<IN>();
for (IN wi : document) {
sentence.add(wi);
// System.err.println(wi);
}
result.add(sentence);
}
return result;
} | [
"public",
"List",
"<",
"List",
"<",
"IN",
">",
">",
"classifyFile",
"(",
"String",
"filename",
")",
"{",
"ObjectBank",
"<",
"List",
"<",
"IN",
">>",
"documents",
"=",
"makeObjectBankFromFile",
"(",
"filename",
",",
"plainTextReaderAndWriter",
")",
";",
"List",
"<",
"List",
"<",
"IN",
">",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"List",
"<",
"IN",
">",
">",
"(",
")",
";",
"for",
"(",
"List",
"<",
"IN",
">",
"document",
":",
"documents",
")",
"{",
"// System.err.println(document);\r",
"classify",
"(",
"document",
")",
";",
"List",
"<",
"IN",
">",
"sentence",
"=",
"new",
"ArrayList",
"<",
"IN",
">",
"(",
")",
";",
"for",
"(",
"IN",
"wi",
":",
"document",
")",
"{",
"sentence",
".",
"add",
"(",
"wi",
")",
";",
"// System.err.println(wi);\r",
"}",
"result",
".",
"add",
"(",
"sentence",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Classify the contents of a file.
@param filename
Contains the sentence(s) to be classified.
@return {@link List} of classified List of IN. | [
"Classify",
"the",
"contents",
"of",
"a",
"file",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L469-L486 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.printProbs | public void printProbs(String filename,
DocumentReaderAndWriter<IN> readerAndWriter) {
// only for the OCR data does this matter
flags.ocrTrain = false;
ObjectBank<List<IN>> docs =
makeObjectBankFromFile(filename, readerAndWriter);
printProbsDocuments(docs);
} | java | public void printProbs(String filename,
DocumentReaderAndWriter<IN> readerAndWriter) {
// only for the OCR data does this matter
flags.ocrTrain = false;
ObjectBank<List<IN>> docs =
makeObjectBankFromFile(filename, readerAndWriter);
printProbsDocuments(docs);
} | [
"public",
"void",
"printProbs",
"(",
"String",
"filename",
",",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerAndWriter",
")",
"{",
"// only for the OCR data does this matter\r",
"flags",
".",
"ocrTrain",
"=",
"false",
";",
"ObjectBank",
"<",
"List",
"<",
"IN",
">",
">",
"docs",
"=",
"makeObjectBankFromFile",
"(",
"filename",
",",
"readerAndWriter",
")",
";",
"printProbsDocuments",
"(",
"docs",
")",
";",
"}"
] | Takes the file, reads it in, and prints out the likelihood of each possible
label at each point.
@param filename
The path to the specified file | [
"Takes",
"the",
"file",
"reads",
"it",
"in",
"and",
"prints",
"out",
"the",
"likelihood",
"of",
"each",
"possible",
"label",
"at",
"each",
"point",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L925-L933 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.classifyDocumentStdin | public boolean classifyDocumentStdin(DocumentReaderAndWriter<IN> readerWriter)
throws IOException
{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding));
String line;
String text = "";
String eol = "\n";
String sentence = "<s>";
int blankLines = 0;
while ((line = is.readLine()) != null) {
if (line.trim().equals("")) {
++blankLines;
if (blankLines > 3) {
return false;
} else if (blankLines > 2) {
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
text = "";
} else {
text += sentence + eol;
}
} else {
text += line + eol;
blankLines = 0;
}
}
// Classify last document before input stream end
if (text.trim() != "") {
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
}
return (line == null); // reached eol
} | java | public boolean classifyDocumentStdin(DocumentReaderAndWriter<IN> readerWriter)
throws IOException
{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding));
String line;
String text = "";
String eol = "\n";
String sentence = "<s>";
int blankLines = 0;
while ((line = is.readLine()) != null) {
if (line.trim().equals("")) {
++blankLines;
if (blankLines > 3) {
return false;
} else if (blankLines > 2) {
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
text = "";
} else {
text += sentence + eol;
}
} else {
text += line + eol;
blankLines = 0;
}
}
// Classify last document before input stream end
if (text.trim() != "") {
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
}
return (line == null); // reached eol
} | [
"public",
"boolean",
"classifyDocumentStdin",
"(",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerWriter",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"is",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
"System",
".",
"in",
",",
"flags",
".",
"inputEncoding",
")",
")",
";",
"String",
"line",
";",
"String",
"text",
"=",
"\"\"",
";",
"String",
"eol",
"=",
"\"\\n\"",
";",
"String",
"sentence",
"=",
"\"<s>\"",
";",
"int",
"blankLines",
"=",
"0",
";",
"while",
"(",
"(",
"line",
"=",
"is",
".",
"readLine",
"(",
")",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"line",
".",
"trim",
"(",
")",
".",
"equals",
"(",
"\"\"",
")",
")",
"{",
"++",
"blankLines",
";",
"if",
"(",
"blankLines",
">",
"3",
")",
"{",
"return",
"false",
";",
"}",
"else",
"if",
"(",
"blankLines",
">",
"2",
")",
"{",
"ObjectBank",
"<",
"List",
"<",
"IN",
">>",
"documents",
"=",
"makeObjectBankFromString",
"(",
"text",
",",
"readerWriter",
")",
";",
"classifyAndWriteAnswers",
"(",
"documents",
",",
"readerWriter",
")",
";",
"text",
"=",
"\"\"",
";",
"}",
"else",
"{",
"text",
"+=",
"sentence",
"+",
"eol",
";",
"}",
"}",
"else",
"{",
"text",
"+=",
"line",
"+",
"eol",
";",
"blankLines",
"=",
"0",
";",
"}",
"}",
"// Classify last document before input stream end\r",
"if",
"(",
"text",
".",
"trim",
"(",
")",
"!=",
"\"\"",
")",
"{",
"ObjectBank",
"<",
"List",
"<",
"IN",
">>",
"documents",
"=",
"makeObjectBankFromString",
"(",
"text",
",",
"readerWriter",
")",
";",
"classifyAndWriteAnswers",
"(",
"documents",
",",
"readerWriter",
")",
";",
"}",
"return",
"(",
"line",
"==",
"null",
")",
";",
"// reached eol\r",
"}"
] | Classify stdin by documents seperated by 3 blank line
@param readerWriter
@return boolean reached end of IO
@throws IOException | [
"Classify",
"stdin",
"by",
"documents",
"seperated",
"by",
"3",
"blank",
"line"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L973-L1005 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.classifySentenceStdin | public boolean classifySentenceStdin(DocumentReaderAndWriter<IN> readerWriter)
throws IOException
{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding));
String line;
String text = "";
String eol = "\n";
String sentence = "<s>";
while ((line = is.readLine()) != null) {
if (line.trim().equals("")) {
text += sentence + eol;
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
text = "";
} else {
text += line + eol;
}
}
if (text.trim().equals("")) {
return false;
}
return true;
} | java | public boolean classifySentenceStdin(DocumentReaderAndWriter<IN> readerWriter)
throws IOException
{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding));
String line;
String text = "";
String eol = "\n";
String sentence = "<s>";
while ((line = is.readLine()) != null) {
if (line.trim().equals("")) {
text += sentence + eol;
ObjectBank<List<IN>> documents = makeObjectBankFromString(text, readerWriter);
classifyAndWriteAnswers(documents, readerWriter);
text = "";
} else {
text += line + eol;
}
}
if (text.trim().equals("")) {
return false;
}
return true;
} | [
"public",
"boolean",
"classifySentenceStdin",
"(",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerWriter",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"is",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
"System",
".",
"in",
",",
"flags",
".",
"inputEncoding",
")",
")",
";",
"String",
"line",
";",
"String",
"text",
"=",
"\"\"",
";",
"String",
"eol",
"=",
"\"\\n\"",
";",
"String",
"sentence",
"=",
"\"<s>\"",
";",
"while",
"(",
"(",
"line",
"=",
"is",
".",
"readLine",
"(",
")",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"line",
".",
"trim",
"(",
")",
".",
"equals",
"(",
"\"\"",
")",
")",
"{",
"text",
"+=",
"sentence",
"+",
"eol",
";",
"ObjectBank",
"<",
"List",
"<",
"IN",
">",
">",
"documents",
"=",
"makeObjectBankFromString",
"(",
"text",
",",
"readerWriter",
")",
";",
"classifyAndWriteAnswers",
"(",
"documents",
",",
"readerWriter",
")",
";",
"text",
"=",
"\"\"",
";",
"}",
"else",
"{",
"text",
"+=",
"line",
"+",
"eol",
";",
"}",
"}",
"if",
"(",
"text",
".",
"trim",
"(",
")",
".",
"equals",
"(",
"\"\"",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}"
] | Classify stdin by senteces seperated by blank line
@param readerWriter
@return
@throws IOException | [
"Classify",
"stdin",
"by",
"senteces",
"seperated",
"by",
"blank",
"line"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1013-L1036 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.classifyAndWriteViterbiSearchGraph | public void classifyAndWriteViterbiSearchGraph(String testFile, String searchGraphPrefix, DocumentReaderAndWriter<IN> readerAndWriter) throws IOException {
Timing timer = new Timing();
ObjectBank<List<IN>> documents =
makeObjectBankFromFile(testFile, readerAndWriter);
int numWords = 0;
int numSentences = 0;
for (List<IN> doc : documents) {
DFSA<String, Integer> tagLattice = getViterbiSearchGraph(doc, AnswerAnnotation.class);
numWords += doc.size();
PrintWriter latticeWriter = new PrintWriter(new FileOutputStream(searchGraphPrefix + '.' + numSentences
+ ".wlattice"));
PrintWriter vsgWriter = new PrintWriter(new FileOutputStream(searchGraphPrefix + '.' + numSentences + ".lattice"));
if (readerAndWriter instanceof LatticeWriter)
((LatticeWriter) readerAndWriter).printLattice(tagLattice, doc, latticeWriter);
tagLattice.printAttFsmFormat(vsgWriter);
latticeWriter.close();
vsgWriter.close();
numSentences++;
}
long millis = timer.stop();
double wordspersec = numWords / (((double) millis) / 1000);
NumberFormat nf = new DecimalFormat("0.00"); // easier way!
System.err.println(this.getClass().getName() + " tagged " + numWords + " words in " + numSentences
+ " documents at " + nf.format(wordspersec) + " words per second.");
} | java | public void classifyAndWriteViterbiSearchGraph(String testFile, String searchGraphPrefix, DocumentReaderAndWriter<IN> readerAndWriter) throws IOException {
Timing timer = new Timing();
ObjectBank<List<IN>> documents =
makeObjectBankFromFile(testFile, readerAndWriter);
int numWords = 0;
int numSentences = 0;
for (List<IN> doc : documents) {
DFSA<String, Integer> tagLattice = getViterbiSearchGraph(doc, AnswerAnnotation.class);
numWords += doc.size();
PrintWriter latticeWriter = new PrintWriter(new FileOutputStream(searchGraphPrefix + '.' + numSentences
+ ".wlattice"));
PrintWriter vsgWriter = new PrintWriter(new FileOutputStream(searchGraphPrefix + '.' + numSentences + ".lattice"));
if (readerAndWriter instanceof LatticeWriter)
((LatticeWriter) readerAndWriter).printLattice(tagLattice, doc, latticeWriter);
tagLattice.printAttFsmFormat(vsgWriter);
latticeWriter.close();
vsgWriter.close();
numSentences++;
}
long millis = timer.stop();
double wordspersec = numWords / (((double) millis) / 1000);
NumberFormat nf = new DecimalFormat("0.00"); // easier way!
System.err.println(this.getClass().getName() + " tagged " + numWords + " words in " + numSentences
+ " documents at " + nf.format(wordspersec) + " words per second.");
} | [
"public",
"void",
"classifyAndWriteViterbiSearchGraph",
"(",
"String",
"testFile",
",",
"String",
"searchGraphPrefix",
",",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerAndWriter",
")",
"throws",
"IOException",
"{",
"Timing",
"timer",
"=",
"new",
"Timing",
"(",
")",
";",
"ObjectBank",
"<",
"List",
"<",
"IN",
">",
">",
"documents",
"=",
"makeObjectBankFromFile",
"(",
"testFile",
",",
"readerAndWriter",
")",
";",
"int",
"numWords",
"=",
"0",
";",
"int",
"numSentences",
"=",
"0",
";",
"for",
"(",
"List",
"<",
"IN",
">",
"doc",
":",
"documents",
")",
"{",
"DFSA",
"<",
"String",
",",
"Integer",
">",
"tagLattice",
"=",
"getViterbiSearchGraph",
"(",
"doc",
",",
"AnswerAnnotation",
".",
"class",
")",
";",
"numWords",
"+=",
"doc",
".",
"size",
"(",
")",
";",
"PrintWriter",
"latticeWriter",
"=",
"new",
"PrintWriter",
"(",
"new",
"FileOutputStream",
"(",
"searchGraphPrefix",
"+",
"'",
"'",
"+",
"numSentences",
"+",
"\".wlattice\"",
")",
")",
";",
"PrintWriter",
"vsgWriter",
"=",
"new",
"PrintWriter",
"(",
"new",
"FileOutputStream",
"(",
"searchGraphPrefix",
"+",
"'",
"'",
"+",
"numSentences",
"+",
"\".lattice\"",
")",
")",
";",
"if",
"(",
"readerAndWriter",
"instanceof",
"LatticeWriter",
")",
"(",
"(",
"LatticeWriter",
")",
"readerAndWriter",
")",
".",
"printLattice",
"(",
"tagLattice",
",",
"doc",
",",
"latticeWriter",
")",
";",
"tagLattice",
".",
"printAttFsmFormat",
"(",
"vsgWriter",
")",
";",
"latticeWriter",
".",
"close",
"(",
")",
";",
"vsgWriter",
".",
"close",
"(",
")",
";",
"numSentences",
"++",
";",
"}",
"long",
"millis",
"=",
"timer",
".",
"stop",
"(",
")",
";",
"double",
"wordspersec",
"=",
"numWords",
"/",
"(",
"(",
"(",
"double",
")",
"millis",
")",
"/",
"1000",
")",
";",
"NumberFormat",
"nf",
"=",
"new",
"DecimalFormat",
"(",
"\"0.00\"",
")",
";",
"// easier way!\r",
"System",
".",
"err",
".",
"println",
"(",
"this",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\" tagged \"",
"+",
"numWords",
"+",
"\" words in \"",
"+",
"numSentences",
"+",
"\" documents at \"",
"+",
"nf",
".",
"format",
"(",
"wordspersec",
")",
"+",
"\" words per second.\"",
")",
";",
"}"
] | Load a test file, run the classifier on it, and then write a Viterbi search
graph for each sequence.
@param testFile
The file to test on. | [
"Load",
"a",
"test",
"file",
"run",
"the",
"classifier",
"on",
"it",
"and",
"then",
"write",
"a",
"Viterbi",
"search",
"graph",
"for",
"each",
"sequence",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1205-L1231 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.writeAnswers | public void writeAnswers(List<IN> doc, PrintWriter printWriter,
DocumentReaderAndWriter<IN> readerAndWriter)
throws IOException {
if (flags.lowerNewgeneThreshold) {
return;
}
if (flags.numRuns <= 1) {
readerAndWriter.printAnswers(doc, printWriter);
// out.println();
printWriter.flush();
}
} | java | public void writeAnswers(List<IN> doc, PrintWriter printWriter,
DocumentReaderAndWriter<IN> readerAndWriter)
throws IOException {
if (flags.lowerNewgeneThreshold) {
return;
}
if (flags.numRuns <= 1) {
readerAndWriter.printAnswers(doc, printWriter);
// out.println();
printWriter.flush();
}
} | [
"public",
"void",
"writeAnswers",
"(",
"List",
"<",
"IN",
">",
"doc",
",",
"PrintWriter",
"printWriter",
",",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerAndWriter",
")",
"throws",
"IOException",
"{",
"if",
"(",
"flags",
".",
"lowerNewgeneThreshold",
")",
"{",
"return",
";",
"}",
"if",
"(",
"flags",
".",
"numRuns",
"<=",
"1",
")",
"{",
"readerAndWriter",
".",
"printAnswers",
"(",
"doc",
",",
"printWriter",
")",
";",
"// out.println();\r",
"printWriter",
".",
"flush",
"(",
")",
";",
"}",
"}"
] | Write the classifications of the Sequence classifier out to a writer in a
format determined by the DocumentReaderAndWriter used.
@param doc Documents to write out
@param printWriter Writer to use for output
@throws IOException If an IO problem | [
"Write",
"the",
"classifications",
"of",
"the",
"Sequence",
"classifier",
"out",
"to",
"a",
"writer",
"in",
"a",
"format",
"determined",
"by",
"the",
"DocumentReaderAndWriter",
"used",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1241-L1252 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.printResults | public static void printResults(Counter<String> entityTP, Counter<String> entityFP,
Counter<String> entityFN) {
Set<String> entities = new TreeSet<String>();
entities.addAll(entityTP.keySet());
entities.addAll(entityFP.keySet());
entities.addAll(entityFN.keySet());
boolean printedHeader = false;
for (String entity : entities) {
double tp = entityTP.getCount(entity);
double fp = entityFP.getCount(entity);
double fn = entityFN.getCount(entity);
printedHeader = printPRLine(entity, tp, fp, fn, printedHeader);
}
double tp = entityTP.totalCount();
double fp = entityFP.totalCount();
double fn = entityFN.totalCount();
printedHeader = printPRLine("Totals", tp, fp, fn, printedHeader);
} | java | public static void printResults(Counter<String> entityTP, Counter<String> entityFP,
Counter<String> entityFN) {
Set<String> entities = new TreeSet<String>();
entities.addAll(entityTP.keySet());
entities.addAll(entityFP.keySet());
entities.addAll(entityFN.keySet());
boolean printedHeader = false;
for (String entity : entities) {
double tp = entityTP.getCount(entity);
double fp = entityFP.getCount(entity);
double fn = entityFN.getCount(entity);
printedHeader = printPRLine(entity, tp, fp, fn, printedHeader);
}
double tp = entityTP.totalCount();
double fp = entityFP.totalCount();
double fn = entityFN.totalCount();
printedHeader = printPRLine("Totals", tp, fp, fn, printedHeader);
} | [
"public",
"static",
"void",
"printResults",
"(",
"Counter",
"<",
"String",
">",
"entityTP",
",",
"Counter",
"<",
"String",
">",
"entityFP",
",",
"Counter",
"<",
"String",
">",
"entityFN",
")",
"{",
"Set",
"<",
"String",
">",
"entities",
"=",
"new",
"TreeSet",
"<",
"String",
">",
"(",
")",
";",
"entities",
".",
"addAll",
"(",
"entityTP",
".",
"keySet",
"(",
")",
")",
";",
"entities",
".",
"addAll",
"(",
"entityFP",
".",
"keySet",
"(",
")",
")",
";",
"entities",
".",
"addAll",
"(",
"entityFN",
".",
"keySet",
"(",
")",
")",
";",
"boolean",
"printedHeader",
"=",
"false",
";",
"for",
"(",
"String",
"entity",
":",
"entities",
")",
"{",
"double",
"tp",
"=",
"entityTP",
".",
"getCount",
"(",
"entity",
")",
";",
"double",
"fp",
"=",
"entityFP",
".",
"getCount",
"(",
"entity",
")",
";",
"double",
"fn",
"=",
"entityFN",
".",
"getCount",
"(",
"entity",
")",
";",
"printedHeader",
"=",
"printPRLine",
"(",
"entity",
",",
"tp",
",",
"fp",
",",
"fn",
",",
"printedHeader",
")",
";",
"}",
"double",
"tp",
"=",
"entityTP",
".",
"totalCount",
"(",
")",
";",
"double",
"fp",
"=",
"entityFP",
".",
"totalCount",
"(",
")",
";",
"double",
"fn",
"=",
"entityFN",
".",
"totalCount",
"(",
")",
";",
"printedHeader",
"=",
"printPRLine",
"(",
"\"Totals\"",
",",
"tp",
",",
"fp",
",",
"fn",
",",
"printedHeader",
")",
";",
"}"
] | Given counters of true positives, false positives, and false
negatives, prints out precision, recall, and f1 for each key. | [
"Given",
"counters",
"of",
"true",
"positives",
"false",
"positives",
"and",
"false",
"negatives",
"prints",
"out",
"precision",
"recall",
"and",
"f1",
"for",
"each",
"key",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1435-L1452 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.loadClassifier | public void loadClassifier(InputStream in, Properties props) throws IOException, ClassCastException,
ClassNotFoundException {
loadClassifier(new ObjectInputStream(in), props);
} | java | public void loadClassifier(InputStream in, Properties props) throws IOException, ClassCastException,
ClassNotFoundException {
loadClassifier(new ObjectInputStream(in), props);
} | [
"public",
"void",
"loadClassifier",
"(",
"InputStream",
"in",
",",
"Properties",
"props",
")",
"throws",
"IOException",
",",
"ClassCastException",
",",
"ClassNotFoundException",
"{",
"loadClassifier",
"(",
"new",
"ObjectInputStream",
"(",
"in",
")",
",",
"props",
")",
";",
"}"
] | Load a classifier from the specified InputStream. The classifier is
reinitialized from the flags serialized in the classifier. This does not
close the InputStream.
@param in
The InputStream to load the serialized classifier from
@param props
This Properties object will be used to update the
SeqClassifierFlags which are read from the serialized classifier
@throws IOException
If there are problems accessing the input stream
@throws ClassCastException
If there are problems interpreting the serialized data
@throws ClassNotFoundException
If there are problems interpreting the serialized data | [
"Load",
"a",
"classifier",
"from",
"the",
"specified",
"InputStream",
".",
"The",
"classifier",
"is",
"reinitialized",
"from",
"the",
"flags",
"serialized",
"in",
"the",
"classifier",
".",
"This",
"does",
"not",
"close",
"the",
"InputStream",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1539-L1542 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.loadClassifier | public void loadClassifier(String loadPath, Properties props) throws ClassCastException, IOException, ClassNotFoundException {
InputStream is;
// ms, 10-04-2010: check first is this path exists in our CLASSPATH. This
// takes priority over the file system.
if ((is = loadStreamFromClasspath(loadPath)) != null) {
Timing.startDoing("Loading classifier from " + loadPath);
loadClassifier(is);
is.close();
Timing.endDoing();
} else {
loadClassifier(new File(loadPath), props);
}
} | java | public void loadClassifier(String loadPath, Properties props) throws ClassCastException, IOException, ClassNotFoundException {
InputStream is;
// ms, 10-04-2010: check first is this path exists in our CLASSPATH. This
// takes priority over the file system.
if ((is = loadStreamFromClasspath(loadPath)) != null) {
Timing.startDoing("Loading classifier from " + loadPath);
loadClassifier(is);
is.close();
Timing.endDoing();
} else {
loadClassifier(new File(loadPath), props);
}
} | [
"public",
"void",
"loadClassifier",
"(",
"String",
"loadPath",
",",
"Properties",
"props",
")",
"throws",
"ClassCastException",
",",
"IOException",
",",
"ClassNotFoundException",
"{",
"InputStream",
"is",
";",
"// ms, 10-04-2010: check first is this path exists in our CLASSPATH. This\r",
"// takes priority over the file system.\r",
"if",
"(",
"(",
"is",
"=",
"loadStreamFromClasspath",
"(",
"loadPath",
")",
")",
"!=",
"null",
")",
"{",
"Timing",
".",
"startDoing",
"(",
"\"Loading classifier from \"",
"+",
"loadPath",
")",
";",
"loadClassifier",
"(",
"is",
")",
";",
"is",
".",
"close",
"(",
")",
";",
"Timing",
".",
"endDoing",
"(",
")",
";",
"}",
"else",
"{",
"loadClassifier",
"(",
"new",
"File",
"(",
"loadPath",
")",
",",
"props",
")",
";",
"}",
"}"
] | Loads a classifier from the file specified by loadPath. If loadPath ends in
.gz, uses a GZIPInputStream, else uses a regular FileInputStream. | [
"Loads",
"a",
"classifier",
"from",
"the",
"file",
"specified",
"by",
"loadPath",
".",
"If",
"loadPath",
"ends",
"in",
".",
"gz",
"uses",
"a",
"GZIPInputStream",
"else",
"uses",
"a",
"regular",
"FileInputStream",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1591-L1603 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.loadClassifier | public void loadClassifier(File file, Properties props) throws ClassCastException, IOException,
ClassNotFoundException {
Timing.startDoing("Loading classifier from " + file.getAbsolutePath());
BufferedInputStream bis;
if (file.getName().endsWith(".gz")) {
bis = new BufferedInputStream(new GZIPInputStream(new FileInputStream(file)));
} else {
bis = new BufferedInputStream(new FileInputStream(file));
}
loadClassifier(bis, props);
bis.close();
Timing.endDoing();
} | java | public void loadClassifier(File file, Properties props) throws ClassCastException, IOException,
ClassNotFoundException {
Timing.startDoing("Loading classifier from " + file.getAbsolutePath());
BufferedInputStream bis;
if (file.getName().endsWith(".gz")) {
bis = new BufferedInputStream(new GZIPInputStream(new FileInputStream(file)));
} else {
bis = new BufferedInputStream(new FileInputStream(file));
}
loadClassifier(bis, props);
bis.close();
Timing.endDoing();
} | [
"public",
"void",
"loadClassifier",
"(",
"File",
"file",
",",
"Properties",
"props",
")",
"throws",
"ClassCastException",
",",
"IOException",
",",
"ClassNotFoundException",
"{",
"Timing",
".",
"startDoing",
"(",
"\"Loading classifier from \"",
"+",
"file",
".",
"getAbsolutePath",
"(",
")",
")",
";",
"BufferedInputStream",
"bis",
";",
"if",
"(",
"file",
".",
"getName",
"(",
")",
".",
"endsWith",
"(",
"\".gz\"",
")",
")",
"{",
"bis",
"=",
"new",
"BufferedInputStream",
"(",
"new",
"GZIPInputStream",
"(",
"new",
"FileInputStream",
"(",
"file",
")",
")",
")",
";",
"}",
"else",
"{",
"bis",
"=",
"new",
"BufferedInputStream",
"(",
"new",
"FileInputStream",
"(",
"file",
")",
")",
";",
"}",
"loadClassifier",
"(",
"bis",
",",
"props",
")",
";",
"bis",
".",
"close",
"(",
")",
";",
"Timing",
".",
"endDoing",
"(",
")",
";",
"}"
] | Loads a classifier from the file specified. If the file's name ends in .gz,
uses a GZIPInputStream, else uses a regular FileInputStream. This method
closes the File when done.
@param file
Loads a classifier from this file.
@param props
Properties in this object will be used to overwrite those
specified in the serialized classifier
@throws IOException
If there are problems accessing the input stream
@throws ClassCastException
If there are problems interpreting the serialized data
@throws ClassNotFoundException
If there are problems interpreting the serialized data | [
"Loads",
"a",
"classifier",
"from",
"the",
"file",
"specified",
".",
"If",
"the",
"file",
"s",
"name",
"ends",
"in",
".",
"gz",
"uses",
"a",
"GZIPInputStream",
"else",
"uses",
"a",
"regular",
"FileInputStream",
".",
"This",
"method",
"closes",
"the",
"File",
"when",
"done",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1649-L1661 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.printFeatures | protected void printFeatures(IN wi, Collection<String> features) {
if (flags.printFeatures == null || writtenNum > flags.printFeaturesUpto) {
return;
}
try {
if (cliqueWriter == null) {
cliqueWriter = new PrintWriter(new FileOutputStream("feats" + flags.printFeatures + ".txt"), true);
writtenNum = 0;
}
} catch (Exception ioe) {
throw new RuntimeException(ioe);
}
if (writtenNum >= flags.printFeaturesUpto) {
return;
}
if (wi instanceof CoreLabel) {
cliqueWriter.print(wi.get(TextAnnotation.class) + ' ' + wi.get(PartOfSpeechAnnotation.class) + ' '
+ wi.get(CoreAnnotations.GoldAnswerAnnotation.class) + '\t');
} else {
cliqueWriter.print(wi.get(CoreAnnotations.TextAnnotation.class)
+ wi.get(CoreAnnotations.GoldAnswerAnnotation.class) + '\t');
}
boolean first = true;
for (Object feat : features) {
if (first) {
first = false;
} else {
cliqueWriter.print(" ");
}
cliqueWriter.print(feat);
}
cliqueWriter.println();
writtenNum++;
} | java | protected void printFeatures(IN wi, Collection<String> features) {
if (flags.printFeatures == null || writtenNum > flags.printFeaturesUpto) {
return;
}
try {
if (cliqueWriter == null) {
cliqueWriter = new PrintWriter(new FileOutputStream("feats" + flags.printFeatures + ".txt"), true);
writtenNum = 0;
}
} catch (Exception ioe) {
throw new RuntimeException(ioe);
}
if (writtenNum >= flags.printFeaturesUpto) {
return;
}
if (wi instanceof CoreLabel) {
cliqueWriter.print(wi.get(TextAnnotation.class) + ' ' + wi.get(PartOfSpeechAnnotation.class) + ' '
+ wi.get(CoreAnnotations.GoldAnswerAnnotation.class) + '\t');
} else {
cliqueWriter.print(wi.get(CoreAnnotations.TextAnnotation.class)
+ wi.get(CoreAnnotations.GoldAnswerAnnotation.class) + '\t');
}
boolean first = true;
for (Object feat : features) {
if (first) {
first = false;
} else {
cliqueWriter.print(" ");
}
cliqueWriter.print(feat);
}
cliqueWriter.println();
writtenNum++;
} | [
"protected",
"void",
"printFeatures",
"(",
"IN",
"wi",
",",
"Collection",
"<",
"String",
">",
"features",
")",
"{",
"if",
"(",
"flags",
".",
"printFeatures",
"==",
"null",
"||",
"writtenNum",
">",
"flags",
".",
"printFeaturesUpto",
")",
"{",
"return",
";",
"}",
"try",
"{",
"if",
"(",
"cliqueWriter",
"==",
"null",
")",
"{",
"cliqueWriter",
"=",
"new",
"PrintWriter",
"(",
"new",
"FileOutputStream",
"(",
"\"feats\"",
"+",
"flags",
".",
"printFeatures",
"+",
"\".txt\"",
")",
",",
"true",
")",
";",
"writtenNum",
"=",
"0",
";",
"}",
"}",
"catch",
"(",
"Exception",
"ioe",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"ioe",
")",
";",
"}",
"if",
"(",
"writtenNum",
">=",
"flags",
".",
"printFeaturesUpto",
")",
"{",
"return",
";",
"}",
"if",
"(",
"wi",
"instanceof",
"CoreLabel",
")",
"{",
"cliqueWriter",
".",
"print",
"(",
"wi",
".",
"get",
"(",
"TextAnnotation",
".",
"class",
")",
"+",
"'",
"'",
"+",
"wi",
".",
"get",
"(",
"PartOfSpeechAnnotation",
".",
"class",
")",
"+",
"'",
"'",
"+",
"wi",
".",
"get",
"(",
"CoreAnnotations",
".",
"GoldAnswerAnnotation",
".",
"class",
")",
"+",
"'",
"'",
")",
";",
"}",
"else",
"{",
"cliqueWriter",
".",
"print",
"(",
"wi",
".",
"get",
"(",
"CoreAnnotations",
".",
"TextAnnotation",
".",
"class",
")",
"+",
"wi",
".",
"get",
"(",
"CoreAnnotations",
".",
"GoldAnswerAnnotation",
".",
"class",
")",
"+",
"'",
"'",
")",
";",
"}",
"boolean",
"first",
"=",
"true",
";",
"for",
"(",
"Object",
"feat",
":",
"features",
")",
"{",
"if",
"(",
"first",
")",
"{",
"first",
"=",
"false",
";",
"}",
"else",
"{",
"cliqueWriter",
".",
"print",
"(",
"\" \"",
")",
";",
"}",
"cliqueWriter",
".",
"print",
"(",
"feat",
")",
";",
"}",
"cliqueWriter",
".",
"println",
"(",
")",
";",
"writtenNum",
"++",
";",
"}"
] | Print the String features generated from a IN | [
"Print",
"the",
"String",
"features",
"generated",
"from",
"a",
"IN"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1712-L1745 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_intranetip_binding.java | aaauser_intranetip_binding.get | public static aaauser_intranetip_binding[] get(nitro_service service, String username) throws Exception{
aaauser_intranetip_binding obj = new aaauser_intranetip_binding();
obj.set_username(username);
aaauser_intranetip_binding response[] = (aaauser_intranetip_binding[]) obj.get_resources(service);
return response;
} | java | public static aaauser_intranetip_binding[] get(nitro_service service, String username) throws Exception{
aaauser_intranetip_binding obj = new aaauser_intranetip_binding();
obj.set_username(username);
aaauser_intranetip_binding response[] = (aaauser_intranetip_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"aaauser_intranetip_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"username",
")",
"throws",
"Exception",
"{",
"aaauser_intranetip_binding",
"obj",
"=",
"new",
"aaauser_intranetip_binding",
"(",
")",
";",
"obj",
".",
"set_username",
"(",
"username",
")",
";",
"aaauser_intranetip_binding",
"response",
"[",
"]",
"=",
"(",
"aaauser_intranetip_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch aaauser_intranetip_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"aaauser_intranetip_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_intranetip_binding.java#L177-L182 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/trees/tregex/TregexMatcher.java | TregexMatcher.find | public boolean find() {
if (findIterator == null) {
findIterator = root.iterator();
}
if (findCurrent != null && matches()) {
return true;
}
while (findIterator.hasNext()) {
findCurrent = findIterator.next();
resetChildIter(findCurrent);
if (matches()) {
return true;
}
}
return false;
} | java | public boolean find() {
if (findIterator == null) {
findIterator = root.iterator();
}
if (findCurrent != null && matches()) {
return true;
}
while (findIterator.hasNext()) {
findCurrent = findIterator.next();
resetChildIter(findCurrent);
if (matches()) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"find",
"(",
")",
"{",
"if",
"(",
"findIterator",
"==",
"null",
")",
"{",
"findIterator",
"=",
"root",
".",
"iterator",
"(",
")",
";",
"}",
"if",
"(",
"findCurrent",
"!=",
"null",
"&&",
"matches",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"while",
"(",
"findIterator",
".",
"hasNext",
"(",
")",
")",
"{",
"findCurrent",
"=",
"findIterator",
".",
"next",
"(",
")",
";",
"resetChildIter",
"(",
"findCurrent",
")",
";",
"if",
"(",
"matches",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] | Find the next match of the pattern on the tree
@return whether there is a match somewhere in the tree | [
"Find",
"the",
"next",
"match",
"of",
"the",
"pattern",
"on",
"the",
"tree"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/tregex/TregexMatcher.java#L122-L137 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslciphersuite.java | sslciphersuite.get | public static sslciphersuite[] get(nitro_service service, options option) throws Exception{
sslciphersuite obj = new sslciphersuite();
sslciphersuite[] response = (sslciphersuite[])obj.get_resources(service,option);
return response;
} | java | public static sslciphersuite[] get(nitro_service service, options option) throws Exception{
sslciphersuite obj = new sslciphersuite();
sslciphersuite[] response = (sslciphersuite[])obj.get_resources(service,option);
return response;
} | [
"public",
"static",
"sslciphersuite",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"options",
"option",
")",
"throws",
"Exception",
"{",
"sslciphersuite",
"obj",
"=",
"new",
"sslciphersuite",
"(",
")",
";",
"sslciphersuite",
"[",
"]",
"response",
"=",
"(",
"sslciphersuite",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the sslciphersuite resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"sslciphersuite",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslciphersuite.java#L114-L118 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslciphersuite.java | sslciphersuite.get | public static sslciphersuite get(nitro_service service, String ciphername) throws Exception{
sslciphersuite obj = new sslciphersuite();
obj.set_ciphername(ciphername);
sslciphersuite response = (sslciphersuite) obj.get_resource(service);
return response;
} | java | public static sslciphersuite get(nitro_service service, String ciphername) throws Exception{
sslciphersuite obj = new sslciphersuite();
obj.set_ciphername(ciphername);
sslciphersuite response = (sslciphersuite) obj.get_resource(service);
return response;
} | [
"public",
"static",
"sslciphersuite",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"ciphername",
")",
"throws",
"Exception",
"{",
"sslciphersuite",
"obj",
"=",
"new",
"sslciphersuite",
"(",
")",
";",
"obj",
".",
"set_ciphername",
"(",
"ciphername",
")",
";",
"sslciphersuite",
"response",
"=",
"(",
"sslciphersuite",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch sslciphersuite resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslciphersuite",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslciphersuite.java#L122-L127 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslciphersuite.java | sslciphersuite.get | public static sslciphersuite[] get(nitro_service service, String ciphername[]) throws Exception{
if (ciphername !=null && ciphername.length>0) {
sslciphersuite response[] = new sslciphersuite[ciphername.length];
sslciphersuite obj[] = new sslciphersuite[ciphername.length];
for (int i=0;i<ciphername.length;i++) {
obj[i] = new sslciphersuite();
obj[i].set_ciphername(ciphername[i]);
response[i] = (sslciphersuite) obj[i].get_resource(service);
}
return response;
}
return null;
} | java | public static sslciphersuite[] get(nitro_service service, String ciphername[]) throws Exception{
if (ciphername !=null && ciphername.length>0) {
sslciphersuite response[] = new sslciphersuite[ciphername.length];
sslciphersuite obj[] = new sslciphersuite[ciphername.length];
for (int i=0;i<ciphername.length;i++) {
obj[i] = new sslciphersuite();
obj[i].set_ciphername(ciphername[i]);
response[i] = (sslciphersuite) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"public",
"static",
"sslciphersuite",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"ciphername",
"[",
"]",
")",
"throws",
"Exception",
"{",
"if",
"(",
"ciphername",
"!=",
"null",
"&&",
"ciphername",
".",
"length",
">",
"0",
")",
"{",
"sslciphersuite",
"response",
"[",
"]",
"=",
"new",
"sslciphersuite",
"[",
"ciphername",
".",
"length",
"]",
";",
"sslciphersuite",
"obj",
"[",
"]",
"=",
"new",
"sslciphersuite",
"[",
"ciphername",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ciphername",
".",
"length",
";",
"i",
"++",
")",
"{",
"obj",
"[",
"i",
"]",
"=",
"new",
"sslciphersuite",
"(",
")",
";",
"obj",
"[",
"i",
"]",
".",
"set_ciphername",
"(",
"ciphername",
"[",
"i",
"]",
")",
";",
"response",
"[",
"i",
"]",
"=",
"(",
"sslciphersuite",
")",
"obj",
"[",
"i",
"]",
".",
"get_resource",
"(",
"service",
")",
";",
"}",
"return",
"response",
";",
"}",
"return",
"null",
";",
"}"
] | Use this API to fetch sslciphersuite resources of given names . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslciphersuite",
"resources",
"of",
"given",
"names",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslciphersuite.java#L132-L144 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_individualcipher_binding.java | sslcipher_individualcipher_binding.get | public static sslcipher_individualcipher_binding[] get(nitro_service service, String ciphergroupname) throws Exception{
sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding();
obj.set_ciphergroupname(ciphergroupname);
sslcipher_individualcipher_binding response[] = (sslcipher_individualcipher_binding[]) obj.get_resources(service);
return response;
} | java | public static sslcipher_individualcipher_binding[] get(nitro_service service, String ciphergroupname) throws Exception{
sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding();
obj.set_ciphergroupname(ciphergroupname);
sslcipher_individualcipher_binding response[] = (sslcipher_individualcipher_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"sslcipher_individualcipher_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"ciphergroupname",
")",
"throws",
"Exception",
"{",
"sslcipher_individualcipher_binding",
"obj",
"=",
"new",
"sslcipher_individualcipher_binding",
"(",
")",
";",
"obj",
".",
"set_ciphergroupname",
"(",
"ciphergroupname",
")",
";",
"sslcipher_individualcipher_binding",
"response",
"[",
"]",
"=",
"(",
"sslcipher_individualcipher_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch sslcipher_individualcipher_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslcipher_individualcipher_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_individualcipher_binding.java#L179-L184 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_individualcipher_binding.java | sslcipher_individualcipher_binding.get_filtered | public static sslcipher_individualcipher_binding[] get_filtered(nitro_service service, String ciphergroupname, filtervalue[] filter) throws Exception{
sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding();
obj.set_ciphergroupname(ciphergroupname);
options option = new options();
option.set_filter(filter);
sslcipher_individualcipher_binding[] response = (sslcipher_individualcipher_binding[]) obj.getfiltered(service, option);
return response;
} | java | public static sslcipher_individualcipher_binding[] get_filtered(nitro_service service, String ciphergroupname, filtervalue[] filter) throws Exception{
sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding();
obj.set_ciphergroupname(ciphergroupname);
options option = new options();
option.set_filter(filter);
sslcipher_individualcipher_binding[] response = (sslcipher_individualcipher_binding[]) obj.getfiltered(service, option);
return response;
} | [
"public",
"static",
"sslcipher_individualcipher_binding",
"[",
"]",
"get_filtered",
"(",
"nitro_service",
"service",
",",
"String",
"ciphergroupname",
",",
"filtervalue",
"[",
"]",
"filter",
")",
"throws",
"Exception",
"{",
"sslcipher_individualcipher_binding",
"obj",
"=",
"new",
"sslcipher_individualcipher_binding",
"(",
")",
";",
"obj",
".",
"set_ciphergroupname",
"(",
"ciphergroupname",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_filter",
"(",
"filter",
")",
";",
"sslcipher_individualcipher_binding",
"[",
"]",
"response",
"=",
"(",
"sslcipher_individualcipher_binding",
"[",
"]",
")",
"obj",
".",
"getfiltered",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch filtered set of sslcipher_individualcipher_binding resources.
set the filter parameter values in filtervalue object. | [
"Use",
"this",
"API",
"to",
"fetch",
"filtered",
"set",
"of",
"sslcipher_individualcipher_binding",
"resources",
".",
"set",
"the",
"filter",
"parameter",
"values",
"in",
"filtervalue",
"object",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_individualcipher_binding.java#L203-L210 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_individualcipher_binding.java | sslcipher_individualcipher_binding.count | public static long count(nitro_service service, String ciphergroupname) throws Exception{
sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding();
obj.set_ciphergroupname(ciphergroupname);
options option = new options();
option.set_count(true);
sslcipher_individualcipher_binding response[] = (sslcipher_individualcipher_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | java | public static long count(nitro_service service, String ciphergroupname) throws Exception{
sslcipher_individualcipher_binding obj = new sslcipher_individualcipher_binding();
obj.set_ciphergroupname(ciphergroupname);
options option = new options();
option.set_count(true);
sslcipher_individualcipher_binding response[] = (sslcipher_individualcipher_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | [
"public",
"static",
"long",
"count",
"(",
"nitro_service",
"service",
",",
"String",
"ciphergroupname",
")",
"throws",
"Exception",
"{",
"sslcipher_individualcipher_binding",
"obj",
"=",
"new",
"sslcipher_individualcipher_binding",
"(",
")",
";",
"obj",
".",
"set_ciphergroupname",
"(",
"ciphergroupname",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_count",
"(",
"true",
")",
";",
"sslcipher_individualcipher_binding",
"response",
"[",
"]",
"=",
"(",
"sslcipher_individualcipher_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"if",
"(",
"response",
"!=",
"null",
")",
"{",
"return",
"response",
"[",
"0",
"]",
".",
"__count",
";",
"}",
"return",
"0",
";",
"}"
] | Use this API to count sslcipher_individualcipher_binding resources configued on NetScaler. | [
"Use",
"this",
"API",
"to",
"count",
"sslcipher_individualcipher_binding",
"resources",
"configued",
"on",
"NetScaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_individualcipher_binding.java#L215-L225 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java | inat.add | public static base_response add(nitro_service client, inat resource) throws Exception {
inat addresource = new inat();
addresource.name = resource.name;
addresource.publicip = resource.publicip;
addresource.privateip = resource.privateip;
addresource.tcpproxy = resource.tcpproxy;
addresource.ftp = resource.ftp;
addresource.tftp = resource.tftp;
addresource.usip = resource.usip;
addresource.usnip = resource.usnip;
addresource.proxyip = resource.proxyip;
addresource.mode = resource.mode;
addresource.td = resource.td;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, inat resource) throws Exception {
inat addresource = new inat();
addresource.name = resource.name;
addresource.publicip = resource.publicip;
addresource.privateip = resource.privateip;
addresource.tcpproxy = resource.tcpproxy;
addresource.ftp = resource.ftp;
addresource.tftp = resource.tftp;
addresource.usip = resource.usip;
addresource.usnip = resource.usnip;
addresource.proxyip = resource.proxyip;
addresource.mode = resource.mode;
addresource.td = resource.td;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"inat",
"resource",
")",
"throws",
"Exception",
"{",
"inat",
"addresource",
"=",
"new",
"inat",
"(",
")",
";",
"addresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"addresource",
".",
"publicip",
"=",
"resource",
".",
"publicip",
";",
"addresource",
".",
"privateip",
"=",
"resource",
".",
"privateip",
";",
"addresource",
".",
"tcpproxy",
"=",
"resource",
".",
"tcpproxy",
";",
"addresource",
".",
"ftp",
"=",
"resource",
".",
"ftp",
";",
"addresource",
".",
"tftp",
"=",
"resource",
".",
"tftp",
";",
"addresource",
".",
"usip",
"=",
"resource",
".",
"usip",
";",
"addresource",
".",
"usnip",
"=",
"resource",
".",
"usnip",
";",
"addresource",
".",
"proxyip",
"=",
"resource",
".",
"proxyip",
";",
"addresource",
".",
"mode",
"=",
"resource",
".",
"mode",
";",
"addresource",
".",
"td",
"=",
"resource",
".",
"td",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add inat. | [
"Use",
"this",
"API",
"to",
"add",
"inat",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java#L305-L319 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java | inat.add | public static base_responses add(nitro_service client, inat resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
inat addresources[] = new inat[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new inat();
addresources[i].name = resources[i].name;
addresources[i].publicip = resources[i].publicip;
addresources[i].privateip = resources[i].privateip;
addresources[i].tcpproxy = resources[i].tcpproxy;
addresources[i].ftp = resources[i].ftp;
addresources[i].tftp = resources[i].tftp;
addresources[i].usip = resources[i].usip;
addresources[i].usnip = resources[i].usnip;
addresources[i].proxyip = resources[i].proxyip;
addresources[i].mode = resources[i].mode;
addresources[i].td = resources[i].td;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | public static base_responses add(nitro_service client, inat resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
inat addresources[] = new inat[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new inat();
addresources[i].name = resources[i].name;
addresources[i].publicip = resources[i].publicip;
addresources[i].privateip = resources[i].privateip;
addresources[i].tcpproxy = resources[i].tcpproxy;
addresources[i].ftp = resources[i].ftp;
addresources[i].tftp = resources[i].tftp;
addresources[i].usip = resources[i].usip;
addresources[i].usnip = resources[i].usnip;
addresources[i].proxyip = resources[i].proxyip;
addresources[i].mode = resources[i].mode;
addresources[i].td = resources[i].td;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"public",
"static",
"base_responses",
"add",
"(",
"nitro_service",
"client",
",",
"inat",
"resources",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"resources",
"!=",
"null",
"&&",
"resources",
".",
"length",
">",
"0",
")",
"{",
"inat",
"addresources",
"[",
"]",
"=",
"new",
"inat",
"[",
"resources",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"addresources",
"[",
"i",
"]",
"=",
"new",
"inat",
"(",
")",
";",
"addresources",
"[",
"i",
"]",
".",
"name",
"=",
"resources",
"[",
"i",
"]",
".",
"name",
";",
"addresources",
"[",
"i",
"]",
".",
"publicip",
"=",
"resources",
"[",
"i",
"]",
".",
"publicip",
";",
"addresources",
"[",
"i",
"]",
".",
"privateip",
"=",
"resources",
"[",
"i",
"]",
".",
"privateip",
";",
"addresources",
"[",
"i",
"]",
".",
"tcpproxy",
"=",
"resources",
"[",
"i",
"]",
".",
"tcpproxy",
";",
"addresources",
"[",
"i",
"]",
".",
"ftp",
"=",
"resources",
"[",
"i",
"]",
".",
"ftp",
";",
"addresources",
"[",
"i",
"]",
".",
"tftp",
"=",
"resources",
"[",
"i",
"]",
".",
"tftp",
";",
"addresources",
"[",
"i",
"]",
".",
"usip",
"=",
"resources",
"[",
"i",
"]",
".",
"usip",
";",
"addresources",
"[",
"i",
"]",
".",
"usnip",
"=",
"resources",
"[",
"i",
"]",
".",
"usnip",
";",
"addresources",
"[",
"i",
"]",
".",
"proxyip",
"=",
"resources",
"[",
"i",
"]",
".",
"proxyip",
";",
"addresources",
"[",
"i",
"]",
".",
"mode",
"=",
"resources",
"[",
"i",
"]",
".",
"mode",
";",
"addresources",
"[",
"i",
"]",
".",
"td",
"=",
"resources",
"[",
"i",
"]",
".",
"td",
";",
"}",
"result",
"=",
"add_bulk_request",
"(",
"client",
",",
"addresources",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to add inat resources. | [
"Use",
"this",
"API",
"to",
"add",
"inat",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java#L324-L345 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java | inat.update | public static base_response update(nitro_service client, inat resource) throws Exception {
inat updateresource = new inat();
updateresource.name = resource.name;
updateresource.privateip = resource.privateip;
updateresource.tcpproxy = resource.tcpproxy;
updateresource.ftp = resource.ftp;
updateresource.tftp = resource.tftp;
updateresource.usip = resource.usip;
updateresource.usnip = resource.usnip;
updateresource.proxyip = resource.proxyip;
updateresource.mode = resource.mode;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, inat resource) throws Exception {
inat updateresource = new inat();
updateresource.name = resource.name;
updateresource.privateip = resource.privateip;
updateresource.tcpproxy = resource.tcpproxy;
updateresource.ftp = resource.ftp;
updateresource.tftp = resource.tftp;
updateresource.usip = resource.usip;
updateresource.usnip = resource.usnip;
updateresource.proxyip = resource.proxyip;
updateresource.mode = resource.mode;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"inat",
"resource",
")",
"throws",
"Exception",
"{",
"inat",
"updateresource",
"=",
"new",
"inat",
"(",
")",
";",
"updateresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"updateresource",
".",
"privateip",
"=",
"resource",
".",
"privateip",
";",
"updateresource",
".",
"tcpproxy",
"=",
"resource",
".",
"tcpproxy",
";",
"updateresource",
".",
"ftp",
"=",
"resource",
".",
"ftp",
";",
"updateresource",
".",
"tftp",
"=",
"resource",
".",
"tftp",
";",
"updateresource",
".",
"usip",
"=",
"resource",
".",
"usip",
";",
"updateresource",
".",
"usnip",
"=",
"resource",
".",
"usnip",
";",
"updateresource",
".",
"proxyip",
"=",
"resource",
".",
"proxyip",
";",
"updateresource",
".",
"mode",
"=",
"resource",
".",
"mode",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update inat. | [
"Use",
"this",
"API",
"to",
"update",
"inat",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java#L400-L412 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java | inat.update | public static base_responses update(nitro_service client, inat resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
inat updateresources[] = new inat[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new inat();
updateresources[i].name = resources[i].name;
updateresources[i].privateip = resources[i].privateip;
updateresources[i].tcpproxy = resources[i].tcpproxy;
updateresources[i].ftp = resources[i].ftp;
updateresources[i].tftp = resources[i].tftp;
updateresources[i].usip = resources[i].usip;
updateresources[i].usnip = resources[i].usnip;
updateresources[i].proxyip = resources[i].proxyip;
updateresources[i].mode = resources[i].mode;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java | public static base_responses update(nitro_service client, inat resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
inat updateresources[] = new inat[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new inat();
updateresources[i].name = resources[i].name;
updateresources[i].privateip = resources[i].privateip;
updateresources[i].tcpproxy = resources[i].tcpproxy;
updateresources[i].ftp = resources[i].ftp;
updateresources[i].tftp = resources[i].tftp;
updateresources[i].usip = resources[i].usip;
updateresources[i].usnip = resources[i].usnip;
updateresources[i].proxyip = resources[i].proxyip;
updateresources[i].mode = resources[i].mode;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"public",
"static",
"base_responses",
"update",
"(",
"nitro_service",
"client",
",",
"inat",
"resources",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"resources",
"!=",
"null",
"&&",
"resources",
".",
"length",
">",
"0",
")",
"{",
"inat",
"updateresources",
"[",
"]",
"=",
"new",
"inat",
"[",
"resources",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"updateresources",
"[",
"i",
"]",
"=",
"new",
"inat",
"(",
")",
";",
"updateresources",
"[",
"i",
"]",
".",
"name",
"=",
"resources",
"[",
"i",
"]",
".",
"name",
";",
"updateresources",
"[",
"i",
"]",
".",
"privateip",
"=",
"resources",
"[",
"i",
"]",
".",
"privateip",
";",
"updateresources",
"[",
"i",
"]",
".",
"tcpproxy",
"=",
"resources",
"[",
"i",
"]",
".",
"tcpproxy",
";",
"updateresources",
"[",
"i",
"]",
".",
"ftp",
"=",
"resources",
"[",
"i",
"]",
".",
"ftp",
";",
"updateresources",
"[",
"i",
"]",
".",
"tftp",
"=",
"resources",
"[",
"i",
"]",
".",
"tftp",
";",
"updateresources",
"[",
"i",
"]",
".",
"usip",
"=",
"resources",
"[",
"i",
"]",
".",
"usip",
";",
"updateresources",
"[",
"i",
"]",
".",
"usnip",
"=",
"resources",
"[",
"i",
"]",
".",
"usnip",
";",
"updateresources",
"[",
"i",
"]",
".",
"proxyip",
"=",
"resources",
"[",
"i",
"]",
".",
"proxyip",
";",
"updateresources",
"[",
"i",
"]",
".",
"mode",
"=",
"resources",
"[",
"i",
"]",
".",
"mode",
";",
"}",
"result",
"=",
"update_bulk_request",
"(",
"client",
",",
"updateresources",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to update inat resources. | [
"Use",
"this",
"API",
"to",
"update",
"inat",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java#L417-L436 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java | inat.get | public static inat[] get(nitro_service service) throws Exception{
inat obj = new inat();
inat[] response = (inat[])obj.get_resources(service);
return response;
} | java | public static inat[] get(nitro_service service) throws Exception{
inat obj = new inat();
inat[] response = (inat[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"inat",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"inat",
"obj",
"=",
"new",
"inat",
"(",
")",
";",
"inat",
"[",
"]",
"response",
"=",
"(",
"inat",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the inat resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"inat",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java#L485-L489 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java | inat.get | public static inat get(nitro_service service, String name) throws Exception{
inat obj = new inat();
obj.set_name(name);
inat response = (inat) obj.get_resource(service);
return response;
} | java | public static inat get(nitro_service service, String name) throws Exception{
inat obj = new inat();
obj.set_name(name);
inat response = (inat) obj.get_resource(service);
return response;
} | [
"public",
"static",
"inat",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"inat",
"obj",
"=",
"new",
"inat",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"inat",
"response",
"=",
"(",
"inat",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch inat resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"inat",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/inat.java#L501-L506 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java | vpnclientlessaccesspolicy.add | public static base_response add(nitro_service client, vpnclientlessaccesspolicy resource) throws Exception {
vpnclientlessaccesspolicy addresource = new vpnclientlessaccesspolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.profilename = resource.profilename;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, vpnclientlessaccesspolicy resource) throws Exception {
vpnclientlessaccesspolicy addresource = new vpnclientlessaccesspolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.profilename = resource.profilename;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"vpnclientlessaccesspolicy",
"resource",
")",
"throws",
"Exception",
"{",
"vpnclientlessaccesspolicy",
"addresource",
"=",
"new",
"vpnclientlessaccesspolicy",
"(",
")",
";",
"addresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"addresource",
".",
"rule",
"=",
"resource",
".",
"rule",
";",
"addresource",
".",
"profilename",
"=",
"resource",
".",
"profilename",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add vpnclientlessaccesspolicy. | [
"Use",
"this",
"API",
"to",
"add",
"vpnclientlessaccesspolicy",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java#L196-L202 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java | vpnclientlessaccesspolicy.update | public static base_response update(nitro_service client, vpnclientlessaccesspolicy resource) throws Exception {
vpnclientlessaccesspolicy updateresource = new vpnclientlessaccesspolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.profilename = resource.profilename;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, vpnclientlessaccesspolicy resource) throws Exception {
vpnclientlessaccesspolicy updateresource = new vpnclientlessaccesspolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.profilename = resource.profilename;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"vpnclientlessaccesspolicy",
"resource",
")",
"throws",
"Exception",
"{",
"vpnclientlessaccesspolicy",
"updateresource",
"=",
"new",
"vpnclientlessaccesspolicy",
"(",
")",
";",
"updateresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"updateresource",
".",
"rule",
"=",
"resource",
".",
"rule",
";",
"updateresource",
".",
"profilename",
"=",
"resource",
".",
"profilename",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update vpnclientlessaccesspolicy. | [
"Use",
"this",
"API",
"to",
"update",
"vpnclientlessaccesspolicy",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java#L275-L281 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java | vpnclientlessaccesspolicy.get | public static vpnclientlessaccesspolicy[] get(nitro_service service) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
vpnclientlessaccesspolicy[] response = (vpnclientlessaccesspolicy[])obj.get_resources(service);
return response;
} | java | public static vpnclientlessaccesspolicy[] get(nitro_service service) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
vpnclientlessaccesspolicy[] response = (vpnclientlessaccesspolicy[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"vpnclientlessaccesspolicy",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"vpnclientlessaccesspolicy",
"obj",
"=",
"new",
"vpnclientlessaccesspolicy",
"(",
")",
";",
"vpnclientlessaccesspolicy",
"[",
"]",
"response",
"=",
"(",
"vpnclientlessaccesspolicy",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the vpnclientlessaccesspolicy resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"vpnclientlessaccesspolicy",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java#L304-L308 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java | vpnclientlessaccesspolicy.get | public static vpnclientlessaccesspolicy get(nitro_service service, String name) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
obj.set_name(name);
vpnclientlessaccesspolicy response = (vpnclientlessaccesspolicy) obj.get_resource(service);
return response;
} | java | public static vpnclientlessaccesspolicy get(nitro_service service, String name) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
obj.set_name(name);
vpnclientlessaccesspolicy response = (vpnclientlessaccesspolicy) obj.get_resource(service);
return response;
} | [
"public",
"static",
"vpnclientlessaccesspolicy",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"vpnclientlessaccesspolicy",
"obj",
"=",
"new",
"vpnclientlessaccesspolicy",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"vpnclientlessaccesspolicy",
"response",
"=",
"(",
"vpnclientlessaccesspolicy",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch vpnclientlessaccesspolicy resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"vpnclientlessaccesspolicy",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java#L320-L325 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java | vpnclientlessaccesspolicy.get_filtered | public static vpnclientlessaccesspolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
options option = new options();
option.set_filter(filter);
vpnclientlessaccesspolicy[] response = (vpnclientlessaccesspolicy[]) obj.getfiltered(service, option);
return response;
} | java | public static vpnclientlessaccesspolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
options option = new options();
option.set_filter(filter);
vpnclientlessaccesspolicy[] response = (vpnclientlessaccesspolicy[]) obj.getfiltered(service, option);
return response;
} | [
"public",
"static",
"vpnclientlessaccesspolicy",
"[",
"]",
"get_filtered",
"(",
"nitro_service",
"service",
",",
"filtervalue",
"[",
"]",
"filter",
")",
"throws",
"Exception",
"{",
"vpnclientlessaccesspolicy",
"obj",
"=",
"new",
"vpnclientlessaccesspolicy",
"(",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_filter",
"(",
"filter",
")",
";",
"vpnclientlessaccesspolicy",
"[",
"]",
"response",
"=",
"(",
"vpnclientlessaccesspolicy",
"[",
"]",
")",
"obj",
".",
"getfiltered",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch filtered set of vpnclientlessaccesspolicy resources.
set the filter parameter values in filtervalue object. | [
"Use",
"this",
"API",
"to",
"fetch",
"filtered",
"set",
"of",
"vpnclientlessaccesspolicy",
"resources",
".",
"set",
"the",
"filter",
"parameter",
"values",
"in",
"filtervalue",
"object",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy.java#L359-L365 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_vpnsessionpolicy_binding.java | aaagroup_vpnsessionpolicy_binding.get | public static aaagroup_vpnsessionpolicy_binding[] get(nitro_service service, String groupname) throws Exception{
aaagroup_vpnsessionpolicy_binding obj = new aaagroup_vpnsessionpolicy_binding();
obj.set_groupname(groupname);
aaagroup_vpnsessionpolicy_binding response[] = (aaagroup_vpnsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static aaagroup_vpnsessionpolicy_binding[] get(nitro_service service, String groupname) throws Exception{
aaagroup_vpnsessionpolicy_binding obj = new aaagroup_vpnsessionpolicy_binding();
obj.set_groupname(groupname);
aaagroup_vpnsessionpolicy_binding response[] = (aaagroup_vpnsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"aaagroup_vpnsessionpolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"groupname",
")",
"throws",
"Exception",
"{",
"aaagroup_vpnsessionpolicy_binding",
"obj",
"=",
"new",
"aaagroup_vpnsessionpolicy_binding",
"(",
")",
";",
"obj",
".",
"set_groupname",
"(",
"groupname",
")",
";",
"aaagroup_vpnsessionpolicy_binding",
"response",
"[",
"]",
"=",
"(",
"aaagroup_vpnsessionpolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch aaagroup_vpnsessionpolicy_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"aaagroup_vpnsessionpolicy_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_vpnsessionpolicy_binding.java#L246-L251 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/trees/PennTreebankLanguagePack.java | PennTreebankLanguagePack.main | public static void main(String[] args) {
TreebankLanguagePack tlp = new PennTreebankLanguagePack();
System.out.println("Start symbol: " + tlp.startSymbol());
String start = tlp.startSymbol();
System.out.println("Should be true: " + (tlp.isStartSymbol(start)));
String[] strs = {"-", "-LLB-", "NP-2", "NP=3", "NP-LGS", "NP-TMP=3"};
for (String str : strs) {
System.out.println("String: " + str + " basic: " + tlp.basicCategory(str) + " basicAndFunc: " + tlp.categoryAndFunction(str));
}
} | java | public static void main(String[] args) {
TreebankLanguagePack tlp = new PennTreebankLanguagePack();
System.out.println("Start symbol: " + tlp.startSymbol());
String start = tlp.startSymbol();
System.out.println("Should be true: " + (tlp.isStartSymbol(start)));
String[] strs = {"-", "-LLB-", "NP-2", "NP=3", "NP-LGS", "NP-TMP=3"};
for (String str : strs) {
System.out.println("String: " + str + " basic: " + tlp.basicCategory(str) + " basicAndFunc: " + tlp.categoryAndFunction(str));
}
} | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"TreebankLanguagePack",
"tlp",
"=",
"new",
"PennTreebankLanguagePack",
"(",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"Start symbol: \"",
"+",
"tlp",
".",
"startSymbol",
"(",
")",
")",
";",
"String",
"start",
"=",
"tlp",
".",
"startSymbol",
"(",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"Should be true: \"",
"+",
"(",
"tlp",
".",
"isStartSymbol",
"(",
"start",
")",
")",
")",
";",
"String",
"[",
"]",
"strs",
"=",
"{",
"\"-\"",
",",
"\"-LLB-\"",
",",
"\"NP-2\"",
",",
"\"NP=3\"",
",",
"\"NP-LGS\"",
",",
"\"NP-TMP=3\"",
"}",
";",
"for",
"(",
"String",
"str",
":",
"strs",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"String: \"",
"+",
"str",
"+",
"\" basic: \"",
"+",
"tlp",
".",
"basicCategory",
"(",
"str",
")",
"+",
"\" basicAndFunc: \"",
"+",
"tlp",
".",
"categoryAndFunction",
"(",
"str",
")",
")",
";",
"}",
"}"
] | Prints a few aspects of the TreebankLanguagePack, just for debugging. | [
"Prints",
"a",
"few",
"aspects",
"of",
"the",
"TreebankLanguagePack",
"just",
"for",
"debugging",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/PennTreebankLanguagePack.java#L191-L200 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_lbvserver_binding.java | auditsyslogpolicy_lbvserver_binding.get | public static auditsyslogpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
auditsyslogpolicy_lbvserver_binding obj = new auditsyslogpolicy_lbvserver_binding();
obj.set_name(name);
auditsyslogpolicy_lbvserver_binding response[] = (auditsyslogpolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | java | public static auditsyslogpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
auditsyslogpolicy_lbvserver_binding obj = new auditsyslogpolicy_lbvserver_binding();
obj.set_name(name);
auditsyslogpolicy_lbvserver_binding response[] = (auditsyslogpolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"auditsyslogpolicy_lbvserver_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"auditsyslogpolicy_lbvserver_binding",
"obj",
"=",
"new",
"auditsyslogpolicy_lbvserver_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"auditsyslogpolicy_lbvserver_binding",
"response",
"[",
"]",
"=",
"(",
"auditsyslogpolicy_lbvserver_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch auditsyslogpolicy_lbvserver_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"auditsyslogpolicy_lbvserver_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditsyslogpolicy_lbvserver_binding.java#L132-L137 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_policybinding_binding.java | appfwpolicylabel_policybinding_binding.get | public static appfwpolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{
appfwpolicylabel_policybinding_binding obj = new appfwpolicylabel_policybinding_binding();
obj.set_labelname(labelname);
appfwpolicylabel_policybinding_binding response[] = (appfwpolicylabel_policybinding_binding[]) obj.get_resources(service);
return response;
} | java | public static appfwpolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{
appfwpolicylabel_policybinding_binding obj = new appfwpolicylabel_policybinding_binding();
obj.set_labelname(labelname);
appfwpolicylabel_policybinding_binding response[] = (appfwpolicylabel_policybinding_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"appfwpolicylabel_policybinding_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"labelname",
")",
"throws",
"Exception",
"{",
"appfwpolicylabel_policybinding_binding",
"obj",
"=",
"new",
"appfwpolicylabel_policybinding_binding",
"(",
")",
";",
"obj",
".",
"set_labelname",
"(",
"labelname",
")",
";",
"appfwpolicylabel_policybinding_binding",
"response",
"[",
"]",
"=",
"(",
"appfwpolicylabel_policybinding_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch appfwpolicylabel_policybinding_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"appfwpolicylabel_policybinding_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_policybinding_binding.java#L229-L234 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nsacl6_stats.java | nsacl6_stats.get | public static nsacl6_stats[] get(nitro_service service) throws Exception{
nsacl6_stats obj = new nsacl6_stats();
nsacl6_stats[] response = (nsacl6_stats[])obj.stat_resources(service);
return response;
} | java | public static nsacl6_stats[] get(nitro_service service) throws Exception{
nsacl6_stats obj = new nsacl6_stats();
nsacl6_stats[] response = (nsacl6_stats[])obj.stat_resources(service);
return response;
} | [
"public",
"static",
"nsacl6_stats",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"nsacl6_stats",
"obj",
"=",
"new",
"nsacl6_stats",
"(",
")",
";",
"nsacl6_stats",
"[",
"]",
"response",
"=",
"(",
"nsacl6_stats",
"[",
"]",
")",
"obj",
".",
"stat_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch the statistics of all nsacl6_stats resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"the",
"statistics",
"of",
"all",
"nsacl6_stats",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nsacl6_stats.java#L281-L285 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nsacl6_stats.java | nsacl6_stats.get | public static nsacl6_stats get(nitro_service service, String acl6name) throws Exception{
nsacl6_stats obj = new nsacl6_stats();
obj.set_acl6name(acl6name);
nsacl6_stats response = (nsacl6_stats) obj.stat_resource(service);
return response;
} | java | public static nsacl6_stats get(nitro_service service, String acl6name) throws Exception{
nsacl6_stats obj = new nsacl6_stats();
obj.set_acl6name(acl6name);
nsacl6_stats response = (nsacl6_stats) obj.stat_resource(service);
return response;
} | [
"public",
"static",
"nsacl6_stats",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"acl6name",
")",
"throws",
"Exception",
"{",
"nsacl6_stats",
"obj",
"=",
"new",
"nsacl6_stats",
"(",
")",
";",
"obj",
".",
"set_acl6name",
"(",
"acl6name",
")",
";",
"nsacl6_stats",
"response",
"=",
"(",
"nsacl6_stats",
")",
"obj",
".",
"stat_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch statistics of nsacl6_stats resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"statistics",
"of",
"nsacl6_stats",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nsacl6_stats.java#L299-L304 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_vpntrafficpolicy_binding.java | vpnglobal_vpntrafficpolicy_binding.get | public static vpnglobal_vpntrafficpolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_vpntrafficpolicy_binding obj = new vpnglobal_vpntrafficpolicy_binding();
vpnglobal_vpntrafficpolicy_binding response[] = (vpnglobal_vpntrafficpolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static vpnglobal_vpntrafficpolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_vpntrafficpolicy_binding obj = new vpnglobal_vpntrafficpolicy_binding();
vpnglobal_vpntrafficpolicy_binding response[] = (vpnglobal_vpntrafficpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"vpnglobal_vpntrafficpolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"vpnglobal_vpntrafficpolicy_binding",
"obj",
"=",
"new",
"vpnglobal_vpntrafficpolicy_binding",
"(",
")",
";",
"vpnglobal_vpntrafficpolicy_binding",
"response",
"[",
"]",
"=",
"(",
"vpnglobal_vpntrafficpolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch a vpnglobal_vpntrafficpolicy_binding resources. | [
"Use",
"this",
"API",
"to",
"fetch",
"a",
"vpnglobal_vpntrafficpolicy_binding",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_vpntrafficpolicy_binding.java#L225-L229 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationnegotiatepolicy_binding.java | authenticationnegotiatepolicy_binding.get | public static authenticationnegotiatepolicy_binding get(nitro_service service, String name) throws Exception{
authenticationnegotiatepolicy_binding obj = new authenticationnegotiatepolicy_binding();
obj.set_name(name);
authenticationnegotiatepolicy_binding response = (authenticationnegotiatepolicy_binding) obj.get_resource(service);
return response;
} | java | public static authenticationnegotiatepolicy_binding get(nitro_service service, String name) throws Exception{
authenticationnegotiatepolicy_binding obj = new authenticationnegotiatepolicy_binding();
obj.set_name(name);
authenticationnegotiatepolicy_binding response = (authenticationnegotiatepolicy_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"authenticationnegotiatepolicy_binding",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"authenticationnegotiatepolicy_binding",
"obj",
"=",
"new",
"authenticationnegotiatepolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"authenticationnegotiatepolicy_binding",
"response",
"=",
"(",
"authenticationnegotiatepolicy_binding",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch authenticationnegotiatepolicy_binding resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"authenticationnegotiatepolicy_binding",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationnegotiatepolicy_binding.java#L103-L108 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/trees/WordStemmer.java | WordStemmer.main | public static void main(String[] args) {
Treebank treebank = new DiskTreebank();
treebank.loadPath(args[0]);
WordStemmer ls = new WordStemmer();
for (Tree tree : treebank) {
ls.visitTree(tree);
System.out.println(tree);
}
} | java | public static void main(String[] args) {
Treebank treebank = new DiskTreebank();
treebank.loadPath(args[0]);
WordStemmer ls = new WordStemmer();
for (Tree tree : treebank) {
ls.visitTree(tree);
System.out.println(tree);
}
} | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"Treebank",
"treebank",
"=",
"new",
"DiskTreebank",
"(",
")",
";",
"treebank",
".",
"loadPath",
"(",
"args",
"[",
"0",
"]",
")",
";",
"WordStemmer",
"ls",
"=",
"new",
"WordStemmer",
"(",
")",
";",
"for",
"(",
"Tree",
"tree",
":",
"treebank",
")",
"{",
"ls",
".",
"visitTree",
"(",
"tree",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"tree",
")",
";",
"}",
"}"
] | Reads, stems, and prints the trees in the file.
@param args Usage: WordStemmer file | [
"Reads",
"stems",
"and",
"prints",
"the",
"trees",
"in",
"the",
"file",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/WordStemmer.java#L39-L47 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbldnsentries.java | gslbldnsentries.clear | public static base_response clear(nitro_service client) throws Exception {
gslbldnsentries clearresource = new gslbldnsentries();
return clearresource.perform_operation(client,"clear");
} | java | public static base_response clear(nitro_service client) throws Exception {
gslbldnsentries clearresource = new gslbldnsentries();
return clearresource.perform_operation(client,"clear");
} | [
"public",
"static",
"base_response",
"clear",
"(",
"nitro_service",
"client",
")",
"throws",
"Exception",
"{",
"gslbldnsentries",
"clearresource",
"=",
"new",
"gslbldnsentries",
"(",
")",
";",
"return",
"clearresource",
".",
"perform_operation",
"(",
"client",
",",
"\"clear\"",
")",
";",
"}"
] | Use this API to clear gslbldnsentries. | [
"Use",
"this",
"API",
"to",
"clear",
"gslbldnsentries",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbldnsentries.java#L137-L140 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbldnsentries.java | gslbldnsentries.clear | public static base_responses clear(nitro_service client, gslbldnsentries resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbldnsentries clearresources[] = new gslbldnsentries[resources.length];
for (int i=0;i<resources.length;i++){
clearresources[i] = new gslbldnsentries();
}
result = perform_operation_bulk_request(client, clearresources,"clear");
}
return result;
} | java | public static base_responses clear(nitro_service client, gslbldnsentries resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbldnsentries clearresources[] = new gslbldnsentries[resources.length];
for (int i=0;i<resources.length;i++){
clearresources[i] = new gslbldnsentries();
}
result = perform_operation_bulk_request(client, clearresources,"clear");
}
return result;
} | [
"public",
"static",
"base_responses",
"clear",
"(",
"nitro_service",
"client",
",",
"gslbldnsentries",
"resources",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"resources",
"!=",
"null",
"&&",
"resources",
".",
"length",
">",
"0",
")",
"{",
"gslbldnsentries",
"clearresources",
"[",
"]",
"=",
"new",
"gslbldnsentries",
"[",
"resources",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"clearresources",
"[",
"i",
"]",
"=",
"new",
"gslbldnsentries",
"(",
")",
";",
"}",
"result",
"=",
"perform_operation_bulk_request",
"(",
"client",
",",
"clearresources",
",",
"\"clear\"",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to clear gslbldnsentries resources. | [
"Use",
"this",
"API",
"to",
"clear",
"gslbldnsentries",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbldnsentries.java#L145-L155 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbldnsentries.java | gslbldnsentries.get | public static gslbldnsentries[] get(nitro_service service) throws Exception{
gslbldnsentries obj = new gslbldnsentries();
gslbldnsentries[] response = (gslbldnsentries[])obj.get_resources(service);
return response;
} | java | public static gslbldnsentries[] get(nitro_service service) throws Exception{
gslbldnsentries obj = new gslbldnsentries();
gslbldnsentries[] response = (gslbldnsentries[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"gslbldnsentries",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"gslbldnsentries",
"obj",
"=",
"new",
"gslbldnsentries",
"(",
")",
";",
"gslbldnsentries",
"[",
"]",
"response",
"=",
"(",
"gslbldnsentries",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the gslbldnsentries resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"gslbldnsentries",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbldnsentries.java#L160-L164 | train |
nantesnlp/uima-tokens-regex | src/main/java/fr/univnantes/lina/uima/tkregex/model/automata/AutomatonInstance.java | AutomatonInstance.doClone | public AutomatonInstance doClone() {
AutomatonInstance clone = new AutomatonInstance(this.automatonEng, this.current, this.instanceId, this.safeGuard);
clone.failed = this.failed;
clone.transitionCount = this.transitionCount;
clone.failCount = this.failCount;
clone.iterateCount = this.iterateCount;
clone.backtrackCount = this.backtrackCount;
clone.trace = new LinkedList<>();
for(StateExploration se:this.trace) {
clone.trace.add(se.doClone());
}
return clone;
} | java | public AutomatonInstance doClone() {
AutomatonInstance clone = new AutomatonInstance(this.automatonEng, this.current, this.instanceId, this.safeGuard);
clone.failed = this.failed;
clone.transitionCount = this.transitionCount;
clone.failCount = this.failCount;
clone.iterateCount = this.iterateCount;
clone.backtrackCount = this.backtrackCount;
clone.trace = new LinkedList<>();
for(StateExploration se:this.trace) {
clone.trace.add(se.doClone());
}
return clone;
} | [
"public",
"AutomatonInstance",
"doClone",
"(",
")",
"{",
"AutomatonInstance",
"clone",
"=",
"new",
"AutomatonInstance",
"(",
"this",
".",
"automatonEng",
",",
"this",
".",
"current",
",",
"this",
".",
"instanceId",
",",
"this",
".",
"safeGuard",
")",
";",
"clone",
".",
"failed",
"=",
"this",
".",
"failed",
";",
"clone",
".",
"transitionCount",
"=",
"this",
".",
"transitionCount",
";",
"clone",
".",
"failCount",
"=",
"this",
".",
"failCount",
";",
"clone",
".",
"iterateCount",
"=",
"this",
".",
"iterateCount",
";",
"clone",
".",
"backtrackCount",
"=",
"this",
".",
"backtrackCount",
";",
"clone",
".",
"trace",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"for",
"(",
"StateExploration",
"se",
":",
"this",
".",
"trace",
")",
"{",
"clone",
".",
"trace",
".",
"add",
"(",
"se",
".",
"doClone",
"(",
")",
")",
";",
"}",
"return",
"clone",
";",
"}"
] | Creates a clone of the current automatonEng instance for
iteration alternative purposes.
@return | [
"Creates",
"a",
"clone",
"of",
"the",
"current",
"automatonEng",
"instance",
"for",
"iteration",
"alternative",
"purposes",
"."
] | 15c97c09007af9c33c7bddf8e74d5829d04623e2 | https://github.com/nantesnlp/uima-tokens-regex/blob/15c97c09007af9c33c7bddf8e74d5829d04623e2/src/main/java/fr/univnantes/lina/uima/tkregex/model/automata/AutomatonInstance.java#L74-L86 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java | clusternodegroup.add | public static base_response add(nitro_service client, clusternodegroup resource) throws Exception {
clusternodegroup addresource = new clusternodegroup();
addresource.name = resource.name;
addresource.strict = resource.strict;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, clusternodegroup resource) throws Exception {
clusternodegroup addresource = new clusternodegroup();
addresource.name = resource.name;
addresource.strict = resource.strict;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"clusternodegroup",
"resource",
")",
"throws",
"Exception",
"{",
"clusternodegroup",
"addresource",
"=",
"new",
"clusternodegroup",
"(",
")",
";",
"addresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"addresource",
".",
"strict",
"=",
"resource",
".",
"strict",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add clusternodegroup. | [
"Use",
"this",
"API",
"to",
"add",
"clusternodegroup",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java#L169-L174 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java | clusternodegroup.add | public static base_responses add(nitro_service client, clusternodegroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusternodegroup addresources[] = new clusternodegroup[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new clusternodegroup();
addresources[i].name = resources[i].name;
addresources[i].strict = resources[i].strict;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | public static base_responses add(nitro_service client, clusternodegroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusternodegroup addresources[] = new clusternodegroup[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new clusternodegroup();
addresources[i].name = resources[i].name;
addresources[i].strict = resources[i].strict;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"public",
"static",
"base_responses",
"add",
"(",
"nitro_service",
"client",
",",
"clusternodegroup",
"resources",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"resources",
"!=",
"null",
"&&",
"resources",
".",
"length",
">",
"0",
")",
"{",
"clusternodegroup",
"addresources",
"[",
"]",
"=",
"new",
"clusternodegroup",
"[",
"resources",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"addresources",
"[",
"i",
"]",
"=",
"new",
"clusternodegroup",
"(",
")",
";",
"addresources",
"[",
"i",
"]",
".",
"name",
"=",
"resources",
"[",
"i",
"]",
".",
"name",
";",
"addresources",
"[",
"i",
"]",
".",
"strict",
"=",
"resources",
"[",
"i",
"]",
".",
"strict",
";",
"}",
"result",
"=",
"add_bulk_request",
"(",
"client",
",",
"addresources",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to add clusternodegroup resources. | [
"Use",
"this",
"API",
"to",
"add",
"clusternodegroup",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java#L179-L191 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java | clusternodegroup.update | public static base_response update(nitro_service client, clusternodegroup resource) throws Exception {
clusternodegroup updateresource = new clusternodegroup();
updateresource.name = resource.name;
updateresource.strict = resource.strict;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, clusternodegroup resource) throws Exception {
clusternodegroup updateresource = new clusternodegroup();
updateresource.name = resource.name;
updateresource.strict = resource.strict;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"clusternodegroup",
"resource",
")",
"throws",
"Exception",
"{",
"clusternodegroup",
"updateresource",
"=",
"new",
"clusternodegroup",
"(",
")",
";",
"updateresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"updateresource",
".",
"strict",
"=",
"resource",
".",
"strict",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update clusternodegroup. | [
"Use",
"this",
"API",
"to",
"update",
"clusternodegroup",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java#L196-L201 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java | clusternodegroup.update | public static base_responses update(nitro_service client, clusternodegroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusternodegroup updateresources[] = new clusternodegroup[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new clusternodegroup();
updateresources[i].name = resources[i].name;
updateresources[i].strict = resources[i].strict;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java | public static base_responses update(nitro_service client, clusternodegroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusternodegroup updateresources[] = new clusternodegroup[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new clusternodegroup();
updateresources[i].name = resources[i].name;
updateresources[i].strict = resources[i].strict;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"public",
"static",
"base_responses",
"update",
"(",
"nitro_service",
"client",
",",
"clusternodegroup",
"resources",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"resources",
"!=",
"null",
"&&",
"resources",
".",
"length",
">",
"0",
")",
"{",
"clusternodegroup",
"updateresources",
"[",
"]",
"=",
"new",
"clusternodegroup",
"[",
"resources",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"updateresources",
"[",
"i",
"]",
"=",
"new",
"clusternodegroup",
"(",
")",
";",
"updateresources",
"[",
"i",
"]",
".",
"name",
"=",
"resources",
"[",
"i",
"]",
".",
"name",
";",
"updateresources",
"[",
"i",
"]",
".",
"strict",
"=",
"resources",
"[",
"i",
"]",
".",
"strict",
";",
"}",
"result",
"=",
"update_bulk_request",
"(",
"client",
",",
"updateresources",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to update clusternodegroup resources. | [
"Use",
"this",
"API",
"to",
"update",
"clusternodegroup",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java#L206-L218 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java | clusternodegroup.unset | public static base_responses unset(nitro_service client, String name[], String args[]) throws Exception {
base_responses result = null;
if (name != null && name.length > 0) {
clusternodegroup unsetresources[] = new clusternodegroup[name.length];
for (int i=0;i<name.length;i++){
unsetresources[i] = new clusternodegroup();
unsetresources[i].name = name[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | java | public static base_responses unset(nitro_service client, String name[], String args[]) throws Exception {
base_responses result = null;
if (name != null && name.length > 0) {
clusternodegroup unsetresources[] = new clusternodegroup[name.length];
for (int i=0;i<name.length;i++){
unsetresources[i] = new clusternodegroup();
unsetresources[i].name = name[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | [
"public",
"static",
"base_responses",
"unset",
"(",
"nitro_service",
"client",
",",
"String",
"name",
"[",
"]",
",",
"String",
"args",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"name",
"!=",
"null",
"&&",
"name",
".",
"length",
">",
"0",
")",
"{",
"clusternodegroup",
"unsetresources",
"[",
"]",
"=",
"new",
"clusternodegroup",
"[",
"name",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"name",
".",
"length",
";",
"i",
"++",
")",
"{",
"unsetresources",
"[",
"i",
"]",
"=",
"new",
"clusternodegroup",
"(",
")",
";",
"unsetresources",
"[",
"i",
"]",
".",
"name",
"=",
"name",
"[",
"i",
"]",
";",
"}",
"result",
"=",
"unset_bulk_request",
"(",
"client",
",",
"unsetresources",
",",
"args",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to unset the properties of clusternodegroup resources.
Properties that need to be unset are specified in args array. | [
"Use",
"this",
"API",
"to",
"unset",
"the",
"properties",
"of",
"clusternodegroup",
"resources",
".",
"Properties",
"that",
"need",
"to",
"be",
"unset",
"are",
"specified",
"in",
"args",
"array",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java#L244-L255 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java | clusternodegroup.get | public static clusternodegroup[] get(nitro_service service) throws Exception{
clusternodegroup obj = new clusternodegroup();
clusternodegroup[] response = (clusternodegroup[])obj.get_resources(service);
return response;
} | java | public static clusternodegroup[] get(nitro_service service) throws Exception{
clusternodegroup obj = new clusternodegroup();
clusternodegroup[] response = (clusternodegroup[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"clusternodegroup",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"clusternodegroup",
"obj",
"=",
"new",
"clusternodegroup",
"(",
")",
";",
"clusternodegroup",
"[",
"]",
"response",
"=",
"(",
"clusternodegroup",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the clusternodegroup resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"clusternodegroup",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java#L327-L331 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java | clusternodegroup.get | public static clusternodegroup get(nitro_service service, String name) throws Exception{
clusternodegroup obj = new clusternodegroup();
obj.set_name(name);
clusternodegroup response = (clusternodegroup) obj.get_resource(service);
return response;
} | java | public static clusternodegroup get(nitro_service service, String name) throws Exception{
clusternodegroup obj = new clusternodegroup();
obj.set_name(name);
clusternodegroup response = (clusternodegroup) obj.get_resource(service);
return response;
} | [
"public",
"static",
"clusternodegroup",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"clusternodegroup",
"obj",
"=",
"new",
"clusternodegroup",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"clusternodegroup",
"response",
"=",
"(",
"clusternodegroup",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch clusternodegroup resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"clusternodegroup",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup.java#L343-L348 | train |
Atrox/haikunatorjava | src/main/java/me/atrox/haikunator/Haikunator.java | Haikunator.haikunate | public String haikunate() {
if (tokenHex) {
tokenChars = "0123456789abcdef";
}
String adjective = randomString(adjectives);
String noun = randomString(nouns);
StringBuilder token = new StringBuilder();
if (tokenChars != null && tokenChars.length() > 0) {
for (int i = 0; i < tokenLength; i++) {
token.append(tokenChars.charAt(random.nextInt(tokenChars.length())));
}
}
return Stream.of(adjective, noun, token.toString())
.filter(s -> s != null && !s.isEmpty())
.collect(joining(delimiter));
} | java | public String haikunate() {
if (tokenHex) {
tokenChars = "0123456789abcdef";
}
String adjective = randomString(adjectives);
String noun = randomString(nouns);
StringBuilder token = new StringBuilder();
if (tokenChars != null && tokenChars.length() > 0) {
for (int i = 0; i < tokenLength; i++) {
token.append(tokenChars.charAt(random.nextInt(tokenChars.length())));
}
}
return Stream.of(adjective, noun, token.toString())
.filter(s -> s != null && !s.isEmpty())
.collect(joining(delimiter));
} | [
"public",
"String",
"haikunate",
"(",
")",
"{",
"if",
"(",
"tokenHex",
")",
"{",
"tokenChars",
"=",
"\"0123456789abcdef\"",
";",
"}",
"String",
"adjective",
"=",
"randomString",
"(",
"adjectives",
")",
";",
"String",
"noun",
"=",
"randomString",
"(",
"nouns",
")",
";",
"StringBuilder",
"token",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"tokenChars",
"!=",
"null",
"&&",
"tokenChars",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tokenLength",
";",
"i",
"++",
")",
"{",
"token",
".",
"append",
"(",
"tokenChars",
".",
"charAt",
"(",
"random",
".",
"nextInt",
"(",
"tokenChars",
".",
"length",
"(",
")",
")",
")",
")",
";",
"}",
"}",
"return",
"Stream",
".",
"of",
"(",
"adjective",
",",
"noun",
",",
"token",
".",
"toString",
"(",
")",
")",
".",
"filter",
"(",
"s",
"->",
"s",
"!=",
"null",
"&&",
"!",
"s",
".",
"isEmpty",
"(",
")",
")",
".",
"collect",
"(",
"joining",
"(",
"delimiter",
")",
")",
";",
"}"
] | Generate heroku-like random names
@return String | [
"Generate",
"heroku",
"-",
"like",
"random",
"names"
] | eb58c319c98a29ce4ae28b87d6f131413213ed26 | https://github.com/Atrox/haikunatorjava/blob/eb58c319c98a29ce4ae28b87d6f131413213ed26/src/main/java/me/atrox/haikunator/Haikunator.java#L52-L70 | train |
Atrox/haikunatorjava | src/main/java/me/atrox/haikunator/Haikunator.java | Haikunator.randomString | private String randomString(String[] s) {
if (s == null || s.length <= 0) return "";
return s[this.random.nextInt(s.length)];
} | java | private String randomString(String[] s) {
if (s == null || s.length <= 0) return "";
return s[this.random.nextInt(s.length)];
} | [
"private",
"String",
"randomString",
"(",
"String",
"[",
"]",
"s",
")",
"{",
"if",
"(",
"s",
"==",
"null",
"||",
"s",
".",
"length",
"<=",
"0",
")",
"return",
"\"\"",
";",
"return",
"s",
"[",
"this",
".",
"random",
".",
"nextInt",
"(",
"s",
".",
"length",
")",
"]",
";",
"}"
] | Random string from string array
@param s Array
@return String | [
"Random",
"string",
"from",
"string",
"array"
] | eb58c319c98a29ce4ae28b87d6f131413213ed26 | https://github.com/Atrox/haikunatorjava/blob/eb58c319c98a29ce4ae28b87d6f131413213ed26/src/main/java/me/atrox/haikunator/Haikunator.java#L141-L144 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemeventhistory.java | systemeventhistory.get | public static systemeventhistory[] get(nitro_service service, systemeventhistory_args args) throws Exception{
systemeventhistory obj = new systemeventhistory();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
systemeventhistory[] response = (systemeventhistory[])obj.get_resources(service, option);
return response;
} | java | public static systemeventhistory[] get(nitro_service service, systemeventhistory_args args) throws Exception{
systemeventhistory obj = new systemeventhistory();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
systemeventhistory[] response = (systemeventhistory[])obj.get_resources(service, option);
return response;
} | [
"public",
"static",
"systemeventhistory",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"systemeventhistory_args",
"args",
")",
"throws",
"Exception",
"{",
"systemeventhistory",
"obj",
"=",
"new",
"systemeventhistory",
"(",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_args",
"(",
"nitro_util",
".",
"object_to_string_withoutquotes",
"(",
"args",
")",
")",
";",
"systemeventhistory",
"[",
"]",
"response",
"=",
"(",
"systemeventhistory",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the systemeventhistory resources that are configured on netscaler.
This uses systemeventhistory_args which is a way to provide additional arguments while fetching the resources. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"systemeventhistory",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
".",
"This",
"uses",
"systemeventhistory_args",
"which",
"is",
"a",
"way",
"to",
"provide",
"additional",
"arguments",
"while",
"fetching",
"the",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemeventhistory.java#L203-L209 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/parser/tools/PunctEquivalenceClasser.java | PunctEquivalenceClasser.getPunctClass | public static String getPunctClass(String punc) {
if(punc.equals("%") || punc.equals("-PLUS-"))//-PLUS- is an escape for "+" in the ATB
return "perc";
else if(punc.startsWith("*"))
return "bullet";
else if(sfClass.contains(punc))
return "sf";
else if(colonClass.contains(punc) || pEllipsis.matcher(punc).matches())
return "colon";
else if(commaClass.contains(punc))
return "comma";
else if(currencyClass.contains(punc))
return "curr";
else if(slashClass.contains(punc))
return "slash";
else if(lBracketClass.contains(punc))
return "lrb";
else if(rBracketClass.contains(punc))
return "rrb";
else if(quoteClass.contains(punc))
return "quote";
return "";
} | java | public static String getPunctClass(String punc) {
if(punc.equals("%") || punc.equals("-PLUS-"))//-PLUS- is an escape for "+" in the ATB
return "perc";
else if(punc.startsWith("*"))
return "bullet";
else if(sfClass.contains(punc))
return "sf";
else if(colonClass.contains(punc) || pEllipsis.matcher(punc).matches())
return "colon";
else if(commaClass.contains(punc))
return "comma";
else if(currencyClass.contains(punc))
return "curr";
else if(slashClass.contains(punc))
return "slash";
else if(lBracketClass.contains(punc))
return "lrb";
else if(rBracketClass.contains(punc))
return "rrb";
else if(quoteClass.contains(punc))
return "quote";
return "";
} | [
"public",
"static",
"String",
"getPunctClass",
"(",
"String",
"punc",
")",
"{",
"if",
"(",
"punc",
".",
"equals",
"(",
"\"%\"",
")",
"||",
"punc",
".",
"equals",
"(",
"\"-PLUS-\"",
")",
")",
"//-PLUS- is an escape for \"+\" in the ATB\r",
"return",
"\"perc\"",
";",
"else",
"if",
"(",
"punc",
".",
"startsWith",
"(",
"\"*\"",
")",
")",
"return",
"\"bullet\"",
";",
"else",
"if",
"(",
"sfClass",
".",
"contains",
"(",
"punc",
")",
")",
"return",
"\"sf\"",
";",
"else",
"if",
"(",
"colonClass",
".",
"contains",
"(",
"punc",
")",
"||",
"pEllipsis",
".",
"matcher",
"(",
"punc",
")",
".",
"matches",
"(",
")",
")",
"return",
"\"colon\"",
";",
"else",
"if",
"(",
"commaClass",
".",
"contains",
"(",
"punc",
")",
")",
"return",
"\"comma\"",
";",
"else",
"if",
"(",
"currencyClass",
".",
"contains",
"(",
"punc",
")",
")",
"return",
"\"curr\"",
";",
"else",
"if",
"(",
"slashClass",
".",
"contains",
"(",
"punc",
")",
")",
"return",
"\"slash\"",
";",
"else",
"if",
"(",
"lBracketClass",
".",
"contains",
"(",
"punc",
")",
")",
"return",
"\"lrb\"",
";",
"else",
"if",
"(",
"rBracketClass",
".",
"contains",
"(",
"punc",
")",
")",
"return",
"\"rrb\"",
";",
"else",
"if",
"(",
"quoteClass",
".",
"contains",
"(",
"punc",
")",
")",
"return",
"\"quote\"",
";",
"return",
"\"\"",
";",
"}"
] | Return the equivalence class of the argument. If the argument is not contained in
and equivalence class, then an empty string is returned.
@param punc
@return The class name if found. Otherwise, an empty string. | [
"Return",
"the",
"equivalence",
"class",
"of",
"the",
"argument",
".",
"If",
"the",
"argument",
"is",
"not",
"contained",
"in",
"and",
"equivalence",
"class",
"then",
"an",
"empty",
"string",
"is",
"returned",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/tools/PunctEquivalenceClasser.java#L67-L90 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy_binding.java | vpnclientlessaccesspolicy_binding.get | public static vpnclientlessaccesspolicy_binding get(nitro_service service, String name) throws Exception{
vpnclientlessaccesspolicy_binding obj = new vpnclientlessaccesspolicy_binding();
obj.set_name(name);
vpnclientlessaccesspolicy_binding response = (vpnclientlessaccesspolicy_binding) obj.get_resource(service);
return response;
} | java | public static vpnclientlessaccesspolicy_binding get(nitro_service service, String name) throws Exception{
vpnclientlessaccesspolicy_binding obj = new vpnclientlessaccesspolicy_binding();
obj.set_name(name);
vpnclientlessaccesspolicy_binding response = (vpnclientlessaccesspolicy_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"vpnclientlessaccesspolicy_binding",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"vpnclientlessaccesspolicy_binding",
"obj",
"=",
"new",
"vpnclientlessaccesspolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"vpnclientlessaccesspolicy_binding",
"response",
"=",
"(",
"vpnclientlessaccesspolicy_binding",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"vpnclientlessaccesspolicy_binding",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy_binding.java#L114-L119 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cr/crvserver_policymap_binding.java | crvserver_policymap_binding.get | public static crvserver_policymap_binding[] get(nitro_service service, String name) throws Exception{
crvserver_policymap_binding obj = new crvserver_policymap_binding();
obj.set_name(name);
crvserver_policymap_binding response[] = (crvserver_policymap_binding[]) obj.get_resources(service);
return response;
} | java | public static crvserver_policymap_binding[] get(nitro_service service, String name) throws Exception{
crvserver_policymap_binding obj = new crvserver_policymap_binding();
obj.set_name(name);
crvserver_policymap_binding response[] = (crvserver_policymap_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"crvserver_policymap_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"crvserver_policymap_binding",
"obj",
"=",
"new",
"crvserver_policymap_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"crvserver_policymap_binding",
"response",
"[",
"]",
"=",
"(",
"crvserver_policymap_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch crvserver_policymap_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"crvserver_policymap_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cr/crvserver_policymap_binding.java#L205-L210 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnsecrec.java | dnsnsecrec.get | public static dnsnsecrec[] get(nitro_service service) throws Exception{
dnsnsecrec obj = new dnsnsecrec();
dnsnsecrec[] response = (dnsnsecrec[])obj.get_resources(service);
return response;
} | java | public static dnsnsecrec[] get(nitro_service service) throws Exception{
dnsnsecrec obj = new dnsnsecrec();
dnsnsecrec[] response = (dnsnsecrec[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"dnsnsecrec",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"dnsnsecrec",
"obj",
"=",
"new",
"dnsnsecrec",
"(",
")",
";",
"dnsnsecrec",
"[",
"]",
"response",
"=",
"(",
"dnsnsecrec",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the dnsnsecrec resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"dnsnsecrec",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnsecrec.java#L138-L142 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnsecrec.java | dnsnsecrec.get | public static dnsnsecrec[] get(nitro_service service, dnsnsecrec_args args) throws Exception{
dnsnsecrec obj = new dnsnsecrec();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
dnsnsecrec[] response = (dnsnsecrec[])obj.get_resources(service, option);
return response;
} | java | public static dnsnsecrec[] get(nitro_service service, dnsnsecrec_args args) throws Exception{
dnsnsecrec obj = new dnsnsecrec();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
dnsnsecrec[] response = (dnsnsecrec[])obj.get_resources(service, option);
return response;
} | [
"public",
"static",
"dnsnsecrec",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"dnsnsecrec_args",
"args",
")",
"throws",
"Exception",
"{",
"dnsnsecrec",
"obj",
"=",
"new",
"dnsnsecrec",
"(",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_args",
"(",
"nitro_util",
".",
"object_to_string_withoutquotes",
"(",
"args",
")",
")",
";",
"dnsnsecrec",
"[",
"]",
"response",
"=",
"(",
"dnsnsecrec",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the dnsnsecrec resources that are configured on netscaler.
This uses dnsnsecrec_args which is a way to provide additional arguments while fetching the resources. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"dnsnsecrec",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
".",
"This",
"uses",
"dnsnsecrec_args",
"which",
"is",
"a",
"way",
"to",
"provide",
"additional",
"arguments",
"while",
"fetching",
"the",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnsecrec.java#L155-L161 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnsecrec.java | dnsnsecrec.get | public static dnsnsecrec get(nitro_service service, String hostname) throws Exception{
dnsnsecrec obj = new dnsnsecrec();
obj.set_hostname(hostname);
dnsnsecrec response = (dnsnsecrec) obj.get_resource(service);
return response;
} | java | public static dnsnsecrec get(nitro_service service, String hostname) throws Exception{
dnsnsecrec obj = new dnsnsecrec();
obj.set_hostname(hostname);
dnsnsecrec response = (dnsnsecrec) obj.get_resource(service);
return response;
} | [
"public",
"static",
"dnsnsecrec",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"hostname",
")",
"throws",
"Exception",
"{",
"dnsnsecrec",
"obj",
"=",
"new",
"dnsnsecrec",
"(",
")",
";",
"obj",
".",
"set_hostname",
"(",
"hostname",
")",
";",
"dnsnsecrec",
"response",
"=",
"(",
"dnsnsecrec",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch dnsnsecrec resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"dnsnsecrec",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnsecrec.java#L166-L171 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnsecrec.java | dnsnsecrec.get | public static dnsnsecrec[] get(nitro_service service, String hostname[]) throws Exception{
if (hostname !=null && hostname.length>0) {
dnsnsecrec response[] = new dnsnsecrec[hostname.length];
dnsnsecrec obj[] = new dnsnsecrec[hostname.length];
for (int i=0;i<hostname.length;i++) {
obj[i] = new dnsnsecrec();
obj[i].set_hostname(hostname[i]);
response[i] = (dnsnsecrec) obj[i].get_resource(service);
}
return response;
}
return null;
} | java | public static dnsnsecrec[] get(nitro_service service, String hostname[]) throws Exception{
if (hostname !=null && hostname.length>0) {
dnsnsecrec response[] = new dnsnsecrec[hostname.length];
dnsnsecrec obj[] = new dnsnsecrec[hostname.length];
for (int i=0;i<hostname.length;i++) {
obj[i] = new dnsnsecrec();
obj[i].set_hostname(hostname[i]);
response[i] = (dnsnsecrec) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"public",
"static",
"dnsnsecrec",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"hostname",
"[",
"]",
")",
"throws",
"Exception",
"{",
"if",
"(",
"hostname",
"!=",
"null",
"&&",
"hostname",
".",
"length",
">",
"0",
")",
"{",
"dnsnsecrec",
"response",
"[",
"]",
"=",
"new",
"dnsnsecrec",
"[",
"hostname",
".",
"length",
"]",
";",
"dnsnsecrec",
"obj",
"[",
"]",
"=",
"new",
"dnsnsecrec",
"[",
"hostname",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"hostname",
".",
"length",
";",
"i",
"++",
")",
"{",
"obj",
"[",
"i",
"]",
"=",
"new",
"dnsnsecrec",
"(",
")",
";",
"obj",
"[",
"i",
"]",
".",
"set_hostname",
"(",
"hostname",
"[",
"i",
"]",
")",
";",
"response",
"[",
"i",
"]",
"=",
"(",
"dnsnsecrec",
")",
"obj",
"[",
"i",
"]",
".",
"get_resource",
"(",
"service",
")",
";",
"}",
"return",
"response",
";",
"}",
"return",
"null",
";",
"}"
] | Use this API to fetch dnsnsecrec resources of given names . | [
"Use",
"this",
"API",
"to",
"fetch",
"dnsnsecrec",
"resources",
"of",
"given",
"names",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnsnsecrec.java#L176-L188 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/Sets.java | Sets.diff | public static <E> Set<E> diff(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
for (E o : s1) {
if (!s2.contains(o)) {
s.add(o);
}
}
return s;
} | java | public static <E> Set<E> diff(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
for (E o : s1) {
if (!s2.contains(o)) {
s.add(o);
}
}
return s;
} | [
"public",
"static",
"<",
"E",
">",
"Set",
"<",
"E",
">",
"diff",
"(",
"Set",
"<",
"E",
">",
"s1",
",",
"Set",
"<",
"E",
">",
"s2",
")",
"{",
"Set",
"<",
"E",
">",
"s",
"=",
"new",
"HashSet",
"<",
"E",
">",
"(",
")",
";",
"for",
"(",
"E",
"o",
":",
"s1",
")",
"{",
"if",
"(",
"!",
"s2",
".",
"contains",
"(",
"o",
")",
")",
"{",
"s",
".",
"add",
"(",
"o",
")",
";",
"}",
"}",
"return",
"s",
";",
"}"
] | Returns the difference of sets s1 and s2. | [
"Returns",
"the",
"difference",
"of",
"sets",
"s1",
"and",
"s2",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Sets.java#L35-L43 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/Sets.java | Sets.union | public static <E> Set<E> union(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
s.addAll(s1);
s.addAll(s2);
return s;
} | java | public static <E> Set<E> union(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
s.addAll(s1);
s.addAll(s2);
return s;
} | [
"public",
"static",
"<",
"E",
">",
"Set",
"<",
"E",
">",
"union",
"(",
"Set",
"<",
"E",
">",
"s1",
",",
"Set",
"<",
"E",
">",
"s2",
")",
"{",
"Set",
"<",
"E",
">",
"s",
"=",
"new",
"HashSet",
"<",
"E",
">",
"(",
")",
";",
"s",
".",
"addAll",
"(",
"s1",
")",
";",
"s",
".",
"addAll",
"(",
"s2",
")",
";",
"return",
"s",
";",
"}"
] | Returns the union of sets s1 and s2. | [
"Returns",
"the",
"union",
"of",
"sets",
"s1",
"and",
"s2",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Sets.java#L66-L71 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/Sets.java | Sets.intersection | public static <E> Set<E> intersection(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
s.addAll(s1);
s.retainAll(s2);
return s;
} | java | public static <E> Set<E> intersection(Set<E> s1, Set<E> s2) {
Set<E> s = new HashSet<E>();
s.addAll(s1);
s.retainAll(s2);
return s;
} | [
"public",
"static",
"<",
"E",
">",
"Set",
"<",
"E",
">",
"intersection",
"(",
"Set",
"<",
"E",
">",
"s1",
",",
"Set",
"<",
"E",
">",
"s2",
")",
"{",
"Set",
"<",
"E",
">",
"s",
"=",
"new",
"HashSet",
"<",
"E",
">",
"(",
")",
";",
"s",
".",
"addAll",
"(",
"s1",
")",
";",
"s",
".",
"retainAll",
"(",
"s2",
")",
";",
"return",
"s",
";",
"}"
] | Returns the intersection of sets s1 and s2. | [
"Returns",
"the",
"intersection",
"of",
"sets",
"s1",
"and",
"s2",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Sets.java#L76-L81 | train |
meertensinstituut/mtas | src/main/java/mtas/codec/tree/IntervalRBTree.java | IntervalRBTree.updateMaxMin | private void updateMaxMin(IntervalRBTreeNode<T> n, IntervalRBTreeNode<T> c) {
if (c != null) {
if (n.max < c.max) {
n.max = c.max;
}
if (n.min > c.min) {
n.min = c.min;
}
}
} | java | private void updateMaxMin(IntervalRBTreeNode<T> n, IntervalRBTreeNode<T> c) {
if (c != null) {
if (n.max < c.max) {
n.max = c.max;
}
if (n.min > c.min) {
n.min = c.min;
}
}
} | [
"private",
"void",
"updateMaxMin",
"(",
"IntervalRBTreeNode",
"<",
"T",
">",
"n",
",",
"IntervalRBTreeNode",
"<",
"T",
">",
"c",
")",
"{",
"if",
"(",
"c",
"!=",
"null",
")",
"{",
"if",
"(",
"n",
".",
"max",
"<",
"c",
".",
"max",
")",
"{",
"n",
".",
"max",
"=",
"c",
".",
"max",
";",
"}",
"if",
"(",
"n",
".",
"min",
">",
"c",
".",
"min",
")",
"{",
"n",
".",
"min",
"=",
"c",
".",
"min",
";",
"}",
"}",
"}"
] | Update max min.
@param n the n
@param c the c | [
"Update",
"max",
"min",
"."
] | f02ae730848616bd88b553efa7f9eddc32818e64 | https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/tree/IntervalRBTree.java#L128-L137 | train |
meertensinstituut/mtas | src/main/java/mtas/codec/tree/IntervalRBTree.java | IntervalRBTree.setMaxMin | private void setMaxMin(IntervalRBTreeNode<T> n) {
n.min = n.left;
n.max = n.right;
if (n.leftChild != null) {
n.min = Math.min(n.min, n.leftChild.min);
n.max = Math.max(n.max, n.leftChild.max);
}
if (n.rightChild != null) {
n.min = Math.min(n.min, n.rightChild.min);
n.max = Math.max(n.max, n.rightChild.max);
}
} | java | private void setMaxMin(IntervalRBTreeNode<T> n) {
n.min = n.left;
n.max = n.right;
if (n.leftChild != null) {
n.min = Math.min(n.min, n.leftChild.min);
n.max = Math.max(n.max, n.leftChild.max);
}
if (n.rightChild != null) {
n.min = Math.min(n.min, n.rightChild.min);
n.max = Math.max(n.max, n.rightChild.max);
}
} | [
"private",
"void",
"setMaxMin",
"(",
"IntervalRBTreeNode",
"<",
"T",
">",
"n",
")",
"{",
"n",
".",
"min",
"=",
"n",
".",
"left",
";",
"n",
".",
"max",
"=",
"n",
".",
"right",
";",
"if",
"(",
"n",
".",
"leftChild",
"!=",
"null",
")",
"{",
"n",
".",
"min",
"=",
"Math",
".",
"min",
"(",
"n",
".",
"min",
",",
"n",
".",
"leftChild",
".",
"min",
")",
";",
"n",
".",
"max",
"=",
"Math",
".",
"max",
"(",
"n",
".",
"max",
",",
"n",
".",
"leftChild",
".",
"max",
")",
";",
"}",
"if",
"(",
"n",
".",
"rightChild",
"!=",
"null",
")",
"{",
"n",
".",
"min",
"=",
"Math",
".",
"min",
"(",
"n",
".",
"min",
",",
"n",
".",
"rightChild",
".",
"min",
")",
";",
"n",
".",
"max",
"=",
"Math",
".",
"max",
"(",
"n",
".",
"max",
",",
"n",
".",
"rightChild",
".",
"max",
")",
";",
"}",
"}"
] | Sets the max min.
@param n the new max min | [
"Sets",
"the",
"max",
"min",
"."
] | f02ae730848616bd88b553efa7f9eddc32818e64 | https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/tree/IntervalRBTree.java#L227-L238 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowglobal_binding.java | appflowglobal_binding.get | public static appflowglobal_binding get(nitro_service service) throws Exception{
appflowglobal_binding obj = new appflowglobal_binding();
appflowglobal_binding response = (appflowglobal_binding) obj.get_resource(service);
return response;
} | java | public static appflowglobal_binding get(nitro_service service) throws Exception{
appflowglobal_binding obj = new appflowglobal_binding();
appflowglobal_binding response = (appflowglobal_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"appflowglobal_binding",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"appflowglobal_binding",
"obj",
"=",
"new",
"appflowglobal_binding",
"(",
")",
";",
"appflowglobal_binding",
"response",
"=",
"(",
"appflowglobal_binding",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch a appflowglobal_binding resource . | [
"Use",
"this",
"API",
"to",
"fetch",
"a",
"appflowglobal_binding",
"resource",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowglobal_binding.java#L84-L88 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_authenticationcertpolicy_binding.java | authenticationvserver_authenticationcertpolicy_binding.get | public static authenticationvserver_authenticationcertpolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationcertpolicy_binding obj = new authenticationvserver_authenticationcertpolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationcertpolicy_binding response[] = (authenticationvserver_authenticationcertpolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static authenticationvserver_authenticationcertpolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationcertpolicy_binding obj = new authenticationvserver_authenticationcertpolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationcertpolicy_binding response[] = (authenticationvserver_authenticationcertpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"authenticationvserver_authenticationcertpolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"authenticationvserver_authenticationcertpolicy_binding",
"obj",
"=",
"new",
"authenticationvserver_authenticationcertpolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"authenticationvserver_authenticationcertpolicy_binding",
"response",
"[",
"]",
"=",
"(",
"authenticationvserver_authenticationcertpolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch authenticationvserver_authenticationcertpolicy_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"authenticationvserver_authenticationcertpolicy_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_authenticationcertpolicy_binding.java#L264-L269 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ns/reboot.java | reboot.Reboot | public static base_response Reboot(nitro_service client, reboot resource) throws Exception {
reboot Rebootresource = new reboot();
Rebootresource.warm = resource.warm;
return Rebootresource.perform_operation(client);
} | java | public static base_response Reboot(nitro_service client, reboot resource) throws Exception {
reboot Rebootresource = new reboot();
Rebootresource.warm = resource.warm;
return Rebootresource.perform_operation(client);
} | [
"public",
"static",
"base_response",
"Reboot",
"(",
"nitro_service",
"client",
",",
"reboot",
"resource",
")",
"throws",
"Exception",
"{",
"reboot",
"Rebootresource",
"=",
"new",
"reboot",
"(",
")",
";",
"Rebootresource",
".",
"warm",
"=",
"resource",
".",
"warm",
";",
"return",
"Rebootresource",
".",
"perform_operation",
"(",
"client",
")",
";",
"}"
] | Use this API to Reboot reboot. | [
"Use",
"this",
"API",
"to",
"Reboot",
"reboot",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/reboot.java#L103-L107 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policydataset_value_binding.java | policydataset_value_binding.get | public static policydataset_value_binding[] get(nitro_service service, String name) throws Exception{
policydataset_value_binding obj = new policydataset_value_binding();
obj.set_name(name);
policydataset_value_binding response[] = (policydataset_value_binding[]) obj.get_resources(service);
return response;
} | java | public static policydataset_value_binding[] get(nitro_service service, String name) throws Exception{
policydataset_value_binding obj = new policydataset_value_binding();
obj.set_name(name);
policydataset_value_binding response[] = (policydataset_value_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"policydataset_value_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"policydataset_value_binding",
"obj",
"=",
"new",
"policydataset_value_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"policydataset_value_binding",
"response",
"[",
"]",
"=",
"(",
"policydataset_value_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch policydataset_value_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"policydataset_value_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policydataset_value_binding.java#L184-L189 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_binding.java | authenticationvserver_binding.get | public static authenticationvserver_binding get(nitro_service service, String name) throws Exception{
authenticationvserver_binding obj = new authenticationvserver_binding();
obj.set_name(name);
authenticationvserver_binding response = (authenticationvserver_binding) obj.get_resource(service);
return response;
} | java | public static authenticationvserver_binding get(nitro_service service, String name) throws Exception{
authenticationvserver_binding obj = new authenticationvserver_binding();
obj.set_name(name);
authenticationvserver_binding response = (authenticationvserver_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"authenticationvserver_binding",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"authenticationvserver_binding",
"obj",
"=",
"new",
"authenticationvserver_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"authenticationvserver_binding",
"response",
"=",
"(",
"authenticationvserver_binding",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch authenticationvserver_binding resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"authenticationvserver_binding",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_binding.java#L202-L207 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoepolicy.java | appqoepolicy.get | public static appqoepolicy[] get(nitro_service service) throws Exception{
appqoepolicy obj = new appqoepolicy();
appqoepolicy[] response = (appqoepolicy[])obj.get_resources(service);
return response;
} | java | public static appqoepolicy[] get(nitro_service service) throws Exception{
appqoepolicy obj = new appqoepolicy();
appqoepolicy[] response = (appqoepolicy[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"appqoepolicy",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"appqoepolicy",
"obj",
"=",
"new",
"appqoepolicy",
"(",
")",
";",
"appqoepolicy",
"[",
"]",
"response",
"=",
"(",
"appqoepolicy",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the appqoepolicy resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"appqoepolicy",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoepolicy.java#L252-L256 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoepolicy.java | appqoepolicy.get | public static appqoepolicy get(nitro_service service, String name) throws Exception{
appqoepolicy obj = new appqoepolicy();
obj.set_name(name);
appqoepolicy response = (appqoepolicy) obj.get_resource(service);
return response;
} | java | public static appqoepolicy get(nitro_service service, String name) throws Exception{
appqoepolicy obj = new appqoepolicy();
obj.set_name(name);
appqoepolicy response = (appqoepolicy) obj.get_resource(service);
return response;
} | [
"public",
"static",
"appqoepolicy",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"appqoepolicy",
"obj",
"=",
"new",
"appqoepolicy",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"appqoepolicy",
"response",
"=",
"(",
"appqoepolicy",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch appqoepolicy resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"appqoepolicy",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoepolicy.java#L268-L273 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoepolicy.java | appqoepolicy.get_filtered | public static appqoepolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
appqoepolicy obj = new appqoepolicy();
options option = new options();
option.set_filter(filter);
appqoepolicy[] response = (appqoepolicy[]) obj.getfiltered(service, option);
return response;
} | java | public static appqoepolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
appqoepolicy obj = new appqoepolicy();
options option = new options();
option.set_filter(filter);
appqoepolicy[] response = (appqoepolicy[]) obj.getfiltered(service, option);
return response;
} | [
"public",
"static",
"appqoepolicy",
"[",
"]",
"get_filtered",
"(",
"nitro_service",
"service",
",",
"filtervalue",
"[",
"]",
"filter",
")",
"throws",
"Exception",
"{",
"appqoepolicy",
"obj",
"=",
"new",
"appqoepolicy",
"(",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_filter",
"(",
"filter",
")",
";",
"appqoepolicy",
"[",
"]",
"response",
"=",
"(",
"appqoepolicy",
"[",
"]",
")",
"obj",
".",
"getfiltered",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch filtered set of appqoepolicy resources.
set the filter parameter values in filtervalue object. | [
"Use",
"this",
"API",
"to",
"fetch",
"filtered",
"set",
"of",
"appqoepolicy",
"resources",
".",
"set",
"the",
"filter",
"parameter",
"values",
"in",
"filtervalue",
"object",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appqoe/appqoepolicy.java#L307-L313 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/bridgegroup_nsip_binding.java | bridgegroup_nsip_binding.get | public static bridgegroup_nsip_binding[] get(nitro_service service, Long id) throws Exception{
bridgegroup_nsip_binding obj = new bridgegroup_nsip_binding();
obj.set_id(id);
bridgegroup_nsip_binding response[] = (bridgegroup_nsip_binding[]) obj.get_resources(service);
return response;
} | java | public static bridgegroup_nsip_binding[] get(nitro_service service, Long id) throws Exception{
bridgegroup_nsip_binding obj = new bridgegroup_nsip_binding();
obj.set_id(id);
bridgegroup_nsip_binding response[] = (bridgegroup_nsip_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"bridgegroup_nsip_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"Long",
"id",
")",
"throws",
"Exception",
"{",
"bridgegroup_nsip_binding",
"obj",
"=",
"new",
"bridgegroup_nsip_binding",
"(",
")",
";",
"obj",
".",
"set_id",
"(",
"id",
")",
";",
"bridgegroup_nsip_binding",
"response",
"[",
"]",
"=",
"(",
"bridgegroup_nsip_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch bridgegroup_nsip_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"bridgegroup_nsip_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/bridgegroup_nsip_binding.java#L231-L236 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbservice_stats.java | gslbservice_stats.get | public static gslbservice_stats[] get(nitro_service service) throws Exception{
gslbservice_stats obj = new gslbservice_stats();
gslbservice_stats[] response = (gslbservice_stats[])obj.stat_resources(service);
return response;
} | java | public static gslbservice_stats[] get(nitro_service service) throws Exception{
gslbservice_stats obj = new gslbservice_stats();
gslbservice_stats[] response = (gslbservice_stats[])obj.stat_resources(service);
return response;
} | [
"public",
"static",
"gslbservice_stats",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"gslbservice_stats",
"obj",
"=",
"new",
"gslbservice_stats",
"(",
")",
";",
"gslbservice_stats",
"[",
"]",
"response",
"=",
"(",
"gslbservice_stats",
"[",
"]",
")",
"obj",
".",
"stat_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch the statistics of all gslbservice_stats resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"the",
"statistics",
"of",
"all",
"gslbservice_stats",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbservice_stats.java#L291-L295 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbservice_stats.java | gslbservice_stats.get | public static gslbservice_stats get(nitro_service service, String servicename) throws Exception{
gslbservice_stats obj = new gslbservice_stats();
obj.set_servicename(servicename);
gslbservice_stats response = (gslbservice_stats) obj.stat_resource(service);
return response;
} | java | public static gslbservice_stats get(nitro_service service, String servicename) throws Exception{
gslbservice_stats obj = new gslbservice_stats();
obj.set_servicename(servicename);
gslbservice_stats response = (gslbservice_stats) obj.stat_resource(service);
return response;
} | [
"public",
"static",
"gslbservice_stats",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"servicename",
")",
"throws",
"Exception",
"{",
"gslbservice_stats",
"obj",
"=",
"new",
"gslbservice_stats",
"(",
")",
";",
"obj",
".",
"set_servicename",
"(",
"servicename",
")",
";",
"gslbservice_stats",
"response",
"=",
"(",
"gslbservice_stats",
")",
"obj",
".",
"stat_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch statistics of gslbservice_stats resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"statistics",
"of",
"gslbservice_stats",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbservice_stats.java#L309-L314 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.java | sslpolicylabel.get | public static sslpolicylabel[] get(nitro_service service) throws Exception{
sslpolicylabel obj = new sslpolicylabel();
sslpolicylabel[] response = (sslpolicylabel[])obj.get_resources(service);
return response;
} | java | public static sslpolicylabel[] get(nitro_service service) throws Exception{
sslpolicylabel obj = new sslpolicylabel();
sslpolicylabel[] response = (sslpolicylabel[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"sslpolicylabel",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"sslpolicylabel",
"obj",
"=",
"new",
"sslpolicylabel",
"(",
")",
";",
"sslpolicylabel",
"[",
"]",
"response",
"=",
"(",
"sslpolicylabel",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the sslpolicylabel resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"sslpolicylabel",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.java#L298-L302 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.java | sslpolicylabel.get | public static sslpolicylabel get(nitro_service service, String labelname) throws Exception{
sslpolicylabel obj = new sslpolicylabel();
obj.set_labelname(labelname);
sslpolicylabel response = (sslpolicylabel) obj.get_resource(service);
return response;
} | java | public static sslpolicylabel get(nitro_service service, String labelname) throws Exception{
sslpolicylabel obj = new sslpolicylabel();
obj.set_labelname(labelname);
sslpolicylabel response = (sslpolicylabel) obj.get_resource(service);
return response;
} | [
"public",
"static",
"sslpolicylabel",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"labelname",
")",
"throws",
"Exception",
"{",
"sslpolicylabel",
"obj",
"=",
"new",
"sslpolicylabel",
"(",
")",
";",
"obj",
".",
"set_labelname",
"(",
"labelname",
")",
";",
"sslpolicylabel",
"response",
"=",
"(",
"sslpolicylabel",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch sslpolicylabel resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslpolicylabel",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.java#L314-L319 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcertlink.java | sslcertlink.get | public static sslcertlink[] get(nitro_service service) throws Exception{
sslcertlink obj = new sslcertlink();
sslcertlink[] response = (sslcertlink[])obj.get_resources(service);
return response;
} | java | public static sslcertlink[] get(nitro_service service) throws Exception{
sslcertlink obj = new sslcertlink();
sslcertlink[] response = (sslcertlink[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"sslcertlink",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"sslcertlink",
"obj",
"=",
"new",
"sslcertlink",
"(",
")",
";",
"sslcertlink",
"[",
"]",
"response",
"=",
"(",
"sslcertlink",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the sslcertlink resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"sslcertlink",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcertlink.java#L97-L101 | train |
meertensinstituut/mtas | src/main/java/mtas/search/spans/MtasSpanSequenceSpans.java | MtasSpanSequenceSpans.computeCosts | private void computeCosts() {
cost = Long.MAX_VALUE;
for (QueueItem item : queueSpans) {
cost = Math.min(cost, item.sequenceSpans.spans.cost());
}
} | java | private void computeCosts() {
cost = Long.MAX_VALUE;
for (QueueItem item : queueSpans) {
cost = Math.min(cost, item.sequenceSpans.spans.cost());
}
} | [
"private",
"void",
"computeCosts",
"(",
")",
"{",
"cost",
"=",
"Long",
".",
"MAX_VALUE",
";",
"for",
"(",
"QueueItem",
"item",
":",
"queueSpans",
")",
"{",
"cost",
"=",
"Math",
".",
"min",
"(",
"cost",
",",
"item",
".",
"sequenceSpans",
".",
"spans",
".",
"cost",
"(",
")",
")",
";",
"}",
"}"
] | Compute costs. | [
"Compute",
"costs",
"."
] | f02ae730848616bd88b553efa7f9eddc32818e64 | https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/search/spans/MtasSpanSequenceSpans.java#L74-L79 | train |
meertensinstituut/mtas | src/main/java/mtas/search/spans/MtasSpanSequenceSpans.java | MtasSpanSequenceSpans.fillQueue | private void fillQueue(QueueItem item, Integer minStartPosition,
Integer maxStartPosition, Integer minEndPosition) throws IOException {
int newStartPosition;
int newEndPosition;
Integer firstRetrievedPosition = null;
// remove everything below minStartPosition
if ((minStartPosition != null) && (item.lowestPosition != null)
&& (item.lowestPosition < minStartPosition)) {
item.del((minStartPosition - 1));
}
// fill queue
while (!item.noMorePositions) {
boolean doNotCollectAnotherPosition;
doNotCollectAnotherPosition = item.filledPosition
&& (minStartPosition == null) && (maxStartPosition == null);
doNotCollectAnotherPosition |= item.filledPosition
&& (maxStartPosition != null) && (item.lastRetrievedPosition != null)
&& (maxStartPosition < item.lastRetrievedPosition);
if (doNotCollectAnotherPosition) {
return;
} else {
// collect another full position
firstRetrievedPosition = null;
while (!item.noMorePositions) {
newStartPosition = item.sequenceSpans.spans.nextStartPosition();
if (newStartPosition == NO_MORE_POSITIONS) {
if (!item.queue.isEmpty()) {
item.filledPosition = true;
item.lastFilledPosition = item.lastRetrievedPosition;
}
item.noMorePositions = true;
return;
} else if ((minStartPosition != null)
&& (newStartPosition < minStartPosition)) {
// do nothing
} else {
newEndPosition = item.sequenceSpans.spans.endPosition();
if ((minEndPosition == null) || (newEndPosition >= minEndPosition
- ignoreItem.getMinStartPosition(docId, newEndPosition))) {
item.add(newStartPosition, newEndPosition);
if (firstRetrievedPosition == null) {
firstRetrievedPosition = newStartPosition;
} else if (!firstRetrievedPosition.equals(newStartPosition)) {
break;
}
}
}
}
}
}
} | java | private void fillQueue(QueueItem item, Integer minStartPosition,
Integer maxStartPosition, Integer minEndPosition) throws IOException {
int newStartPosition;
int newEndPosition;
Integer firstRetrievedPosition = null;
// remove everything below minStartPosition
if ((minStartPosition != null) && (item.lowestPosition != null)
&& (item.lowestPosition < minStartPosition)) {
item.del((minStartPosition - 1));
}
// fill queue
while (!item.noMorePositions) {
boolean doNotCollectAnotherPosition;
doNotCollectAnotherPosition = item.filledPosition
&& (minStartPosition == null) && (maxStartPosition == null);
doNotCollectAnotherPosition |= item.filledPosition
&& (maxStartPosition != null) && (item.lastRetrievedPosition != null)
&& (maxStartPosition < item.lastRetrievedPosition);
if (doNotCollectAnotherPosition) {
return;
} else {
// collect another full position
firstRetrievedPosition = null;
while (!item.noMorePositions) {
newStartPosition = item.sequenceSpans.spans.nextStartPosition();
if (newStartPosition == NO_MORE_POSITIONS) {
if (!item.queue.isEmpty()) {
item.filledPosition = true;
item.lastFilledPosition = item.lastRetrievedPosition;
}
item.noMorePositions = true;
return;
} else if ((minStartPosition != null)
&& (newStartPosition < minStartPosition)) {
// do nothing
} else {
newEndPosition = item.sequenceSpans.spans.endPosition();
if ((minEndPosition == null) || (newEndPosition >= minEndPosition
- ignoreItem.getMinStartPosition(docId, newEndPosition))) {
item.add(newStartPosition, newEndPosition);
if (firstRetrievedPosition == null) {
firstRetrievedPosition = newStartPosition;
} else if (!firstRetrievedPosition.equals(newStartPosition)) {
break;
}
}
}
}
}
}
} | [
"private",
"void",
"fillQueue",
"(",
"QueueItem",
"item",
",",
"Integer",
"minStartPosition",
",",
"Integer",
"maxStartPosition",
",",
"Integer",
"minEndPosition",
")",
"throws",
"IOException",
"{",
"int",
"newStartPosition",
";",
"int",
"newEndPosition",
";",
"Integer",
"firstRetrievedPosition",
"=",
"null",
";",
"// remove everything below minStartPosition",
"if",
"(",
"(",
"minStartPosition",
"!=",
"null",
")",
"&&",
"(",
"item",
".",
"lowestPosition",
"!=",
"null",
")",
"&&",
"(",
"item",
".",
"lowestPosition",
"<",
"minStartPosition",
")",
")",
"{",
"item",
".",
"del",
"(",
"(",
"minStartPosition",
"-",
"1",
")",
")",
";",
"}",
"// fill queue",
"while",
"(",
"!",
"item",
".",
"noMorePositions",
")",
"{",
"boolean",
"doNotCollectAnotherPosition",
";",
"doNotCollectAnotherPosition",
"=",
"item",
".",
"filledPosition",
"&&",
"(",
"minStartPosition",
"==",
"null",
")",
"&&",
"(",
"maxStartPosition",
"==",
"null",
")",
";",
"doNotCollectAnotherPosition",
"|=",
"item",
".",
"filledPosition",
"&&",
"(",
"maxStartPosition",
"!=",
"null",
")",
"&&",
"(",
"item",
".",
"lastRetrievedPosition",
"!=",
"null",
")",
"&&",
"(",
"maxStartPosition",
"<",
"item",
".",
"lastRetrievedPosition",
")",
";",
"if",
"(",
"doNotCollectAnotherPosition",
")",
"{",
"return",
";",
"}",
"else",
"{",
"// collect another full position",
"firstRetrievedPosition",
"=",
"null",
";",
"while",
"(",
"!",
"item",
".",
"noMorePositions",
")",
"{",
"newStartPosition",
"=",
"item",
".",
"sequenceSpans",
".",
"spans",
".",
"nextStartPosition",
"(",
")",
";",
"if",
"(",
"newStartPosition",
"==",
"NO_MORE_POSITIONS",
")",
"{",
"if",
"(",
"!",
"item",
".",
"queue",
".",
"isEmpty",
"(",
")",
")",
"{",
"item",
".",
"filledPosition",
"=",
"true",
";",
"item",
".",
"lastFilledPosition",
"=",
"item",
".",
"lastRetrievedPosition",
";",
"}",
"item",
".",
"noMorePositions",
"=",
"true",
";",
"return",
";",
"}",
"else",
"if",
"(",
"(",
"minStartPosition",
"!=",
"null",
")",
"&&",
"(",
"newStartPosition",
"<",
"minStartPosition",
")",
")",
"{",
"// do nothing",
"}",
"else",
"{",
"newEndPosition",
"=",
"item",
".",
"sequenceSpans",
".",
"spans",
".",
"endPosition",
"(",
")",
";",
"if",
"(",
"(",
"minEndPosition",
"==",
"null",
")",
"||",
"(",
"newEndPosition",
">=",
"minEndPosition",
"-",
"ignoreItem",
".",
"getMinStartPosition",
"(",
"docId",
",",
"newEndPosition",
")",
")",
")",
"{",
"item",
".",
"add",
"(",
"newStartPosition",
",",
"newEndPosition",
")",
";",
"if",
"(",
"firstRetrievedPosition",
"==",
"null",
")",
"{",
"firstRetrievedPosition",
"=",
"newStartPosition",
";",
"}",
"else",
"if",
"(",
"!",
"firstRetrievedPosition",
".",
"equals",
"(",
"newStartPosition",
")",
")",
"{",
"break",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"}"
] | Fill queue.
@param item the item
@param minStartPosition the min start position
@param maxStartPosition the max start position
@param minEndPosition the min end position
@throws IOException Signals that an I/O exception has occurred. | [
"Fill",
"queue",
"."
] | f02ae730848616bd88b553efa7f9eddc32818e64 | https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/search/spans/MtasSpanSequenceSpans.java#L681-L731 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/appfw/appfwprofile_stats.java | appfwprofile_stats.get | public static appfwprofile_stats[] get(nitro_service service) throws Exception{
appfwprofile_stats obj = new appfwprofile_stats();
appfwprofile_stats[] response = (appfwprofile_stats[])obj.stat_resources(service);
return response;
} | java | public static appfwprofile_stats[] get(nitro_service service) throws Exception{
appfwprofile_stats obj = new appfwprofile_stats();
appfwprofile_stats[] response = (appfwprofile_stats[])obj.stat_resources(service);
return response;
} | [
"public",
"static",
"appfwprofile_stats",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"appfwprofile_stats",
"obj",
"=",
"new",
"appfwprofile_stats",
"(",
")",
";",
"appfwprofile_stats",
"[",
"]",
"response",
"=",
"(",
"appfwprofile_stats",
"[",
"]",
")",
"obj",
".",
"stat_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch the statistics of all appfwprofile_stats resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"the",
"statistics",
"of",
"all",
"appfwprofile_stats",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/appfw/appfwprofile_stats.java#L751-L755 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/appfw/appfwprofile_stats.java | appfwprofile_stats.get | public static appfwprofile_stats get(nitro_service service, String name) throws Exception{
appfwprofile_stats obj = new appfwprofile_stats();
obj.set_name(name);
appfwprofile_stats response = (appfwprofile_stats) obj.stat_resource(service);
return response;
} | java | public static appfwprofile_stats get(nitro_service service, String name) throws Exception{
appfwprofile_stats obj = new appfwprofile_stats();
obj.set_name(name);
appfwprofile_stats response = (appfwprofile_stats) obj.stat_resource(service);
return response;
} | [
"public",
"static",
"appfwprofile_stats",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"appfwprofile_stats",
"obj",
"=",
"new",
"appfwprofile_stats",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"appfwprofile_stats",
"response",
"=",
"(",
"appfwprofile_stats",
")",
"obj",
".",
"stat_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch statistics of appfwprofile_stats resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"statistics",
"of",
"appfwprofile_stats",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/appfw/appfwprofile_stats.java#L769-L774 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/classify/LogPrior.java | LogPrior.intToType | private static LogPriorType intToType(int intPrior) {
LogPriorType[] values = LogPriorType.values();
for (LogPriorType val : values) {
if (val.ordinal() == intPrior) {
return val;
}
}
throw new IllegalArgumentException(intPrior + " is not a legal LogPrior.");
} | java | private static LogPriorType intToType(int intPrior) {
LogPriorType[] values = LogPriorType.values();
for (LogPriorType val : values) {
if (val.ordinal() == intPrior) {
return val;
}
}
throw new IllegalArgumentException(intPrior + " is not a legal LogPrior.");
} | [
"private",
"static",
"LogPriorType",
"intToType",
"(",
"int",
"intPrior",
")",
"{",
"LogPriorType",
"[",
"]",
"values",
"=",
"LogPriorType",
".",
"values",
"(",
")",
";",
"for",
"(",
"LogPriorType",
"val",
":",
"values",
")",
"{",
"if",
"(",
"val",
".",
"ordinal",
"(",
")",
"==",
"intPrior",
")",
"{",
"return",
"val",
";",
"}",
"}",
"throw",
"new",
"IllegalArgumentException",
"(",
"intPrior",
"+",
"\" is not a legal LogPrior.\"",
")",
";",
"}"
] | why isn't this functionality in enum? | [
"why",
"isn",
"t",
"this",
"functionality",
"in",
"enum?"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/LogPrior.java#L63-L71 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpkcs12.java | sslpkcs12.convert | public static base_response convert(nitro_service client, sslpkcs12 resource) throws Exception {
sslpkcs12 convertresource = new sslpkcs12();
convertresource.outfile = resource.outfile;
convertresource.Import = resource.Import;
convertresource.pkcs12file = resource.pkcs12file;
convertresource.des = resource.des;
convertresource.des3 = resource.des3;
convertresource.export = resource.export;
convertresource.certfile = resource.certfile;
convertresource.keyfile = resource.keyfile;
convertresource.password = resource.password;
convertresource.pempassphrase = resource.pempassphrase;
return convertresource.perform_operation(client,"convert");
} | java | public static base_response convert(nitro_service client, sslpkcs12 resource) throws Exception {
sslpkcs12 convertresource = new sslpkcs12();
convertresource.outfile = resource.outfile;
convertresource.Import = resource.Import;
convertresource.pkcs12file = resource.pkcs12file;
convertresource.des = resource.des;
convertresource.des3 = resource.des3;
convertresource.export = resource.export;
convertresource.certfile = resource.certfile;
convertresource.keyfile = resource.keyfile;
convertresource.password = resource.password;
convertresource.pempassphrase = resource.pempassphrase;
return convertresource.perform_operation(client,"convert");
} | [
"public",
"static",
"base_response",
"convert",
"(",
"nitro_service",
"client",
",",
"sslpkcs12",
"resource",
")",
"throws",
"Exception",
"{",
"sslpkcs12",
"convertresource",
"=",
"new",
"sslpkcs12",
"(",
")",
";",
"convertresource",
".",
"outfile",
"=",
"resource",
".",
"outfile",
";",
"convertresource",
".",
"Import",
"=",
"resource",
".",
"Import",
";",
"convertresource",
".",
"pkcs12file",
"=",
"resource",
".",
"pkcs12file",
";",
"convertresource",
".",
"des",
"=",
"resource",
".",
"des",
";",
"convertresource",
".",
"des3",
"=",
"resource",
".",
"des3",
";",
"convertresource",
".",
"export",
"=",
"resource",
".",
"export",
";",
"convertresource",
".",
"certfile",
"=",
"resource",
".",
"certfile",
";",
"convertresource",
".",
"keyfile",
"=",
"resource",
".",
"keyfile",
";",
"convertresource",
".",
"password",
"=",
"resource",
".",
"password",
";",
"convertresource",
".",
"pempassphrase",
"=",
"resource",
".",
"pempassphrase",
";",
"return",
"convertresource",
".",
"perform_operation",
"(",
"client",
",",
"\"convert\"",
")",
";",
"}"
] | Use this API to convert sslpkcs12. | [
"Use",
"this",
"API",
"to",
"convert",
"sslpkcs12",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpkcs12.java#L307-L320 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/protocol/protocolhttpband.java | protocolhttpband.update | public static base_response update(nitro_service client, protocolhttpband resource) throws Exception {
protocolhttpband updateresource = new protocolhttpband();
updateresource.reqbandsize = resource.reqbandsize;
updateresource.respbandsize = resource.respbandsize;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, protocolhttpband resource) throws Exception {
protocolhttpband updateresource = new protocolhttpband();
updateresource.reqbandsize = resource.reqbandsize;
updateresource.respbandsize = resource.respbandsize;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"protocolhttpband",
"resource",
")",
"throws",
"Exception",
"{",
"protocolhttpband",
"updateresource",
"=",
"new",
"protocolhttpband",
"(",
")",
";",
"updateresource",
".",
"reqbandsize",
"=",
"resource",
".",
"reqbandsize",
";",
"updateresource",
".",
"respbandsize",
"=",
"resource",
".",
"respbandsize",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update protocolhttpband. | [
"Use",
"this",
"API",
"to",
"update",
"protocolhttpband",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/protocol/protocolhttpband.java#L231-L236 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/protocol/protocolhttpband.java | protocolhttpband.unset | public static base_response unset(nitro_service client, protocolhttpband resource, String[] args) throws Exception{
protocolhttpband unsetresource = new protocolhttpband();
return unsetresource.unset_resource(client,args);
} | java | public static base_response unset(nitro_service client, protocolhttpband resource, String[] args) throws Exception{
protocolhttpband unsetresource = new protocolhttpband();
return unsetresource.unset_resource(client,args);
} | [
"public",
"static",
"base_response",
"unset",
"(",
"nitro_service",
"client",
",",
"protocolhttpband",
"resource",
",",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"protocolhttpband",
"unsetresource",
"=",
"new",
"protocolhttpband",
"(",
")",
";",
"return",
"unsetresource",
".",
"unset_resource",
"(",
"client",
",",
"args",
")",
";",
"}"
] | Use this API to unset the properties of protocolhttpband resource.
Properties that need to be unset are specified in args array. | [
"Use",
"this",
"API",
"to",
"unset",
"the",
"properties",
"of",
"protocolhttpband",
"resource",
".",
"Properties",
"that",
"need",
"to",
"be",
"unset",
"are",
"specified",
"in",
"args",
"array",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/protocol/protocolhttpband.java#L242-L245 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/protocol/protocolhttpband.java | protocolhttpband.get | public static protocolhttpband[] get(nitro_service service, protocolhttpband_args args) throws Exception{
protocolhttpband obj = new protocolhttpband();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
protocolhttpband[] response = (protocolhttpband[])obj.get_resources(service, option);
return response;
} | java | public static protocolhttpband[] get(nitro_service service, protocolhttpband_args args) throws Exception{
protocolhttpband obj = new protocolhttpband();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
protocolhttpband[] response = (protocolhttpband[])obj.get_resources(service, option);
return response;
} | [
"public",
"static",
"protocolhttpband",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"protocolhttpband_args",
"args",
")",
"throws",
"Exception",
"{",
"protocolhttpband",
"obj",
"=",
"new",
"protocolhttpband",
"(",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_args",
"(",
"nitro_util",
".",
"object_to_string_withoutquotes",
"(",
"args",
")",
")",
";",
"protocolhttpband",
"[",
"]",
"response",
"=",
"(",
"protocolhttpband",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the protocolhttpband resources that are configured on netscaler.
This uses protocolhttpband_args which is a way to provide additional arguments while fetching the resources. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"protocolhttpband",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
".",
"This",
"uses",
"protocolhttpband_args",
"which",
"is",
"a",
"way",
"to",
"provide",
"additional",
"arguments",
"while",
"fetching",
"the",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/protocol/protocolhttpband.java#L261-L267 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationldappolicy_vpnglobal_binding.java | authenticationldappolicy_vpnglobal_binding.get | public static authenticationldappolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
authenticationldappolicy_vpnglobal_binding obj = new authenticationldappolicy_vpnglobal_binding();
obj.set_name(name);
authenticationldappolicy_vpnglobal_binding response[] = (authenticationldappolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | java | public static authenticationldappolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
authenticationldappolicy_vpnglobal_binding obj = new authenticationldappolicy_vpnglobal_binding();
obj.set_name(name);
authenticationldappolicy_vpnglobal_binding response[] = (authenticationldappolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"authenticationldappolicy_vpnglobal_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"authenticationldappolicy_vpnglobal_binding",
"obj",
"=",
"new",
"authenticationldappolicy_vpnglobal_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"authenticationldappolicy_vpnglobal_binding",
"response",
"[",
"]",
"=",
"(",
"authenticationldappolicy_vpnglobal_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch authenticationldappolicy_vpnglobal_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"authenticationldappolicy_vpnglobal_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationldappolicy_vpnglobal_binding.java#L132-L137 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hafailover.java | hafailover.Force | public static base_response Force(nitro_service client, hafailover resource) throws Exception {
hafailover Forceresource = new hafailover();
Forceresource.force = resource.force;
return Forceresource.perform_operation(client,"Force");
} | java | public static base_response Force(nitro_service client, hafailover resource) throws Exception {
hafailover Forceresource = new hafailover();
Forceresource.force = resource.force;
return Forceresource.perform_operation(client,"Force");
} | [
"public",
"static",
"base_response",
"Force",
"(",
"nitro_service",
"client",
",",
"hafailover",
"resource",
")",
"throws",
"Exception",
"{",
"hafailover",
"Forceresource",
"=",
"new",
"hafailover",
"(",
")",
";",
"Forceresource",
".",
"force",
"=",
"resource",
".",
"force",
";",
"return",
"Forceresource",
".",
"perform_operation",
"(",
"client",
",",
"\"Force\"",
")",
";",
"}"
] | Use this API to Force hafailover. | [
"Use",
"this",
"API",
"to",
"Force",
"hafailover",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hafailover.java#L103-L107 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaapreauthenticationpolicy_binding.java | aaapreauthenticationpolicy_binding.get | public static aaapreauthenticationpolicy_binding get(nitro_service service, String name) throws Exception{
aaapreauthenticationpolicy_binding obj = new aaapreauthenticationpolicy_binding();
obj.set_name(name);
aaapreauthenticationpolicy_binding response = (aaapreauthenticationpolicy_binding) obj.get_resource(service);
return response;
} | java | public static aaapreauthenticationpolicy_binding get(nitro_service service, String name) throws Exception{
aaapreauthenticationpolicy_binding obj = new aaapreauthenticationpolicy_binding();
obj.set_name(name);
aaapreauthenticationpolicy_binding response = (aaapreauthenticationpolicy_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"aaapreauthenticationpolicy_binding",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"aaapreauthenticationpolicy_binding",
"obj",
"=",
"new",
"aaapreauthenticationpolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"aaapreauthenticationpolicy_binding",
"response",
"=",
"(",
"aaapreauthenticationpolicy_binding",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch aaapreauthenticationpolicy_binding resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"aaapreauthenticationpolicy_binding",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaapreauthenticationpolicy_binding.java#L114-L119 | train |
mariosotil/river-framework | river-core/src/main/java/org/riverframework/core/AbstractDocument.java | AbstractDocument.numericEquals | protected static boolean numericEquals(Field vector1, Field vector2) {
if (vector1.size() != vector2.size())
return false;
if (vector1.isEmpty())
return true;
Iterator<Object> it1 = vector1.iterator();
Iterator<Object> it2 = vector2.iterator();
while (it1.hasNext()) {
Object obj1 = it1.next();
Object obj2 = it2.next();
if (!(obj1 instanceof Number && obj2 instanceof Number))
return false;
if (((Number) obj1).doubleValue() != ((Number) obj2).doubleValue())
return false;
}
return true;
} | java | protected static boolean numericEquals(Field vector1, Field vector2) {
if (vector1.size() != vector2.size())
return false;
if (vector1.isEmpty())
return true;
Iterator<Object> it1 = vector1.iterator();
Iterator<Object> it2 = vector2.iterator();
while (it1.hasNext()) {
Object obj1 = it1.next();
Object obj2 = it2.next();
if (!(obj1 instanceof Number && obj2 instanceof Number))
return false;
if (((Number) obj1).doubleValue() != ((Number) obj2).doubleValue())
return false;
}
return true;
} | [
"protected",
"static",
"boolean",
"numericEquals",
"(",
"Field",
"vector1",
",",
"Field",
"vector2",
")",
"{",
"if",
"(",
"vector1",
".",
"size",
"(",
")",
"!=",
"vector2",
".",
"size",
"(",
")",
")",
"return",
"false",
";",
"if",
"(",
"vector1",
".",
"isEmpty",
"(",
")",
")",
"return",
"true",
";",
"Iterator",
"<",
"Object",
">",
"it1",
"=",
"vector1",
".",
"iterator",
"(",
")",
";",
"Iterator",
"<",
"Object",
">",
"it2",
"=",
"vector2",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"it1",
".",
"hasNext",
"(",
")",
")",
"{",
"Object",
"obj1",
"=",
"it1",
".",
"next",
"(",
")",
";",
"Object",
"obj2",
"=",
"it2",
".",
"next",
"(",
")",
";",
"if",
"(",
"!",
"(",
"obj1",
"instanceof",
"Number",
"&&",
"obj2",
"instanceof",
"Number",
")",
")",
"return",
"false",
";",
"if",
"(",
"(",
"(",
"Number",
")",
"obj1",
")",
".",
"doubleValue",
"(",
")",
"!=",
"(",
"(",
"Number",
")",
"obj2",
")",
".",
"doubleValue",
"(",
")",
")",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}"
] | Compares two vectors and determines if they are numeric equals,
independent of its type.
@param vector1
the first vector
@param vector2
the second vector
@return true if the vectors are numeric equals | [
"Compares",
"two",
"vectors",
"and",
"determines",
"if",
"they",
"are",
"numeric",
"equals",
"independent",
"of",
"its",
"type",
"."
] | e8c3ae3b0a956ec9cb4e14a81376ba8e8370b44e | https://github.com/mariosotil/river-framework/blob/e8c3ae3b0a956ec9cb4e14a81376ba8e8370b44e/river-core/src/main/java/org/riverframework/core/AbstractDocument.java#L107-L128 | train |
mariosotil/river-framework | river-core/src/main/java/org/riverframework/core/AbstractDocument.java | AbstractDocument.setFieldIfNecessary | protected boolean setFieldIfNecessary(String field, Object value) {
if (!isOpen())
throw new ClosedObjectException("The Document object is closed.");
if (!compareFieldValue(field, value)) {
_doc.setField(field, value);
return true;
}
return false;
} | java | protected boolean setFieldIfNecessary(String field, Object value) {
if (!isOpen())
throw new ClosedObjectException("The Document object is closed.");
if (!compareFieldValue(field, value)) {
_doc.setField(field, value);
return true;
}
return false;
} | [
"protected",
"boolean",
"setFieldIfNecessary",
"(",
"String",
"field",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"!",
"isOpen",
"(",
")",
")",
"throw",
"new",
"ClosedObjectException",
"(",
"\"The Document object is closed.\"",
")",
";",
"if",
"(",
"!",
"compareFieldValue",
"(",
"field",
",",
"value",
")",
")",
"{",
"_doc",
".",
"setField",
"(",
"field",
",",
"value",
")",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Verifies if the new value is different from the field's old value. It's
useful, for example, in NoSQL databases that replicates data between
servers. This verification prevents to mark a field as modified and to be
replicated needlessly.
@param field
the field that we are checking before to be modified
@param value
the new value
@return true if the new and the old values are different and the value
was changed. | [
"Verifies",
"if",
"the",
"new",
"value",
"is",
"different",
"from",
"the",
"field",
"s",
"old",
"value",
".",
"It",
"s",
"useful",
"for",
"example",
"in",
"NoSQL",
"databases",
"that",
"replicates",
"data",
"between",
"servers",
".",
"This",
"verification",
"prevents",
"to",
"mark",
"a",
"field",
"as",
"modified",
"and",
"to",
"be",
"replicated",
"needlessly",
"."
] | e8c3ae3b0a956ec9cb4e14a81376ba8e8370b44e | https://github.com/mariosotil/river-framework/blob/e8c3ae3b0a956ec9cb4e14a81376ba8e8370b44e/river-core/src/main/java/org/riverframework/core/AbstractDocument.java#L143-L153 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowpolicy_appflowglobal_binding.java | appflowpolicy_appflowglobal_binding.get | public static appflowpolicy_appflowglobal_binding[] get(nitro_service service, String name) throws Exception{
appflowpolicy_appflowglobal_binding obj = new appflowpolicy_appflowglobal_binding();
obj.set_name(name);
appflowpolicy_appflowglobal_binding response[] = (appflowpolicy_appflowglobal_binding[]) obj.get_resources(service);
return response;
} | java | public static appflowpolicy_appflowglobal_binding[] get(nitro_service service, String name) throws Exception{
appflowpolicy_appflowglobal_binding obj = new appflowpolicy_appflowglobal_binding();
obj.set_name(name);
appflowpolicy_appflowglobal_binding response[] = (appflowpolicy_appflowglobal_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"appflowpolicy_appflowglobal_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"appflowpolicy_appflowglobal_binding",
"obj",
"=",
"new",
"appflowpolicy_appflowglobal_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"appflowpolicy_appflowglobal_binding",
"response",
"[",
"]",
"=",
"(",
"appflowpolicy_appflowglobal_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch appflowpolicy_appflowglobal_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"appflowpolicy_appflowglobal_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowpolicy_appflowglobal_binding.java#L162-L167 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute.java | lbroute.add | public static base_response add(nitro_service client, lbroute resource) throws Exception {
lbroute addresource = new lbroute();
addresource.network = resource.network;
addresource.netmask = resource.netmask;
addresource.gatewayname = resource.gatewayname;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, lbroute resource) throws Exception {
lbroute addresource = new lbroute();
addresource.network = resource.network;
addresource.netmask = resource.netmask;
addresource.gatewayname = resource.gatewayname;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"lbroute",
"resource",
")",
"throws",
"Exception",
"{",
"lbroute",
"addresource",
"=",
"new",
"lbroute",
"(",
")",
";",
"addresource",
".",
"network",
"=",
"resource",
".",
"network",
";",
"addresource",
".",
"netmask",
"=",
"resource",
".",
"netmask",
";",
"addresource",
".",
"gatewayname",
"=",
"resource",
".",
"gatewayname",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add lbroute. | [
"Use",
"this",
"API",
"to",
"add",
"lbroute",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute.java#L144-L150 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute.java | lbroute.delete | public static base_response delete(nitro_service client, lbroute resource) throws Exception {
lbroute deleteresource = new lbroute();
deleteresource.network = resource.network;
deleteresource.netmask = resource.netmask;
return deleteresource.delete_resource(client);
} | java | public static base_response delete(nitro_service client, lbroute resource) throws Exception {
lbroute deleteresource = new lbroute();
deleteresource.network = resource.network;
deleteresource.netmask = resource.netmask;
return deleteresource.delete_resource(client);
} | [
"public",
"static",
"base_response",
"delete",
"(",
"nitro_service",
"client",
",",
"lbroute",
"resource",
")",
"throws",
"Exception",
"{",
"lbroute",
"deleteresource",
"=",
"new",
"lbroute",
"(",
")",
";",
"deleteresource",
".",
"network",
"=",
"resource",
".",
"network",
";",
"deleteresource",
".",
"netmask",
"=",
"resource",
".",
"netmask",
";",
"return",
"deleteresource",
".",
"delete_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to delete lbroute. | [
"Use",
"this",
"API",
"to",
"delete",
"lbroute",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbroute.java#L182-L187 | train |
Subsets and Splits