repo
stringlengths 7
58
| path
stringlengths 12
218
| func_name
stringlengths 3
140
| original_string
stringlengths 73
34.1k
| language
stringclasses 1
value | code
stringlengths 73
34.1k
| code_tokens
sequence | docstring
stringlengths 3
16k
| docstring_tokens
sequence | sha
stringlengths 40
40
| url
stringlengths 105
339
| partition
stringclasses 1
value |
---|---|---|---|---|---|---|---|---|---|---|---|
Axway/Grapes | server/src/main/java/org/axway/grapes/server/config/Messages.java | Messages.loadFile | private static void loadFile(String filePath) {
final Path path = FileSystems.getDefault().getPath(filePath);
try {
data.clear();
data.load(Files.newBufferedReader(path));
} catch(IOException e) {
LOG.warn("Exception while loading " + path.toString(), e);
}
} | java | private static void loadFile(String filePath) {
final Path path = FileSystems.getDefault().getPath(filePath);
try {
data.clear();
data.load(Files.newBufferedReader(path));
} catch(IOException e) {
LOG.warn("Exception while loading " + path.toString(), e);
}
} | [
"private",
"static",
"void",
"loadFile",
"(",
"String",
"filePath",
")",
"{",
"final",
"Path",
"path",
"=",
"FileSystems",
".",
"getDefault",
"(",
")",
".",
"getPath",
"(",
"filePath",
")",
";",
"try",
"{",
"data",
".",
"clear",
"(",
")",
";",
"data",
".",
"load",
"(",
"Files",
".",
"newBufferedReader",
"(",
"path",
")",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"LOG",
".",
"warn",
"(",
"\"Exception while loading \"",
"+",
"path",
".",
"toString",
"(",
")",
",",
"e",
")",
";",
"}",
"}"
] | Loads the file content in the properties collection
@param filePath The path of the file to be loaded | [
"Loads",
"the",
"file",
"content",
"in",
"the",
"properties",
"collection"
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/config/Messages.java#L45-L54 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/ArgumentDescriptor.java | ArgumentDescriptor.setValue | public void setValue(String constantValue)
{
this.fieldSource = SOURCE_VALUE;
this.fieldRefName = null;
this.returnedByProcedure = false;
this.constantValue = constantValue;
} | java | public void setValue(String constantValue)
{
this.fieldSource = SOURCE_VALUE;
this.fieldRefName = null;
this.returnedByProcedure = false;
this.constantValue = constantValue;
} | [
"public",
"void",
"setValue",
"(",
"String",
"constantValue",
")",
"{",
"this",
".",
"fieldSource",
"=",
"SOURCE_VALUE",
";",
"this",
".",
"fieldRefName",
"=",
"null",
";",
"this",
".",
"returnedByProcedure",
"=",
"false",
";",
"this",
".",
"constantValue",
"=",
"constantValue",
";",
"}"
] | Sets up this object to represent an argument that will be set to a
constant value.
@param constantValue the constant value. | [
"Sets",
"up",
"this",
"object",
"to",
"represent",
"an",
"argument",
"that",
"will",
"be",
"set",
"to",
"a",
"constant",
"value",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/ArgumentDescriptor.java#L122-L128 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/ArgumentDescriptor.java | ArgumentDescriptor.getJdbcType | public final int getJdbcType()
{
switch (this.fieldSource)
{
case SOURCE_FIELD :
return this.getFieldRef().getJdbcType().getType();
case SOURCE_NULL :
return java.sql.Types.NULL;
case SOURCE_VALUE :
return java.sql.Types.VARCHAR;
default :
return java.sql.Types.NULL;
}
} | java | public final int getJdbcType()
{
switch (this.fieldSource)
{
case SOURCE_FIELD :
return this.getFieldRef().getJdbcType().getType();
case SOURCE_NULL :
return java.sql.Types.NULL;
case SOURCE_VALUE :
return java.sql.Types.VARCHAR;
default :
return java.sql.Types.NULL;
}
} | [
"public",
"final",
"int",
"getJdbcType",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"fieldSource",
")",
"{",
"case",
"SOURCE_FIELD",
":",
"return",
"this",
".",
"getFieldRef",
"(",
")",
".",
"getJdbcType",
"(",
")",
".",
"getType",
"(",
")",
";",
"case",
"SOURCE_NULL",
":",
"return",
"java",
".",
"sql",
".",
"Types",
".",
"NULL",
";",
"case",
"SOURCE_VALUE",
":",
"return",
"java",
".",
"sql",
".",
"Types",
".",
"VARCHAR",
";",
"default",
":",
"return",
"java",
".",
"sql",
".",
"Types",
".",
"NULL",
";",
"}",
"}"
] | Retrieve the jdbc type for the field descriptor that is related
to this argument. | [
"Retrieve",
"the",
"jdbc",
"type",
"for",
"the",
"field",
"descriptor",
"that",
"is",
"related",
"to",
"this",
"argument",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/ArgumentDescriptor.java#L215-L228 | train |
geomajas/geomajas-project-server | plugin/cache/cache/src/main/java/org/geomajas/plugin/caching/step/GetFeaturesEachCachingInterceptor.java | GetFeaturesEachCachingInterceptor.isCacheable | private boolean isCacheable(PipelineContext context) throws GeomajasException {
VectorLayer layer = context.get(PipelineCode.LAYER_KEY, VectorLayer.class);
return !(layer instanceof VectorLayerLazyFeatureConversionSupport &&
((VectorLayerLazyFeatureConversionSupport) layer).useLazyFeatureConversion());
} | java | private boolean isCacheable(PipelineContext context) throws GeomajasException {
VectorLayer layer = context.get(PipelineCode.LAYER_KEY, VectorLayer.class);
return !(layer instanceof VectorLayerLazyFeatureConversionSupport &&
((VectorLayerLazyFeatureConversionSupport) layer).useLazyFeatureConversion());
} | [
"private",
"boolean",
"isCacheable",
"(",
"PipelineContext",
"context",
")",
"throws",
"GeomajasException",
"{",
"VectorLayer",
"layer",
"=",
"context",
".",
"get",
"(",
"PipelineCode",
".",
"LAYER_KEY",
",",
"VectorLayer",
".",
"class",
")",
";",
"return",
"!",
"(",
"layer",
"instanceof",
"VectorLayerLazyFeatureConversionSupport",
"&&",
"(",
"(",
"VectorLayerLazyFeatureConversionSupport",
")",
"layer",
")",
".",
"useLazyFeatureConversion",
"(",
")",
")",
";",
"}"
] | Features are only cacheable when not converted lazily as lazy features are incomplete, it would put detached
objects in the cache.
@return true when features are not converted lazily | [
"Features",
"are",
"only",
"cacheable",
"when",
"not",
"converted",
"lazily",
"as",
"lazy",
"features",
"are",
"incomplete",
"it",
"would",
"put",
"detached",
"objects",
"in",
"the",
"cache",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/cache/cache/src/main/java/org/geomajas/plugin/caching/step/GetFeaturesEachCachingInterceptor.java#L71-L75 | train |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/configuration/RasterLayerInfo.java | RasterLayerInfo.getResolutions | @Deprecated
public List<Double> getResolutions() {
List<Double> resolutions = new ArrayList<Double>();
for (ScaleInfo scale : getZoomLevels()) {
resolutions.add(1. / scale.getPixelPerUnit());
}
return resolutions;
} | java | @Deprecated
public List<Double> getResolutions() {
List<Double> resolutions = new ArrayList<Double>();
for (ScaleInfo scale : getZoomLevels()) {
resolutions.add(1. / scale.getPixelPerUnit());
}
return resolutions;
} | [
"@",
"Deprecated",
"public",
"List",
"<",
"Double",
">",
"getResolutions",
"(",
")",
"{",
"List",
"<",
"Double",
">",
"resolutions",
"=",
"new",
"ArrayList",
"<",
"Double",
">",
"(",
")",
";",
"for",
"(",
"ScaleInfo",
"scale",
":",
"getZoomLevels",
"(",
")",
")",
"{",
"resolutions",
".",
"add",
"(",
"1.",
"/",
"scale",
".",
"getPixelPerUnit",
"(",
")",
")",
";",
"}",
"return",
"resolutions",
";",
"}"
] | Get the list of supported resolutions for the layer. Each resolution is specified in map units per pixel.
@return list of supported resolutions
@deprecated use {@link #getZoomLevels()} | [
"Get",
"the",
"list",
"of",
"supported",
"resolutions",
"for",
"the",
"layer",
".",
"Each",
"resolution",
"is",
"specified",
"in",
"map",
"units",
"per",
"pixel",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/configuration/RasterLayerInfo.java#L126-L133 | train |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/configuration/RasterLayerInfo.java | RasterLayerInfo.setResolutions | @Deprecated
public void setResolutions(List<Double> resolutions) {
getZoomLevels().clear();
for (Double resolution : resolutions) {
getZoomLevels().add(new ScaleInfo(1. / resolution));
}
} | java | @Deprecated
public void setResolutions(List<Double> resolutions) {
getZoomLevels().clear();
for (Double resolution : resolutions) {
getZoomLevels().add(new ScaleInfo(1. / resolution));
}
} | [
"@",
"Deprecated",
"public",
"void",
"setResolutions",
"(",
"List",
"<",
"Double",
">",
"resolutions",
")",
"{",
"getZoomLevels",
"(",
")",
".",
"clear",
"(",
")",
";",
"for",
"(",
"Double",
"resolution",
":",
"resolutions",
")",
"{",
"getZoomLevels",
"(",
")",
".",
"add",
"(",
"new",
"ScaleInfo",
"(",
"1.",
"/",
"resolution",
")",
")",
";",
"}",
"}"
] | Set the list of supported resolutions. Each resolution is specified in map units per pixel.
@param resolutions
resolutions
@deprecated use {@link #setZoomLevels()} | [
"Set",
"the",
"list",
"of",
"supported",
"resolutions",
".",
"Each",
"resolution",
"is",
"specified",
"in",
"map",
"units",
"per",
"pixel",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/configuration/RasterLayerInfo.java#L142-L148 | train |
caligin/tinytypes | jersey/src/main/java/tech/anima/tinytypes/jersey/JerseyResponseSupport.java | JerseyResponseSupport.registerTinyTypes | public static void registerTinyTypes(Class<?> head, Class<?>... tail) {
final Set<HeaderDelegateProvider> systemRegisteredHeaderProviders = stealAcquireRefToHeaderDelegateProviders();
register(head, systemRegisteredHeaderProviders);
for (Class<?> tt : tail) {
register(tt, systemRegisteredHeaderProviders);
}
} | java | public static void registerTinyTypes(Class<?> head, Class<?>... tail) {
final Set<HeaderDelegateProvider> systemRegisteredHeaderProviders = stealAcquireRefToHeaderDelegateProviders();
register(head, systemRegisteredHeaderProviders);
for (Class<?> tt : tail) {
register(tt, systemRegisteredHeaderProviders);
}
} | [
"public",
"static",
"void",
"registerTinyTypes",
"(",
"Class",
"<",
"?",
">",
"head",
",",
"Class",
"<",
"?",
">",
"...",
"tail",
")",
"{",
"final",
"Set",
"<",
"HeaderDelegateProvider",
">",
"systemRegisteredHeaderProviders",
"=",
"stealAcquireRefToHeaderDelegateProviders",
"(",
")",
";",
"register",
"(",
"head",
",",
"systemRegisteredHeaderProviders",
")",
";",
"for",
"(",
"Class",
"<",
"?",
">",
"tt",
":",
"tail",
")",
"{",
"register",
"(",
"tt",
",",
"systemRegisteredHeaderProviders",
")",
";",
"}",
"}"
] | Registers Jersey HeaderDelegateProviders for the specified TinyTypes.
@param head a TinyType
@param tail other TinyTypes
@throws IllegalArgumentException when a non-TinyType is given | [
"Registers",
"Jersey",
"HeaderDelegateProviders",
"for",
"the",
"specified",
"TinyTypes",
"."
] | 3f79b3b35e241770a9ea0a72782210b0c2b79eb0 | https://github.com/caligin/tinytypes/blob/3f79b3b35e241770a9ea0a72782210b0c2b79eb0/jersey/src/main/java/tech/anima/tinytypes/jersey/JerseyResponseSupport.java#L22-L28 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/db/mongo/JongoUtils.java | JongoUtils.generateQuery | public static String generateQuery(final Map<String,Object> params){
final StringBuilder sb = new StringBuilder();
boolean newEntry = false;
sb.append("{");
for(final Entry<String,Object> param: params.entrySet()){
if(newEntry){
sb.append(", ");
}
sb.append(param.getKey());
sb.append(": ");
sb.append(getParam(param.getValue()));
newEntry = true;
}
sb.append("}");
return sb.toString();
} | java | public static String generateQuery(final Map<String,Object> params){
final StringBuilder sb = new StringBuilder();
boolean newEntry = false;
sb.append("{");
for(final Entry<String,Object> param: params.entrySet()){
if(newEntry){
sb.append(", ");
}
sb.append(param.getKey());
sb.append(": ");
sb.append(getParam(param.getValue()));
newEntry = true;
}
sb.append("}");
return sb.toString();
} | [
"public",
"static",
"String",
"generateQuery",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"newEntry",
"=",
"false",
";",
"sb",
".",
"append",
"(",
"\"{\"",
")",
";",
"for",
"(",
"final",
"Entry",
"<",
"String",
",",
"Object",
">",
"param",
":",
"params",
".",
"entrySet",
"(",
")",
")",
"{",
"if",
"(",
"newEntry",
")",
"{",
"sb",
".",
"append",
"(",
"\", \"",
")",
";",
"}",
"sb",
".",
"append",
"(",
"param",
".",
"getKey",
"(",
")",
")",
";",
"sb",
".",
"append",
"(",
"\": \"",
")",
";",
"sb",
".",
"append",
"(",
"getParam",
"(",
"param",
".",
"getValue",
"(",
")",
")",
")",
";",
"newEntry",
"=",
"true",
";",
"}",
"sb",
".",
"append",
"(",
"\"}\"",
")",
";",
"return",
"sb",
".",
"toString",
"(",
")",
";",
"}"
] | Generate a Jongo query regarding a set of parameters.
@param params Map<queryKey, queryValue> of query parameters
@return String | [
"Generate",
"a",
"Jongo",
"query",
"regarding",
"a",
"set",
"of",
"parameters",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/db/mongo/JongoUtils.java#L28-L46 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/db/mongo/JongoUtils.java | JongoUtils.generateQuery | public static String generateQuery(final String key, final Object value) {
final Map<String, Object> params = new HashMap<>();
params.put(key, value);
return generateQuery(params);
} | java | public static String generateQuery(final String key, final Object value) {
final Map<String, Object> params = new HashMap<>();
params.put(key, value);
return generateQuery(params);
} | [
"public",
"static",
"String",
"generateQuery",
"(",
"final",
"String",
"key",
",",
"final",
"Object",
"value",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"params",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"generateQuery",
"(",
"params",
")",
";",
"}"
] | Generate a Jongo query with provided the parameter.
@param key
@param value
@return String | [
"Generate",
"a",
"Jongo",
"query",
"with",
"provided",
"the",
"parameter",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/db/mongo/JongoUtils.java#L55-L59 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/db/mongo/JongoUtils.java | JongoUtils.getParam | private static Object getParam(final Object param) {
final StringBuilder sb = new StringBuilder();
if(param instanceof String){
sb.append("'");
sb.append((String)param);
sb.append("'");
}
else if(param instanceof Boolean){
sb.append(String.valueOf((Boolean)param));
}
else if(param instanceof Integer){
sb.append(String.valueOf((Integer)param));
}
else if(param instanceof DBRegExp){
sb.append('/');
sb.append(((DBRegExp) param).toString());
sb.append('/');
}
return sb.toString();
} | java | private static Object getParam(final Object param) {
final StringBuilder sb = new StringBuilder();
if(param instanceof String){
sb.append("'");
sb.append((String)param);
sb.append("'");
}
else if(param instanceof Boolean){
sb.append(String.valueOf((Boolean)param));
}
else if(param instanceof Integer){
sb.append(String.valueOf((Integer)param));
}
else if(param instanceof DBRegExp){
sb.append('/');
sb.append(((DBRegExp) param).toString());
sb.append('/');
}
return sb.toString();
} | [
"private",
"static",
"Object",
"getParam",
"(",
"final",
"Object",
"param",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"param",
"instanceof",
"String",
")",
"{",
"sb",
".",
"append",
"(",
"\"'\"",
")",
";",
"sb",
".",
"append",
"(",
"(",
"String",
")",
"param",
")",
";",
"sb",
".",
"append",
"(",
"\"'\"",
")",
";",
"}",
"else",
"if",
"(",
"param",
"instanceof",
"Boolean",
")",
"{",
"sb",
".",
"append",
"(",
"String",
".",
"valueOf",
"(",
"(",
"Boolean",
")",
"param",
")",
")",
";",
"}",
"else",
"if",
"(",
"param",
"instanceof",
"Integer",
")",
"{",
"sb",
".",
"append",
"(",
"String",
".",
"valueOf",
"(",
"(",
"Integer",
")",
"param",
")",
")",
";",
"}",
"else",
"if",
"(",
"param",
"instanceof",
"DBRegExp",
")",
"{",
"sb",
".",
"append",
"(",
"'",
"'",
")",
";",
"sb",
".",
"append",
"(",
"(",
"(",
"DBRegExp",
")",
"param",
")",
".",
"toString",
"(",
")",
")",
";",
"sb",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"return",
"sb",
".",
"toString",
"(",
")",
";",
"}"
] | Handle the serialization of String, Integer and boolean parameters.
@param param to serialize
@return Object | [
"Handle",
"the",
"serialization",
"of",
"String",
"Integer",
"and",
"boolean",
"parameters",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/db/mongo/JongoUtils.java#L67-L87 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/util/SqlHelper.java | SqlHelper.getOjbClassName | public static String getOjbClassName(ResultSet rs)
{
try
{
return rs.getString(OJB_CLASS_COLUMN);
}
catch (SQLException e)
{
return null;
}
} | java | public static String getOjbClassName(ResultSet rs)
{
try
{
return rs.getString(OJB_CLASS_COLUMN);
}
catch (SQLException e)
{
return null;
}
} | [
"public",
"static",
"String",
"getOjbClassName",
"(",
"ResultSet",
"rs",
")",
"{",
"try",
"{",
"return",
"rs",
".",
"getString",
"(",
"OJB_CLASS_COLUMN",
")",
";",
"}",
"catch",
"(",
"SQLException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}"
] | Returns the name of the class to be instantiated.
@param rs the Resultset
@return null if the column is not available | [
"Returns",
"the",
"name",
"of",
"the",
"class",
"to",
"be",
"instantiated",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/SqlHelper.java#L135-L145 | train |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/soda/QueryImpl.java | QueryImpl.setOjbQuery | public void setOjbQuery(org.apache.ojb.broker.query.Query ojbQuery)
{
this.ojbQuery = ojbQuery;
} | java | public void setOjbQuery(org.apache.ojb.broker.query.Query ojbQuery)
{
this.ojbQuery = ojbQuery;
} | [
"public",
"void",
"setOjbQuery",
"(",
"org",
".",
"apache",
".",
"ojb",
".",
"broker",
".",
"query",
".",
"Query",
"ojbQuery",
")",
"{",
"this",
".",
"ojbQuery",
"=",
"ojbQuery",
";",
"}"
] | Sets the ojbQuery, needed only as long we
don't support the soda constraint stuff.
@param ojbQuery The ojbQuery to set | [
"Sets",
"the",
"ojbQuery",
"needed",
"only",
"as",
"long",
"we",
"don",
"t",
"support",
"the",
"soda",
"constraint",
"stuff",
"."
] | 9a544372f67ce965f662cdc71609dd03683c8f04 | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/soda/QueryImpl.java#L128-L131 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java | OrganizationResource.getCorporateGroupIdPrefix | @GET
@Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
@Path("/{name}" + ServerAPI.GET_CORPORATE_GROUPIDS)
public Response getCorporateGroupIdPrefix(@PathParam("name") final String organizationId){
LOG.info("Got a get corporate groupId prefix request for organization " + organizationId +".");
final ListView view = new ListView("Organization " + organizationId, "Corporate GroupId Prefix");
final List<String> corporateGroupIds = getOrganizationHandler().getCorporateGroupIds(organizationId);
view.addAll(corporateGroupIds);
return Response.ok(view).build();
} | java | @GET
@Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
@Path("/{name}" + ServerAPI.GET_CORPORATE_GROUPIDS)
public Response getCorporateGroupIdPrefix(@PathParam("name") final String organizationId){
LOG.info("Got a get corporate groupId prefix request for organization " + organizationId +".");
final ListView view = new ListView("Organization " + organizationId, "Corporate GroupId Prefix");
final List<String> corporateGroupIds = getOrganizationHandler().getCorporateGroupIds(organizationId);
view.addAll(corporateGroupIds);
return Response.ok(view).build();
} | [
"@",
"GET",
"@",
"Produces",
"(",
"{",
"MediaType",
".",
"TEXT_HTML",
",",
"MediaType",
".",
"APPLICATION_JSON",
"}",
")",
"@",
"Path",
"(",
"\"/{name}\"",
"+",
"ServerAPI",
".",
"GET_CORPORATE_GROUPIDS",
")",
"public",
"Response",
"getCorporateGroupIdPrefix",
"(",
"@",
"PathParam",
"(",
"\"name\"",
")",
"final",
"String",
"organizationId",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Got a get corporate groupId prefix request for organization \"",
"+",
"organizationId",
"+",
"\".\"",
")",
";",
"final",
"ListView",
"view",
"=",
"new",
"ListView",
"(",
"\"Organization \"",
"+",
"organizationId",
",",
"\"Corporate GroupId Prefix\"",
")",
";",
"final",
"List",
"<",
"String",
">",
"corporateGroupIds",
"=",
"getOrganizationHandler",
"(",
")",
".",
"getCorporateGroupIds",
"(",
"organizationId",
")",
";",
"view",
".",
"addAll",
"(",
"corporateGroupIds",
")",
";",
"return",
"Response",
".",
"ok",
"(",
"view",
")",
".",
"build",
"(",
")",
";",
"}"
] | Return the list of corporate GroupId prefix configured for an organization.
@param organizationId String Organization name
@return Response A list of corporate groupId prefix in HTML or JSON | [
"Return",
"the",
"list",
"of",
"corporate",
"GroupId",
"prefix",
"configured",
"for",
"an",
"organization",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java#L128-L139 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java | OrganizationResource.addCorporateGroupIdPrefix | @POST
@Path("/{name}" + ServerAPI.GET_CORPORATE_GROUPIDS)
public Response addCorporateGroupIdPrefix(@Auth final DbCredential credential, @PathParam("name") final String organizationId, final String corporateGroupId){
LOG.info("Got an add a corporate groupId prefix request for organization " + organizationId +".");
if(!credential.getRoles().contains(DbCredential.AvailableRoles.DATA_UPDATER)){
throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
}
if(corporateGroupId == null || corporateGroupId.isEmpty()){
LOG.error("No corporate GroupId to add!");
throw new WebApplicationException(Response.serverError().status(HttpStatus.BAD_REQUEST_400)
.entity("CorporateGroupId to add should be in the query content.").build());
}
getOrganizationHandler().addCorporateGroupId(organizationId, corporateGroupId);
return Response.ok().status(HttpStatus.CREATED_201).build();
} | java | @POST
@Path("/{name}" + ServerAPI.GET_CORPORATE_GROUPIDS)
public Response addCorporateGroupIdPrefix(@Auth final DbCredential credential, @PathParam("name") final String organizationId, final String corporateGroupId){
LOG.info("Got an add a corporate groupId prefix request for organization " + organizationId +".");
if(!credential.getRoles().contains(DbCredential.AvailableRoles.DATA_UPDATER)){
throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
}
if(corporateGroupId == null || corporateGroupId.isEmpty()){
LOG.error("No corporate GroupId to add!");
throw new WebApplicationException(Response.serverError().status(HttpStatus.BAD_REQUEST_400)
.entity("CorporateGroupId to add should be in the query content.").build());
}
getOrganizationHandler().addCorporateGroupId(organizationId, corporateGroupId);
return Response.ok().status(HttpStatus.CREATED_201).build();
} | [
"@",
"POST",
"@",
"Path",
"(",
"\"/{name}\"",
"+",
"ServerAPI",
".",
"GET_CORPORATE_GROUPIDS",
")",
"public",
"Response",
"addCorporateGroupIdPrefix",
"(",
"@",
"Auth",
"final",
"DbCredential",
"credential",
",",
"@",
"PathParam",
"(",
"\"name\"",
")",
"final",
"String",
"organizationId",
",",
"final",
"String",
"corporateGroupId",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Got an add a corporate groupId prefix request for organization \"",
"+",
"organizationId",
"+",
"\".\"",
")",
";",
"if",
"(",
"!",
"credential",
".",
"getRoles",
"(",
")",
".",
"contains",
"(",
"DbCredential",
".",
"AvailableRoles",
".",
"DATA_UPDATER",
")",
")",
"{",
"throw",
"new",
"WebApplicationException",
"(",
"Response",
".",
"status",
"(",
"Response",
".",
"Status",
".",
"UNAUTHORIZED",
")",
".",
"build",
"(",
")",
")",
";",
"}",
"if",
"(",
"corporateGroupId",
"==",
"null",
"||",
"corporateGroupId",
".",
"isEmpty",
"(",
")",
")",
"{",
"LOG",
".",
"error",
"(",
"\"No corporate GroupId to add!\"",
")",
";",
"throw",
"new",
"WebApplicationException",
"(",
"Response",
".",
"serverError",
"(",
")",
".",
"status",
"(",
"HttpStatus",
".",
"BAD_REQUEST_400",
")",
".",
"entity",
"(",
"\"CorporateGroupId to add should be in the query content.\"",
")",
".",
"build",
"(",
")",
")",
";",
"}",
"getOrganizationHandler",
"(",
")",
".",
"addCorporateGroupId",
"(",
"organizationId",
",",
"corporateGroupId",
")",
";",
"return",
"Response",
".",
"ok",
"(",
")",
".",
"status",
"(",
"HttpStatus",
".",
"CREATED_201",
")",
".",
"build",
"(",
")",
";",
"}"
] | Add a new Corporate GroupId to an organization.
@param credential DbCredential
@param organizationId String Organization name
@param corporateGroupId String
@return Response | [
"Add",
"a",
"new",
"Corporate",
"GroupId",
"to",
"an",
"organization",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java#L149-L165 | train |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java | OrganizationResource.removeCorporateGroupIdPrefix | @DELETE
@Path("/{name}" + ServerAPI.GET_CORPORATE_GROUPIDS)
public Response removeCorporateGroupIdPrefix(@Auth final DbCredential credential, @PathParam("name") final String organizationId, final String corporateGroupId){
LOG.info("Got an remove a corporate groupId prefix request for organization " + organizationId +".");
if(!credential.getRoles().contains(DbCredential.AvailableRoles.DATA_UPDATER)){
throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
}
if(corporateGroupId == null || corporateGroupId.isEmpty()){
LOG.error("No corporate GroupId to remove!");
return Response.serverError().status(HttpStatus.BAD_REQUEST_400).build();
}
getOrganizationHandler().removeCorporateGroupId(organizationId, corporateGroupId);
return Response.ok("done").build();
} | java | @DELETE
@Path("/{name}" + ServerAPI.GET_CORPORATE_GROUPIDS)
public Response removeCorporateGroupIdPrefix(@Auth final DbCredential credential, @PathParam("name") final String organizationId, final String corporateGroupId){
LOG.info("Got an remove a corporate groupId prefix request for organization " + organizationId +".");
if(!credential.getRoles().contains(DbCredential.AvailableRoles.DATA_UPDATER)){
throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
}
if(corporateGroupId == null || corporateGroupId.isEmpty()){
LOG.error("No corporate GroupId to remove!");
return Response.serverError().status(HttpStatus.BAD_REQUEST_400).build();
}
getOrganizationHandler().removeCorporateGroupId(organizationId, corporateGroupId);
return Response.ok("done").build();
} | [
"@",
"DELETE",
"@",
"Path",
"(",
"\"/{name}\"",
"+",
"ServerAPI",
".",
"GET_CORPORATE_GROUPIDS",
")",
"public",
"Response",
"removeCorporateGroupIdPrefix",
"(",
"@",
"Auth",
"final",
"DbCredential",
"credential",
",",
"@",
"PathParam",
"(",
"\"name\"",
")",
"final",
"String",
"organizationId",
",",
"final",
"String",
"corporateGroupId",
")",
"{",
"LOG",
".",
"info",
"(",
"\"Got an remove a corporate groupId prefix request for organization \"",
"+",
"organizationId",
"+",
"\".\"",
")",
";",
"if",
"(",
"!",
"credential",
".",
"getRoles",
"(",
")",
".",
"contains",
"(",
"DbCredential",
".",
"AvailableRoles",
".",
"DATA_UPDATER",
")",
")",
"{",
"throw",
"new",
"WebApplicationException",
"(",
"Response",
".",
"status",
"(",
"Response",
".",
"Status",
".",
"UNAUTHORIZED",
")",
".",
"build",
"(",
")",
")",
";",
"}",
"if",
"(",
"corporateGroupId",
"==",
"null",
"||",
"corporateGroupId",
".",
"isEmpty",
"(",
")",
")",
"{",
"LOG",
".",
"error",
"(",
"\"No corporate GroupId to remove!\"",
")",
";",
"return",
"Response",
".",
"serverError",
"(",
")",
".",
"status",
"(",
"HttpStatus",
".",
"BAD_REQUEST_400",
")",
".",
"build",
"(",
")",
";",
"}",
"getOrganizationHandler",
"(",
")",
".",
"removeCorporateGroupId",
"(",
"organizationId",
",",
"corporateGroupId",
")",
";",
"return",
"Response",
".",
"ok",
"(",
"\"done\"",
")",
".",
"build",
"(",
")",
";",
"}"
] | Remove an existing Corporate GroupId from an organization.
@return Response | [
"Remove",
"an",
"existing",
"Corporate",
"GroupId",
"from",
"an",
"organization",
"."
] | ce9cc73d85f83eaa5fbc991abb593915a8c8374e | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java#L172-L188 | train |
geomajas/geomajas-project-server | impl/src/main/java/org/geomajas/internal/layer/vector/GetFeaturesEachStep.java | GetFeaturesEachStep.findStyleFilter | private StyleFilter findStyleFilter(Object feature, List<StyleFilter> styles) {
for (StyleFilter styleFilter : styles) {
if (styleFilter.getFilter().evaluate(feature)) {
return styleFilter;
}
}
return new StyleFilterImpl();
} | java | private StyleFilter findStyleFilter(Object feature, List<StyleFilter> styles) {
for (StyleFilter styleFilter : styles) {
if (styleFilter.getFilter().evaluate(feature)) {
return styleFilter;
}
}
return new StyleFilterImpl();
} | [
"private",
"StyleFilter",
"findStyleFilter",
"(",
"Object",
"feature",
",",
"List",
"<",
"StyleFilter",
">",
"styles",
")",
"{",
"for",
"(",
"StyleFilter",
"styleFilter",
":",
"styles",
")",
"{",
"if",
"(",
"styleFilter",
".",
"getFilter",
"(",
")",
".",
"evaluate",
"(",
"feature",
")",
")",
"{",
"return",
"styleFilter",
";",
"}",
"}",
"return",
"new",
"StyleFilterImpl",
"(",
")",
";",
"}"
] | Find the style filter that must be applied to this feature.
@param feature
feature to find the style for
@param styles
style filters to select from
@return a style filter | [
"Find",
"the",
"style",
"filter",
"that",
"must",
"be",
"applied",
"to",
"this",
"feature",
"."
] | 904b7d7deed1350d28955589098dd1e0a786d76e | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/layer/vector/GetFeaturesEachStep.java#L228-L235 | train |
foundation-runtime/logging | logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/AbstractRoller.java | AbstractRoller.roll | final void roll(final long timeForSuffix) {
final File backupFile = this.prepareBackupFile(timeForSuffix);
// close filename
this.getAppender().closeFile();
// rename filename on disk to filename+suffix(+number)
this.doFileRoll(this.getAppender().getIoFile(), backupFile);
// setup new file 'filename'
this.getAppender().openFile();
this.fireFileRollEvent(new FileRollEvent(this, backupFile));
} | java | final void roll(final long timeForSuffix) {
final File backupFile = this.prepareBackupFile(timeForSuffix);
// close filename
this.getAppender().closeFile();
// rename filename on disk to filename+suffix(+number)
this.doFileRoll(this.getAppender().getIoFile(), backupFile);
// setup new file 'filename'
this.getAppender().openFile();
this.fireFileRollEvent(new FileRollEvent(this, backupFile));
} | [
"final",
"void",
"roll",
"(",
"final",
"long",
"timeForSuffix",
")",
"{",
"final",
"File",
"backupFile",
"=",
"this",
".",
"prepareBackupFile",
"(",
"timeForSuffix",
")",
";",
"// close filename",
"this",
".",
"getAppender",
"(",
")",
".",
"closeFile",
"(",
")",
";",
"// rename filename on disk to filename+suffix(+number)",
"this",
".",
"doFileRoll",
"(",
"this",
".",
"getAppender",
"(",
")",
".",
"getIoFile",
"(",
")",
",",
"backupFile",
")",
";",
"// setup new file 'filename'",
"this",
".",
"getAppender",
"(",
")",
".",
"openFile",
"(",
")",
";",
"this",
".",
"fireFileRollEvent",
"(",
"new",
"FileRollEvent",
"(",
"this",
",",
"backupFile",
")",
")",
";",
"}"
] | Invoked by subclasses; performs actual file roll. Tests to see whether roll
is necessary have already been performed, so just do it. | [
"Invoked",
"by",
"subclasses",
";",
"performs",
"actual",
"file",
"roll",
".",
"Tests",
"to",
"see",
"whether",
"roll",
"is",
"necessary",
"have",
"already",
"been",
"performed",
"so",
"just",
"do",
"it",
"."
] | cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6 | https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/AbstractRoller.java#L139-L153 | train |
foundation-runtime/logging | logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/AbstractRoller.java | AbstractRoller.doFileRoll | private void doFileRoll(final File from, final File to) {
final FileHelper fileHelper = FileHelper.getInstance();
if (!fileHelper.deleteExisting(to)) {
this.getAppender().getErrorHandler()
.error("Unable to delete existing " + to + " for rename");
}
final String original = from.toString();
if (fileHelper.rename(from, to)) {
LogLog.debug("Renamed " + original + " to " + to);
} else {
this.getAppender().getErrorHandler()
.error("Unable to rename " + original + " to " + to);
}
} | java | private void doFileRoll(final File from, final File to) {
final FileHelper fileHelper = FileHelper.getInstance();
if (!fileHelper.deleteExisting(to)) {
this.getAppender().getErrorHandler()
.error("Unable to delete existing " + to + " for rename");
}
final String original = from.toString();
if (fileHelper.rename(from, to)) {
LogLog.debug("Renamed " + original + " to " + to);
} else {
this.getAppender().getErrorHandler()
.error("Unable to rename " + original + " to " + to);
}
} | [
"private",
"void",
"doFileRoll",
"(",
"final",
"File",
"from",
",",
"final",
"File",
"to",
")",
"{",
"final",
"FileHelper",
"fileHelper",
"=",
"FileHelper",
".",
"getInstance",
"(",
")",
";",
"if",
"(",
"!",
"fileHelper",
".",
"deleteExisting",
"(",
"to",
")",
")",
"{",
"this",
".",
"getAppender",
"(",
")",
".",
"getErrorHandler",
"(",
")",
".",
"error",
"(",
"\"Unable to delete existing \"",
"+",
"to",
"+",
"\" for rename\"",
")",
";",
"}",
"final",
"String",
"original",
"=",
"from",
".",
"toString",
"(",
")",
";",
"if",
"(",
"fileHelper",
".",
"rename",
"(",
"from",
",",
"to",
")",
")",
"{",
"LogLog",
".",
"debug",
"(",
"\"Renamed \"",
"+",
"original",
"+",
"\" to \"",
"+",
"to",
")",
";",
"}",
"else",
"{",
"this",
".",
"getAppender",
"(",
")",
".",
"getErrorHandler",
"(",
")",
".",
"error",
"(",
"\"Unable to rename \"",
"+",
"original",
"+",
"\" to \"",
"+",
"to",
")",
";",
"}",
"}"
] | Renames the current base log file to the roll file name.
@param from
The current base log file.
@param to
The backup file. | [
"Renames",
"the",
"current",
"base",
"log",
"file",
"to",
"the",
"roll",
"file",
"name",
"."
] | cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6 | https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/AbstractRoller.java#L210-L223 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy_lbvserver_binding.java | spilloverpolicy_lbvserver_binding.get | public static spilloverpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
spilloverpolicy_lbvserver_binding obj = new spilloverpolicy_lbvserver_binding();
obj.set_name(name);
spilloverpolicy_lbvserver_binding response[] = (spilloverpolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | java | public static spilloverpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
spilloverpolicy_lbvserver_binding obj = new spilloverpolicy_lbvserver_binding();
obj.set_name(name);
spilloverpolicy_lbvserver_binding response[] = (spilloverpolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"spilloverpolicy_lbvserver_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"spilloverpolicy_lbvserver_binding",
"obj",
"=",
"new",
"spilloverpolicy_lbvserver_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"spilloverpolicy_lbvserver_binding",
"response",
"[",
"]",
"=",
"(",
"spilloverpolicy_lbvserver_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch spilloverpolicy_lbvserver_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"spilloverpolicy_lbvserver_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy_lbvserver_binding.java#L162-L167 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_excluderescontenttype_binding.java | appfwprofile_excluderescontenttype_binding.get | public static appfwprofile_excluderescontenttype_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_excluderescontenttype_binding obj = new appfwprofile_excluderescontenttype_binding();
obj.set_name(name);
appfwprofile_excluderescontenttype_binding response[] = (appfwprofile_excluderescontenttype_binding[]) obj.get_resources(service);
return response;
} | java | public static appfwprofile_excluderescontenttype_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_excluderescontenttype_binding obj = new appfwprofile_excluderescontenttype_binding();
obj.set_name(name);
appfwprofile_excluderescontenttype_binding response[] = (appfwprofile_excluderescontenttype_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"appfwprofile_excluderescontenttype_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"appfwprofile_excluderescontenttype_binding",
"obj",
"=",
"new",
"appfwprofile_excluderescontenttype_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"appfwprofile_excluderescontenttype_binding",
"response",
"[",
"]",
"=",
"(",
"appfwprofile_excluderescontenttype_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch appfwprofile_excluderescontenttype_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"appfwprofile_excluderescontenttype_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_excluderescontenttype_binding.java#L196-L201 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslparameter.java | sslparameter.update | public static base_response update(nitro_service client, sslparameter resource) throws Exception {
sslparameter updateresource = new sslparameter();
updateresource.quantumsize = resource.quantumsize;
updateresource.crlmemorysizemb = resource.crlmemorysizemb;
updateresource.strictcachecks = resource.strictcachecks;
updateresource.ssltriggertimeout = resource.ssltriggertimeout;
updateresource.sendclosenotify = resource.sendclosenotify;
updateresource.encrypttriggerpktcount = resource.encrypttriggerpktcount;
updateresource.denysslreneg = resource.denysslreneg;
updateresource.insertionencoding = resource.insertionencoding;
updateresource.ocspcachesize = resource.ocspcachesize;
updateresource.pushflag = resource.pushflag;
updateresource.dropreqwithnohostheader = resource.dropreqwithnohostheader;
updateresource.pushenctriggertimeout = resource.pushenctriggertimeout;
updateresource.undefactioncontrol = resource.undefactioncontrol;
updateresource.undefactiondata = resource.undefactiondata;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, sslparameter resource) throws Exception {
sslparameter updateresource = new sslparameter();
updateresource.quantumsize = resource.quantumsize;
updateresource.crlmemorysizemb = resource.crlmemorysizemb;
updateresource.strictcachecks = resource.strictcachecks;
updateresource.ssltriggertimeout = resource.ssltriggertimeout;
updateresource.sendclosenotify = resource.sendclosenotify;
updateresource.encrypttriggerpktcount = resource.encrypttriggerpktcount;
updateresource.denysslreneg = resource.denysslreneg;
updateresource.insertionencoding = resource.insertionencoding;
updateresource.ocspcachesize = resource.ocspcachesize;
updateresource.pushflag = resource.pushflag;
updateresource.dropreqwithnohostheader = resource.dropreqwithnohostheader;
updateresource.pushenctriggertimeout = resource.pushenctriggertimeout;
updateresource.undefactioncontrol = resource.undefactioncontrol;
updateresource.undefactiondata = resource.undefactiondata;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"sslparameter",
"resource",
")",
"throws",
"Exception",
"{",
"sslparameter",
"updateresource",
"=",
"new",
"sslparameter",
"(",
")",
";",
"updateresource",
".",
"quantumsize",
"=",
"resource",
".",
"quantumsize",
";",
"updateresource",
".",
"crlmemorysizemb",
"=",
"resource",
".",
"crlmemorysizemb",
";",
"updateresource",
".",
"strictcachecks",
"=",
"resource",
".",
"strictcachecks",
";",
"updateresource",
".",
"ssltriggertimeout",
"=",
"resource",
".",
"ssltriggertimeout",
";",
"updateresource",
".",
"sendclosenotify",
"=",
"resource",
".",
"sendclosenotify",
";",
"updateresource",
".",
"encrypttriggerpktcount",
"=",
"resource",
".",
"encrypttriggerpktcount",
";",
"updateresource",
".",
"denysslreneg",
"=",
"resource",
".",
"denysslreneg",
";",
"updateresource",
".",
"insertionencoding",
"=",
"resource",
".",
"insertionencoding",
";",
"updateresource",
".",
"ocspcachesize",
"=",
"resource",
".",
"ocspcachesize",
";",
"updateresource",
".",
"pushflag",
"=",
"resource",
".",
"pushflag",
";",
"updateresource",
".",
"dropreqwithnohostheader",
"=",
"resource",
".",
"dropreqwithnohostheader",
";",
"updateresource",
".",
"pushenctriggertimeout",
"=",
"resource",
".",
"pushenctriggertimeout",
";",
"updateresource",
".",
"undefactioncontrol",
"=",
"resource",
".",
"undefactioncontrol",
";",
"updateresource",
".",
"undefactiondata",
"=",
"resource",
".",
"undefactiondata",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update sslparameter. | [
"Use",
"this",
"API",
"to",
"update",
"sslparameter",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslparameter.java#L417-L434 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslparameter.java | sslparameter.unset | public static base_response unset(nitro_service client, sslparameter resource, String[] args) throws Exception{
sslparameter unsetresource = new sslparameter();
return unsetresource.unset_resource(client,args);
} | java | public static base_response unset(nitro_service client, sslparameter resource, String[] args) throws Exception{
sslparameter unsetresource = new sslparameter();
return unsetresource.unset_resource(client,args);
} | [
"public",
"static",
"base_response",
"unset",
"(",
"nitro_service",
"client",
",",
"sslparameter",
"resource",
",",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"sslparameter",
"unsetresource",
"=",
"new",
"sslparameter",
"(",
")",
";",
"return",
"unsetresource",
".",
"unset_resource",
"(",
"client",
",",
"args",
")",
";",
"}"
] | Use this API to unset the properties of sslparameter resource.
Properties that need to be unset are specified in args array. | [
"Use",
"this",
"API",
"to",
"unset",
"the",
"properties",
"of",
"sslparameter",
"resource",
".",
"Properties",
"that",
"need",
"to",
"be",
"unset",
"are",
"specified",
"in",
"args",
"array",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslparameter.java#L440-L443 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslparameter.java | sslparameter.get | public static sslparameter get(nitro_service service) throws Exception{
sslparameter obj = new sslparameter();
sslparameter[] response = (sslparameter[])obj.get_resources(service);
return response[0];
} | java | public static sslparameter get(nitro_service service) throws Exception{
sslparameter obj = new sslparameter();
sslparameter[] response = (sslparameter[])obj.get_resources(service);
return response[0];
} | [
"public",
"static",
"sslparameter",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"sslparameter",
"obj",
"=",
"new",
"sslparameter",
"(",
")",
";",
"sslparameter",
"[",
"]",
"response",
"=",
"(",
"sslparameter",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
"[",
"0",
"]",
";",
"}"
] | Use this API to fetch all the sslparameter resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"sslparameter",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslparameter.java#L448-L452 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy.java | spilloverpolicy.add | public static base_response add(nitro_service client, spilloverpolicy resource) throws Exception {
spilloverpolicy addresource = new spilloverpolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.action = resource.action;
addresource.comment = resource.comment;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, spilloverpolicy resource) throws Exception {
spilloverpolicy addresource = new spilloverpolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.action = resource.action;
addresource.comment = resource.comment;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"spilloverpolicy",
"resource",
")",
"throws",
"Exception",
"{",
"spilloverpolicy",
"addresource",
"=",
"new",
"spilloverpolicy",
"(",
")",
";",
"addresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"addresource",
".",
"rule",
"=",
"resource",
".",
"rule",
";",
"addresource",
".",
"action",
"=",
"resource",
".",
"action",
";",
"addresource",
".",
"comment",
"=",
"resource",
".",
"comment",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add spilloverpolicy. | [
"Use",
"this",
"API",
"to",
"add",
"spilloverpolicy",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy.java#L210-L217 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy.java | spilloverpolicy.update | public static base_response update(nitro_service client, spilloverpolicy resource) throws Exception {
spilloverpolicy updateresource = new spilloverpolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.action = resource.action;
updateresource.comment = resource.comment;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, spilloverpolicy resource) throws Exception {
spilloverpolicy updateresource = new spilloverpolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.action = resource.action;
updateresource.comment = resource.comment;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"spilloverpolicy",
"resource",
")",
"throws",
"Exception",
"{",
"spilloverpolicy",
"updateresource",
"=",
"new",
"spilloverpolicy",
"(",
")",
";",
"updateresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"updateresource",
".",
"rule",
"=",
"resource",
".",
"rule",
";",
"updateresource",
".",
"action",
"=",
"resource",
".",
"action",
";",
"updateresource",
".",
"comment",
"=",
"resource",
".",
"comment",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update spilloverpolicy. | [
"Use",
"this",
"API",
"to",
"update",
"spilloverpolicy",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy.java#L291-L298 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy.java | spilloverpolicy.get | public static spilloverpolicy[] get(nitro_service service, options option) throws Exception{
spilloverpolicy obj = new spilloverpolicy();
spilloverpolicy[] response = (spilloverpolicy[])obj.get_resources(service,option);
return response;
} | java | public static spilloverpolicy[] get(nitro_service service, options option) throws Exception{
spilloverpolicy obj = new spilloverpolicy();
spilloverpolicy[] response = (spilloverpolicy[])obj.get_resources(service,option);
return response;
} | [
"public",
"static",
"spilloverpolicy",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"options",
"option",
")",
"throws",
"Exception",
"{",
"spilloverpolicy",
"obj",
"=",
"new",
"spilloverpolicy",
"(",
")",
";",
"spilloverpolicy",
"[",
"]",
"response",
"=",
"(",
"spilloverpolicy",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the spilloverpolicy resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"spilloverpolicy",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy.java#L392-L396 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy.java | spilloverpolicy.get | public static spilloverpolicy get(nitro_service service, String name) throws Exception{
spilloverpolicy obj = new spilloverpolicy();
obj.set_name(name);
spilloverpolicy response = (spilloverpolicy) obj.get_resource(service);
return response;
} | java | public static spilloverpolicy get(nitro_service service, String name) throws Exception{
spilloverpolicy obj = new spilloverpolicy();
obj.set_name(name);
spilloverpolicy response = (spilloverpolicy) obj.get_resource(service);
return response;
} | [
"public",
"static",
"spilloverpolicy",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"spilloverpolicy",
"obj",
"=",
"new",
"spilloverpolicy",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"spilloverpolicy",
"response",
"=",
"(",
"spilloverpolicy",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch spilloverpolicy resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"spilloverpolicy",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/spillover/spilloverpolicy.java#L400-L405 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/PaddedList.java | PaddedList.valueOf | public static <IN> PaddedList<IN> valueOf(List<IN> list, IN padding) {
return new PaddedList<IN>(list, padding);
} | java | public static <IN> PaddedList<IN> valueOf(List<IN> list, IN padding) {
return new PaddedList<IN>(list, padding);
} | [
"public",
"static",
"<",
"IN",
">",
"PaddedList",
"<",
"IN",
">",
"valueOf",
"(",
"List",
"<",
"IN",
">",
"list",
",",
"IN",
"padding",
")",
"{",
"return",
"new",
"PaddedList",
"<",
"IN",
">",
"(",
"list",
",",
"padding",
")",
";",
"}"
] | A static method that provides an easy way to create a list of a
certain parametric type.
This static constructor works better with generics.
@param list The list to pad
@param padding The padding element (may be null)
@return The padded list | [
"A",
"static",
"method",
"that",
"provides",
"an",
"easy",
"way",
"to",
"create",
"a",
"list",
"of",
"a",
"certain",
"parametric",
"type",
".",
"This",
"static",
"constructor",
"works",
"better",
"with",
"generics",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/PaddedList.java#L73-L75 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/basic/locationfile.java | locationfile.add | public static base_response add(nitro_service client, locationfile resource) throws Exception {
locationfile addresource = new locationfile();
addresource.Locationfile = resource.Locationfile;
addresource.format = resource.format;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, locationfile resource) throws Exception {
locationfile addresource = new locationfile();
addresource.Locationfile = resource.Locationfile;
addresource.format = resource.format;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"locationfile",
"resource",
")",
"throws",
"Exception",
"{",
"locationfile",
"addresource",
"=",
"new",
"locationfile",
"(",
")",
";",
"addresource",
".",
"Locationfile",
"=",
"resource",
".",
"Locationfile",
";",
"addresource",
".",
"format",
"=",
"resource",
".",
"format",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add locationfile. | [
"Use",
"this",
"API",
"to",
"add",
"locationfile",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/locationfile.java#L113-L118 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/basic/locationfile.java | locationfile.delete | public static base_response delete(nitro_service client) throws Exception {
locationfile deleteresource = new locationfile();
return deleteresource.delete_resource(client);
} | java | public static base_response delete(nitro_service client) throws Exception {
locationfile deleteresource = new locationfile();
return deleteresource.delete_resource(client);
} | [
"public",
"static",
"base_response",
"delete",
"(",
"nitro_service",
"client",
")",
"throws",
"Exception",
"{",
"locationfile",
"deleteresource",
"=",
"new",
"locationfile",
"(",
")",
";",
"return",
"deleteresource",
".",
"delete_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to delete locationfile. | [
"Use",
"this",
"API",
"to",
"delete",
"locationfile",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/locationfile.java#L123-L126 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/basic/locationfile.java | locationfile.get | public static locationfile get(nitro_service service) throws Exception{
locationfile obj = new locationfile();
locationfile[] response = (locationfile[])obj.get_resources(service);
return response[0];
} | java | public static locationfile get(nitro_service service) throws Exception{
locationfile obj = new locationfile();
locationfile[] response = (locationfile[])obj.get_resources(service);
return response[0];
} | [
"public",
"static",
"locationfile",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"locationfile",
"obj",
"=",
"new",
"locationfile",
"(",
")",
";",
"locationfile",
"[",
"]",
"response",
"=",
"(",
"locationfile",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
"[",
"0",
"]",
";",
"}"
] | Use this API to fetch all the locationfile resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"locationfile",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/basic/locationfile.java#L131-L135 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcertkey_sslocspresponder_binding.java | sslcertkey_sslocspresponder_binding.get | public static sslcertkey_sslocspresponder_binding[] get(nitro_service service, String certkey) throws Exception{
sslcertkey_sslocspresponder_binding obj = new sslcertkey_sslocspresponder_binding();
obj.set_certkey(certkey);
sslcertkey_sslocspresponder_binding response[] = (sslcertkey_sslocspresponder_binding[]) obj.get_resources(service);
return response;
} | java | public static sslcertkey_sslocspresponder_binding[] get(nitro_service service, String certkey) throws Exception{
sslcertkey_sslocspresponder_binding obj = new sslcertkey_sslocspresponder_binding();
obj.set_certkey(certkey);
sslcertkey_sslocspresponder_binding response[] = (sslcertkey_sslocspresponder_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"sslcertkey_sslocspresponder_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"certkey",
")",
"throws",
"Exception",
"{",
"sslcertkey_sslocspresponder_binding",
"obj",
"=",
"new",
"sslcertkey_sslocspresponder_binding",
"(",
")",
";",
"obj",
".",
"set_certkey",
"(",
"certkey",
")",
";",
"sslcertkey_sslocspresponder_binding",
"response",
"[",
"]",
"=",
"(",
"sslcertkey_sslocspresponder_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch sslcertkey_sslocspresponder_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslcertkey_sslocspresponder_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcertkey_sslocspresponder_binding.java#L243-L248 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowpolicy_appflowpolicylabel_binding.java | appflowpolicy_appflowpolicylabel_binding.get | public static appflowpolicy_appflowpolicylabel_binding[] get(nitro_service service, String name) throws Exception{
appflowpolicy_appflowpolicylabel_binding obj = new appflowpolicy_appflowpolicylabel_binding();
obj.set_name(name);
appflowpolicy_appflowpolicylabel_binding response[] = (appflowpolicy_appflowpolicylabel_binding[]) obj.get_resources(service);
return response;
} | java | public static appflowpolicy_appflowpolicylabel_binding[] get(nitro_service service, String name) throws Exception{
appflowpolicy_appflowpolicylabel_binding obj = new appflowpolicy_appflowpolicylabel_binding();
obj.set_name(name);
appflowpolicy_appflowpolicylabel_binding response[] = (appflowpolicy_appflowpolicylabel_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"appflowpolicy_appflowpolicylabel_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"appflowpolicy_appflowpolicylabel_binding",
"obj",
"=",
"new",
"appflowpolicy_appflowpolicylabel_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"appflowpolicy_appflowpolicylabel_binding",
"response",
"[",
"]",
"=",
"(",
"appflowpolicy_appflowpolicylabel_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch appflowpolicy_appflowpolicylabel_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"appflowpolicy_appflowpolicylabel_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appflow/appflowpolicy_appflowpolicylabel_binding.java#L162-L167 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_authenticationnegotiatepolicy_binding.java | authenticationvserver_authenticationnegotiatepolicy_binding.get | public static authenticationvserver_authenticationnegotiatepolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationnegotiatepolicy_binding obj = new authenticationvserver_authenticationnegotiatepolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationnegotiatepolicy_binding response[] = (authenticationvserver_authenticationnegotiatepolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static authenticationvserver_authenticationnegotiatepolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationnegotiatepolicy_binding obj = new authenticationvserver_authenticationnegotiatepolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationnegotiatepolicy_binding response[] = (authenticationvserver_authenticationnegotiatepolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"authenticationvserver_authenticationnegotiatepolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"authenticationvserver_authenticationnegotiatepolicy_binding",
"obj",
"=",
"new",
"authenticationvserver_authenticationnegotiatepolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"authenticationvserver_authenticationnegotiatepolicy_binding",
"response",
"[",
"]",
"=",
"(",
"authenticationvserver_authenticationnegotiatepolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch authenticationvserver_authenticationnegotiatepolicy_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"authenticationvserver_authenticationnegotiatepolicy_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationvserver_authenticationnegotiatepolicy_binding.java#L264-L269 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnatparam.java | rnatparam.update | public static base_response update(nitro_service client, rnatparam resource) throws Exception {
rnatparam updateresource = new rnatparam();
updateresource.tcpproxy = resource.tcpproxy;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, rnatparam resource) throws Exception {
rnatparam updateresource = new rnatparam();
updateresource.tcpproxy = resource.tcpproxy;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"rnatparam",
"resource",
")",
"throws",
"Exception",
"{",
"rnatparam",
"updateresource",
"=",
"new",
"rnatparam",
"(",
")",
";",
"updateresource",
".",
"tcpproxy",
"=",
"resource",
".",
"tcpproxy",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update rnatparam. | [
"Use",
"this",
"API",
"to",
"update",
"rnatparam",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnatparam.java#L94-L98 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnatparam.java | rnatparam.unset | public static base_response unset(nitro_service client, rnatparam resource, String[] args) throws Exception{
rnatparam unsetresource = new rnatparam();
return unsetresource.unset_resource(client,args);
} | java | public static base_response unset(nitro_service client, rnatparam resource, String[] args) throws Exception{
rnatparam unsetresource = new rnatparam();
return unsetresource.unset_resource(client,args);
} | [
"public",
"static",
"base_response",
"unset",
"(",
"nitro_service",
"client",
",",
"rnatparam",
"resource",
",",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"rnatparam",
"unsetresource",
"=",
"new",
"rnatparam",
"(",
")",
";",
"return",
"unsetresource",
".",
"unset_resource",
"(",
"client",
",",
"args",
")",
";",
"}"
] | Use this API to unset the properties of rnatparam resource.
Properties that need to be unset are specified in args array. | [
"Use",
"this",
"API",
"to",
"unset",
"the",
"properties",
"of",
"rnatparam",
"resource",
".",
"Properties",
"that",
"need",
"to",
"be",
"unset",
"are",
"specified",
"in",
"args",
"array",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnatparam.java#L104-L107 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnatparam.java | rnatparam.get | public static rnatparam get(nitro_service service) throws Exception{
rnatparam obj = new rnatparam();
rnatparam[] response = (rnatparam[])obj.get_resources(service);
return response[0];
} | java | public static rnatparam get(nitro_service service) throws Exception{
rnatparam obj = new rnatparam();
rnatparam[] response = (rnatparam[])obj.get_resources(service);
return response[0];
} | [
"public",
"static",
"rnatparam",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"rnatparam",
"obj",
"=",
"new",
"rnatparam",
"(",
")",
";",
"rnatparam",
"[",
"]",
"response",
"=",
"(",
"rnatparam",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
"[",
"0",
"]",
";",
"}"
] | Use this API to fetch all the rnatparam resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"rnatparam",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/rnatparam.java#L112-L116 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java | nd6ravariables.update | public static base_response update(nitro_service client, nd6ravariables resource) throws Exception {
nd6ravariables updateresource = new nd6ravariables();
updateresource.vlan = resource.vlan;
updateresource.ceaserouteradv = resource.ceaserouteradv;
updateresource.sendrouteradv = resource.sendrouteradv;
updateresource.srclinklayeraddroption = resource.srclinklayeraddroption;
updateresource.onlyunicastrtadvresponse = resource.onlyunicastrtadvresponse;
updateresource.managedaddrconfig = resource.managedaddrconfig;
updateresource.otheraddrconfig = resource.otheraddrconfig;
updateresource.currhoplimit = resource.currhoplimit;
updateresource.maxrtadvinterval = resource.maxrtadvinterval;
updateresource.minrtadvinterval = resource.minrtadvinterval;
updateresource.linkmtu = resource.linkmtu;
updateresource.reachabletime = resource.reachabletime;
updateresource.retranstime = resource.retranstime;
updateresource.defaultlifetime = resource.defaultlifetime;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, nd6ravariables resource) throws Exception {
nd6ravariables updateresource = new nd6ravariables();
updateresource.vlan = resource.vlan;
updateresource.ceaserouteradv = resource.ceaserouteradv;
updateresource.sendrouteradv = resource.sendrouteradv;
updateresource.srclinklayeraddroption = resource.srclinklayeraddroption;
updateresource.onlyunicastrtadvresponse = resource.onlyunicastrtadvresponse;
updateresource.managedaddrconfig = resource.managedaddrconfig;
updateresource.otheraddrconfig = resource.otheraddrconfig;
updateresource.currhoplimit = resource.currhoplimit;
updateresource.maxrtadvinterval = resource.maxrtadvinterval;
updateresource.minrtadvinterval = resource.minrtadvinterval;
updateresource.linkmtu = resource.linkmtu;
updateresource.reachabletime = resource.reachabletime;
updateresource.retranstime = resource.retranstime;
updateresource.defaultlifetime = resource.defaultlifetime;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"nd6ravariables",
"resource",
")",
"throws",
"Exception",
"{",
"nd6ravariables",
"updateresource",
"=",
"new",
"nd6ravariables",
"(",
")",
";",
"updateresource",
".",
"vlan",
"=",
"resource",
".",
"vlan",
";",
"updateresource",
".",
"ceaserouteradv",
"=",
"resource",
".",
"ceaserouteradv",
";",
"updateresource",
".",
"sendrouteradv",
"=",
"resource",
".",
"sendrouteradv",
";",
"updateresource",
".",
"srclinklayeraddroption",
"=",
"resource",
".",
"srclinklayeraddroption",
";",
"updateresource",
".",
"onlyunicastrtadvresponse",
"=",
"resource",
".",
"onlyunicastrtadvresponse",
";",
"updateresource",
".",
"managedaddrconfig",
"=",
"resource",
".",
"managedaddrconfig",
";",
"updateresource",
".",
"otheraddrconfig",
"=",
"resource",
".",
"otheraddrconfig",
";",
"updateresource",
".",
"currhoplimit",
"=",
"resource",
".",
"currhoplimit",
";",
"updateresource",
".",
"maxrtadvinterval",
"=",
"resource",
".",
"maxrtadvinterval",
";",
"updateresource",
".",
"minrtadvinterval",
"=",
"resource",
".",
"minrtadvinterval",
";",
"updateresource",
".",
"linkmtu",
"=",
"resource",
".",
"linkmtu",
";",
"updateresource",
".",
"reachabletime",
"=",
"resource",
".",
"reachabletime",
";",
"updateresource",
".",
"retranstime",
"=",
"resource",
".",
"retranstime",
";",
"updateresource",
".",
"defaultlifetime",
"=",
"resource",
".",
"defaultlifetime",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update nd6ravariables. | [
"Use",
"this",
"API",
"to",
"update",
"nd6ravariables",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java#L438-L455 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java | nd6ravariables.update | public static base_responses update(nitro_service client, nd6ravariables resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nd6ravariables updateresources[] = new nd6ravariables[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new nd6ravariables();
updateresources[i].vlan = resources[i].vlan;
updateresources[i].ceaserouteradv = resources[i].ceaserouteradv;
updateresources[i].sendrouteradv = resources[i].sendrouteradv;
updateresources[i].srclinklayeraddroption = resources[i].srclinklayeraddroption;
updateresources[i].onlyunicastrtadvresponse = resources[i].onlyunicastrtadvresponse;
updateresources[i].managedaddrconfig = resources[i].managedaddrconfig;
updateresources[i].otheraddrconfig = resources[i].otheraddrconfig;
updateresources[i].currhoplimit = resources[i].currhoplimit;
updateresources[i].maxrtadvinterval = resources[i].maxrtadvinterval;
updateresources[i].minrtadvinterval = resources[i].minrtadvinterval;
updateresources[i].linkmtu = resources[i].linkmtu;
updateresources[i].reachabletime = resources[i].reachabletime;
updateresources[i].retranstime = resources[i].retranstime;
updateresources[i].defaultlifetime = resources[i].defaultlifetime;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java | public static base_responses update(nitro_service client, nd6ravariables resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
nd6ravariables updateresources[] = new nd6ravariables[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new nd6ravariables();
updateresources[i].vlan = resources[i].vlan;
updateresources[i].ceaserouteradv = resources[i].ceaserouteradv;
updateresources[i].sendrouteradv = resources[i].sendrouteradv;
updateresources[i].srclinklayeraddroption = resources[i].srclinklayeraddroption;
updateresources[i].onlyunicastrtadvresponse = resources[i].onlyunicastrtadvresponse;
updateresources[i].managedaddrconfig = resources[i].managedaddrconfig;
updateresources[i].otheraddrconfig = resources[i].otheraddrconfig;
updateresources[i].currhoplimit = resources[i].currhoplimit;
updateresources[i].maxrtadvinterval = resources[i].maxrtadvinterval;
updateresources[i].minrtadvinterval = resources[i].minrtadvinterval;
updateresources[i].linkmtu = resources[i].linkmtu;
updateresources[i].reachabletime = resources[i].reachabletime;
updateresources[i].retranstime = resources[i].retranstime;
updateresources[i].defaultlifetime = resources[i].defaultlifetime;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | [
"public",
"static",
"base_responses",
"update",
"(",
"nitro_service",
"client",
",",
"nd6ravariables",
"resources",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"resources",
"!=",
"null",
"&&",
"resources",
".",
"length",
">",
"0",
")",
"{",
"nd6ravariables",
"updateresources",
"[",
"]",
"=",
"new",
"nd6ravariables",
"[",
"resources",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"updateresources",
"[",
"i",
"]",
"=",
"new",
"nd6ravariables",
"(",
")",
";",
"updateresources",
"[",
"i",
"]",
".",
"vlan",
"=",
"resources",
"[",
"i",
"]",
".",
"vlan",
";",
"updateresources",
"[",
"i",
"]",
".",
"ceaserouteradv",
"=",
"resources",
"[",
"i",
"]",
".",
"ceaserouteradv",
";",
"updateresources",
"[",
"i",
"]",
".",
"sendrouteradv",
"=",
"resources",
"[",
"i",
"]",
".",
"sendrouteradv",
";",
"updateresources",
"[",
"i",
"]",
".",
"srclinklayeraddroption",
"=",
"resources",
"[",
"i",
"]",
".",
"srclinklayeraddroption",
";",
"updateresources",
"[",
"i",
"]",
".",
"onlyunicastrtadvresponse",
"=",
"resources",
"[",
"i",
"]",
".",
"onlyunicastrtadvresponse",
";",
"updateresources",
"[",
"i",
"]",
".",
"managedaddrconfig",
"=",
"resources",
"[",
"i",
"]",
".",
"managedaddrconfig",
";",
"updateresources",
"[",
"i",
"]",
".",
"otheraddrconfig",
"=",
"resources",
"[",
"i",
"]",
".",
"otheraddrconfig",
";",
"updateresources",
"[",
"i",
"]",
".",
"currhoplimit",
"=",
"resources",
"[",
"i",
"]",
".",
"currhoplimit",
";",
"updateresources",
"[",
"i",
"]",
".",
"maxrtadvinterval",
"=",
"resources",
"[",
"i",
"]",
".",
"maxrtadvinterval",
";",
"updateresources",
"[",
"i",
"]",
".",
"minrtadvinterval",
"=",
"resources",
"[",
"i",
"]",
".",
"minrtadvinterval",
";",
"updateresources",
"[",
"i",
"]",
".",
"linkmtu",
"=",
"resources",
"[",
"i",
"]",
".",
"linkmtu",
";",
"updateresources",
"[",
"i",
"]",
".",
"reachabletime",
"=",
"resources",
"[",
"i",
"]",
".",
"reachabletime",
";",
"updateresources",
"[",
"i",
"]",
".",
"retranstime",
"=",
"resources",
"[",
"i",
"]",
".",
"retranstime",
";",
"updateresources",
"[",
"i",
"]",
".",
"defaultlifetime",
"=",
"resources",
"[",
"i",
"]",
".",
"defaultlifetime",
";",
"}",
"result",
"=",
"update_bulk_request",
"(",
"client",
",",
"updateresources",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to update nd6ravariables resources. | [
"Use",
"this",
"API",
"to",
"update",
"nd6ravariables",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java#L460-L484 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java | nd6ravariables.get | public static nd6ravariables[] get(nitro_service service, options option) throws Exception{
nd6ravariables obj = new nd6ravariables();
nd6ravariables[] response = (nd6ravariables[])obj.get_resources(service,option);
return response;
} | java | public static nd6ravariables[] get(nitro_service service, options option) throws Exception{
nd6ravariables obj = new nd6ravariables();
nd6ravariables[] response = (nd6ravariables[])obj.get_resources(service,option);
return response;
} | [
"public",
"static",
"nd6ravariables",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"options",
"option",
")",
"throws",
"Exception",
"{",
"nd6ravariables",
"obj",
"=",
"new",
"nd6ravariables",
"(",
")",
";",
"nd6ravariables",
"[",
"]",
"response",
"=",
"(",
"nd6ravariables",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the nd6ravariables resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"nd6ravariables",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java#L541-L545 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java | nd6ravariables.get | public static nd6ravariables get(nitro_service service, Long vlan) throws Exception{
nd6ravariables obj = new nd6ravariables();
obj.set_vlan(vlan);
nd6ravariables response = (nd6ravariables) obj.get_resource(service);
return response;
} | java | public static nd6ravariables get(nitro_service service, Long vlan) throws Exception{
nd6ravariables obj = new nd6ravariables();
obj.set_vlan(vlan);
nd6ravariables response = (nd6ravariables) obj.get_resource(service);
return response;
} | [
"public",
"static",
"nd6ravariables",
"get",
"(",
"nitro_service",
"service",
",",
"Long",
"vlan",
")",
"throws",
"Exception",
"{",
"nd6ravariables",
"obj",
"=",
"new",
"nd6ravariables",
"(",
")",
";",
"obj",
".",
"set_vlan",
"(",
"vlan",
")",
";",
"nd6ravariables",
"response",
"=",
"(",
"nd6ravariables",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch nd6ravariables resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"nd6ravariables",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java#L549-L554 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java | nd6ravariables.get | public static nd6ravariables[] get(nitro_service service, Long vlan[]) throws Exception{
if (vlan !=null && vlan.length>0) {
nd6ravariables response[] = new nd6ravariables[vlan.length];
nd6ravariables obj[] = new nd6ravariables[vlan.length];
for (int i=0;i<vlan.length;i++) {
obj[i] = new nd6ravariables();
obj[i].set_vlan(vlan[i]);
response[i] = (nd6ravariables) obj[i].get_resource(service);
}
return response;
}
return null;
} | java | public static nd6ravariables[] get(nitro_service service, Long vlan[]) throws Exception{
if (vlan !=null && vlan.length>0) {
nd6ravariables response[] = new nd6ravariables[vlan.length];
nd6ravariables obj[] = new nd6ravariables[vlan.length];
for (int i=0;i<vlan.length;i++) {
obj[i] = new nd6ravariables();
obj[i].set_vlan(vlan[i]);
response[i] = (nd6ravariables) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"public",
"static",
"nd6ravariables",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"Long",
"vlan",
"[",
"]",
")",
"throws",
"Exception",
"{",
"if",
"(",
"vlan",
"!=",
"null",
"&&",
"vlan",
".",
"length",
">",
"0",
")",
"{",
"nd6ravariables",
"response",
"[",
"]",
"=",
"new",
"nd6ravariables",
"[",
"vlan",
".",
"length",
"]",
";",
"nd6ravariables",
"obj",
"[",
"]",
"=",
"new",
"nd6ravariables",
"[",
"vlan",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"vlan",
".",
"length",
";",
"i",
"++",
")",
"{",
"obj",
"[",
"i",
"]",
"=",
"new",
"nd6ravariables",
"(",
")",
";",
"obj",
"[",
"i",
"]",
".",
"set_vlan",
"(",
"vlan",
"[",
"i",
"]",
")",
";",
"response",
"[",
"i",
"]",
"=",
"(",
"nd6ravariables",
")",
"obj",
"[",
"i",
"]",
".",
"get_resource",
"(",
"service",
")",
";",
"}",
"return",
"response",
";",
"}",
"return",
"null",
";",
"}"
] | Use this API to fetch nd6ravariables resources of given names . | [
"Use",
"this",
"API",
"to",
"fetch",
"nd6ravariables",
"resources",
"of",
"given",
"names",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables.java#L559-L571 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbrunningconfig.java | gslbrunningconfig.get | public static gslbrunningconfig get(nitro_service service) throws Exception{
gslbrunningconfig obj = new gslbrunningconfig();
gslbrunningconfig[] response = (gslbrunningconfig[])obj.get_resources(service);
return response[0];
} | java | public static gslbrunningconfig get(nitro_service service) throws Exception{
gslbrunningconfig obj = new gslbrunningconfig();
gslbrunningconfig[] response = (gslbrunningconfig[])obj.get_resources(service);
return response[0];
} | [
"public",
"static",
"gslbrunningconfig",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"gslbrunningconfig",
"obj",
"=",
"new",
"gslbrunningconfig",
"(",
")",
";",
"gslbrunningconfig",
"[",
"]",
"response",
"=",
"(",
"gslbrunningconfig",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
"[",
"0",
"]",
";",
"}"
] | Use this API to fetch all the gslbrunningconfig resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"gslbrunningconfig",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbrunningconfig.java#L88-L92 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/utility/callhome.java | callhome.update | public static base_response update(nitro_service client, callhome resource) throws Exception {
callhome updateresource = new callhome();
updateresource.emailaddress = resource.emailaddress;
updateresource.proxymode = resource.proxymode;
updateresource.ipaddress = resource.ipaddress;
updateresource.port = resource.port;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, callhome resource) throws Exception {
callhome updateresource = new callhome();
updateresource.emailaddress = resource.emailaddress;
updateresource.proxymode = resource.proxymode;
updateresource.ipaddress = resource.ipaddress;
updateresource.port = resource.port;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"callhome",
"resource",
")",
"throws",
"Exception",
"{",
"callhome",
"updateresource",
"=",
"new",
"callhome",
"(",
")",
";",
"updateresource",
".",
"emailaddress",
"=",
"resource",
".",
"emailaddress",
";",
"updateresource",
".",
"proxymode",
"=",
"resource",
".",
"proxymode",
";",
"updateresource",
".",
"ipaddress",
"=",
"resource",
".",
"ipaddress",
";",
"updateresource",
".",
"port",
"=",
"resource",
".",
"port",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update callhome. | [
"Use",
"this",
"API",
"to",
"update",
"callhome",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/utility/callhome.java#L263-L270 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/utility/callhome.java | callhome.unset | public static base_response unset(nitro_service client, callhome resource, String[] args) throws Exception{
callhome unsetresource = new callhome();
return unsetresource.unset_resource(client,args);
} | java | public static base_response unset(nitro_service client, callhome resource, String[] args) throws Exception{
callhome unsetresource = new callhome();
return unsetresource.unset_resource(client,args);
} | [
"public",
"static",
"base_response",
"unset",
"(",
"nitro_service",
"client",
",",
"callhome",
"resource",
",",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"callhome",
"unsetresource",
"=",
"new",
"callhome",
"(",
")",
";",
"return",
"unsetresource",
".",
"unset_resource",
"(",
"client",
",",
"args",
")",
";",
"}"
] | Use this API to unset the properties of callhome resource.
Properties that need to be unset are specified in args array. | [
"Use",
"this",
"API",
"to",
"unset",
"the",
"properties",
"of",
"callhome",
"resource",
".",
"Properties",
"that",
"need",
"to",
"be",
"unset",
"are",
"specified",
"in",
"args",
"array",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/utility/callhome.java#L276-L279 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/utility/callhome.java | callhome.get | public static callhome get(nitro_service service) throws Exception{
callhome obj = new callhome();
callhome[] response = (callhome[])obj.get_resources(service);
return response[0];
} | java | public static callhome get(nitro_service service) throws Exception{
callhome obj = new callhome();
callhome[] response = (callhome[])obj.get_resources(service);
return response[0];
} | [
"public",
"static",
"callhome",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"callhome",
"obj",
"=",
"new",
"callhome",
"(",
")",
";",
"callhome",
"[",
"]",
"response",
"=",
"(",
"callhome",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
"[",
"0",
"]",
";",
"}"
] | Use this API to fetch all the callhome resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"callhome",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/utility/callhome.java#L284-L288 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cs/csvserver_appflowpolicy_binding.java | csvserver_appflowpolicy_binding.get | public static csvserver_appflowpolicy_binding[] get(nitro_service service, String name) throws Exception{
csvserver_appflowpolicy_binding obj = new csvserver_appflowpolicy_binding();
obj.set_name(name);
csvserver_appflowpolicy_binding response[] = (csvserver_appflowpolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static csvserver_appflowpolicy_binding[] get(nitro_service service, String name) throws Exception{
csvserver_appflowpolicy_binding obj = new csvserver_appflowpolicy_binding();
obj.set_name(name);
csvserver_appflowpolicy_binding response[] = (csvserver_appflowpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"csvserver_appflowpolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"csvserver_appflowpolicy_binding",
"obj",
"=",
"new",
"csvserver_appflowpolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"csvserver_appflowpolicy_binding",
"response",
"[",
"]",
"=",
"(",
"csvserver_appflowpolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch csvserver_appflowpolicy_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"csvserver_appflowpolicy_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cs/csvserver_appflowpolicy_binding.java#L327-L332 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cachepolicy_cacheglobal_binding.java | cachepolicy_cacheglobal_binding.get | public static cachepolicy_cacheglobal_binding[] get(nitro_service service, String policyname) throws Exception{
cachepolicy_cacheglobal_binding obj = new cachepolicy_cacheglobal_binding();
obj.set_policyname(policyname);
cachepolicy_cacheglobal_binding response[] = (cachepolicy_cacheglobal_binding[]) obj.get_resources(service);
return response;
} | java | public static cachepolicy_cacheglobal_binding[] get(nitro_service service, String policyname) throws Exception{
cachepolicy_cacheglobal_binding obj = new cachepolicy_cacheglobal_binding();
obj.set_policyname(policyname);
cachepolicy_cacheglobal_binding response[] = (cachepolicy_cacheglobal_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"cachepolicy_cacheglobal_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"policyname",
")",
"throws",
"Exception",
"{",
"cachepolicy_cacheglobal_binding",
"obj",
"=",
"new",
"cachepolicy_cacheglobal_binding",
"(",
")",
";",
"obj",
".",
"set_policyname",
"(",
"policyname",
")",
";",
"cachepolicy_cacheglobal_binding",
"response",
"[",
"]",
"=",
"(",
"cachepolicy_cacheglobal_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch cachepolicy_cacheglobal_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"cachepolicy_cacheglobal_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cache/cachepolicy_cacheglobal_binding.java#L162-L167 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslglobal_sslpolicy_binding.java | sslglobal_sslpolicy_binding.get | public static sslglobal_sslpolicy_binding[] get(nitro_service service) throws Exception{
sslglobal_sslpolicy_binding obj = new sslglobal_sslpolicy_binding();
sslglobal_sslpolicy_binding response[] = (sslglobal_sslpolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static sslglobal_sslpolicy_binding[] get(nitro_service service) throws Exception{
sslglobal_sslpolicy_binding obj = new sslglobal_sslpolicy_binding();
sslglobal_sslpolicy_binding response[] = (sslglobal_sslpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"sslglobal_sslpolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"sslglobal_sslpolicy_binding",
"obj",
"=",
"new",
"sslglobal_sslpolicy_binding",
"(",
")",
";",
"sslglobal_sslpolicy_binding",
"response",
"[",
"]",
"=",
"(",
"sslglobal_sslpolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch a sslglobal_sslpolicy_binding resources. | [
"Use",
"this",
"API",
"to",
"fetch",
"a",
"sslglobal_sslpolicy_binding",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslglobal_sslpolicy_binding.java#L186-L190 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslglobal_sslpolicy_binding.java | sslglobal_sslpolicy_binding.get_filtered | public static sslglobal_sslpolicy_binding[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
sslglobal_sslpolicy_binding obj = new sslglobal_sslpolicy_binding();
options option = new options();
option.set_filter(filter);
sslglobal_sslpolicy_binding[] response = (sslglobal_sslpolicy_binding[]) obj.getfiltered(service, option);
return response;
} | java | public static sslglobal_sslpolicy_binding[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
sslglobal_sslpolicy_binding obj = new sslglobal_sslpolicy_binding();
options option = new options();
option.set_filter(filter);
sslglobal_sslpolicy_binding[] response = (sslglobal_sslpolicy_binding[]) obj.getfiltered(service, option);
return response;
} | [
"public",
"static",
"sslglobal_sslpolicy_binding",
"[",
"]",
"get_filtered",
"(",
"nitro_service",
"service",
",",
"filtervalue",
"[",
"]",
"filter",
")",
"throws",
"Exception",
"{",
"sslglobal_sslpolicy_binding",
"obj",
"=",
"new",
"sslglobal_sslpolicy_binding",
"(",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_filter",
"(",
"filter",
")",
";",
"sslglobal_sslpolicy_binding",
"[",
"]",
"response",
"=",
"(",
"sslglobal_sslpolicy_binding",
"[",
"]",
")",
"obj",
".",
"getfiltered",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch filtered set of sslglobal_sslpolicy_binding resources.
set the filter parameter values in filtervalue object. | [
"Use",
"this",
"API",
"to",
"fetch",
"filtered",
"set",
"of",
"sslglobal_sslpolicy_binding",
"resources",
".",
"set",
"the",
"filter",
"parameter",
"values",
"in",
"filtervalue",
"object",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslglobal_sslpolicy_binding.java#L208-L214 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java | CollectionValuedMap.put | public Collection<V> put(K key, Collection<V> collection) {
return map.put(key, collection);
} | java | public Collection<V> put(K key, Collection<V> collection) {
return map.put(key, collection);
} | [
"public",
"Collection",
"<",
"V",
">",
"put",
"(",
"K",
"key",
",",
"Collection",
"<",
"V",
">",
"collection",
")",
"{",
"return",
"map",
".",
"put",
"(",
"key",
",",
"collection",
")",
";",
"}"
] | Replaces current Collection mapped to key with the specified Collection.
Use carefully! | [
"Replaces",
"current",
"Collection",
"mapped",
"to",
"key",
"with",
"the",
"specified",
"Collection",
".",
"Use",
"carefully!"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java#L43-L45 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java | CollectionValuedMap.add | public void add(K key, V value) {
if (treatCollectionsAsImmutable) {
Collection<V> newC = cf.newCollection();
Collection<V> c = map.get(key);
if (c != null) {
newC.addAll(c);
}
newC.add(value);
map.put(key, newC); // replacing the old collection
} else {
Collection<V> c = map.get(key);
if (c == null) {
c = cf.newCollection();
map.put(key, c);
}
c.add(value); // modifying the old collection
}
} | java | public void add(K key, V value) {
if (treatCollectionsAsImmutable) {
Collection<V> newC = cf.newCollection();
Collection<V> c = map.get(key);
if (c != null) {
newC.addAll(c);
}
newC.add(value);
map.put(key, newC); // replacing the old collection
} else {
Collection<V> c = map.get(key);
if (c == null) {
c = cf.newCollection();
map.put(key, c);
}
c.add(value); // modifying the old collection
}
} | [
"public",
"void",
"add",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"if",
"(",
"treatCollectionsAsImmutable",
")",
"{",
"Collection",
"<",
"V",
">",
"newC",
"=",
"cf",
".",
"newCollection",
"(",
")",
";",
"Collection",
"<",
"V",
">",
"c",
"=",
"map",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"c",
"!=",
"null",
")",
"{",
"newC",
".",
"addAll",
"(",
"c",
")",
";",
"}",
"newC",
".",
"add",
"(",
"value",
")",
";",
"map",
".",
"put",
"(",
"key",
",",
"newC",
")",
";",
"// replacing the old collection\r",
"}",
"else",
"{",
"Collection",
"<",
"V",
">",
"c",
"=",
"map",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"c",
"==",
"null",
")",
"{",
"c",
"=",
"cf",
".",
"newCollection",
"(",
")",
";",
"map",
".",
"put",
"(",
"key",
",",
"c",
")",
";",
"}",
"c",
".",
"add",
"(",
"value",
")",
";",
"// modifying the old collection\r",
"}",
"}"
] | Adds the value to the Collection mapped to by the key. | [
"Adds",
"the",
"value",
"to",
"the",
"Collection",
"mapped",
"to",
"by",
"the",
"key",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java#L76-L93 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java | CollectionValuedMap.removeMapping | public void removeMapping(K key, V value) {
if (treatCollectionsAsImmutable) {
Collection<V> c = map.get(key);
if (c != null) {
Collection<V> newC = cf.newCollection();
newC.addAll(c);
newC.remove(value);
map.put(key, newC);
}
} else {
Collection<V> c = get(key);
c.remove(value);
}
} | java | public void removeMapping(K key, V value) {
if (treatCollectionsAsImmutable) {
Collection<V> c = map.get(key);
if (c != null) {
Collection<V> newC = cf.newCollection();
newC.addAll(c);
newC.remove(value);
map.put(key, newC);
}
} else {
Collection<V> c = get(key);
c.remove(value);
}
} | [
"public",
"void",
"removeMapping",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"if",
"(",
"treatCollectionsAsImmutable",
")",
"{",
"Collection",
"<",
"V",
">",
"c",
"=",
"map",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"c",
"!=",
"null",
")",
"{",
"Collection",
"<",
"V",
">",
"newC",
"=",
"cf",
".",
"newCollection",
"(",
")",
";",
"newC",
".",
"addAll",
"(",
"c",
")",
";",
"newC",
".",
"remove",
"(",
"value",
")",
";",
"map",
".",
"put",
"(",
"key",
",",
"newC",
")",
";",
"}",
"}",
"else",
"{",
"Collection",
"<",
"V",
">",
"c",
"=",
"get",
"(",
"key",
")",
";",
"c",
".",
"remove",
"(",
"value",
")",
";",
"}",
"}"
] | Removes the value from the Collection mapped to by this key, leaving the
rest of the collection intact.
@param key
the key to the Collection to remove the value from
@param value
the value to remove | [
"Removes",
"the",
"value",
"from",
"the",
"Collection",
"mapped",
"to",
"by",
"this",
"key",
"leaving",
"the",
"rest",
"of",
"the",
"collection",
"intact",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java#L163-L177 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java | CollectionValuedMap.deltaClone | public CollectionValuedMap<K, V> deltaClone() {
CollectionValuedMap<K, V> result = new CollectionValuedMap<K, V>(null, cf, true);
result.map = new DeltaMap<K, Collection<V>>(this.map);
return result;
} | java | public CollectionValuedMap<K, V> deltaClone() {
CollectionValuedMap<K, V> result = new CollectionValuedMap<K, V>(null, cf, true);
result.map = new DeltaMap<K, Collection<V>>(this.map);
return result;
} | [
"public",
"CollectionValuedMap",
"<",
"K",
",",
"V",
">",
"deltaClone",
"(",
")",
"{",
"CollectionValuedMap",
"<",
"K",
",",
"V",
">",
"result",
"=",
"new",
"CollectionValuedMap",
"<",
"K",
",",
"V",
">",
"(",
"null",
",",
"cf",
",",
"true",
")",
";",
"result",
".",
"map",
"=",
"new",
"DeltaMap",
"<",
"K",
",",
"Collection",
"<",
"V",
">",
">",
"(",
"this",
".",
"map",
")",
";",
"return",
"result",
";",
"}"
] | Creates a "delta clone" of this Map, where only the differences are
represented. | [
"Creates",
"a",
"delta",
"clone",
"of",
"this",
"Map",
"where",
"only",
"the",
"differences",
"are",
"represented",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java#L303-L307 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/linkset_interface_binding.java | linkset_interface_binding.get | public static linkset_interface_binding[] get(nitro_service service, String id) throws Exception{
linkset_interface_binding obj = new linkset_interface_binding();
obj.set_id(id);
linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service);
return response;
} | java | public static linkset_interface_binding[] get(nitro_service service, String id) throws Exception{
linkset_interface_binding obj = new linkset_interface_binding();
obj.set_id(id);
linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"linkset_interface_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"id",
")",
"throws",
"Exception",
"{",
"linkset_interface_binding",
"obj",
"=",
"new",
"linkset_interface_binding",
"(",
")",
";",
"obj",
".",
"set_id",
"(",
"id",
")",
";",
"linkset_interface_binding",
"response",
"[",
"]",
"=",
"(",
"linkset_interface_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch linkset_interface_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"linkset_interface_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/linkset_interface_binding.java#L154-L159 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/linkset_interface_binding.java | linkset_interface_binding.count | public static long count(nitro_service service, String id) throws Exception{
linkset_interface_binding obj = new linkset_interface_binding();
obj.set_id(id);
options option = new options();
option.set_count(true);
linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | java | public static long count(nitro_service service, String id) throws Exception{
linkset_interface_binding obj = new linkset_interface_binding();
obj.set_id(id);
options option = new options();
option.set_count(true);
linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | [
"public",
"static",
"long",
"count",
"(",
"nitro_service",
"service",
",",
"String",
"id",
")",
"throws",
"Exception",
"{",
"linkset_interface_binding",
"obj",
"=",
"new",
"linkset_interface_binding",
"(",
")",
";",
"obj",
".",
"set_id",
"(",
"id",
")",
";",
"options",
"option",
"=",
"new",
"options",
"(",
")",
";",
"option",
".",
"set_count",
"(",
"true",
")",
";",
"linkset_interface_binding",
"response",
"[",
"]",
"=",
"(",
"linkset_interface_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"if",
"(",
"response",
"!=",
"null",
")",
"{",
"return",
"response",
"[",
"0",
"]",
".",
"__count",
";",
"}",
"return",
"0",
";",
"}"
] | Use this API to count linkset_interface_binding resources configued on NetScaler. | [
"Use",
"this",
"API",
"to",
"count",
"linkset_interface_binding",
"resources",
"configued",
"on",
"NetScaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/linkset_interface_binding.java#L190-L200 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmtrafficpolicy_lbvserver_binding.java | tmtrafficpolicy_lbvserver_binding.get | public static tmtrafficpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_lbvserver_binding obj = new tmtrafficpolicy_lbvserver_binding();
obj.set_name(name);
tmtrafficpolicy_lbvserver_binding response[] = (tmtrafficpolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | java | public static tmtrafficpolicy_lbvserver_binding[] get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_lbvserver_binding obj = new tmtrafficpolicy_lbvserver_binding();
obj.set_name(name);
tmtrafficpolicy_lbvserver_binding response[] = (tmtrafficpolicy_lbvserver_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"tmtrafficpolicy_lbvserver_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"tmtrafficpolicy_lbvserver_binding",
"obj",
"=",
"new",
"tmtrafficpolicy_lbvserver_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"tmtrafficpolicy_lbvserver_binding",
"response",
"[",
"]",
"=",
"(",
"tmtrafficpolicy_lbvserver_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch tmtrafficpolicy_lbvserver_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"tmtrafficpolicy_lbvserver_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmtrafficpolicy_lbvserver_binding.java#L132-L137 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan_interface_binding.java | vlan_interface_binding.get | public static vlan_interface_binding[] get(nitro_service service, Long id) throws Exception{
vlan_interface_binding obj = new vlan_interface_binding();
obj.set_id(id);
vlan_interface_binding response[] = (vlan_interface_binding[]) obj.get_resources(service);
return response;
} | java | public static vlan_interface_binding[] get(nitro_service service, Long id) throws Exception{
vlan_interface_binding obj = new vlan_interface_binding();
obj.set_id(id);
vlan_interface_binding response[] = (vlan_interface_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"vlan_interface_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"Long",
"id",
")",
"throws",
"Exception",
"{",
"vlan_interface_binding",
"obj",
"=",
"new",
"vlan_interface_binding",
"(",
")",
";",
"obj",
".",
"set_id",
"(",
"id",
")",
";",
"vlan_interface_binding",
"response",
"[",
"]",
"=",
"(",
"vlan_interface_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch vlan_interface_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"vlan_interface_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/vlan_interface_binding.java#L198-L203 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/rewrite/rewritepolicy_csvserver_binding.java | rewritepolicy_csvserver_binding.get | public static rewritepolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
rewritepolicy_csvserver_binding obj = new rewritepolicy_csvserver_binding();
obj.set_name(name);
rewritepolicy_csvserver_binding response[] = (rewritepolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | java | public static rewritepolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
rewritepolicy_csvserver_binding obj = new rewritepolicy_csvserver_binding();
obj.set_name(name);
rewritepolicy_csvserver_binding response[] = (rewritepolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"rewritepolicy_csvserver_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"rewritepolicy_csvserver_binding",
"obj",
"=",
"new",
"rewritepolicy_csvserver_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"rewritepolicy_csvserver_binding",
"response",
"[",
"]",
"=",
"(",
"rewritepolicy_csvserver_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch rewritepolicy_csvserver_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"rewritepolicy_csvserver_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/rewrite/rewritepolicy_csvserver_binding.java#L162-L167 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/tunnel/tunneltrafficpolicy.java | tunneltrafficpolicy.get | public static tunneltrafficpolicy[] get(nitro_service service, options option) throws Exception{
tunneltrafficpolicy obj = new tunneltrafficpolicy();
tunneltrafficpolicy[] response = (tunneltrafficpolicy[])obj.get_resources(service,option);
return response;
} | java | public static tunneltrafficpolicy[] get(nitro_service service, options option) throws Exception{
tunneltrafficpolicy obj = new tunneltrafficpolicy();
tunneltrafficpolicy[] response = (tunneltrafficpolicy[])obj.get_resources(service,option);
return response;
} | [
"public",
"static",
"tunneltrafficpolicy",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"options",
"option",
")",
"throws",
"Exception",
"{",
"tunneltrafficpolicy",
"obj",
"=",
"new",
"tunneltrafficpolicy",
"(",
")",
";",
"tunneltrafficpolicy",
"[",
"]",
"response",
"=",
"(",
"tunneltrafficpolicy",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
",",
"option",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the tunneltrafficpolicy resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"tunneltrafficpolicy",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tunnel/tunneltrafficpolicy.java#L400-L404 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/tunnel/tunneltrafficpolicy.java | tunneltrafficpolicy.get | public static tunneltrafficpolicy get(nitro_service service, String name) throws Exception{
tunneltrafficpolicy obj = new tunneltrafficpolicy();
obj.set_name(name);
tunneltrafficpolicy response = (tunneltrafficpolicy) obj.get_resource(service);
return response;
} | java | public static tunneltrafficpolicy get(nitro_service service, String name) throws Exception{
tunneltrafficpolicy obj = new tunneltrafficpolicy();
obj.set_name(name);
tunneltrafficpolicy response = (tunneltrafficpolicy) obj.get_resource(service);
return response;
} | [
"public",
"static",
"tunneltrafficpolicy",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"tunneltrafficpolicy",
"obj",
"=",
"new",
"tunneltrafficpolicy",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"tunneltrafficpolicy",
"response",
"=",
"(",
"tunneltrafficpolicy",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch tunneltrafficpolicy resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"tunneltrafficpolicy",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tunnel/tunneltrafficpolicy.java#L408-L413 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_intranetip_binding.java | vpnglobal_intranetip_binding.get | public static vpnglobal_intranetip_binding[] get(nitro_service service) throws Exception{
vpnglobal_intranetip_binding obj = new vpnglobal_intranetip_binding();
vpnglobal_intranetip_binding response[] = (vpnglobal_intranetip_binding[]) obj.get_resources(service);
return response;
} | java | public static vpnglobal_intranetip_binding[] get(nitro_service service) throws Exception{
vpnglobal_intranetip_binding obj = new vpnglobal_intranetip_binding();
vpnglobal_intranetip_binding response[] = (vpnglobal_intranetip_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"vpnglobal_intranetip_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"vpnglobal_intranetip_binding",
"obj",
"=",
"new",
"vpnglobal_intranetip_binding",
"(",
")",
";",
"vpnglobal_intranetip_binding",
"response",
"[",
"]",
"=",
"(",
"vpnglobal_intranetip_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch a vpnglobal_intranetip_binding resources. | [
"Use",
"this",
"API",
"to",
"fetch",
"a",
"vpnglobal_intranetip_binding",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_intranetip_binding.java#L154-L158 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslaction.java | sslaction.add | public static base_response add(nitro_service client, sslaction resource) throws Exception {
sslaction addresource = new sslaction();
addresource.name = resource.name;
addresource.clientauth = resource.clientauth;
addresource.clientcert = resource.clientcert;
addresource.certheader = resource.certheader;
addresource.clientcertserialnumber = resource.clientcertserialnumber;
addresource.certserialheader = resource.certserialheader;
addresource.clientcertsubject = resource.clientcertsubject;
addresource.certsubjectheader = resource.certsubjectheader;
addresource.clientcerthash = resource.clientcerthash;
addresource.certhashheader = resource.certhashheader;
addresource.clientcertissuer = resource.clientcertissuer;
addresource.certissuerheader = resource.certissuerheader;
addresource.sessionid = resource.sessionid;
addresource.sessionidheader = resource.sessionidheader;
addresource.cipher = resource.cipher;
addresource.cipherheader = resource.cipherheader;
addresource.clientcertnotbefore = resource.clientcertnotbefore;
addresource.certnotbeforeheader = resource.certnotbeforeheader;
addresource.clientcertnotafter = resource.clientcertnotafter;
addresource.certnotafterheader = resource.certnotafterheader;
addresource.owasupport = resource.owasupport;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, sslaction resource) throws Exception {
sslaction addresource = new sslaction();
addresource.name = resource.name;
addresource.clientauth = resource.clientauth;
addresource.clientcert = resource.clientcert;
addresource.certheader = resource.certheader;
addresource.clientcertserialnumber = resource.clientcertserialnumber;
addresource.certserialheader = resource.certserialheader;
addresource.clientcertsubject = resource.clientcertsubject;
addresource.certsubjectheader = resource.certsubjectheader;
addresource.clientcerthash = resource.clientcerthash;
addresource.certhashheader = resource.certhashheader;
addresource.clientcertissuer = resource.clientcertissuer;
addresource.certissuerheader = resource.certissuerheader;
addresource.sessionid = resource.sessionid;
addresource.sessionidheader = resource.sessionidheader;
addresource.cipher = resource.cipher;
addresource.cipherheader = resource.cipherheader;
addresource.clientcertnotbefore = resource.clientcertnotbefore;
addresource.certnotbeforeheader = resource.certnotbeforeheader;
addresource.clientcertnotafter = resource.clientcertnotafter;
addresource.certnotafterheader = resource.certnotafterheader;
addresource.owasupport = resource.owasupport;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"sslaction",
"resource",
")",
"throws",
"Exception",
"{",
"sslaction",
"addresource",
"=",
"new",
"sslaction",
"(",
")",
";",
"addresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"addresource",
".",
"clientauth",
"=",
"resource",
".",
"clientauth",
";",
"addresource",
".",
"clientcert",
"=",
"resource",
".",
"clientcert",
";",
"addresource",
".",
"certheader",
"=",
"resource",
".",
"certheader",
";",
"addresource",
".",
"clientcertserialnumber",
"=",
"resource",
".",
"clientcertserialnumber",
";",
"addresource",
".",
"certserialheader",
"=",
"resource",
".",
"certserialheader",
";",
"addresource",
".",
"clientcertsubject",
"=",
"resource",
".",
"clientcertsubject",
";",
"addresource",
".",
"certsubjectheader",
"=",
"resource",
".",
"certsubjectheader",
";",
"addresource",
".",
"clientcerthash",
"=",
"resource",
".",
"clientcerthash",
";",
"addresource",
".",
"certhashheader",
"=",
"resource",
".",
"certhashheader",
";",
"addresource",
".",
"clientcertissuer",
"=",
"resource",
".",
"clientcertissuer",
";",
"addresource",
".",
"certissuerheader",
"=",
"resource",
".",
"certissuerheader",
";",
"addresource",
".",
"sessionid",
"=",
"resource",
".",
"sessionid",
";",
"addresource",
".",
"sessionidheader",
"=",
"resource",
".",
"sessionidheader",
";",
"addresource",
".",
"cipher",
"=",
"resource",
".",
"cipher",
";",
"addresource",
".",
"cipherheader",
"=",
"resource",
".",
"cipherheader",
";",
"addresource",
".",
"clientcertnotbefore",
"=",
"resource",
".",
"clientcertnotbefore",
";",
"addresource",
".",
"certnotbeforeheader",
"=",
"resource",
".",
"certnotbeforeheader",
";",
"addresource",
".",
"clientcertnotafter",
"=",
"resource",
".",
"clientcertnotafter",
";",
"addresource",
".",
"certnotafterheader",
"=",
"resource",
".",
"certnotafterheader",
";",
"addresource",
".",
"owasupport",
"=",
"resource",
".",
"owasupport",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add sslaction. | [
"Use",
"this",
"API",
"to",
"add",
"sslaction",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslaction.java#L532-L556 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslaction.java | sslaction.add | public static base_responses add(nitro_service client, sslaction resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslaction addresources[] = new sslaction[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new sslaction();
addresources[i].name = resources[i].name;
addresources[i].clientauth = resources[i].clientauth;
addresources[i].clientcert = resources[i].clientcert;
addresources[i].certheader = resources[i].certheader;
addresources[i].clientcertserialnumber = resources[i].clientcertserialnumber;
addresources[i].certserialheader = resources[i].certserialheader;
addresources[i].clientcertsubject = resources[i].clientcertsubject;
addresources[i].certsubjectheader = resources[i].certsubjectheader;
addresources[i].clientcerthash = resources[i].clientcerthash;
addresources[i].certhashheader = resources[i].certhashheader;
addresources[i].clientcertissuer = resources[i].clientcertissuer;
addresources[i].certissuerheader = resources[i].certissuerheader;
addresources[i].sessionid = resources[i].sessionid;
addresources[i].sessionidheader = resources[i].sessionidheader;
addresources[i].cipher = resources[i].cipher;
addresources[i].cipherheader = resources[i].cipherheader;
addresources[i].clientcertnotbefore = resources[i].clientcertnotbefore;
addresources[i].certnotbeforeheader = resources[i].certnotbeforeheader;
addresources[i].clientcertnotafter = resources[i].clientcertnotafter;
addresources[i].certnotafterheader = resources[i].certnotafterheader;
addresources[i].owasupport = resources[i].owasupport;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | public static base_responses add(nitro_service client, sslaction resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslaction addresources[] = new sslaction[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new sslaction();
addresources[i].name = resources[i].name;
addresources[i].clientauth = resources[i].clientauth;
addresources[i].clientcert = resources[i].clientcert;
addresources[i].certheader = resources[i].certheader;
addresources[i].clientcertserialnumber = resources[i].clientcertserialnumber;
addresources[i].certserialheader = resources[i].certserialheader;
addresources[i].clientcertsubject = resources[i].clientcertsubject;
addresources[i].certsubjectheader = resources[i].certsubjectheader;
addresources[i].clientcerthash = resources[i].clientcerthash;
addresources[i].certhashheader = resources[i].certhashheader;
addresources[i].clientcertissuer = resources[i].clientcertissuer;
addresources[i].certissuerheader = resources[i].certissuerheader;
addresources[i].sessionid = resources[i].sessionid;
addresources[i].sessionidheader = resources[i].sessionidheader;
addresources[i].cipher = resources[i].cipher;
addresources[i].cipherheader = resources[i].cipherheader;
addresources[i].clientcertnotbefore = resources[i].clientcertnotbefore;
addresources[i].certnotbeforeheader = resources[i].certnotbeforeheader;
addresources[i].clientcertnotafter = resources[i].clientcertnotafter;
addresources[i].certnotafterheader = resources[i].certnotafterheader;
addresources[i].owasupport = resources[i].owasupport;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"public",
"static",
"base_responses",
"add",
"(",
"nitro_service",
"client",
",",
"sslaction",
"resources",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"resources",
"!=",
"null",
"&&",
"resources",
".",
"length",
">",
"0",
")",
"{",
"sslaction",
"addresources",
"[",
"]",
"=",
"new",
"sslaction",
"[",
"resources",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"addresources",
"[",
"i",
"]",
"=",
"new",
"sslaction",
"(",
")",
";",
"addresources",
"[",
"i",
"]",
".",
"name",
"=",
"resources",
"[",
"i",
"]",
".",
"name",
";",
"addresources",
"[",
"i",
"]",
".",
"clientauth",
"=",
"resources",
"[",
"i",
"]",
".",
"clientauth",
";",
"addresources",
"[",
"i",
"]",
".",
"clientcert",
"=",
"resources",
"[",
"i",
"]",
".",
"clientcert",
";",
"addresources",
"[",
"i",
"]",
".",
"certheader",
"=",
"resources",
"[",
"i",
"]",
".",
"certheader",
";",
"addresources",
"[",
"i",
"]",
".",
"clientcertserialnumber",
"=",
"resources",
"[",
"i",
"]",
".",
"clientcertserialnumber",
";",
"addresources",
"[",
"i",
"]",
".",
"certserialheader",
"=",
"resources",
"[",
"i",
"]",
".",
"certserialheader",
";",
"addresources",
"[",
"i",
"]",
".",
"clientcertsubject",
"=",
"resources",
"[",
"i",
"]",
".",
"clientcertsubject",
";",
"addresources",
"[",
"i",
"]",
".",
"certsubjectheader",
"=",
"resources",
"[",
"i",
"]",
".",
"certsubjectheader",
";",
"addresources",
"[",
"i",
"]",
".",
"clientcerthash",
"=",
"resources",
"[",
"i",
"]",
".",
"clientcerthash",
";",
"addresources",
"[",
"i",
"]",
".",
"certhashheader",
"=",
"resources",
"[",
"i",
"]",
".",
"certhashheader",
";",
"addresources",
"[",
"i",
"]",
".",
"clientcertissuer",
"=",
"resources",
"[",
"i",
"]",
".",
"clientcertissuer",
";",
"addresources",
"[",
"i",
"]",
".",
"certissuerheader",
"=",
"resources",
"[",
"i",
"]",
".",
"certissuerheader",
";",
"addresources",
"[",
"i",
"]",
".",
"sessionid",
"=",
"resources",
"[",
"i",
"]",
".",
"sessionid",
";",
"addresources",
"[",
"i",
"]",
".",
"sessionidheader",
"=",
"resources",
"[",
"i",
"]",
".",
"sessionidheader",
";",
"addresources",
"[",
"i",
"]",
".",
"cipher",
"=",
"resources",
"[",
"i",
"]",
".",
"cipher",
";",
"addresources",
"[",
"i",
"]",
".",
"cipherheader",
"=",
"resources",
"[",
"i",
"]",
".",
"cipherheader",
";",
"addresources",
"[",
"i",
"]",
".",
"clientcertnotbefore",
"=",
"resources",
"[",
"i",
"]",
".",
"clientcertnotbefore",
";",
"addresources",
"[",
"i",
"]",
".",
"certnotbeforeheader",
"=",
"resources",
"[",
"i",
"]",
".",
"certnotbeforeheader",
";",
"addresources",
"[",
"i",
"]",
".",
"clientcertnotafter",
"=",
"resources",
"[",
"i",
"]",
".",
"clientcertnotafter",
";",
"addresources",
"[",
"i",
"]",
".",
"certnotafterheader",
"=",
"resources",
"[",
"i",
"]",
".",
"certnotafterheader",
";",
"addresources",
"[",
"i",
"]",
".",
"owasupport",
"=",
"resources",
"[",
"i",
"]",
".",
"owasupport",
";",
"}",
"result",
"=",
"add_bulk_request",
"(",
"client",
",",
"addresources",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to add sslaction resources. | [
"Use",
"this",
"API",
"to",
"add",
"sslaction",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslaction.java#L561-L592 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslaction.java | sslaction.get | public static sslaction[] get(nitro_service service) throws Exception{
sslaction obj = new sslaction();
sslaction[] response = (sslaction[])obj.get_resources(service);
return response;
} | java | public static sslaction[] get(nitro_service service) throws Exception{
sslaction obj = new sslaction();
sslaction[] response = (sslaction[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"sslaction",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"sslaction",
"obj",
"=",
"new",
"sslaction",
"(",
")",
";",
"sslaction",
"[",
"]",
"response",
"=",
"(",
"sslaction",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the sslaction resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"sslaction",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslaction.java#L647-L651 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslaction.java | sslaction.get | public static sslaction get(nitro_service service, String name) throws Exception{
sslaction obj = new sslaction();
obj.set_name(name);
sslaction response = (sslaction) obj.get_resource(service);
return response;
} | java | public static sslaction get(nitro_service service, String name) throws Exception{
sslaction obj = new sslaction();
obj.set_name(name);
sslaction response = (sslaction) obj.get_resource(service);
return response;
} | [
"public",
"static",
"sslaction",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"sslaction",
"obj",
"=",
"new",
"sslaction",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"sslaction",
"response",
"=",
"(",
"sslaction",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch sslaction resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslaction",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslaction.java#L663-L668 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/rewrite/rewriteglobal_binding.java | rewriteglobal_binding.get | public static rewriteglobal_binding get(nitro_service service) throws Exception{
rewriteglobal_binding obj = new rewriteglobal_binding();
rewriteglobal_binding response = (rewriteglobal_binding) obj.get_resource(service);
return response;
} | java | public static rewriteglobal_binding get(nitro_service service) throws Exception{
rewriteglobal_binding obj = new rewriteglobal_binding();
rewriteglobal_binding response = (rewriteglobal_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"rewriteglobal_binding",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"rewriteglobal_binding",
"obj",
"=",
"new",
"rewriteglobal_binding",
"(",
")",
";",
"rewriteglobal_binding",
"response",
"=",
"(",
"rewriteglobal_binding",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch a rewriteglobal_binding resource . | [
"Use",
"this",
"API",
"to",
"fetch",
"a",
"rewriteglobal_binding",
"resource",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/rewrite/rewriteglobal_binding.java#L84-L88 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/network/vpath_stats.java | vpath_stats.get | public static vpath_stats get(nitro_service service) throws Exception{
vpath_stats obj = new vpath_stats();
vpath_stats[] response = (vpath_stats[])obj.stat_resources(service);
return response[0];
} | java | public static vpath_stats get(nitro_service service) throws Exception{
vpath_stats obj = new vpath_stats();
vpath_stats[] response = (vpath_stats[])obj.stat_resources(service);
return response[0];
} | [
"public",
"static",
"vpath_stats",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"vpath_stats",
"obj",
"=",
"new",
"vpath_stats",
"(",
")",
";",
"vpath_stats",
"[",
"]",
"response",
"=",
"(",
"vpath_stats",
"[",
"]",
")",
"obj",
".",
"stat_resources",
"(",
"service",
")",
";",
"return",
"response",
"[",
"0",
"]",
";",
"}"
] | Use this API to fetch the statistics of all vpath_stats resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"the",
"statistics",
"of",
"all",
"vpath_stats",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/network/vpath_stats.java#L254-L258 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_auditsyslogpolicy_binding.java | aaauser_auditsyslogpolicy_binding.get | public static aaauser_auditsyslogpolicy_binding[] get(nitro_service service, String username) throws Exception{
aaauser_auditsyslogpolicy_binding obj = new aaauser_auditsyslogpolicy_binding();
obj.set_username(username);
aaauser_auditsyslogpolicy_binding response[] = (aaauser_auditsyslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static aaauser_auditsyslogpolicy_binding[] get(nitro_service service, String username) throws Exception{
aaauser_auditsyslogpolicy_binding obj = new aaauser_auditsyslogpolicy_binding();
obj.set_username(username);
aaauser_auditsyslogpolicy_binding response[] = (aaauser_auditsyslogpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"aaauser_auditsyslogpolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"username",
")",
"throws",
"Exception",
"{",
"aaauser_auditsyslogpolicy_binding",
"obj",
"=",
"new",
"aaauser_auditsyslogpolicy_binding",
"(",
")",
";",
"obj",
".",
"set_username",
"(",
"username",
")",
";",
"aaauser_auditsyslogpolicy_binding",
"response",
"[",
"]",
"=",
"(",
"aaauser_auditsyslogpolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch aaauser_auditsyslogpolicy_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"aaauser_auditsyslogpolicy_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/aaa/aaauser_auditsyslogpolicy_binding.java#L240-L245 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbvserver_cachepolicy_binding.java | lbvserver_cachepolicy_binding.get | public static lbvserver_cachepolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_cachepolicy_binding obj = new lbvserver_cachepolicy_binding();
obj.set_name(name);
lbvserver_cachepolicy_binding response[] = (lbvserver_cachepolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static lbvserver_cachepolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_cachepolicy_binding obj = new lbvserver_cachepolicy_binding();
obj.set_name(name);
lbvserver_cachepolicy_binding response[] = (lbvserver_cachepolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"lbvserver_cachepolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"lbvserver_cachepolicy_binding",
"obj",
"=",
"new",
"lbvserver_cachepolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"lbvserver_cachepolicy_binding",
"response",
"[",
"]",
"=",
"(",
"lbvserver_cachepolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch lbvserver_cachepolicy_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"lbvserver_cachepolicy_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbvserver_cachepolicy_binding.java#L306-L311 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/network/tunnelip_stats.java | tunnelip_stats.get | public static tunnelip_stats[] get(nitro_service service) throws Exception{
tunnelip_stats obj = new tunnelip_stats();
tunnelip_stats[] response = (tunnelip_stats[])obj.stat_resources(service);
return response;
} | java | public static tunnelip_stats[] get(nitro_service service) throws Exception{
tunnelip_stats obj = new tunnelip_stats();
tunnelip_stats[] response = (tunnelip_stats[])obj.stat_resources(service);
return response;
} | [
"public",
"static",
"tunnelip_stats",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"tunnelip_stats",
"obj",
"=",
"new",
"tunnelip_stats",
"(",
")",
";",
"tunnelip_stats",
"[",
"]",
"response",
"=",
"(",
"tunnelip_stats",
"[",
"]",
")",
"obj",
".",
"stat_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch the statistics of all tunnelip_stats resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"the",
"statistics",
"of",
"all",
"tunnelip_stats",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/network/tunnelip_stats.java#L191-L195 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/network/tunnelip_stats.java | tunnelip_stats.get | public static tunnelip_stats get(nitro_service service, String tunnelip) throws Exception{
tunnelip_stats obj = new tunnelip_stats();
obj.set_tunnelip(tunnelip);
tunnelip_stats response = (tunnelip_stats) obj.stat_resource(service);
return response;
} | java | public static tunnelip_stats get(nitro_service service, String tunnelip) throws Exception{
tunnelip_stats obj = new tunnelip_stats();
obj.set_tunnelip(tunnelip);
tunnelip_stats response = (tunnelip_stats) obj.stat_resource(service);
return response;
} | [
"public",
"static",
"tunnelip_stats",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"tunnelip",
")",
"throws",
"Exception",
"{",
"tunnelip_stats",
"obj",
"=",
"new",
"tunnelip_stats",
"(",
")",
";",
"obj",
".",
"set_tunnelip",
"(",
"tunnelip",
")",
";",
"tunnelip_stats",
"response",
"=",
"(",
"tunnelip_stats",
")",
"obj",
".",
"stat_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch statistics of tunnelip_stats resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"statistics",
"of",
"tunnelip_stats",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/network/tunnelip_stats.java#L209-L214 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/sequences/FactoredSequenceListener.java | FactoredSequenceListener.updateSequenceElement | public void updateSequenceElement(int[] sequence, int pos, int oldVal) {
if(models != null){
for(int i = 0; i < models.length; i++)
models[i].updateSequenceElement(sequence, pos, oldVal);
return;
}
model1.updateSequenceElement(sequence, pos, 0);
model2.updateSequenceElement(sequence, pos, 0);
} | java | public void updateSequenceElement(int[] sequence, int pos, int oldVal) {
if(models != null){
for(int i = 0; i < models.length; i++)
models[i].updateSequenceElement(sequence, pos, oldVal);
return;
}
model1.updateSequenceElement(sequence, pos, 0);
model2.updateSequenceElement(sequence, pos, 0);
} | [
"public",
"void",
"updateSequenceElement",
"(",
"int",
"[",
"]",
"sequence",
",",
"int",
"pos",
",",
"int",
"oldVal",
")",
"{",
"if",
"(",
"models",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"models",
".",
"length",
";",
"i",
"++",
")",
"models",
"[",
"i",
"]",
".",
"updateSequenceElement",
"(",
"sequence",
",",
"pos",
",",
"oldVal",
")",
";",
"return",
";",
"}",
"model1",
".",
"updateSequenceElement",
"(",
"sequence",
",",
"pos",
",",
"0",
")",
";",
"model2",
".",
"updateSequenceElement",
"(",
"sequence",
",",
"pos",
",",
"0",
")",
";",
"}"
] | Informs this sequence model that the value of the element at position pos has changed.
This allows this sequence model to update its internal model if desired. | [
"Informs",
"this",
"sequence",
"model",
"that",
"the",
"value",
"of",
"the",
"element",
"at",
"position",
"pos",
"has",
"changed",
".",
"This",
"allows",
"this",
"sequence",
"model",
"to",
"update",
"its",
"internal",
"model",
"if",
"desired",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/FactoredSequenceListener.java#L18-L26 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/sequences/FactoredSequenceListener.java | FactoredSequenceListener.setInitialSequence | public void setInitialSequence(int[] sequence) {
if(models != null){
for(int i = 0; i < models.length; i++)
models[i].setInitialSequence(sequence);
return;
}
model1.setInitialSequence(sequence);
model2.setInitialSequence(sequence);
} | java | public void setInitialSequence(int[] sequence) {
if(models != null){
for(int i = 0; i < models.length; i++)
models[i].setInitialSequence(sequence);
return;
}
model1.setInitialSequence(sequence);
model2.setInitialSequence(sequence);
} | [
"public",
"void",
"setInitialSequence",
"(",
"int",
"[",
"]",
"sequence",
")",
"{",
"if",
"(",
"models",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"models",
".",
"length",
";",
"i",
"++",
")",
"models",
"[",
"i",
"]",
".",
"setInitialSequence",
"(",
"sequence",
")",
";",
"return",
";",
"}",
"model1",
".",
"setInitialSequence",
"(",
"sequence",
")",
";",
"model2",
".",
"setInitialSequence",
"(",
"sequence",
")",
";",
"}"
] | Informs this sequence model that the value of the whole sequence is initialized to sequence | [
"Informs",
"this",
"sequence",
"model",
"that",
"the",
"value",
"of",
"the",
"whole",
"sequence",
"is",
"initialized",
"to",
"sequence"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/sequences/FactoredSequenceListener.java#L32-L40 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/objectbank/DelimitRegExIterator.java | DelimitRegExIterator.getFactory | public static <T> IteratorFromReaderFactory<T> getFactory(String delim, Function<String,T> op) {
return new DelimitRegExIteratorFactory<T>(delim, op);
} | java | public static <T> IteratorFromReaderFactory<T> getFactory(String delim, Function<String,T> op) {
return new DelimitRegExIteratorFactory<T>(delim, op);
} | [
"public",
"static",
"<",
"T",
">",
"IteratorFromReaderFactory",
"<",
"T",
">",
"getFactory",
"(",
"String",
"delim",
",",
"Function",
"<",
"String",
",",
"T",
">",
"op",
")",
"{",
"return",
"new",
"DelimitRegExIteratorFactory",
"<",
"T",
">",
"(",
"delim",
",",
"op",
")",
";",
"}"
] | Returns a factory that vends DelimitRegExIterators that reads the contents of the
given Reader, splits on the specified delimiter, applies op, then returns the result. | [
"Returns",
"a",
"factory",
"that",
"vends",
"DelimitRegExIterators",
"that",
"reads",
"the",
"contents",
"of",
"the",
"given",
"Reader",
"splits",
"on",
"the",
"specified",
"delimiter",
"applies",
"op",
"then",
"returns",
"the",
"result",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/objectbank/DelimitRegExIterator.java#L101-L103 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbmonbindings_servicegroup_binding.java | lbmonbindings_servicegroup_binding.get | public static lbmonbindings_servicegroup_binding[] get(nitro_service service, String monitorname) throws Exception{
lbmonbindings_servicegroup_binding obj = new lbmonbindings_servicegroup_binding();
obj.set_monitorname(monitorname);
lbmonbindings_servicegroup_binding response[] = (lbmonbindings_servicegroup_binding[]) obj.get_resources(service);
return response;
} | java | public static lbmonbindings_servicegroup_binding[] get(nitro_service service, String monitorname) throws Exception{
lbmonbindings_servicegroup_binding obj = new lbmonbindings_servicegroup_binding();
obj.set_monitorname(monitorname);
lbmonbindings_servicegroup_binding response[] = (lbmonbindings_servicegroup_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"lbmonbindings_servicegroup_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"monitorname",
")",
"throws",
"Exception",
"{",
"lbmonbindings_servicegroup_binding",
"obj",
"=",
"new",
"lbmonbindings_servicegroup_binding",
"(",
")",
";",
"obj",
".",
"set_monitorname",
"(",
"monitorname",
")",
";",
"lbmonbindings_servicegroup_binding",
"response",
"[",
"]",
"=",
"(",
"lbmonbindings_servicegroup_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch lbmonbindings_servicegroup_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"lbmonbindings_servicegroup_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbmonbindings_servicegroup_binding.java#L142-L147 | train |
meertensinstituut/mtas | src/main/java/mtas/solr/handler/util/MtasSolrRunningList.java | MtasSolrRunningList.checkForExceptions | public final List<MtasSolrStatus> checkForExceptions() {
List<MtasSolrStatus> statusWithException = null;
for (MtasSolrStatus item : data) {
if (item.checkResponseForException()) {
if (statusWithException == null) {
statusWithException = new ArrayList<>();
}
statusWithException.add(item);
}
}
return statusWithException;
} | java | public final List<MtasSolrStatus> checkForExceptions() {
List<MtasSolrStatus> statusWithException = null;
for (MtasSolrStatus item : data) {
if (item.checkResponseForException()) {
if (statusWithException == null) {
statusWithException = new ArrayList<>();
}
statusWithException.add(item);
}
}
return statusWithException;
} | [
"public",
"final",
"List",
"<",
"MtasSolrStatus",
">",
"checkForExceptions",
"(",
")",
"{",
"List",
"<",
"MtasSolrStatus",
">",
"statusWithException",
"=",
"null",
";",
"for",
"(",
"MtasSolrStatus",
"item",
":",
"data",
")",
"{",
"if",
"(",
"item",
".",
"checkResponseForException",
"(",
")",
")",
"{",
"if",
"(",
"statusWithException",
"==",
"null",
")",
"{",
"statusWithException",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"}",
"statusWithException",
".",
"add",
"(",
"item",
")",
";",
"}",
"}",
"return",
"statusWithException",
";",
"}"
] | Check for exceptions.
@return the list | [
"Check",
"for",
"exceptions",
"."
] | f02ae730848616bd88b553efa7f9eddc32818e64 | https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/util/MtasSolrRunningList.java#L61-L72 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationradiuspolicy_authenticationvserver_binding.java | authenticationradiuspolicy_authenticationvserver_binding.get | public static authenticationradiuspolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
authenticationradiuspolicy_authenticationvserver_binding obj = new authenticationradiuspolicy_authenticationvserver_binding();
obj.set_name(name);
authenticationradiuspolicy_authenticationvserver_binding response[] = (authenticationradiuspolicy_authenticationvserver_binding[]) obj.get_resources(service);
return response;
} | java | public static authenticationradiuspolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
authenticationradiuspolicy_authenticationvserver_binding obj = new authenticationradiuspolicy_authenticationvserver_binding();
obj.set_name(name);
authenticationradiuspolicy_authenticationvserver_binding response[] = (authenticationradiuspolicy_authenticationvserver_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"authenticationradiuspolicy_authenticationvserver_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"authenticationradiuspolicy_authenticationvserver_binding",
"obj",
"=",
"new",
"authenticationradiuspolicy_authenticationvserver_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"authenticationradiuspolicy_authenticationvserver_binding",
"response",
"[",
"]",
"=",
"(",
"authenticationradiuspolicy_authenticationvserver_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch authenticationradiuspolicy_authenticationvserver_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"authenticationradiuspolicy_authenticationvserver_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationradiuspolicy_authenticationvserver_binding.java#L132-L137 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_authenticationsamlpolicy_binding.java | vpnvserver_authenticationsamlpolicy_binding.get | public static vpnvserver_authenticationsamlpolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationsamlpolicy_binding obj = new vpnvserver_authenticationsamlpolicy_binding();
obj.set_name(name);
vpnvserver_authenticationsamlpolicy_binding response[] = (vpnvserver_authenticationsamlpolicy_binding[]) obj.get_resources(service);
return response;
} | java | public static vpnvserver_authenticationsamlpolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationsamlpolicy_binding obj = new vpnvserver_authenticationsamlpolicy_binding();
obj.set_name(name);
vpnvserver_authenticationsamlpolicy_binding response[] = (vpnvserver_authenticationsamlpolicy_binding[]) obj.get_resources(service);
return response;
} | [
"public",
"static",
"vpnvserver_authenticationsamlpolicy_binding",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"vpnvserver_authenticationsamlpolicy_binding",
"obj",
"=",
"new",
"vpnvserver_authenticationsamlpolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"vpnvserver_authenticationsamlpolicy_binding",
"response",
"[",
"]",
"=",
"(",
"vpnvserver_authenticationsamlpolicy_binding",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch vpnvserver_authenticationsamlpolicy_binding resources of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"vpnvserver_authenticationsamlpolicy_binding",
"resources",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_authenticationsamlpolicy_binding.java#L326-L331 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpkcs8.java | sslpkcs8.convert | public static base_response convert(nitro_service client, sslpkcs8 resource) throws Exception {
sslpkcs8 convertresource = new sslpkcs8();
convertresource.pkcs8file = resource.pkcs8file;
convertresource.keyfile = resource.keyfile;
convertresource.keyform = resource.keyform;
convertresource.password = resource.password;
return convertresource.perform_operation(client,"convert");
} | java | public static base_response convert(nitro_service client, sslpkcs8 resource) throws Exception {
sslpkcs8 convertresource = new sslpkcs8();
convertresource.pkcs8file = resource.pkcs8file;
convertresource.keyfile = resource.keyfile;
convertresource.keyform = resource.keyform;
convertresource.password = resource.password;
return convertresource.perform_operation(client,"convert");
} | [
"public",
"static",
"base_response",
"convert",
"(",
"nitro_service",
"client",
",",
"sslpkcs8",
"resource",
")",
"throws",
"Exception",
"{",
"sslpkcs8",
"convertresource",
"=",
"new",
"sslpkcs8",
"(",
")",
";",
"convertresource",
".",
"pkcs8file",
"=",
"resource",
".",
"pkcs8file",
";",
"convertresource",
".",
"keyfile",
"=",
"resource",
".",
"keyfile",
";",
"convertresource",
".",
"keyform",
"=",
"resource",
".",
"keyform",
";",
"convertresource",
".",
"password",
"=",
"resource",
".",
"password",
";",
"return",
"convertresource",
".",
"perform_operation",
"(",
"client",
",",
"\"convert\"",
")",
";",
"}"
] | Use this API to convert sslpkcs8. | [
"Use",
"this",
"API",
"to",
"convert",
"sslpkcs8",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpkcs8.java#L151-L158 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/network/ci.java | ci.get | public static ci[] get(nitro_service service) throws Exception{
ci obj = new ci();
ci[] response = (ci[])obj.get_resources(service);
return response;
} | java | public static ci[] get(nitro_service service) throws Exception{
ci obj = new ci();
ci[] response = (ci[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"ci",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"ci",
"obj",
"=",
"new",
"ci",
"(",
")",
";",
"ci",
"[",
"]",
"response",
"=",
"(",
"ci",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the ci resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"ci",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/ci.java#L87-L91 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java | sslcipher.add | public static base_response add(nitro_service client, sslcipher resource) throws Exception {
sslcipher addresource = new sslcipher();
addresource.ciphergroupname = resource.ciphergroupname;
addresource.ciphgrpalias = resource.ciphgrpalias;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, sslcipher resource) throws Exception {
sslcipher addresource = new sslcipher();
addresource.ciphergroupname = resource.ciphergroupname;
addresource.ciphgrpalias = resource.ciphgrpalias;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"sslcipher",
"resource",
")",
"throws",
"Exception",
"{",
"sslcipher",
"addresource",
"=",
"new",
"sslcipher",
"(",
")",
";",
"addresource",
".",
"ciphergroupname",
"=",
"resource",
".",
"ciphergroupname",
";",
"addresource",
".",
"ciphgrpalias",
"=",
"resource",
".",
"ciphgrpalias",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add sslcipher. | [
"Use",
"this",
"API",
"to",
"add",
"sslcipher",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java#L139-L144 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java | sslcipher.add | public static base_responses add(nitro_service client, sslcipher resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslcipher addresources[] = new sslcipher[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new sslcipher();
addresources[i].ciphergroupname = resources[i].ciphergroupname;
addresources[i].ciphgrpalias = resources[i].ciphgrpalias;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java | public static base_responses add(nitro_service client, sslcipher resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslcipher addresources[] = new sslcipher[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new sslcipher();
addresources[i].ciphergroupname = resources[i].ciphergroupname;
addresources[i].ciphgrpalias = resources[i].ciphgrpalias;
}
result = add_bulk_request(client, addresources);
}
return result;
} | [
"public",
"static",
"base_responses",
"add",
"(",
"nitro_service",
"client",
",",
"sslcipher",
"resources",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"resources",
"!=",
"null",
"&&",
"resources",
".",
"length",
">",
"0",
")",
"{",
"sslcipher",
"addresources",
"[",
"]",
"=",
"new",
"sslcipher",
"[",
"resources",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"addresources",
"[",
"i",
"]",
"=",
"new",
"sslcipher",
"(",
")",
";",
"addresources",
"[",
"i",
"]",
".",
"ciphergroupname",
"=",
"resources",
"[",
"i",
"]",
".",
"ciphergroupname",
";",
"addresources",
"[",
"i",
"]",
".",
"ciphgrpalias",
"=",
"resources",
"[",
"i",
"]",
".",
"ciphgrpalias",
";",
"}",
"result",
"=",
"add_bulk_request",
"(",
"client",
",",
"addresources",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to add sslcipher resources. | [
"Use",
"this",
"API",
"to",
"add",
"sslcipher",
"resources",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java#L149-L161 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java | sslcipher.delete | public static base_response delete(nitro_service client, String ciphergroupname) throws Exception {
sslcipher deleteresource = new sslcipher();
deleteresource.ciphergroupname = ciphergroupname;
return deleteresource.delete_resource(client);
} | java | public static base_response delete(nitro_service client, String ciphergroupname) throws Exception {
sslcipher deleteresource = new sslcipher();
deleteresource.ciphergroupname = ciphergroupname;
return deleteresource.delete_resource(client);
} | [
"public",
"static",
"base_response",
"delete",
"(",
"nitro_service",
"client",
",",
"String",
"ciphergroupname",
")",
"throws",
"Exception",
"{",
"sslcipher",
"deleteresource",
"=",
"new",
"sslcipher",
"(",
")",
";",
"deleteresource",
".",
"ciphergroupname",
"=",
"ciphergroupname",
";",
"return",
"deleteresource",
".",
"delete_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to delete sslcipher of given name. | [
"Use",
"this",
"API",
"to",
"delete",
"sslcipher",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java#L166-L170 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java | sslcipher.delete | public static base_responses delete(nitro_service client, String ciphergroupname[]) throws Exception {
base_responses result = null;
if (ciphergroupname != null && ciphergroupname.length > 0) {
sslcipher deleteresources[] = new sslcipher[ciphergroupname.length];
for (int i=0;i<ciphergroupname.length;i++){
deleteresources[i] = new sslcipher();
deleteresources[i].ciphergroupname = ciphergroupname[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | java | public static base_responses delete(nitro_service client, String ciphergroupname[]) throws Exception {
base_responses result = null;
if (ciphergroupname != null && ciphergroupname.length > 0) {
sslcipher deleteresources[] = new sslcipher[ciphergroupname.length];
for (int i=0;i<ciphergroupname.length;i++){
deleteresources[i] = new sslcipher();
deleteresources[i].ciphergroupname = ciphergroupname[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | [
"public",
"static",
"base_responses",
"delete",
"(",
"nitro_service",
"client",
",",
"String",
"ciphergroupname",
"[",
"]",
")",
"throws",
"Exception",
"{",
"base_responses",
"result",
"=",
"null",
";",
"if",
"(",
"ciphergroupname",
"!=",
"null",
"&&",
"ciphergroupname",
".",
"length",
">",
"0",
")",
"{",
"sslcipher",
"deleteresources",
"[",
"]",
"=",
"new",
"sslcipher",
"[",
"ciphergroupname",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ciphergroupname",
".",
"length",
";",
"i",
"++",
")",
"{",
"deleteresources",
"[",
"i",
"]",
"=",
"new",
"sslcipher",
"(",
")",
";",
"deleteresources",
"[",
"i",
"]",
".",
"ciphergroupname",
"=",
"ciphergroupname",
"[",
"i",
"]",
";",
"}",
"result",
"=",
"delete_bulk_request",
"(",
"client",
",",
"deleteresources",
")",
";",
"}",
"return",
"result",
";",
"}"
] | Use this API to delete sslcipher resources of given names. | [
"Use",
"this",
"API",
"to",
"delete",
"sslcipher",
"resources",
"of",
"given",
"names",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java#L185-L196 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java | sslcipher.get | public static sslcipher[] get(nitro_service service) throws Exception{
sslcipher obj = new sslcipher();
sslcipher[] response = (sslcipher[])obj.get_resources(service);
return response;
} | java | public static sslcipher[] get(nitro_service service) throws Exception{
sslcipher obj = new sslcipher();
sslcipher[] response = (sslcipher[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"sslcipher",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"sslcipher",
"obj",
"=",
"new",
"sslcipher",
"(",
")",
";",
"sslcipher",
"[",
"]",
"response",
"=",
"(",
"sslcipher",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the sslcipher resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"sslcipher",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java#L218-L222 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java | sslcipher.get | public static sslcipher get(nitro_service service, String ciphergroupname) throws Exception{
sslcipher obj = new sslcipher();
obj.set_ciphergroupname(ciphergroupname);
sslcipher response = (sslcipher) obj.get_resource(service);
return response;
} | java | public static sslcipher get(nitro_service service, String ciphergroupname) throws Exception{
sslcipher obj = new sslcipher();
obj.set_ciphergroupname(ciphergroupname);
sslcipher response = (sslcipher) obj.get_resource(service);
return response;
} | [
"public",
"static",
"sslcipher",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"ciphergroupname",
")",
"throws",
"Exception",
"{",
"sslcipher",
"obj",
"=",
"new",
"sslcipher",
"(",
")",
";",
"obj",
".",
"set_ciphergroupname",
"(",
"ciphergroupname",
")",
";",
"sslcipher",
"response",
"=",
"(",
"sslcipher",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch sslcipher resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslcipher",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java#L234-L239 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java | sslcipher.get | public static sslcipher[] get(nitro_service service, String ciphergroupname[]) throws Exception{
if (ciphergroupname !=null && ciphergroupname.length>0) {
sslcipher response[] = new sslcipher[ciphergroupname.length];
sslcipher obj[] = new sslcipher[ciphergroupname.length];
for (int i=0;i<ciphergroupname.length;i++) {
obj[i] = new sslcipher();
obj[i].set_ciphergroupname(ciphergroupname[i]);
response[i] = (sslcipher) obj[i].get_resource(service);
}
return response;
}
return null;
} | java | public static sslcipher[] get(nitro_service service, String ciphergroupname[]) throws Exception{
if (ciphergroupname !=null && ciphergroupname.length>0) {
sslcipher response[] = new sslcipher[ciphergroupname.length];
sslcipher obj[] = new sslcipher[ciphergroupname.length];
for (int i=0;i<ciphergroupname.length;i++) {
obj[i] = new sslcipher();
obj[i].set_ciphergroupname(ciphergroupname[i]);
response[i] = (sslcipher) obj[i].get_resource(service);
}
return response;
}
return null;
} | [
"public",
"static",
"sslcipher",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"ciphergroupname",
"[",
"]",
")",
"throws",
"Exception",
"{",
"if",
"(",
"ciphergroupname",
"!=",
"null",
"&&",
"ciphergroupname",
".",
"length",
">",
"0",
")",
"{",
"sslcipher",
"response",
"[",
"]",
"=",
"new",
"sslcipher",
"[",
"ciphergroupname",
".",
"length",
"]",
";",
"sslcipher",
"obj",
"[",
"]",
"=",
"new",
"sslcipher",
"[",
"ciphergroupname",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ciphergroupname",
".",
"length",
";",
"i",
"++",
")",
"{",
"obj",
"[",
"i",
"]",
"=",
"new",
"sslcipher",
"(",
")",
";",
"obj",
"[",
"i",
"]",
".",
"set_ciphergroupname",
"(",
"ciphergroupname",
"[",
"i",
"]",
")",
";",
"response",
"[",
"i",
"]",
"=",
"(",
"sslcipher",
")",
"obj",
"[",
"i",
"]",
".",
"get_resource",
"(",
"service",
")",
";",
"}",
"return",
"response",
";",
"}",
"return",
"null",
";",
"}"
] | Use this API to fetch sslcipher resources of given names . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslcipher",
"resources",
"of",
"given",
"names",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher.java#L244-L256 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicy.java | transformpolicy.add | public static base_response add(nitro_service client, transformpolicy resource) throws Exception {
transformpolicy addresource = new transformpolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.profilename = resource.profilename;
addresource.comment = resource.comment;
addresource.logaction = resource.logaction;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, transformpolicy resource) throws Exception {
transformpolicy addresource = new transformpolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.profilename = resource.profilename;
addresource.comment = resource.comment;
addresource.logaction = resource.logaction;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"transformpolicy",
"resource",
")",
"throws",
"Exception",
"{",
"transformpolicy",
"addresource",
"=",
"new",
"transformpolicy",
"(",
")",
";",
"addresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"addresource",
".",
"rule",
"=",
"resource",
".",
"rule",
";",
"addresource",
".",
"profilename",
"=",
"resource",
".",
"profilename",
";",
"addresource",
".",
"comment",
"=",
"resource",
".",
"comment",
";",
"addresource",
".",
"logaction",
"=",
"resource",
".",
"logaction",
";",
"return",
"addresource",
".",
"add_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to add transformpolicy. | [
"Use",
"this",
"API",
"to",
"add",
"transformpolicy",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicy.java#L235-L243 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicy.java | transformpolicy.update | public static base_response update(nitro_service client, transformpolicy resource) throws Exception {
transformpolicy updateresource = new transformpolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.profilename = resource.profilename;
updateresource.comment = resource.comment;
updateresource.logaction = resource.logaction;
return updateresource.update_resource(client);
} | java | public static base_response update(nitro_service client, transformpolicy resource) throws Exception {
transformpolicy updateresource = new transformpolicy();
updateresource.name = resource.name;
updateresource.rule = resource.rule;
updateresource.profilename = resource.profilename;
updateresource.comment = resource.comment;
updateresource.logaction = resource.logaction;
return updateresource.update_resource(client);
} | [
"public",
"static",
"base_response",
"update",
"(",
"nitro_service",
"client",
",",
"transformpolicy",
"resource",
")",
"throws",
"Exception",
"{",
"transformpolicy",
"updateresource",
"=",
"new",
"transformpolicy",
"(",
")",
";",
"updateresource",
".",
"name",
"=",
"resource",
".",
"name",
";",
"updateresource",
".",
"rule",
"=",
"resource",
".",
"rule",
";",
"updateresource",
".",
"profilename",
"=",
"resource",
".",
"profilename",
";",
"updateresource",
".",
"comment",
"=",
"resource",
".",
"comment",
";",
"updateresource",
".",
"logaction",
"=",
"resource",
".",
"logaction",
";",
"return",
"updateresource",
".",
"update_resource",
"(",
"client",
")",
";",
"}"
] | Use this API to update transformpolicy. | [
"Use",
"this",
"API",
"to",
"update",
"transformpolicy",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicy.java#L318-L326 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicy.java | transformpolicy.get | public static transformpolicy[] get(nitro_service service) throws Exception{
transformpolicy obj = new transformpolicy();
transformpolicy[] response = (transformpolicy[])obj.get_resources(service);
return response;
} | java | public static transformpolicy[] get(nitro_service service) throws Exception{
transformpolicy obj = new transformpolicy();
transformpolicy[] response = (transformpolicy[])obj.get_resources(service);
return response;
} | [
"public",
"static",
"transformpolicy",
"[",
"]",
"get",
"(",
"nitro_service",
"service",
")",
"throws",
"Exception",
"{",
"transformpolicy",
"obj",
"=",
"new",
"transformpolicy",
"(",
")",
";",
"transformpolicy",
"[",
"]",
"response",
"=",
"(",
"transformpolicy",
"[",
"]",
")",
"obj",
".",
"get_resources",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch all the transformpolicy resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"all",
"the",
"transformpolicy",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicy.java#L413-L417 | train |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicy.java | transformpolicy.get | public static transformpolicy get(nitro_service service, String name) throws Exception{
transformpolicy obj = new transformpolicy();
obj.set_name(name);
transformpolicy response = (transformpolicy) obj.get_resource(service);
return response;
} | java | public static transformpolicy get(nitro_service service, String name) throws Exception{
transformpolicy obj = new transformpolicy();
obj.set_name(name);
transformpolicy response = (transformpolicy) obj.get_resource(service);
return response;
} | [
"public",
"static",
"transformpolicy",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"transformpolicy",
"obj",
"=",
"new",
"transformpolicy",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
"transformpolicy",
"response",
"=",
"(",
"transformpolicy",
")",
"obj",
".",
"get_resource",
"(",
"service",
")",
";",
"return",
"response",
";",
"}"
] | Use this API to fetch transformpolicy resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"transformpolicy",
"resource",
"of",
"given",
"name",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicy.java#L429-L434 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ling/WordTag.java | WordTag.compareTo | public int compareTo(WordTag wordTag) {
int first = (word != null ? word().compareTo(wordTag.word()) : 0);
if(first != 0)
return first;
else {
if (tag() == null) {
if (wordTag.tag() == null)
return 0;
else
return -1;
}
return tag().compareTo(wordTag.tag());
}
} | java | public int compareTo(WordTag wordTag) {
int first = (word != null ? word().compareTo(wordTag.word()) : 0);
if(first != 0)
return first;
else {
if (tag() == null) {
if (wordTag.tag() == null)
return 0;
else
return -1;
}
return tag().compareTo(wordTag.tag());
}
} | [
"public",
"int",
"compareTo",
"(",
"WordTag",
"wordTag",
")",
"{",
"int",
"first",
"=",
"(",
"word",
"!=",
"null",
"?",
"word",
"(",
")",
".",
"compareTo",
"(",
"wordTag",
".",
"word",
"(",
")",
")",
":",
"0",
")",
";",
"if",
"(",
"first",
"!=",
"0",
")",
"return",
"first",
";",
"else",
"{",
"if",
"(",
"tag",
"(",
")",
"==",
"null",
")",
"{",
"if",
"(",
"wordTag",
".",
"tag",
"(",
")",
"==",
"null",
")",
"return",
"0",
";",
"else",
"return",
"-",
"1",
";",
"}",
"return",
"tag",
"(",
")",
".",
"compareTo",
"(",
"wordTag",
".",
"tag",
"(",
")",
")",
";",
"}",
"}"
] | Orders first by word, then by tag.
@param wordTag object to compare to
@return result (positive if <code>this</code> is greater than
<code>obj</code>, 0 if equal, negative otherwise) | [
"Orders",
"first",
"by",
"word",
"then",
"by",
"tag",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ling/WordTag.java#L185-L198 | train |
wellner/jcarafe | jcarafe-core/src/main/java/cern/colt/map/OpenLongIntHashMap.java | OpenLongIntHashMap.rehash | protected void rehash(int newCapacity) {
int oldCapacity = table.length;
//if (oldCapacity == newCapacity) return;
long oldTable[] = table;
int oldValues[] = values;
byte oldState[] = state;
long newTable[] = new long[newCapacity];
int newValues[] = new int[newCapacity];
byte newState[] = new byte[newCapacity];
this.lowWaterMark = chooseLowWaterMark(newCapacity,this.minLoadFactor);
this.highWaterMark = chooseHighWaterMark(newCapacity,this.maxLoadFactor);
this.table = newTable;
this.values = newValues;
this.state = newState;
this.freeEntries = newCapacity-this.distinct; // delta
for (int i = oldCapacity ; i-- > 0 ;) {
if (oldState[i]==FULL) {
long element = oldTable[i];
int index = indexOfInsertion(element);
newTable[index]=element;
newValues[index]=oldValues[i];
newState[index]=FULL;
}
}
} | java | protected void rehash(int newCapacity) {
int oldCapacity = table.length;
//if (oldCapacity == newCapacity) return;
long oldTable[] = table;
int oldValues[] = values;
byte oldState[] = state;
long newTable[] = new long[newCapacity];
int newValues[] = new int[newCapacity];
byte newState[] = new byte[newCapacity];
this.lowWaterMark = chooseLowWaterMark(newCapacity,this.minLoadFactor);
this.highWaterMark = chooseHighWaterMark(newCapacity,this.maxLoadFactor);
this.table = newTable;
this.values = newValues;
this.state = newState;
this.freeEntries = newCapacity-this.distinct; // delta
for (int i = oldCapacity ; i-- > 0 ;) {
if (oldState[i]==FULL) {
long element = oldTable[i];
int index = indexOfInsertion(element);
newTable[index]=element;
newValues[index]=oldValues[i];
newState[index]=FULL;
}
}
} | [
"protected",
"void",
"rehash",
"(",
"int",
"newCapacity",
")",
"{",
"int",
"oldCapacity",
"=",
"table",
".",
"length",
";",
"//if (oldCapacity == newCapacity) return;\r",
"long",
"oldTable",
"[",
"]",
"=",
"table",
";",
"int",
"oldValues",
"[",
"]",
"=",
"values",
";",
"byte",
"oldState",
"[",
"]",
"=",
"state",
";",
"long",
"newTable",
"[",
"]",
"=",
"new",
"long",
"[",
"newCapacity",
"]",
";",
"int",
"newValues",
"[",
"]",
"=",
"new",
"int",
"[",
"newCapacity",
"]",
";",
"byte",
"newState",
"[",
"]",
"=",
"new",
"byte",
"[",
"newCapacity",
"]",
";",
"this",
".",
"lowWaterMark",
"=",
"chooseLowWaterMark",
"(",
"newCapacity",
",",
"this",
".",
"minLoadFactor",
")",
";",
"this",
".",
"highWaterMark",
"=",
"chooseHighWaterMark",
"(",
"newCapacity",
",",
"this",
".",
"maxLoadFactor",
")",
";",
"this",
".",
"table",
"=",
"newTable",
";",
"this",
".",
"values",
"=",
"newValues",
";",
"this",
".",
"state",
"=",
"newState",
";",
"this",
".",
"freeEntries",
"=",
"newCapacity",
"-",
"this",
".",
"distinct",
";",
"// delta\r",
"for",
"(",
"int",
"i",
"=",
"oldCapacity",
";",
"i",
"--",
">",
"0",
";",
")",
"{",
"if",
"(",
"oldState",
"[",
"i",
"]",
"==",
"FULL",
")",
"{",
"long",
"element",
"=",
"oldTable",
"[",
"i",
"]",
";",
"int",
"index",
"=",
"indexOfInsertion",
"(",
"element",
")",
";",
"newTable",
"[",
"index",
"]",
"=",
"element",
";",
"newValues",
"[",
"index",
"]",
"=",
"oldValues",
"[",
"i",
"]",
";",
"newState",
"[",
"index",
"]",
"=",
"FULL",
";",
"}",
"}",
"}"
] | Rehashes the contents of the receiver into a new table
with a smaller or larger capacity.
This method is called automatically when the
number of keys in the receiver exceeds the high water mark or falls below the low water mark. | [
"Rehashes",
"the",
"contents",
"of",
"the",
"receiver",
"into",
"a",
"new",
"table",
"with",
"a",
"smaller",
"or",
"larger",
"capacity",
".",
"This",
"method",
"is",
"called",
"automatically",
"when",
"the",
"number",
"of",
"keys",
"in",
"the",
"receiver",
"exceeds",
"the",
"high",
"water",
"mark",
"or",
"falls",
"below",
"the",
"low",
"water",
"mark",
"."
] | ab8b0a83dbf600fe80c27711815c90bd3055b217 | https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/map/OpenLongIntHashMap.java#L379-L408 | train |
wellner/jcarafe | jcarafe-core/src/main/java/cern/colt/map/OpenLongIntHashMap.java | OpenLongIntHashMap.removeKey | public boolean removeKey(long key) {
int i = indexOfKey(key);
if (i<0) return false; // key not contained
this.state[i]=REMOVED;
this.values[i]=0; // delta
this.distinct--;
if (this.distinct < this.lowWaterMark) {
int newCapacity = chooseShrinkCapacity(this.distinct,this.minLoadFactor, this.maxLoadFactor);
rehash(newCapacity);
}
return true;
} | java | public boolean removeKey(long key) {
int i = indexOfKey(key);
if (i<0) return false; // key not contained
this.state[i]=REMOVED;
this.values[i]=0; // delta
this.distinct--;
if (this.distinct < this.lowWaterMark) {
int newCapacity = chooseShrinkCapacity(this.distinct,this.minLoadFactor, this.maxLoadFactor);
rehash(newCapacity);
}
return true;
} | [
"public",
"boolean",
"removeKey",
"(",
"long",
"key",
")",
"{",
"int",
"i",
"=",
"indexOfKey",
"(",
"key",
")",
";",
"if",
"(",
"i",
"<",
"0",
")",
"return",
"false",
";",
"// key not contained\r",
"this",
".",
"state",
"[",
"i",
"]",
"=",
"REMOVED",
";",
"this",
".",
"values",
"[",
"i",
"]",
"=",
"0",
";",
"// delta\r",
"this",
".",
"distinct",
"--",
";",
"if",
"(",
"this",
".",
"distinct",
"<",
"this",
".",
"lowWaterMark",
")",
"{",
"int",
"newCapacity",
"=",
"chooseShrinkCapacity",
"(",
"this",
".",
"distinct",
",",
"this",
".",
"minLoadFactor",
",",
"this",
".",
"maxLoadFactor",
")",
";",
"rehash",
"(",
"newCapacity",
")",
";",
"}",
"return",
"true",
";",
"}"
] | Removes the given key with its associated element from the receiver, if present.
@param key the key to be removed from the receiver.
@return <tt>true</tt> if the receiver contained the specified key, <tt>false</tt> otherwise. | [
"Removes",
"the",
"given",
"key",
"with",
"its",
"associated",
"element",
"from",
"the",
"receiver",
"if",
"present",
"."
] | ab8b0a83dbf600fe80c27711815c90bd3055b217 | https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/map/OpenLongIntHashMap.java#L415-L429 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/XMLUtils.java | XMLUtils.getXmlParser | public static DocumentBuilder getXmlParser() {
DocumentBuilder db = null;
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
//Disable DTD loading and validation
//See http://stackoverflow.com/questions/155101/make-documentbuilder-parse-ignore-dtd-references
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false);
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
db = dbf.newDocumentBuilder();
db.setErrorHandler(new SAXErrorHandler());
} catch (ParserConfigurationException e) {
System.err.printf("%s: Unable to create XML parser\n", XMLUtils.class.getName());
e.printStackTrace();
} catch(UnsupportedOperationException e) {
System.err.printf("%s: API error while setting up XML parser. Check your JAXP version\n", XMLUtils.class.getName());
e.printStackTrace();
}
return db;
} | java | public static DocumentBuilder getXmlParser() {
DocumentBuilder db = null;
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
//Disable DTD loading and validation
//See http://stackoverflow.com/questions/155101/make-documentbuilder-parse-ignore-dtd-references
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", false);
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
db = dbf.newDocumentBuilder();
db.setErrorHandler(new SAXErrorHandler());
} catch (ParserConfigurationException e) {
System.err.printf("%s: Unable to create XML parser\n", XMLUtils.class.getName());
e.printStackTrace();
} catch(UnsupportedOperationException e) {
System.err.printf("%s: API error while setting up XML parser. Check your JAXP version\n", XMLUtils.class.getName());
e.printStackTrace();
}
return db;
} | [
"public",
"static",
"DocumentBuilder",
"getXmlParser",
"(",
")",
"{",
"DocumentBuilder",
"db",
"=",
"null",
";",
"try",
"{",
"DocumentBuilderFactory",
"dbf",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";",
"dbf",
".",
"setValidating",
"(",
"false",
")",
";",
"//Disable DTD loading and validation\r",
"//See http://stackoverflow.com/questions/155101/make-documentbuilder-parse-ignore-dtd-references\r",
"dbf",
".",
"setFeature",
"(",
"\"http://apache.org/xml/features/nonvalidating/load-dtd-grammar\"",
",",
"false",
")",
";",
"dbf",
".",
"setFeature",
"(",
"\"http://apache.org/xml/features/nonvalidating/load-external-dtd\"",
",",
"false",
")",
";",
"db",
"=",
"dbf",
".",
"newDocumentBuilder",
"(",
")",
";",
"db",
".",
"setErrorHandler",
"(",
"new",
"SAXErrorHandler",
"(",
")",
")",
";",
"}",
"catch",
"(",
"ParserConfigurationException",
"e",
")",
"{",
"System",
".",
"err",
".",
"printf",
"(",
"\"%s: Unable to create XML parser\\n\"",
",",
"XMLUtils",
".",
"class",
".",
"getName",
"(",
")",
")",
";",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"catch",
"(",
"UnsupportedOperationException",
"e",
")",
"{",
"System",
".",
"err",
".",
"printf",
"(",
"\"%s: API error while setting up XML parser. Check your JAXP version\\n\"",
",",
"XMLUtils",
".",
"class",
".",
"getName",
"(",
")",
")",
";",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"return",
"db",
";",
"}"
] | Returns a non-validating XML parser. The parser ignores both DTDs and XSDs.
@return An XML parser in the form of a DocumentBuilder | [
"Returns",
"a",
"non",
"-",
"validating",
"XML",
"parser",
".",
"The",
"parser",
"ignores",
"both",
"DTDs",
"and",
"XSDs",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/XMLUtils.java#L47-L71 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/XMLUtils.java | XMLUtils.readUntilTag | public static String readUntilTag(Reader r) throws IOException {
if (!r.ready()) {
return "";
}
StringBuilder b = new StringBuilder();
int c = r.read();
while (c >= 0 && c != '<') {
b.append((char) c);
c = r.read();
}
return b.toString();
} | java | public static String readUntilTag(Reader r) throws IOException {
if (!r.ready()) {
return "";
}
StringBuilder b = new StringBuilder();
int c = r.read();
while (c >= 0 && c != '<') {
b.append((char) c);
c = r.read();
}
return b.toString();
} | [
"public",
"static",
"String",
"readUntilTag",
"(",
"Reader",
"r",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"r",
".",
"ready",
"(",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"c",
"=",
"r",
".",
"read",
"(",
")",
";",
"while",
"(",
"c",
">=",
"0",
"&&",
"c",
"!=",
"'",
"'",
")",
"{",
"b",
".",
"append",
"(",
"(",
"char",
")",
"c",
")",
";",
"c",
"=",
"r",
".",
"read",
"(",
")",
";",
"}",
"return",
"b",
".",
"toString",
"(",
")",
";",
"}"
] | Reads all text up to next XML tag and returns it as a String.
@return the String of the text read, which may be empty. | [
"Reads",
"all",
"text",
"up",
"to",
"next",
"XML",
"tag",
"and",
"returns",
"it",
"as",
"a",
"String",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/XMLUtils.java#L173-L184 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/XMLUtils.java | XMLUtils.findSpace | public static int findSpace(String haystack, int begin) {
int space = haystack.indexOf(' ', begin);
int nbsp = haystack.indexOf('\u00A0', begin);
if (space == -1 && nbsp == -1) {
return -1;
} else if (space >= 0 && nbsp >= 0) {
return Math.min(space, nbsp);
} else {
// eg one is -1, and the other is >= 0
return Math.max(space, nbsp);
}
} | java | public static int findSpace(String haystack, int begin) {
int space = haystack.indexOf(' ', begin);
int nbsp = haystack.indexOf('\u00A0', begin);
if (space == -1 && nbsp == -1) {
return -1;
} else if (space >= 0 && nbsp >= 0) {
return Math.min(space, nbsp);
} else {
// eg one is -1, and the other is >= 0
return Math.max(space, nbsp);
}
} | [
"public",
"static",
"int",
"findSpace",
"(",
"String",
"haystack",
",",
"int",
"begin",
")",
"{",
"int",
"space",
"=",
"haystack",
".",
"indexOf",
"(",
"'",
"'",
",",
"begin",
")",
";",
"int",
"nbsp",
"=",
"haystack",
".",
"indexOf",
"(",
"'",
"'",
",",
"begin",
")",
";",
"if",
"(",
"space",
"==",
"-",
"1",
"&&",
"nbsp",
"==",
"-",
"1",
")",
"{",
"return",
"-",
"1",
";",
"}",
"else",
"if",
"(",
"space",
">=",
"0",
"&&",
"nbsp",
">=",
"0",
")",
"{",
"return",
"Math",
".",
"min",
"(",
"space",
",",
"nbsp",
")",
";",
"}",
"else",
"{",
"// eg one is -1, and the other is >= 0\r",
"return",
"Math",
".",
"max",
"(",
"space",
",",
"nbsp",
")",
";",
"}",
"}"
] | return either the first space or the first nbsp | [
"return",
"either",
"the",
"first",
"space",
"or",
"the",
"first",
"nbsp"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/XMLUtils.java#L760-L771 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/XMLUtils.java | XMLUtils.readTag | public static String readTag(Reader r) throws IOException {
if ( ! r.ready()) {
return null;
}
StringBuilder b = new StringBuilder("<");
int c = r.read();
while (c >= 0) {
b.append((char) c);
if (c == '>') {
break;
}
c = r.read();
}
if (b.length() == 1) {
return null;
}
return b.toString();
} | java | public static String readTag(Reader r) throws IOException {
if ( ! r.ready()) {
return null;
}
StringBuilder b = new StringBuilder("<");
int c = r.read();
while (c >= 0) {
b.append((char) c);
if (c == '>') {
break;
}
c = r.read();
}
if (b.length() == 1) {
return null;
}
return b.toString();
} | [
"public",
"static",
"String",
"readTag",
"(",
"Reader",
"r",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"r",
".",
"ready",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
"\"<\"",
")",
";",
"int",
"c",
"=",
"r",
".",
"read",
"(",
")",
";",
"while",
"(",
"c",
">=",
"0",
")",
"{",
"b",
".",
"append",
"(",
"(",
"char",
")",
"c",
")",
";",
"if",
"(",
"c",
"==",
"'",
"'",
")",
"{",
"break",
";",
"}",
"c",
"=",
"r",
".",
"read",
"(",
")",
";",
"}",
"if",
"(",
"b",
".",
"length",
"(",
")",
"==",
"1",
")",
"{",
"return",
"null",
";",
"}",
"return",
"b",
".",
"toString",
"(",
")",
";",
"}"
] | Reads all text of the XML tag and returns it as a String.
Assumes that a '<' character has already been read.
@param r The reader to read from
@return The String representing the tag, or null if one couldn't be read
(i.e., EOF). The returned item is a complete tag including angle
brackets, such as <code><TXT></code> | [
"Reads",
"all",
"text",
"of",
"the",
"XML",
"tag",
"and",
"returns",
"it",
"as",
"a",
"String",
".",
"Assumes",
"that",
"a",
"<",
"character",
"has",
"already",
"been",
"read",
"."
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/XMLUtils.java#L879-L896 | train |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/XMLUtils.java | XMLUtils.readDocumentFromString | public static Document readDocumentFromString(String s) throws Exception {
InputSource in = new InputSource(new StringReader(s));
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(false);
return factory.newDocumentBuilder().parse(in);
} | java | public static Document readDocumentFromString(String s) throws Exception {
InputSource in = new InputSource(new StringReader(s));
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(false);
return factory.newDocumentBuilder().parse(in);
} | [
"public",
"static",
"Document",
"readDocumentFromString",
"(",
"String",
"s",
")",
"throws",
"Exception",
"{",
"InputSource",
"in",
"=",
"new",
"InputSource",
"(",
"new",
"StringReader",
"(",
"s",
")",
")",
";",
"DocumentBuilderFactory",
"factory",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";",
"factory",
".",
"setNamespaceAware",
"(",
"false",
")",
";",
"return",
"factory",
".",
"newDocumentBuilder",
"(",
")",
".",
"parse",
"(",
"in",
")",
";",
"}"
] | end class SAXErrorHandler | [
"end",
"class",
"SAXErrorHandler"
] | b3d44bab9ec07ace0d13612c448a6b7298c1f681 | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/XMLUtils.java#L957-L962 | train |
Subsets and Splits