id int32 0 165k | 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 list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
43,300 | threerings/nenya | core/src/main/java/com/threerings/media/image/TransformedMirage.java | TransformedMirage.computeTransformedBounds | protected void computeTransformedBounds ()
{
int w = _base.getWidth();
int h = _base.getHeight();
Point[] points = new Point[] {
new Point(0, 0), new Point(w, 0), new Point(0, h), new Point(w, h) };
_transform.transform(points, 0, points, 0, 4);
int minX, minY, ma... | java | protected void computeTransformedBounds ()
{
int w = _base.getWidth();
int h = _base.getHeight();
Point[] points = new Point[] {
new Point(0, 0), new Point(w, 0), new Point(0, h), new Point(w, h) };
_transform.transform(points, 0, points, 0, 4);
int minX, minY, ma... | [
"protected",
"void",
"computeTransformedBounds",
"(",
")",
"{",
"int",
"w",
"=",
"_base",
".",
"getWidth",
"(",
")",
";",
"int",
"h",
"=",
"_base",
".",
"getHeight",
"(",
")",
";",
"Point",
"[",
"]",
"points",
"=",
"new",
"Point",
"[",
"]",
"{",
"n... | Compute the bounds of the base Mirage after it has been transformed. | [
"Compute",
"the",
"bounds",
"of",
"the",
"base",
"Mirage",
"after",
"it",
"has",
"been",
"transformed",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/TransformedMirage.java#L122-L140 |
43,301 | threerings/nenya | core/src/main/java/com/threerings/media/image/AWTImageCreator.java | AWTImageCreator.createImage | public BufferedImage createImage (int width, int height, int trans)
{
// DEBUG: override transparency for the moment on all images
trans = Transparency.TRANSLUCENT;
if (_gc != null) {
return _gc.createCompatibleImage(width, height, trans);
} else {
// if we're... | java | public BufferedImage createImage (int width, int height, int trans)
{
// DEBUG: override transparency for the moment on all images
trans = Transparency.TRANSLUCENT;
if (_gc != null) {
return _gc.createCompatibleImage(width, height, trans);
} else {
// if we're... | [
"public",
"BufferedImage",
"createImage",
"(",
"int",
"width",
",",
"int",
"height",
",",
"int",
"trans",
")",
"{",
"// DEBUG: override transparency for the moment on all images",
"trans",
"=",
"Transparency",
".",
"TRANSLUCENT",
";",
"if",
"(",
"_gc",
"!=",
"null",... | documentation inherited from interface BaseImageManager.OptimalImageCreator | [
"documentation",
"inherited",
"from",
"interface",
"BaseImageManager",
".",
"OptimalImageCreator"
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/AWTImageCreator.java#L55-L65 |
43,302 | HotelsDotCom/corc | corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java | CorcInputFormat.getConverterFactory | static ConverterFactory getConverterFactory(Configuration conf) {
Class<? extends ConverterFactory> converterFactoryClass = conf.getClass(CONVERTER_FACTORY, null,
ConverterFactory.class);
if (converterFactoryClass == null) {
throw new RuntimeException("ConverterFactory class was not set on the con... | java | static ConverterFactory getConverterFactory(Configuration conf) {
Class<? extends ConverterFactory> converterFactoryClass = conf.getClass(CONVERTER_FACTORY, null,
ConverterFactory.class);
if (converterFactoryClass == null) {
throw new RuntimeException("ConverterFactory class was not set on the con... | [
"static",
"ConverterFactory",
"getConverterFactory",
"(",
"Configuration",
"conf",
")",
"{",
"Class",
"<",
"?",
"extends",
"ConverterFactory",
">",
"converterFactoryClass",
"=",
"conf",
".",
"getClass",
"(",
"CONVERTER_FACTORY",
",",
"null",
",",
"ConverterFactory",
... | Gets the ConverterFactory from the configuration | [
"Gets",
"the",
"ConverterFactory",
"from",
"the",
"configuration"
] | 37ecb5966315e4cf630a878ffcbada61c50bdcd3 | https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L82-L90 |
43,303 | HotelsDotCom/corc | corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java | CorcInputFormat.setConverterFactoryClass | public static void setConverterFactoryClass(Configuration conf,
Class<? extends ConverterFactory> converterFactoryClass) {
conf.setClass(CONVERTER_FACTORY, converterFactoryClass, ConverterFactory.class);
LOG.debug("Set input ConverterFactory class on conf: {}", converterFactoryClass);
} | java | public static void setConverterFactoryClass(Configuration conf,
Class<? extends ConverterFactory> converterFactoryClass) {
conf.setClass(CONVERTER_FACTORY, converterFactoryClass, ConverterFactory.class);
LOG.debug("Set input ConverterFactory class on conf: {}", converterFactoryClass);
} | [
"public",
"static",
"void",
"setConverterFactoryClass",
"(",
"Configuration",
"conf",
",",
"Class",
"<",
"?",
"extends",
"ConverterFactory",
">",
"converterFactoryClass",
")",
"{",
"conf",
".",
"setClass",
"(",
"CONVERTER_FACTORY",
",",
"converterFactoryClass",
",",
... | Sets the ConverterFactory class | [
"Sets",
"the",
"ConverterFactory",
"class"
] | 37ecb5966315e4cf630a878ffcbada61c50bdcd3 | https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L95-L99 |
43,304 | HotelsDotCom/corc | corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java | CorcInputFormat.getTypeInfo | static StructTypeInfo getTypeInfo(Configuration conf) {
StructTypeInfo inputTypeInfo = (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString(conf.get(INPUT_TYPE_INFO));
LOG.debug("Got input typeInfo from conf: {}", inputTypeInfo);
return inputTypeInfo;
} | java | static StructTypeInfo getTypeInfo(Configuration conf) {
StructTypeInfo inputTypeInfo = (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString(conf.get(INPUT_TYPE_INFO));
LOG.debug("Got input typeInfo from conf: {}", inputTypeInfo);
return inputTypeInfo;
} | [
"static",
"StructTypeInfo",
"getTypeInfo",
"(",
"Configuration",
"conf",
")",
"{",
"StructTypeInfo",
"inputTypeInfo",
"=",
"(",
"StructTypeInfo",
")",
"TypeInfoUtils",
".",
"getTypeInfoFromTypeString",
"(",
"conf",
".",
"get",
"(",
"INPUT_TYPE_INFO",
")",
")",
";",
... | Gets the StructTypeInfo that declares the columns to be read from the configuration | [
"Gets",
"the",
"StructTypeInfo",
"that",
"declares",
"the",
"columns",
"to",
"be",
"read",
"from",
"the",
"configuration"
] | 37ecb5966315e4cf630a878ffcbada61c50bdcd3 | https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L104-L108 |
43,305 | HotelsDotCom/corc | corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java | CorcInputFormat.setTypeInfo | public static void setTypeInfo(Configuration conf, StructTypeInfo typeInfo) {
conf.set(INPUT_TYPE_INFO, typeInfo.getTypeName());
LOG.debug("Set input typeInfo on conf: {}", typeInfo);
} | java | public static void setTypeInfo(Configuration conf, StructTypeInfo typeInfo) {
conf.set(INPUT_TYPE_INFO, typeInfo.getTypeName());
LOG.debug("Set input typeInfo on conf: {}", typeInfo);
} | [
"public",
"static",
"void",
"setTypeInfo",
"(",
"Configuration",
"conf",
",",
"StructTypeInfo",
"typeInfo",
")",
"{",
"conf",
".",
"set",
"(",
"INPUT_TYPE_INFO",
",",
"typeInfo",
".",
"getTypeName",
"(",
")",
")",
";",
"LOG",
".",
"debug",
"(",
"\"Set input ... | Sets the StructTypeInfo that declares the columns to be read in the configuration | [
"Sets",
"the",
"StructTypeInfo",
"that",
"declares",
"the",
"columns",
"to",
"be",
"read",
"in",
"the",
"configuration"
] | 37ecb5966315e4cf630a878ffcbada61c50bdcd3 | https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L113-L116 |
43,306 | HotelsDotCom/corc | corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java | CorcInputFormat.getSchemaTypeInfo | static StructTypeInfo getSchemaTypeInfo(Configuration conf) {
String schemaTypeInfo = conf.get(SCHEMA_TYPE_INFO);
if (schemaTypeInfo != null && !schemaTypeInfo.isEmpty()) {
LOG.debug("Got schema typeInfo from conf: {}", schemaTypeInfo);
return (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString... | java | static StructTypeInfo getSchemaTypeInfo(Configuration conf) {
String schemaTypeInfo = conf.get(SCHEMA_TYPE_INFO);
if (schemaTypeInfo != null && !schemaTypeInfo.isEmpty()) {
LOG.debug("Got schema typeInfo from conf: {}", schemaTypeInfo);
return (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString... | [
"static",
"StructTypeInfo",
"getSchemaTypeInfo",
"(",
"Configuration",
"conf",
")",
"{",
"String",
"schemaTypeInfo",
"=",
"conf",
".",
"get",
"(",
"SCHEMA_TYPE_INFO",
")",
";",
"if",
"(",
"schemaTypeInfo",
"!=",
"null",
"&&",
"!",
"schemaTypeInfo",
".",
"isEmpty... | Gets the StructTypeInfo that declares the total schema of the file from the configuration | [
"Gets",
"the",
"StructTypeInfo",
"that",
"declares",
"the",
"total",
"schema",
"of",
"the",
"file",
"from",
"the",
"configuration"
] | 37ecb5966315e4cf630a878ffcbada61c50bdcd3 | https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L121-L128 |
43,307 | HotelsDotCom/corc | corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java | CorcInputFormat.setSchemaTypeInfo | public static void setSchemaTypeInfo(Configuration conf, StructTypeInfo schemaTypeInfo) {
if (schemaTypeInfo != null) {
conf.set(SCHEMA_TYPE_INFO, schemaTypeInfo.getTypeName());
LOG.debug("Set schema typeInfo on conf: {}", schemaTypeInfo);
}
} | java | public static void setSchemaTypeInfo(Configuration conf, StructTypeInfo schemaTypeInfo) {
if (schemaTypeInfo != null) {
conf.set(SCHEMA_TYPE_INFO, schemaTypeInfo.getTypeName());
LOG.debug("Set schema typeInfo on conf: {}", schemaTypeInfo);
}
} | [
"public",
"static",
"void",
"setSchemaTypeInfo",
"(",
"Configuration",
"conf",
",",
"StructTypeInfo",
"schemaTypeInfo",
")",
"{",
"if",
"(",
"schemaTypeInfo",
"!=",
"null",
")",
"{",
"conf",
".",
"set",
"(",
"SCHEMA_TYPE_INFO",
",",
"schemaTypeInfo",
".",
"getTy... | Sets the StructTypeInfo that declares the total schema of the file in the configuration | [
"Sets",
"the",
"StructTypeInfo",
"that",
"declares",
"the",
"total",
"schema",
"of",
"the",
"file",
"in",
"the",
"configuration"
] | 37ecb5966315e4cf630a878ffcbada61c50bdcd3 | https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L133-L138 |
43,308 | HotelsDotCom/corc | corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java | CorcInputFormat.setReadColumns | static void setReadColumns(Configuration conf, StructTypeInfo actualStructTypeInfo) {
StructTypeInfo readStructTypeInfo = getTypeInfo(conf);
LOG.info("Read StructTypeInfo: {}", readStructTypeInfo);
List<Integer> ids = new ArrayList<>();
List<String> names = new ArrayList<>();
List<String> readName... | java | static void setReadColumns(Configuration conf, StructTypeInfo actualStructTypeInfo) {
StructTypeInfo readStructTypeInfo = getTypeInfo(conf);
LOG.info("Read StructTypeInfo: {}", readStructTypeInfo);
List<Integer> ids = new ArrayList<>();
List<String> names = new ArrayList<>();
List<String> readName... | [
"static",
"void",
"setReadColumns",
"(",
"Configuration",
"conf",
",",
"StructTypeInfo",
"actualStructTypeInfo",
")",
"{",
"StructTypeInfo",
"readStructTypeInfo",
"=",
"getTypeInfo",
"(",
"conf",
")",
";",
"LOG",
".",
"info",
"(",
"\"Read StructTypeInfo: {}\"",
",",
... | Sets which fields are to be read from the ORC file | [
"Sets",
"which",
"fields",
"are",
"to",
"be",
"read",
"from",
"the",
"ORC",
"file"
] | 37ecb5966315e4cf630a878ffcbada61c50bdcd3 | https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L169-L199 |
43,309 | threerings/nenya | core/src/main/java/com/threerings/cast/builder/ComponentPanel.java | ComponentPanel.addClassEditors | protected void addClassEditors (BuilderModel model, String cprefix)
{
List<ComponentClass> classes = model.getComponentClasses();
int size = classes.size();
for (int ii = 0; ii < size; ii++) {
ComponentClass cclass = classes.get(ii);
if (!cclass.name.startsWith(cprefi... | java | protected void addClassEditors (BuilderModel model, String cprefix)
{
List<ComponentClass> classes = model.getComponentClasses();
int size = classes.size();
for (int ii = 0; ii < size; ii++) {
ComponentClass cclass = classes.get(ii);
if (!cclass.name.startsWith(cprefi... | [
"protected",
"void",
"addClassEditors",
"(",
"BuilderModel",
"model",
",",
"String",
"cprefix",
")",
"{",
"List",
"<",
"ComponentClass",
">",
"classes",
"=",
"model",
".",
"getComponentClasses",
"(",
")",
";",
"int",
"size",
"=",
"classes",
".",
"size",
"(",... | Adds editor user interface elements for each component class to
allow the user to select the desired component. | [
"Adds",
"editor",
"user",
"interface",
"elements",
"for",
"each",
"component",
"class",
"to",
"allow",
"the",
"user",
"to",
"select",
"the",
"desired",
"component",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/builder/ComponentPanel.java#L56-L73 |
43,310 | groupon/robo-remote | RoboRemoteClientCommon/src/main/com/groupon/roboremote/roboremoteclientcommon/Client.java | Client.isListening | public boolean isListening() throws Exception {
try {
JSONObject resp = new JSONObject(Get.get(API_BASE_URL + ":" + API_PORT, Constants.REQUEST_HEARTBEAT, ""));
return true;
} catch (Exception e) {
return false;
}
} | java | public boolean isListening() throws Exception {
try {
JSONObject resp = new JSONObject(Get.get(API_BASE_URL + ":" + API_PORT, Constants.REQUEST_HEARTBEAT, ""));
return true;
} catch (Exception e) {
return false;
}
} | [
"public",
"boolean",
"isListening",
"(",
")",
"throws",
"Exception",
"{",
"try",
"{",
"JSONObject",
"resp",
"=",
"new",
"JSONObject",
"(",
"Get",
".",
"get",
"(",
"API_BASE_URL",
"+",
"\":\"",
"+",
"API_PORT",
",",
"Constants",
".",
"REQUEST_HEARTBEAT",
",",... | Returns true if there is RoboRemoteServer currently listening
@return
@throws Exception | [
"Returns",
"true",
"if",
"there",
"is",
"RoboRemoteServer",
"currently",
"listening"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteClientCommon/src/main/com/groupon/roboremote/roboremoteclientcommon/Client.java#L78-L86 |
43,311 | groupon/robo-remote | RoboRemoteClientCommon/src/main/com/groupon/roboremote/roboremoteclientcommon/Client.java | Client.map | public JSONArray map(String query, String method_name, Object... items) throws Exception {
QueryBuilder builder = new QueryBuilder(API_PORT);
builder.map(query, method_name, items);
return builder.execute();
} | java | public JSONArray map(String query, String method_name, Object... items) throws Exception {
QueryBuilder builder = new QueryBuilder(API_PORT);
builder.map(query, method_name, items);
return builder.execute();
} | [
"public",
"JSONArray",
"map",
"(",
"String",
"query",
",",
"String",
"method_name",
",",
"Object",
"...",
"items",
")",
"throws",
"Exception",
"{",
"QueryBuilder",
"builder",
"=",
"new",
"QueryBuilder",
"(",
"API_PORT",
")",
";",
"builder",
".",
"map",
"(",
... | Used to call a method with a list of arguments
@param query
@param method_name
@param items
@return
@throws Exception | [
"Used",
"to",
"call",
"a",
"method",
"with",
"a",
"list",
"of",
"arguments"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteClientCommon/src/main/com/groupon/roboremote/roboremoteclientcommon/Client.java#L130-L134 |
43,312 | stephenc/redmine-java-api | src/main/java/org/redmine/ta/internal/RedmineJSONParser.java | RedmineJSONParser.parseTracker | public static Tracker parseTracker(JSONObject object) throws JSONException {
final int id = JsonInput.getInt(object, "id");
final String name = JsonInput.getStringNotNull(object, "name");
return new Tracker(id, name);
} | java | public static Tracker parseTracker(JSONObject object) throws JSONException {
final int id = JsonInput.getInt(object, "id");
final String name = JsonInput.getStringNotNull(object, "name");
return new Tracker(id, name);
} | [
"public",
"static",
"Tracker",
"parseTracker",
"(",
"JSONObject",
"object",
")",
"throws",
"JSONException",
"{",
"final",
"int",
"id",
"=",
"JsonInput",
".",
"getInt",
"(",
"object",
",",
"\"id\"",
")",
";",
"final",
"String",
"name",
"=",
"JsonInput",
".",
... | Parses a tracker.
@param object
object to parse.
@return parsed tracker.
@throws RedmineFormatException
if object is not a valid tracker. | [
"Parses",
"a",
"tracker",
"."
] | 7e5270c84aba32d74a506260ec47ff86ab6c9d84 | https://github.com/stephenc/redmine-java-api/blob/7e5270c84aba32d74a506260ec47ff86ab6c9d84/src/main/java/org/redmine/ta/internal/RedmineJSONParser.java#L190-L194 |
43,313 | stephenc/redmine-java-api | src/main/java/org/redmine/ta/internal/RedmineJSONParser.java | RedmineJSONParser.parseStatus | public static IssueStatus parseStatus(JSONObject object)
throws JSONException {
final int id = JsonInput.getInt(object, "id");
final String name = JsonInput.getStringNotNull(object, "name");
final IssueStatus result = new IssueStatus(id, name);
if (object.has("is_default"))
result.setDefaultStatus(JsonInp... | java | public static IssueStatus parseStatus(JSONObject object)
throws JSONException {
final int id = JsonInput.getInt(object, "id");
final String name = JsonInput.getStringNotNull(object, "name");
final IssueStatus result = new IssueStatus(id, name);
if (object.has("is_default"))
result.setDefaultStatus(JsonInp... | [
"public",
"static",
"IssueStatus",
"parseStatus",
"(",
"JSONObject",
"object",
")",
"throws",
"JSONException",
"{",
"final",
"int",
"id",
"=",
"JsonInput",
".",
"getInt",
"(",
"object",
",",
"\"id\"",
")",
";",
"final",
"String",
"name",
"=",
"JsonInput",
".... | Parses a status.
@param object
object to parse.
@return parsed tracker.
@throws RedmineFormatException
if object is not a valid tracker. | [
"Parses",
"a",
"status",
"."
] | 7e5270c84aba32d74a506260ec47ff86ab6c9d84 | https://github.com/stephenc/redmine-java-api/blob/7e5270c84aba32d74a506260ec47ff86ab6c9d84/src/main/java/org/redmine/ta/internal/RedmineJSONParser.java#L205-L216 |
43,314 | stephenc/redmine-java-api | src/main/java/org/redmine/ta/internal/RedmineJSONParser.java | RedmineJSONParser.parseMinimalProject | public static Project parseMinimalProject(JSONObject content)
throws JSONException {
final Project result = new Project();
result.setId(JsonInput.getInt(content, "id"));
result.setIdentifier(JsonInput.getStringOrNull(content, "identifier"));
result.setName(JsonInput.getStringNotNull(content, "name"));
retu... | java | public static Project parseMinimalProject(JSONObject content)
throws JSONException {
final Project result = new Project();
result.setId(JsonInput.getInt(content, "id"));
result.setIdentifier(JsonInput.getStringOrNull(content, "identifier"));
result.setName(JsonInput.getStringNotNull(content, "name"));
retu... | [
"public",
"static",
"Project",
"parseMinimalProject",
"(",
"JSONObject",
"content",
")",
"throws",
"JSONException",
"{",
"final",
"Project",
"result",
"=",
"new",
"Project",
"(",
")",
";",
"result",
".",
"setId",
"(",
"JsonInput",
".",
"getInt",
"(",
"content"... | Parses a "minimal" version of a project.
@param content
content to parse.
@return parsed project. | [
"Parses",
"a",
"minimal",
"version",
"of",
"a",
"project",
"."
] | 7e5270c84aba32d74a506260ec47ff86ab6c9d84 | https://github.com/stephenc/redmine-java-api/blob/7e5270c84aba32d74a506260ec47ff86ab6c9d84/src/main/java/org/redmine/ta/internal/RedmineJSONParser.java#L289-L296 |
43,315 | stephenc/redmine-java-api | src/main/java/org/redmine/ta/internal/RedmineJSONParser.java | RedmineJSONParser.parseProject | public static Project parseProject(JSONObject content) throws JSONException {
final Project result = new Project();
result.setId(JsonInput.getInt(content, "id"));
result.setIdentifier(JsonInput.getStringOrNull(content, "identifier"));
result.setName(JsonInput.getStringNotNull(content, "name"));
result.setDesc... | java | public static Project parseProject(JSONObject content) throws JSONException {
final Project result = new Project();
result.setId(JsonInput.getInt(content, "id"));
result.setIdentifier(JsonInput.getStringOrNull(content, "identifier"));
result.setName(JsonInput.getStringNotNull(content, "name"));
result.setDesc... | [
"public",
"static",
"Project",
"parseProject",
"(",
"JSONObject",
"content",
")",
"throws",
"JSONException",
"{",
"final",
"Project",
"result",
"=",
"new",
"Project",
"(",
")",
";",
"result",
".",
"setId",
"(",
"JsonInput",
".",
"getInt",
"(",
"content",
","... | Parses a project.
@param content
content to parse.
@return parsed project. | [
"Parses",
"a",
"project",
"."
] | 7e5270c84aba32d74a506260ec47ff86ab6c9d84 | https://github.com/stephenc/redmine-java-api/blob/7e5270c84aba32d74a506260ec47ff86ab6c9d84/src/main/java/org/redmine/ta/internal/RedmineJSONParser.java#L305-L322 |
43,316 | threerings/nenya | core/src/main/java/com/threerings/cast/ComponentClass.java | ComponentClass.getRenderPriority | public int getRenderPriority (String action, String component, int orientation)
{
// because we expect there to be relatively few priority overrides, we simply search
// linearly through the list for the closest match
int ocount = (_overrides != null) ? _overrides.size() : 0;
for (in... | java | public int getRenderPriority (String action, String component, int orientation)
{
// because we expect there to be relatively few priority overrides, we simply search
// linearly through the list for the closest match
int ocount = (_overrides != null) ? _overrides.size() : 0;
for (in... | [
"public",
"int",
"getRenderPriority",
"(",
"String",
"action",
",",
"String",
"component",
",",
"int",
"orientation",
")",
"{",
"// because we expect there to be relatively few priority overrides, we simply search",
"// linearly through the list for the closest match",
"int",
"ocou... | Returns the render priority appropriate for the specified action, orientation and
component. | [
"Returns",
"the",
"render",
"priority",
"appropriate",
"for",
"the",
"specified",
"action",
"orientation",
"and",
"component",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/ComponentClass.java#L159-L174 |
43,317 | threerings/nenya | core/src/main/java/com/threerings/cast/ComponentClass.java | ComponentClass.addPriorityOverride | public void addPriorityOverride (PriorityOverride override)
{
if (_overrides == null) {
_overrides = new ComparableArrayList<PriorityOverride>();
}
_overrides.insertSorted(override);
} | java | public void addPriorityOverride (PriorityOverride override)
{
if (_overrides == null) {
_overrides = new ComparableArrayList<PriorityOverride>();
}
_overrides.insertSorted(override);
} | [
"public",
"void",
"addPriorityOverride",
"(",
"PriorityOverride",
"override",
")",
"{",
"if",
"(",
"_overrides",
"==",
"null",
")",
"{",
"_overrides",
"=",
"new",
"ComparableArrayList",
"<",
"PriorityOverride",
">",
"(",
")",
";",
"}",
"_overrides",
".",
"inse... | Adds the supplied render priority override record to this component class. | [
"Adds",
"the",
"supplied",
"render",
"priority",
"override",
"record",
"to",
"this",
"component",
"class",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/ComponentClass.java#L179-L185 |
43,318 | threerings/nenya | core/src/main/java/com/threerings/miso/tile/FringeConfiguration.java | FringeConfiguration.fringesOn | public int fringesOn (int first, int second)
{
FringeRecord f1 = _frecs.get(first);
// we better have a fringe record for the first
if (null != f1) {
// it had better have some tilesets defined
if (f1.tilesets.size() > 0) {
FringeRecord f2 = _frecs.... | java | public int fringesOn (int first, int second)
{
FringeRecord f1 = _frecs.get(first);
// we better have a fringe record for the first
if (null != f1) {
// it had better have some tilesets defined
if (f1.tilesets.size() > 0) {
FringeRecord f2 = _frecs.... | [
"public",
"int",
"fringesOn",
"(",
"int",
"first",
",",
"int",
"second",
")",
"{",
"FringeRecord",
"f1",
"=",
"_frecs",
".",
"get",
"(",
"first",
")",
";",
"// we better have a fringe record for the first",
"if",
"(",
"null",
"!=",
"f1",
")",
"{",
"// it had... | If the first base tileset fringes upon the second, return the
fringe priority of the first base tileset, otherwise return -1. | [
"If",
"the",
"first",
"base",
"tileset",
"fringes",
"upon",
"the",
"second",
"return",
"the",
"fringe",
"priority",
"of",
"the",
"first",
"base",
"tileset",
"otherwise",
"return",
"-",
"1",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/tile/FringeConfiguration.java#L119-L140 |
43,319 | threerings/nenya | core/src/main/java/com/threerings/miso/tile/FringeConfiguration.java | FringeConfiguration.getFringe | public FringeTileSetRecord getFringe (int baseset, int hashValue)
{
FringeRecord f = _frecs.get(baseset);
return f.tilesets.get(
hashValue % f.tilesets.size());
} | java | public FringeTileSetRecord getFringe (int baseset, int hashValue)
{
FringeRecord f = _frecs.get(baseset);
return f.tilesets.get(
hashValue % f.tilesets.size());
} | [
"public",
"FringeTileSetRecord",
"getFringe",
"(",
"int",
"baseset",
",",
"int",
"hashValue",
")",
"{",
"FringeRecord",
"f",
"=",
"_frecs",
".",
"get",
"(",
"baseset",
")",
";",
"return",
"f",
".",
"tilesets",
".",
"get",
"(",
"hashValue",
"%",
"f",
".",... | Get a random FringeTileSetRecord from amongst the ones
listed for the specified base tileset. | [
"Get",
"a",
"random",
"FringeTileSetRecord",
"from",
"amongst",
"the",
"ones",
"listed",
"for",
"the",
"specified",
"base",
"tileset",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/tile/FringeConfiguration.java#L146-L151 |
43,320 | threerings/nenya | core/src/main/java/com/threerings/media/ManagedJApplet.java | ManagedJApplet.getWindow | public Window getWindow ()
{
Component parent = getParent();
while (!(parent instanceof Window) && parent != null) {
parent = parent.getParent();
}
return (Window)parent;
} | java | public Window getWindow ()
{
Component parent = getParent();
while (!(parent instanceof Window) && parent != null) {
parent = parent.getParent();
}
return (Window)parent;
} | [
"public",
"Window",
"getWindow",
"(",
")",
"{",
"Component",
"parent",
"=",
"getParent",
"(",
")",
";",
"while",
"(",
"!",
"(",
"parent",
"instanceof",
"Window",
")",
"&&",
"parent",
"!=",
"null",
")",
"{",
"parent",
"=",
"parent",
".",
"getParent",
"(... | from interface FrameManager.ManagedRoot | [
"from",
"interface",
"FrameManager",
".",
"ManagedRoot"
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/ManagedJApplet.java#L40-L47 |
43,321 | jboss/jboss-jsp-api_spec | src/main/java/javax/servlet/jsp/tagext/TagData.java | TagData.getAttributeString | public String getAttributeString(String attName) {
Object o = attributes.get(attName);
if (o == null) {
return null;
} else {
return (String) o;
}
} | java | public String getAttributeString(String attName) {
Object o = attributes.get(attName);
if (o == null) {
return null;
} else {
return (String) o;
}
} | [
"public",
"String",
"getAttributeString",
"(",
"String",
"attName",
")",
"{",
"Object",
"o",
"=",
"attributes",
".",
"get",
"(",
"attName",
")",
";",
"if",
"(",
"o",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"(",
"Str... | Get the value for a given attribute.
@param attName the name of the attribute
@return the attribute value string
@throws ClassCastException if attribute value is not a String | [
"Get",
"the",
"value",
"for",
"a",
"given",
"attribute",
"."
] | da53166619f33a5134dc3315a3264990cc1f541f | https://github.com/jboss/jboss-jsp-api_spec/blob/da53166619f33a5134dc3315a3264990cc1f541f/src/main/java/javax/servlet/jsp/tagext/TagData.java#L170-L177 |
43,322 | jdillon/gshell | gshell-personality/src/main/java/com/planet57/gshell/Main.java | Main.maybeSetProperty | private void maybeSetProperty(final String name, final String value) {
if (System.getProperty(name) == null) {
System.setProperty(name, value);
}
} | java | private void maybeSetProperty(final String name, final String value) {
if (System.getProperty(name) == null) {
System.setProperty(name, value);
}
} | [
"private",
"void",
"maybeSetProperty",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"System",
".",
"getProperty",
"(",
"name",
")",
"==",
"null",
")",
"{",
"System",
".",
"setProperty",
"(",
"name",
",",
"value",
... | Helper to only set a property if not already set. | [
"Helper",
"to",
"only",
"set",
"a",
"property",
"if",
"not",
"already",
"set",
"."
] | b587c1a4672d2e4905871462fa3b38a1f7b94e90 | https://github.com/jdillon/gshell/blob/b587c1a4672d2e4905871462fa3b38a1f7b94e90/gshell-personality/src/main/java/com/planet57/gshell/Main.java#L63-L67 |
43,323 | threerings/nenya | core/src/main/java/com/threerings/chat/ChatGlyph.java | ChatGlyph.render | public void render (Graphics2D gfx)
{
Object oalias = SwingUtil.activateAntiAliasing(gfx);
gfx.setColor(getBackground());
gfx.fill(_shape);
gfx.setColor(_outline);
gfx.draw(_shape);
SwingUtil.restoreAntiAliasing(gfx, oalias);
if (_icon != null) {
... | java | public void render (Graphics2D gfx)
{
Object oalias = SwingUtil.activateAntiAliasing(gfx);
gfx.setColor(getBackground());
gfx.fill(_shape);
gfx.setColor(_outline);
gfx.draw(_shape);
SwingUtil.restoreAntiAliasing(gfx, oalias);
if (_icon != null) {
... | [
"public",
"void",
"render",
"(",
"Graphics2D",
"gfx",
")",
"{",
"Object",
"oalias",
"=",
"SwingUtil",
".",
"activateAntiAliasing",
"(",
"gfx",
")",
";",
"gfx",
".",
"setColor",
"(",
"getBackground",
"(",
")",
")",
";",
"gfx",
".",
"fill",
"(",
"_shape",
... | Render the chat glyph with no thought to dirty rectangles or
restoring composites. | [
"Render",
"the",
"chat",
"glyph",
"with",
"no",
"thought",
"to",
"dirty",
"rectangles",
"or",
"restoring",
"composites",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ChatGlyph.java#L101-L117 |
43,324 | threerings/nenya | core/src/main/java/com/threerings/chat/ChatGlyph.java | ChatGlyph.translate | public void translate (int dx, int dy)
{
setLocation(_bounds.x + dx, _bounds.y + dy);
} | java | public void translate (int dx, int dy)
{
setLocation(_bounds.x + dx, _bounds.y + dy);
} | [
"public",
"void",
"translate",
"(",
"int",
"dx",
",",
"int",
"dy",
")",
"{",
"setLocation",
"(",
"_bounds",
".",
"x",
"+",
"dx",
",",
"_bounds",
".",
"y",
"+",
"dy",
")",
";",
"}"
] | Attempt to translate this glyph. | [
"Attempt",
"to",
"translate",
"this",
"glyph",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ChatGlyph.java#L176-L179 |
43,325 | threerings/nenya | core/src/main/java/com/threerings/miso/MisoConfig.java | MisoConfig.getSceneMetrics | public static MisoSceneMetrics getSceneMetrics ()
{
return new MisoSceneMetrics(
config.getValue(TILE_WIDTH_KEY, DEF_TILE_WIDTH),
config.getValue(TILE_HEIGHT_KEY, DEF_TILE_HEIGHT),
config.getValue(FINE_GRAN_KEY, DEF_FINE_GRAN));
} | java | public static MisoSceneMetrics getSceneMetrics ()
{
return new MisoSceneMetrics(
config.getValue(TILE_WIDTH_KEY, DEF_TILE_WIDTH),
config.getValue(TILE_HEIGHT_KEY, DEF_TILE_HEIGHT),
config.getValue(FINE_GRAN_KEY, DEF_FINE_GRAN));
} | [
"public",
"static",
"MisoSceneMetrics",
"getSceneMetrics",
"(",
")",
"{",
"return",
"new",
"MisoSceneMetrics",
"(",
"config",
".",
"getValue",
"(",
"TILE_WIDTH_KEY",
",",
"DEF_TILE_WIDTH",
")",
",",
"config",
".",
"getValue",
"(",
"TILE_HEIGHT_KEY",
",",
"DEF_TILE... | Creates scene metrics with information obtained from the deployed
config file. | [
"Creates",
"scene",
"metrics",
"with",
"information",
"obtained",
"from",
"the",
"deployed",
"config",
"file",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/MisoConfig.java#L38-L44 |
43,326 | tonilopezmr/Android-EasySQLite | easysqlite/src/main/java/com/tonilopezmr/easysqlite/SQLiteHelper.java | SQLiteHelper.onCreate | @Override
public void onCreate(SQLiteDatabase db) {
try {
if(builder.tables == null){
throw new SQLiteHelperException("The array of String tables can't be null!!");
}
executePragma(db);
builder.onCreateCallback.onCreate(db);
} catch (S... | java | @Override
public void onCreate(SQLiteDatabase db) {
try {
if(builder.tables == null){
throw new SQLiteHelperException("The array of String tables can't be null!!");
}
executePragma(db);
builder.onCreateCallback.onCreate(db);
} catch (S... | [
"@",
"Override",
"public",
"void",
"onCreate",
"(",
"SQLiteDatabase",
"db",
")",
"{",
"try",
"{",
"if",
"(",
"builder",
".",
"tables",
"==",
"null",
")",
"{",
"throw",
"new",
"SQLiteHelperException",
"(",
"\"The array of String tables can't be null!!\"",
")",
";... | Called when the database is created for the first time. This is where the
creation of tables and the initial population of the tables should happen.
@param db The database. | [
"Called",
"when",
"the",
"database",
"is",
"created",
"for",
"the",
"first",
"time",
".",
"This",
"is",
"where",
"the",
"creation",
"of",
"tables",
"and",
"the",
"initial",
"population",
"of",
"the",
"tables",
"should",
"happen",
"."
] | bb991a43c9fa11522e5367570ee2335b99bca7c0 | https://github.com/tonilopezmr/Android-EasySQLite/blob/bb991a43c9fa11522e5367570ee2335b99bca7c0/easysqlite/src/main/java/com/tonilopezmr/easysqlite/SQLiteHelper.java#L66-L78 |
43,327 | tonilopezmr/Android-EasySQLite | easysqlite/src/main/java/com/tonilopezmr/easysqlite/SQLiteHelper.java | SQLiteHelper.onUpgrade | @Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
try {
if (builder.tableNames == null) {
throw new SQLiteHelperException("The array of String tableNames can't be null!!");
}
builder.onUpgradeCallback.onUpgrade(db, oldVe... | java | @Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
try {
if (builder.tableNames == null) {
throw new SQLiteHelperException("The array of String tableNames can't be null!!");
}
builder.onUpgradeCallback.onUpgrade(db, oldVe... | [
"@",
"Override",
"public",
"void",
"onUpgrade",
"(",
"SQLiteDatabase",
"db",
",",
"int",
"oldVersion",
",",
"int",
"newVersion",
")",
"{",
"try",
"{",
"if",
"(",
"builder",
".",
"tableNames",
"==",
"null",
")",
"{",
"throw",
"new",
"SQLiteHelperException",
... | Called when the database needs to be upgraded. The implementation
should use this method to drop tables, add tables, or do anything else it
needs to upgrade to the new schema version.
@param db The database.
@param oldVersion The old database version.
@param newVersion The new database version. | [
"Called",
"when",
"the",
"database",
"needs",
"to",
"be",
"upgraded",
".",
"The",
"implementation",
"should",
"use",
"this",
"method",
"to",
"drop",
"tables",
"add",
"tables",
"or",
"do",
"anything",
"else",
"it",
"needs",
"to",
"upgrade",
"to",
"the",
"ne... | bb991a43c9fa11522e5367570ee2335b99bca7c0 | https://github.com/tonilopezmr/Android-EasySQLite/blob/bb991a43c9fa11522e5367570ee2335b99bca7c0/easysqlite/src/main/java/com/tonilopezmr/easysqlite/SQLiteHelper.java#L101-L112 |
43,328 | Systemdir/GML-Writer-for-yED | GMLWriter/src/com/github/systemdir/gml/model/Tools.java | Tools.getHex | static String getHex(Color color) {
return String.format("#%02x%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
} | java | static String getHex(Color color) {
return String.format("#%02x%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
} | [
"static",
"String",
"getHex",
"(",
"Color",
"color",
")",
"{",
"return",
"String",
".",
"format",
"(",
"\"#%02x%02x%02x%02x\"",
",",
"color",
".",
"getRed",
"(",
")",
",",
"color",
".",
"getGreen",
"(",
")",
",",
"color",
".",
"getBlue",
"(",
")",
",",... | create rgba hex from a java color | [
"create",
"rgba",
"hex",
"from",
"a",
"java",
"color"
] | 353ecf132929889cb15968865283ee511f7c8d87 | https://github.com/Systemdir/GML-Writer-for-yED/blob/353ecf132929889cb15968865283ee511f7c8d87/GMLWriter/src/com/github/systemdir/gml/model/Tools.java#L65-L67 |
43,329 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.getConnectionListeners | public List<ConnectionListener> getConnectionListeners() {
if (changes == null) {
return (List<ConnectionListener>)Collections.EMPTY_LIST;
}
List<EventListener> listeners = changes.getListenerList(AMQP);
if ((listeners == null) || listeners.isEmpty()) {
return (L... | java | public List<ConnectionListener> getConnectionListeners() {
if (changes == null) {
return (List<ConnectionListener>)Collections.EMPTY_LIST;
}
List<EventListener> listeners = changes.getListenerList(AMQP);
if ((listeners == null) || listeners.isEmpty()) {
return (L... | [
"public",
"List",
"<",
"ConnectionListener",
">",
"getConnectionListeners",
"(",
")",
"{",
"if",
"(",
"changes",
"==",
"null",
")",
"{",
"return",
"(",
"List",
"<",
"ConnectionListener",
">",
")",
"Collections",
".",
"EMPTY_LIST",
";",
"}",
"List",
"<",
"E... | Returns the list of ConnectionListeners registered with this AmqpClient instance.
@return List<ConnectionListener> list of ConnectionListeners | [
"Returns",
"the",
"list",
"of",
"ConnectionListeners",
"registered",
"with",
"this",
"AmqpClient",
"instance",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L343-L359 |
43,330 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.connect | public void connect(String url, String virtualHost, String username, String password) {
if (websocket != null) {
throw new IllegalStateException("AmqpClient already connected");
}
this.readyState = ReadyState.CONNECTING;
this.url = url;
this.userName = username;
... | java | public void connect(String url, String virtualHost, String username, String password) {
if (websocket != null) {
throw new IllegalStateException("AmqpClient already connected");
}
this.readyState = ReadyState.CONNECTING;
this.url = url;
this.userName = username;
... | [
"public",
"void",
"connect",
"(",
"String",
"url",
",",
"String",
"virtualHost",
",",
"String",
"username",
",",
"String",
"password",
")",
"{",
"if",
"(",
"websocket",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"AmqpClient already... | Connect to AMQP Broker via Kaazing Gateway
@param url Location of AMQP Broker or Server
@param virtualHost Name of the virtual host
@param username Username to connect to the AMQP Server
@param password Password to connect to the AMQP Server | [
"Connect",
"to",
"AMQP",
"Broker",
"via",
"Kaazing",
"Gateway"
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L377-L389 |
43,331 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.disconnect | public void disconnect() {
if (readyState == ReadyState.OPEN) {
// readyState should be set to ReadyState.CLOSED ONLY AFTER the
// the WebSocket has been successfully closed in
// socketClosedHandler().
this.closeConnection(0, "", 0, 0, null, null);
} else... | java | public void disconnect() {
if (readyState == ReadyState.OPEN) {
// readyState should be set to ReadyState.CLOSED ONLY AFTER the
// the WebSocket has been successfully closed in
// socketClosedHandler().
this.closeConnection(0, "", 0, 0, null, null);
} else... | [
"public",
"void",
"disconnect",
"(",
")",
"{",
"if",
"(",
"readyState",
"==",
"ReadyState",
".",
"OPEN",
")",
"{",
"// readyState should be set to ReadyState.CLOSED ONLY AFTER the",
"// the WebSocket has been successfully closed in",
"// socketClosedHandler().",
"this",
".",
... | Disconnects from Amqp Server. | [
"Disconnects",
"from",
"Amqp",
"Server",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L394-L403 |
43,332 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.openChannel | public AmqpChannel openChannel() {
int id = ++this.channelCount;
AmqpChannel chan = new AmqpChannel(id, this);
channels.put(id, chan);
return chan;
} | java | public AmqpChannel openChannel() {
int id = ++this.channelCount;
AmqpChannel chan = new AmqpChannel(id, this);
channels.put(id, chan);
return chan;
} | [
"public",
"AmqpChannel",
"openChannel",
"(",
")",
"{",
"int",
"id",
"=",
"++",
"this",
".",
"channelCount",
";",
"AmqpChannel",
"chan",
"=",
"new",
"AmqpChannel",
"(",
"id",
",",
"this",
")",
";",
"channels",
".",
"put",
"(",
"id",
",",
"chan",
")",
... | Opens a channel on server.
@return AmqpChannel | [
"Opens",
"a",
"channel",
"on",
"server",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L410-L415 |
43,333 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.closedHandler | void closedHandler(Object context, String input, Object frame, String stateName) {
if (getReadyState() == ReadyState.CLOSED) {
return;
}
// TODO: Determine whether channels need to be cleaned up.
if (this.channels.size() != 0) {
for (int i = 1; i <= this.... | java | void closedHandler(Object context, String input, Object frame, String stateName) {
if (getReadyState() == ReadyState.CLOSED) {
return;
}
// TODO: Determine whether channels need to be cleaned up.
if (this.channels.size() != 0) {
for (int i = 1; i <= this.... | [
"void",
"closedHandler",
"(",
"Object",
"context",
",",
"String",
"input",
",",
"Object",
"frame",
",",
"String",
"stateName",
")",
"{",
"if",
"(",
"getReadyState",
"(",
")",
"==",
"ReadyState",
".",
"CLOSED",
")",
"{",
"return",
";",
"}",
"// TODO: Determ... | should be the order following in all our client implementations. | [
"should",
"be",
"the",
"order",
"following",
"in",
"all",
"our",
"client",
"implementations",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L593-L634 |
43,334 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.socketClosedHandler | private void socketClosedHandler() {
// If the book-keeping has already been completed earlier, then
// we should just bail.
if (getReadyState() == ReadyState.CLOSED) {
return;
}
// TODO: Determine whether channels need to be cleaned up
if (this.chann... | java | private void socketClosedHandler() {
// If the book-keeping has already been completed earlier, then
// we should just bail.
if (getReadyState() == ReadyState.CLOSED) {
return;
}
// TODO: Determine whether channels need to be cleaned up
if (this.chann... | [
"private",
"void",
"socketClosedHandler",
"(",
")",
"{",
"// If the book-keeping has already been completed earlier, then",
"// we should just bail.",
"if",
"(",
"getReadyState",
"(",
")",
"==",
"ReadyState",
".",
"CLOSED",
")",
"{",
"return",
";",
"}",
"// TODO: Determin... | closing the channels, raising events, and such. | [
"closing",
"the",
"channels",
"raising",
"events",
"and",
"such",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L653-L681 |
43,335 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.tuneOkConnection | AmqpClient tuneOkConnection(int channelMax, int frameMax, int heartbeat) {
this.tuneOkConnection(channelMax, frameMax, heartbeat, null, null);
return this;
} | java | AmqpClient tuneOkConnection(int channelMax, int frameMax, int heartbeat) {
this.tuneOkConnection(channelMax, frameMax, heartbeat, null, null);
return this;
} | [
"AmqpClient",
"tuneOkConnection",
"(",
"int",
"channelMax",
",",
"int",
"frameMax",
",",
"int",
"heartbeat",
")",
"{",
"this",
".",
"tuneOkConnection",
"(",
"channelMax",
",",
"frameMax",
",",
"heartbeat",
",",
"null",
",",
"null",
")",
";",
"return",
"this"... | Sends a TuneOkConnection to server.
@param channelMax
@param frameMax
@param heartbeat
@return AmqpClient | [
"Sends",
"a",
"TuneOkConnection",
"to",
"server",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L814-L817 |
43,336 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.closeOkConnection | AmqpClient closeOkConnection(Continuation callback, ErrorHandler error) {
Object[] args = {};
AmqpBuffer bodyArg = null;
String methodName = "closeOkConnection";
String methodId = "10" + "50";
AmqpMethod amqpMethod = MethodLookup.LookupMethod(methodId);
Object[] argument... | java | AmqpClient closeOkConnection(Continuation callback, ErrorHandler error) {
Object[] args = {};
AmqpBuffer bodyArg = null;
String methodName = "closeOkConnection";
String methodId = "10" + "50";
AmqpMethod amqpMethod = MethodLookup.LookupMethod(methodId);
Object[] argument... | [
"AmqpClient",
"closeOkConnection",
"(",
"Continuation",
"callback",
",",
"ErrorHandler",
"error",
")",
"{",
"Object",
"[",
"]",
"args",
"=",
"{",
"}",
";",
"AmqpBuffer",
"bodyArg",
"=",
"null",
";",
"String",
"methodName",
"=",
"\"closeOkConnection\"",
";",
"S... | Sends a CloseOkConnection to server.
@param callback
@param error
@return AmqpClient | [
"Sends",
"a",
"CloseOkConnection",
"to",
"server",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L927-L937 |
43,337 | kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.fireOnClosed | private void fireOnClosed(ConnectionEvent e) {
List<EventListener> listeners = changes.getListenerList(AMQP);
for (EventListener listener : listeners) {
ConnectionListener amqpListener = (ConnectionListener)listener;
amqpListener.onConnectionClose(e);
}
} | java | private void fireOnClosed(ConnectionEvent e) {
List<EventListener> listeners = changes.getListenerList(AMQP);
for (EventListener listener : listeners) {
ConnectionListener amqpListener = (ConnectionListener)listener;
amqpListener.onConnectionClose(e);
}
} | [
"private",
"void",
"fireOnClosed",
"(",
"ConnectionEvent",
"e",
")",
"{",
"List",
"<",
"EventListener",
">",
"listeners",
"=",
"changes",
".",
"getListenerList",
"(",
"AMQP",
")",
";",
"for",
"(",
"EventListener",
"listener",
":",
"listeners",
")",
"{",
"Con... | Occurs when the connection to the AMQP server is closed
@param e | [
"Occurs",
"when",
"the",
"connection",
"to",
"the",
"AMQP",
"server",
"is",
"closed"
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L965-L971 |
43,338 | threerings/nenya | core/src/main/java/com/threerings/cast/CompositedMultiFrameImage.java | CompositedMultiFrameImage.createCompositedMirage | protected CompositedMirage createCompositedMirage (int index)
{
if (_sources.length == 1 && _sources[0].frames instanceof TileSetFrameImage) {
TileSetFrameImage frames = (TileSetFrameImage)_sources[0].frames;
Rectangle tbounds = new Rectangle();
frames.getTrimmedBounds(_o... | java | protected CompositedMirage createCompositedMirage (int index)
{
if (_sources.length == 1 && _sources[0].frames instanceof TileSetFrameImage) {
TileSetFrameImage frames = (TileSetFrameImage)_sources[0].frames;
Rectangle tbounds = new Rectangle();
frames.getTrimmedBounds(_o... | [
"protected",
"CompositedMirage",
"createCompositedMirage",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"_sources",
".",
"length",
"==",
"1",
"&&",
"_sources",
"[",
"0",
"]",
".",
"frames",
"instanceof",
"TileSetFrameImage",
")",
"{",
"TileSetFrameImage",
"frames",... | Creates a composited image for the specified frame. | [
"Creates",
"a",
"composited",
"image",
"for",
"the",
"specified",
"frame",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/CompositedMultiFrameImage.java#L117-L128 |
43,339 | threerings/nenya | core/src/main/java/com/threerings/cast/bundle/BundledComponentRepository.java | BundledComponentRepository.createComponent | protected void createComponent (
int componentId, String cclass, String cname, FrameProvider fprov)
{
// look up the component class information
ComponentClass clazz = _classes.get(cclass);
if (clazz == null) {
log.warning("Non-existent component class",
"... | java | protected void createComponent (
int componentId, String cclass, String cname, FrameProvider fprov)
{
// look up the component class information
ComponentClass clazz = _classes.get(cclass);
if (clazz == null) {
log.warning("Non-existent component class",
"... | [
"protected",
"void",
"createComponent",
"(",
"int",
"componentId",
",",
"String",
"cclass",
",",
"String",
"cname",
",",
"FrameProvider",
"fprov",
")",
"{",
"// look up the component class information",
"ComponentClass",
"clazz",
"=",
"_classes",
".",
"get",
"(",
"c... | Creates a component and inserts it into the component table. | [
"Creates",
"a",
"component",
"and",
"inserts",
"it",
"into",
"the",
"component",
"table",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/bundle/BundledComponentRepository.java#L246-L274 |
43,340 | threerings/nenya | core/src/main/java/com/threerings/media/sprite/ImageSprite.java | ImageSprite.setFrames | public void setFrames (MultiFrameImage frames)
{
if (frames == null) {
// log.warning("Someone set up us the null frames!", "sprite", this);
return;
}
// if these are the same frames we already had, no need to do a bunch of pointless business
if (frames == _f... | java | public void setFrames (MultiFrameImage frames)
{
if (frames == null) {
// log.warning("Someone set up us the null frames!", "sprite", this);
return;
}
// if these are the same frames we already had, no need to do a bunch of pointless business
if (frames == _f... | [
"public",
"void",
"setFrames",
"(",
"MultiFrameImage",
"frames",
")",
"{",
"if",
"(",
"frames",
"==",
"null",
")",
"{",
"// log.warning(\"Someone set up us the null frames!\", \"sprite\", this);",
"return",
";",
"}",
"// if these are the same frames we already had, no need to d... | Set the image array used to render the sprite.
@param frames the sprite images. | [
"Set",
"the",
"image",
"array",
"used",
"to",
"render",
"the",
"sprite",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sprite/ImageSprite.java#L157-L173 |
43,341 | threerings/nenya | core/src/main/java/com/threerings/media/sprite/ImageSprite.java | ImageSprite.setFrameIndex | protected void setFrameIndex (int frameIdx, boolean forceUpdate)
{
// make sure we're displaying a valid frame
frameIdx = (frameIdx % _frames.getFrameCount());
// if this is the same frame we're already displaying and we're
// not being forced to update, we can stop now
if (... | java | protected void setFrameIndex (int frameIdx, boolean forceUpdate)
{
// make sure we're displaying a valid frame
frameIdx = (frameIdx % _frames.getFrameCount());
// if this is the same frame we're already displaying and we're
// not being forced to update, we can stop now
if (... | [
"protected",
"void",
"setFrameIndex",
"(",
"int",
"frameIdx",
",",
"boolean",
"forceUpdate",
")",
"{",
"// make sure we're displaying a valid frame",
"frameIdx",
"=",
"(",
"frameIdx",
"%",
"_frames",
".",
"getFrameCount",
"(",
")",
")",
";",
"// if this is the same fr... | Instructs the sprite to display the specified frame index. | [
"Instructs",
"the",
"sprite",
"to",
"display",
"the",
"specified",
"frame",
"index",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sprite/ImageSprite.java#L188-L215 |
43,342 | groupon/monsoon | collectors/collectd/src/main/java/com/groupon/lex/metrics/collector/collectd/CollectdPushCollector.java | CollectdPushCollector.up_down_host_ | private MetricGroup up_down_host_(String host, boolean up) {
final GroupName group = GroupName.valueOf(
getBasePath(),
Tags.valueOf(singletonMap("host", MetricValue.fromStrValue(host))));
return new SimpleMetricGroup(group, singleton(up ? UP_METRIC : DOWN_METRIC));
} | java | private MetricGroup up_down_host_(String host, boolean up) {
final GroupName group = GroupName.valueOf(
getBasePath(),
Tags.valueOf(singletonMap("host", MetricValue.fromStrValue(host))));
return new SimpleMetricGroup(group, singleton(up ? UP_METRIC : DOWN_METRIC));
} | [
"private",
"MetricGroup",
"up_down_host_",
"(",
"String",
"host",
",",
"boolean",
"up",
")",
"{",
"final",
"GroupName",
"group",
"=",
"GroupName",
".",
"valueOf",
"(",
"getBasePath",
"(",
")",
",",
"Tags",
".",
"valueOf",
"(",
"singletonMap",
"(",
"\"host\""... | Return a metric group indicating if the host is up or down. | [
"Return",
"a",
"metric",
"group",
"indicating",
"if",
"the",
"host",
"is",
"up",
"or",
"down",
"."
] | eb68d72ba4c01fe018dc981097dbee033908f5c7 | https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/collectors/collectd/src/main/java/com/groupon/lex/metrics/collector/collectd/CollectdPushCollector.java#L289-L294 |
43,343 | jboss/jboss-jsp-api_spec | src/main/java/javax/servlet/jsp/JspFactory.java | JspFactory.getDefaultFactory | public static synchronized JspFactory getDefaultFactory() {
if (deflt == null) {
try {
Class factory = Class.forName("org.apache.jasper.runtime.JspFactoryImpl");
if (factory != null) {
deflt = (JspFactory) factory.newInstance();
}
... | java | public static synchronized JspFactory getDefaultFactory() {
if (deflt == null) {
try {
Class factory = Class.forName("org.apache.jasper.runtime.JspFactoryImpl");
if (factory != null) {
deflt = (JspFactory) factory.newInstance();
}
... | [
"public",
"static",
"synchronized",
"JspFactory",
"getDefaultFactory",
"(",
")",
"{",
"if",
"(",
"deflt",
"==",
"null",
")",
"{",
"try",
"{",
"Class",
"factory",
"=",
"Class",
".",
"forName",
"(",
"\"org.apache.jasper.runtime.JspFactoryImpl\"",
")",
";",
"if",
... | Returns the default factory for this implementation.
@return the default factory for this implementation | [
"Returns",
"the",
"default",
"factory",
"for",
"this",
"implementation",
"."
] | da53166619f33a5134dc3315a3264990cc1f541f | https://github.com/jboss/jboss-jsp-api_spec/blob/da53166619f33a5134dc3315a3264990cc1f541f/src/main/java/javax/servlet/jsp/JspFactory.java#L115-L126 |
43,344 | jboss/jboss-jsp-api_spec | src/main/java/javax/servlet/jsp/tagext/TagInfo.java | TagInfo.getVariableInfo | public VariableInfo[] getVariableInfo(TagData data) {
VariableInfo[] result = null;
TagExtraInfo tei = getTagExtraInfo();
if (tei != null) {
result = tei.getVariableInfo( data );
}
return result;
} | java | public VariableInfo[] getVariableInfo(TagData data) {
VariableInfo[] result = null;
TagExtraInfo tei = getTagExtraInfo();
if (tei != null) {
result = tei.getVariableInfo( data );
}
return result;
} | [
"public",
"VariableInfo",
"[",
"]",
"getVariableInfo",
"(",
"TagData",
"data",
")",
"{",
"VariableInfo",
"[",
"]",
"result",
"=",
"null",
";",
"TagExtraInfo",
"tei",
"=",
"getTagExtraInfo",
"(",
")",
";",
"if",
"(",
"tei",
"!=",
"null",
")",
"{",
"result... | Information on the scripting objects created by this tag at runtime.
This is a convenience method on the associated TagExtraInfo class.
@param data TagData describing this action.
@return if a TagExtraInfo object is associated with this TagInfo, the
result of getTagExtraInfo().getVariableInfo( data ), otherwise
null. | [
"Information",
"on",
"the",
"scripting",
"objects",
"created",
"by",
"this",
"tag",
"at",
"runtime",
".",
"This",
"is",
"a",
"convenience",
"method",
"on",
"the",
"associated",
"TagExtraInfo",
"class",
"."
] | da53166619f33a5134dc3315a3264990cc1f541f | https://github.com/jboss/jboss-jsp-api_spec/blob/da53166619f33a5134dc3315a3264990cc1f541f/src/main/java/javax/servlet/jsp/tagext/TagInfo.java#L273-L280 |
43,345 | jdillon/gshell | gshell-launcher/src/main/java/com/planet57/gshell/launcher/Configuration.java | Configuration.getProperty | @Nullable
private String getProperty(final String name) {
assert name != null;
ensureConfigured();
return evaluate(System.getProperty(name, props.getProperty(name)));
} | java | @Nullable
private String getProperty(final String name) {
assert name != null;
ensureConfigured();
return evaluate(System.getProperty(name, props.getProperty(name)));
} | [
"@",
"Nullable",
"private",
"String",
"getProperty",
"(",
"final",
"String",
"name",
")",
"{",
"assert",
"name",
"!=",
"null",
";",
"ensureConfigured",
"(",
")",
";",
"return",
"evaluate",
"(",
"System",
".",
"getProperty",
"(",
"name",
",",
"props",
".",
... | Get the value of a property, checking system properties, then configuration properties and evaluating the result. | [
"Get",
"the",
"value",
"of",
"a",
"property",
"checking",
"system",
"properties",
"then",
"configuration",
"properties",
"and",
"evaluating",
"the",
"result",
"."
] | b587c1a4672d2e4905871462fa3b38a1f7b94e90 | https://github.com/jdillon/gshell/blob/b587c1a4672d2e4905871462fa3b38a1f7b94e90/gshell-launcher/src/main/java/com/planet57/gshell/launcher/Configuration.java#L141-L146 |
43,346 | calrissian/mango | mango-json/src/main/java/org/calrissian/mango/json/mappings/JsonAttributeMappings.java | JsonAttributeMappings.fromJson | public static Collection<Attribute> fromJson(ObjectNode object) throws IOException {
Collection<Attribute> attributes = new HashSet<>();
convertJsonObject(attributes, object, "", 0, new HashMap<>());
return attributes;
} | java | public static Collection<Attribute> fromJson(ObjectNode object) throws IOException {
Collection<Attribute> attributes = new HashSet<>();
convertJsonObject(attributes, object, "", 0, new HashMap<>());
return attributes;
} | [
"public",
"static",
"Collection",
"<",
"Attribute",
">",
"fromJson",
"(",
"ObjectNode",
"object",
")",
"throws",
"IOException",
"{",
"Collection",
"<",
"Attribute",
">",
"attributes",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"convertJsonObject",
"(",
"attri... | Flattens a raw nested json string representation into a collection of attributes.
@throws IOException | [
"Flattens",
"a",
"raw",
"nested",
"json",
"string",
"representation",
"into",
"a",
"collection",
"of",
"attributes",
"."
] | a95aa5e77af9aa0e629787228d80806560023452 | https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-json/src/main/java/org/calrissian/mango/json/mappings/JsonAttributeMappings.java#L61-L66 |
43,347 | calrissian/mango | mango-json/src/main/java/org/calrissian/mango/json/mappings/JsonAttributeMappings.java | JsonAttributeMappings.toJsonString | public static String toJsonString(Collection<Attribute> attributeCollection, ObjectMapper objectMapper) throws JsonProcessingException {
return objectMapper.writeValueAsString(toObject(attributeCollection));
} | java | public static String toJsonString(Collection<Attribute> attributeCollection, ObjectMapper objectMapper) throws JsonProcessingException {
return objectMapper.writeValueAsString(toObject(attributeCollection));
} | [
"public",
"static",
"String",
"toJsonString",
"(",
"Collection",
"<",
"Attribute",
">",
"attributeCollection",
",",
"ObjectMapper",
"objectMapper",
")",
"throws",
"JsonProcessingException",
"{",
"return",
"objectMapper",
".",
"writeValueAsString",
"(",
"toObject",
"(",
... | Re-expands a flattened json representation from a collection of attributes back into a raw
nested json string. | [
"Re",
"-",
"expands",
"a",
"flattened",
"json",
"representation",
"from",
"a",
"collection",
"of",
"attributes",
"back",
"into",
"a",
"raw",
"nested",
"json",
"string",
"."
] | a95aa5e77af9aa0e629787228d80806560023452 | https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-json/src/main/java/org/calrissian/mango/json/mappings/JsonAttributeMappings.java#L100-L102 |
43,348 | threerings/nenya | core/src/main/java/com/threerings/miso/tile/AutoFringer.java | AutoFringer.getFringeTile | public BaseTile getFringeTile (MisoSceneModel scene, int col, int row,
Map<FringeTile, WeakReference<FringeTile>> fringes, Map<Long, BufferedImage> masks)
{
// get the tileset id of the base tile we are considering
int underset = adjustTileSetId(scene.getBaseTileId(col, row) >> 16);
... | java | public BaseTile getFringeTile (MisoSceneModel scene, int col, int row,
Map<FringeTile, WeakReference<FringeTile>> fringes, Map<Long, BufferedImage> masks)
{
// get the tileset id of the base tile we are considering
int underset = adjustTileSetId(scene.getBaseTileId(col, row) >> 16);
... | [
"public",
"BaseTile",
"getFringeTile",
"(",
"MisoSceneModel",
"scene",
",",
"int",
"col",
",",
"int",
"row",
",",
"Map",
"<",
"FringeTile",
",",
"WeakReference",
"<",
"FringeTile",
">",
">",
"fringes",
",",
"Map",
"<",
"Long",
",",
"BufferedImage",
">",
"m... | Compute and return the fringe tile to be inserted at the specified location. | [
"Compute",
"and",
"return",
"the",
"fringe",
"tile",
"to",
"be",
"inserted",
"at",
"the",
"specified",
"location",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/tile/AutoFringer.java#L103-L172 |
43,349 | threerings/nenya | core/src/main/java/com/threerings/miso/tile/AutoFringer.java | AutoFringer.composeFringeTile | protected FringeTile composeFringeTile (FringerRec[] fringers,
Map<FringeTile, WeakReference<FringeTile>> fringes, int hashValue, boolean passable,
Map<Long, BufferedImage> masks)
{
// sort the array so that higher priority fringers get drawn first
QuickSort.sort(fringers);
... | java | protected FringeTile composeFringeTile (FringerRec[] fringers,
Map<FringeTile, WeakReference<FringeTile>> fringes, int hashValue, boolean passable,
Map<Long, BufferedImage> masks)
{
// sort the array so that higher priority fringers get drawn first
QuickSort.sort(fringers);
... | [
"protected",
"FringeTile",
"composeFringeTile",
"(",
"FringerRec",
"[",
"]",
"fringers",
",",
"Map",
"<",
"FringeTile",
",",
"WeakReference",
"<",
"FringeTile",
">",
">",
"fringes",
",",
"int",
"hashValue",
",",
"boolean",
"passable",
",",
"Map",
"<",
"Long",
... | Compose a FringeTile out of the various fringe images needed. | [
"Compose",
"a",
"FringeTile",
"out",
"of",
"the",
"various",
"fringe",
"images",
"needed",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/tile/AutoFringer.java#L177-L231 |
43,350 | threerings/nenya | core/src/main/java/com/threerings/miso/tile/AutoFringer.java | AutoFringer.getTileImage | protected BufferedImage getTileImage (BufferedImage img,
FringeConfiguration.FringeTileSetRecord tsr, int baseset, int index, int hashValue,
Map<Long, BufferedImage> masks)
throws NoSuchTileSetException
{
int fringeset = tsr.fringe_tsid;
TileSet fset = _tmgr.getTileSet(fringe... | java | protected BufferedImage getTileImage (BufferedImage img,
FringeConfiguration.FringeTileSetRecord tsr, int baseset, int index, int hashValue,
Map<Long, BufferedImage> masks)
throws NoSuchTileSetException
{
int fringeset = tsr.fringe_tsid;
TileSet fset = _tmgr.getTileSet(fringe... | [
"protected",
"BufferedImage",
"getTileImage",
"(",
"BufferedImage",
"img",
",",
"FringeConfiguration",
".",
"FringeTileSetRecord",
"tsr",
",",
"int",
"baseset",
",",
"int",
"index",
",",
"int",
"hashValue",
",",
"Map",
"<",
"Long",
",",
"BufferedImage",
">",
"ma... | Retrieve or compose an image for the specified fringe. | [
"Retrieve",
"or",
"compose",
"an",
"image",
"for",
"the",
"specified",
"fringe",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/tile/AutoFringer.java#L236-L260 |
43,351 | threerings/nenya | core/src/main/java/com/threerings/miso/tile/AutoFringer.java | AutoFringer.getFringeIndexes | protected int[] getFringeIndexes (int bits)
{
int index = BITS_TO_INDEX[bits];
if (index != -1) {
int[] ret = new int[1];
ret[0] = index;
return ret;
}
// otherwise, split the bits into contiguous components
// look for a zero and start o... | java | protected int[] getFringeIndexes (int bits)
{
int index = BITS_TO_INDEX[bits];
if (index != -1) {
int[] ret = new int[1];
ret[0] = index;
return ret;
}
// otherwise, split the bits into contiguous components
// look for a zero and start o... | [
"protected",
"int",
"[",
"]",
"getFringeIndexes",
"(",
"int",
"bits",
")",
"{",
"int",
"index",
"=",
"BITS_TO_INDEX",
"[",
"bits",
"]",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"int",
"[",
"]",
"ret",
"=",
"new",
"int",
"[",
"1",
"]",
... | Get the fringe index specified by the fringebits. If no index is available, try breaking
down the bits into contiguous regions of bits and look for indexes for those. | [
"Get",
"the",
"fringe",
"index",
"specified",
"by",
"the",
"fringebits",
".",
"If",
"no",
"index",
"is",
"available",
"try",
"breaking",
"down",
"the",
"bits",
"into",
"contiguous",
"regions",
"of",
"bits",
"and",
"look",
"for",
"indexes",
"for",
"those",
... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/tile/AutoFringer.java#L287-L336 |
43,352 | threerings/nenya | core/src/main/java/com/threerings/openal/SoundGroup.java | SoundGroup.getSound | public Sound getSound (String path)
{
ClipBuffer buffer = null;
if (_manager.isInitialized()) {
buffer = _manager.getClip(_provider, path);
}
return (buffer == null) ? new BlankSound() : new Sound(this, buffer);
} | java | public Sound getSound (String path)
{
ClipBuffer buffer = null;
if (_manager.isInitialized()) {
buffer = _manager.getClip(_provider, path);
}
return (buffer == null) ? new BlankSound() : new Sound(this, buffer);
} | [
"public",
"Sound",
"getSound",
"(",
"String",
"path",
")",
"{",
"ClipBuffer",
"buffer",
"=",
"null",
";",
"if",
"(",
"_manager",
".",
"isInitialized",
"(",
")",
")",
"{",
"buffer",
"=",
"_manager",
".",
"getClip",
"(",
"_provider",
",",
"path",
")",
";... | Obtains an "instance" of the specified sound which can be positioned, played, looped and
otherwise used to make noise. | [
"Obtains",
"an",
"instance",
"of",
"the",
"specified",
"sound",
"which",
"can",
"be",
"positioned",
"played",
"looped",
"and",
"otherwise",
"used",
"to",
"make",
"noise",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundGroup.java#L69-L76 |
43,353 | threerings/nenya | core/src/main/java/com/threerings/openal/SoundGroup.java | SoundGroup.dispose | public void dispose ()
{
reclaimAll();
for (PooledSource pooled : _sources) {
pooled.source.delete();
}
_sources.clear();
// remove from the manager
_manager.removeGroup(this);
} | java | public void dispose ()
{
reclaimAll();
for (PooledSource pooled : _sources) {
pooled.source.delete();
}
_sources.clear();
// remove from the manager
_manager.removeGroup(this);
} | [
"public",
"void",
"dispose",
"(",
")",
"{",
"reclaimAll",
"(",
")",
";",
"for",
"(",
"PooledSource",
"pooled",
":",
"_sources",
")",
"{",
"pooled",
".",
"source",
".",
"delete",
"(",
")",
";",
"}",
"_sources",
".",
"clear",
"(",
")",
";",
"// remove ... | Disposes this sound group, freeing up the OpenAL sources with which it is associated. All
sounds obtained from this group will no longer be usable and should be discarded. | [
"Disposes",
"this",
"sound",
"group",
"freeing",
"up",
"the",
"OpenAL",
"sources",
"with",
"which",
"it",
"is",
"associated",
".",
"All",
"sounds",
"obtained",
"from",
"this",
"group",
"will",
"no",
"longer",
"be",
"usable",
"and",
"should",
"be",
"discarded... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundGroup.java#L82-L92 |
43,354 | threerings/nenya | core/src/main/java/com/threerings/openal/SoundGroup.java | SoundGroup.reclaimAll | public void reclaimAll ()
{
// make sure any bound sources are released
for (PooledSource pooled : _sources) {
if (pooled.holder != null) {
pooled.holder.stop();
pooled.holder.reclaim();
pooled.holder = null;
}
}
} | java | public void reclaimAll ()
{
// make sure any bound sources are released
for (PooledSource pooled : _sources) {
if (pooled.holder != null) {
pooled.holder.stop();
pooled.holder.reclaim();
pooled.holder = null;
}
}
} | [
"public",
"void",
"reclaimAll",
"(",
")",
"{",
"// make sure any bound sources are released",
"for",
"(",
"PooledSource",
"pooled",
":",
"_sources",
")",
"{",
"if",
"(",
"pooled",
".",
"holder",
"!=",
"null",
")",
"{",
"pooled",
".",
"holder",
".",
"stop",
"... | Stops and reclaims all sounds from this sound group but does not free the sources. | [
"Stops",
"and",
"reclaims",
"all",
"sounds",
"from",
"this",
"sound",
"group",
"but",
"does",
"not",
"free",
"the",
"sources",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundGroup.java#L97-L107 |
43,355 | threerings/nenya | core/src/main/java/com/threerings/openal/SoundGroup.java | SoundGroup.baseGainChanged | protected void baseGainChanged ()
{
// notify any sound currently holding a source
for (int ii = 0, nn = _sources.size(); ii < nn; ii++) {
Sound holder = _sources.get(ii).holder;
if (holder != null) {
holder.updateSourceGain();
}
}
} | java | protected void baseGainChanged ()
{
// notify any sound currently holding a source
for (int ii = 0, nn = _sources.size(); ii < nn; ii++) {
Sound holder = _sources.get(ii).holder;
if (holder != null) {
holder.updateSourceGain();
}
}
} | [
"protected",
"void",
"baseGainChanged",
"(",
")",
"{",
"// notify any sound currently holding a source",
"for",
"(",
"int",
"ii",
"=",
"0",
",",
"nn",
"=",
"_sources",
".",
"size",
"(",
")",
";",
"ii",
"<",
"nn",
";",
"ii",
"++",
")",
"{",
"Sound",
"hold... | Called by the manager when the base gain has changed. | [
"Called",
"by",
"the",
"manager",
"when",
"the",
"base",
"gain",
"has",
"changed",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundGroup.java#L169-L178 |
43,356 | threerings/nenya | core/src/main/java/com/threerings/media/animation/MultiFrameAnimation.java | MultiFrameAnimation.setFrameIndex | protected void setFrameIndex (int fidx)
{
_fidx = fidx;
_bounds.width = _frames.getWidth(_fidx);
_bounds.height = _frames.getHeight(_fidx);
} | java | protected void setFrameIndex (int fidx)
{
_fidx = fidx;
_bounds.width = _frames.getWidth(_fidx);
_bounds.height = _frames.getHeight(_fidx);
} | [
"protected",
"void",
"setFrameIndex",
"(",
"int",
"fidx",
")",
"{",
"_fidx",
"=",
"fidx",
";",
"_bounds",
".",
"width",
"=",
"_frames",
".",
"getWidth",
"(",
"_fidx",
")",
";",
"_bounds",
".",
"height",
"=",
"_frames",
".",
"getHeight",
"(",
"_fidx",
"... | Sets the frame index and updates our dimensions. | [
"Sets",
"the",
"frame",
"index",
"and",
"updates",
"our",
"dimensions",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/animation/MultiFrameAnimation.java#L110-L115 |
43,357 | tonilopezmr/Android-EasySQLite | easysqlite/src/main/java/com/tonilopezmr/easysqlite/SQLiteDelegate.java | SQLiteDelegate.read | @Override
public synchronized T read(T dto) throws Exception {
Cursor cursor = db.query(transformer.getTableName(), transformer.getFields(), transformer.getWhereClause(dto),null, null,null,null);
T object = null;
if (cursor.moveToFirst()){
object = transformer.transform(cursor);
... | java | @Override
public synchronized T read(T dto) throws Exception {
Cursor cursor = db.query(transformer.getTableName(), transformer.getFields(), transformer.getWhereClause(dto),null, null,null,null);
T object = null;
if (cursor.moveToFirst()){
object = transformer.transform(cursor);
... | [
"@",
"Override",
"public",
"synchronized",
"T",
"read",
"(",
"T",
"dto",
")",
"throws",
"Exception",
"{",
"Cursor",
"cursor",
"=",
"db",
".",
"query",
"(",
"transformer",
".",
"getTableName",
"(",
")",
",",
"transformer",
".",
"getFields",
"(",
")",
",",... | Convenience method for reading rows in the database.
@param dto row in database
@return T object
@throws Exception on error | [
"Convenience",
"method",
"for",
"reading",
"rows",
"in",
"the",
"database",
"."
] | bb991a43c9fa11522e5367570ee2335b99bca7c0 | https://github.com/tonilopezmr/Android-EasySQLite/blob/bb991a43c9fa11522e5367570ee2335b99bca7c0/easysqlite/src/main/java/com/tonilopezmr/easysqlite/SQLiteDelegate.java#L112-L120 |
43,358 | tonilopezmr/Android-EasySQLite | easysqlite/src/main/java/com/tonilopezmr/easysqlite/SQLiteDelegate.java | SQLiteDelegate.readAll | @Override
public synchronized Collection<T> readAll() throws Exception {
Cursor cursor = db.query(transformer.getTableName(), transformer.getFields(), null, null, null, null, null);
Collection<T> list = getAllCursor(cursor);
return list;
} | java | @Override
public synchronized Collection<T> readAll() throws Exception {
Cursor cursor = db.query(transformer.getTableName(), transformer.getFields(), null, null, null, null, null);
Collection<T> list = getAllCursor(cursor);
return list;
} | [
"@",
"Override",
"public",
"synchronized",
"Collection",
"<",
"T",
">",
"readAll",
"(",
")",
"throws",
"Exception",
"{",
"Cursor",
"cursor",
"=",
"db",
".",
"query",
"(",
"transformer",
".",
"getTableName",
"(",
")",
",",
"transformer",
".",
"getFields",
"... | Convenience method for reading all rows in the table of database.
@return Collection objects
@throws Exception on error | [
"Convenience",
"method",
"for",
"reading",
"all",
"rows",
"in",
"the",
"table",
"of",
"database",
"."
] | bb991a43c9fa11522e5367570ee2335b99bca7c0 | https://github.com/tonilopezmr/Android-EasySQLite/blob/bb991a43c9fa11522e5367570ee2335b99bca7c0/easysqlite/src/main/java/com/tonilopezmr/easysqlite/SQLiteDelegate.java#L128-L133 |
43,359 | threerings/nenya | core/src/main/java/com/threerings/geom/GeomUtil.java | GeomUtil.dot | public static int dot (Point v1s, Point v1e, Point v2s, Point v2e)
{
return ((v1e.x - v1s.x) * (v2e.x - v2s.x) + (v1e.y - v1s.y) * (v2e.y - v2s.y));
} | java | public static int dot (Point v1s, Point v1e, Point v2s, Point v2e)
{
return ((v1e.x - v1s.x) * (v2e.x - v2s.x) + (v1e.y - v1s.y) * (v2e.y - v2s.y));
} | [
"public",
"static",
"int",
"dot",
"(",
"Point",
"v1s",
",",
"Point",
"v1e",
",",
"Point",
"v2s",
",",
"Point",
"v2e",
")",
"{",
"return",
"(",
"(",
"v1e",
".",
"x",
"-",
"v1s",
".",
"x",
")",
"*",
"(",
"v2e",
".",
"x",
"-",
"v2s",
".",
"x",
... | Computes and returns the dot product of the two vectors.
@param v1s the starting point of the first vector.
@param v1e the ending point of the first vector.
@param v2s the starting point of the second vector.
@param v2e the ending point of the second vector. | [
"Computes",
"and",
"returns",
"the",
"dot",
"product",
"of",
"the",
"two",
"vectors",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/geom/GeomUtil.java#L41-L44 |
43,360 | threerings/nenya | core/src/main/java/com/threerings/geom/GeomUtil.java | GeomUtil.dot | public static int dot (Point vs, Point v1e, Point v2e)
{
return ((v1e.x - vs.x) * (v2e.x - vs.x) + (v1e.y - vs.y) * (v2e.y - vs.y));
} | java | public static int dot (Point vs, Point v1e, Point v2e)
{
return ((v1e.x - vs.x) * (v2e.x - vs.x) + (v1e.y - vs.y) * (v2e.y - vs.y));
} | [
"public",
"static",
"int",
"dot",
"(",
"Point",
"vs",
",",
"Point",
"v1e",
",",
"Point",
"v2e",
")",
"{",
"return",
"(",
"(",
"v1e",
".",
"x",
"-",
"vs",
".",
"x",
")",
"*",
"(",
"v2e",
".",
"x",
"-",
"vs",
".",
"x",
")",
"+",
"(",
"v1e",
... | Computes and returns the dot product of the two vectors. The vectors are assumed to start
with the same coordinate and end with different coordinates.
@param vs the starting point of both vectors.
@param v1e the ending point of the first vector.
@param v2e the ending point of the second vector. | [
"Computes",
"and",
"returns",
"the",
"dot",
"product",
"of",
"the",
"two",
"vectors",
".",
"The",
"vectors",
"are",
"assumed",
"to",
"start",
"with",
"the",
"same",
"coordinate",
"and",
"end",
"with",
"different",
"coordinates",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/geom/GeomUtil.java#L64-L67 |
43,361 | threerings/nenya | core/src/main/java/com/threerings/geom/GeomUtil.java | GeomUtil.lineIntersection | public static boolean lineIntersection (Point2D p1, Point2D p2, boolean seg1,
Point2D p3, Point2D p4, boolean seg2, Point2D result)
{
// see http://astronomy.swin.edu.au/~pbourke/geometry/lineline2d/
double y43 = p4.getY() - p3.getY();
double x21 =... | java | public static boolean lineIntersection (Point2D p1, Point2D p2, boolean seg1,
Point2D p3, Point2D p4, boolean seg2, Point2D result)
{
// see http://astronomy.swin.edu.au/~pbourke/geometry/lineline2d/
double y43 = p4.getY() - p3.getY();
double x21 =... | [
"public",
"static",
"boolean",
"lineIntersection",
"(",
"Point2D",
"p1",
",",
"Point2D",
"p2",
",",
"boolean",
"seg1",
",",
"Point2D",
"p3",
",",
"Point2D",
"p4",
",",
"boolean",
"seg2",
",",
"Point2D",
"result",
")",
"{",
"// see http://astronomy.swin.edu.au/~p... | Calculate the intersection of two lines. Either line may be considered as a line segment,
and the intersecting point is only considered valid if it lies upon the segment. Note that
Point extends Point2D.
@param p1 and p2 the coordinates of the first line.
@param seg1 if the first line should be considered a segment.
... | [
"Calculate",
"the",
"intersection",
"of",
"two",
"lines",
".",
"Either",
"line",
"may",
"be",
"considered",
"as",
"a",
"line",
"segment",
"and",
"the",
"intersecting",
"point",
"is",
"only",
"considered",
"valid",
"if",
"it",
"lies",
"upon",
"the",
"segment"... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/geom/GeomUtil.java#L117-L148 |
43,362 | threerings/nenya | core/src/main/java/com/threerings/geom/GeomUtil.java | GeomUtil.grow | public static Rectangle grow (Rectangle source, Rectangle target)
{
if (target == null) {
log.warning("Can't grow with null rectangle [src=" + source + ", tgt=" + target + "].",
new Exception());
} else if (source == null) {
source = new Rectangle(targ... | java | public static Rectangle grow (Rectangle source, Rectangle target)
{
if (target == null) {
log.warning("Can't grow with null rectangle [src=" + source + ", tgt=" + target + "].",
new Exception());
} else if (source == null) {
source = new Rectangle(targ... | [
"public",
"static",
"Rectangle",
"grow",
"(",
"Rectangle",
"source",
",",
"Rectangle",
"target",
")",
"{",
"if",
"(",
"target",
"==",
"null",
")",
"{",
"log",
".",
"warning",
"(",
"\"Can't grow with null rectangle [src=\"",
"+",
"source",
"+",
"\", tgt=\"",
"+... | Adds the target rectangle to the bounds of the source rectangle. If the source rectangle is
null, a new rectangle is created that is the size of the target rectangle.
@return the source rectangle. | [
"Adds",
"the",
"target",
"rectangle",
"to",
"the",
"bounds",
"of",
"the",
"source",
"rectangle",
".",
"If",
"the",
"source",
"rectangle",
"is",
"null",
"a",
"new",
"rectangle",
"is",
"created",
"that",
"is",
"the",
"size",
"of",
"the",
"target",
"rectangle... | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/geom/GeomUtil.java#L200-L211 |
43,363 | threerings/nenya | core/src/main/java/com/threerings/geom/GeomUtil.java | GeomUtil.getTile | public static Rectangle getTile (
int width, int height, int tileWidth, int tileHeight, int tileIndex)
{
Rectangle bounds = new Rectangle();
getTile(width, height, tileWidth, tileHeight, tileIndex, bounds);
return bounds;
} | java | public static Rectangle getTile (
int width, int height, int tileWidth, int tileHeight, int tileIndex)
{
Rectangle bounds = new Rectangle();
getTile(width, height, tileWidth, tileHeight, tileIndex, bounds);
return bounds;
} | [
"public",
"static",
"Rectangle",
"getTile",
"(",
"int",
"width",
",",
"int",
"height",
",",
"int",
"tileWidth",
",",
"int",
"tileHeight",
",",
"int",
"tileIndex",
")",
"{",
"Rectangle",
"bounds",
"=",
"new",
"Rectangle",
"(",
")",
";",
"getTile",
"(",
"w... | Returns the rectangle containing the specified tile in the supplied larger rectangle. Tiles
go from left to right, top to bottom. | [
"Returns",
"the",
"rectangle",
"containing",
"the",
"specified",
"tile",
"in",
"the",
"supplied",
"larger",
"rectangle",
".",
"Tiles",
"go",
"from",
"left",
"to",
"right",
"top",
"to",
"bottom",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/geom/GeomUtil.java#L217-L223 |
43,364 | threerings/nenya | core/src/main/java/com/threerings/geom/GeomUtil.java | GeomUtil.getTile | public static void getTile (int width, int height, int tileWidth, int tileHeight, int tileIndex,
Rectangle bounds)
{
// figure out from whence to crop the tile
int tilesPerRow = width / tileWidth;
// if we got a bogus region, return bogus tile bounds
... | java | public static void getTile (int width, int height, int tileWidth, int tileHeight, int tileIndex,
Rectangle bounds)
{
// figure out from whence to crop the tile
int tilesPerRow = width / tileWidth;
// if we got a bogus region, return bogus tile bounds
... | [
"public",
"static",
"void",
"getTile",
"(",
"int",
"width",
",",
"int",
"height",
",",
"int",
"tileWidth",
",",
"int",
"tileHeight",
",",
"int",
"tileIndex",
",",
"Rectangle",
"bounds",
")",
"{",
"// figure out from whence to crop the tile",
"int",
"tilesPerRow",
... | Fills in the bounds of the specified tile in the supplied larger rectangle. Tiles go from
left to right, top to bottom. | [
"Fills",
"in",
"the",
"bounds",
"of",
"the",
"specified",
"tile",
"in",
"the",
"supplied",
"larger",
"rectangle",
".",
"Tiles",
"go",
"from",
"left",
"to",
"right",
"top",
"to",
"bottom",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/geom/GeomUtil.java#L229-L245 |
43,365 | kaazing/java.client | ws/ws/src/main/java/org/kaazing/net/ws/impl/WebSocketImpl.java | WebSocketImpl.setNegotiatedExtensions | private void setNegotiatedExtensions(String extensionsHeader) {
if ((extensionsHeader == null) ||
(extensionsHeader.trim().length() == 0)) {
_negotiatedExtensions = null;
return;
}
String[] extns = extensionsHeader.split(",");
List<String... | java | private void setNegotiatedExtensions(String extensionsHeader) {
if ((extensionsHeader == null) ||
(extensionsHeader.trim().length() == 0)) {
_negotiatedExtensions = null;
return;
}
String[] extns = extensionsHeader.split(",");
List<String... | [
"private",
"void",
"setNegotiatedExtensions",
"(",
"String",
"extensionsHeader",
")",
"{",
"if",
"(",
"(",
"extensionsHeader",
"==",
"null",
")",
"||",
"(",
"extensionsHeader",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
")",
"{",
"_n... | RFC 3864 format. | [
"RFC",
"3864",
"format",
"."
] | 25ad2ae5bb24aa9d6b79400fce649b518dcfbe26 | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/ws/ws/src/main/java/org/kaazing/net/ws/impl/WebSocketImpl.java#L972-L1048 |
43,366 | groupon/robo-remote | RoboRemoteClient/src/main/com/groupon/roboremote/roboremoteclient/components/ListView.java | ListView.scrollToIndex | public static int scrollToIndex(String listRef, int itemIndex) throws Exception {
int listViewIndex = getListViewIndex(listRef);
if (itemIndex >= numItemsInList(listRef))
throw new Exception("Item index is greater than number of items in the list");
// scroll to the top of this vie... | java | public static int scrollToIndex(String listRef, int itemIndex) throws Exception {
int listViewIndex = getListViewIndex(listRef);
if (itemIndex >= numItemsInList(listRef))
throw new Exception("Item index is greater than number of items in the list");
// scroll to the top of this vie... | [
"public",
"static",
"int",
"scrollToIndex",
"(",
"String",
"listRef",
",",
"int",
"itemIndex",
")",
"throws",
"Exception",
"{",
"int",
"listViewIndex",
"=",
"getListViewIndex",
"(",
"listRef",
")",
";",
"if",
"(",
"itemIndex",
">=",
"numItemsInList",
"(",
"lis... | Scrolls the specified item index onto the screen and returns the offset based on the current visible list
@param listRef
@param itemIndex
@return
@throws Exception | [
"Scrolls",
"the",
"specified",
"item",
"index",
"onto",
"the",
"screen",
"and",
"returns",
"the",
"offset",
"based",
"on",
"the",
"current",
"visible",
"list"
] | 12d242faad50bf90f98657ca9a0c0c3ae1993f07 | https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteClient/src/main/com/groupon/roboremote/roboremoteclient/components/ListView.java#L93-L135 |
43,367 | threerings/nenya | core/src/main/java/com/threerings/media/util/TrailingAverage.java | TrailingAverage.value | public int value ()
{
int end = Math.min(_history.length, _index);
int value = 0;
for (int ii = 0; ii < end; ii++) {
value += _history[ii];
}
return (end > 0) ? (value/end) : 0;
} | java | public int value ()
{
int end = Math.min(_history.length, _index);
int value = 0;
for (int ii = 0; ii < end; ii++) {
value += _history[ii];
}
return (end > 0) ? (value/end) : 0;
} | [
"public",
"int",
"value",
"(",
")",
"{",
"int",
"end",
"=",
"Math",
".",
"min",
"(",
"_history",
".",
"length",
",",
"_index",
")",
";",
"int",
"value",
"=",
"0",
";",
"for",
"(",
"int",
"ii",
"=",
"0",
";",
"ii",
"<",
"end",
";",
"ii",
"++",... | Returns the current averaged value. | [
"Returns",
"the",
"current",
"averaged",
"value",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/TrailingAverage.java#L56-L64 |
43,368 | threerings/nenya | core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java | JavaSoundPlayer.loop | protected Frob loop (String pkgPath, String key, float pan, byte cmd)
{
SoundKey skey = new SoundKey(cmd, pkgPath, key, 0, _clipVol, pan);
addToPlayQueue(skey);
return skey; // it is a frob
} | java | protected Frob loop (String pkgPath, String key, float pan, byte cmd)
{
SoundKey skey = new SoundKey(cmd, pkgPath, key, 0, _clipVol, pan);
addToPlayQueue(skey);
return skey; // it is a frob
} | [
"protected",
"Frob",
"loop",
"(",
"String",
"pkgPath",
",",
"String",
"key",
",",
"float",
"pan",
",",
"byte",
"cmd",
")",
"{",
"SoundKey",
"skey",
"=",
"new",
"SoundKey",
"(",
"cmd",
",",
"pkgPath",
",",
"key",
",",
"0",
",",
"_clipVol",
",",
"pan",... | Loop the specified sound. | [
"Loop",
"the",
"specified",
"sound",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java#L176-L181 |
43,369 | threerings/nenya | core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java | JavaSoundPlayer.addToPlayQueue | protected void addToPlayQueue (SoundKey skey)
{
boolean queued = enqueue(skey, true);
if (queued) {
if (_verbose.getValue()) {
log.info("Sound request [key=" + skey.key + "].");
}
} else /* if (_verbose.getValue()) */ {
log.warning("SoundM... | java | protected void addToPlayQueue (SoundKey skey)
{
boolean queued = enqueue(skey, true);
if (queued) {
if (_verbose.getValue()) {
log.info("Sound request [key=" + skey.key + "].");
}
} else /* if (_verbose.getValue()) */ {
log.warning("SoundM... | [
"protected",
"void",
"addToPlayQueue",
"(",
"SoundKey",
"skey",
")",
"{",
"boolean",
"queued",
"=",
"enqueue",
"(",
"skey",
",",
"true",
")",
";",
"if",
"(",
"queued",
")",
"{",
"if",
"(",
"_verbose",
".",
"getValue",
"(",
")",
")",
"{",
"log",
".",
... | Add the sound clip key to the queue to be played. | [
"Add",
"the",
"sound",
"clip",
"key",
"to",
"the",
"queue",
"to",
"be",
"played",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java#L186-L198 |
43,370 | threerings/nenya | core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java | JavaSoundPlayer.enqueue | protected boolean enqueue (SoundKey key, boolean okToStartNew)
{
boolean add;
boolean queued;
synchronized (_queue) {
if (key.cmd == PLAY && _queue.size() > MAX_QUEUE_SIZE) {
queued = add = false;
} else {
_queue.appendLoud(key);
... | java | protected boolean enqueue (SoundKey key, boolean okToStartNew)
{
boolean add;
boolean queued;
synchronized (_queue) {
if (key.cmd == PLAY && _queue.size() > MAX_QUEUE_SIZE) {
queued = add = false;
} else {
_queue.appendLoud(key);
... | [
"protected",
"boolean",
"enqueue",
"(",
"SoundKey",
"key",
",",
"boolean",
"okToStartNew",
")",
"{",
"boolean",
"add",
";",
"boolean",
"queued",
";",
"synchronized",
"(",
"_queue",
")",
"{",
"if",
"(",
"key",
".",
"cmd",
"==",
"PLAY",
"&&",
"_queue",
"."... | Enqueue a new SoundKey. | [
"Enqueue",
"a",
"new",
"SoundKey",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java#L203-L233 |
43,371 | threerings/nenya | core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java | JavaSoundPlayer.spoolerRun | protected void spoolerRun ()
{
while (true) {
try {
SoundKey key;
synchronized (_queue) {
_freeSpoolers++;
key = _queue.get(MAX_WAIT_TIME);
_freeSpoolers--;
if (key == null || key.cmd... | java | protected void spoolerRun ()
{
while (true) {
try {
SoundKey key;
synchronized (_queue) {
_freeSpoolers++;
key = _queue.get(MAX_WAIT_TIME);
_freeSpoolers--;
if (key == null || key.cmd... | [
"protected",
"void",
"spoolerRun",
"(",
")",
"{",
"while",
"(",
"true",
")",
"{",
"try",
"{",
"SoundKey",
"key",
";",
"synchronized",
"(",
"_queue",
")",
"{",
"_freeSpoolers",
"++",
";",
"key",
"=",
"_queue",
".",
"get",
"(",
"MAX_WAIT_TIME",
")",
";",... | This is the primary run method of the sound-playing threads. | [
"This",
"is",
"the",
"primary",
"run",
"method",
"of",
"the",
"sound",
"-",
"playing",
"threads",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java#L238-L265 |
43,372 | threerings/nenya | core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java | JavaSoundPlayer.processKey | protected void processKey (SoundKey key)
throws Exception
{
switch (key.cmd) {
case PLAY:
case LOOP:
playSound(key);
break;
case LOCK:
if (!isTesting()) {
synchronized (_clipCache) {
try {
... | java | protected void processKey (SoundKey key)
throws Exception
{
switch (key.cmd) {
case PLAY:
case LOOP:
playSound(key);
break;
case LOCK:
if (!isTesting()) {
synchronized (_clipCache) {
try {
... | [
"protected",
"void",
"processKey",
"(",
"SoundKey",
"key",
")",
"throws",
"Exception",
"{",
"switch",
"(",
"key",
".",
"cmd",
")",
"{",
"case",
"PLAY",
":",
"case",
"LOOP",
":",
"playSound",
"(",
"key",
")",
";",
"break",
";",
"case",
"LOCK",
":",
"i... | Process the requested command in the specified SoundKey. | [
"Process",
"the",
"requested",
"command",
"in",
"the",
"specified",
"SoundKey",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java#L270-L302 |
43,373 | threerings/nenya | core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java | JavaSoundPlayer.getClipData | protected byte[] getClipData (SoundKey key)
throws IOException, UnsupportedAudioFileException
{
byte[][] data;
synchronized (_clipCache) {
// if we're testing, clear all non-locked sounds every time
if (isTesting()) {
_clipCache.clear();
}
... | java | protected byte[] getClipData (SoundKey key)
throws IOException, UnsupportedAudioFileException
{
byte[][] data;
synchronized (_clipCache) {
// if we're testing, clear all non-locked sounds every time
if (isTesting()) {
_clipCache.clear();
}
... | [
"protected",
"byte",
"[",
"]",
"getClipData",
"(",
"SoundKey",
"key",
")",
"throws",
"IOException",
",",
"UnsupportedAudioFileException",
"{",
"byte",
"[",
"]",
"[",
"]",
"data",
";",
"synchronized",
"(",
"_clipCache",
")",
"{",
"// if we're testing, clear all non... | Called by spooling threads, loads clip data from the resource manager or the cache. | [
"Called",
"by",
"spooling",
"threads",
"loads",
"clip",
"data",
"from",
"the",
"resource",
"manager",
"or",
"the",
"cache",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java#L484-L519 |
43,374 | threerings/nenya | core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java | JavaSoundPlayer.adjustVolume | protected static void adjustVolume (Line line, float vol)
{
FloatControl control = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
// the only problem is that gain is specified in decibals, which is a logarithmic scale.
// Since we want max volume to leave the sample unchange... | java | protected static void adjustVolume (Line line, float vol)
{
FloatControl control = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
// the only problem is that gain is specified in decibals, which is a logarithmic scale.
// Since we want max volume to leave the sample unchange... | [
"protected",
"static",
"void",
"adjustVolume",
"(",
"Line",
"line",
",",
"float",
"vol",
")",
"{",
"FloatControl",
"control",
"=",
"(",
"FloatControl",
")",
"line",
".",
"getControl",
"(",
"FloatControl",
".",
"Type",
".",
"MASTER_GAIN",
")",
";",
"// the on... | Use the gain control to implement volume. | [
"Use",
"the",
"gain",
"control",
"to",
"implement",
"volume",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java#L577-L593 |
43,375 | threerings/nenya | core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java | JavaSoundPlayer.adjustPan | protected static void adjustPan (Line line, float pan)
{
try {
FloatControl control = (FloatControl) line.getControl(FloatControl.Type.PAN);
control.setValue(pan);
} catch (Exception e) {
log.debug("Cannot set pan on line: " + e);
}
} | java | protected static void adjustPan (Line line, float pan)
{
try {
FloatControl control = (FloatControl) line.getControl(FloatControl.Type.PAN);
control.setValue(pan);
} catch (Exception e) {
log.debug("Cannot set pan on line: " + e);
}
} | [
"protected",
"static",
"void",
"adjustPan",
"(",
"Line",
"line",
",",
"float",
"pan",
")",
"{",
"try",
"{",
"FloatControl",
"control",
"=",
"(",
"FloatControl",
")",
"line",
".",
"getControl",
"(",
"FloatControl",
".",
"Type",
".",
"PAN",
")",
";",
"cont... | Set the pan value for the specified line. | [
"Set",
"the",
"pan",
"value",
"for",
"the",
"specified",
"line",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sound/JavaSoundPlayer.java#L598-L606 |
43,376 | threerings/nenya | core/src/main/java/com/threerings/media/FrameInterval.java | FrameInterval.tick | public void tick (long tickStamp)
{
if (_nextTime == -1) {
// First time through
_nextTime = tickStamp + _initDelay;
} else if (tickStamp >= _nextTime) {
// If we're repeating, set the next time to run, otherwise, reset
if (_repeatDelay != 0L) {
... | java | public void tick (long tickStamp)
{
if (_nextTime == -1) {
// First time through
_nextTime = tickStamp + _initDelay;
} else if (tickStamp >= _nextTime) {
// If we're repeating, set the next time to run, otherwise, reset
if (_repeatDelay != 0L) {
... | [
"public",
"void",
"tick",
"(",
"long",
"tickStamp",
")",
"{",
"if",
"(",
"_nextTime",
"==",
"-",
"1",
")",
"{",
"// First time through",
"_nextTime",
"=",
"tickStamp",
"+",
"_initDelay",
";",
"}",
"else",
"if",
"(",
"tickStamp",
">=",
"_nextTime",
")",
"... | documentation inherited from FrameParticipant | [
"documentation",
"inherited",
"from",
"FrameParticipant"
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/FrameInterval.java#L48-L64 |
43,377 | threerings/nenya | core/src/main/java/com/threerings/media/sprite/OrientableImageSprite.java | OrientableImageSprite.getRotationTransform | private AffineTransform getRotationTransform ()
{
double theta;
switch (_orient) {
case NORTH:
default:
theta = 0.0;
break;
case SOUTH:
theta = Math.PI;
break;
case EAST:
... | java | private AffineTransform getRotationTransform ()
{
double theta;
switch (_orient) {
case NORTH:
default:
theta = 0.0;
break;
case SOUTH:
theta = Math.PI;
break;
case EAST:
... | [
"private",
"AffineTransform",
"getRotationTransform",
"(",
")",
"{",
"double",
"theta",
";",
"switch",
"(",
"_orient",
")",
"{",
"case",
"NORTH",
":",
"default",
":",
"theta",
"=",
"0.0",
";",
"break",
";",
"case",
"SOUTH",
":",
"theta",
"=",
"Math",
"."... | Computes and returns the rotation transform for this
sprite.
@return the newly computed rotation transform | [
"Computes",
"and",
"returns",
"the",
"rotation",
"transform",
"for",
"this",
"sprite",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sprite/OrientableImageSprite.java#L68-L144 |
43,378 | groupon/monsoon | expr/src/main/java/com/groupon/lex/metrics/MetricMatcher.java | MetricMatcher.filter | public Stream<Entry<MatchedName, MetricValue>> filter(Context t) {
return t.getTSData().getCurrentCollection().get(this::match, x -> true).stream()
.flatMap(this::filterMetricsInTsv);
} | java | public Stream<Entry<MatchedName, MetricValue>> filter(Context t) {
return t.getTSData().getCurrentCollection().get(this::match, x -> true).stream()
.flatMap(this::filterMetricsInTsv);
} | [
"public",
"Stream",
"<",
"Entry",
"<",
"MatchedName",
",",
"MetricValue",
">",
">",
"filter",
"(",
"Context",
"t",
")",
"{",
"return",
"t",
".",
"getTSData",
"(",
")",
".",
"getCurrentCollection",
"(",
")",
".",
"get",
"(",
"this",
"::",
"match",
",",
... | Create a stream of TimeSeriesMetricDeltas with values. | [
"Create",
"a",
"stream",
"of",
"TimeSeriesMetricDeltas",
"with",
"values",
"."
] | eb68d72ba4c01fe018dc981097dbee033908f5c7 | https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/expr/src/main/java/com/groupon/lex/metrics/MetricMatcher.java#L85-L88 |
43,379 | threerings/nenya | core/src/main/java/com/threerings/media/image/ColorUtil.java | ColorUtil.blend | public static final Color blend (Color c1, Color c2)
{
return new Color((c1.getRed() + c2.getRed()) >> 1,
(c1.getGreen() + c2.getGreen()) >> 1,
(c1.getBlue() + c2.getBlue()) >> 1);
} | java | public static final Color blend (Color c1, Color c2)
{
return new Color((c1.getRed() + c2.getRed()) >> 1,
(c1.getGreen() + c2.getGreen()) >> 1,
(c1.getBlue() + c2.getBlue()) >> 1);
} | [
"public",
"static",
"final",
"Color",
"blend",
"(",
"Color",
"c1",
",",
"Color",
"c2",
")",
"{",
"return",
"new",
"Color",
"(",
"(",
"c1",
".",
"getRed",
"(",
")",
"+",
"c2",
".",
"getRed",
"(",
")",
")",
">>",
"1",
",",
"(",
"c1",
".",
"getGre... | Blends the two supplied colors.
@return a color halfway between the two colors. | [
"Blends",
"the",
"two",
"supplied",
"colors",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/ColorUtil.java#L34-L39 |
43,380 | threerings/nenya | core/src/main/java/com/threerings/media/image/ColorUtil.java | ColorUtil.blend | public static final Color blend (Color c1, Color c2, float firstperc)
{
float p2 = 1.0f - firstperc;
return new Color((int) (c1.getRed() * firstperc + c2.getRed() * p2),
(int) (c1.getGreen() * firstperc + c2.getGreen() * p2),
(int) (c1.getBlue() * firstperc + c2.get... | java | public static final Color blend (Color c1, Color c2, float firstperc)
{
float p2 = 1.0f - firstperc;
return new Color((int) (c1.getRed() * firstperc + c2.getRed() * p2),
(int) (c1.getGreen() * firstperc + c2.getGreen() * p2),
(int) (c1.getBlue() * firstperc + c2.get... | [
"public",
"static",
"final",
"Color",
"blend",
"(",
"Color",
"c1",
",",
"Color",
"c2",
",",
"float",
"firstperc",
")",
"{",
"float",
"p2",
"=",
"1.0f",
"-",
"firstperc",
";",
"return",
"new",
"Color",
"(",
"(",
"int",
")",
"(",
"c1",
".",
"getRed",
... | Blends the two supplied colors, using the supplied percentage
as the amount of the first color to use.
@param firstperc The percentage of the first color to use, from 0.0f
to 1.0f inclusive. | [
"Blends",
"the",
"two",
"supplied",
"colors",
"using",
"the",
"supplied",
"percentage",
"as",
"the",
"amount",
"of",
"the",
"first",
"color",
"to",
"use",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/ColorUtil.java#L48-L54 |
43,381 | jdillon/gshell | gshell-core/src/main/java/com/planet57/gshell/MainSupport.java | MainSupport.setupLogging | protected void setupLogging(@Nullable final Level level) {
// install JUL adapter
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();
// conifgure gossip bootstrap loggers with target factory
Log.configure(LoggerFactory.getILoggerFactory());
log.debug("Logging setup;... | java | protected void setupLogging(@Nullable final Level level) {
// install JUL adapter
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();
// conifgure gossip bootstrap loggers with target factory
Log.configure(LoggerFactory.getILoggerFactory());
log.debug("Logging setup;... | [
"protected",
"void",
"setupLogging",
"(",
"@",
"Nullable",
"final",
"Level",
"level",
")",
"{",
"// install JUL adapter",
"SLF4JBridgeHandler",
".",
"removeHandlersForRootLogger",
"(",
")",
";",
"SLF4JBridgeHandler",
".",
"install",
"(",
")",
";",
"// conifgure gossip... | Setup logging environment. | [
"Setup",
"logging",
"environment",
"."
] | b587c1a4672d2e4905871462fa3b38a1f7b94e90 | https://github.com/jdillon/gshell/blob/b587c1a4672d2e4905871462fa3b38a1f7b94e90/gshell-core/src/main/java/com/planet57/gshell/MainSupport.java#L258-L266 |
43,382 | threerings/nenya | core/src/main/java/com/threerings/media/animation/AnimationWaiter.java | AnimationWaiter.addAnimations | public void addAnimations (Animation[] anims)
{
int acount = anims.length;
for (int ii = 0; ii < acount; ii++) {
addAnimation(anims[ii]);
}
} | java | public void addAnimations (Animation[] anims)
{
int acount = anims.length;
for (int ii = 0; ii < acount; ii++) {
addAnimation(anims[ii]);
}
} | [
"public",
"void",
"addAnimations",
"(",
"Animation",
"[",
"]",
"anims",
")",
"{",
"int",
"acount",
"=",
"anims",
".",
"length",
";",
"for",
"(",
"int",
"ii",
"=",
"0",
";",
"ii",
"<",
"acount",
";",
"ii",
"++",
")",
"{",
"addAnimation",
"(",
"anims... | Adds the supplied animations to the animation waiter for
observation. | [
"Adds",
"the",
"supplied",
"animations",
"to",
"the",
"animation",
"waiter",
"for",
"observation",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/animation/AnimationWaiter.java#L45-L51 |
43,383 | threerings/nenya | core/src/main/java/com/threerings/openal/SoundManager.java | SoundManager.createSoundManager | public static SoundManager createSoundManager (RunQueue rqueue)
{
if (_soundmgr != null) {
throw new IllegalStateException("A sound manager has already been created.");
}
_soundmgr = new SoundManager(rqueue);
return _soundmgr;
} | java | public static SoundManager createSoundManager (RunQueue rqueue)
{
if (_soundmgr != null) {
throw new IllegalStateException("A sound manager has already been created.");
}
_soundmgr = new SoundManager(rqueue);
return _soundmgr;
} | [
"public",
"static",
"SoundManager",
"createSoundManager",
"(",
"RunQueue",
"rqueue",
")",
"{",
"if",
"(",
"_soundmgr",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"A sound manager has already been created.\"",
")",
";",
"}",
"_soundmgr",
... | Creates, initializes and returns the singleton sound manager instance.
@param rqueue a queue that the sound manager can use to post short runnables that must be
executed on the same thread from which all other sound methods will be called. | [
"Creates",
"initializes",
"and",
"returns",
"the",
"singleton",
"sound",
"manager",
"instance",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundManager.java#L66-L73 |
43,384 | threerings/nenya | core/src/main/java/com/threerings/openal/SoundManager.java | SoundManager.updateStreams | public void updateStreams (float time)
{
// iterate backwards through the list so that streams can dispose of themselves during
// their update
for (int ii = _streams.size() - 1; ii >= 0; ii--) {
_streams.get(ii).update(time);
}
// delete any finalized objects
... | java | public void updateStreams (float time)
{
// iterate backwards through the list so that streams can dispose of themselves during
// their update
for (int ii = _streams.size() - 1; ii >= 0; ii--) {
_streams.get(ii).update(time);
}
// delete any finalized objects
... | [
"public",
"void",
"updateStreams",
"(",
"float",
"time",
")",
"{",
"// iterate backwards through the list so that streams can dispose of themselves during",
"// their update",
"for",
"(",
"int",
"ii",
"=",
"_streams",
".",
"size",
"(",
")",
"-",
"1",
";",
"ii",
">=",
... | Updates all of the streams controlled by the manager. This should be called once per frame
by the application.
@param time the number of seconds elapsed since the last update | [
"Updates",
"all",
"of",
"the",
"streams",
"controlled",
"by",
"the",
"manager",
".",
"This",
"should",
"be",
"called",
"once",
"per",
"frame",
"by",
"the",
"application",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundManager.java#L166-L176 |
43,385 | threerings/nenya | core/src/main/java/com/threerings/openal/SoundManager.java | SoundManager.loadClip | public void loadClip (ClipProvider provider, String path, Observer observer)
{
getClip(provider, path, observer);
} | java | public void loadClip (ClipProvider provider, String path, Observer observer)
{
getClip(provider, path, observer);
} | [
"public",
"void",
"loadClip",
"(",
"ClipProvider",
"provider",
",",
"String",
"path",
",",
"Observer",
"observer",
")",
"{",
"getClip",
"(",
"provider",
",",
"path",
",",
"observer",
")",
";",
"}"
] | Loads a clip buffer for the sound clip loaded via the specified provider with the
specified path. The loaded clip is placed in the cache. | [
"Loads",
"a",
"clip",
"buffer",
"for",
"the",
"sound",
"clip",
"loaded",
"via",
"the",
"specified",
"provider",
"with",
"the",
"specified",
"path",
".",
"The",
"loaded",
"clip",
"is",
"placed",
"in",
"the",
"cache",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundManager.java#L191-L194 |
43,386 | threerings/nenya | core/src/main/java/com/threerings/openal/SoundManager.java | SoundManager.deleteFinalizedObjects | protected synchronized void deleteFinalizedObjects ()
{
if (_finalizedSources != null) {
IntBuffer idbuf = BufferUtils.createIntBuffer(_finalizedSources.length);
idbuf.put(_finalizedSources).rewind();
AL10.alDeleteSources(idbuf);
_finalizedSources = null;
... | java | protected synchronized void deleteFinalizedObjects ()
{
if (_finalizedSources != null) {
IntBuffer idbuf = BufferUtils.createIntBuffer(_finalizedSources.length);
idbuf.put(_finalizedSources).rewind();
AL10.alDeleteSources(idbuf);
_finalizedSources = null;
... | [
"protected",
"synchronized",
"void",
"deleteFinalizedObjects",
"(",
")",
"{",
"if",
"(",
"_finalizedSources",
"!=",
"null",
")",
"{",
"IntBuffer",
"idbuf",
"=",
"BufferUtils",
".",
"createIntBuffer",
"(",
"_finalizedSources",
".",
"length",
")",
";",
"idbuf",
".... | Deletes all finalized objects. | [
"Deletes",
"all",
"finalized",
"objects",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundManager.java#L369-L383 |
43,387 | threerings/nenya | core/src/main/java/com/threerings/media/animation/FloatingTextAnimation.java | FloatingTextAnimation.paintLabels | protected void paintLabels (Graphics2D gfx, int x, int y)
{
_label.render(gfx, x, y);
} | java | protected void paintLabels (Graphics2D gfx, int x, int y)
{
_label.render(gfx, x, y);
} | [
"protected",
"void",
"paintLabels",
"(",
"Graphics2D",
"gfx",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"_label",
".",
"render",
"(",
"gfx",
",",
"x",
",",
"y",
")",
";",
"}"
] | Derived classes may wish to extend score animation and render more than just the standard
single label.
@param x the upper left coordinate of the animation.
@param y the upper left coordinate of the animation. | [
"Derived",
"classes",
"may",
"wish",
"to",
"extend",
"score",
"animation",
"and",
"render",
"more",
"than",
"just",
"the",
"standard",
"single",
"label",
"."
] | 3165a012fd859009db3367f87bd2a5b820cc760a | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/animation/FloatingTextAnimation.java#L195-L198 |
43,388 | ckpoint/CheckPoint | src/main/java/hsim/checkpoint/core/store/ValidationDataGroup.java | ValidationDataGroup.addRule | public void addRule(ValidationData vd) {
this.rules.addAll(vd.getValidationRules().stream().filter(vr -> vr.isUse()).collect(Collectors.toList()));
} | java | public void addRule(ValidationData vd) {
this.rules.addAll(vd.getValidationRules().stream().filter(vr -> vr.isUse()).collect(Collectors.toList()));
} | [
"public",
"void",
"addRule",
"(",
"ValidationData",
"vd",
")",
"{",
"this",
".",
"rules",
".",
"addAll",
"(",
"vd",
".",
"getValidationRules",
"(",
")",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"vr",
"->",
"vr",
".",
"isUse",
"(",
")",
")",
"."... | Add rule.
@param vd the vd | [
"Add",
"rule",
"."
] | 2c2b1a87a88485d49ea6afa34acdf16ef4134f19 | https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/store/ValidationDataGroup.java#L36-L38 |
43,389 | ckpoint/CheckPoint | src/main/java/hsim/checkpoint/core/store/ValidationDataGroup.java | ValidationDataGroup.initDataGroup | public void initDataGroup(ParamType paramType, List<ValidationData> lists) {
this.paramType = paramType;
lists.forEach(vd -> {
this.addRule(vd);
});
} | java | public void initDataGroup(ParamType paramType, List<ValidationData> lists) {
this.paramType = paramType;
lists.forEach(vd -> {
this.addRule(vd);
});
} | [
"public",
"void",
"initDataGroup",
"(",
"ParamType",
"paramType",
",",
"List",
"<",
"ValidationData",
">",
"lists",
")",
"{",
"this",
".",
"paramType",
"=",
"paramType",
";",
"lists",
".",
"forEach",
"(",
"vd",
"->",
"{",
"this",
".",
"addRule",
"(",
"vd... | Init data group.
@param paramType the param type
@param lists the lists | [
"Init",
"data",
"group",
"."
] | 2c2b1a87a88485d49ea6afa34acdf16ef4134f19 | https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/store/ValidationDataGroup.java#L46-L53 |
43,390 | WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor | MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/map/GoogleV3MapWidget.java | GoogleV3MapWidget.addMapZoomEndHandler | @Override
public HandlerRegistration addMapZoomEndHandler(final Runnable zoomHandler){
return mapWidget.addZoomChangeHandler(zoomChangeMapEvent -> zoomHandler.run());
} | java | @Override
public HandlerRegistration addMapZoomEndHandler(final Runnable zoomHandler){
return mapWidget.addZoomChangeHandler(zoomChangeMapEvent -> zoomHandler.run());
} | [
"@",
"Override",
"public",
"HandlerRegistration",
"addMapZoomEndHandler",
"(",
"final",
"Runnable",
"zoomHandler",
")",
"{",
"return",
"mapWidget",
".",
"addZoomChangeHandler",
"(",
"zoomChangeMapEvent",
"->",
"zoomHandler",
".",
"run",
"(",
")",
")",
";",
"}"
] | Add zoom handler, event is not exposed at present
@param zoomHandler runnable zoom handler | [
"Add",
"zoom",
"handler",
"event",
"is",
"not",
"exposed",
"at",
"present"
] | 224280bcd6e8045bda6b673584caf0aea5e4c841 | https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/map/GoogleV3MapWidget.java#L215-L218 |
43,391 | OpenCompare/OpenCompare | org.opencompare/pcmdata-importers/src/main/java/JSONformating/model/JProduct.java | JProduct.sameProduct | public boolean sameProduct(JProduct p, Map<String, String> featLinks, boolean exactContent) {
List<JCell> tempCells = new ArrayList<>(this.cells);
if(p.getCells().size() != this.cells.size()){
return false;
}
for(JCell pC : p.getCells()){
for(JCell thisC: this.cells){
if(tempCells.contains(thisC)){
... | java | public boolean sameProduct(JProduct p, Map<String, String> featLinks, boolean exactContent) {
List<JCell> tempCells = new ArrayList<>(this.cells);
if(p.getCells().size() != this.cells.size()){
return false;
}
for(JCell pC : p.getCells()){
for(JCell thisC: this.cells){
if(tempCells.contains(thisC)){
... | [
"public",
"boolean",
"sameProduct",
"(",
"JProduct",
"p",
",",
"Map",
"<",
"String",
",",
"String",
">",
"featLinks",
",",
"boolean",
"exactContent",
")",
"{",
"List",
"<",
"JCell",
">",
"tempCells",
"=",
"new",
"ArrayList",
"<>",
"(",
"this",
".",
"cell... | Compares cells of both products omitting ids
@param p the product to compare
@param featLinks the links between the features of the 2 JSONFormat objects
@param exactContent
@return true if cells of both products are the same, omits ids | [
"Compares",
"cells",
"of",
"both",
"products",
"omitting",
"ids"
] | 6cd776466b375cb8ecca08fcd94e573d65e20b14 | https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/pcmdata-importers/src/main/java/JSONformating/model/JProduct.java#L34-L52 |
43,392 | ckpoint/CheckPoint | src/main/java/hsim/checkpoint/util/AnnotationUtil.java | AnnotationUtil.getAnnotation | public static Annotation getAnnotation(Annotation[] annotations, Class<?> annotationClass) {
return Arrays.stream(annotations).filter(annotation -> annotation.annotationType().equals(annotationClass)).findFirst().orElse(null);
} | java | public static Annotation getAnnotation(Annotation[] annotations, Class<?> annotationClass) {
return Arrays.stream(annotations).filter(annotation -> annotation.annotationType().equals(annotationClass)).findFirst().orElse(null);
} | [
"public",
"static",
"Annotation",
"getAnnotation",
"(",
"Annotation",
"[",
"]",
"annotations",
",",
"Class",
"<",
"?",
">",
"annotationClass",
")",
"{",
"return",
"Arrays",
".",
"stream",
"(",
"annotations",
")",
".",
"filter",
"(",
"annotation",
"->",
"anno... | Gets annotation.
@param annotations the annotations
@param annotationClass the annotation class
@return the annotation | [
"Gets",
"annotation",
"."
] | 2c2b1a87a88485d49ea6afa34acdf16ef4134f19 | https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/AnnotationUtil.java#L18-L20 |
43,393 | ckpoint/CheckPoint | src/main/java/hsim/checkpoint/core/store/ValidationStore.java | ValidationStore.getValidationDatas | public List<ValidationData> getValidationDatas(ParamType paramType, String key) {
if (this.urlMap == null || this.validationDataRuleListMap == null) {
log.info("url map is empty :: " + key );
return null;
}
if (key == null || paramType == null) {
throw new Va... | java | public List<ValidationData> getValidationDatas(ParamType paramType, String key) {
if (this.urlMap == null || this.validationDataRuleListMap == null) {
log.info("url map is empty :: " + key );
return null;
}
if (key == null || paramType == null) {
throw new Va... | [
"public",
"List",
"<",
"ValidationData",
">",
"getValidationDatas",
"(",
"ParamType",
"paramType",
",",
"String",
"key",
")",
"{",
"if",
"(",
"this",
".",
"urlMap",
"==",
"null",
"||",
"this",
".",
"validationDataRuleListMap",
"==",
"null",
")",
"{",
"log",
... | Gets validation datas.
@param paramType the param type
@param key the key
@return the validation datas | [
"Gets",
"validation",
"datas",
"."
] | 2c2b1a87a88485d49ea6afa34acdf16ef4134f19 | https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/store/ValidationStore.java#L83-L100 |
43,394 | ckpoint/CheckPoint | src/main/java/hsim/checkpoint/core/component/validationRule/rule/AssistType.java | AssistType.all | public static AssistType all() {
AssistType assistType = new AssistType();
assistType.nullable = true;
assistType.string = true;
assistType.number = true;
assistType.enumType = true;
assistType.list = true;
assistType.obj = true;
return assistType;
} | java | public static AssistType all() {
AssistType assistType = new AssistType();
assistType.nullable = true;
assistType.string = true;
assistType.number = true;
assistType.enumType = true;
assistType.list = true;
assistType.obj = true;
return assistType;
} | [
"public",
"static",
"AssistType",
"all",
"(",
")",
"{",
"AssistType",
"assistType",
"=",
"new",
"AssistType",
"(",
")",
";",
"assistType",
".",
"nullable",
"=",
"true",
";",
"assistType",
".",
"string",
"=",
"true",
";",
"assistType",
".",
"number",
"=",
... | All assist type.
@return the assist type | [
"All",
"assist",
"type",
"."
] | 2c2b1a87a88485d49ea6afa34acdf16ef4134f19 | https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/component/validationRule/rule/AssistType.java#L24-L33 |
43,395 | ckpoint/CheckPoint | src/main/java/hsim/checkpoint/core/component/DetailParam.java | DetailParam.getReqUrls | public List<ReqUrl> getReqUrls() {
String url = this.getClassMappingUrl(this.getParentClass());
RequestAnnotation requestAnnotation = new RequestAnnotation(this.getParentMethod());
url += this.getRequestMappingUrl(requestAnnotation.getValue());
List<ReqUrl> list = new ArrayList<>();
... | java | public List<ReqUrl> getReqUrls() {
String url = this.getClassMappingUrl(this.getParentClass());
RequestAnnotation requestAnnotation = new RequestAnnotation(this.getParentMethod());
url += this.getRequestMappingUrl(requestAnnotation.getValue());
List<ReqUrl> list = new ArrayList<>();
... | [
"public",
"List",
"<",
"ReqUrl",
">",
"getReqUrls",
"(",
")",
"{",
"String",
"url",
"=",
"this",
".",
"getClassMappingUrl",
"(",
"this",
".",
"getParentClass",
"(",
")",
")",
";",
"RequestAnnotation",
"requestAnnotation",
"=",
"new",
"RequestAnnotation",
"(",
... | Gets req urls.
@return the req urls | [
"Gets",
"req",
"urls",
"."
] | 2c2b1a87a88485d49ea6afa34acdf16ef4134f19 | https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/component/DetailParam.java#L78-L91 |
43,396 | OpenCompare/OpenCompare | org.opencompare/pcmdata-importers/src/main/java/JSONformating/model/JSONFormat.java | JSONFormat.sameJSONFormat | public boolean sameJSONFormat(JSONFormat jf){
Map<String,String> featLinks = new HashMap<>();
if(!this.name.equals(jf.name) || !this.creator.equals(jf.creator) || !this.license.equals(jf.license) || !this.source.equals(jf.source)){
return false;
}else if(!this.sameFeatures(jf, featLinks)){
System.out.print... | java | public boolean sameJSONFormat(JSONFormat jf){
Map<String,String> featLinks = new HashMap<>();
if(!this.name.equals(jf.name) || !this.creator.equals(jf.creator) || !this.license.equals(jf.license) || !this.source.equals(jf.source)){
return false;
}else if(!this.sameFeatures(jf, featLinks)){
System.out.print... | [
"public",
"boolean",
"sameJSONFormat",
"(",
"JSONFormat",
"jf",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"featLinks",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
"name",
".",
"equals",
"(",
"jf",
".",
"name",
... | Checks if the JSONFormat in parameter is the same as this, omitting ids and jcell.jvalue.value content
@param jf the format to compare
@return true if this and jf are the same, omits ids | [
"Checks",
"if",
"the",
"JSONFormat",
"in",
"parameter",
"is",
"the",
"same",
"as",
"this",
"omitting",
"ids",
"and",
"jcell",
".",
"jvalue",
".",
"value",
"content"
] | 6cd776466b375cb8ecca08fcd94e573d65e20b14 | https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/pcmdata-importers/src/main/java/JSONformating/model/JSONFormat.java#L395-L407 |
43,397 | WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor | SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DefaultLocalJSONDataProvider.java | DefaultLocalJSONDataProvider.validateFacetFields | private void validateFacetFields(String[] facetFieldList) {
if(facetFieldList == null || facetFieldList.length == 0){
return;
}
for (String facetfield : facetFieldList){
if(schema.getColumnIndex(facetfield) < 0){
throw new IllegalArgumentException("Facet f... | java | private void validateFacetFields(String[] facetFieldList) {
if(facetFieldList == null || facetFieldList.length == 0){
return;
}
for (String facetfield : facetFieldList){
if(schema.getColumnIndex(facetfield) < 0){
throw new IllegalArgumentException("Facet f... | [
"private",
"void",
"validateFacetFields",
"(",
"String",
"[",
"]",
"facetFieldList",
")",
"{",
"if",
"(",
"facetFieldList",
"==",
"null",
"||",
"facetFieldList",
".",
"length",
"==",
"0",
")",
"{",
"return",
";",
"}",
"for",
"(",
"String",
"facetfield",
":... | Check each facet field is present in schema.
@param facetFieldList an array of facet fields | [
"Check",
"each",
"facet",
"field",
"is",
"present",
"in",
"schema",
"."
] | 224280bcd6e8045bda6b673584caf0aea5e4c841 | https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DefaultLocalJSONDataProvider.java#L136-L146 |
43,398 | WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor | SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DefaultLocalJSONDataProvider.java | DefaultLocalJSONDataProvider.calculateFacetList | private FacetList calculateFacetList(AbstractDataTable table, String[] facetFields) {
if(facetFields == null || facetFields.length == 0){
throw new NullPointerException("Facet field list empty");
}
FacetList facetList = new FacetList();
for (String facetField : facetFields) ... | java | private FacetList calculateFacetList(AbstractDataTable table, String[] facetFields) {
if(facetFields == null || facetFields.length == 0){
throw new NullPointerException("Facet field list empty");
}
FacetList facetList = new FacetList();
for (String facetField : facetFields) ... | [
"private",
"FacetList",
"calculateFacetList",
"(",
"AbstractDataTable",
"table",
",",
"String",
"[",
"]",
"facetFields",
")",
"{",
"if",
"(",
"facetFields",
"==",
"null",
"||",
"facetFields",
".",
"length",
"==",
"0",
")",
"{",
"throw",
"new",
"NullPointerExce... | facet field -> list of facet field values
@param table gwt datatable as internal table data source
@param facetFields list of field to calculate facet values for | [
"facet",
"field",
"-",
">",
"list",
"of",
"facet",
"field",
"values"
] | 224280bcd6e8045bda6b673584caf0aea5e4c841 | https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DefaultLocalJSONDataProvider.java#L304-L314 |
43,399 | WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor | SurveyorCore/src/main/java/org/wwarn/surveyor/client/mvp/SimpleClientFactory.java | SimpleClientFactory.getDataProvider | public DataProvider getDataProvider(){
if(this.dataProvider == null){
// EventLogger.logEvent("org.wwarn.surveyor.client.mvp.SimpleClientFactory", "getDataProvider", "begin");
// EventLogger.logEvent("org.wwarn.surveyor.client.mvp.SimpleClientFactory", "getSchema", "begin");
D... | java | public DataProvider getDataProvider(){
if(this.dataProvider == null){
// EventLogger.logEvent("org.wwarn.surveyor.client.mvp.SimpleClientFactory", "getDataProvider", "begin");
// EventLogger.logEvent("org.wwarn.surveyor.client.mvp.SimpleClientFactory", "getSchema", "begin");
D... | [
"public",
"DataProvider",
"getDataProvider",
"(",
")",
"{",
"if",
"(",
"this",
".",
"dataProvider",
"==",
"null",
")",
"{",
"// EventLogger.logEvent(\"org.wwarn.surveyor.client.mvp.SimpleClientFactory\", \"getDataProvider\", \"begin\");",
"// EventLogger.logEven... | Lazy initialise Dataprovider
@return DataProvider | [
"Lazy",
"initialise",
"Dataprovider"
] | 224280bcd6e8045bda6b673584caf0aea5e4c841 | https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/mvp/SimpleClientFactory.java#L99-L139 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.