_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q12200 | lbmetrictable_metric_binding.count | train | public static long count(nitro_service service, String metrictable) throws Exception{
lbmetrictable_metric_binding obj = new lbmetrictable_metric_binding();
obj.set_metrictable(metrictable);
options option = new options();
option.set_count(true);
lbmetrictable_metric_binding response[] = (lbmetrictable_metric... | java | {
"resource": ""
} |
q12201 | appflowpolicy.get | train | public static appflowpolicy[] get(nitro_service service) throws Exception{
appflowpolicy obj = new appflowpolicy();
appflowpolicy[] response = (appflowpolicy[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12202 | appflowpolicy.get | train | public static appflowpolicy get(nitro_service service, String name) throws Exception{
appflowpolicy obj = new appflowpolicy();
obj.set_name(name);
appflowpolicy response = (appflowpolicy) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12203 | appflowpolicy.get_filtered | train | public static appflowpolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
appflowpolicy obj = new appflowpolicy();
options option = new options();
option.set_filter(filter);
appflowpolicy[] response = (appflowpolicy[]) obj.getfiltered(service, option);
return response;
} | java | {
"resource": ""
} |
q12204 | CacheData.create | train | public boolean create() {
if (!exists()) {
node = mobicentsCache.getJBossCache().getRoot().addChild(nodeFqn);
if (doTraceLogs) {
logger.trace("created cache node "+nodeFqn);
}
return true;
}
else {
return false;
}
} | java | {
"resource": ""
} |
q12205 | CacheData.remove | train | public boolean remove() {
if (exists() && !isRemoved()) {
isRemoved = true;
node.getParent().removeChild(nodeFqn.getLastElement());
if (doTraceLogs) {
logger.trace("removed cache node "+nodeFqn);
}
return true;
}
else {
return false;
}
} | java | {
"resource": ""
} |
q12206 | auditsyslogpolicy_vpnvserver_binding.get | train | public static auditsyslogpolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{
auditsyslogpolicy_vpnvserver_binding obj = new auditsyslogpolicy_vpnvserver_binding();
obj.set_name(name);
auditsyslogpolicy_vpnvserver_binding response[] = (auditsyslogpolicy_vpnvserver_binding[]) obj.g... | java | {
"resource": ""
} |
q12207 | filterpostbodyinjection.update | train | public static base_response update(nitro_service client, filterpostbodyinjection resource) throws Exception {
filterpostbodyinjection updateresource = new filterpostbodyinjection();
updateresource.postbody = resource.postbody;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q12208 | filterpostbodyinjection.unset | train | public static base_response unset(nitro_service client, filterpostbodyinjection resource, String[] args) throws Exception{
filterpostbodyinjection unsetresource = new filterpostbodyinjection();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q12209 | filterpostbodyinjection.get | train | public static filterpostbodyinjection get(nitro_service service) throws Exception{
filterpostbodyinjection obj = new filterpostbodyinjection();
filterpostbodyinjection[] response = (filterpostbodyinjection[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12210 | vrid6_binding.get | train | public static vrid6_binding get(nitro_service service, Long id) throws Exception{
vrid6_binding obj = new vrid6_binding();
obj.set_id(id);
vrid6_binding response = (vrid6_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12211 | ipsecparameter.update | train | public static base_response update(nitro_service client, ipsecparameter resource) throws Exception {
ipsecparameter updateresource = new ipsecparameter();
updateresource.ikeversion = resource.ikeversion;
updateresource.encalgo = resource.encalgo;
updateresource.hashalgo = resource.hashalgo;
updateresource.lif... | java | {
"resource": ""
} |
q12212 | ipsecparameter.unset | train | public static base_response unset(nitro_service client, ipsecparameter resource, String[] args) throws Exception{
ipsecparameter unsetresource = new ipsecparameter();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q12213 | ipsecparameter.get | train | public static ipsecparameter get(nitro_service service) throws Exception{
ipsecparameter obj = new ipsecparameter();
ipsecparameter[] response = (ipsecparameter[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12214 | nstcpparam.update | train | public static base_response update(nitro_service client, nstcpparam resource) throws Exception {
nstcpparam updateresource = new nstcpparam();
updateresource.ws = resource.ws;
updateresource.wsval = resource.wsval;
updateresource.sack = resource.sack;
updateresource.learnvsvrmss = resource.learnvsvrmss;
upd... | java | {
"resource": ""
} |
q12215 | nstcpparam.unset | train | public static base_response unset(nitro_service client, nstcpparam resource, String[] args) throws Exception{
nstcpparam unsetresource = new nstcpparam();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q12216 | nstcpparam.get | train | public static nstcpparam get(nitro_service service) throws Exception{
nstcpparam obj = new nstcpparam();
nstcpparam[] response = (nstcpparam[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12217 | MtasBitOutputStream.writeBit | train | public void writeBit(int value, int number) throws IOException {
int localNumber = number;
while (localNumber > 0) {
localNumber--;
bitBuffer |= ((value & 1) << bitCount++);
if (bitCount == 8) {
createByte();
}
}
} | java | {
"resource": ""
} |
q12218 | MtasBitOutputStream.writeEliasGammaCodingPositiveInteger | train | public void writeEliasGammaCodingPositiveInteger(int value)
throws IOException {
if (value > 0) {
if (value == 1) {
writeBit(1);
} else {
writeBit(0);
writeEliasGammaCodingPositiveInteger(value / 2);
writeBit(value % 2);
}
}
} | java | {
"resource": ""
} |
q12219 | nspbr_stats.get | train | public static nspbr_stats[] get(nitro_service service) throws Exception{
nspbr_stats obj = new nspbr_stats();
nspbr_stats[] response = (nspbr_stats[])obj.stat_resources(service);
return response;
} | java | {
"resource": ""
} |
q12220 | nspbr_stats.get | train | public static nspbr_stats get(nitro_service service, String name) throws Exception{
nspbr_stats obj = new nspbr_stats();
obj.set_name(name);
nspbr_stats response = (nspbr_stats) obj.stat_resource(service);
return response;
} | java | {
"resource": ""
} |
q12221 | nstimer_autoscalepolicy_binding.get | train | public static nstimer_autoscalepolicy_binding[] get(nitro_service service, String name) throws Exception{
nstimer_autoscalepolicy_binding obj = new nstimer_autoscalepolicy_binding();
obj.set_name(name);
nstimer_autoscalepolicy_binding response[] = (nstimer_autoscalepolicy_binding[]) obj.get_resources(service);
... | java | {
"resource": ""
} |
q12222 | lbwlm_binding.get | train | public static lbwlm_binding get(nitro_service service, String wlmname) throws Exception{
lbwlm_binding obj = new lbwlm_binding();
obj.set_wlmname(wlmname);
lbwlm_binding response = (lbwlm_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12223 | protocolipv6_stats.get | train | public static protocolipv6_stats get(nitro_service service) throws Exception{
protocolipv6_stats obj = new protocolipv6_stats();
protocolipv6_stats[] response = (protocolipv6_stats[])obj.stat_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12224 | authorizationpolicy_csvserver_binding.get | train | public static authorizationpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
authorizationpolicy_csvserver_binding obj = new authorizationpolicy_csvserver_binding();
obj.set_name(name);
authorizationpolicy_csvserver_binding response[] = (authorizationpolicy_csvserver_binding[]) ... | java | {
"resource": ""
} |
q12225 | cachepolicy_binding.get | train | public static cachepolicy_binding get(nitro_service service, String policyname) throws Exception{
cachepolicy_binding obj = new cachepolicy_binding();
obj.set_policyname(policyname);
cachepolicy_binding response = (cachepolicy_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12226 | cachepolicy_binding.get | train | public static cachepolicy_binding[] get(nitro_service service, String policyname[]) throws Exception{
if (policyname !=null && policyname.length>0) {
cachepolicy_binding response[] = new cachepolicy_binding[policyname.length];
cachepolicy_binding obj[] = new cachepolicy_binding[policyname.length];
for (int i... | java | {
"resource": ""
} |
q12227 | TreePrint.getCollocationProcessedTree | train | private static synchronized Tree getCollocationProcessedTree(Tree tree,
HeadFinder hf) {
if (wnc == null) {
try {
Class<?> cl = Class.forName("edu.stanford.nlp.trees.WordNetInstance");
wnc = (WordNetConnection) cl.newInstance(... | java | {
"resource": ""
} |
q12228 | nshardware.get | train | public static nshardware get(nitro_service service) throws Exception{
nshardware obj = new nshardware();
nshardware[] response = (nshardware[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12229 | systemuser_systemgroup_binding.get | train | public static systemuser_systemgroup_binding[] get(nitro_service service, String username) throws Exception{
systemuser_systemgroup_binding obj = new systemuser_systemgroup_binding();
obj.set_username(username);
systemuser_systemgroup_binding response[] = (systemuser_systemgroup_binding[]) obj.get_resources(servi... | java | {
"resource": ""
} |
q12230 | authorizationpolicy_authorizationpolicylabel_binding.get | train | public static authorizationpolicy_authorizationpolicylabel_binding[] get(nitro_service service, String name) throws Exception{
authorizationpolicy_authorizationpolicylabel_binding obj = new authorizationpolicy_authorizationpolicylabel_binding();
obj.set_name(name);
authorizationpolicy_authorizationpolicylabel_bin... | java | {
"resource": ""
} |
q12231 | AbstractEval.precision | train | protected static double precision(Set<?> s1, Set<?> s2) {
double n = 0.0;
double p = 0.0;
for (Object o1 : s1) {
if (s2.contains(o1)) {
p += 1.0;
}
if (DEBUG) {
if (s2.contains(o1)) {
System.err.println("Eval Found: "+o1);
} else {
Sys... | java | {
"resource": ""
} |
q12232 | NondominatedSortingPopulation.invertedCompare | train | public static int invertedCompare(Solution s1, Solution s2) {
int flag = InvertedCompareUtils.RankCompare(s1, s2);
if (flag == 0)
{
flag = InvertedCompareUtils.CrowdingDistanceCompare(s1, s2);
}
return flag;
} | java | {
"resource": ""
} |
q12233 | rnat6_binding.get | train | public static rnat6_binding get(nitro_service service, String name) throws Exception{
rnat6_binding obj = new rnat6_binding();
obj.set_name(name);
rnat6_binding response = (rnat6_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12234 | cachepolicy_csvserver_binding.get | train | public static cachepolicy_csvserver_binding[] get(nitro_service service, String policyname) throws Exception{
cachepolicy_csvserver_binding obj = new cachepolicy_csvserver_binding();
obj.set_policyname(policyname);
cachepolicy_csvserver_binding response[] = (cachepolicy_csvserver_binding[]) obj.get_resources(serv... | java | {
"resource": ""
} |
q12235 | dnspolicy64_binding.get | train | public static dnspolicy64_binding get(nitro_service service, String name) throws Exception{
dnspolicy64_binding obj = new dnspolicy64_binding();
obj.set_name(name);
dnspolicy64_binding response = (dnspolicy64_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12236 | appfwpolicy_binding.get | train | public static appfwpolicy_binding get(nitro_service service, String name) throws Exception{
appfwpolicy_binding obj = new appfwpolicy_binding();
obj.set_name(name);
appfwpolicy_binding response = (appfwpolicy_binding) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12237 | IdentityHashSet.writeObject | train | private void writeObject(ObjectOutputStream s) throws IOException {
Iterator<E> it = iterator();
s.writeInt(size() * 2); // expectedMaxSize
s.writeInt(size());
while (it.hasNext())
s.writeObject(it.next());
} | java | {
"resource": ""
} |
q12238 | IdentityHashSet.readObject | train | private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
int size, expectedMaxSize;
Object o;
expectedMaxSize = s.readInt();
size = s.readInt();
map = new IdentityHashMap<E, Boolean>(expectedMaxSize);
for (int i = 0; i < size; i++) {
o = s.r... | java | {
"resource": ""
} |
q12239 | CGMinimizer.lineMinimize | train | double[] lineMinimize(DiffFunction function, double[] initial, double[] direction) {
// make a 1-dim function along the direction line
// THIS IS A HACK (but it's the NRiC peoples' hack)
OneDimDiffFunction oneDim = new OneDimDiffFunction(function, initial, direction);
// do a 1-dim line min on this ... | java | {
"resource": ""
} |
q12240 | sslpolicy.add | train | public static base_response add(nitro_service client, sslpolicy resource) throws Exception {
sslpolicy addresource = new sslpolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.reqaction = resource.reqaction;
addresource.action = resource.action;
addresource.undefaction ... | java | {
"resource": ""
} |
q12241 | sslpolicy.get | train | public static sslpolicy[] get(nitro_service service) throws Exception{
sslpolicy obj = new sslpolicy();
sslpolicy[] response = (sslpolicy[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12242 | sslpolicy.get | train | public static sslpolicy get(nitro_service service, String name) throws Exception{
sslpolicy obj = new sslpolicy();
obj.set_name(name);
sslpolicy response = (sslpolicy) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12243 | systemgroup_systemuser_binding.get | train | public static systemgroup_systemuser_binding[] get(nitro_service service, String groupname) throws Exception{
systemgroup_systemuser_binding obj = new systemgroup_systemuser_binding();
obj.set_groupname(groupname);
systemgroup_systemuser_binding response[] = (systemgroup_systemuser_binding[]) obj.get_resources(se... | java | {
"resource": ""
} |
q12244 | nsconnectiontable.get | train | public static nsconnectiontable[] get(nitro_service service) throws Exception{
nsconnectiontable obj = new nsconnectiontable();
nsconnectiontable[] response = (nsconnectiontable[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12245 | nsconnectiontable.get | train | public static nsconnectiontable[] get(nitro_service service, nsconnectiontable_args args) throws Exception{
nsconnectiontable obj = new nsconnectiontable();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
nsconnectiontable[] response = (nsconnectiontable[])obj.g... | java | {
"resource": ""
} |
q12246 | AnnotationLookup.getCoreKey | train | public static KeyLookup getCoreKey(String oldKey) {
for (KeyLookup lookup : KeyLookup.values()) {
if (lookup.oldKey.equals(oldKey)) {
return lookup;
}
}
return null;
} | java | {
"resource": ""
} |
q12247 | AnnotationLookup.getValueType | train | @SuppressWarnings("unchecked")
public static Class<?> getValueType(Class<? extends CoreAnnotation> key) {
Class type = valueCache.get(key);
if (type == null) {
try {
type = key.newInstance().getType();
} catch (Exception e) {
throw new RuntimeException("Unexpected failure to... | java | {
"resource": ""
} |
q12248 | policypatset.add | train | public static base_response add(nitro_service client, policypatset resource) throws Exception {
policypatset addresource = new policypatset();
addresource.name = resource.name;
addresource.indextype = resource.indextype;
return addresource.add_resource(client);
} | java | {
"resource": ""
} |
q12249 | policypatset.get | train | public static policypatset[] get(nitro_service service) throws Exception{
policypatset obj = new policypatset();
policypatset[] response = (policypatset[])obj.get_resources(service);
return response;
} | java | {
"resource": ""
} |
q12250 | policypatset.get | train | public static policypatset get(nitro_service service, String name) throws Exception{
policypatset obj = new policypatset();
obj.set_name(name);
policypatset response = (policypatset) obj.get_resource(service);
return response;
} | java | {
"resource": ""
} |
q12251 | policypatset.get_filtered | train | public static policypatset[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
policypatset obj = new policypatset();
options option = new options();
option.set_filter(filter);
policypatset[] response = (policypatset[]) obj.getfiltered(service, option);
return response;
} | java | {
"resource": ""
} |
q12252 | filterpolicy_filterglobal_binding.get | train | public static filterpolicy_filterglobal_binding[] get(nitro_service service, String name) throws Exception{
filterpolicy_filterglobal_binding obj = new filterpolicy_filterglobal_binding();
obj.set_name(name);
filterpolicy_filterglobal_binding response[] = (filterpolicy_filterglobal_binding[]) obj.get_resources(se... | java | {
"resource": ""
} |
q12253 | nstcpbufparam.update | train | public static base_response update(nitro_service client, nstcpbufparam resource) throws Exception {
nstcpbufparam updateresource = new nstcpbufparam();
updateresource.size = resource.size;
updateresource.memlimit = resource.memlimit;
return updateresource.update_resource(client);
} | java | {
"resource": ""
} |
q12254 | nstcpbufparam.unset | train | public static base_response unset(nitro_service client, nstcpbufparam resource, String[] args) throws Exception{
nstcpbufparam unsetresource = new nstcpbufparam();
return unsetresource.unset_resource(client,args);
} | java | {
"resource": ""
} |
q12255 | nstcpbufparam.get | train | public static nstcpbufparam get(nitro_service service) throws Exception{
nstcpbufparam obj = new nstcpbufparam();
nstcpbufparam[] response = (nstcpbufparam[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12256 | MtasDataCollector.increaseNewListSize | train | @SuppressWarnings("unchecked")
protected void increaseNewListSize() throws IOException {
if (!closed) {
String[] tmpNewKeyList = newKeyList;
int[] tmpNewSourceNumberList = newSourceNumberList;
int[] tmpNewErrorNumber = newErrorNumber;
HashMap<String, Integer>[] tmpNewErrorList = newErrorLi... | java | {
"resource": ""
} |
q12257 | MtasDataCollector.closeSegmentKeyValueRegistration | train | 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 :... | java | {
"resource": ""
} |
q12258 | MtasDataCollector.recomputeSegmentKeys | train | 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.equal... | java | {
"resource": ""
} |
q12259 | MtasDataCollector.validateWithSegmentBoundary | train | protected boolean validateWithSegmentBoundary(T1 value) throws IOException {
if (!closed && segmentRegistration != null) {
T1 tmpSegmentValueBoundary = segmentValuesBoundary.get(segmentName);
if (tmpSegmentValueBoundary == null
|| compareWithBoundary(value, tmpSegmentValueBoundary)) {
... | java | {
"resource": ""
} |
q12260 | MtasDataCollector.sortedAndUnique | train | 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 close... | java | {
"resource": ""
} |
q12261 | MtasDataCollector.computeSortAndUniqueMapping | train | 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[] previous... | java | {
"resource": ""
} |
q12262 | MtasDataCollector.closeNewList | train | 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();
... | java | {
"resource": ""
} |
q12263 | MtasDataCollector.setWithTotal | train | 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(
... | java | {
"resource": ""
} |
q12264 | dnsrecords_stats.get | train | 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 | {
"resource": ""
} |
q12265 | dnsrecords_stats.get | train | 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 | {
"resource": ""
} |
q12266 | lbvserver_tmtrafficpolicy_binding.get | train | 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(se... | java | {
"resource": ""
} |
q12267 | gslbparameter.update | train | 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;
... | java | {
"resource": ""
} |
q12268 | gslbparameter.unset | train | 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 | {
"resource": ""
} |
q12269 | gslbparameter.get | train | public static gslbparameter get(nitro_service service) throws Exception{
gslbparameter obj = new gslbparameter();
gslbparameter[] response = (gslbparameter[])obj.get_resources(service);
return response[0];
} | java | {
"resource": ""
} |
q12270 | MtasSolrCollectionResult.setList | train | 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 | {
"resource": ""
} |
q12271 | MtasSolrCollectionResult.setCheck | train | 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 | {
"resource": ""
} |
q12272 | MtasSolrCollectionResult.setGet | train | 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 a... | java | {
"resource": ""
} |
q12273 | MtasSolrCollectionResult.setPost | train | 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 | {
"resource": ""
} |
q12274 | MtasSolrCollectionResult.setImport | train | 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 | {
"resource": ""
} |
q12275 | MtasSolrCollectionResult.setCreate | train | 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 | {
"resource": ""
} |
q12276 | sslservicegroup_binding.get | train | 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 resp... | java | {
"resource": ""
} |
q12277 | sslservicegroup_binding.get | train | 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 sslservicegro... | java | {
"resource": ""
} |
q12278 | aaagroup_intranetip_binding.get | train | 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);
retur... | java | {
"resource": ""
} |
q12279 | MtasUpdateRequestProcessorResultWriter.addItem | train | 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,... | java | {
"resource": ""
} |
q12280 | MtasUpdateRequestProcessorResultWriter.forceCloseAndDelete | train | public void forceCloseAndDelete() {
try {
if (objectOutputStream != null) {
objectOutputStream.close();
objectOutputStream = null;
}
if (fileOutputStream != null) {
fileOutputStream.close();
fileOutputStream = null;
}
} catch (IOException e) {
log.de... | java | {
"resource": ""
} |
q12281 | clusternodegroup_streamidentifier_binding.get | train | 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_streamid... | java | {
"resource": ""
} |
q12282 | qos_stats.get | train | 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 | {
"resource": ""
} |
q12283 | appflowpolicy_csvserver_binding.get | train | 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);
... | java | {
"resource": ""
} |
q12284 | vpnvserver_sharefileserver_binding.get | train | 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_resourc... | java | {
"resource": ""
} |
q12285 | Morpha.capitalise | train | 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))){
... | java | {
"resource": ""
} |
q12286 | Morpha.loadVerbStemSet | train | private Set<String> loadVerbStemSet(String[] verbStems) {
HashSet<String> set = new HashSet<String>(verbStems.length);
for (String stem : verbStems) {
set.add(stem);
}
return set;
} | java | {
"resource": ""
} |
q12287 | Morpha.stem | train | 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+... | java | {
"resource": ""
} |
q12288 | Constituent.crosses | train | 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 | {
"resource": ""
} |
q12289 | Constituent.crosses | train | public boolean crosses(Collection<Constituent> constColl) {
for (Constituent c : constColl) {
if (crosses(c)) {
return true;
}
}
return false;
} | java | {
"resource": ""
} |
q12290 | MtasCQLParserWordCondition.getPositiveQuery | train | public MtasSpanQuery getPositiveQuery(int index) {
if ((index >= 0) && (index < positiveQueryList.size())) {
return positiveQueryList.get(index);
} else {
return null;
}
} | java | {
"resource": ""
} |
q12291 | MtasCQLParserWordCondition.getNegativeQuery | train | public MtasSpanQuery getNegativeQuery(int index) {
if ((index >= 0) && (index < negativeQueryList.size())) {
return negativeQueryList.get(index);
} else {
return null;
}
} | java | {
"resource": ""
} |
q12292 | MtasCQLParserWordCondition.isSingle | train | 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 | {
"resource": ""
} |
q12293 | MtasCQLParserWordCondition.swapType | train | 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;
neg... | java | {
"resource": ""
} |
q12294 | nsacl.add | train | 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.srcip... | java | {
"resource": ""
} |
q12295 | nsacl.add | train | 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();
addresour... | java | {
"resource": ""
} |
q12296 | nsacl.update | train | 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;
updatere... | java | {
"resource": ""
} |
q12297 | nsacl.update | train | 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();
... | java | {
"resource": ""
} |
q12298 | nsacl.unset | train | 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 | {
"resource": ""
} |
q12299 | nsacl.unset | train | 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();
... | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.