_id
stringlengths
2
7
title
stringlengths
3
140
partition
stringclasses
3 values
text
stringlengths
73
34.1k
language
stringclasses
1 value
meta_information
dict
q12100
service_lbmonitor_binding.get
train
public static service_lbmonitor_binding[] get(nitro_service service, String name) throws Exception{ service_lbmonitor_binding obj = new service_lbmonitor_binding(); obj.set_name(name); service_lbmonitor_binding response[] = (service_lbmonitor_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12101
rewritepolicy_rewriteglobal_binding.get
train
public static rewritepolicy_rewriteglobal_binding[] get(nitro_service service, String name) throws Exception{ rewritepolicy_rewriteglobal_binding obj = new rewritepolicy_rewriteglobal_binding(); obj.set_name(name); rewritepolicy_rewriteglobal_binding response[] = (rewritepolicy_rewriteglobal_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12102
nshostname.update
train
public static base_response update(nitro_service client, nshostname resource) throws Exception { nshostname updateresource = new nshostname(); updateresource.hostname = resource.hostname; updateresource.ownernode = resource.ownernode; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12103
nshostname.update
train
public static base_responses update(nitro_service client, nshostname resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nshostname updateresources[] = new nshostname[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nshostname(); updateresources[i].hostname = resources[i].hostname; updateresources[i].ownernode = resources[i].ownernode; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12104
nshostname.get
train
public static nshostname[] get(nitro_service service, options option) throws Exception{ nshostname obj = new nshostname(); nshostname[] response = (nshostname[])obj.get_resources(service,option); return response; }
java
{ "resource": "" }
q12105
tmsessionpolicy_aaauser_binding.get
train
public static tmsessionpolicy_aaauser_binding[] get(nitro_service service, String name) throws Exception{ tmsessionpolicy_aaauser_binding obj = new tmsessionpolicy_aaauser_binding(); obj.set_name(name); tmsessionpolicy_aaauser_binding response[] = (tmsessionpolicy_aaauser_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12106
authenticationtacacspolicy_binding.get
train
public static authenticationtacacspolicy_binding get(nitro_service service, String name) throws Exception{ authenticationtacacspolicy_binding obj = new authenticationtacacspolicy_binding(); obj.set_name(name); authenticationtacacspolicy_binding response = (authenticationtacacspolicy_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12107
TreeFunctions.main
train
public static void main(String[] args) { //TreeFactory tf = new LabeledScoredTreeFactory(); Tree stringyTree = null; try { stringyTree = (new PennTreeReader(new StringReader("(S (VP (VBZ Try) (NP (DT this))) (. .))"), new LabeledScoredTreeFactory(new StringLabelFactory()))).readTree(); } catch (IOException e) { // do nothing } System.out.println(stringyTree); Function<Tree, Tree> a = getLabeledTreeToCategoryWordTagTreeFunction(); Tree adaptyTree = a.apply(stringyTree); System.out.println(adaptyTree); adaptyTree.percolateHeads(new CollinsHeadFinder()); System.out.println(adaptyTree); Function<Tree, Tree> b = getLabeledTreeToStringLabeledTreeFunction(); Tree stringLabelTree = b.apply(adaptyTree); System.out.println(stringLabelTree); }
java
{ "resource": "" }
q12108
NPTmpRetainingTreeNormalizer.cleanUpLabel
train
@Override protected String cleanUpLabel(String label) { if (label == null) { return "ROOT"; // String constants are always interned } else if (leaveItAll == 1) { return tlp.categoryAndFunction(label); } else if (leaveItAll == 2) { return label; } else { boolean nptemp = NPTmpPattern.matcher(label).matches(); boolean pptemp = PPTmpPattern.matcher(label).matches(); boolean advptemp = ADVPTmpPattern.matcher(label).matches(); boolean anytemp = TmpPattern.matcher(label).matches(); boolean subj = NPSbjPattern.matcher(label).matches(); boolean npadv = NPAdvPattern.matcher(label).matches(); label = tlp.basicCategory(label); if (anytemp && temporalAnnotation == TEMPORAL_ANY_TMP_PERCOLATED) { label += "-TMP"; } else if (pptemp && (temporalAnnotation == TEMPORAL_ALL_NP_AND_PP || temporalAnnotation == TEMPORAL_NP_AND_PP_WITH_NP_HEAD || temporalAnnotation == TEMPORAL_ALL_NP_EVEN_UNDER_PP || temporalAnnotation == TEMPORAL_ALL_NP_PP_ADVP || temporalAnnotation == TEMPORAL_9)) { label = label + "-TMP"; } else if (advptemp && (temporalAnnotation == TEMPORAL_ALL_NP_PP_ADVP || temporalAnnotation == TEMPORAL_9)) { label = label + "-TMP"; } else if (temporalAnnotation > 0 && nptemp) { label = label + "-TMP"; } if (doAdverbialNP && npadv) { label = label + "-ADV"; } if (doSGappedStuff && subj) { label = label + "-SBJ"; } return label; } }
java
{ "resource": "" }
q12109
NPTmpRetainingTreeNormalizer.addTMP9
train
private void addTMP9(final Tree tree) { // do the head chain under it Tree ht = headFinder.determineHead(tree); // special fix for possessives! -- make noun before head if (ht.value().equals("POS")) { int j = tree.indexOf(ht); if (j > 0) { ht = tree.getChild(j - 1); } } // Note: this next bit changes the tree label, rather // than creating a new tree node. Beware! if (ht.isPreTerminal() || ht.value().startsWith("NP") || ht.value().startsWith("PP") || ht.value().startsWith("ADVP")) { if (!TmpPattern.matcher(ht.value()).matches()) { LabelFactory lf = ht.labelFactory(); // System.err.println("TMP: Changing " + ht.value() + " to " + // ht.value() + "-TMP"); ht.setLabel(lf.newLabel(ht.value() + "-TMP")); } if (ht.value().startsWith("NP") || ht.value().startsWith("PP") || ht.value().startsWith("ADVP")) { addTMP9(ht); } } // do the NPs under it (which may or may not be the head chain Tree[] kidlets = tree.children(); for (int k = 0; k < kidlets.length; k++) { ht = kidlets[k]; LabelFactory lf; if (tree.isPrePreTerminal() && !TmpPattern.matcher(ht.value()).matches()) { // System.err.println("TMP: Changing " + ht.value() + " to " + // ht.value() + "-TMP"); lf = ht.labelFactory(); // Note: this next bit changes the tree label, rather // than creating a new tree node. Beware! ht.setLabel(lf.newLabel(ht.value() + "-TMP")); } else if (ht.value().startsWith("NP")) { // don't add -TMP twice! if (!TmpPattern.matcher(ht.value()).matches()) { lf = ht.labelFactory(); // System.err.println("TMP: Changing " + ht.value() + " to " + // ht.value() + "-TMP"); // Note: this next bit changes the tree label, rather // than creating a new tree node. Beware! ht.setLabel(lf.newLabel(ht.value() + "-TMP")); } addTMP9(ht); } } }
java
{ "resource": "" }
q12110
transformpolicylabel_stats.get
train
public static transformpolicylabel_stats[] get(nitro_service service) throws Exception{ transformpolicylabel_stats obj = new transformpolicylabel_stats(); transformpolicylabel_stats[] response = (transformpolicylabel_stats[])obj.stat_resources(service); return response; }
java
{ "resource": "" }
q12111
transformpolicylabel_stats.get
train
public static transformpolicylabel_stats get(nitro_service service, String labelname) throws Exception{ transformpolicylabel_stats obj = new transformpolicylabel_stats(); obj.set_labelname(labelname); transformpolicylabel_stats response = (transformpolicylabel_stats) obj.stat_resource(service); return response; }
java
{ "resource": "" }
q12112
MtasTokenCollection.makeUnique
train
private void makeUnique() { HashMap<String, ArrayList<MtasToken>> currentPositionTokens = new HashMap<>(); ArrayList<MtasToken> currentValueTokens; int currentStartPosition = -1; MtasToken currentToken = null; for (Entry<Integer, MtasToken> entry : tokenCollection.entrySet()) { currentToken = entry.getValue(); if (currentToken.getPositionStart() > currentStartPosition) { currentPositionTokens.clear(); currentStartPosition = currentToken.getPositionStart(); } else { if (currentPositionTokens.containsKey(currentToken.getValue())) { currentValueTokens = currentPositionTokens .get(currentToken.getValue()); } else { currentValueTokens = new ArrayList<>(); currentPositionTokens.put(currentToken.getValue(), currentValueTokens); } currentValueTokens.add(currentToken); } } }
java
{ "resource": "" }
q12113
MtasTokenCollection.checkTokenCollectionIndex
train
private void checkTokenCollectionIndex() throws MtasParserException { if (tokenCollectionIndex.size() != tokenCollection.size()) { MtasToken token; Integer maxId = null; Integer minId = null; tokenCollectionIndex.clear(); for (Entry<Integer, MtasToken> entry : tokenCollection.entrySet()) { token = entry.getValue(); maxId = ((maxId == null) ? entry.getKey() : Math.max(maxId, entry.getKey())); minId = ((minId == null) ? entry.getKey() : Math.min(minId, entry.getKey())); if (token.getId() == null) { throw new MtasParserException( "no id for token (" + token.getValue() + ")"); } else if ((token.getPositionStart() == null) || (token.getPositionEnd() == null)) { throw new MtasParserException("no position for token with id " + token.getId() + " (" + token.getValue() + ")"); } else if (token.getValue() == null || (token.getValue().equals(""))) { throw new MtasParserException( "no value for token with id " + token.getId()); } else if (token.getPrefix() == null || (token.getPrefix().equals(""))) { throw new MtasParserException( "no prefix for token with id " + token.getId()); } else if ((token.getParentId() != null) && !tokenCollection.containsKey(token.getParentId())) { throw new MtasParserException( "missing parentId for token with id " + token.getId()); } else if ((token.getOffsetStart() == null) || (token.getOffsetEnd() == null)) { throw new MtasParserException("missing offset for token with id " + token.getId() + " (" + token.getValue() + ")"); } tokenCollectionIndex.add(entry.getKey()); } if ((tokenCollection.size() > 0) && ((minId > 0) || ((1 + maxId - minId) != tokenCollection.size()))) { throw new MtasParserException("missing ids"); } Collections.sort(tokenCollectionIndex, getCompByName()); } }
java
{ "resource": "" }
q12114
MtasTokenCollection.getCompByName
train
public Comparator<Integer> getCompByName() { return new Comparator<Integer>() { @Override public int compare(Integer t1, Integer t2) { Integer p1 = tokenCollection.get(t1).getPositionStart(); Integer p2 = tokenCollection.get(t2).getPositionStart(); assert p1 != null : "no position for " + tokenCollection.get(t1); assert p2 != null : "no position for " + tokenCollection.get(t2); if (p1.equals(p2)) { Integer o1 = tokenCollection.get(t1).getOffsetStart(); Integer o2 = tokenCollection.get(t2).getOffsetStart(); if (o1 != null && o2 != null) { if (o1.equals(o2)) { return tokenCollection.get(t1).getValue() .compareTo(tokenCollection.get(t2).getValue()); } else { return o1.compareTo(o2); } } else { return tokenCollection.get(t1).getValue() .compareTo(tokenCollection.get(t2).getValue()); } } return p1.compareTo(p2); } }; }
java
{ "resource": "" }
q12115
MtasSolrBaseList.updateKey
train
public final void updateKey(String key) throws IOException { Objects.requireNonNull(key, "old key required"); if (index.containsKey(key)) { MtasSolrStatus status = index.get(key); index.remove(key); if (!index.containsKey(status.key())) { index.put(status.key(), status); } else { throw new IOException("key already exists"); } } }
java
{ "resource": "" }
q12116
MtasSolrBaseList.createListOutput
train
public SimpleOrderedMap<Object> createListOutput(boolean shardRequests, int maxNumber) { garbageCollect(); SimpleOrderedMap<Object> output = new SimpleOrderedMap<>(); output.add(NAME_ENABLED, enabled()); output.add(NAME_ENABLED, true); int numberTotal = data.size(); ListData listData = new ListData(); synchronized (data) { ListIterator<MtasSolrStatus> iter = data.listIterator(data.size()); MtasSolrStatus item; int number = 0; while (iter.hasPrevious() && number < maxNumber) { item = iter.previous(); if (item.shardRequest()) { listData.addShardRequest(); if (shardRequests) { listData.outputList.add(item.createItemOutput()); number++; } } else { listData.addNormal(); listData.outputList.add(item.createItemOutput()); number++; } } } output.add(NAME_SIZE_TOTAL, numberTotal); output.add(NAME_SIZE_NORMAL, listData.numberNormal); output.add(NAME_SIZE_SHARDREQUESTS, listData.numberShardRequests); output.add(NAME_LIST, listData.outputList); return output; }
java
{ "resource": "" }
q12117
tmtrafficpolicy_binding.get
train
public static tmtrafficpolicy_binding get(nitro_service service, String name) throws Exception{ tmtrafficpolicy_binding obj = new tmtrafficpolicy_binding(); obj.set_name(name); tmtrafficpolicy_binding response = (tmtrafficpolicy_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12118
dnsglobal_dnspolicy_binding.get
train
public static dnsglobal_dnspolicy_binding[] get(nitro_service service) throws Exception{ dnsglobal_dnspolicy_binding obj = new dnsglobal_dnspolicy_binding(); dnsglobal_dnspolicy_binding response[] = (dnsglobal_dnspolicy_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12119
dnspolicy_binding.get
train
public static dnspolicy_binding get(nitro_service service, String name) throws Exception{ dnspolicy_binding obj = new dnspolicy_binding(); obj.set_name(name); dnspolicy_binding response = (dnspolicy_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12120
gslbservice_lbmonitor_binding.get
train
public static gslbservice_lbmonitor_binding[] get(nitro_service service, String servicename) throws Exception{ gslbservice_lbmonitor_binding obj = new gslbservice_lbmonitor_binding(); obj.set_servicename(servicename); gslbservice_lbmonitor_binding response[] = (gslbservice_lbmonitor_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12121
nstcpprofile.add
train
public static base_response add(nitro_service client, nstcpprofile resource) throws Exception { nstcpprofile addresource = new nstcpprofile(); addresource.name = resource.name; addresource.ws = resource.ws; addresource.sack = resource.sack; addresource.wsval = resource.wsval; addresource.nagle = resource.nagle; addresource.ackonpush = resource.ackonpush; addresource.mss = resource.mss; addresource.maxburst = resource.maxburst; addresource.initialcwnd = resource.initialcwnd; addresource.delayedack = resource.delayedack; addresource.oooqsize = resource.oooqsize; addresource.maxpktpermss = resource.maxpktpermss; addresource.pktperretx = resource.pktperretx; addresource.minrto = resource.minrto; addresource.slowstartincr = resource.slowstartincr; addresource.buffersize = resource.buffersize; addresource.syncookie = resource.syncookie; addresource.kaprobeupdatelastactivity = resource.kaprobeupdatelastactivity; addresource.flavor = resource.flavor; addresource.dynamicreceivebuffering = resource.dynamicreceivebuffering; addresource.ka = resource.ka; addresource.kaconnidletime = resource.kaconnidletime; addresource.kamaxprobes = resource.kamaxprobes; addresource.kaprobeinterval = resource.kaprobeinterval; addresource.sendbuffsize = resource.sendbuffsize; addresource.mptcp = resource.mptcp; addresource.establishclientconn = resource.establishclientconn; return addresource.add_resource(client); }
java
{ "resource": "" }
q12122
nstcpprofile.update
train
public static base_response update(nitro_service client, nstcpprofile resource) throws Exception { nstcpprofile updateresource = new nstcpprofile(); updateresource.name = resource.name; updateresource.ws = resource.ws; updateresource.sack = resource.sack; updateresource.wsval = resource.wsval; updateresource.nagle = resource.nagle; updateresource.ackonpush = resource.ackonpush; updateresource.mss = resource.mss; updateresource.maxburst = resource.maxburst; updateresource.initialcwnd = resource.initialcwnd; updateresource.delayedack = resource.delayedack; updateresource.oooqsize = resource.oooqsize; updateresource.maxpktpermss = resource.maxpktpermss; updateresource.pktperretx = resource.pktperretx; updateresource.minrto = resource.minrto; updateresource.slowstartincr = resource.slowstartincr; updateresource.buffersize = resource.buffersize; updateresource.syncookie = resource.syncookie; updateresource.kaprobeupdatelastactivity = resource.kaprobeupdatelastactivity; updateresource.flavor = resource.flavor; updateresource.dynamicreceivebuffering = resource.dynamicreceivebuffering; updateresource.ka = resource.ka; updateresource.kaconnidletime = resource.kaconnidletime; updateresource.kamaxprobes = resource.kamaxprobes; updateresource.kaprobeinterval = resource.kaprobeinterval; updateresource.sendbuffsize = resource.sendbuffsize; updateresource.mptcp = resource.mptcp; updateresource.establishclientconn = resource.establishclientconn; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12123
nstcpprofile.update
train
public static base_responses update(nitro_service client, nstcpprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nstcpprofile updateresources[] = new nstcpprofile[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nstcpprofile(); updateresources[i].name = resources[i].name; updateresources[i].ws = resources[i].ws; updateresources[i].sack = resources[i].sack; updateresources[i].wsval = resources[i].wsval; updateresources[i].nagle = resources[i].nagle; updateresources[i].ackonpush = resources[i].ackonpush; updateresources[i].mss = resources[i].mss; updateresources[i].maxburst = resources[i].maxburst; updateresources[i].initialcwnd = resources[i].initialcwnd; updateresources[i].delayedack = resources[i].delayedack; updateresources[i].oooqsize = resources[i].oooqsize; updateresources[i].maxpktpermss = resources[i].maxpktpermss; updateresources[i].pktperretx = resources[i].pktperretx; updateresources[i].minrto = resources[i].minrto; updateresources[i].slowstartincr = resources[i].slowstartincr; updateresources[i].buffersize = resources[i].buffersize; updateresources[i].syncookie = resources[i].syncookie; updateresources[i].kaprobeupdatelastactivity = resources[i].kaprobeupdatelastactivity; updateresources[i].flavor = resources[i].flavor; updateresources[i].dynamicreceivebuffering = resources[i].dynamicreceivebuffering; updateresources[i].ka = resources[i].ka; updateresources[i].kaconnidletime = resources[i].kaconnidletime; updateresources[i].kamaxprobes = resources[i].kamaxprobes; updateresources[i].kaprobeinterval = resources[i].kaprobeinterval; updateresources[i].sendbuffsize = resources[i].sendbuffsize; updateresources[i].mptcp = resources[i].mptcp; updateresources[i].establishclientconn = resources[i].establishclientconn; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12124
nstcpprofile.get
train
public static nstcpprofile[] get(nitro_service service) throws Exception{ nstcpprofile obj = new nstcpprofile(); nstcpprofile[] response = (nstcpprofile[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12125
nstcpprofile.get
train
public static nstcpprofile get(nitro_service service, String name) throws Exception{ nstcpprofile obj = new nstcpprofile(); obj.set_name(name); nstcpprofile response = (nstcpprofile) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12126
transformglobal_transformpolicy_binding.get
train
public static transformglobal_transformpolicy_binding[] get(nitro_service service) throws Exception{ transformglobal_transformpolicy_binding obj = new transformglobal_transformpolicy_binding(); transformglobal_transformpolicy_binding response[] = (transformglobal_transformpolicy_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12127
bridge_stats.get
train
public static bridge_stats get(nitro_service service) throws Exception{ bridge_stats obj = new bridge_stats(); bridge_stats[] response = (bridge_stats[])obj.stat_resources(service); return response[0]; }
java
{ "resource": "" }
q12128
systementity.get
train
public static systementity[] get(nitro_service service, systementity_args args) throws Exception{ systementity obj = new systementity(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); systementity[] response = (systementity[])obj.get_resources(service, option); return response; }
java
{ "resource": "" }
q12129
vpnglobal_vpnclientlessaccesspolicy_binding.get
train
public static vpnglobal_vpnclientlessaccesspolicy_binding[] get(nitro_service service) throws Exception{ vpnglobal_vpnclientlessaccesspolicy_binding obj = new vpnglobal_vpnclientlessaccesspolicy_binding(); vpnglobal_vpnclientlessaccesspolicy_binding response[] = (vpnglobal_vpnclientlessaccesspolicy_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12130
vpnglobal_vpnclientlessaccesspolicy_binding.get_filtered
train
public static vpnglobal_vpnclientlessaccesspolicy_binding[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ vpnglobal_vpnclientlessaccesspolicy_binding obj = new vpnglobal_vpnclientlessaccesspolicy_binding(); options option = new options(); option.set_filter(filter); vpnglobal_vpnclientlessaccesspolicy_binding[] response = (vpnglobal_vpnclientlessaccesspolicy_binding[]) obj.getfiltered(service, option); return response; }
java
{ "resource": "" }
q12131
vrid_interface_binding.get
train
public static vrid_interface_binding[] get(nitro_service service, Long id) throws Exception{ vrid_interface_binding obj = new vrid_interface_binding(); obj.set_id(id); vrid_interface_binding response[] = (vrid_interface_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12132
CoordinationTransformer.CCtransform
train
public static Tree CCtransform(Tree t) { boolean notDone = true; while (notDone) { Tree cc = findCCparent(t, t); if (cc != null) { t = cc; } else { notDone = false; } } return t; }
java
{ "resource": "" }
q12133
vpnvserver_authenticationtacacspolicy_binding.get
train
public static vpnvserver_authenticationtacacspolicy_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_authenticationtacacspolicy_binding obj = new vpnvserver_authenticationtacacspolicy_binding(); obj.set_name(name); vpnvserver_authenticationtacacspolicy_binding response[] = (vpnvserver_authenticationtacacspolicy_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12134
ipsecprofile.add
train
public static base_response add(nitro_service client, ipsecprofile resource) throws Exception { ipsecprofile addresource = new ipsecprofile(); addresource.name = resource.name; addresource.ikeversion = resource.ikeversion; addresource.encalgo = resource.encalgo; addresource.hashalgo = resource.hashalgo; addresource.lifetime = resource.lifetime; addresource.psk = resource.psk; addresource.publickey = resource.publickey; addresource.privatekey = resource.privatekey; addresource.peerpublickey = resource.peerpublickey; addresource.livenesscheckinterval = resource.livenesscheckinterval; addresource.replaywindowsize = resource.replaywindowsize; addresource.ikeretryinterval = resource.ikeretryinterval; addresource.retransmissiontime = resource.retransmissiontime; return addresource.add_resource(client); }
java
{ "resource": "" }
q12135
ipsecprofile.add
train
public static base_responses add(nitro_service client, ipsecprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { ipsecprofile addresources[] = new ipsecprofile[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new ipsecprofile(); addresources[i].name = resources[i].name; addresources[i].ikeversion = resources[i].ikeversion; addresources[i].encalgo = resources[i].encalgo; addresources[i].hashalgo = resources[i].hashalgo; addresources[i].lifetime = resources[i].lifetime; addresources[i].psk = resources[i].psk; addresources[i].publickey = resources[i].publickey; addresources[i].privatekey = resources[i].privatekey; addresources[i].peerpublickey = resources[i].peerpublickey; addresources[i].livenesscheckinterval = resources[i].livenesscheckinterval; addresources[i].replaywindowsize = resources[i].replaywindowsize; addresources[i].ikeretryinterval = resources[i].ikeretryinterval; addresources[i].retransmissiontime = resources[i].retransmissiontime; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12136
ipsecprofile.get
train
public static ipsecprofile[] get(nitro_service service) throws Exception{ ipsecprofile obj = new ipsecprofile(); ipsecprofile[] response = (ipsecprofile[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12137
ipsecprofile.get
train
public static ipsecprofile get(nitro_service service, String name) throws Exception{ ipsecprofile obj = new ipsecprofile(); obj.set_name(name); ipsecprofile response = (ipsecprofile) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12138
authenticationauthnprofile.add
train
public static base_response add(nitro_service client, authenticationauthnprofile resource) throws Exception { authenticationauthnprofile addresource = new authenticationauthnprofile(); addresource.name = resource.name; addresource.authnvsname = resource.authnvsname; addresource.authenticationhost = resource.authenticationhost; addresource.authenticationdomain = resource.authenticationdomain; addresource.authenticationlevel = resource.authenticationlevel; return addresource.add_resource(client); }
java
{ "resource": "" }
q12139
authenticationauthnprofile.add
train
public static base_responses add(nitro_service client, authenticationauthnprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { authenticationauthnprofile addresources[] = new authenticationauthnprofile[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new authenticationauthnprofile(); addresources[i].name = resources[i].name; addresources[i].authnvsname = resources[i].authnvsname; addresources[i].authenticationhost = resources[i].authenticationhost; addresources[i].authenticationdomain = resources[i].authenticationdomain; addresources[i].authenticationlevel = resources[i].authenticationlevel; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12140
authenticationauthnprofile.update
train
public static base_response update(nitro_service client, authenticationauthnprofile resource) throws Exception { authenticationauthnprofile updateresource = new authenticationauthnprofile(); updateresource.name = resource.name; updateresource.authnvsname = resource.authnvsname; updateresource.authenticationhost = resource.authenticationhost; updateresource.authenticationdomain = resource.authenticationdomain; updateresource.authenticationlevel = resource.authenticationlevel; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12141
authenticationauthnprofile.update
train
public static base_responses update(nitro_service client, authenticationauthnprofile resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { authenticationauthnprofile updateresources[] = new authenticationauthnprofile[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new authenticationauthnprofile(); updateresources[i].name = resources[i].name; updateresources[i].authnvsname = resources[i].authnvsname; updateresources[i].authenticationhost = resources[i].authenticationhost; updateresources[i].authenticationdomain = resources[i].authenticationdomain; updateresources[i].authenticationlevel = resources[i].authenticationlevel; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12142
authenticationauthnprofile.get
train
public static authenticationauthnprofile[] get(nitro_service service) throws Exception{ authenticationauthnprofile obj = new authenticationauthnprofile(); authenticationauthnprofile[] response = (authenticationauthnprofile[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12143
authenticationauthnprofile.get
train
public static authenticationauthnprofile get(nitro_service service, String name) throws Exception{ authenticationauthnprofile obj = new authenticationauthnprofile(); obj.set_name(name); authenticationauthnprofile response = (authenticationauthnprofile) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12144
tmsessionpolicy.get
train
public static tmsessionpolicy[] get(nitro_service service) throws Exception{ tmsessionpolicy obj = new tmsessionpolicy(); tmsessionpolicy[] response = (tmsessionpolicy[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12145
tmsessionpolicy.get
train
public static tmsessionpolicy get(nitro_service service, String name) throws Exception{ tmsessionpolicy obj = new tmsessionpolicy(); obj.set_name(name); tmsessionpolicy response = (tmsessionpolicy) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12146
FaultTolerantScheduler.schedule
train
public void schedule(TimerTask task, boolean checkIfAlreadyPresent) { final TimerTaskData taskData = task.getData(); final Serializable taskID = taskData.getTaskID(); task.setScheduler(this); if (logger.isDebugEnabled()) { logger.debug("Scheduling task with id " + taskID); } // store the task and data final TimerTaskCacheData timerTaskCacheData = new TimerTaskCacheData(taskID, baseFqn, cluster); if (timerTaskCacheData.create()) { timerTaskCacheData.setTaskData(taskData); } else if(checkIfAlreadyPresent) { throw new IllegalStateException("timer task " + taskID + " already scheduled"); } // schedule task final SetTimerAfterTxCommitRunnable setTimerAction = new SetTimerAfterTxCommitRunnable(task, this); if (txManager != null) { try { Transaction tx = txManager.getTransaction(); if (tx != null) { TransactionContext txContext = TransactionContextThreadLocal.getTransactionContext(); if (txContext == null) { txContext = new TransactionContext(); tx.registerSynchronization(new TransactionSynchronization(txContext)); } txContext.put(taskID, setTimerAction); task.setSetTimerTransactionalAction(setTimerAction); } else { setTimerAction.run(); } } catch (Throwable e) { remove(taskID,true); throw new RuntimeException("Unable to register tx synchronization object",e); } } else { setTimerAction.run(); } }
java
{ "resource": "" }
q12147
FaultTolerantScheduler.cancel
train
public TimerTask cancel(Serializable taskID) { if (logger.isDebugEnabled()) { logger.debug("Canceling task with timer id "+taskID); } TimerTask task = localRunningTasks.get(taskID); if (task != null) { // remove task data new TimerTaskCacheData(taskID, baseFqn, cluster).remove(); final SetTimerAfterTxCommitRunnable setAction = task.getSetTimerTransactionalAction(); if (setAction != null) { // we have a tx action scheduled to run when tx commits, to set the timer, lets simply cancel it setAction.cancel(); } else { // do cancellation AfterTxCommitRunnable runnable = new CancelTimerAfterTxCommitRunnable(task,this); if (txManager != null) { try { Transaction tx = txManager.getTransaction(); if (tx != null) { TransactionContext txContext = TransactionContextThreadLocal.getTransactionContext(); if (txContext == null) { txContext = new TransactionContext(); tx.registerSynchronization(new TransactionSynchronization(txContext)); } txContext.put(taskID, runnable); } else { runnable.run(); } } catch (Throwable e) { throw new RuntimeException("Unable to register tx synchronization object",e); } } else { runnable.run(); } } } else { // not found locally // if there is a tx context there may be a set timer action there if (txManager != null) { try { Transaction tx = txManager.getTransaction(); if (tx != null) { TransactionContext txContext = TransactionContextThreadLocal.getTransactionContext(); if (txContext != null) { final AfterTxCommitRunnable r = txContext.remove(taskID); if (r != null) { task = r.task; // remove from cluster new TimerTaskCacheData(taskID, baseFqn, cluster).remove(); } } } } catch (Throwable e) { throw new RuntimeException("Failed to check tx context.",e); } } } return task; }
java
{ "resource": "" }
q12148
FaultTolerantScheduler.recover
train
private void recover(TimerTaskData taskData) { TimerTask task = timerTaskFactory.newTimerTask(taskData); if(task != null) { if (logger.isDebugEnabled()) { logger.debug("Recovering task with id "+taskData.getTaskID()); } task.beforeRecover(); // on recovery the task will already be in the cache so we don't check for it // or an IllegalStateException will be thrown schedule(task, false); } }
java
{ "resource": "" }
q12149
transformprofile_binding.get
train
public static transformprofile_binding get(nitro_service service, String name) throws Exception{ transformprofile_binding obj = new transformprofile_binding(); obj.set_name(name); transformprofile_binding response = (transformprofile_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12150
nslimitidentifier.add
train
public static base_response add(nitro_service client, nslimitidentifier resource) throws Exception { nslimitidentifier addresource = new nslimitidentifier(); addresource.limitidentifier = resource.limitidentifier; addresource.threshold = resource.threshold; addresource.timeslice = resource.timeslice; addresource.mode = resource.mode; addresource.limittype = resource.limittype; addresource.selectorname = resource.selectorname; addresource.maxbandwidth = resource.maxbandwidth; addresource.trapsintimeslice = resource.trapsintimeslice; return addresource.add_resource(client); }
java
{ "resource": "" }
q12151
nslimitidentifier.add
train
public static base_responses add(nitro_service client, nslimitidentifier resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nslimitidentifier addresources[] = new nslimitidentifier[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new nslimitidentifier(); addresources[i].limitidentifier = resources[i].limitidentifier; addresources[i].threshold = resources[i].threshold; addresources[i].timeslice = resources[i].timeslice; addresources[i].mode = resources[i].mode; addresources[i].limittype = resources[i].limittype; addresources[i].selectorname = resources[i].selectorname; addresources[i].maxbandwidth = resources[i].maxbandwidth; addresources[i].trapsintimeslice = resources[i].trapsintimeslice; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12152
nslimitidentifier.delete
train
public static base_response delete(nitro_service client, String limitidentifier) throws Exception { nslimitidentifier deleteresource = new nslimitidentifier(); deleteresource.limitidentifier = limitidentifier; return deleteresource.delete_resource(client); }
java
{ "resource": "" }
q12153
nslimitidentifier.delete
train
public static base_responses delete(nitro_service client, String limitidentifier[]) throws Exception { base_responses result = null; if (limitidentifier != null && limitidentifier.length > 0) { nslimitidentifier deleteresources[] = new nslimitidentifier[limitidentifier.length]; for (int i=0;i<limitidentifier.length;i++){ deleteresources[i] = new nslimitidentifier(); deleteresources[i].limitidentifier = limitidentifier[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
java
{ "resource": "" }
q12154
nslimitidentifier.update
train
public static base_response update(nitro_service client, nslimitidentifier resource) throws Exception { nslimitidentifier updateresource = new nslimitidentifier(); updateresource.limitidentifier = resource.limitidentifier; updateresource.threshold = resource.threshold; updateresource.timeslice = resource.timeslice; updateresource.mode = resource.mode; updateresource.limittype = resource.limittype; updateresource.selectorname = resource.selectorname; updateresource.maxbandwidth = resource.maxbandwidth; updateresource.trapsintimeslice = resource.trapsintimeslice; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12155
nslimitidentifier.update
train
public static base_responses update(nitro_service client, nslimitidentifier resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { nslimitidentifier updateresources[] = new nslimitidentifier[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new nslimitidentifier(); updateresources[i].limitidentifier = resources[i].limitidentifier; updateresources[i].threshold = resources[i].threshold; updateresources[i].timeslice = resources[i].timeslice; updateresources[i].mode = resources[i].mode; updateresources[i].limittype = resources[i].limittype; updateresources[i].selectorname = resources[i].selectorname; updateresources[i].maxbandwidth = resources[i].maxbandwidth; updateresources[i].trapsintimeslice = resources[i].trapsintimeslice; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12156
nslimitidentifier.unset
train
public static base_response unset(nitro_service client, nslimitidentifier resource, String[] args) throws Exception{ nslimitidentifier unsetresource = new nslimitidentifier(); unsetresource.limitidentifier = resource.limitidentifier; return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q12157
nslimitidentifier.unset
train
public static base_responses unset(nitro_service client, String limitidentifier[], String args[]) throws Exception { base_responses result = null; if (limitidentifier != null && limitidentifier.length > 0) { nslimitidentifier unsetresources[] = new nslimitidentifier[limitidentifier.length]; for (int i=0;i<limitidentifier.length;i++){ unsetresources[i] = new nslimitidentifier(); unsetresources[i].limitidentifier = limitidentifier[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
java
{ "resource": "" }
q12158
nslimitidentifier.get
train
public static nslimitidentifier[] get(nitro_service service) throws Exception{ nslimitidentifier obj = new nslimitidentifier(); nslimitidentifier[] response = (nslimitidentifier[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12159
nslimitidentifier.get
train
public static nslimitidentifier get(nitro_service service, String limitidentifier) throws Exception{ nslimitidentifier obj = new nslimitidentifier(); obj.set_limitidentifier(limitidentifier); nslimitidentifier response = (nslimitidentifier) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12160
nslimitidentifier.get
train
public static nslimitidentifier[] get(nitro_service service, String limitidentifier[]) throws Exception{ if (limitidentifier !=null && limitidentifier.length>0) { nslimitidentifier response[] = new nslimitidentifier[limitidentifier.length]; nslimitidentifier obj[] = new nslimitidentifier[limitidentifier.length]; for (int i=0;i<limitidentifier.length;i++) { obj[i] = new nslimitidentifier(); obj[i].set_limitidentifier(limitidentifier[i]); response[i] = (nslimitidentifier) obj[i].get_resource(service); } return response; } return null; }
java
{ "resource": "" }
q12161
appfwprofile_starturl_binding.get
train
public static appfwprofile_starturl_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_starturl_binding obj = new appfwprofile_starturl_binding(); obj.set_name(name); appfwprofile_starturl_binding response[] = (appfwprofile_starturl_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12162
vpnglobal_authenticationradiuspolicy_binding.get
train
public static vpnglobal_authenticationradiuspolicy_binding[] get(nitro_service service) throws Exception{ vpnglobal_authenticationradiuspolicy_binding obj = new vpnglobal_authenticationradiuspolicy_binding(); vpnglobal_authenticationradiuspolicy_binding response[] = (vpnglobal_authenticationradiuspolicy_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12163
sslglobal_binding.get
train
public static sslglobal_binding get(nitro_service service) throws Exception{ sslglobal_binding obj = new sslglobal_binding(); sslglobal_binding response = (sslglobal_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12164
MultiClassPrecisionRecallStats.getRecallDescription
train
public String getRecallDescription(int numDigits) { NumberFormat nf = NumberFormat.getNumberInstance(); nf.setMaximumFractionDigits(numDigits); Triple<Double, Integer, Integer> recall = getRecallInfo(); return nf.format(recall.first()) + " (" + recall.second() + "/" + (recall.second() + recall.third()) + ")"; }
java
{ "resource": "" }
q12165
filterpolicy_crvserver_binding.get
train
public static filterpolicy_crvserver_binding[] get(nitro_service service, String name) throws Exception{ filterpolicy_crvserver_binding obj = new filterpolicy_crvserver_binding(); obj.set_name(name); filterpolicy_crvserver_binding response[] = (filterpolicy_crvserver_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12166
cmppolicy.add
train
public static base_response add(nitro_service client, cmppolicy resource) throws Exception { cmppolicy addresource = new cmppolicy(); addresource.name = resource.name; addresource.rule = resource.rule; addresource.resaction = resource.resaction; return addresource.add_resource(client); }
java
{ "resource": "" }
q12167
cmppolicy.update
train
public static base_response update(nitro_service client, cmppolicy resource) throws Exception { cmppolicy updateresource = new cmppolicy(); updateresource.name = resource.name; updateresource.rule = resource.rule; updateresource.resaction = resource.resaction; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12168
cmppolicy.get
train
public static cmppolicy[] get(nitro_service service) throws Exception{ cmppolicy obj = new cmppolicy(); cmppolicy[] response = (cmppolicy[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12169
cmppolicy.get
train
public static cmppolicy get(nitro_service service, String name) throws Exception{ cmppolicy obj = new cmppolicy(); obj.set_name(name); cmppolicy response = (cmppolicy) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12170
vpnvserver_vpnurl_binding.get
train
public static vpnvserver_vpnurl_binding[] get(nitro_service service, String name) throws Exception{ vpnvserver_vpnurl_binding obj = new vpnvserver_vpnurl_binding(); obj.set_name(name); vpnvserver_vpnurl_binding response[] = (vpnvserver_vpnurl_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12171
appfwsettings.update
train
public static base_response update(nitro_service client, appfwsettings resource) throws Exception { appfwsettings updateresource = new appfwsettings(); updateresource.defaultprofile = resource.defaultprofile; updateresource.undefaction = resource.undefaction; updateresource.sessiontimeout = resource.sessiontimeout; updateresource.learnratelimit = resource.learnratelimit; updateresource.sessionlifetime = resource.sessionlifetime; updateresource.sessioncookiename = resource.sessioncookiename; updateresource.clientiploggingheader = resource.clientiploggingheader; updateresource.importsizelimit = resource.importsizelimit; updateresource.signatureautoupdate = resource.signatureautoupdate; updateresource.signatureurl = resource.signatureurl; updateresource.cookiepostencryptprefix = resource.cookiepostencryptprefix; updateresource.logmalformedreq = resource.logmalformedreq; updateresource.ceflogging = resource.ceflogging; updateresource.entitydecoding = resource.entitydecoding; updateresource.useconfigurablesecretkey = resource.useconfigurablesecretkey; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12172
appfwsettings.unset
train
public static base_response unset(nitro_service client, appfwsettings resource, String[] args) throws Exception{ appfwsettings unsetresource = new appfwsettings(); return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q12173
appfwsettings.get
train
public static appfwsettings get(nitro_service service) throws Exception{ appfwsettings obj = new appfwsettings(); appfwsettings[] response = (appfwsettings[])obj.get_resources(service); return response[0]; }
java
{ "resource": "" }
q12174
spilloverpolicy_csvserver_binding.get
train
public static spilloverpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{ spilloverpolicy_csvserver_binding obj = new spilloverpolicy_csvserver_binding(); obj.set_name(name); spilloverpolicy_csvserver_binding response[] = (spilloverpolicy_csvserver_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12175
policydataset_binding.get
train
public static policydataset_binding get(nitro_service service, String name) throws Exception{ policydataset_binding obj = new policydataset_binding(); obj.set_name(name); policydataset_binding response = (policydataset_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12176
sslservice_binding.get
train
public static sslservice_binding get(nitro_service service, String servicename) throws Exception{ sslservice_binding obj = new sslservice_binding(); obj.set_servicename(servicename); sslservice_binding response = (sslservice_binding) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12177
nsconsoleloginprompt.update
train
public static base_response update(nitro_service client, nsconsoleloginprompt resource) throws Exception { nsconsoleloginprompt updateresource = new nsconsoleloginprompt(); updateresource.promptstring = resource.promptstring; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12178
nsconsoleloginprompt.unset
train
public static base_response unset(nitro_service client, nsconsoleloginprompt resource, String[] args) throws Exception{ nsconsoleloginprompt unsetresource = new nsconsoleloginprompt(); return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q12179
nsconsoleloginprompt.get
train
public static nsconsoleloginprompt get(nitro_service service, options option) throws Exception{ nsconsoleloginprompt obj = new nsconsoleloginprompt(); nsconsoleloginprompt[] response = (nsconsoleloginprompt[])obj.get_resources(service,option); return response[0]; }
java
{ "resource": "" }
q12180
forwardingsession.add
train
public static base_response add(nitro_service client, forwardingsession resource) throws Exception { forwardingsession addresource = new forwardingsession(); addresource.name = resource.name; addresource.network = resource.network; addresource.netmask = resource.netmask; addresource.acl6name = resource.acl6name; addresource.aclname = resource.aclname; addresource.connfailover = resource.connfailover; return addresource.add_resource(client); }
java
{ "resource": "" }
q12181
forwardingsession.add
train
public static base_responses add(nitro_service client, forwardingsession resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { forwardingsession addresources[] = new forwardingsession[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new forwardingsession(); addresources[i].name = resources[i].name; addresources[i].network = resources[i].network; addresources[i].netmask = resources[i].netmask; addresources[i].acl6name = resources[i].acl6name; addresources[i].aclname = resources[i].aclname; addresources[i].connfailover = resources[i].connfailover; } result = add_bulk_request(client, addresources); } return result; }
java
{ "resource": "" }
q12182
forwardingsession.update
train
public static base_response update(nitro_service client, forwardingsession resource) throws Exception { forwardingsession updateresource = new forwardingsession(); updateresource.name = resource.name; updateresource.connfailover = resource.connfailover; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12183
forwardingsession.update
train
public static base_responses update(nitro_service client, forwardingsession resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { forwardingsession updateresources[] = new forwardingsession[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new forwardingsession(); updateresources[i].name = resources[i].name; updateresources[i].connfailover = resources[i].connfailover; } result = update_bulk_request(client, updateresources); } return result; }
java
{ "resource": "" }
q12184
forwardingsession.get
train
public static forwardingsession[] get(nitro_service service) throws Exception{ forwardingsession obj = new forwardingsession(); forwardingsession[] response = (forwardingsession[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12185
forwardingsession.get
train
public static forwardingsession get(nitro_service service, String name) throws Exception{ forwardingsession obj = new forwardingsession(); obj.set_name(name); forwardingsession response = (forwardingsession) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12186
aaapreauthenticationpolicy_vpnvserver_binding.get
train
public static aaapreauthenticationpolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{ aaapreauthenticationpolicy_vpnvserver_binding obj = new aaapreauthenticationpolicy_vpnvserver_binding(); obj.set_name(name); aaapreauthenticationpolicy_vpnvserver_binding response[] = (aaapreauthenticationpolicy_vpnvserver_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12187
authenticationcertpolicy_vpnvserver_binding.get
train
public static authenticationcertpolicy_vpnvserver_binding[] get(nitro_service service, String name) throws Exception{ authenticationcertpolicy_vpnvserver_binding obj = new authenticationcertpolicy_vpnvserver_binding(); obj.set_name(name); authenticationcertpolicy_vpnvserver_binding response[] = (authenticationcertpolicy_vpnvserver_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12188
appfwpolicy.get
train
public static appfwpolicy[] get(nitro_service service) throws Exception{ appfwpolicy obj = new appfwpolicy(); appfwpolicy[] response = (appfwpolicy[])obj.get_resources(service); return response; }
java
{ "resource": "" }
q12189
appfwpolicy.get
train
public static appfwpolicy get(nitro_service service, String name) throws Exception{ appfwpolicy obj = new appfwpolicy(); obj.set_name(name); appfwpolicy response = (appfwpolicy) obj.get_resource(service); return response; }
java
{ "resource": "" }
q12190
appfwpolicy.get_filtered
train
public static appfwpolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ appfwpolicy obj = new appfwpolicy(); options option = new options(); option.set_filter(filter); appfwpolicy[] response = (appfwpolicy[]) obj.getfiltered(service, option); return response; }
java
{ "resource": "" }
q12191
NERGUI.buildContentPanel
train
private void buildContentPanel() { editorPane = new JEditorPane (); editorPane.setContentType("text/rtf"); editorPane.addKeyListener(new InputListener()); // defaultAttrSet = ((StyledEditorKit)editorPane.getEditorKit()).getInputAttributes(); StyleConstants.setFontFamily(defaultAttrSet, "Lucida Sans"); Document doc = new DefaultStyledDocument(); editorPane.setDocument(doc); try { doc.insertString(0, initText, defaultAttrSet); } catch (Exception ex) { throw new RuntimeException(ex); } JScrollPane scrollPane = new JScrollPane(editorPane); frame.getContentPane().add(scrollPane, BorderLayout.CENTER); editorPane.setEditable(true); }
java
{ "resource": "" }
q12192
NERGUI.getNColors
train
public static Color[] getNColors(int n) { Color[] colors = new Color[n]; if (n <= basicColors.length) { System.arraycopy(basicColors, 0, colors, 0, n); } else { int s = 255 / (int)Math.ceil(Math.pow(n, (1.0 / 3.0))); int index = 0; OUTER: for (int i = 0; i < 256; i += s) { for (int j = 0; j < 256; j += s) { for (int k = 0; k < 256; k += s) { colors[index++] = new Color(i,j,k); if (index == n) { break OUTER; } } } } } return colors; }
java
{ "resource": "" }
q12193
NERGUI.main
train
public static void main(String[] args) { //Schedule a job for the event-dispatching thread: //creating and showing this application's GUI. SwingUtilities.invokeLater(new Runnable() { public void run() { NERGUI gui = new NERGUI(); gui.createAndShowGUI(); } }); }
java
{ "resource": "" }
q12194
hanode_partialfailureinterfaces_binding.get
train
public static hanode_partialfailureinterfaces_binding[] get(nitro_service service, Long id) throws Exception{ hanode_partialfailureinterfaces_binding obj = new hanode_partialfailureinterfaces_binding(); obj.set_id(id); hanode_partialfailureinterfaces_binding response[] = (hanode_partialfailureinterfaces_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }
q12195
l4param.update
train
public static base_response update(nitro_service client, l4param resource) throws Exception { l4param updateresource = new l4param(); updateresource.l2connmethod = resource.l2connmethod; updateresource.l4switch = resource.l4switch; return updateresource.update_resource(client); }
java
{ "resource": "" }
q12196
l4param.unset
train
public static base_response unset(nitro_service client, l4param resource, String[] args) throws Exception{ l4param unsetresource = new l4param(); return unsetresource.unset_resource(client,args); }
java
{ "resource": "" }
q12197
l4param.get
train
public static l4param get(nitro_service service) throws Exception{ l4param obj = new l4param(); l4param[] response = (l4param[])obj.get_resources(service); return response[0]; }
java
{ "resource": "" }
q12198
CHTBLexer.main
train
public static void main(String argv[]) { if (argv.length == 0) { System.out.println("Usage : java CHTBLexer <inputfile>"); } else { for (int i = 0; i < argv.length; i++) { CHTBLexer scanner = null; try { scanner = new CHTBLexer( new java.io.FileReader(argv[i]) ); while ( !scanner.zzAtEOF ) scanner.yylex(); } catch (java.io.FileNotFoundException e) { System.out.println("File not found : \""+argv[i]+"\""); } catch (java.io.IOException e) { System.out.println("IO error scanning file \""+argv[i]+"\""); System.out.println(e); } catch (Exception e) { System.out.println("Unexpected exception:"); e.printStackTrace(); } } } }
java
{ "resource": "" }
q12199
lbmetrictable_metric_binding.get
train
public static lbmetrictable_metric_binding[] get(nitro_service service, String metrictable) throws Exception{ lbmetrictable_metric_binding obj = new lbmetrictable_metric_binding(); obj.set_metrictable(metrictable); lbmetrictable_metric_binding response[] = (lbmetrictable_metric_binding[]) obj.get_resources(service); return response; }
java
{ "resource": "" }