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
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataCollector.java
MtasDataCollector.closeSegmentKeyValueRegistration
public void closeSegmentKeyValueRegistration() throws IOException { if (!closed) { if (segmentRegistration != null) { Map<String, T1> keyValueList = segmentKeyValueList.get(segmentName); T1 tmpSegmentValueBoundary = segmentValuesBoundary.get(segmentName); for (Entry<String, T1> entry : keyValueList.entrySet()) { if (tmpSegmentValueBoundary == null || compareWithBoundary( entry.getValue(), tmpSegmentValueBoundary)) { segmentKeys.add(entry.getKey()); } } } } else { throw new IOException("already closed"); } }
java
public void closeSegmentKeyValueRegistration() throws IOException { if (!closed) { if (segmentRegistration != null) { Map<String, T1> keyValueList = segmentKeyValueList.get(segmentName); T1 tmpSegmentValueBoundary = segmentValuesBoundary.get(segmentName); for (Entry<String, T1> entry : keyValueList.entrySet()) { if (tmpSegmentValueBoundary == null || compareWithBoundary( entry.getValue(), tmpSegmentValueBoundary)) { segmentKeys.add(entry.getKey()); } } } } else { throw new IOException("already closed"); } }
[ "public", "void", "closeSegmentKeyValueRegistration", "(", ")", "throws", "IOException", "{", "if", "(", "!", "closed", ")", "{", "if", "(", "segmentRegistration", "!=", "null", ")", "{", "Map", "<", "String", ",", "T1", ">", "keyValueList", "=", "segmentKeyValueList", ".", "get", "(", "segmentName", ")", ";", "T1", "tmpSegmentValueBoundary", "=", "segmentValuesBoundary", ".", "get", "(", "segmentName", ")", ";", "for", "(", "Entry", "<", "String", ",", "T1", ">", "entry", ":", "keyValueList", ".", "entrySet", "(", ")", ")", "{", "if", "(", "tmpSegmentValueBoundary", "==", "null", "||", "compareWithBoundary", "(", "entry", ".", "getValue", "(", ")", ",", "tmpSegmentValueBoundary", ")", ")", "{", "segmentKeys", ".", "add", "(", "entry", ".", "getKey", "(", ")", ")", ";", "}", "}", "}", "}", "else", "{", "throw", "new", "IOException", "(", "\"already closed\"", ")", ";", "}", "}" ]
Close segment key value registration. @throws IOException Signals that an I/O exception has occurred.
[ "Close", "segment", "key", "value", "registration", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataCollector.java#L748-L763
train
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataCollector.java
MtasDataCollector.recomputeSegmentKeys
public void recomputeSegmentKeys() throws IOException { if (!closed && segmentRegistration != null) { if (segmentRegistration.equals(SEGMENT_SORT_ASC) || segmentRegistration.equals(SEGMENT_SORT_DESC) || segmentRegistration.equals(SEGMENT_BOUNDARY_ASC) || segmentRegistration.equals(SEGMENT_BOUNDARY_DESC)) { if (segmentRegistration.equals(SEGMENT_SORT_ASC) || segmentRegistration.equals(SEGMENT_SORT_DESC)) { segmentKeys.clear(); // recompute boundaries for (Entry<String, Map<String, T1>> entry : segmentKeyValueList .entrySet()) { T1 tmpSegmentValueBoundary = boundaryForSegment(entry.getKey()); segmentValuesBoundary.put(entry.getKey(), tmpSegmentValueBoundary); } // compute adjusted boundaries and compute keys for (Entry<String, Map<String, T1>> entry : segmentKeyValueList .entrySet()) { this.segmentName = entry.getKey(); Map<String, T1> keyValueList = entry.getValue(); T1 tmpSegmentValueBoundaryForComputing = boundaryForSegmentComputing( entry.getKey()); for (Entry<String, T1> subEntry : keyValueList.entrySet()) { if (tmpSegmentValueBoundaryForComputing == null || compareWithBoundary(subEntry.getValue(), tmpSegmentValueBoundaryForComputing)) { if (!segmentKeys.contains(subEntry.getKey())) { segmentKeys.add(subEntry.getKey()); } } } } } Map<String, T1> keyValueList; Set<String> recomputeKeyList; segmentRecomputeKeyList = new LinkedHashMap<>(); for (String key : segmentKeys) { for (Entry<String, Map<String, T1>> entry : segmentKeyValueList .entrySet()) { keyValueList = entry.getValue(); if (!keyValueList.containsKey(key)) { if (!segmentRecomputeKeyList.containsKey(entry.getKey())) { recomputeKeyList = new HashSet<>(); segmentRecomputeKeyList.put(entry.getKey(), recomputeKeyList); } else { recomputeKeyList = segmentRecomputeKeyList.get(entry.getKey()); } recomputeKeyList.add(key); } } } this.segmentName = null; } else { throw new IOException( "not for segmentRegistration " + segmentRegistration); } } else { throw new IOException("already closed or no segmentRegistration (" + segmentRegistration + ")"); } }
java
public void recomputeSegmentKeys() throws IOException { if (!closed && segmentRegistration != null) { if (segmentRegistration.equals(SEGMENT_SORT_ASC) || segmentRegistration.equals(SEGMENT_SORT_DESC) || segmentRegistration.equals(SEGMENT_BOUNDARY_ASC) || segmentRegistration.equals(SEGMENT_BOUNDARY_DESC)) { if (segmentRegistration.equals(SEGMENT_SORT_ASC) || segmentRegistration.equals(SEGMENT_SORT_DESC)) { segmentKeys.clear(); // recompute boundaries for (Entry<String, Map<String, T1>> entry : segmentKeyValueList .entrySet()) { T1 tmpSegmentValueBoundary = boundaryForSegment(entry.getKey()); segmentValuesBoundary.put(entry.getKey(), tmpSegmentValueBoundary); } // compute adjusted boundaries and compute keys for (Entry<String, Map<String, T1>> entry : segmentKeyValueList .entrySet()) { this.segmentName = entry.getKey(); Map<String, T1> keyValueList = entry.getValue(); T1 tmpSegmentValueBoundaryForComputing = boundaryForSegmentComputing( entry.getKey()); for (Entry<String, T1> subEntry : keyValueList.entrySet()) { if (tmpSegmentValueBoundaryForComputing == null || compareWithBoundary(subEntry.getValue(), tmpSegmentValueBoundaryForComputing)) { if (!segmentKeys.contains(subEntry.getKey())) { segmentKeys.add(subEntry.getKey()); } } } } } Map<String, T1> keyValueList; Set<String> recomputeKeyList; segmentRecomputeKeyList = new LinkedHashMap<>(); for (String key : segmentKeys) { for (Entry<String, Map<String, T1>> entry : segmentKeyValueList .entrySet()) { keyValueList = entry.getValue(); if (!keyValueList.containsKey(key)) { if (!segmentRecomputeKeyList.containsKey(entry.getKey())) { recomputeKeyList = new HashSet<>(); segmentRecomputeKeyList.put(entry.getKey(), recomputeKeyList); } else { recomputeKeyList = segmentRecomputeKeyList.get(entry.getKey()); } recomputeKeyList.add(key); } } } this.segmentName = null; } else { throw new IOException( "not for segmentRegistration " + segmentRegistration); } } else { throw new IOException("already closed or no segmentRegistration (" + segmentRegistration + ")"); } }
[ "public", "void", "recomputeSegmentKeys", "(", ")", "throws", "IOException", "{", "if", "(", "!", "closed", "&&", "segmentRegistration", "!=", "null", ")", "{", "if", "(", "segmentRegistration", ".", "equals", "(", "SEGMENT_SORT_ASC", ")", "||", "segmentRegistration", ".", "equals", "(", "SEGMENT_SORT_DESC", ")", "||", "segmentRegistration", ".", "equals", "(", "SEGMENT_BOUNDARY_ASC", ")", "||", "segmentRegistration", ".", "equals", "(", "SEGMENT_BOUNDARY_DESC", ")", ")", "{", "if", "(", "segmentRegistration", ".", "equals", "(", "SEGMENT_SORT_ASC", ")", "||", "segmentRegistration", ".", "equals", "(", "SEGMENT_SORT_DESC", ")", ")", "{", "segmentKeys", ".", "clear", "(", ")", ";", "// recompute boundaries", "for", "(", "Entry", "<", "String", ",", "Map", "<", "String", ",", "T1", ">", ">", "entry", ":", "segmentKeyValueList", ".", "entrySet", "(", ")", ")", "{", "T1", "tmpSegmentValueBoundary", "=", "boundaryForSegment", "(", "entry", ".", "getKey", "(", ")", ")", ";", "segmentValuesBoundary", ".", "put", "(", "entry", ".", "getKey", "(", ")", ",", "tmpSegmentValueBoundary", ")", ";", "}", "// compute adjusted boundaries and compute keys", "for", "(", "Entry", "<", "String", ",", "Map", "<", "String", ",", "T1", ">", ">", "entry", ":", "segmentKeyValueList", ".", "entrySet", "(", ")", ")", "{", "this", ".", "segmentName", "=", "entry", ".", "getKey", "(", ")", ";", "Map", "<", "String", ",", "T1", ">", "keyValueList", "=", "entry", ".", "getValue", "(", ")", ";", "T1", "tmpSegmentValueBoundaryForComputing", "=", "boundaryForSegmentComputing", "(", "entry", ".", "getKey", "(", ")", ")", ";", "for", "(", "Entry", "<", "String", ",", "T1", ">", "subEntry", ":", "keyValueList", ".", "entrySet", "(", ")", ")", "{", "if", "(", "tmpSegmentValueBoundaryForComputing", "==", "null", "||", "compareWithBoundary", "(", "subEntry", ".", "getValue", "(", ")", ",", "tmpSegmentValueBoundaryForComputing", ")", ")", "{", "if", "(", "!", "segmentKeys", ".", "contains", "(", "subEntry", ".", "getKey", "(", ")", ")", ")", "{", "segmentKeys", ".", "add", "(", "subEntry", ".", "getKey", "(", ")", ")", ";", "}", "}", "}", "}", "}", "Map", "<", "String", ",", "T1", ">", "keyValueList", ";", "Set", "<", "String", ">", "recomputeKeyList", ";", "segmentRecomputeKeyList", "=", "new", "LinkedHashMap", "<>", "(", ")", ";", "for", "(", "String", "key", ":", "segmentKeys", ")", "{", "for", "(", "Entry", "<", "String", ",", "Map", "<", "String", ",", "T1", ">", ">", "entry", ":", "segmentKeyValueList", ".", "entrySet", "(", ")", ")", "{", "keyValueList", "=", "entry", ".", "getValue", "(", ")", ";", "if", "(", "!", "keyValueList", ".", "containsKey", "(", "key", ")", ")", "{", "if", "(", "!", "segmentRecomputeKeyList", ".", "containsKey", "(", "entry", ".", "getKey", "(", ")", ")", ")", "{", "recomputeKeyList", "=", "new", "HashSet", "<>", "(", ")", ";", "segmentRecomputeKeyList", ".", "put", "(", "entry", ".", "getKey", "(", ")", ",", "recomputeKeyList", ")", ";", "}", "else", "{", "recomputeKeyList", "=", "segmentRecomputeKeyList", ".", "get", "(", "entry", ".", "getKey", "(", ")", ")", ";", "}", "recomputeKeyList", ".", "add", "(", "key", ")", ";", "}", "}", "}", "this", ".", "segmentName", "=", "null", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"not for segmentRegistration \"", "+", "segmentRegistration", ")", ";", "}", "}", "else", "{", "throw", "new", "IOException", "(", "\"already closed or no segmentRegistration (\"", "+", "segmentRegistration", "+", "\")\"", ")", ";", "}", "}" ]
Recompute segment keys. @throws IOException Signals that an I/O exception has occurred.
[ "Recompute", "segment", "keys", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataCollector.java#L770-L832
train
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataCollector.java
MtasDataCollector.validateWithSegmentBoundary
protected boolean validateWithSegmentBoundary(T1 value) throws IOException { if (!closed && segmentRegistration != null) { T1 tmpSegmentValueBoundary = segmentValuesBoundary.get(segmentName); if (tmpSegmentValueBoundary == null || compareWithBoundary(value, tmpSegmentValueBoundary)) { return true; } } return false; }
java
protected boolean validateWithSegmentBoundary(T1 value) throws IOException { if (!closed && segmentRegistration != null) { T1 tmpSegmentValueBoundary = segmentValuesBoundary.get(segmentName); if (tmpSegmentValueBoundary == null || compareWithBoundary(value, tmpSegmentValueBoundary)) { return true; } } return false; }
[ "protected", "boolean", "validateWithSegmentBoundary", "(", "T1", "value", ")", "throws", "IOException", "{", "if", "(", "!", "closed", "&&", "segmentRegistration", "!=", "null", ")", "{", "T1", "tmpSegmentValueBoundary", "=", "segmentValuesBoundary", ".", "get", "(", "segmentName", ")", ";", "if", "(", "tmpSegmentValueBoundary", "==", "null", "||", "compareWithBoundary", "(", "value", ",", "tmpSegmentValueBoundary", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
Validate with segment boundary. @param value the value @return true, if successful @throws IOException Signals that an I/O exception has occurred.
[ "Validate", "with", "segment", "boundary", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataCollector.java#L884-L893
train
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataCollector.java
MtasDataCollector.sortedAndUnique
private boolean sortedAndUnique(String[] keyList, int size) throws IOException { if (!closed) { for (int i = 1; i < size; i++) { if (keyList[(i - 1)].compareTo(keyList[i]) >= 0) { return false; } } return true; } else { throw new IOException("already closed"); } }
java
private boolean sortedAndUnique(String[] keyList, int size) throws IOException { if (!closed) { for (int i = 1; i < size; i++) { if (keyList[(i - 1)].compareTo(keyList[i]) >= 0) { return false; } } return true; } else { throw new IOException("already closed"); } }
[ "private", "boolean", "sortedAndUnique", "(", "String", "[", "]", "keyList", ",", "int", "size", ")", "throws", "IOException", "{", "if", "(", "!", "closed", ")", "{", "for", "(", "int", "i", "=", "1", ";", "i", "<", "size", ";", "i", "++", ")", "{", "if", "(", "keyList", "[", "(", "i", "-", "1", ")", "]", ".", "compareTo", "(", "keyList", "[", "i", "]", ")", ">=", "0", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"already closed\"", ")", ";", "}", "}" ]
Sorted and unique. @param keyList the key list @param size the size @return true, if successful @throws IOException Signals that an I/O exception has occurred.
[ "Sorted", "and", "unique", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataCollector.java#L1041-L1053
train
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataCollector.java
MtasDataCollector.computeSortAndUniqueMapping
private int[][] computeSortAndUniqueMapping(String[] keyList, int size) throws IOException { if (!closed) { if (size > 0) { SortedMap<String, int[]> sortedMap = new TreeMap<>(); for (int i = 0; i < size; i++) { if (sortedMap.containsKey(keyList[i])) { int[] previousList = sortedMap.get(keyList[i]); int[] newList = new int[previousList.length + 1]; System.arraycopy(previousList, 0, newList, 0, previousList.length); newList[previousList.length] = i; sortedMap.put(keyList[i], newList); } else { sortedMap.put(keyList[i], new int[] { i }); } } Collection<int[]> values = sortedMap.values(); int[][] result = new int[sortedMap.size()][]; return values.toArray(result); } else { return null; } } else { throw new IOException("already closed"); } }
java
private int[][] computeSortAndUniqueMapping(String[] keyList, int size) throws IOException { if (!closed) { if (size > 0) { SortedMap<String, int[]> sortedMap = new TreeMap<>(); for (int i = 0; i < size; i++) { if (sortedMap.containsKey(keyList[i])) { int[] previousList = sortedMap.get(keyList[i]); int[] newList = new int[previousList.length + 1]; System.arraycopy(previousList, 0, newList, 0, previousList.length); newList[previousList.length] = i; sortedMap.put(keyList[i], newList); } else { sortedMap.put(keyList[i], new int[] { i }); } } Collection<int[]> values = sortedMap.values(); int[][] result = new int[sortedMap.size()][]; return values.toArray(result); } else { return null; } } else { throw new IOException("already closed"); } }
[ "private", "int", "[", "]", "[", "]", "computeSortAndUniqueMapping", "(", "String", "[", "]", "keyList", ",", "int", "size", ")", "throws", "IOException", "{", "if", "(", "!", "closed", ")", "{", "if", "(", "size", ">", "0", ")", "{", "SortedMap", "<", "String", ",", "int", "[", "]", ">", "sortedMap", "=", "new", "TreeMap", "<>", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "if", "(", "sortedMap", ".", "containsKey", "(", "keyList", "[", "i", "]", ")", ")", "{", "int", "[", "]", "previousList", "=", "sortedMap", ".", "get", "(", "keyList", "[", "i", "]", ")", ";", "int", "[", "]", "newList", "=", "new", "int", "[", "previousList", ".", "length", "+", "1", "]", ";", "System", ".", "arraycopy", "(", "previousList", ",", "0", ",", "newList", ",", "0", ",", "previousList", ".", "length", ")", ";", "newList", "[", "previousList", ".", "length", "]", "=", "i", ";", "sortedMap", ".", "put", "(", "keyList", "[", "i", "]", ",", "newList", ")", ";", "}", "else", "{", "sortedMap", ".", "put", "(", "keyList", "[", "i", "]", ",", "new", "int", "[", "]", "{", "i", "}", ")", ";", "}", "}", "Collection", "<", "int", "[", "]", ">", "values", "=", "sortedMap", ".", "values", "(", ")", ";", "int", "[", "]", "[", "]", "result", "=", "new", "int", "[", "sortedMap", ".", "size", "(", ")", "]", "[", "", "]", ";", "return", "values", ".", "toArray", "(", "result", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}", "else", "{", "throw", "new", "IOException", "(", "\"already closed\"", ")", ";", "}", "}" ]
Compute sort and unique mapping. @param keyList the key list @param size the size @return the int[][] @throws IOException Signals that an I/O exception has occurred.
[ "Compute", "sort", "and", "unique", "mapping", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataCollector.java#L1063-L1088
train
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataCollector.java
MtasDataCollector.closeNewList
public void closeNewList() throws IOException { if (!closed) { if (segmentRegistration != null) { this.segmentName = null; } if (newSize > 0) { // add remaining old while (position < getSize()) { if (newPosition == newSize) { increaseNewListSize(); } newKeyList[newPosition] = keyList[position]; newSourceNumberList[newPosition] = sourceNumberList[position]; newErrorNumber[newPosition] = errorNumber[position]; newErrorList[newPosition] = errorList[position]; if (hasSub) { newSubCollectorListNextLevel[newPosition] = subCollectorListNextLevel[position]; } copyToNew(position, newPosition); position++; newPosition++; } // copy keyList = newKeyList; sourceNumberList = newSourceNumberList; errorNumber = newErrorNumber; errorList = newErrorList; subCollectorListNextLevel = newSubCollectorListNextLevel; copyFromNew(); size = newPosition; // sort and merge if (!sortedAndUnique(keyList, getSize())) { remapData(computeSortAndUniqueMapping(keyList, getSize())); } } position = 0; newSize = 0; newPosition = 0; newCurrentPosition = 0; } }
java
public void closeNewList() throws IOException { if (!closed) { if (segmentRegistration != null) { this.segmentName = null; } if (newSize > 0) { // add remaining old while (position < getSize()) { if (newPosition == newSize) { increaseNewListSize(); } newKeyList[newPosition] = keyList[position]; newSourceNumberList[newPosition] = sourceNumberList[position]; newErrorNumber[newPosition] = errorNumber[position]; newErrorList[newPosition] = errorList[position]; if (hasSub) { newSubCollectorListNextLevel[newPosition] = subCollectorListNextLevel[position]; } copyToNew(position, newPosition); position++; newPosition++; } // copy keyList = newKeyList; sourceNumberList = newSourceNumberList; errorNumber = newErrorNumber; errorList = newErrorList; subCollectorListNextLevel = newSubCollectorListNextLevel; copyFromNew(); size = newPosition; // sort and merge if (!sortedAndUnique(keyList, getSize())) { remapData(computeSortAndUniqueMapping(keyList, getSize())); } } position = 0; newSize = 0; newPosition = 0; newCurrentPosition = 0; } }
[ "public", "void", "closeNewList", "(", ")", "throws", "IOException", "{", "if", "(", "!", "closed", ")", "{", "if", "(", "segmentRegistration", "!=", "null", ")", "{", "this", ".", "segmentName", "=", "null", ";", "}", "if", "(", "newSize", ">", "0", ")", "{", "// add remaining old", "while", "(", "position", "<", "getSize", "(", ")", ")", "{", "if", "(", "newPosition", "==", "newSize", ")", "{", "increaseNewListSize", "(", ")", ";", "}", "newKeyList", "[", "newPosition", "]", "=", "keyList", "[", "position", "]", ";", "newSourceNumberList", "[", "newPosition", "]", "=", "sourceNumberList", "[", "position", "]", ";", "newErrorNumber", "[", "newPosition", "]", "=", "errorNumber", "[", "position", "]", ";", "newErrorList", "[", "newPosition", "]", "=", "errorList", "[", "position", "]", ";", "if", "(", "hasSub", ")", "{", "newSubCollectorListNextLevel", "[", "newPosition", "]", "=", "subCollectorListNextLevel", "[", "position", "]", ";", "}", "copyToNew", "(", "position", ",", "newPosition", ")", ";", "position", "++", ";", "newPosition", "++", ";", "}", "// copy", "keyList", "=", "newKeyList", ";", "sourceNumberList", "=", "newSourceNumberList", ";", "errorNumber", "=", "newErrorNumber", ";", "errorList", "=", "newErrorList", ";", "subCollectorListNextLevel", "=", "newSubCollectorListNextLevel", ";", "copyFromNew", "(", ")", ";", "size", "=", "newPosition", ";", "// sort and merge", "if", "(", "!", "sortedAndUnique", "(", "keyList", ",", "getSize", "(", ")", ")", ")", "{", "remapData", "(", "computeSortAndUniqueMapping", "(", "keyList", ",", "getSize", "(", ")", ")", ")", ";", "}", "}", "position", "=", "0", ";", "newSize", "=", "0", ";", "newPosition", "=", "0", ";", "newCurrentPosition", "=", "0", ";", "}", "}" ]
Close new list. @throws IOException Signals that an I/O exception has occurred.
[ "Close", "new", "list", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataCollector.java#L1157-L1197
train
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataCollector.java
MtasDataCollector.setWithTotal
public void setWithTotal() throws IOException { if (collectorType.equals(DataCollector.COLLECTOR_TYPE_LIST)) { if (segmentName != null) { throw new IOException("can't get total with segmentRegistration"); } else { withTotal = true; } } else { throw new IOException( "can't get total for dataCollector of type " + collectorType); } }
java
public void setWithTotal() throws IOException { if (collectorType.equals(DataCollector.COLLECTOR_TYPE_LIST)) { if (segmentName != null) { throw new IOException("can't get total with segmentRegistration"); } else { withTotal = true; } } else { throw new IOException( "can't get total for dataCollector of type " + collectorType); } }
[ "public", "void", "setWithTotal", "(", ")", "throws", "IOException", "{", "if", "(", "collectorType", ".", "equals", "(", "DataCollector", ".", "COLLECTOR_TYPE_LIST", ")", ")", "{", "if", "(", "segmentName", "!=", "null", ")", "{", "throw", "new", "IOException", "(", "\"can't get total with segmentRegistration\"", ")", ";", "}", "else", "{", "withTotal", "=", "true", ";", "}", "}", "else", "{", "throw", "new", "IOException", "(", "\"can't get total for dataCollector of type \"", "+", "collectorType", ")", ";", "}", "}" ]
Sets the with total. @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "with", "total", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataCollector.java#L1495-L1506
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dnsrecords_stats.java
dnsrecords_stats.get
public static dnsrecords_stats[] get(nitro_service service) throws Exception{ dnsrecords_stats obj = new dnsrecords_stats(); dnsrecords_stats[] response = (dnsrecords_stats[])obj.stat_resources(service); return response; }
java
public static dnsrecords_stats[] get(nitro_service service) throws Exception{ dnsrecords_stats obj = new dnsrecords_stats(); dnsrecords_stats[] response = (dnsrecords_stats[])obj.stat_resources(service); return response; }
[ "public", "static", "dnsrecords_stats", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "dnsrecords_stats", "obj", "=", "new", "dnsrecords_stats", "(", ")", ";", "dnsrecords_stats", "[", "]", "response", "=", "(", "dnsrecords_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch the statistics of all dnsrecords_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "dnsrecords_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dnsrecords_stats.java#L208-L212
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dnsrecords_stats.java
dnsrecords_stats.get
public static dnsrecords_stats get(nitro_service service, String dnsrecordtype) throws Exception{ dnsrecords_stats obj = new dnsrecords_stats(); obj.set_dnsrecordtype(dnsrecordtype); dnsrecords_stats response = (dnsrecords_stats) obj.stat_resource(service); return response; }
java
public static dnsrecords_stats get(nitro_service service, String dnsrecordtype) throws Exception{ dnsrecords_stats obj = new dnsrecords_stats(); obj.set_dnsrecordtype(dnsrecordtype); dnsrecords_stats response = (dnsrecords_stats) obj.stat_resource(service); return response; }
[ "public", "static", "dnsrecords_stats", "get", "(", "nitro_service", "service", ",", "String", "dnsrecordtype", ")", "throws", "Exception", "{", "dnsrecords_stats", "obj", "=", "new", "dnsrecords_stats", "(", ")", ";", "obj", ".", "set_dnsrecordtype", "(", "dnsrecordtype", ")", ";", "dnsrecords_stats", "response", "=", "(", "dnsrecords_stats", ")", "obj", ".", "stat_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch statistics of dnsrecords_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "dnsrecords_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dnsrecords_stats.java#L226-L231
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbvserver_tmtrafficpolicy_binding.java
lbvserver_tmtrafficpolicy_binding.get
public static lbvserver_tmtrafficpolicy_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_tmtrafficpolicy_binding obj = new lbvserver_tmtrafficpolicy_binding(); obj.set_name(name); lbvserver_tmtrafficpolicy_binding response[] = (lbvserver_tmtrafficpolicy_binding[]) obj.get_resources(service); return response; }
java
public static lbvserver_tmtrafficpolicy_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_tmtrafficpolicy_binding obj = new lbvserver_tmtrafficpolicy_binding(); obj.set_name(name); lbvserver_tmtrafficpolicy_binding response[] = (lbvserver_tmtrafficpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "lbvserver_tmtrafficpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "lbvserver_tmtrafficpolicy_binding", "obj", "=", "new", "lbvserver_tmtrafficpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "lbvserver_tmtrafficpolicy_binding", "response", "[", "]", "=", "(", "lbvserver_tmtrafficpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch lbvserver_tmtrafficpolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "lbvserver_tmtrafficpolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbvserver_tmtrafficpolicy_binding.java#L336-L341
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbparameter.java
gslbparameter.update
public static base_response update(nitro_service client, gslbparameter resource) throws Exception { gslbparameter updateresource = new gslbparameter(); updateresource.ldnsentrytimeout = resource.ldnsentrytimeout; updateresource.rtttolerance = resource.rtttolerance; updateresource.ldnsmask = resource.ldnsmask; updateresource.v6ldnsmasklen = resource.v6ldnsmasklen; updateresource.ldnsprobeorder = resource.ldnsprobeorder; updateresource.dropldnsreq = resource.dropldnsreq; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, gslbparameter resource) throws Exception { gslbparameter updateresource = new gslbparameter(); updateresource.ldnsentrytimeout = resource.ldnsentrytimeout; updateresource.rtttolerance = resource.rtttolerance; updateresource.ldnsmask = resource.ldnsmask; updateresource.v6ldnsmasklen = resource.v6ldnsmasklen; updateresource.ldnsprobeorder = resource.ldnsprobeorder; updateresource.dropldnsreq = resource.dropldnsreq; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "gslbparameter", "resource", ")", "throws", "Exception", "{", "gslbparameter", "updateresource", "=", "new", "gslbparameter", "(", ")", ";", "updateresource", ".", "ldnsentrytimeout", "=", "resource", ".", "ldnsentrytimeout", ";", "updateresource", ".", "rtttolerance", "=", "resource", ".", "rtttolerance", ";", "updateresource", ".", "ldnsmask", "=", "resource", ".", "ldnsmask", ";", "updateresource", ".", "v6ldnsmasklen", "=", "resource", ".", "v6ldnsmasklen", ";", "updateresource", ".", "ldnsprobeorder", "=", "resource", ".", "ldnsprobeorder", ";", "updateresource", ".", "dropldnsreq", "=", "resource", ".", "dropldnsreq", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update gslbparameter.
[ "Use", "this", "API", "to", "update", "gslbparameter", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbparameter.java#L229-L238
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbparameter.java
gslbparameter.unset
public static base_response unset(nitro_service client, gslbparameter resource, String[] args) throws Exception{ gslbparameter unsetresource = new gslbparameter(); return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, gslbparameter resource, String[] args) throws Exception{ gslbparameter unsetresource = new gslbparameter(); return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "gslbparameter", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "gslbparameter", "unsetresource", "=", "new", "gslbparameter", "(", ")", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of gslbparameter resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "gslbparameter", "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/gslb/gslbparameter.java#L244-L247
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbparameter.java
gslbparameter.get
public static gslbparameter get(nitro_service service) throws Exception{ gslbparameter obj = new gslbparameter(); gslbparameter[] response = (gslbparameter[])obj.get_resources(service); return response[0]; }
java
public static gslbparameter get(nitro_service service) throws Exception{ gslbparameter obj = new gslbparameter(); gslbparameter[] response = (gslbparameter[])obj.get_resources(service); return response[0]; }
[ "public", "static", "gslbparameter", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "gslbparameter", "obj", "=", "new", "gslbparameter", "(", ")", ";", "gslbparameter", "[", "]", "response", "=", "(", "gslbparameter", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch all the gslbparameter resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "gslbparameter", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbparameter.java#L252-L256
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java
MtasSolrCollectionResult.setList
public void setList(long now, List<SimpleOrderedMap<Object>> list) throws IOException { if (action.equals(ComponentCollection.ACTION_LIST)) { this.now = now; this.list = list; } else { throw new IOException("not allowed with action '" + action + "'"); } }
java
public void setList(long now, List<SimpleOrderedMap<Object>> list) throws IOException { if (action.equals(ComponentCollection.ACTION_LIST)) { this.now = now; this.list = list; } else { throw new IOException("not allowed with action '" + action + "'"); } }
[ "public", "void", "setList", "(", "long", "now", ",", "List", "<", "SimpleOrderedMap", "<", "Object", ">", ">", "list", ")", "throws", "IOException", "{", "if", "(", "action", ".", "equals", "(", "ComponentCollection", ".", "ACTION_LIST", ")", ")", "{", "this", ".", "now", "=", "now", ";", "this", ".", "list", "=", "list", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"not allowed with action '\"", "+", "action", "+", "\"'\"", ")", ";", "}", "}" ]
Sets the list. @param now the now @param list the list @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "list", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java#L94-L102
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java
MtasSolrCollectionResult.setCheck
public void setCheck(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_CHECK)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
java
public void setCheck(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_CHECK)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
[ "public", "void", "setCheck", "(", "long", "now", ",", "SimpleOrderedMap", "<", "Object", ">", "status", ")", "throws", "IOException", "{", "if", "(", "action", ".", "equals", "(", "ComponentCollection", ".", "ACTION_CHECK", ")", ")", "{", "this", ".", "now", "=", "now", ";", "this", ".", "status", "=", "status", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"not allowed with action '\"", "+", "action", "+", "\"'\"", ")", ";", "}", "}" ]
Sets the check. @param now the now @param status the status @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "check", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java#L111-L119
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java
MtasSolrCollectionResult.setGet
public void setGet(long now, SimpleOrderedMap<Object> status, HashSet<String> stringValues) throws IOException { if (action.equals(ComponentCollection.ACTION_GET)) { this.now = now; this.status = status; this.values = stringValues; } else { throw new IOException("not allowed with action '" + action + "'"); } }
java
public void setGet(long now, SimpleOrderedMap<Object> status, HashSet<String> stringValues) throws IOException { if (action.equals(ComponentCollection.ACTION_GET)) { this.now = now; this.status = status; this.values = stringValues; } else { throw new IOException("not allowed with action '" + action + "'"); } }
[ "public", "void", "setGet", "(", "long", "now", ",", "SimpleOrderedMap", "<", "Object", ">", "status", ",", "HashSet", "<", "String", ">", "stringValues", ")", "throws", "IOException", "{", "if", "(", "action", ".", "equals", "(", "ComponentCollection", ".", "ACTION_GET", ")", ")", "{", "this", ".", "now", "=", "now", ";", "this", ".", "status", "=", "status", ";", "this", ".", "values", "=", "stringValues", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"not allowed with action '\"", "+", "action", "+", "\"'\"", ")", ";", "}", "}" ]
Sets the get. @param now the now @param status the status @param stringValues the string values @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "get", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java#L129-L138
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java
MtasSolrCollectionResult.setPost
public void setPost(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_POST)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
java
public void setPost(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_POST)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
[ "public", "void", "setPost", "(", "long", "now", ",", "SimpleOrderedMap", "<", "Object", ">", "status", ")", "throws", "IOException", "{", "if", "(", "action", ".", "equals", "(", "ComponentCollection", ".", "ACTION_POST", ")", ")", "{", "this", ".", "now", "=", "now", ";", "this", ".", "status", "=", "status", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"not allowed with action '\"", "+", "action", "+", "\"'\"", ")", ";", "}", "}" ]
Sets the post. @param now the now @param status the status @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "post", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java#L147-L155
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java
MtasSolrCollectionResult.setImport
public void setImport(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_IMPORT)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
java
public void setImport(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_IMPORT)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
[ "public", "void", "setImport", "(", "long", "now", ",", "SimpleOrderedMap", "<", "Object", ">", "status", ")", "throws", "IOException", "{", "if", "(", "action", ".", "equals", "(", "ComponentCollection", ".", "ACTION_IMPORT", ")", ")", "{", "this", ".", "now", "=", "now", ";", "this", ".", "status", "=", "status", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"not allowed with action '\"", "+", "action", "+", "\"'\"", ")", ";", "}", "}" ]
Sets the import. @param now the now @param status the status @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "import", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java#L164-L172
train
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java
MtasSolrCollectionResult.setCreate
public void setCreate(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_CREATE)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
java
public void setCreate(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_CREATE)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
[ "public", "void", "setCreate", "(", "long", "now", ",", "SimpleOrderedMap", "<", "Object", ">", "status", ")", "throws", "IOException", "{", "if", "(", "action", ".", "equals", "(", "ComponentCollection", ".", "ACTION_CREATE", ")", ")", "{", "this", ".", "now", "=", "now", ";", "this", ".", "status", "=", "status", ";", "}", "else", "{", "throw", "new", "IOException", "(", "\"not allowed with action '\"", "+", "action", "+", "\"'\"", ")", ";", "}", "}" ]
Sets the create. @param now the now @param status the status @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "create", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java#L181-L189
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservicegroup_binding.java
sslservicegroup_binding.get
public static sslservicegroup_binding get(nitro_service service, String servicegroupname) throws Exception{ sslservicegroup_binding obj = new sslservicegroup_binding(); obj.set_servicegroupname(servicegroupname); sslservicegroup_binding response = (sslservicegroup_binding) obj.get_resource(service); return response; }
java
public static sslservicegroup_binding get(nitro_service service, String servicegroupname) throws Exception{ sslservicegroup_binding obj = new sslservicegroup_binding(); obj.set_servicegroupname(servicegroupname); sslservicegroup_binding response = (sslservicegroup_binding) obj.get_resource(service); return response; }
[ "public", "static", "sslservicegroup_binding", "get", "(", "nitro_service", "service", ",", "String", "servicegroupname", ")", "throws", "Exception", "{", "sslservicegroup_binding", "obj", "=", "new", "sslservicegroup_binding", "(", ")", ";", "obj", ".", "set_servicegroupname", "(", "servicegroupname", ")", ";", "sslservicegroup_binding", "response", "=", "(", "sslservicegroup_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch sslservicegroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "sslservicegroup_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservicegroup_binding.java#L125-L130
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservicegroup_binding.java
sslservicegroup_binding.get
public static sslservicegroup_binding[] get(nitro_service service, String servicegroupname[]) throws Exception{ if (servicegroupname !=null && servicegroupname.length>0) { sslservicegroup_binding response[] = new sslservicegroup_binding[servicegroupname.length]; sslservicegroup_binding obj[] = new sslservicegroup_binding[servicegroupname.length]; for (int i=0;i<servicegroupname.length;i++) { obj[i] = new sslservicegroup_binding(); obj[i].set_servicegroupname(servicegroupname[i]); response[i] = (sslservicegroup_binding) obj[i].get_resource(service); } return response; } return null; }
java
public static sslservicegroup_binding[] get(nitro_service service, String servicegroupname[]) throws Exception{ if (servicegroupname !=null && servicegroupname.length>0) { sslservicegroup_binding response[] = new sslservicegroup_binding[servicegroupname.length]; sslservicegroup_binding obj[] = new sslservicegroup_binding[servicegroupname.length]; for (int i=0;i<servicegroupname.length;i++) { obj[i] = new sslservicegroup_binding(); obj[i].set_servicegroupname(servicegroupname[i]); response[i] = (sslservicegroup_binding) obj[i].get_resource(service); } return response; } return null; }
[ "public", "static", "sslservicegroup_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "servicegroupname", "[", "]", ")", "throws", "Exception", "{", "if", "(", "servicegroupname", "!=", "null", "&&", "servicegroupname", ".", "length", ">", "0", ")", "{", "sslservicegroup_binding", "response", "[", "]", "=", "new", "sslservicegroup_binding", "[", "servicegroupname", ".", "length", "]", ";", "sslservicegroup_binding", "obj", "[", "]", "=", "new", "sslservicegroup_binding", "[", "servicegroupname", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "servicegroupname", ".", "length", ";", "i", "++", ")", "{", "obj", "[", "i", "]", "=", "new", "sslservicegroup_binding", "(", ")", ";", "obj", "[", "i", "]", ".", "set_servicegroupname", "(", "servicegroupname", "[", "i", "]", ")", ";", "response", "[", "i", "]", "=", "(", "sslservicegroup_binding", ")", "obj", "[", "i", "]", ".", "get_resource", "(", "service", ")", ";", "}", "return", "response", ";", "}", "return", "null", ";", "}" ]
Use this API to fetch sslservicegroup_binding resources of given names .
[ "Use", "this", "API", "to", "fetch", "sslservicegroup_binding", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslservicegroup_binding.java#L135-L147
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_intranetip_binding.java
aaagroup_intranetip_binding.get
public static aaagroup_intranetip_binding[] get(nitro_service service, String groupname) throws Exception{ aaagroup_intranetip_binding obj = new aaagroup_intranetip_binding(); obj.set_groupname(groupname); aaagroup_intranetip_binding response[] = (aaagroup_intranetip_binding[]) obj.get_resources(service); return response; }
java
public static aaagroup_intranetip_binding[] get(nitro_service service, String groupname) throws Exception{ aaagroup_intranetip_binding obj = new aaagroup_intranetip_binding(); obj.set_groupname(groupname); aaagroup_intranetip_binding response[] = (aaagroup_intranetip_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "aaagroup_intranetip_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "groupname", ")", "throws", "Exception", "{", "aaagroup_intranetip_binding", "obj", "=", "new", "aaagroup_intranetip_binding", "(", ")", ";", "obj", ".", "set_groupname", "(", "groupname", ")", ";", "aaagroup_intranetip_binding", "response", "[", "]", "=", "(", "aaagroup_intranetip_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch aaagroup_intranetip_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "aaagroup_intranetip_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaagroup_intranetip_binding.java#L177-L182
train
meertensinstituut/mtas
src/main/java/mtas/solr/update/processor/MtasUpdateRequestProcessorResultWriter.java
MtasUpdateRequestProcessorResultWriter.addItem
public void addItem(String term, Integer offsetStart, Integer offsetEnd, Integer posIncr, BytesRef payload, Integer flags) { if (!closed) { tokenNumber++; MtasUpdateRequestProcessorResultItem item = new MtasUpdateRequestProcessorResultItem( term, offsetStart, offsetEnd, posIncr, payload, flags); try { objectOutputStream.writeObject(item); objectOutputStream.reset(); objectOutputStream.flush(); } catch (IOException e) { forceCloseAndDelete(); log.debug(e); } } }
java
public void addItem(String term, Integer offsetStart, Integer offsetEnd, Integer posIncr, BytesRef payload, Integer flags) { if (!closed) { tokenNumber++; MtasUpdateRequestProcessorResultItem item = new MtasUpdateRequestProcessorResultItem( term, offsetStart, offsetEnd, posIncr, payload, flags); try { objectOutputStream.writeObject(item); objectOutputStream.reset(); objectOutputStream.flush(); } catch (IOException e) { forceCloseAndDelete(); log.debug(e); } } }
[ "public", "void", "addItem", "(", "String", "term", ",", "Integer", "offsetStart", ",", "Integer", "offsetEnd", ",", "Integer", "posIncr", ",", "BytesRef", "payload", ",", "Integer", "flags", ")", "{", "if", "(", "!", "closed", ")", "{", "tokenNumber", "++", ";", "MtasUpdateRequestProcessorResultItem", "item", "=", "new", "MtasUpdateRequestProcessorResultItem", "(", "term", ",", "offsetStart", ",", "offsetEnd", ",", "posIncr", ",", "payload", ",", "flags", ")", ";", "try", "{", "objectOutputStream", ".", "writeObject", "(", "item", ")", ";", "objectOutputStream", ".", "reset", "(", ")", ";", "objectOutputStream", ".", "flush", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "forceCloseAndDelete", "(", ")", ";", "log", ".", "debug", "(", "e", ")", ";", "}", "}", "}" ]
Adds the item. @param term the term @param offsetStart the offset start @param offsetEnd the offset end @param posIncr the pos incr @param payload the payload @param flags the flags
[ "Adds", "the", "item", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/update/processor/MtasUpdateRequestProcessorResultWriter.java#L69-L84
train
meertensinstituut/mtas
src/main/java/mtas/solr/update/processor/MtasUpdateRequestProcessorResultWriter.java
MtasUpdateRequestProcessorResultWriter.forceCloseAndDelete
public void forceCloseAndDelete() { try { if (objectOutputStream != null) { objectOutputStream.close(); objectOutputStream = null; } if (fileOutputStream != null) { fileOutputStream.close(); fileOutputStream = null; } } catch (IOException e) { log.debug(e); } closed = true; tokenNumber = 0; if (file != null) { if (file.exists() && file.canWrite() && !file.delete()) { log.debug("couldn't delete " + file.getName()); } file = null; } }
java
public void forceCloseAndDelete() { try { if (objectOutputStream != null) { objectOutputStream.close(); objectOutputStream = null; } if (fileOutputStream != null) { fileOutputStream.close(); fileOutputStream = null; } } catch (IOException e) { log.debug(e); } closed = true; tokenNumber = 0; if (file != null) { if (file.exists() && file.canWrite() && !file.delete()) { log.debug("couldn't delete " + file.getName()); } file = null; } }
[ "public", "void", "forceCloseAndDelete", "(", ")", "{", "try", "{", "if", "(", "objectOutputStream", "!=", "null", ")", "{", "objectOutputStream", ".", "close", "(", ")", ";", "objectOutputStream", "=", "null", ";", "}", "if", "(", "fileOutputStream", "!=", "null", ")", "{", "fileOutputStream", ".", "close", "(", ")", ";", "fileOutputStream", "=", "null", ";", "}", "}", "catch", "(", "IOException", "e", ")", "{", "log", ".", "debug", "(", "e", ")", ";", "}", "closed", "=", "true", ";", "tokenNumber", "=", "0", ";", "if", "(", "file", "!=", "null", ")", "{", "if", "(", "file", ".", "exists", "(", ")", "&&", "file", ".", "canWrite", "(", ")", "&&", "!", "file", ".", "delete", "(", ")", ")", "{", "log", ".", "debug", "(", "\"couldn't delete \"", "+", "file", ".", "getName", "(", ")", ")", ";", "}", "file", "=", "null", ";", "}", "}" ]
Force close and delete.
[ "Force", "close", "and", "delete", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/update/processor/MtasUpdateRequestProcessorResultWriter.java#L126-L147
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup_streamidentifier_binding.java
clusternodegroup_streamidentifier_binding.get
public static clusternodegroup_streamidentifier_binding[] get(nitro_service service, String name) throws Exception{ clusternodegroup_streamidentifier_binding obj = new clusternodegroup_streamidentifier_binding(); obj.set_name(name); clusternodegroup_streamidentifier_binding response[] = (clusternodegroup_streamidentifier_binding[]) obj.get_resources(service); return response; }
java
public static clusternodegroup_streamidentifier_binding[] get(nitro_service service, String name) throws Exception{ clusternodegroup_streamidentifier_binding obj = new clusternodegroup_streamidentifier_binding(); obj.set_name(name); clusternodegroup_streamidentifier_binding response[] = (clusternodegroup_streamidentifier_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "clusternodegroup_streamidentifier_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "clusternodegroup_streamidentifier_binding", "obj", "=", "new", "clusternodegroup_streamidentifier_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "clusternodegroup_streamidentifier_binding", "response", "[", "]", "=", "(", "clusternodegroup_streamidentifier_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch clusternodegroup_streamidentifier_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "clusternodegroup_streamidentifier_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusternodegroup_streamidentifier_binding.java#L154-L159
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/qos/qos_stats.java
qos_stats.get
public static qos_stats get(nitro_service service) throws Exception{ qos_stats obj = new qos_stats(); qos_stats[] response = (qos_stats[])obj.stat_resources(service); return response[0]; }
java
public static qos_stats get(nitro_service service) throws Exception{ qos_stats obj = new qos_stats(); qos_stats[] response = (qos_stats[])obj.stat_resources(service); return response[0]; }
[ "public", "static", "qos_stats", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "qos_stats", "obj", "=", "new", "qos_stats", "(", ")", ";", "qos_stats", "[", "]", "response", "=", "(", "qos_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ")", ";", "return", "response", "[", "0", "]", ";", "}" ]
Use this API to fetch the statistics of all qos_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "qos_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/qos/qos_stats.java#L901-L905
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowpolicy_csvserver_binding.java
appflowpolicy_csvserver_binding.get
public static appflowpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{ appflowpolicy_csvserver_binding obj = new appflowpolicy_csvserver_binding(); obj.set_name(name); appflowpolicy_csvserver_binding response[] = (appflowpolicy_csvserver_binding[]) obj.get_resources(service); return response; }
java
public static appflowpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{ appflowpolicy_csvserver_binding obj = new appflowpolicy_csvserver_binding(); obj.set_name(name); appflowpolicy_csvserver_binding response[] = (appflowpolicy_csvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "appflowpolicy_csvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appflowpolicy_csvserver_binding", "obj", "=", "new", "appflowpolicy_csvserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "appflowpolicy_csvserver_binding", "response", "[", "]", "=", "(", "appflowpolicy_csvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch appflowpolicy_csvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "appflowpolicy_csvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowpolicy_csvserver_binding.java#L162-L167
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_sharefileserver_binding.java
vpnvserver_sharefileserver_binding.get
public static vpnvserver_sharefileserver_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_sharefileserver_binding obj = new vpnvserver_sharefileserver_binding(); obj.set_name(name); vpnvserver_sharefileserver_binding response[] = (vpnvserver_sharefileserver_binding[]) obj.get_resources(service); return response; }
java
public static vpnvserver_sharefileserver_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_sharefileserver_binding obj = new vpnvserver_sharefileserver_binding(); obj.set_name(name); vpnvserver_sharefileserver_binding response[] = (vpnvserver_sharefileserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "vpnvserver_sharefileserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpnvserver_sharefileserver_binding", "obj", "=", "new", "vpnvserver_sharefileserver_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "vpnvserver_sharefileserver_binding", "response", "[", "]", "=", "(", "vpnvserver_sharefileserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch vpnvserver_sharefileserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "vpnvserver_sharefileserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_sharefileserver_binding.java#L164-L169
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/Morpha.java
Morpha.capitalise
private static String capitalise(String s) { if(s.length()==0){return s;} StringBuilder s1=new StringBuilder(s); if (Character.isLowerCase(s1.charAt(0))){ s1.setCharAt(0,Character.toUpperCase(s1.charAt(0))); } for(int j=1;j<s1.length();j++){ if(Character.isUpperCase(s1.charAt(j))){ s1.setCharAt(j,Character.toLowerCase(s1.charAt(j))); } } return s1.toString(); }
java
private static String capitalise(String s) { if(s.length()==0){return s;} StringBuilder s1=new StringBuilder(s); if (Character.isLowerCase(s1.charAt(0))){ s1.setCharAt(0,Character.toUpperCase(s1.charAt(0))); } for(int j=1;j<s1.length();j++){ if(Character.isUpperCase(s1.charAt(j))){ s1.setCharAt(j,Character.toLowerCase(s1.charAt(j))); } } return s1.toString(); }
[ "private", "static", "String", "capitalise", "(", "String", "s", ")", "{", "if", "(", "s", ".", "length", "(", ")", "==", "0", ")", "{", "return", "s", ";", "}", "StringBuilder", "s1", "=", "new", "StringBuilder", "(", "s", ")", ";", "if", "(", "Character", ".", "isLowerCase", "(", "s1", ".", "charAt", "(", "0", ")", ")", ")", "{", "s1", ".", "setCharAt", "(", "0", ",", "Character", ".", "toUpperCase", "(", "s1", ".", "charAt", "(", "0", ")", ")", ")", ";", "}", "for", "(", "int", "j", "=", "1", ";", "j", "<", "s1", ".", "length", "(", ")", ";", "j", "++", ")", "{", "if", "(", "Character", ".", "isUpperCase", "(", "s1", ".", "charAt", "(", "j", ")", ")", ")", "{", "s1", ".", "setCharAt", "(", "j", ",", "Character", ".", "toLowerCase", "(", "s1", ".", "charAt", "(", "j", ")", ")", ")", ";", "}", "}", "return", "s1", ".", "toString", "(", ")", ";", "}" ]
Capitalizes the first letter and lower-cases every consecutive letter.
[ "Capitalizes", "the", "first", "letter", "and", "lower", "-", "cases", "every", "consecutive", "letter", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/Morpha.java#L56186-L56199
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/Morpha.java
Morpha.loadVerbStemSet
private Set<String> loadVerbStemSet(String[] verbStems) { HashSet<String> set = new HashSet<String>(verbStems.length); for (String stem : verbStems) { set.add(stem); } return set; }
java
private Set<String> loadVerbStemSet(String[] verbStems) { HashSet<String> set = new HashSet<String>(verbStems.length); for (String stem : verbStems) { set.add(stem); } return set; }
[ "private", "Set", "<", "String", ">", "loadVerbStemSet", "(", "String", "[", "]", "verbStems", ")", "{", "HashSet", "<", "String", ">", "set", "=", "new", "HashSet", "<", "String", ">", "(", "verbStems", ".", "length", ")", ";", "for", "(", "String", "stem", ":", "verbStems", ")", "{", "set", ".", "add", "(", "stem", ")", ";", "}", "return", "set", ";", "}" ]
Loads a list of words from the array and stores them in a HashSet.
[ "Loads", "a", "list", "of", "words", "from", "the", "array", "and", "stores", "them", "in", "a", "HashSet", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/Morpha.java#L56205-L56211
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/Morpha.java
Morpha.stem
private String stem(int del, String add, String affix) { int stem_length = yylength() - del; int i = 0; String result=yytext().substring(0,stem_length); if (option(change_case)) { result=result.toLowerCase(); } if (!(add.length()==0)) result+=add; if(option(print_affixes)) { result+=("+"+affix); } return result; }
java
private String stem(int del, String add, String affix) { int stem_length = yylength() - del; int i = 0; String result=yytext().substring(0,stem_length); if (option(change_case)) { result=result.toLowerCase(); } if (!(add.length()==0)) result+=add; if(option(print_affixes)) { result+=("+"+affix); } return result; }
[ "private", "String", "stem", "(", "int", "del", ",", "String", "add", ",", "String", "affix", ")", "{", "int", "stem_length", "=", "yylength", "(", ")", "-", "del", ";", "int", "i", "=", "0", ";", "String", "result", "=", "yytext", "(", ")", ".", "substring", "(", "0", ",", "stem_length", ")", ";", "if", "(", "option", "(", "change_case", ")", ")", "{", "result", "=", "result", ".", "toLowerCase", "(", ")", ";", "}", "if", "(", "!", "(", "add", ".", "length", "(", ")", "==", "0", ")", ")", "result", "+=", "add", ";", "if", "(", "option", "(", "print_affixes", ")", ")", "{", "result", "+=", "(", "\"+\"", "+", "affix", ")", ";", "}", "return", "result", ";", "}" ]
Delete del letters from end of token, and append string add to give stem. Return affix as the affix of the word.
[ "Delete", "del", "letters", "from", "end", "of", "token", "and", "append", "string", "add", "to", "give", "stem", ".", "Return", "affix", "as", "the", "affix", "of", "the", "word", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/Morpha.java#L56256-L56268
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/Constituent.java
Constituent.crosses
public boolean crosses(Constituent c) { return (start() < c.start() && c.start() < end() && end() < c.end()) || (c.start() < start() && start() < c.end() && c.end() < end()); }
java
public boolean crosses(Constituent c) { return (start() < c.start() && c.start() < end() && end() < c.end()) || (c.start() < start() && start() < c.end() && c.end() < end()); }
[ "public", "boolean", "crosses", "(", "Constituent", "c", ")", "{", "return", "(", "start", "(", ")", "<", "c", ".", "start", "(", ")", "&&", "c", ".", "start", "(", ")", "<", "end", "(", ")", "&&", "end", "(", ")", "<", "c", ".", "end", "(", ")", ")", "||", "(", "c", ".", "start", "(", ")", "<", "start", "(", ")", "&&", "start", "(", ")", "<", "c", ".", "end", "(", ")", "&&", "c", ".", "end", "(", ")", "<", "end", "(", ")", ")", ";", "}" ]
Detects whether this constituent overlaps a constituent without nesting, that is, whether they "cross". @param c The constituent to check against @return True if the two constituents cross
[ "Detects", "whether", "this", "constituent", "overlaps", "a", "constituent", "without", "nesting", "that", "is", "whether", "they", "cross", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/Constituent.java#L193-L195
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/Constituent.java
Constituent.crosses
public boolean crosses(Collection<Constituent> constColl) { for (Constituent c : constColl) { if (crosses(c)) { return true; } } return false; }
java
public boolean crosses(Collection<Constituent> constColl) { for (Constituent c : constColl) { if (crosses(c)) { return true; } } return false; }
[ "public", "boolean", "crosses", "(", "Collection", "<", "Constituent", ">", "constColl", ")", "{", "for", "(", "Constituent", "c", ":", "constColl", ")", "{", "if", "(", "crosses", "(", "c", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
Detects whether this constituent overlaps any of a Collection of Constituents without nesting, that is, whether it "crosses" any of them. @param constColl The set of constituent to check against @return True if some constituent in the collection is crossed @throws ClassCastException If some member of the Collection isn't a Constituent
[ "Detects", "whether", "this", "constituent", "overlaps", "any", "of", "a", "Collection", "of", "Constituents", "without", "nesting", "that", "is", "whether", "it", "crosses", "any", "of", "them", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/Constituent.java#L208-L215
train
meertensinstituut/mtas
src/main/java/mtas/parser/cql/util/MtasCQLParserWordCondition.java
MtasCQLParserWordCondition.getPositiveQuery
public MtasSpanQuery getPositiveQuery(int index) { if ((index >= 0) && (index < positiveQueryList.size())) { return positiveQueryList.get(index); } else { return null; } }
java
public MtasSpanQuery getPositiveQuery(int index) { if ((index >= 0) && (index < positiveQueryList.size())) { return positiveQueryList.get(index); } else { return null; } }
[ "public", "MtasSpanQuery", "getPositiveQuery", "(", "int", "index", ")", "{", "if", "(", "(", "index", ">=", "0", ")", "&&", "(", "index", "<", "positiveQueryList", ".", "size", "(", ")", ")", ")", "{", "return", "positiveQueryList", ".", "get", "(", "index", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}" ]
Gets the positive query. @param index the index @return the positive query
[ "Gets", "the", "positive", "query", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/parser/cql/util/MtasCQLParserWordCondition.java#L127-L133
train
meertensinstituut/mtas
src/main/java/mtas/parser/cql/util/MtasCQLParserWordCondition.java
MtasCQLParserWordCondition.getNegativeQuery
public MtasSpanQuery getNegativeQuery(int index) { if ((index >= 0) && (index < negativeQueryList.size())) { return negativeQueryList.get(index); } else { return null; } }
java
public MtasSpanQuery getNegativeQuery(int index) { if ((index >= 0) && (index < negativeQueryList.size())) { return negativeQueryList.get(index); } else { return null; } }
[ "public", "MtasSpanQuery", "getNegativeQuery", "(", "int", "index", ")", "{", "if", "(", "(", "index", ">=", "0", ")", "&&", "(", "index", "<", "negativeQueryList", ".", "size", "(", ")", ")", ")", "{", "return", "negativeQueryList", ".", "get", "(", "index", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}" ]
Gets the negative query. @param index the index @return the negative query
[ "Gets", "the", "negative", "query", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/parser/cql/util/MtasCQLParserWordCondition.java#L150-L156
train
meertensinstituut/mtas
src/main/java/mtas/parser/cql/util/MtasCQLParserWordCondition.java
MtasCQLParserWordCondition.isSingle
public boolean isSingle() { // assume simplified if ((positiveQueryList.size() == 1) && (negativeQueryList.size() == 0)) { return true; } else if ((positiveQueryList.size() == 0) && (negativeQueryList.size() == 1)) { return true; } return false; }
java
public boolean isSingle() { // assume simplified if ((positiveQueryList.size() == 1) && (negativeQueryList.size() == 0)) { return true; } else if ((positiveQueryList.size() == 0) && (negativeQueryList.size() == 1)) { return true; } return false; }
[ "public", "boolean", "isSingle", "(", ")", "{", "// assume simplified", "if", "(", "(", "positiveQueryList", ".", "size", "(", ")", "==", "1", ")", "&&", "(", "negativeQueryList", ".", "size", "(", ")", "==", "0", ")", ")", "{", "return", "true", ";", "}", "else", "if", "(", "(", "positiveQueryList", ".", "size", "(", ")", "==", "0", ")", "&&", "(", "negativeQueryList", ".", "size", "(", ")", "==", "1", ")", ")", "{", "return", "true", ";", "}", "return", "false", ";", "}" ]
Checks if is single. @return true, if is single
[ "Checks", "if", "is", "single", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/parser/cql/util/MtasCQLParserWordCondition.java#L173-L182
train
meertensinstituut/mtas
src/main/java/mtas/parser/cql/util/MtasCQLParserWordCondition.java
MtasCQLParserWordCondition.swapType
public void swapType() { if (type.equals(TYPE_AND)) { type = TYPE_OR; } else if (type.equals(TYPE_OR)) { type = TYPE_AND; } else { throw new Error("unknown type"); } swapNot(); List<MtasSpanQuery> queryList = positiveQueryList; positiveQueryList = negativeQueryList; negativeQueryList = queryList; for (MtasCQLParserWordCondition c : conditionList) { c.swapNot(); } simplified = false; }
java
public void swapType() { if (type.equals(TYPE_AND)) { type = TYPE_OR; } else if (type.equals(TYPE_OR)) { type = TYPE_AND; } else { throw new Error("unknown type"); } swapNot(); List<MtasSpanQuery> queryList = positiveQueryList; positiveQueryList = negativeQueryList; negativeQueryList = queryList; for (MtasCQLParserWordCondition c : conditionList) { c.swapNot(); } simplified = false; }
[ "public", "void", "swapType", "(", ")", "{", "if", "(", "type", ".", "equals", "(", "TYPE_AND", ")", ")", "{", "type", "=", "TYPE_OR", ";", "}", "else", "if", "(", "type", ".", "equals", "(", "TYPE_OR", ")", ")", "{", "type", "=", "TYPE_AND", ";", "}", "else", "{", "throw", "new", "Error", "(", "\"unknown type\"", ")", ";", "}", "swapNot", "(", ")", ";", "List", "<", "MtasSpanQuery", ">", "queryList", "=", "positiveQueryList", ";", "positiveQueryList", "=", "negativeQueryList", ";", "negativeQueryList", "=", "queryList", ";", "for", "(", "MtasCQLParserWordCondition", "c", ":", "conditionList", ")", "{", "c", ".", "swapNot", "(", ")", ";", "}", "simplified", "=", "false", ";", "}" ]
Swap type.
[ "Swap", "type", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/parser/cql/util/MtasCQLParserWordCondition.java#L226-L242
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.add
public static base_response add(nitro_service client, nsacl resource) throws Exception { nsacl addresource = new nsacl(); addresource.aclname = resource.aclname; addresource.aclaction = resource.aclaction; addresource.td = resource.td; addresource.srcip = resource.srcip; addresource.srcipop = resource.srcipop; addresource.srcipval = resource.srcipval; addresource.srcport = resource.srcport; addresource.srcportop = resource.srcportop; addresource.srcportval = resource.srcportval; addresource.destip = resource.destip; addresource.destipop = resource.destipop; addresource.destipval = resource.destipval; addresource.destport = resource.destport; addresource.destportop = resource.destportop; addresource.destportval = resource.destportval; addresource.ttl = resource.ttl; addresource.srcmac = resource.srcmac; addresource.protocol = resource.protocol; addresource.protocolnumber = resource.protocolnumber; addresource.vlan = resource.vlan; addresource.Interface = resource.Interface; addresource.established = resource.established; addresource.icmptype = resource.icmptype; addresource.icmpcode = resource.icmpcode; addresource.priority = resource.priority; addresource.state = resource.state; addresource.logstate = resource.logstate; addresource.ratelimit = resource.ratelimit; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, nsacl resource) throws Exception { nsacl addresource = new nsacl(); addresource.aclname = resource.aclname; addresource.aclaction = resource.aclaction; addresource.td = resource.td; addresource.srcip = resource.srcip; addresource.srcipop = resource.srcipop; addresource.srcipval = resource.srcipval; addresource.srcport = resource.srcport; addresource.srcportop = resource.srcportop; addresource.srcportval = resource.srcportval; addresource.destip = resource.destip; addresource.destipop = resource.destipop; addresource.destipval = resource.destipval; addresource.destport = resource.destport; addresource.destportop = resource.destportop; addresource.destportval = resource.destportval; addresource.ttl = resource.ttl; addresource.srcmac = resource.srcmac; addresource.protocol = resource.protocol; addresource.protocolnumber = resource.protocolnumber; addresource.vlan = resource.vlan; addresource.Interface = resource.Interface; addresource.established = resource.established; addresource.icmptype = resource.icmptype; addresource.icmpcode = resource.icmpcode; addresource.priority = resource.priority; addresource.state = resource.state; addresource.logstate = resource.logstate; addresource.ratelimit = resource.ratelimit; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "nsacl", "resource", ")", "throws", "Exception", "{", "nsacl", "addresource", "=", "new", "nsacl", "(", ")", ";", "addresource", ".", "aclname", "=", "resource", ".", "aclname", ";", "addresource", ".", "aclaction", "=", "resource", ".", "aclaction", ";", "addresource", ".", "td", "=", "resource", ".", "td", ";", "addresource", ".", "srcip", "=", "resource", ".", "srcip", ";", "addresource", ".", "srcipop", "=", "resource", ".", "srcipop", ";", "addresource", ".", "srcipval", "=", "resource", ".", "srcipval", ";", "addresource", ".", "srcport", "=", "resource", ".", "srcport", ";", "addresource", ".", "srcportop", "=", "resource", ".", "srcportop", ";", "addresource", ".", "srcportval", "=", "resource", ".", "srcportval", ";", "addresource", ".", "destip", "=", "resource", ".", "destip", ";", "addresource", ".", "destipop", "=", "resource", ".", "destipop", ";", "addresource", ".", "destipval", "=", "resource", ".", "destipval", ";", "addresource", ".", "destport", "=", "resource", ".", "destport", ";", "addresource", ".", "destportop", "=", "resource", ".", "destportop", ";", "addresource", ".", "destportval", "=", "resource", ".", "destportval", ";", "addresource", ".", "ttl", "=", "resource", ".", "ttl", ";", "addresource", ".", "srcmac", "=", "resource", ".", "srcmac", ";", "addresource", ".", "protocol", "=", "resource", ".", "protocol", ";", "addresource", ".", "protocolnumber", "=", "resource", ".", "protocolnumber", ";", "addresource", ".", "vlan", "=", "resource", ".", "vlan", ";", "addresource", ".", "Interface", "=", "resource", ".", "Interface", ";", "addresource", ".", "established", "=", "resource", ".", "established", ";", "addresource", ".", "icmptype", "=", "resource", ".", "icmptype", ";", "addresource", ".", "icmpcode", "=", "resource", ".", "icmpcode", ";", "addresource", ".", "priority", "=", "resource", ".", "priority", ";", "addresource", ".", "state", "=", "resource", ".", "state", ";", "addresource", ".", "logstate", "=", "resource", ".", "logstate", ";", "addresource", ".", "ratelimit", "=", "resource", ".", "ratelimit", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add nsacl.
[ "Use", "this", "API", "to", "add", "nsacl", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L795-L826
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.add
public static base_responses add(nitro_service client, nsacl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl addresources[] = new nsacl[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nsacl(); addresources[i].aclname = resources[i].aclname; addresources[i].aclaction = resources[i].aclaction; addresources[i].td = resources[i].td; addresources[i].srcip = resources[i].srcip; addresources[i].srcipop = resources[i].srcipop; addresources[i].srcipval = resources[i].srcipval; addresources[i].srcport = resources[i].srcport; addresources[i].srcportop = resources[i].srcportop; addresources[i].srcportval = resources[i].srcportval; addresources[i].destip = resources[i].destip; addresources[i].destipop = resources[i].destipop; addresources[i].destipval = resources[i].destipval; addresources[i].destport = resources[i].destport; addresources[i].destportop = resources[i].destportop; addresources[i].destportval = resources[i].destportval; addresources[i].ttl = resources[i].ttl; addresources[i].srcmac = resources[i].srcmac; addresources[i].protocol = resources[i].protocol; addresources[i].protocolnumber = resources[i].protocolnumber; addresources[i].vlan = resources[i].vlan; addresources[i].Interface = resources[i].Interface; addresources[i].established = resources[i].established; addresources[i].icmptype = resources[i].icmptype; addresources[i].icmpcode = resources[i].icmpcode; addresources[i].priority = resources[i].priority; addresources[i].state = resources[i].state; addresources[i].logstate = resources[i].logstate; addresources[i].ratelimit = resources[i].ratelimit; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, nsacl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl addresources[] = new nsacl[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nsacl(); addresources[i].aclname = resources[i].aclname; addresources[i].aclaction = resources[i].aclaction; addresources[i].td = resources[i].td; addresources[i].srcip = resources[i].srcip; addresources[i].srcipop = resources[i].srcipop; addresources[i].srcipval = resources[i].srcipval; addresources[i].srcport = resources[i].srcport; addresources[i].srcportop = resources[i].srcportop; addresources[i].srcportval = resources[i].srcportval; addresources[i].destip = resources[i].destip; addresources[i].destipop = resources[i].destipop; addresources[i].destipval = resources[i].destipval; addresources[i].destport = resources[i].destport; addresources[i].destportop = resources[i].destportop; addresources[i].destportval = resources[i].destportval; addresources[i].ttl = resources[i].ttl; addresources[i].srcmac = resources[i].srcmac; addresources[i].protocol = resources[i].protocol; addresources[i].protocolnumber = resources[i].protocolnumber; addresources[i].vlan = resources[i].vlan; addresources[i].Interface = resources[i].Interface; addresources[i].established = resources[i].established; addresources[i].icmptype = resources[i].icmptype; addresources[i].icmpcode = resources[i].icmpcode; addresources[i].priority = resources[i].priority; addresources[i].state = resources[i].state; addresources[i].logstate = resources[i].logstate; addresources[i].ratelimit = resources[i].ratelimit; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "nsacl", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsacl", "addresources", "[", "]", "=", "new", "nsacl", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "nsacl", "(", ")", ";", "addresources", "[", "i", "]", ".", "aclname", "=", "resources", "[", "i", "]", ".", "aclname", ";", "addresources", "[", "i", "]", ".", "aclaction", "=", "resources", "[", "i", "]", ".", "aclaction", ";", "addresources", "[", "i", "]", ".", "td", "=", "resources", "[", "i", "]", ".", "td", ";", "addresources", "[", "i", "]", ".", "srcip", "=", "resources", "[", "i", "]", ".", "srcip", ";", "addresources", "[", "i", "]", ".", "srcipop", "=", "resources", "[", "i", "]", ".", "srcipop", ";", "addresources", "[", "i", "]", ".", "srcipval", "=", "resources", "[", "i", "]", ".", "srcipval", ";", "addresources", "[", "i", "]", ".", "srcport", "=", "resources", "[", "i", "]", ".", "srcport", ";", "addresources", "[", "i", "]", ".", "srcportop", "=", "resources", "[", "i", "]", ".", "srcportop", ";", "addresources", "[", "i", "]", ".", "srcportval", "=", "resources", "[", "i", "]", ".", "srcportval", ";", "addresources", "[", "i", "]", ".", "destip", "=", "resources", "[", "i", "]", ".", "destip", ";", "addresources", "[", "i", "]", ".", "destipop", "=", "resources", "[", "i", "]", ".", "destipop", ";", "addresources", "[", "i", "]", ".", "destipval", "=", "resources", "[", "i", "]", ".", "destipval", ";", "addresources", "[", "i", "]", ".", "destport", "=", "resources", "[", "i", "]", ".", "destport", ";", "addresources", "[", "i", "]", ".", "destportop", "=", "resources", "[", "i", "]", ".", "destportop", ";", "addresources", "[", "i", "]", ".", "destportval", "=", "resources", "[", "i", "]", ".", "destportval", ";", "addresources", "[", "i", "]", ".", "ttl", "=", "resources", "[", "i", "]", ".", "ttl", ";", "addresources", "[", "i", "]", ".", "srcmac", "=", "resources", "[", "i", "]", ".", "srcmac", ";", "addresources", "[", "i", "]", ".", "protocol", "=", "resources", "[", "i", "]", ".", "protocol", ";", "addresources", "[", "i", "]", ".", "protocolnumber", "=", "resources", "[", "i", "]", ".", "protocolnumber", ";", "addresources", "[", "i", "]", ".", "vlan", "=", "resources", "[", "i", "]", ".", "vlan", ";", "addresources", "[", "i", "]", ".", "Interface", "=", "resources", "[", "i", "]", ".", "Interface", ";", "addresources", "[", "i", "]", ".", "established", "=", "resources", "[", "i", "]", ".", "established", ";", "addresources", "[", "i", "]", ".", "icmptype", "=", "resources", "[", "i", "]", ".", "icmptype", ";", "addresources", "[", "i", "]", ".", "icmpcode", "=", "resources", "[", "i", "]", ".", "icmpcode", ";", "addresources", "[", "i", "]", ".", "priority", "=", "resources", "[", "i", "]", ".", "priority", ";", "addresources", "[", "i", "]", ".", "state", "=", "resources", "[", "i", "]", ".", "state", ";", "addresources", "[", "i", "]", ".", "logstate", "=", "resources", "[", "i", "]", ".", "logstate", ";", "addresources", "[", "i", "]", ".", "ratelimit", "=", "resources", "[", "i", "]", ".", "ratelimit", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add nsacl resources.
[ "Use", "this", "API", "to", "add", "nsacl", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L831-L869
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.update
public static base_response update(nitro_service client, nsacl resource) throws Exception { nsacl updateresource = new nsacl(); updateresource.aclname = resource.aclname; updateresource.aclaction = resource.aclaction; updateresource.srcip = resource.srcip; updateresource.srcipop = resource.srcipop; updateresource.srcipval = resource.srcipval; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destip = resource.destip; updateresource.destipop = resource.destipop; updateresource.destipval = resource.destipval; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.icmptype = resource.icmptype; updateresource.icmpcode = resource.icmpcode; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.logstate = resource.logstate; updateresource.ratelimit = resource.ratelimit; updateresource.established = resource.established; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, nsacl resource) throws Exception { nsacl updateresource = new nsacl(); updateresource.aclname = resource.aclname; updateresource.aclaction = resource.aclaction; updateresource.srcip = resource.srcip; updateresource.srcipop = resource.srcipop; updateresource.srcipval = resource.srcipval; updateresource.srcport = resource.srcport; updateresource.srcportop = resource.srcportop; updateresource.srcportval = resource.srcportval; updateresource.destip = resource.destip; updateresource.destipop = resource.destipop; updateresource.destipval = resource.destipval; updateresource.destport = resource.destport; updateresource.destportop = resource.destportop; updateresource.destportval = resource.destportval; updateresource.srcmac = resource.srcmac; updateresource.protocol = resource.protocol; updateresource.protocolnumber = resource.protocolnumber; updateresource.icmptype = resource.icmptype; updateresource.icmpcode = resource.icmpcode; updateresource.vlan = resource.vlan; updateresource.Interface = resource.Interface; updateresource.priority = resource.priority; updateresource.logstate = resource.logstate; updateresource.ratelimit = resource.ratelimit; updateresource.established = resource.established; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "nsacl", "resource", ")", "throws", "Exception", "{", "nsacl", "updateresource", "=", "new", "nsacl", "(", ")", ";", "updateresource", ".", "aclname", "=", "resource", ".", "aclname", ";", "updateresource", ".", "aclaction", "=", "resource", ".", "aclaction", ";", "updateresource", ".", "srcip", "=", "resource", ".", "srcip", ";", "updateresource", ".", "srcipop", "=", "resource", ".", "srcipop", ";", "updateresource", ".", "srcipval", "=", "resource", ".", "srcipval", ";", "updateresource", ".", "srcport", "=", "resource", ".", "srcport", ";", "updateresource", ".", "srcportop", "=", "resource", ".", "srcportop", ";", "updateresource", ".", "srcportval", "=", "resource", ".", "srcportval", ";", "updateresource", ".", "destip", "=", "resource", ".", "destip", ";", "updateresource", ".", "destipop", "=", "resource", ".", "destipop", ";", "updateresource", ".", "destipval", "=", "resource", ".", "destipval", ";", "updateresource", ".", "destport", "=", "resource", ".", "destport", ";", "updateresource", ".", "destportop", "=", "resource", ".", "destportop", ";", "updateresource", ".", "destportval", "=", "resource", ".", "destportval", ";", "updateresource", ".", "srcmac", "=", "resource", ".", "srcmac", ";", "updateresource", ".", "protocol", "=", "resource", ".", "protocol", ";", "updateresource", ".", "protocolnumber", "=", "resource", ".", "protocolnumber", ";", "updateresource", ".", "icmptype", "=", "resource", ".", "icmptype", ";", "updateresource", ".", "icmpcode", "=", "resource", ".", "icmpcode", ";", "updateresource", ".", "vlan", "=", "resource", ".", "vlan", ";", "updateresource", ".", "Interface", "=", "resource", ".", "Interface", ";", "updateresource", ".", "priority", "=", "resource", ".", "priority", ";", "updateresource", ".", "logstate", "=", "resource", ".", "logstate", ";", "updateresource", ".", "ratelimit", "=", "resource", ".", "ratelimit", ";", "updateresource", ".", "established", "=", "resource", ".", "established", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update nsacl.
[ "Use", "this", "API", "to", "update", "nsacl", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L924-L952
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.update
public static base_responses update(nitro_service client, nsacl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl updateresources[] = new nsacl[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nsacl(); updateresources[i].aclname = resources[i].aclname; updateresources[i].aclaction = resources[i].aclaction; updateresources[i].srcip = resources[i].srcip; updateresources[i].srcipop = resources[i].srcipop; updateresources[i].srcipval = resources[i].srcipval; updateresources[i].srcport = resources[i].srcport; updateresources[i].srcportop = resources[i].srcportop; updateresources[i].srcportval = resources[i].srcportval; updateresources[i].destip = resources[i].destip; updateresources[i].destipop = resources[i].destipop; updateresources[i].destipval = resources[i].destipval; updateresources[i].destport = resources[i].destport; updateresources[i].destportop = resources[i].destportop; updateresources[i].destportval = resources[i].destportval; updateresources[i].srcmac = resources[i].srcmac; updateresources[i].protocol = resources[i].protocol; updateresources[i].protocolnumber = resources[i].protocolnumber; updateresources[i].icmptype = resources[i].icmptype; updateresources[i].icmpcode = resources[i].icmpcode; updateresources[i].vlan = resources[i].vlan; updateresources[i].Interface = resources[i].Interface; updateresources[i].priority = resources[i].priority; updateresources[i].logstate = resources[i].logstate; updateresources[i].ratelimit = resources[i].ratelimit; updateresources[i].established = resources[i].established; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, nsacl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl updateresources[] = new nsacl[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nsacl(); updateresources[i].aclname = resources[i].aclname; updateresources[i].aclaction = resources[i].aclaction; updateresources[i].srcip = resources[i].srcip; updateresources[i].srcipop = resources[i].srcipop; updateresources[i].srcipval = resources[i].srcipval; updateresources[i].srcport = resources[i].srcport; updateresources[i].srcportop = resources[i].srcportop; updateresources[i].srcportval = resources[i].srcportval; updateresources[i].destip = resources[i].destip; updateresources[i].destipop = resources[i].destipop; updateresources[i].destipval = resources[i].destipval; updateresources[i].destport = resources[i].destport; updateresources[i].destportop = resources[i].destportop; updateresources[i].destportval = resources[i].destportval; updateresources[i].srcmac = resources[i].srcmac; updateresources[i].protocol = resources[i].protocol; updateresources[i].protocolnumber = resources[i].protocolnumber; updateresources[i].icmptype = resources[i].icmptype; updateresources[i].icmpcode = resources[i].icmpcode; updateresources[i].vlan = resources[i].vlan; updateresources[i].Interface = resources[i].Interface; updateresources[i].priority = resources[i].priority; updateresources[i].logstate = resources[i].logstate; updateresources[i].ratelimit = resources[i].ratelimit; updateresources[i].established = resources[i].established; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "nsacl", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsacl", "updateresources", "[", "]", "=", "new", "nsacl", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "nsacl", "(", ")", ";", "updateresources", "[", "i", "]", ".", "aclname", "=", "resources", "[", "i", "]", ".", "aclname", ";", "updateresources", "[", "i", "]", ".", "aclaction", "=", "resources", "[", "i", "]", ".", "aclaction", ";", "updateresources", "[", "i", "]", ".", "srcip", "=", "resources", "[", "i", "]", ".", "srcip", ";", "updateresources", "[", "i", "]", ".", "srcipop", "=", "resources", "[", "i", "]", ".", "srcipop", ";", "updateresources", "[", "i", "]", ".", "srcipval", "=", "resources", "[", "i", "]", ".", "srcipval", ";", "updateresources", "[", "i", "]", ".", "srcport", "=", "resources", "[", "i", "]", ".", "srcport", ";", "updateresources", "[", "i", "]", ".", "srcportop", "=", "resources", "[", "i", "]", ".", "srcportop", ";", "updateresources", "[", "i", "]", ".", "srcportval", "=", "resources", "[", "i", "]", ".", "srcportval", ";", "updateresources", "[", "i", "]", ".", "destip", "=", "resources", "[", "i", "]", ".", "destip", ";", "updateresources", "[", "i", "]", ".", "destipop", "=", "resources", "[", "i", "]", ".", "destipop", ";", "updateresources", "[", "i", "]", ".", "destipval", "=", "resources", "[", "i", "]", ".", "destipval", ";", "updateresources", "[", "i", "]", ".", "destport", "=", "resources", "[", "i", "]", ".", "destport", ";", "updateresources", "[", "i", "]", ".", "destportop", "=", "resources", "[", "i", "]", ".", "destportop", ";", "updateresources", "[", "i", "]", ".", "destportval", "=", "resources", "[", "i", "]", ".", "destportval", ";", "updateresources", "[", "i", "]", ".", "srcmac", "=", "resources", "[", "i", "]", ".", "srcmac", ";", "updateresources", "[", "i", "]", ".", "protocol", "=", "resources", "[", "i", "]", ".", "protocol", ";", "updateresources", "[", "i", "]", ".", "protocolnumber", "=", "resources", "[", "i", "]", ".", "protocolnumber", ";", "updateresources", "[", "i", "]", ".", "icmptype", "=", "resources", "[", "i", "]", ".", "icmptype", ";", "updateresources", "[", "i", "]", ".", "icmpcode", "=", "resources", "[", "i", "]", ".", "icmpcode", ";", "updateresources", "[", "i", "]", ".", "vlan", "=", "resources", "[", "i", "]", ".", "vlan", ";", "updateresources", "[", "i", "]", ".", "Interface", "=", "resources", "[", "i", "]", ".", "Interface", ";", "updateresources", "[", "i", "]", ".", "priority", "=", "resources", "[", "i", "]", ".", "priority", ";", "updateresources", "[", "i", "]", ".", "logstate", "=", "resources", "[", "i", "]", ".", "logstate", ";", "updateresources", "[", "i", "]", ".", "ratelimit", "=", "resources", "[", "i", "]", ".", "ratelimit", ";", "updateresources", "[", "i", "]", ".", "established", "=", "resources", "[", "i", "]", ".", "established", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update nsacl resources.
[ "Use", "this", "API", "to", "update", "nsacl", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L957-L992
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.unset
public static base_response unset(nitro_service client, nsacl resource, String[] args) throws Exception{ nsacl unsetresource = new nsacl(); unsetresource.aclname = resource.aclname; return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, nsacl resource, String[] args) throws Exception{ nsacl unsetresource = new nsacl(); unsetresource.aclname = resource.aclname; return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "nsacl", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "nsacl", "unsetresource", "=", "new", "nsacl", "(", ")", ";", "unsetresource", ".", "aclname", "=", "resource", ".", "aclname", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of nsacl resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "nsacl", "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/ns/nsacl.java#L998-L1002
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.unset
public static base_responses unset(nitro_service client, String aclname[], String args[]) throws Exception { base_responses result = null; if (aclname != null && aclname.length > 0) { nsacl unsetresources[] = new nsacl[aclname.length]; for (int i=0;i<aclname.length;i++){ unsetresources[i] = new nsacl(); unsetresources[i].aclname = aclname[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
public static base_responses unset(nitro_service client, String aclname[], String args[]) throws Exception { base_responses result = null; if (aclname != null && aclname.length > 0) { nsacl unsetresources[] = new nsacl[aclname.length]; for (int i=0;i<aclname.length;i++){ unsetresources[i] = new nsacl(); unsetresources[i].aclname = aclname[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "public", "static", "base_responses", "unset", "(", "nitro_service", "client", ",", "String", "aclname", "[", "]", ",", "String", "args", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "aclname", "!=", "null", "&&", "aclname", ".", "length", ">", "0", ")", "{", "nsacl", "unsetresources", "[", "]", "=", "new", "nsacl", "[", "aclname", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "aclname", ".", "length", ";", "i", "++", ")", "{", "unsetresources", "[", "i", "]", "=", "new", "nsacl", "(", ")", ";", "unsetresources", "[", "i", "]", ".", "aclname", "=", "aclname", "[", "i", "]", ";", "}", "result", "=", "unset_bulk_request", "(", "client", ",", "unsetresources", ",", "args", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to unset the properties of nsacl resources. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "nsacl", "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/ns/nsacl.java#L1008-L1019
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.enable
public static base_response enable(nitro_service client, String aclname) throws Exception { nsacl enableresource = new nsacl(); enableresource.aclname = aclname; return enableresource.perform_operation(client,"enable"); }
java
public static base_response enable(nitro_service client, String aclname) throws Exception { nsacl enableresource = new nsacl(); enableresource.aclname = aclname; return enableresource.perform_operation(client,"enable"); }
[ "public", "static", "base_response", "enable", "(", "nitro_service", "client", ",", "String", "aclname", ")", "throws", "Exception", "{", "nsacl", "enableresource", "=", "new", "nsacl", "(", ")", ";", "enableresource", ".", "aclname", "=", "aclname", ";", "return", "enableresource", ".", "perform_operation", "(", "client", ",", "\"enable\"", ")", ";", "}" ]
Use this API to enable nsacl of given name.
[ "Use", "this", "API", "to", "enable", "nsacl", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L1041-L1045
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.enable
public static base_responses enable(nitro_service client, nsacl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl enableresources[] = new nsacl[resources.length]; for (int i=0;i<resources.length;i++){ enableresources[i] = new nsacl(); enableresources[i].aclname = resources[i].aclname; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
java
public static base_responses enable(nitro_service client, nsacl resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nsacl enableresources[] = new nsacl[resources.length]; for (int i=0;i<resources.length;i++){ enableresources[i] = new nsacl(); enableresources[i].aclname = resources[i].aclname; } result = perform_operation_bulk_request(client, enableresources,"enable"); } return result; }
[ "public", "static", "base_responses", "enable", "(", "nitro_service", "client", ",", "nsacl", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nsacl", "enableresources", "[", "]", "=", "new", "nsacl", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "enableresources", "[", "i", "]", "=", "new", "nsacl", "(", ")", ";", "enableresources", "[", "i", "]", ".", "aclname", "=", "resources", "[", "i", "]", ".", "aclname", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "enableresources", ",", "\"enable\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to enable nsacl resources.
[ "Use", "this", "API", "to", "enable", "nsacl", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L1075-L1086
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.disable
public static base_response disable(nitro_service client, String aclname) throws Exception { nsacl disableresource = new nsacl(); disableresource.aclname = aclname; return disableresource.perform_operation(client,"disable"); }
java
public static base_response disable(nitro_service client, String aclname) throws Exception { nsacl disableresource = new nsacl(); disableresource.aclname = aclname; return disableresource.perform_operation(client,"disable"); }
[ "public", "static", "base_response", "disable", "(", "nitro_service", "client", ",", "String", "aclname", ")", "throws", "Exception", "{", "nsacl", "disableresource", "=", "new", "nsacl", "(", ")", ";", "disableresource", ".", "aclname", "=", "aclname", ";", "return", "disableresource", ".", "perform_operation", "(", "client", ",", "\"disable\"", ")", ";", "}" ]
Use this API to disable nsacl of given name.
[ "Use", "this", "API", "to", "disable", "nsacl", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L1091-L1095
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.disable
public static base_responses disable(nitro_service client, String aclname[]) throws Exception { base_responses result = null; if (aclname != null && aclname.length > 0) { nsacl disableresources[] = new nsacl[aclname.length]; for (int i=0;i<aclname.length;i++){ disableresources[i] = new nsacl(); disableresources[i].aclname = aclname[i]; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
java
public static base_responses disable(nitro_service client, String aclname[]) throws Exception { base_responses result = null; if (aclname != null && aclname.length > 0) { nsacl disableresources[] = new nsacl[aclname.length]; for (int i=0;i<aclname.length;i++){ disableresources[i] = new nsacl(); disableresources[i].aclname = aclname[i]; } result = perform_operation_bulk_request(client, disableresources,"disable"); } return result; }
[ "public", "static", "base_responses", "disable", "(", "nitro_service", "client", ",", "String", "aclname", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "aclname", "!=", "null", "&&", "aclname", ".", "length", ">", "0", ")", "{", "nsacl", "disableresources", "[", "]", "=", "new", "nsacl", "[", "aclname", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "aclname", ".", "length", ";", "i", "++", ")", "{", "disableresources", "[", "i", "]", "=", "new", "nsacl", "(", ")", ";", "disableresources", "[", "i", "]", ".", "aclname", "=", "aclname", "[", "i", "]", ";", "}", "result", "=", "perform_operation_bulk_request", "(", "client", ",", "disableresources", ",", "\"disable\"", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to disable nsacl resources of given names.
[ "Use", "this", "API", "to", "disable", "nsacl", "resources", "of", "given", "names", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L1109-L1120
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.rename
public static base_response rename(nitro_service client, nsacl resource, String new_aclname) throws Exception { nsacl renameresource = new nsacl(); renameresource.aclname = resource.aclname; return renameresource.rename_resource(client,new_aclname); }
java
public static base_response rename(nitro_service client, nsacl resource, String new_aclname) throws Exception { nsacl renameresource = new nsacl(); renameresource.aclname = resource.aclname; return renameresource.rename_resource(client,new_aclname); }
[ "public", "static", "base_response", "rename", "(", "nitro_service", "client", ",", "nsacl", "resource", ",", "String", "new_aclname", ")", "throws", "Exception", "{", "nsacl", "renameresource", "=", "new", "nsacl", "(", ")", ";", "renameresource", ".", "aclname", "=", "resource", ".", "aclname", ";", "return", "renameresource", ".", "rename_resource", "(", "client", ",", "new_aclname", ")", ";", "}" ]
Use this API to rename a nsacl resource.
[ "Use", "this", "API", "to", "rename", "a", "nsacl", "resource", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L1141-L1145
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.get
public static nsacl[] get(nitro_service service, options option) throws Exception{ nsacl obj = new nsacl(); nsacl[] response = (nsacl[])obj.get_resources(service,option); return response; }
java
public static nsacl[] get(nitro_service service, options option) throws Exception{ nsacl obj = new nsacl(); nsacl[] response = (nsacl[])obj.get_resources(service,option); return response; }
[ "public", "static", "nsacl", "[", "]", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "nsacl", "obj", "=", "new", "nsacl", "(", ")", ";", "nsacl", "[", "]", "response", "=", "(", "nsacl", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nsacl resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nsacl", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L1167-L1171
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java
nsacl.get
public static nsacl get(nitro_service service, String aclname) throws Exception{ nsacl obj = new nsacl(); obj.set_aclname(aclname); nsacl response = (nsacl) obj.get_resource(service); return response; }
java
public static nsacl get(nitro_service service, String aclname) throws Exception{ nsacl obj = new nsacl(); obj.set_aclname(aclname); nsacl response = (nsacl) obj.get_resource(service); return response; }
[ "public", "static", "nsacl", "get", "(", "nitro_service", "service", ",", "String", "aclname", ")", "throws", "Exception", "{", "nsacl", "obj", "=", "new", "nsacl", "(", ")", ";", "obj", ".", "set_aclname", "(", "aclname", ")", ";", "nsacl", "response", "=", "(", "nsacl", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch nsacl resource of given name .
[ "Use", "this", "API", "to", "fetch", "nsacl", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsacl.java#L1175-L1180
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/sequences/ColumnDocumentReaderAndWriter.java
ColumnDocumentReaderAndWriter.printAnswers
public void printAnswers(List<CoreLabel> doc, PrintWriter out) { for (CoreLabel wi : doc) { String answer = wi.get(AnswerAnnotation.class); String goldAnswer = wi.get(GoldAnswerAnnotation.class); out.println(wi.word() + "\t" + goldAnswer + "\t" + answer); } out.println(); }
java
public void printAnswers(List<CoreLabel> doc, PrintWriter out) { for (CoreLabel wi : doc) { String answer = wi.get(AnswerAnnotation.class); String goldAnswer = wi.get(GoldAnswerAnnotation.class); out.println(wi.word() + "\t" + goldAnswer + "\t" + answer); } out.println(); }
[ "public", "void", "printAnswers", "(", "List", "<", "CoreLabel", ">", "doc", ",", "PrintWriter", "out", ")", "{", "for", "(", "CoreLabel", "wi", ":", "doc", ")", "{", "String", "answer", "=", "wi", ".", "get", "(", "AnswerAnnotation", ".", "class", ")", ";", "String", "goldAnswer", "=", "wi", ".", "get", "(", "GoldAnswerAnnotation", ".", "class", ")", ";", "out", ".", "println", "(", "wi", ".", "word", "(", ")", "+", "\"\\t\"", "+", "goldAnswer", "+", "\"\\t\"", "+", "answer", ")", ";", "}", "out", ".", "println", "(", ")", ";", "}" ]
end class ColumnDocParser
[ "end", "class", "ColumnDocParser" ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/ColumnDocumentReaderAndWriter.java#L95-L102
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hasync.java
hasync.Force
public static base_response Force(nitro_service client, hasync resource) throws Exception { hasync Forceresource = new hasync(); Forceresource.force = resource.force; Forceresource.save = resource.save; return Forceresource.perform_operation(client,"Force"); }
java
public static base_response Force(nitro_service client, hasync resource) throws Exception { hasync Forceresource = new hasync(); Forceresource.force = resource.force; Forceresource.save = resource.save; return Forceresource.perform_operation(client,"Force"); }
[ "public", "static", "base_response", "Force", "(", "nitro_service", "client", ",", "hasync", "resource", ")", "throws", "Exception", "{", "hasync", "Forceresource", "=", "new", "hasync", "(", ")", ";", "Forceresource", ".", "force", "=", "resource", ".", "force", ";", "Forceresource", ".", "save", "=", "resource", ".", "save", ";", "return", "Forceresource", ".", "perform_operation", "(", "client", ",", "\"Force\"", ")", ";", "}" ]
Use this API to Force hasync.
[ "Use", "this", "API", "to", "Force", "hasync", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ha/hasync.java#L122-L127
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/GrammaticalRelation.java
GrammaticalRelation.isAncestor
public boolean isAncestor(GrammaticalRelation gr) { while (gr != null) { // Changed this test from this == gr (mrsmith) if (this.equals(gr)) { return true; } gr = gr.parent; } return false; }
java
public boolean isAncestor(GrammaticalRelation gr) { while (gr != null) { // Changed this test from this == gr (mrsmith) if (this.equals(gr)) { return true; } gr = gr.parent; } return false; }
[ "public", "boolean", "isAncestor", "(", "GrammaticalRelation", "gr", ")", "{", "while", "(", "gr", "!=", "null", ")", "{", "// Changed this test from this == gr (mrsmith)\r", "if", "(", "this", ".", "equals", "(", "gr", ")", ")", "{", "return", "true", ";", "}", "gr", "=", "gr", ".", "parent", ";", "}", "return", "false", ";", "}" ]
Returns whether this is equal to or an ancestor of gr in the grammatical relations hierarchy.
[ "Returns", "whether", "this", "is", "equal", "to", "or", "an", "ancestor", "of", "gr", "in", "the", "grammatical", "relations", "hierarchy", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/GrammaticalRelation.java#L372-L379
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusterinstance_clusternode_binding.java
clusterinstance_clusternode_binding.get
public static clusterinstance_clusternode_binding[] get(nitro_service service, Long clid) throws Exception{ clusterinstance_clusternode_binding obj = new clusterinstance_clusternode_binding(); obj.set_clid(clid); clusterinstance_clusternode_binding response[] = (clusterinstance_clusternode_binding[]) obj.get_resources(service); return response; }
java
public static clusterinstance_clusternode_binding[] get(nitro_service service, Long clid) throws Exception{ clusterinstance_clusternode_binding obj = new clusterinstance_clusternode_binding(); obj.set_clid(clid); clusterinstance_clusternode_binding response[] = (clusterinstance_clusternode_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "clusterinstance_clusternode_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "Long", "clid", ")", "throws", "Exception", "{", "clusterinstance_clusternode_binding", "obj", "=", "new", "clusterinstance_clusternode_binding", "(", ")", ";", "obj", ".", "set_clid", "(", "clid", ")", ";", "clusterinstance_clusternode_binding", "response", "[", "]", "=", "(", "clusterinstance_clusternode_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch clusterinstance_clusternode_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "clusterinstance_clusternode_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusterinstance_clusternode_binding.java#L233-L238
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusterinstance_clusternode_binding.java
clusterinstance_clusternode_binding.count
public static long count(nitro_service service, Long clid) throws Exception{ clusterinstance_clusternode_binding obj = new clusterinstance_clusternode_binding(); obj.set_clid(clid); options option = new options(); option.set_count(true); clusterinstance_clusternode_binding response[] = (clusterinstance_clusternode_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
java
public static long count(nitro_service service, Long clid) throws Exception{ clusterinstance_clusternode_binding obj = new clusterinstance_clusternode_binding(); obj.set_clid(clid); options option = new options(); option.set_count(true); clusterinstance_clusternode_binding response[] = (clusterinstance_clusternode_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
[ "public", "static", "long", "count", "(", "nitro_service", "service", ",", "Long", "clid", ")", "throws", "Exception", "{", "clusterinstance_clusternode_binding", "obj", "=", "new", "clusterinstance_clusternode_binding", "(", ")", ";", "obj", ".", "set_clid", "(", "clid", ")", ";", "options", "option", "=", "new", "options", "(", ")", ";", "option", ".", "set_count", "(", "true", ")", ";", "clusterinstance_clusternode_binding", "response", "[", "]", "=", "(", "clusterinstance_clusternode_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ",", "option", ")", ";", "if", "(", "response", "!=", "null", ")", "{", "return", "response", "[", "0", "]", ".", "__count", ";", "}", "return", "0", ";", "}" ]
Use this API to count clusterinstance_clusternode_binding resources configued on NetScaler.
[ "Use", "this", "API", "to", "count", "clusterinstance_clusternode_binding", "resources", "configued", "on", "NetScaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cluster/clusterinstance_clusternode_binding.java#L269-L279
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicylabel_stats.java
rewritepolicylabel_stats.get
public static rewritepolicylabel_stats[] get(nitro_service service) throws Exception{ rewritepolicylabel_stats obj = new rewritepolicylabel_stats(); rewritepolicylabel_stats[] response = (rewritepolicylabel_stats[])obj.stat_resources(service); return response; }
java
public static rewritepolicylabel_stats[] get(nitro_service service) throws Exception{ rewritepolicylabel_stats obj = new rewritepolicylabel_stats(); rewritepolicylabel_stats[] response = (rewritepolicylabel_stats[])obj.stat_resources(service); return response; }
[ "public", "static", "rewritepolicylabel_stats", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "rewritepolicylabel_stats", "obj", "=", "new", "rewritepolicylabel_stats", "(", ")", ";", "rewritepolicylabel_stats", "[", "]", "response", "=", "(", "rewritepolicylabel_stats", "[", "]", ")", "obj", ".", "stat_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch the statistics of all rewritepolicylabel_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "rewritepolicylabel_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicylabel_stats.java#L131-L135
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicylabel_stats.java
rewritepolicylabel_stats.get
public static rewritepolicylabel_stats get(nitro_service service, String labelname) throws Exception{ rewritepolicylabel_stats obj = new rewritepolicylabel_stats(); obj.set_labelname(labelname); rewritepolicylabel_stats response = (rewritepolicylabel_stats) obj.stat_resource(service); return response; }
java
public static rewritepolicylabel_stats get(nitro_service service, String labelname) throws Exception{ rewritepolicylabel_stats obj = new rewritepolicylabel_stats(); obj.set_labelname(labelname); rewritepolicylabel_stats response = (rewritepolicylabel_stats) obj.stat_resource(service); return response; }
[ "public", "static", "rewritepolicylabel_stats", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "rewritepolicylabel_stats", "obj", "=", "new", "rewritepolicylabel_stats", "(", ")", ";", "obj", ".", "set_labelname", "(", "labelname", ")", ";", "rewritepolicylabel_stats", "response", "=", "(", "rewritepolicylabel_stats", ")", "obj", ".", "stat_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch statistics of rewritepolicylabel_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "rewritepolicylabel_stats", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/rewrite/rewritepolicylabel_stats.java#L149-L154
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cachepolicy_lbvserver_binding.java
cachepolicy_lbvserver_binding.get
public static cachepolicy_lbvserver_binding[] get(nitro_service service, String policyname) throws Exception{ cachepolicy_lbvserver_binding obj = new cachepolicy_lbvserver_binding(); obj.set_policyname(policyname); cachepolicy_lbvserver_binding response[] = (cachepolicy_lbvserver_binding[]) obj.get_resources(service); return response; }
java
public static cachepolicy_lbvserver_binding[] get(nitro_service service, String policyname) throws Exception{ cachepolicy_lbvserver_binding obj = new cachepolicy_lbvserver_binding(); obj.set_policyname(policyname); cachepolicy_lbvserver_binding response[] = (cachepolicy_lbvserver_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "cachepolicy_lbvserver_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "policyname", ")", "throws", "Exception", "{", "cachepolicy_lbvserver_binding", "obj", "=", "new", "cachepolicy_lbvserver_binding", "(", ")", ";", "obj", ".", "set_policyname", "(", "policyname", ")", ";", "cachepolicy_lbvserver_binding", "response", "[", "]", "=", "(", "cachepolicy_lbvserver_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch cachepolicy_lbvserver_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "cachepolicy_lbvserver_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cachepolicy_lbvserver_binding.java#L162-L167
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemgroup_binding.java
systemgroup_binding.get
public static systemgroup_binding get(nitro_service service, String groupname) throws Exception{ systemgroup_binding obj = new systemgroup_binding(); obj.set_groupname(groupname); systemgroup_binding response = (systemgroup_binding) obj.get_resource(service); return response; }
java
public static systemgroup_binding get(nitro_service service, String groupname) throws Exception{ systemgroup_binding obj = new systemgroup_binding(); obj.set_groupname(groupname); systemgroup_binding response = (systemgroup_binding) obj.get_resource(service); return response; }
[ "public", "static", "systemgroup_binding", "get", "(", "nitro_service", "service", ",", "String", "groupname", ")", "throws", "Exception", "{", "systemgroup_binding", "obj", "=", "new", "systemgroup_binding", "(", ")", ";", "obj", ".", "set_groupname", "(", "groupname", ")", ";", "systemgroup_binding", "response", "=", "(", "systemgroup_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch systemgroup_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "systemgroup_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/system/systemgroup_binding.java#L114-L119
train
meertensinstituut/mtas
src/main/java/mtas/parser/cql/util/MtasCQLParserSentenceCondition.java
MtasCQLParserSentenceCondition.addSentenceAsFirstOption
public void addSentenceAsFirstOption(MtasCQLParserSentenceCondition s) throws ParseException { if (!simplified) { MtasCQLParserSentenceCondition sentenceCurrent; List<MtasCQLParserSentenceCondition> sentenceSequence; if (isBasic()) { if (basicSentence == null) { sentenceSequence = new ArrayList<MtasCQLParserSentenceCondition>(); sentenceCurrent = s; sentenceSequence.add(sentenceCurrent); sequenceList.add(sentenceSequence); // not simple anymore basic = false; } else { // add sentence as first option sentenceSequence = new ArrayList<MtasCQLParserSentenceCondition>(); sentenceCurrent = s; sentenceSequence.add(sentenceCurrent); sequenceList.add(sentenceSequence); // add previous basic sentence as new option sentenceSequence = new ArrayList<MtasCQLParserSentenceCondition>(); sentenceCurrent = new MtasCQLParserSentenceCondition(basicSentence, ignore, maximumIgnoreLength); sentenceSequence.add(sentenceCurrent); sequenceList.add(sentenceSequence); basicSentence = null; // not simple anymore basic = false; } } else { sentenceSequence = new ArrayList<MtasCQLParserSentenceCondition>(); sentenceCurrent = s; sentenceSequence.add(sentenceCurrent); List<List<MtasCQLParserSentenceCondition>> newsequenceList = new ArrayList<List<MtasCQLParserSentenceCondition>>(); newsequenceList.add(sentenceSequence); newsequenceList.addAll(sequenceList); sequenceList = newsequenceList; } } else { throw new ParseException("already simplified"); } }
java
public void addSentenceAsFirstOption(MtasCQLParserSentenceCondition s) throws ParseException { if (!simplified) { MtasCQLParserSentenceCondition sentenceCurrent; List<MtasCQLParserSentenceCondition> sentenceSequence; if (isBasic()) { if (basicSentence == null) { sentenceSequence = new ArrayList<MtasCQLParserSentenceCondition>(); sentenceCurrent = s; sentenceSequence.add(sentenceCurrent); sequenceList.add(sentenceSequence); // not simple anymore basic = false; } else { // add sentence as first option sentenceSequence = new ArrayList<MtasCQLParserSentenceCondition>(); sentenceCurrent = s; sentenceSequence.add(sentenceCurrent); sequenceList.add(sentenceSequence); // add previous basic sentence as new option sentenceSequence = new ArrayList<MtasCQLParserSentenceCondition>(); sentenceCurrent = new MtasCQLParserSentenceCondition(basicSentence, ignore, maximumIgnoreLength); sentenceSequence.add(sentenceCurrent); sequenceList.add(sentenceSequence); basicSentence = null; // not simple anymore basic = false; } } else { sentenceSequence = new ArrayList<MtasCQLParserSentenceCondition>(); sentenceCurrent = s; sentenceSequence.add(sentenceCurrent); List<List<MtasCQLParserSentenceCondition>> newsequenceList = new ArrayList<List<MtasCQLParserSentenceCondition>>(); newsequenceList.add(sentenceSequence); newsequenceList.addAll(sequenceList); sequenceList = newsequenceList; } } else { throw new ParseException("already simplified"); } }
[ "public", "void", "addSentenceAsFirstOption", "(", "MtasCQLParserSentenceCondition", "s", ")", "throws", "ParseException", "{", "if", "(", "!", "simplified", ")", "{", "MtasCQLParserSentenceCondition", "sentenceCurrent", ";", "List", "<", "MtasCQLParserSentenceCondition", ">", "sentenceSequence", ";", "if", "(", "isBasic", "(", ")", ")", "{", "if", "(", "basicSentence", "==", "null", ")", "{", "sentenceSequence", "=", "new", "ArrayList", "<", "MtasCQLParserSentenceCondition", ">", "(", ")", ";", "sentenceCurrent", "=", "s", ";", "sentenceSequence", ".", "add", "(", "sentenceCurrent", ")", ";", "sequenceList", ".", "add", "(", "sentenceSequence", ")", ";", "// not simple anymore", "basic", "=", "false", ";", "}", "else", "{", "// add sentence as first option", "sentenceSequence", "=", "new", "ArrayList", "<", "MtasCQLParserSentenceCondition", ">", "(", ")", ";", "sentenceCurrent", "=", "s", ";", "sentenceSequence", ".", "add", "(", "sentenceCurrent", ")", ";", "sequenceList", ".", "add", "(", "sentenceSequence", ")", ";", "// add previous basic sentence as new option", "sentenceSequence", "=", "new", "ArrayList", "<", "MtasCQLParserSentenceCondition", ">", "(", ")", ";", "sentenceCurrent", "=", "new", "MtasCQLParserSentenceCondition", "(", "basicSentence", ",", "ignore", ",", "maximumIgnoreLength", ")", ";", "sentenceSequence", ".", "add", "(", "sentenceCurrent", ")", ";", "sequenceList", ".", "add", "(", "sentenceSequence", ")", ";", "basicSentence", "=", "null", ";", "// not simple anymore", "basic", "=", "false", ";", "}", "}", "else", "{", "sentenceSequence", "=", "new", "ArrayList", "<", "MtasCQLParserSentenceCondition", ">", "(", ")", ";", "sentenceCurrent", "=", "s", ";", "sentenceSequence", ".", "add", "(", "sentenceCurrent", ")", ";", "List", "<", "List", "<", "MtasCQLParserSentenceCondition", ">", ">", "newsequenceList", "=", "new", "ArrayList", "<", "List", "<", "MtasCQLParserSentenceCondition", ">", ">", "(", ")", ";", "newsequenceList", ".", "add", "(", "sentenceSequence", ")", ";", "newsequenceList", ".", "addAll", "(", "sequenceList", ")", ";", "sequenceList", "=", "newsequenceList", ";", "}", "}", "else", "{", "throw", "new", "ParseException", "(", "\"already simplified\"", ")", ";", "}", "}" ]
Adds the sentence as first option. @param s the s @throws ParseException the parse exception
[ "Adds", "the", "sentence", "as", "first", "option", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/parser/cql/util/MtasCQLParserSentenceCondition.java#L263-L304
train
meertensinstituut/mtas
src/main/java/mtas/parser/cql/util/MtasCQLParserSentenceCondition.java
MtasCQLParserSentenceCondition.simplifySequence
private void simplifySequence(List<MtasCQLParserSentenceCondition> sequence) throws ParseException { List<MtasCQLParserSentenceCondition> newSequence = new ArrayList<MtasCQLParserSentenceCondition>(); MtasCQLParserSentenceCondition lastSentence = null; for (MtasCQLParserSentenceCondition sentence : sequence) { sentence.simplify(); if (lastSentence == null) { lastSentence = sentence; } else if (lastSentence.isBasic() && sentence.isBasic()) { if (!lastSentence.isOptional() && !sentence.isOptional() && sentence.getMaximumOccurence() == 1 && lastSentence.getMaximumOccurence() == 1) { lastSentence.basicSentence.addBasicSentence(sentence.basicSentence); } else { newSequence.add(lastSentence); lastSentence = sentence; } } else if (lastSentence.isBasic() && !sentence.isBasic()) { if (sentence.isSingle() && !sentence.isOptional() && sentence.getMaximumOccurence() == 1 && lastSentence.getMaximumOccurence() == 1) { // add all items from (first) sequenceList potentially to the new // sequence for (MtasCQLParserSentenceCondition subSentence : sentence.sequenceList .get(0)) { newSequence.add(lastSentence); lastSentence = subSentence; } } else { // add sentence potentially to the new sequence newSequence.add(lastSentence); lastSentence = sentence; } } else if (!lastSentence.isBasic() && sentence.isBasic()) { if (lastSentence.isSingle() && !lastSentence.isOptional() && sentence.getMaximumOccurence() == 1 && lastSentence.getMaximumOccurence() == 1) { // add basic sentence to end latest sequence lastSentence .addBasicSentenceToEndLatestSequence(sentence.basicSentence); } else { // add sentence potentially to the new sequence newSequence.add(lastSentence); lastSentence = sentence; } } else { if (sentence.isSingle() && !sentence.isOptional() && lastSentence.isSingle() && !lastSentence.isOptional() && sentence.getMaximumOccurence() == 1 && lastSentence.getMaximumOccurence() == 1) { // combine sentences for (MtasCQLParserSentenceCondition subSentence : sentence.sequenceList .get(0)) { lastSentence.sequenceList.get(0).add(subSentence); } } else { // add sentence potentially to the new sequence (both not basic) newSequence.add(lastSentence); lastSentence = sentence; } } } // add last to newSequence if (lastSentence != null) { newSequence.add(lastSentence); } // replace content sequence with newSequence sequence.clear(); sequence.addAll(newSequence); }
java
private void simplifySequence(List<MtasCQLParserSentenceCondition> sequence) throws ParseException { List<MtasCQLParserSentenceCondition> newSequence = new ArrayList<MtasCQLParserSentenceCondition>(); MtasCQLParserSentenceCondition lastSentence = null; for (MtasCQLParserSentenceCondition sentence : sequence) { sentence.simplify(); if (lastSentence == null) { lastSentence = sentence; } else if (lastSentence.isBasic() && sentence.isBasic()) { if (!lastSentence.isOptional() && !sentence.isOptional() && sentence.getMaximumOccurence() == 1 && lastSentence.getMaximumOccurence() == 1) { lastSentence.basicSentence.addBasicSentence(sentence.basicSentence); } else { newSequence.add(lastSentence); lastSentence = sentence; } } else if (lastSentence.isBasic() && !sentence.isBasic()) { if (sentence.isSingle() && !sentence.isOptional() && sentence.getMaximumOccurence() == 1 && lastSentence.getMaximumOccurence() == 1) { // add all items from (first) sequenceList potentially to the new // sequence for (MtasCQLParserSentenceCondition subSentence : sentence.sequenceList .get(0)) { newSequence.add(lastSentence); lastSentence = subSentence; } } else { // add sentence potentially to the new sequence newSequence.add(lastSentence); lastSentence = sentence; } } else if (!lastSentence.isBasic() && sentence.isBasic()) { if (lastSentence.isSingle() && !lastSentence.isOptional() && sentence.getMaximumOccurence() == 1 && lastSentence.getMaximumOccurence() == 1) { // add basic sentence to end latest sequence lastSentence .addBasicSentenceToEndLatestSequence(sentence.basicSentence); } else { // add sentence potentially to the new sequence newSequence.add(lastSentence); lastSentence = sentence; } } else { if (sentence.isSingle() && !sentence.isOptional() && lastSentence.isSingle() && !lastSentence.isOptional() && sentence.getMaximumOccurence() == 1 && lastSentence.getMaximumOccurence() == 1) { // combine sentences for (MtasCQLParserSentenceCondition subSentence : sentence.sequenceList .get(0)) { lastSentence.sequenceList.get(0).add(subSentence); } } else { // add sentence potentially to the new sequence (both not basic) newSequence.add(lastSentence); lastSentence = sentence; } } } // add last to newSequence if (lastSentence != null) { newSequence.add(lastSentence); } // replace content sequence with newSequence sequence.clear(); sequence.addAll(newSequence); }
[ "private", "void", "simplifySequence", "(", "List", "<", "MtasCQLParserSentenceCondition", ">", "sequence", ")", "throws", "ParseException", "{", "List", "<", "MtasCQLParserSentenceCondition", ">", "newSequence", "=", "new", "ArrayList", "<", "MtasCQLParserSentenceCondition", ">", "(", ")", ";", "MtasCQLParserSentenceCondition", "lastSentence", "=", "null", ";", "for", "(", "MtasCQLParserSentenceCondition", "sentence", ":", "sequence", ")", "{", "sentence", ".", "simplify", "(", ")", ";", "if", "(", "lastSentence", "==", "null", ")", "{", "lastSentence", "=", "sentence", ";", "}", "else", "if", "(", "lastSentence", ".", "isBasic", "(", ")", "&&", "sentence", ".", "isBasic", "(", ")", ")", "{", "if", "(", "!", "lastSentence", ".", "isOptional", "(", ")", "&&", "!", "sentence", ".", "isOptional", "(", ")", "&&", "sentence", ".", "getMaximumOccurence", "(", ")", "==", "1", "&&", "lastSentence", ".", "getMaximumOccurence", "(", ")", "==", "1", ")", "{", "lastSentence", ".", "basicSentence", ".", "addBasicSentence", "(", "sentence", ".", "basicSentence", ")", ";", "}", "else", "{", "newSequence", ".", "add", "(", "lastSentence", ")", ";", "lastSentence", "=", "sentence", ";", "}", "}", "else", "if", "(", "lastSentence", ".", "isBasic", "(", ")", "&&", "!", "sentence", ".", "isBasic", "(", ")", ")", "{", "if", "(", "sentence", ".", "isSingle", "(", ")", "&&", "!", "sentence", ".", "isOptional", "(", ")", "&&", "sentence", ".", "getMaximumOccurence", "(", ")", "==", "1", "&&", "lastSentence", ".", "getMaximumOccurence", "(", ")", "==", "1", ")", "{", "// add all items from (first) sequenceList potentially to the new", "// sequence", "for", "(", "MtasCQLParserSentenceCondition", "subSentence", ":", "sentence", ".", "sequenceList", ".", "get", "(", "0", ")", ")", "{", "newSequence", ".", "add", "(", "lastSentence", ")", ";", "lastSentence", "=", "subSentence", ";", "}", "}", "else", "{", "// add sentence potentially to the new sequence", "newSequence", ".", "add", "(", "lastSentence", ")", ";", "lastSentence", "=", "sentence", ";", "}", "}", "else", "if", "(", "!", "lastSentence", ".", "isBasic", "(", ")", "&&", "sentence", ".", "isBasic", "(", ")", ")", "{", "if", "(", "lastSentence", ".", "isSingle", "(", ")", "&&", "!", "lastSentence", ".", "isOptional", "(", ")", "&&", "sentence", ".", "getMaximumOccurence", "(", ")", "==", "1", "&&", "lastSentence", ".", "getMaximumOccurence", "(", ")", "==", "1", ")", "{", "// add basic sentence to end latest sequence", "lastSentence", ".", "addBasicSentenceToEndLatestSequence", "(", "sentence", ".", "basicSentence", ")", ";", "}", "else", "{", "// add sentence potentially to the new sequence", "newSequence", ".", "add", "(", "lastSentence", ")", ";", "lastSentence", "=", "sentence", ";", "}", "}", "else", "{", "if", "(", "sentence", ".", "isSingle", "(", ")", "&&", "!", "sentence", ".", "isOptional", "(", ")", "&&", "lastSentence", ".", "isSingle", "(", ")", "&&", "!", "lastSentence", ".", "isOptional", "(", ")", "&&", "sentence", ".", "getMaximumOccurence", "(", ")", "==", "1", "&&", "lastSentence", ".", "getMaximumOccurence", "(", ")", "==", "1", ")", "{", "// combine sentences", "for", "(", "MtasCQLParserSentenceCondition", "subSentence", ":", "sentence", ".", "sequenceList", ".", "get", "(", "0", ")", ")", "{", "lastSentence", ".", "sequenceList", ".", "get", "(", "0", ")", ".", "add", "(", "subSentence", ")", ";", "}", "}", "else", "{", "// add sentence potentially to the new sequence (both not basic)", "newSequence", ".", "add", "(", "lastSentence", ")", ";", "lastSentence", "=", "sentence", ";", "}", "}", "}", "// add last to newSequence", "if", "(", "lastSentence", "!=", "null", ")", "{", "newSequence", ".", "add", "(", "lastSentence", ")", ";", "}", "// replace content sequence with newSequence", "sequence", ".", "clear", "(", ")", ";", "sequence", ".", "addAll", "(", "newSequence", ")", ";", "}" ]
Simplify sequence. @param sequence the sequence @throws ParseException the parse exception
[ "Simplify", "sequence", "." ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/parser/cql/util/MtasCQLParserSentenceCondition.java#L406-L475
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java
AbstractTreebankParserParams.pw
public PrintWriter pw(OutputStream o) { String encoding = outputEncoding; if (!java.nio.charset.Charset.isSupported(encoding)) { System.out.println("Warning: desired encoding " + encoding + " not accepted. "); System.out.println("Using UTF-8 to construct PrintWriter"); encoding = "UTF-8"; } try { return new PrintWriter(new OutputStreamWriter(o, encoding), true); } catch (UnsupportedEncodingException e) { System.out.println("Warning: desired encoding " + outputEncoding + " not accepted. " + e); try { return new PrintWriter(new OutputStreamWriter(o, "UTF-8"), true); } catch (UnsupportedEncodingException e1) { System.out.println("Something is really wrong. Your system doesn't even support UTF-8!" + e1); return new PrintWriter(o, true); } } }
java
public PrintWriter pw(OutputStream o) { String encoding = outputEncoding; if (!java.nio.charset.Charset.isSupported(encoding)) { System.out.println("Warning: desired encoding " + encoding + " not accepted. "); System.out.println("Using UTF-8 to construct PrintWriter"); encoding = "UTF-8"; } try { return new PrintWriter(new OutputStreamWriter(o, encoding), true); } catch (UnsupportedEncodingException e) { System.out.println("Warning: desired encoding " + outputEncoding + " not accepted. " + e); try { return new PrintWriter(new OutputStreamWriter(o, "UTF-8"), true); } catch (UnsupportedEncodingException e1) { System.out.println("Something is really wrong. Your system doesn't even support UTF-8!" + e1); return new PrintWriter(o, true); } } }
[ "public", "PrintWriter", "pw", "(", "OutputStream", "o", ")", "{", "String", "encoding", "=", "outputEncoding", ";", "if", "(", "!", "java", ".", "nio", ".", "charset", ".", "Charset", ".", "isSupported", "(", "encoding", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"Warning: desired encoding \"", "+", "encoding", "+", "\" not accepted. \"", ")", ";", "System", ".", "out", ".", "println", "(", "\"Using UTF-8 to construct PrintWriter\"", ")", ";", "encoding", "=", "\"UTF-8\"", ";", "}", "try", "{", "return", "new", "PrintWriter", "(", "new", "OutputStreamWriter", "(", "o", ",", "encoding", ")", ",", "true", ")", ";", "}", "catch", "(", "UnsupportedEncodingException", "e", ")", "{", "System", ".", "out", ".", "println", "(", "\"Warning: desired encoding \"", "+", "outputEncoding", "+", "\" not accepted. \"", "+", "e", ")", ";", "try", "{", "return", "new", "PrintWriter", "(", "new", "OutputStreamWriter", "(", "o", ",", "\"UTF-8\"", ")", ",", "true", ")", ";", "}", "catch", "(", "UnsupportedEncodingException", "e1", ")", "{", "System", ".", "out", ".", "println", "(", "\"Something is really wrong. Your system doesn't even support UTF-8!\"", "+", "e1", ")", ";", "return", "new", "PrintWriter", "(", "o", ",", "true", ")", ";", "}", "}", "}" ]
The PrintWriter used to print output. It's the responsibility of pw to deal properly with character encodings for the relevant treebank.
[ "The", "PrintWriter", "used", "to", "print", "output", ".", "It", "s", "the", "responsibility", "of", "pw", "to", "deal", "properly", "with", "character", "encodings", "for", "the", "relevant", "treebank", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java#L243-L262
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java
AbstractTreebankParserParams.untypedDependencyObjectify
public static Collection<List<String>> untypedDependencyObjectify(Tree t, HeadFinder hf, TreeTransformer collinizer) { return dependencyObjectify(t, hf, collinizer, new UntypedDependencyTyper(hf)); }
java
public static Collection<List<String>> untypedDependencyObjectify(Tree t, HeadFinder hf, TreeTransformer collinizer) { return dependencyObjectify(t, hf, collinizer, new UntypedDependencyTyper(hf)); }
[ "public", "static", "Collection", "<", "List", "<", "String", ">", ">", "untypedDependencyObjectify", "(", "Tree", "t", ",", "HeadFinder", "hf", ",", "TreeTransformer", "collinizer", ")", "{", "return", "dependencyObjectify", "(", "t", ",", "hf", ",", "collinizer", ",", "new", "UntypedDependencyTyper", "(", "hf", ")", ")", ";", "}" ]
Returns a collection of untyped word-word dependencies for the tree.
[ "Returns", "a", "collection", "of", "untyped", "word", "-", "word", "dependencies", "for", "the", "tree", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java#L344-L346
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java
AbstractTreebankParserParams.typedDependencyObjectify
public static Collection<List<String>> typedDependencyObjectify(Tree t, HeadFinder hf, TreeTransformer collinizer) { return dependencyObjectify(t, hf, collinizer, new TypedDependencyTyper(hf)); }
java
public static Collection<List<String>> typedDependencyObjectify(Tree t, HeadFinder hf, TreeTransformer collinizer) { return dependencyObjectify(t, hf, collinizer, new TypedDependencyTyper(hf)); }
[ "public", "static", "Collection", "<", "List", "<", "String", ">", ">", "typedDependencyObjectify", "(", "Tree", "t", ",", "HeadFinder", "hf", ",", "TreeTransformer", "collinizer", ")", "{", "return", "dependencyObjectify", "(", "t", ",", "hf", ",", "collinizer", ",", "new", "TypedDependencyTyper", "(", "hf", ")", ")", ";", "}" ]
Returns a collection of word-word dependencies typed by mother, head, daughter node syntactic categories.
[ "Returns", "a", "collection", "of", "word", "-", "word", "dependencies", "typed", "by", "mother", "head", "daughter", "node", "syntactic", "categories", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java#L358-L360
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java
AbstractTreebankParserParams.typedDependencyClasser
public static EquivalenceClasser<List<String>, String> typedDependencyClasser() { return new EquivalenceClasser<List<String>, String>() { public String equivalenceClass(List<String> s) { if(s.get(5).equals(leftHeaded)) return s.get(2) + '(' + s.get(3) + "->" + s.get(4) + ')'; return s.get(2) + '(' + s.get(4) + "<-" + s.get(3) + ')'; } }; }
java
public static EquivalenceClasser<List<String>, String> typedDependencyClasser() { return new EquivalenceClasser<List<String>, String>() { public String equivalenceClass(List<String> s) { if(s.get(5).equals(leftHeaded)) return s.get(2) + '(' + s.get(3) + "->" + s.get(4) + ')'; return s.get(2) + '(' + s.get(4) + "<-" + s.get(3) + ')'; } }; }
[ "public", "static", "EquivalenceClasser", "<", "List", "<", "String", ">", ",", "String", ">", "typedDependencyClasser", "(", ")", "{", "return", "new", "EquivalenceClasser", "<", "List", "<", "String", ">", ",", "String", ">", "(", ")", "{", "public", "String", "equivalenceClass", "(", "List", "<", "String", ">", "s", ")", "{", "if", "(", "s", ".", "get", "(", "5", ")", ".", "equals", "(", "leftHeaded", ")", ")", "return", "s", ".", "get", "(", "2", ")", "+", "'", "'", "+", "s", ".", "get", "(", "3", ")", "+", "\"->\"", "+", "s", ".", "get", "(", "4", ")", "+", "'", "'", ";", "return", "s", ".", "get", "(", "2", ")", "+", "'", "'", "+", "s", ".", "get", "(", "4", ")", "+", "\"<-\"", "+", "s", ".", "get", "(", "3", ")", "+", "'", "'", ";", "}", "}", ";", "}" ]
Returns an EquivalenceClasser that classes typed dependencies by the syntactic categories of mother, head and daughter, plus direction. @return An Equivalence class for typed dependencies
[ "Returns", "an", "EquivalenceClasser", "that", "classes", "typed", "dependencies", "by", "the", "syntactic", "categories", "of", "mother", "head", "and", "daughter", "plus", "direction", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java#L493-L501
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/netbridge_nsip_binding.java
netbridge_nsip_binding.get
public static netbridge_nsip_binding[] get(nitro_service service, String name) throws Exception{ netbridge_nsip_binding obj = new netbridge_nsip_binding(); obj.set_name(name); netbridge_nsip_binding response[] = (netbridge_nsip_binding[]) obj.get_resources(service); return response; }
java
public static netbridge_nsip_binding[] get(nitro_service service, String name) throws Exception{ netbridge_nsip_binding obj = new netbridge_nsip_binding(); obj.set_name(name); netbridge_nsip_binding response[] = (netbridge_nsip_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "netbridge_nsip_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "netbridge_nsip_binding", "obj", "=", "new", "netbridge_nsip_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "netbridge_nsip_binding", "response", "[", "]", "=", "(", "netbridge_nsip_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch netbridge_nsip_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "netbridge_nsip_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/netbridge_nsip_binding.java#L177-L182
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformprofile_transformaction_binding.java
transformprofile_transformaction_binding.get
public static transformprofile_transformaction_binding[] get(nitro_service service, String name) throws Exception{ transformprofile_transformaction_binding obj = new transformprofile_transformaction_binding(); obj.set_name(name); transformprofile_transformaction_binding response[] = (transformprofile_transformaction_binding[]) obj.get_resources(service); return response; }
java
public static transformprofile_transformaction_binding[] get(nitro_service service, String name) throws Exception{ transformprofile_transformaction_binding obj = new transformprofile_transformaction_binding(); obj.set_name(name); transformprofile_transformaction_binding response[] = (transformprofile_transformaction_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "transformprofile_transformaction_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "transformprofile_transformaction_binding", "obj", "=", "new", "transformprofile_transformaction_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "transformprofile_transformaction_binding", "response", "[", "]", "=", "(", "transformprofile_transformaction_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch transformprofile_transformaction_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "transformprofile_transformaction_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformprofile_transformaction_binding.java#L212-L217
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Distribution.java
Distribution.getDistributionFromLogValues
public static <E> Distribution<E> getDistributionFromLogValues(Counter<E> counter) { ClassicCounter<E> c = new ClassicCounter<E>(); // go through once to get the max // shift all by max so as to minimize the possibility of underflow double max = Counters.max(counter); // Thang 17Feb12: max should operate on counter instead of c, fixed! for (E key : counter.keySet()) { double count = Math.exp(counter.getCount(key) - max); c.setCount(key, count); } return getDistribution(c); }
java
public static <E> Distribution<E> getDistributionFromLogValues(Counter<E> counter) { ClassicCounter<E> c = new ClassicCounter<E>(); // go through once to get the max // shift all by max so as to minimize the possibility of underflow double max = Counters.max(counter); // Thang 17Feb12: max should operate on counter instead of c, fixed! for (E key : counter.keySet()) { double count = Math.exp(counter.getCount(key) - max); c.setCount(key, count); } return getDistribution(c); }
[ "public", "static", "<", "E", ">", "Distribution", "<", "E", ">", "getDistributionFromLogValues", "(", "Counter", "<", "E", ">", "counter", ")", "{", "ClassicCounter", "<", "E", ">", "c", "=", "new", "ClassicCounter", "<", "E", ">", "(", ")", ";", "// go through once to get the max\r", "// shift all by max so as to minimize the possibility of underflow\r", "double", "max", "=", "Counters", ".", "max", "(", "counter", ")", ";", "// Thang 17Feb12: max should operate on counter instead of c, fixed!\r", "for", "(", "E", "key", ":", "counter", ".", "keySet", "(", ")", ")", "{", "double", "count", "=", "Math", ".", "exp", "(", "counter", ".", "getCount", "(", "key", ")", "-", "max", ")", ";", "c", ".", "setCount", "(", "key", ",", "count", ")", ";", "}", "return", "getDistribution", "(", "c", ")", ";", "}" ]
Creates a Distribution from the given counter, ie makes an internal copy of the counter and divides all counts by the total count. @return a new Distribution
[ "Creates", "a", "Distribution", "from", "the", "given", "counter", "ie", "makes", "an", "internal", "copy", "of", "the", "counter", "and", "divides", "all", "counts", "by", "the", "total", "count", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Distribution.java#L203-L213
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Distribution.java
Distribution.laplaceSmoothedDistribution
public static <E> Distribution<E> laplaceSmoothedDistribution(Counter<E> counter, int numberOfKeys) { return laplaceSmoothedDistribution(counter, numberOfKeys, 1.0); }
java
public static <E> Distribution<E> laplaceSmoothedDistribution(Counter<E> counter, int numberOfKeys) { return laplaceSmoothedDistribution(counter, numberOfKeys, 1.0); }
[ "public", "static", "<", "E", ">", "Distribution", "<", "E", ">", "laplaceSmoothedDistribution", "(", "Counter", "<", "E", ">", "counter", ",", "int", "numberOfKeys", ")", "{", "return", "laplaceSmoothedDistribution", "(", "counter", ",", "numberOfKeys", ",", "1.0", ")", ";", "}" ]
Creates an Laplace smoothed Distribution from the given counter, ie adds one count to every item, including unseen ones, and divides by the total count. @return a new add-1 smoothed Distribution
[ "Creates", "an", "Laplace", "smoothed", "Distribution", "from", "the", "given", "counter", "ie", "adds", "one", "count", "to", "every", "item", "including", "unseen", "ones", "and", "divides", "by", "the", "total", "count", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Distribution.java#L264-L266
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Distribution.java
Distribution.laplaceWithExplicitUnknown
public static <E> Distribution<E> laplaceWithExplicitUnknown(Counter<E> counter, double lambda, E UNK) { Distribution<E> norm = new Distribution<E>(); norm.counter = new ClassicCounter<E>(); double total = counter.totalCount() + (lambda * (counter.size() - 1)); norm.numberOfKeys = counter.size(); norm.reservedMass = 0.0; for (E key : counter.keySet()) { if (key.equals(UNK)) { norm.counter.setCount(key, counter.getCount(key) / total); } else { norm.counter.setCount(key, (counter.getCount(key) + lambda) / total); } } return norm; }
java
public static <E> Distribution<E> laplaceWithExplicitUnknown(Counter<E> counter, double lambda, E UNK) { Distribution<E> norm = new Distribution<E>(); norm.counter = new ClassicCounter<E>(); double total = counter.totalCount() + (lambda * (counter.size() - 1)); norm.numberOfKeys = counter.size(); norm.reservedMass = 0.0; for (E key : counter.keySet()) { if (key.equals(UNK)) { norm.counter.setCount(key, counter.getCount(key) / total); } else { norm.counter.setCount(key, (counter.getCount(key) + lambda) / total); } } return norm; }
[ "public", "static", "<", "E", ">", "Distribution", "<", "E", ">", "laplaceWithExplicitUnknown", "(", "Counter", "<", "E", ">", "counter", ",", "double", "lambda", ",", "E", "UNK", ")", "{", "Distribution", "<", "E", ">", "norm", "=", "new", "Distribution", "<", "E", ">", "(", ")", ";", "norm", ".", "counter", "=", "new", "ClassicCounter", "<", "E", ">", "(", ")", ";", "double", "total", "=", "counter", ".", "totalCount", "(", ")", "+", "(", "lambda", "*", "(", "counter", ".", "size", "(", ")", "-", "1", ")", ")", ";", "norm", ".", "numberOfKeys", "=", "counter", ".", "size", "(", ")", ";", "norm", ".", "reservedMass", "=", "0.0", ";", "for", "(", "E", "key", ":", "counter", ".", "keySet", "(", ")", ")", "{", "if", "(", "key", ".", "equals", "(", "UNK", ")", ")", "{", "norm", ".", "counter", ".", "setCount", "(", "key", ",", "counter", ".", "getCount", "(", "key", ")", "/", "total", ")", ";", "}", "else", "{", "norm", ".", "counter", ".", "setCount", "(", "key", ",", "(", "counter", ".", "getCount", "(", "key", ")", "+", "lambda", ")", "/", "total", ")", ";", "}", "}", "return", "norm", ";", "}" ]
Creates a smoothed Distribution with Laplace smoothing, but assumes an explicit count of "UNKNOWN" items. Thus anything not in the original counter will have probability zero. @param counter the counter to normalize @param lambda the value to add to each count @param UNK the UNKNOWN symbol @return a new Laplace-smoothed distribution
[ "Creates", "a", "smoothed", "Distribution", "with", "Laplace", "smoothing", "but", "assumes", "an", "explicit", "count", "of", "UNKNOWN", "items", ".", "Thus", "anything", "not", "in", "the", "original", "counter", "will", "have", "probability", "zero", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Distribution.java#L312-L326
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Distribution.java
Distribution.goodTuringSmoothedCounter
public static <E> Distribution<E> goodTuringSmoothedCounter(Counter<E> counter, int numberOfKeys) { // gather count-counts int[] countCounts = getCountCounts(counter); // if count-counts are unreliable, we shouldn't be using G-T // revert to laplace for (int i = 1; i <= 10; i++) { if (countCounts[i] < 3) { return laplaceSmoothedDistribution(counter, numberOfKeys, 0.5); } } double observedMass = counter.totalCount(); double reservedMass = countCounts[1] / observedMass; // calculate and cache adjusted frequencies // also adjusting total mass of observed items double[] adjustedFreq = new double[10]; for (int freq = 1; freq < 10; freq++) { adjustedFreq[freq] = (double) (freq + 1) * (double) countCounts[freq + 1] / countCounts[freq]; observedMass -= (freq - adjustedFreq[freq]) * countCounts[freq]; } double normFactor = (1.0 - reservedMass) / observedMass; Distribution<E> norm = new Distribution<E>(); norm.counter = new ClassicCounter<E>(); // fill in the new Distribution, renormalizing as we go for (E key : counter.keySet()) { int origFreq = (int) Math.round(counter.getCount(key)); if (origFreq < 10) { norm.counter.setCount(key, adjustedFreq[origFreq] * normFactor); } else { norm.counter.setCount(key, origFreq * normFactor); } } norm.numberOfKeys = numberOfKeys; norm.reservedMass = reservedMass; return norm; }
java
public static <E> Distribution<E> goodTuringSmoothedCounter(Counter<E> counter, int numberOfKeys) { // gather count-counts int[] countCounts = getCountCounts(counter); // if count-counts are unreliable, we shouldn't be using G-T // revert to laplace for (int i = 1; i <= 10; i++) { if (countCounts[i] < 3) { return laplaceSmoothedDistribution(counter, numberOfKeys, 0.5); } } double observedMass = counter.totalCount(); double reservedMass = countCounts[1] / observedMass; // calculate and cache adjusted frequencies // also adjusting total mass of observed items double[] adjustedFreq = new double[10]; for (int freq = 1; freq < 10; freq++) { adjustedFreq[freq] = (double) (freq + 1) * (double) countCounts[freq + 1] / countCounts[freq]; observedMass -= (freq - adjustedFreq[freq]) * countCounts[freq]; } double normFactor = (1.0 - reservedMass) / observedMass; Distribution<E> norm = new Distribution<E>(); norm.counter = new ClassicCounter<E>(); // fill in the new Distribution, renormalizing as we go for (E key : counter.keySet()) { int origFreq = (int) Math.round(counter.getCount(key)); if (origFreq < 10) { norm.counter.setCount(key, adjustedFreq[origFreq] * normFactor); } else { norm.counter.setCount(key, origFreq * normFactor); } } norm.numberOfKeys = numberOfKeys; norm.reservedMass = reservedMass; return norm; }
[ "public", "static", "<", "E", ">", "Distribution", "<", "E", ">", "goodTuringSmoothedCounter", "(", "Counter", "<", "E", ">", "counter", ",", "int", "numberOfKeys", ")", "{", "// gather count-counts\r", "int", "[", "]", "countCounts", "=", "getCountCounts", "(", "counter", ")", ";", "// if count-counts are unreliable, we shouldn't be using G-T\r", "// revert to laplace\r", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "10", ";", "i", "++", ")", "{", "if", "(", "countCounts", "[", "i", "]", "<", "3", ")", "{", "return", "laplaceSmoothedDistribution", "(", "counter", ",", "numberOfKeys", ",", "0.5", ")", ";", "}", "}", "double", "observedMass", "=", "counter", ".", "totalCount", "(", ")", ";", "double", "reservedMass", "=", "countCounts", "[", "1", "]", "/", "observedMass", ";", "// calculate and cache adjusted frequencies\r", "// also adjusting total mass of observed items\r", "double", "[", "]", "adjustedFreq", "=", "new", "double", "[", "10", "]", ";", "for", "(", "int", "freq", "=", "1", ";", "freq", "<", "10", ";", "freq", "++", ")", "{", "adjustedFreq", "[", "freq", "]", "=", "(", "double", ")", "(", "freq", "+", "1", ")", "*", "(", "double", ")", "countCounts", "[", "freq", "+", "1", "]", "/", "countCounts", "[", "freq", "]", ";", "observedMass", "-=", "(", "freq", "-", "adjustedFreq", "[", "freq", "]", ")", "*", "countCounts", "[", "freq", "]", ";", "}", "double", "normFactor", "=", "(", "1.0", "-", "reservedMass", ")", "/", "observedMass", ";", "Distribution", "<", "E", ">", "norm", "=", "new", "Distribution", "<", "E", ">", "(", ")", ";", "norm", ".", "counter", "=", "new", "ClassicCounter", "<", "E", ">", "(", ")", ";", "// fill in the new Distribution, renormalizing as we go\r", "for", "(", "E", "key", ":", "counter", ".", "keySet", "(", ")", ")", "{", "int", "origFreq", "=", "(", "int", ")", "Math", ".", "round", "(", "counter", ".", "getCount", "(", "key", ")", ")", ";", "if", "(", "origFreq", "<", "10", ")", "{", "norm", ".", "counter", ".", "setCount", "(", "key", ",", "adjustedFreq", "[", "origFreq", "]", "*", "normFactor", ")", ";", "}", "else", "{", "norm", ".", "counter", ".", "setCount", "(", "key", ",", "origFreq", "*", "normFactor", ")", ";", "}", "}", "norm", ".", "numberOfKeys", "=", "numberOfKeys", ";", "norm", ".", "reservedMass", "=", "reservedMass", ";", "return", "norm", ";", "}" ]
Creates a Good-Turing smoothed Distribution from the given counter. @return a new Good-Turing smoothed Distribution.
[ "Creates", "a", "Good", "-", "Turing", "smoothed", "Distribution", "from", "the", "given", "counter", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Distribution.java#L333-L374
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Distribution.java
Distribution.simpleGoodTuring
public static <E> Distribution<E> simpleGoodTuring(Counter<E> counter, int numberOfKeys) { // check arguments validateCounter(counter); int numUnseen = numberOfKeys - counter.size(); if (numUnseen < 1) throw new IllegalArgumentException(String.format("ERROR: numberOfKeys %d must be > size of counter %d!", numberOfKeys, counter.size())); // do smoothing int[][] cc = countCounts2IntArrays(collectCountCounts(counter)); int[] r = cc[0]; // counts int[] n = cc[1]; // counts of counts SimpleGoodTuring sgt = new SimpleGoodTuring(r, n); // collate results Counter<Integer> probsByCount = new ClassicCounter<Integer>(); double[] probs = sgt.getProbabilities(); for (int i = 0; i < probs.length; i++) { probsByCount.setCount(r[i], probs[i]); } // make smoothed distribution Distribution<E> dist = new Distribution<E>(); dist.counter = new ClassicCounter<E>(); for (Map.Entry<E, Double> entry : counter.entrySet()) { E item = entry.getKey(); Integer count = (int) Math.round(entry.getValue()); dist.counter.setCount(item, probsByCount.getCount(count)); } dist.numberOfKeys = numberOfKeys; dist.reservedMass = sgt.getProbabilityForUnseen(); return dist; }
java
public static <E> Distribution<E> simpleGoodTuring(Counter<E> counter, int numberOfKeys) { // check arguments validateCounter(counter); int numUnseen = numberOfKeys - counter.size(); if (numUnseen < 1) throw new IllegalArgumentException(String.format("ERROR: numberOfKeys %d must be > size of counter %d!", numberOfKeys, counter.size())); // do smoothing int[][] cc = countCounts2IntArrays(collectCountCounts(counter)); int[] r = cc[0]; // counts int[] n = cc[1]; // counts of counts SimpleGoodTuring sgt = new SimpleGoodTuring(r, n); // collate results Counter<Integer> probsByCount = new ClassicCounter<Integer>(); double[] probs = sgt.getProbabilities(); for (int i = 0; i < probs.length; i++) { probsByCount.setCount(r[i], probs[i]); } // make smoothed distribution Distribution<E> dist = new Distribution<E>(); dist.counter = new ClassicCounter<E>(); for (Map.Entry<E, Double> entry : counter.entrySet()) { E item = entry.getKey(); Integer count = (int) Math.round(entry.getValue()); dist.counter.setCount(item, probsByCount.getCount(count)); } dist.numberOfKeys = numberOfKeys; dist.reservedMass = sgt.getProbabilityForUnseen(); return dist; }
[ "public", "static", "<", "E", ">", "Distribution", "<", "E", ">", "simpleGoodTuring", "(", "Counter", "<", "E", ">", "counter", ",", "int", "numberOfKeys", ")", "{", "// check arguments\r", "validateCounter", "(", "counter", ")", ";", "int", "numUnseen", "=", "numberOfKeys", "-", "counter", ".", "size", "(", ")", ";", "if", "(", "numUnseen", "<", "1", ")", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "\"ERROR: numberOfKeys %d must be > size of counter %d!\"", ",", "numberOfKeys", ",", "counter", ".", "size", "(", ")", ")", ")", ";", "// do smoothing\r", "int", "[", "]", "[", "]", "cc", "=", "countCounts2IntArrays", "(", "collectCountCounts", "(", "counter", ")", ")", ";", "int", "[", "]", "r", "=", "cc", "[", "0", "]", ";", "// counts\r", "int", "[", "]", "n", "=", "cc", "[", "1", "]", ";", "// counts of counts\r", "SimpleGoodTuring", "sgt", "=", "new", "SimpleGoodTuring", "(", "r", ",", "n", ")", ";", "// collate results\r", "Counter", "<", "Integer", ">", "probsByCount", "=", "new", "ClassicCounter", "<", "Integer", ">", "(", ")", ";", "double", "[", "]", "probs", "=", "sgt", ".", "getProbabilities", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "probs", ".", "length", ";", "i", "++", ")", "{", "probsByCount", ".", "setCount", "(", "r", "[", "i", "]", ",", "probs", "[", "i", "]", ")", ";", "}", "// make smoothed distribution\r", "Distribution", "<", "E", ">", "dist", "=", "new", "Distribution", "<", "E", ">", "(", ")", ";", "dist", ".", "counter", "=", "new", "ClassicCounter", "<", "E", ">", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "E", ",", "Double", ">", "entry", ":", "counter", ".", "entrySet", "(", ")", ")", "{", "E", "item", "=", "entry", ".", "getKey", "(", ")", ";", "Integer", "count", "=", "(", "int", ")", "Math", ".", "round", "(", "entry", ".", "getValue", "(", ")", ")", ";", "dist", ".", "counter", ".", "setCount", "(", "item", ",", "probsByCount", ".", "getCount", "(", "count", ")", ")", ";", "}", "dist", ".", "numberOfKeys", "=", "numberOfKeys", ";", "dist", ".", "reservedMass", "=", "sgt", ".", "getProbabilityForUnseen", "(", ")", ";", "return", "dist", ";", "}" ]
Creates a Distribution from the given counter using Gale &amp; Sampsons' "simple Good-Turing" smoothing. @return a new simple Good-Turing smoothed Distribution.
[ "Creates", "a", "Distribution", "from", "the", "given", "counter", "using", "Gale", "&amp", ";", "Sampsons", "simple", "Good", "-", "Turing", "smoothing", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Distribution.java#L450-L483
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Distribution.java
Distribution.dynamicCounterWithDirichletPrior
public static <E> Distribution<E> dynamicCounterWithDirichletPrior(Counter<E> c, Distribution<E> prior, double weight) { double totalWeight = c.totalCount() + weight; Distribution<E> norm = new DynamicDistribution<E>(prior, weight / totalWeight); norm.counter = new ClassicCounter<E>(); // this might be done more efficiently with entrySet but there isn't a way to get // the entrySet from a Counter now. In most cases c will be small(-ish) anyway for (E key : c.keySet()) { double count = c.getCount(key) / totalWeight; prior.addToKeySet(key); norm.counter.setCount(key, count); } norm.numberOfKeys = prior.numberOfKeys; return norm; }
java
public static <E> Distribution<E> dynamicCounterWithDirichletPrior(Counter<E> c, Distribution<E> prior, double weight) { double totalWeight = c.totalCount() + weight; Distribution<E> norm = new DynamicDistribution<E>(prior, weight / totalWeight); norm.counter = new ClassicCounter<E>(); // this might be done more efficiently with entrySet but there isn't a way to get // the entrySet from a Counter now. In most cases c will be small(-ish) anyway for (E key : c.keySet()) { double count = c.getCount(key) / totalWeight; prior.addToKeySet(key); norm.counter.setCount(key, count); } norm.numberOfKeys = prior.numberOfKeys; return norm; }
[ "public", "static", "<", "E", ">", "Distribution", "<", "E", ">", "dynamicCounterWithDirichletPrior", "(", "Counter", "<", "E", ">", "c", ",", "Distribution", "<", "E", ">", "prior", ",", "double", "weight", ")", "{", "double", "totalWeight", "=", "c", ".", "totalCount", "(", ")", "+", "weight", ";", "Distribution", "<", "E", ">", "norm", "=", "new", "DynamicDistribution", "<", "E", ">", "(", "prior", ",", "weight", "/", "totalWeight", ")", ";", "norm", ".", "counter", "=", "new", "ClassicCounter", "<", "E", ">", "(", ")", ";", "// this might be done more efficiently with entrySet but there isn't a way to get\r", "// the entrySet from a Counter now. In most cases c will be small(-ish) anyway\r", "for", "(", "E", "key", ":", "c", ".", "keySet", "(", ")", ")", "{", "double", "count", "=", "c", ".", "getCount", "(", "key", ")", "/", "totalWeight", ";", "prior", ".", "addToKeySet", "(", "key", ")", ";", "norm", ".", "counter", ".", "setCount", "(", "key", ",", "count", ")", ";", "}", "norm", ".", "numberOfKeys", "=", "prior", ".", "numberOfKeys", ";", "return", "norm", ";", "}" ]
Like normalizedCounterWithDirichletPrior except probabilities are computed dynamically from the counter and prior instead of all at once up front. The main advantage of this is if you are making many distributions from relatively sparse counters using the same relatively dense prior, the prior is only represented once, for major memory savings. @param weight multiplier of prior to get "pseudo-count" @return new Distribution
[ "Like", "normalizedCounterWithDirichletPrior", "except", "probabilities", "are", "computed", "dynamically", "from", "the", "counter", "and", "prior", "instead", "of", "all", "at", "once", "up", "front", ".", "The", "main", "advantage", "of", "this", "is", "if", "you", "are", "making", "many", "distributions", "from", "relatively", "sparse", "counters", "using", "the", "same", "relatively", "dense", "prior", "the", "prior", "is", "only", "represented", "once", "for", "major", "memory", "savings", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Distribution.java#L568-L581
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Distribution.java
Distribution.distributionFromLogisticCounter
public static <E> Distribution<E> distributionFromLogisticCounter(Counter<E> cntr) { double expSum = 0.0; int numKeys = 0; for (E key : cntr.keySet()) { expSum += Math.exp(cntr.getCount(key)); numKeys++; } Distribution<E> probs = new Distribution<E>(); probs.counter = new ClassicCounter<E>(); probs.reservedMass = 0.0; probs.numberOfKeys = numKeys; for (E key : cntr.keySet()) { probs.counter.setCount(key, Math.exp(cntr.getCount(key)) / expSum); } return probs; }
java
public static <E> Distribution<E> distributionFromLogisticCounter(Counter<E> cntr) { double expSum = 0.0; int numKeys = 0; for (E key : cntr.keySet()) { expSum += Math.exp(cntr.getCount(key)); numKeys++; } Distribution<E> probs = new Distribution<E>(); probs.counter = new ClassicCounter<E>(); probs.reservedMass = 0.0; probs.numberOfKeys = numKeys; for (E key : cntr.keySet()) { probs.counter.setCount(key, Math.exp(cntr.getCount(key)) / expSum); } return probs; }
[ "public", "static", "<", "E", ">", "Distribution", "<", "E", ">", "distributionFromLogisticCounter", "(", "Counter", "<", "E", ">", "cntr", ")", "{", "double", "expSum", "=", "0.0", ";", "int", "numKeys", "=", "0", ";", "for", "(", "E", "key", ":", "cntr", ".", "keySet", "(", ")", ")", "{", "expSum", "+=", "Math", ".", "exp", "(", "cntr", ".", "getCount", "(", "key", ")", ")", ";", "numKeys", "++", ";", "}", "Distribution", "<", "E", ">", "probs", "=", "new", "Distribution", "<", "E", ">", "(", ")", ";", "probs", ".", "counter", "=", "new", "ClassicCounter", "<", "E", ">", "(", ")", ";", "probs", ".", "reservedMass", "=", "0.0", ";", "probs", ".", "numberOfKeys", "=", "numKeys", ";", "for", "(", "E", "key", ":", "cntr", ".", "keySet", "(", ")", ")", "{", "probs", ".", "counter", ".", "setCount", "(", "key", ",", "Math", ".", "exp", "(", "cntr", ".", "getCount", "(", "key", ")", ")", "/", "expSum", ")", ";", "}", "return", "probs", ";", "}" ]
Maps a counter representing the linear weights of a multiclass logistic regression model to the probabilities of each class.
[ "Maps", "a", "counter", "representing", "the", "linear", "weights", "of", "a", "multiclass", "logistic", "regression", "model", "to", "the", "probabilities", "of", "each", "class", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Distribution.java#L646-L661
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Distribution.java
Distribution.probabilityOf
public double probabilityOf(E key) { if (counter.containsKey(key)) { return counter.getCount(key); } else { int remainingKeys = numberOfKeys - counter.size(); if (remainingKeys <= 0) { return 0.0; } else { return (reservedMass / remainingKeys); } } }
java
public double probabilityOf(E key) { if (counter.containsKey(key)) { return counter.getCount(key); } else { int remainingKeys = numberOfKeys - counter.size(); if (remainingKeys <= 0) { return 0.0; } else { return (reservedMass / remainingKeys); } } }
[ "public", "double", "probabilityOf", "(", "E", "key", ")", "{", "if", "(", "counter", ".", "containsKey", "(", "key", ")", ")", "{", "return", "counter", ".", "getCount", "(", "key", ")", ";", "}", "else", "{", "int", "remainingKeys", "=", "numberOfKeys", "-", "counter", ".", "size", "(", ")", ";", "if", "(", "remainingKeys", "<=", "0", ")", "{", "return", "0.0", ";", "}", "else", "{", "return", "(", "reservedMass", "/", "remainingKeys", ")", ";", "}", "}", "}" ]
Returns the normalized count of the given object. @return the normalized count of the object
[ "Returns", "the", "normalized", "count", "of", "the", "given", "object", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Distribution.java#L687-L698
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_contenttype_binding.java
appfwprofile_contenttype_binding.get
public static appfwprofile_contenttype_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_contenttype_binding obj = new appfwprofile_contenttype_binding(); obj.set_name(name); appfwprofile_contenttype_binding response[] = (appfwprofile_contenttype_binding[]) obj.get_resources(service); return response; }
java
public static appfwprofile_contenttype_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_contenttype_binding obj = new appfwprofile_contenttype_binding(); obj.set_name(name); appfwprofile_contenttype_binding response[] = (appfwprofile_contenttype_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "appfwprofile_contenttype_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appfwprofile_contenttype_binding", "obj", "=", "new", "appfwprofile_contenttype_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "appfwprofile_contenttype_binding", "response", "[", "]", "=", "(", "appfwprofile_contenttype_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch appfwprofile_contenttype_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "appfwprofile_contenttype_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_contenttype_binding.java#L196-L201
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowglobal_appflowpolicy_binding.java
appflowglobal_appflowpolicy_binding.get
public static appflowglobal_appflowpolicy_binding[] get(nitro_service service) throws Exception{ appflowglobal_appflowpolicy_binding obj = new appflowglobal_appflowpolicy_binding(); appflowglobal_appflowpolicy_binding response[] = (appflowglobal_appflowpolicy_binding[]) obj.get_resources(service); return response; }
java
public static appflowglobal_appflowpolicy_binding[] get(nitro_service service) throws Exception{ appflowglobal_appflowpolicy_binding obj = new appflowglobal_appflowpolicy_binding(); appflowglobal_appflowpolicy_binding response[] = (appflowglobal_appflowpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "appflowglobal_appflowpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "appflowglobal_appflowpolicy_binding", "obj", "=", "new", "appflowglobal_appflowpolicy_binding", "(", ")", ";", "appflowglobal_appflowpolicy_binding", "response", "[", "]", "=", "(", "appflowglobal_appflowpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch a appflowglobal_appflowpolicy_binding resources.
[ "Use", "this", "API", "to", "fetch", "a", "appflowglobal_appflowpolicy_binding", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowglobal_appflowpolicy_binding.java#L299-L303
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/basic/locationdata.java
locationdata.clear
public static base_response clear(nitro_service client) throws Exception { locationdata clearresource = new locationdata(); return clearresource.perform_operation(client,"clear"); }
java
public static base_response clear(nitro_service client) throws Exception { locationdata clearresource = new locationdata(); return clearresource.perform_operation(client,"clear"); }
[ "public", "static", "base_response", "clear", "(", "nitro_service", "client", ")", "throws", "Exception", "{", "locationdata", "clearresource", "=", "new", "locationdata", "(", ")", ";", "return", "clearresource", ".", "perform_operation", "(", "client", ",", "\"clear\"", ")", ";", "}" ]
Use this API to clear locationdata.
[ "Use", "this", "API", "to", "clear", "locationdata", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/locationdata.java#L75-L78
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/ssldsakey.java
ssldsakey.create
public static base_response create(nitro_service client, ssldsakey resource) throws Exception { ssldsakey createresource = new ssldsakey(); createresource.keyfile = resource.keyfile; createresource.bits = resource.bits; createresource.keyform = resource.keyform; createresource.des = resource.des; createresource.des3 = resource.des3; createresource.password = resource.password; return createresource.perform_operation(client,"create"); }
java
public static base_response create(nitro_service client, ssldsakey resource) throws Exception { ssldsakey createresource = new ssldsakey(); createresource.keyfile = resource.keyfile; createresource.bits = resource.bits; createresource.keyform = resource.keyform; createresource.des = resource.des; createresource.des3 = resource.des3; createresource.password = resource.password; return createresource.perform_operation(client,"create"); }
[ "public", "static", "base_response", "create", "(", "nitro_service", "client", ",", "ssldsakey", "resource", ")", "throws", "Exception", "{", "ssldsakey", "createresource", "=", "new", "ssldsakey", "(", ")", ";", "createresource", ".", "keyfile", "=", "resource", ".", "keyfile", ";", "createresource", ".", "bits", "=", "resource", ".", "bits", ";", "createresource", ".", "keyform", "=", "resource", ".", "keyform", ";", "createresource", ".", "des", "=", "resource", ".", "des", ";", "createresource", ".", "des3", "=", "resource", ".", "des3", ";", "createresource", ".", "password", "=", "resource", ".", "password", ";", "return", "createresource", ".", "perform_operation", "(", "client", ",", "\"create\"", ")", ";", "}" ]
Use this API to create ssldsakey.
[ "Use", "this", "API", "to", "create", "ssldsakey", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/ssldsakey.java#L216-L225
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/lacp.java
lacp.update
public static base_response update(nitro_service client, lacp resource) throws Exception { lacp updateresource = new lacp(); updateresource.syspriority = resource.syspriority; updateresource.ownernode = resource.ownernode; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, lacp resource) throws Exception { lacp updateresource = new lacp(); updateresource.syspriority = resource.syspriority; updateresource.ownernode = resource.ownernode; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "lacp", "resource", ")", "throws", "Exception", "{", "lacp", "updateresource", "=", "new", "lacp", "(", ")", ";", "updateresource", ".", "syspriority", "=", "resource", ".", "syspriority", ";", "updateresource", ".", "ownernode", "=", "resource", ".", "ownernode", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update lacp.
[ "Use", "this", "API", "to", "update", "lacp", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/lacp.java#L196-L201
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/lacp.java
lacp.update
public static base_responses update(nitro_service client, lacp resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { lacp updateresources[] = new lacp[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new lacp(); updateresources[i].syspriority = resources[i].syspriority; updateresources[i].ownernode = resources[i].ownernode; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, lacp resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { lacp updateresources[] = new lacp[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new lacp(); updateresources[i].syspriority = resources[i].syspriority; updateresources[i].ownernode = resources[i].ownernode; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "lacp", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "lacp", "updateresources", "[", "]", "=", "new", "lacp", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "lacp", "(", ")", ";", "updateresources", "[", "i", "]", ".", "syspriority", "=", "resources", "[", "i", "]", ".", "syspriority", ";", "updateresources", "[", "i", "]", ".", "ownernode", "=", "resources", "[", "i", "]", ".", "ownernode", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update lacp resources.
[ "Use", "this", "API", "to", "update", "lacp", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/lacp.java#L206-L218
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/lacp.java
lacp.get
public static lacp[] get(nitro_service service) throws Exception{ lacp obj = new lacp(); lacp[] response = (lacp[])obj.get_resources(service); return response; }
java
public static lacp[] get(nitro_service service) throws Exception{ lacp obj = new lacp(); lacp[] response = (lacp[])obj.get_resources(service); return response; }
[ "public", "static", "lacp", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "lacp", "obj", "=", "new", "lacp", "(", ")", ";", "lacp", "[", "]", "response", "=", "(", "lacp", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the lacp resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "lacp", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/lacp.java#L223-L227
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/lacp.java
lacp.get
public static lacp get(nitro_service service, Long ownernode) throws Exception{ lacp obj = new lacp(); obj.set_ownernode(ownernode); lacp response = (lacp) obj.get_resource(service); return response; }
java
public static lacp get(nitro_service service, Long ownernode) throws Exception{ lacp obj = new lacp(); obj.set_ownernode(ownernode); lacp response = (lacp) obj.get_resource(service); return response; }
[ "public", "static", "lacp", "get", "(", "nitro_service", "service", ",", "Long", "ownernode", ")", "throws", "Exception", "{", "lacp", "obj", "=", "new", "lacp", "(", ")", ";", "obj", ".", "set_ownernode", "(", "ownernode", ")", ";", "lacp", "response", "=", "(", "lacp", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch lacp resource of given name .
[ "Use", "this", "API", "to", "fetch", "lacp", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/lacp.java#L239-L244
train
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/EnglishGrammaticalRelations.java
EnglishGrammaticalRelations.getConj
public static GrammaticalRelation getConj(String conjunctionString) { GrammaticalRelation result = conjs.get(conjunctionString); if (result == null) { synchronized(conjs) { result = conjs.get(conjunctionString); if (result == null) { result = new GrammaticalRelation(Language.English, "conj", "conj_collapsed", null, CONJUNCT, conjunctionString); conjs.put(conjunctionString, result); threadSafeAddRelation(result); } } } return result; }
java
public static GrammaticalRelation getConj(String conjunctionString) { GrammaticalRelation result = conjs.get(conjunctionString); if (result == null) { synchronized(conjs) { result = conjs.get(conjunctionString); if (result == null) { result = new GrammaticalRelation(Language.English, "conj", "conj_collapsed", null, CONJUNCT, conjunctionString); conjs.put(conjunctionString, result); threadSafeAddRelation(result); } } } return result; }
[ "public", "static", "GrammaticalRelation", "getConj", "(", "String", "conjunctionString", ")", "{", "GrammaticalRelation", "result", "=", "conjs", ".", "get", "(", "conjunctionString", ")", ";", "if", "(", "result", "==", "null", ")", "{", "synchronized", "(", "conjs", ")", "{", "result", "=", "conjs", ".", "get", "(", "conjunctionString", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "new", "GrammaticalRelation", "(", "Language", ".", "English", ",", "\"conj\"", ",", "\"conj_collapsed\"", ",", "null", ",", "CONJUNCT", ",", "conjunctionString", ")", ";", "conjs", ".", "put", "(", "conjunctionString", ",", "result", ")", ";", "threadSafeAddRelation", "(", "result", ")", ";", "}", "}", "}", "return", "result", ";", "}" ]
The "conj" grammatical relation. Used to collapse conjunct relations. They will be turned into conj_word, where "word" is a conjunction. NOTE: Because these relations lack associated GrammaticalRelationAnnotations, they cannot be arcs of a TreeGraphNode. @param conjunctionString The conjunction to make a GrammaticalRelation out of @return A grammatical relation for this conjunction
[ "The", "conj", "grammatical", "relation", ".", "Used", "to", "collapse", "conjunct", "relations", ".", "They", "will", "be", "turned", "into", "conj_word", "where", "word", "is", "a", "conjunction", "." ]
b3d44bab9ec07ace0d13612c448a6b7298c1f681
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/EnglishGrammaticalRelations.java#L1589-L1602
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java
nat64.add
public static base_response add(nitro_service client, nat64 resource) throws Exception { nat64 addresource = new nat64(); addresource.name = resource.name; addresource.acl6name = resource.acl6name; addresource.netprofile = resource.netprofile; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, nat64 resource) throws Exception { nat64 addresource = new nat64(); addresource.name = resource.name; addresource.acl6name = resource.acl6name; addresource.netprofile = resource.netprofile; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "nat64", "resource", ")", "throws", "Exception", "{", "nat64", "addresource", "=", "new", "nat64", "(", ")", ";", "addresource", ".", "name", "=", "resource", ".", "name", ";", "addresource", ".", "acl6name", "=", "resource", ".", "acl6name", ";", "addresource", ".", "netprofile", "=", "resource", ".", "netprofile", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add nat64.
[ "Use", "this", "API", "to", "add", "nat64", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java#L131-L137
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java
nat64.add
public static base_responses add(nitro_service client, nat64 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nat64 addresources[] = new nat64[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nat64(); addresources[i].name = resources[i].name; addresources[i].acl6name = resources[i].acl6name; addresources[i].netprofile = resources[i].netprofile; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, nat64 resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nat64 addresources[] = new nat64[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nat64(); addresources[i].name = resources[i].name; addresources[i].acl6name = resources[i].acl6name; addresources[i].netprofile = resources[i].netprofile; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "nat64", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nat64", "addresources", "[", "]", "=", "new", "nat64", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "nat64", "(", ")", ";", "addresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "addresources", "[", "i", "]", ".", "acl6name", "=", "resources", "[", "i", "]", ".", "acl6name", ";", "addresources", "[", "i", "]", ".", "netprofile", "=", "resources", "[", "i", "]", ".", "netprofile", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add nat64 resources.
[ "Use", "this", "API", "to", "add", "nat64", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java#L142-L155
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java
nat64.update
public static base_response update(nitro_service client, nat64 resource) throws Exception { nat64 updateresource = new nat64(); updateresource.name = resource.name; updateresource.acl6name = resource.acl6name; updateresource.netprofile = resource.netprofile; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, nat64 resource) throws Exception { nat64 updateresource = new nat64(); updateresource.name = resource.name; updateresource.acl6name = resource.acl6name; updateresource.netprofile = resource.netprofile; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "nat64", "resource", ")", "throws", "Exception", "{", "nat64", "updateresource", "=", "new", "nat64", "(", ")", ";", "updateresource", ".", "name", "=", "resource", ".", "name", ";", "updateresource", ".", "acl6name", "=", "resource", ".", "acl6name", ";", "updateresource", ".", "netprofile", "=", "resource", ".", "netprofile", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update nat64.
[ "Use", "this", "API", "to", "update", "nat64", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java#L160-L166
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java
nat64.get
public static nat64[] get(nitro_service service) throws Exception{ nat64 obj = new nat64(); nat64[] response = (nat64[])obj.get_resources(service); return response; }
java
public static nat64[] get(nitro_service service) throws Exception{ nat64 obj = new nat64(); nat64[] response = (nat64[])obj.get_resources(service); return response; }
[ "public", "static", "nat64", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "nat64", "obj", "=", "new", "nat64", "(", ")", ";", "nat64", "[", "]", "response", "=", "(", "nat64", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nat64 resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nat64", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java#L283-L287
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java
nat64.get
public static nat64 get(nitro_service service, String name) throws Exception{ nat64 obj = new nat64(); obj.set_name(name); nat64 response = (nat64) obj.get_resource(service); return response; }
java
public static nat64 get(nitro_service service, String name) throws Exception{ nat64 obj = new nat64(); obj.set_name(name); nat64 response = (nat64) obj.get_resource(service); return response; }
[ "public", "static", "nat64", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "nat64", "obj", "=", "new", "nat64", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "nat64", "response", "=", "(", "nat64", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch nat64 resource of given name .
[ "Use", "this", "API", "to", "fetch", "nat64", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nat64.java#L299-L304
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java
nstimer.add
public static base_response add(nitro_service client, nstimer resource) throws Exception { nstimer addresource = new nstimer(); addresource.name = resource.name; addresource.interval = resource.interval; addresource.unit = resource.unit; addresource.comment = resource.comment; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, nstimer resource) throws Exception { nstimer addresource = new nstimer(); addresource.name = resource.name; addresource.interval = resource.interval; addresource.unit = resource.unit; addresource.comment = resource.comment; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "nstimer", "resource", ")", "throws", "Exception", "{", "nstimer", "addresource", "=", "new", "nstimer", "(", ")", ";", "addresource", ".", "name", "=", "resource", ".", "name", ";", "addresource", ".", "interval", "=", "resource", ".", "interval", ";", "addresource", ".", "unit", "=", "resource", ".", "unit", ";", "addresource", ".", "comment", "=", "resource", ".", "comment", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add nstimer.
[ "Use", "this", "API", "to", "add", "nstimer", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java#L178-L185
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java
nstimer.add
public static base_responses add(nitro_service client, nstimer resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nstimer addresources[] = new nstimer[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nstimer(); addresources[i].name = resources[i].name; addresources[i].interval = resources[i].interval; addresources[i].unit = resources[i].unit; addresources[i].comment = resources[i].comment; } result = add_bulk_request(client, addresources); } return result; }
java
public static base_responses add(nitro_service client, nstimer resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nstimer addresources[] = new nstimer[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nstimer(); addresources[i].name = resources[i].name; addresources[i].interval = resources[i].interval; addresources[i].unit = resources[i].unit; addresources[i].comment = resources[i].comment; } result = add_bulk_request(client, addresources); } return result; }
[ "public", "static", "base_responses", "add", "(", "nitro_service", "client", ",", "nstimer", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nstimer", "addresources", "[", "]", "=", "new", "nstimer", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "addresources", "[", "i", "]", "=", "new", "nstimer", "(", ")", ";", "addresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "addresources", "[", "i", "]", ".", "interval", "=", "resources", "[", "i", "]", ".", "interval", ";", "addresources", "[", "i", "]", ".", "unit", "=", "resources", "[", "i", "]", ".", "unit", ";", "addresources", "[", "i", "]", ".", "comment", "=", "resources", "[", "i", "]", ".", "comment", ";", "}", "result", "=", "add_bulk_request", "(", "client", ",", "addresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to add nstimer resources.
[ "Use", "this", "API", "to", "add", "nstimer", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java#L190-L204
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java
nstimer.update
public static base_response update(nitro_service client, nstimer resource) throws Exception { nstimer updateresource = new nstimer(); updateresource.name = resource.name; updateresource.interval = resource.interval; updateresource.unit = resource.unit; updateresource.comment = resource.comment; return updateresource.update_resource(client); }
java
public static base_response update(nitro_service client, nstimer resource) throws Exception { nstimer updateresource = new nstimer(); updateresource.name = resource.name; updateresource.interval = resource.interval; updateresource.unit = resource.unit; updateresource.comment = resource.comment; return updateresource.update_resource(client); }
[ "public", "static", "base_response", "update", "(", "nitro_service", "client", ",", "nstimer", "resource", ")", "throws", "Exception", "{", "nstimer", "updateresource", "=", "new", "nstimer", "(", ")", ";", "updateresource", ".", "name", "=", "resource", ".", "name", ";", "updateresource", ".", "interval", "=", "resource", ".", "interval", ";", "updateresource", ".", "unit", "=", "resource", ".", "unit", ";", "updateresource", ".", "comment", "=", "resource", ".", "comment", ";", "return", "updateresource", ".", "update_resource", "(", "client", ")", ";", "}" ]
Use this API to update nstimer.
[ "Use", "this", "API", "to", "update", "nstimer", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java#L259-L266
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java
nstimer.update
public static base_responses update(nitro_service client, nstimer resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nstimer updateresources[] = new nstimer[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nstimer(); updateresources[i].name = resources[i].name; updateresources[i].interval = resources[i].interval; updateresources[i].unit = resources[i].unit; updateresources[i].comment = resources[i].comment; } result = update_bulk_request(client, updateresources); } return result; }
java
public static base_responses update(nitro_service client, nstimer resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nstimer updateresources[] = new nstimer[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nstimer(); updateresources[i].name = resources[i].name; updateresources[i].interval = resources[i].interval; updateresources[i].unit = resources[i].unit; updateresources[i].comment = resources[i].comment; } result = update_bulk_request(client, updateresources); } return result; }
[ "public", "static", "base_responses", "update", "(", "nitro_service", "client", ",", "nstimer", "resources", "[", "]", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nstimer", "updateresources", "[", "]", "=", "new", "nstimer", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "updateresources", "[", "i", "]", "=", "new", "nstimer", "(", ")", ";", "updateresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "updateresources", "[", "i", "]", ".", "interval", "=", "resources", "[", "i", "]", ".", "interval", ";", "updateresources", "[", "i", "]", ".", "unit", "=", "resources", "[", "i", "]", ".", "unit", ";", "updateresources", "[", "i", "]", ".", "comment", "=", "resources", "[", "i", "]", ".", "comment", ";", "}", "result", "=", "update_bulk_request", "(", "client", ",", "updateresources", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to update nstimer resources.
[ "Use", "this", "API", "to", "update", "nstimer", "resources", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java#L271-L285
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java
nstimer.unset
public static base_response unset(nitro_service client, nstimer resource, String[] args) throws Exception{ nstimer unsetresource = new nstimer(); unsetresource.name = resource.name; unsetresource.interval = resource.interval; unsetresource.unit = resource.unit; unsetresource.comment = resource.comment; return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, nstimer resource, String[] args) throws Exception{ nstimer unsetresource = new nstimer(); unsetresource.name = resource.name; unsetresource.interval = resource.interval; unsetresource.unit = resource.unit; unsetresource.comment = resource.comment; return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "nstimer", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "nstimer", "unsetresource", "=", "new", "nstimer", "(", ")", ";", "unsetresource", ".", "name", "=", "resource", ".", "name", ";", "unsetresource", ".", "interval", "=", "resource", ".", "interval", ";", "unsetresource", ".", "unit", "=", "resource", ".", "unit", ";", "unsetresource", ".", "comment", "=", "resource", ".", "comment", ";", "return", "unsetresource", ".", "unset_resource", "(", "client", ",", "args", ")", ";", "}" ]
Use this API to unset the properties of nstimer resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "nstimer", "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/ns/nstimer.java#L301-L308
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java
nstimer.unset
public static base_responses unset(nitro_service client, nstimer resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nstimer unsetresources[] = new nstimer[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new nstimer(); unsetresources[i].name = resources[i].name; unsetresources[i].interval = resources[i].interval; unsetresources[i].unit = resources[i].unit; unsetresources[i].comment = resources[i].comment; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
public static base_responses unset(nitro_service client, nstimer resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nstimer unsetresources[] = new nstimer[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new nstimer(); unsetresources[i].name = resources[i].name; unsetresources[i].interval = resources[i].interval; unsetresources[i].unit = resources[i].unit; unsetresources[i].comment = resources[i].comment; } result = unset_bulk_request(client, unsetresources,args); } return result; }
[ "public", "static", "base_responses", "unset", "(", "nitro_service", "client", ",", "nstimer", "resources", "[", "]", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "base_responses", "result", "=", "null", ";", "if", "(", "resources", "!=", "null", "&&", "resources", ".", "length", ">", "0", ")", "{", "nstimer", "unsetresources", "[", "]", "=", "new", "nstimer", "[", "resources", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "resources", ".", "length", ";", "i", "++", ")", "{", "unsetresources", "[", "i", "]", "=", "new", "nstimer", "(", ")", ";", "unsetresources", "[", "i", "]", ".", "name", "=", "resources", "[", "i", "]", ".", "name", ";", "unsetresources", "[", "i", "]", ".", "interval", "=", "resources", "[", "i", "]", ".", "interval", ";", "unsetresources", "[", "i", "]", ".", "unit", "=", "resources", "[", "i", "]", ".", "unit", ";", "unsetresources", "[", "i", "]", ".", "comment", "=", "resources", "[", "i", "]", ".", "comment", ";", "}", "result", "=", "unset_bulk_request", "(", "client", ",", "unsetresources", ",", "args", ")", ";", "}", "return", "result", ";", "}" ]
Use this API to unset the properties of nstimer resources. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "nstimer", "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/ns/nstimer.java#L331-L345
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java
nstimer.get
public static nstimer[] get(nitro_service service) throws Exception{ nstimer obj = new nstimer(); nstimer[] response = (nstimer[])obj.get_resources(service); return response; }
java
public static nstimer[] get(nitro_service service) throws Exception{ nstimer obj = new nstimer(); nstimer[] response = (nstimer[])obj.get_resources(service); return response; }
[ "public", "static", "nstimer", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "nstimer", "obj", "=", "new", "nstimer", "(", ")", ";", "nstimer", "[", "]", "response", "=", "(", "nstimer", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch all the nstimer resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nstimer", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java#L368-L372
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java
nstimer.get
public static nstimer get(nitro_service service, String name) throws Exception{ nstimer obj = new nstimer(); obj.set_name(name); nstimer response = (nstimer) obj.get_resource(service); return response; }
java
public static nstimer get(nitro_service service, String name) throws Exception{ nstimer obj = new nstimer(); obj.set_name(name); nstimer response = (nstimer) obj.get_resource(service); return response; }
[ "public", "static", "nstimer", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "nstimer", "obj", "=", "new", "nstimer", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "nstimer", "response", "=", "(", "nstimer", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch nstimer resource of given name .
[ "Use", "this", "API", "to", "fetch", "nstimer", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nstimer.java#L384-L389
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_appfwpolicy_binding.java
appfwpolicylabel_appfwpolicy_binding.get
public static appfwpolicylabel_appfwpolicy_binding[] get(nitro_service service, String labelname) throws Exception{ appfwpolicylabel_appfwpolicy_binding obj = new appfwpolicylabel_appfwpolicy_binding(); obj.set_labelname(labelname); appfwpolicylabel_appfwpolicy_binding response[] = (appfwpolicylabel_appfwpolicy_binding[]) obj.get_resources(service); return response; }
java
public static appfwpolicylabel_appfwpolicy_binding[] get(nitro_service service, String labelname) throws Exception{ appfwpolicylabel_appfwpolicy_binding obj = new appfwpolicylabel_appfwpolicy_binding(); obj.set_labelname(labelname); appfwpolicylabel_appfwpolicy_binding response[] = (appfwpolicylabel_appfwpolicy_binding[]) obj.get_resources(service); return response; }
[ "public", "static", "appfwpolicylabel_appfwpolicy_binding", "[", "]", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "appfwpolicylabel_appfwpolicy_binding", "obj", "=", "new", "appfwpolicylabel_appfwpolicy_binding", "(", ")", ";", "obj", ".", "set_labelname", "(", "labelname", ")", ";", "appfwpolicylabel_appfwpolicy_binding", "response", "[", "]", "=", "(", "appfwpolicylabel_appfwpolicy_binding", "[", "]", ")", "obj", ".", "get_resources", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch appfwpolicylabel_appfwpolicy_binding resources of given name .
[ "Use", "this", "API", "to", "fetch", "appfwpolicylabel_appfwpolicy_binding", "resources", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_appfwpolicy_binding.java#L283-L288
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditnslogpolicy_binding.java
auditnslogpolicy_binding.get
public static auditnslogpolicy_binding get(nitro_service service, String name) throws Exception{ auditnslogpolicy_binding obj = new auditnslogpolicy_binding(); obj.set_name(name); auditnslogpolicy_binding response = (auditnslogpolicy_binding) obj.get_resource(service); return response; }
java
public static auditnslogpolicy_binding get(nitro_service service, String name) throws Exception{ auditnslogpolicy_binding obj = new auditnslogpolicy_binding(); obj.set_name(name); auditnslogpolicy_binding response = (auditnslogpolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "auditnslogpolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "auditnslogpolicy_binding", "obj", "=", "new", "auditnslogpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "auditnslogpolicy_binding", "response", "=", "(", "auditnslogpolicy_binding", ")", "obj", ".", "get_resource", "(", "service", ")", ";", "return", "response", ";", "}" ]
Use this API to fetch auditnslogpolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "auditnslogpolicy_binding", "resource", "of", "given", "name", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditnslogpolicy_binding.java#L202-L207
train
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java
filterhtmlinjectionvariable.add
public static base_response add(nitro_service client, filterhtmlinjectionvariable resource) throws Exception { filterhtmlinjectionvariable addresource = new filterhtmlinjectionvariable(); addresource.variable = resource.variable; addresource.value = resource.value; return addresource.add_resource(client); }
java
public static base_response add(nitro_service client, filterhtmlinjectionvariable resource) throws Exception { filterhtmlinjectionvariable addresource = new filterhtmlinjectionvariable(); addresource.variable = resource.variable; addresource.value = resource.value; return addresource.add_resource(client); }
[ "public", "static", "base_response", "add", "(", "nitro_service", "client", ",", "filterhtmlinjectionvariable", "resource", ")", "throws", "Exception", "{", "filterhtmlinjectionvariable", "addresource", "=", "new", "filterhtmlinjectionvariable", "(", ")", ";", "addresource", ".", "variable", "=", "resource", ".", "variable", ";", "addresource", ".", "value", "=", "resource", ".", "value", ";", "return", "addresource", ".", "add_resource", "(", "client", ")", ";", "}" ]
Use this API to add filterhtmlinjectionvariable.
[ "Use", "this", "API", "to", "add", "filterhtmlinjectionvariable", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterhtmlinjectionvariable.java#L135-L140
train