_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_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | 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.get_resources(service);
return response;
} | 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.lifetime = resource.lifetime;
updateresource.livenesscheckinterval = resource.livenesscheckinterval;
updateresource.replaywindowsize = resource.replaywindowsize;
updateresource.ikeretryinterval = resource.ikeretryinterval;
updateresource.retransmissiontime = resource.retransmissiontime;
return updateresource.update_resource(client);
} | 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;
updateresource.maxburst = resource.maxburst;
updateresource.initialcwnd = resource.initialcwnd;
updateresource.recvbuffsize = resource.recvbuffsize;
updateresource.delayedack = resource.delayedack;
updateresource.downstaterst = resource.downstaterst;
updateresource.nagle = resource.nagle;
updateresource.limitedpersist = resource.limitedpersist;
updateresource.oooqsize = resource.oooqsize;
updateresource.ackonpush = resource.ackonpush;
updateresource.maxpktpermss = resource.maxpktpermss;
updateresource.pktperretx = resource.pktperretx;
updateresource.minrto = resource.minrto;
updateresource.slowstartincr = resource.slowstartincr;
updateresource.maxdynserverprobes = resource.maxdynserverprobes;
updateresource.synholdfastgiveup = resource.synholdfastgiveup;
updateresource.maxsynholdperprobe = resource.maxsynholdperprobe;
updateresource.maxsynhold = resource.maxsynhold;
updateresource.msslearninterval = resource.msslearninterval;
updateresource.msslearndelay = resource.msslearndelay;
updateresource.maxtimewaitconn = resource.maxtimewaitconn;
updateresource.kaprobeupdatelastactivity = resource.kaprobeupdatelastactivity;
updateresource.maxsynackretx = resource.maxsynackretx;
updateresource.synattackdetection = resource.synattackdetection;
updateresource.connflushifnomem = resource.connflushifnomem;
updateresource.connflushthres = resource.connflushthres;
updateresource.mptcpconcloseonpassivesf = resource.mptcpconcloseonpassivesf;
updateresource.mptcpchecksum = resource.mptcpchecksum;
updateresource.mptcpsftimeout = resource.mptcpsftimeout;
updateresource.mptcpsfreplacetimeout = resource.mptcpsfreplacetimeout;
updateresource.mptcpmaxsf = resource.mptcpmaxsf;
updateresource.mptcpmaxpendingsf = resource.mptcpmaxpendingsf;
updateresource.mptcppendingjointhreshold = resource.mptcppendingjointhreshold;
updateresource.mptcprtostoswitchsf = resource.mptcprtostoswitchsf;
updateresource.mptcpusebackupondss = resource.mptcpusebackupondss;
updateresource.tcpmaxretries = resource.tcpmaxretries;
updateresource.mptcpimmediatesfcloseonfin = resource.mptcpimmediatesfcloseonfin;
return updateresource.update_resource(client);
} | 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);
return response;
} | 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[]) obj.get_resources(service);
return response;
} | 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=0;i<policyname.length;i++) {
obj[i] = new cachepolicy_binding();
obj[i].set_policyname(policyname[i]);
response[i] = (cachepolicy_binding) obj[i].get_resource(service);
}
return response;
}
return null;
} | 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();
} catch (Exception e) {
System.err.println("Couldn't open WordNet Connection. Aborting collocation detection.");
e.printStackTrace();
wnc = null;
}
}
if (wnc != null) {
CollocationFinder cf = new CollocationFinder(tree, wnc, hf);
tree = cf.getMangledTree();
} else {
System.err.println("ERROR: WordNetConnection unavailable for collocations.");
}
return tree;
} | 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(service);
return response;
} | 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_binding response[] = (authorizationpolicy_authorizationpolicylabel_binding[]) obj.get_resources(service);
return response;
} | 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 {
System.err.println("Eval Failed to find: "+o1);
}
}
n += 1.0;
}
if (DEBUG) System.err.println("Matched " + p + " of " + n);
return (n > 0.0 ? p / n : 0.0);
} | 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(service);
return response;
} | 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.readObject();
internalAdd(ErasureUtils.<E>uncheckedCast(o));
}
} | 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 function
//Double Ax = new Double(0.0);
//Double Xx = new Double(1.0);
//Double Bx = new Double(0.0);
// bracket the extreme pt
double guess = 0.01;
//System.err.println("Current "+oneDim.valueAt(0)+" nudge "+(oneDim.smallestZeroPositiveLocation()*1e-2)+" "+oneDim.valueAt(oneDim.smallestZeroPositiveLocation()*1e-5));
if (!silent) {
System.err.print("[");
}
Triple bracketing = mnbrak(new Triple(0, guess, 0), oneDim);
if (!silent) {
System.err.print("]");
}
double ax = bracketing.a;
double xx = bracketing.b;
double bx = bracketing.c;
//lastXx = xx;
// CHECK FOR END OF WORLD
if (!(ax <= xx && xx <= bx) && !(bx <= xx && xx <= ax)) {
System.err.println("Bad bracket order!");
}
if (verbose) {
System.err.println("Bracketing found: " + ax + " " + xx + " " + bx);
System.err.println("Bracketing found: " + oneDim.valueAt(ax) + " " + oneDim.valueAt(xx) + " " + oneDim.valueAt(bx));
//System.err.println("Bracketing found: "+arrayToString(oneDim.vectorOf(ax),3)+" "+arrayToString(oneDim.vectorOf(xx),3)+" "+arrayToString(oneDim.vectorOf(bx),3));
}
// find the extreme pt
if (!silent) {
System.err.print("<");
}
double xmin = dbrent(oneDim, ax, xx, bx);
if (!silent) {
System.err.print(">");
}
// return the full vector
//System.err.println("Went "+xmin+" during lineMinimize");
return oneDim.vectorOf(xmin);
} | 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 = resource.undefaction;
addresource.comment = resource.comment;
return addresource.add_resource(client);
} | 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(service);
return response;
} | 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.get_resources(service, option);
return response;
} | 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 instantiate - is your key class fancy?", e);
}
valueCache.put((Class)key, type);
}
return type;
} | 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(service);
return response;
} | 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 = newErrorList;
int tmpNewSize = newSize;
newSize = 2 * newSize;
newKeyList = new String[newSize];
newSourceNumberList = new int[newSize];
newErrorNumber = new int[newSize];
newErrorList = (HashMap<String, Integer>[]) new HashMap<?, ?>[newSize];
System.arraycopy(tmpNewKeyList, 0, newKeyList, 0, tmpNewSize);
System.arraycopy(tmpNewSourceNumberList, 0, newSourceNumberList, 0,
tmpNewSize);
System.arraycopy(tmpNewErrorNumber, 0, newErrorNumber, 0, tmpNewSize);
System.arraycopy(tmpNewErrorList, 0, newErrorList, 0, tmpNewSize);
if (hasSub) {
MtasDataCollector<?, ?>[] tmpNewSubCollectorListNextLevel = newSubCollectorListNextLevel;
newSubCollectorListNextLevel = new MtasDataCollector[newSize];
System.arraycopy(tmpNewSubCollectorListNextLevel, 0,
newSubCollectorListNextLevel, 0, tmpNewSize);
}
} else {
throw new IOException("already closed");
}
} | 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 : keyValueList.entrySet()) {
if (tmpSegmentValueBoundary == null || compareWithBoundary(
entry.getValue(), tmpSegmentValueBoundary)) {
segmentKeys.add(entry.getKey());
}
}
}
} else {
throw new IOException("already closed");
}
} | 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.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 | {
"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)) {
return true;
}
}
return false;
} | 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 closed");
}
} | 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[] 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 | {
"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();
}
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 | {
"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(
"can't get total for dataCollector of type " + collectorType);
}
} | 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(service);
return response;
} | 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;
updateresource.v6ldnsmasklen = resource.v6ldnsmasklen;
updateresource.ldnsprobeorder = resource.ldnsprobeorder;
updateresource.dropldnsreq = resource.dropldnsreq;
return updateresource.update_resource(client);
} | 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 action '" + action + "'");
}
} | 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 response;
} | 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 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 | {
"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);
return response;
} | 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, flags);
try {
objectOutputStream.writeObject(item);
objectOutputStream.reset();
objectOutputStream.flush();
} catch (IOException e) {
forceCloseAndDelete();
log.debug(e);
}
}
} | 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.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 | {
"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_streamidentifier_binding[]) obj.get_resources(service);
return response;
} | 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);
return response;
} | 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_resources(service);
return response;
} | 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))){
s1.setCharAt(j,Character.toLowerCase(s1.charAt(j)));
}
}
return s1.toString();
} | 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+=("+"+affix); }
return 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;
negativeQueryList = queryList;
for (MtasCQLParserWordCondition c : conditionList) {
c.swapNot();
}
simplified = false;
} | 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.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 | {
"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();
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 | {
"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;
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 | {
"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();
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 | {
"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();
unsetresources[i].aclname = aclname[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.