docstring_tokens
list | code_tokens
list |
---|---|
[
"<",
"p",
">",
"the",
"type",
"of",
"incompatibility",
"<",
"/",
"p",
">",
"<",
"p",
">",
"allowed",
"values",
"include",
":",
"<",
"/",
"p",
">",
"<",
"ul",
">",
"<",
"li",
">",
"<",
"p",
">",
"arn",
":",
"the",
"arn",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"form",
"factor",
":",
"the",
"form",
"factor",
"(",
"for",
"example",
"phone",
"or",
"tablet",
")",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"manufacturer",
":",
"the",
"manufacturer",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"platform",
":",
"the",
"platform",
"(",
"for",
"example",
"android",
"or",
"i",
"o",
"s",
")",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"remote",
"access",
"enabled",
":",
"whether",
"the",
"device",
"is",
"enabled",
"for",
"remote",
"access",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"appium",
"version",
":",
"the",
"appium",
"version",
"for",
"the",
"test",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"/",
"ul",
">"
]
| [
"set",
"type",
"(",
"type",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"type",
"of",
"incompatibility",
"<",
"/",
"p",
">",
"<",
"p",
">",
"allowed",
"values",
"include",
":",
"<",
"/",
"p",
">",
"<",
"ul",
">",
"<",
"li",
">",
"<",
"p",
">",
"arn",
":",
"the",
"arn",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"form",
"factor",
":",
"the",
"form",
"factor",
"(",
"for",
"example",
"phone",
"or",
"tablet",
")",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"manufacturer",
":",
"the",
"manufacturer",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"platform",
":",
"the",
"platform",
"(",
"for",
"example",
"android",
"or",
"i",
"o",
"s",
")",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"remote",
"access",
"enabled",
":",
"whether",
"the",
"device",
"is",
"enabled",
"for",
"remote",
"access",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"appium",
"version",
":",
"the",
"appium",
"version",
"for",
"the",
"test",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"/",
"ul",
">"
]
| [
"with",
"type",
"(",
"type",
")",
";"
]
|
[
"<",
"p",
">",
"the",
"type",
"of",
"incompatibility",
"<",
"/",
"p",
">",
"<",
"p",
">",
"allowed",
"values",
"include",
":",
"<",
"/",
"p",
">",
"<",
"ul",
">",
"<",
"li",
">",
"<",
"p",
">",
"arn",
":",
"the",
"arn",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"form",
"factor",
":",
"the",
"form",
"factor",
"(",
"for",
"example",
"phone",
"or",
"tablet",
")",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"manufacturer",
":",
"the",
"manufacturer",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"platform",
":",
"the",
"platform",
"(",
"for",
"example",
"android",
"or",
"i",
"o",
"s",
")",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"remote",
"access",
"enabled",
":",
"whether",
"the",
"device",
"is",
"enabled",
"for",
"remote",
"access",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"appium",
"version",
":",
"the",
"appium",
"version",
"for",
"the",
"test",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"/",
"ul",
">"
]
| [
"this",
"type",
"=",
"type",
"to",
"string",
"(",
")",
";",
"return",
"this",
";"
]
|
[
"return",
"a",
"new",
"instance",
"of",
"this",
"class",
"with",
"iteration",
"order",
"defined",
"as",
"the",
"order",
"in",
"which",
"entries",
"were",
"added"
]
| [
"return",
"new",
"identity",
"map",
"<",
"k",
",",
"v",
">",
"(",
"new",
"linked",
"hash",
"map",
"<",
"identity",
"key",
"<",
"k",
">",
",",
"v",
">",
"(",
"size",
")",
")",
";"
]
|
[
"return",
"the",
"map",
"entries",
"(",
"as",
"instances",
"of",
"<",
"tt",
">",
"map",
"entry",
"<",
"/",
"tt",
">",
"in",
"a",
"collection",
"that",
"is",
"safe",
"from",
"concurrent",
"modification",
")",
"ie",
"we",
"may",
"safely",
"add",
"new",
"instances",
"to",
"the",
"underlying",
"<",
"tt",
">",
"map",
"<",
"/",
"tt",
">",
"during",
"iteration",
"of",
"the",
"<",
"tt",
">",
"entries",
"(",
")",
"<",
"/",
"tt",
">"
]
| [
"return",
"(",
"(",
"identity",
"map",
"<",
"k",
",",
"v",
">",
")",
"map",
")",
"entry",
"array",
"(",
")",
";"
]
|
[
"{"
]
| []
|
[
"construct",
"a",
"synchronous",
"implementation",
"of",
"amazon",
"dynamo",
"d",
"b",
"using",
"the",
"current",
"builder",
"configuration"
]
| [
"if",
"(",
"endpoint",
"discovery",
"enabled",
"(",
")",
"&",
"&",
"get",
"endpoint",
"(",
")",
"=",
"=",
"null",
")",
"{",
"return",
"new",
"amazon",
"dynamo",
"d",
"b",
"client",
"(",
"params",
",",
"true",
")",
";",
"}",
"return",
"new",
"amazon",
"dynamo",
"d",
"b",
"client",
"(",
"params",
")",
";"
]
|
[
"at",
"the",
"time",
"when",
"the",
"constructor",
"runs",
"the",
"power",
"manager",
"has",
"not",
"yet",
"been",
"initialized",
"so",
"we",
"initialize",
"the",
"low",
"power",
"observer",
"later"
]
| [
"final",
"power",
"manager",
"internal",
"power",
"mgr",
"=",
"local",
"services",
"get",
"service",
"(",
"power",
"manager",
"internal",
"class",
")",
";",
"power",
"mgr",
"register",
"low",
"power",
"mode",
"observer",
"(",
"this",
")",
";",
"synchronized",
"(",
"m",
"stats",
")",
"{",
"m",
"stats",
"note",
"power",
"save",
"mode",
"locked",
"(",
"power",
"mgr",
"get",
"low",
"power",
"state",
"(",
"service",
"type",
"battery",
"stats",
")",
"battery",
"saver",
"enabled",
")",
";",
"}",
"(",
"new",
"wakeup",
"reason",
"thread",
"(",
")",
")",
"start",
"(",
")",
";"
]
|
[
"schedules",
"a",
"write",
"to",
"disk",
"to",
"occur",
"this",
"will",
"cause",
"the",
"battery",
"stats",
"impl",
"object",
"to",
"update",
"with",
"the",
"latest",
"info",
"then",
"write",
"to",
"disk"
]
| [
"m",
"worker",
"schedule",
"write",
"(",
")",
";"
]
|
[
"remove",
"a",
"uid",
"from",
"the",
"battery",
"stats",
"and",
"battery",
"stats",
"external",
"dependencies"
]
| [
"synchronized",
"(",
"m",
"stats",
")",
"{",
"m",
"stats",
"remove",
"uid",
"stats",
"locked",
"(",
"uid",
")",
";",
"}"
]
|
[
"gets",
"a",
"snapshot",
"of",
"cellular",
"stats"
]
| [
"synchronized",
"(",
"m",
"stats",
")",
"{",
"return",
"m",
"stats",
"get",
"cellular",
"battery",
"stats",
"(",
")",
";",
"}"
]
|
[
"gets",
"a",
"snapshot",
"of",
"wifi",
"stats"
]
| [
"synchronized",
"(",
"m",
"stats",
")",
"{",
"return",
"m",
"stats",
"get",
"wifi",
"battery",
"stats",
"(",
")",
";",
"}"
]
|
[
"gets",
"a",
"snapshot",
"of",
"gps",
"stats"
]
| [
"synchronized",
"(",
"m",
"stats",
")",
"{",
"return",
"m",
"stats",
"get",
"gps",
"battery",
"stats",
"(",
")",
";",
"}"
]
|
[
"returns",
"whether",
"the",
"binder",
"get",
"calling",
"uid",
"is",
"the",
"only",
"thing",
"in",
"request",
"uids"
]
| [
"final",
"int",
"caller",
"=",
"binder",
"get",
"calling",
"uid",
"(",
")",
";",
"final",
"int",
"n",
"=",
"request",
"uids",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"i",
"+",
"+",
")",
"{",
"if",
"(",
"request",
"uids",
"[",
"i",
"]",
"!",
"=",
"caller",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";"
]
|
[
"gets",
"a",
"health",
"stats",
"parceler",
"for",
"the",
"given",
"uid",
"you",
"should",
"probably",
"call",
"update",
"external",
"stats",
"sync",
"first"
]
| [
"final",
"health",
"stats",
"battery",
"stats",
"writer",
"writer",
"=",
"new",
"health",
"stats",
"battery",
"stats",
"writer",
"(",
")",
";",
"final",
"health",
"stats",
"writer",
"uid",
"writer",
"=",
"new",
"health",
"stats",
"writer",
"(",
"uid",
"health",
"stats",
"constants",
")",
";",
"final",
"battery",
"stats",
"uid",
"uid",
"=",
"m",
"stats",
"get",
"uid",
"stats",
"(",
")",
"get",
"(",
"request",
"uid",
")",
";",
"if",
"(",
"uid",
"!",
"=",
"null",
")",
"{",
"writer",
"write",
"uid",
"(",
"uid",
"writer",
",",
"m",
"stats",
",",
"uid",
")",
";",
"}",
"return",
"new",
"health",
"stats",
"parceler",
"(",
"uid",
"writer",
")",
";"
]
|
[
"-",
"-",
"-",
"[",
"egl",
"create",
"image",
"k",
"h",
"r",
"]",
"-",
"-",
"-"
]
| [
"long",
"function",
"address",
"=",
"egl",
"get",
"capabilities",
"(",
")",
"egl",
"create",
"image",
"k",
"h",
"r",
";",
"if",
"(",
"checks",
")",
"{",
"check",
"(",
"function",
"address",
")",
";",
"check",
"(",
"dpy",
")",
";",
"check",
"(",
"ctx",
")",
";",
"check",
"(",
"buffer",
")",
";",
"}",
"return",
"call",
"p",
"p",
"p",
"p",
"p",
"(",
"function",
"address",
",",
"dpy",
",",
"ctx",
",",
"target",
",",
"buffer",
",",
"attrib",
"list",
")",
";"
]
|
[
"<",
"p",
">",
"the",
"name",
"of",
"a",
"an",
"<",
"a",
">",
"sdk",
"type",
"<",
"/",
"a",
">",
"configuration",
"property",
"<",
"/",
"p",
">"
]
| [
"set",
"name",
"(",
"name",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"user",
"-",
"friendly",
"name",
"of",
"an",
"<",
"a",
">",
"sdk",
"type",
"<",
"/",
"a",
">",
"configuration",
"property",
"<",
"/",
"p",
">"
]
| [
"set",
"friendly",
"name",
"(",
"friendly",
"name",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"description",
"of",
"an",
"<",
"a",
">",
"sdk",
"type",
"<",
"/",
"a",
">",
"configuration",
"property",
"<",
"/",
"p",
">"
]
| [
"set",
"description",
"(",
"description",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"a",
"boolean",
"flag",
"of",
"an",
"<",
"a",
">",
"sdk",
"type",
"<",
"/",
"a",
">",
"configuration",
"property",
"to",
"indicate",
"if",
"the",
"associated",
"sdk",
"configuration",
"property",
"is",
"required",
"(",
"<",
"code",
">",
"true",
"<",
"/",
"code",
">",
")",
"or",
"not",
"(",
"<",
"code",
">",
"false",
"<",
"/",
"code",
">",
")",
"<",
"/",
"p",
">"
]
| [
"set",
"required",
"(",
"required",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"default",
"value",
"of",
"an",
"<",
"a",
">",
"sdk",
"type",
"<",
"/",
"a",
">",
"configuration",
"property",
"<",
"/",
"p",
">"
]
| [
"set",
"default",
"value",
"(",
"default",
"value",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"information",
"about",
"the",
"tags",
"<",
"/",
"p",
">"
]
| [
"if",
"(",
"tag",
"descriptions",
"=",
"=",
"null",
")",
"{",
"tag",
"descriptions",
"=",
"new",
"com",
"amazonaws",
"internal",
"sdk",
"internal",
"list",
"<",
"tag",
"description",
">",
"(",
")",
";",
"}",
"return",
"tag",
"descriptions",
";"
]
|
[
"<",
"p",
">",
"information",
"about",
"the",
"tags",
"<",
"/",
"p",
">"
]
| [
"if",
"(",
"tag",
"descriptions",
"=",
"=",
"null",
")",
"{",
"this",
"tag",
"descriptions",
"=",
"null",
";",
"return",
";",
"}",
"this",
"tag",
"descriptions",
"=",
"new",
"com",
"amazonaws",
"internal",
"sdk",
"internal",
"list",
"<",
"tag",
"description",
">",
"(",
"tag",
"descriptions",
")",
";"
]
|
[
"<",
"p",
">",
"information",
"about",
"the",
"tags",
"<",
"/",
"p",
">",
"<",
"p",
">",
"<",
"b",
">",
"note",
":",
"<",
"/",
"b",
">",
"this",
"method",
"appends",
"the",
"values",
"to",
"the",
"existing",
"list",
"(",
"if",
"any",
")",
"use",
"{",
"@",
"link",
"#",
"set",
"tag",
"descriptions",
"(",
"java",
"util",
"collection",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"with",
"tag",
"descriptions",
"(",
"java",
"util",
"collection",
")",
"}",
"if",
"you",
"want",
"to",
"override",
"the",
"existing",
"values",
"<",
"/",
"p",
">"
]
| [
"if",
"(",
"this",
"tag",
"descriptions",
"=",
"=",
"null",
")",
"{",
"set",
"tag",
"descriptions",
"(",
"new",
"com",
"amazonaws",
"internal",
"sdk",
"internal",
"list",
"<",
"tag",
"description",
">",
"(",
"tag",
"descriptions",
"length",
")",
")",
";",
"}",
"for",
"(",
"tag",
"description",
"ele",
":",
"tag",
"descriptions",
")",
"{",
"this",
"tag",
"descriptions",
"add",
"(",
"ele",
")",
";",
"}",
"return",
"this",
";"
]
|
[
"the",
"method",
"computes",
"the",
"face",
"s",
"normal",
"vector"
]
| [
"vector",
"3f",
"result",
"=",
"new",
"vector",
"3f",
"(",
")",
";",
"for",
"(",
"integer",
"index",
":",
"face",
"get",
"indexes",
"(",
")",
")",
"{",
"result",
"add",
"local",
"(",
"face",
"get",
"temporal",
"mesh",
"(",
")",
"get",
"normals",
"(",
")",
"get",
"(",
"index",
")",
")",
";",
"}",
"result",
"divide",
"local",
"(",
"face",
"get",
"indexes",
"(",
")",
"size",
"(",
")",
")",
";",
"return",
"result",
";"
]
|
[
"the",
"method",
"computes",
"the",
"uv",
"coordinates",
"of",
"the",
"face",
"middle",
"point"
]
| [
"map",
"<",
"string",
",",
"vector",
"2f",
">",
"result",
"=",
"null",
";",
"map",
"<",
"string",
",",
"list",
"<",
"vector",
"2f",
">",
">",
"uv",
"sets",
"=",
"face",
"get",
"uv",
"sets",
"(",
")",
";",
"if",
"(",
"uv",
"sets",
"!",
"=",
"null",
"&",
"&",
"uv",
"sets",
"size",
"(",
")",
">",
"0",
")",
"{",
"result",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"vector",
"2f",
">",
"(",
"uv",
"sets",
"size",
"(",
")",
")",
";",
"for",
"(",
"entry",
"<",
"string",
",",
"list",
"<",
"vector",
"2f",
">",
">",
"entry",
":",
"uv",
"sets",
"entry",
"set",
"(",
")",
")",
"{",
"vector",
"2f",
"face",
"u",
"v",
"=",
"new",
"vector",
"2f",
"(",
")",
";",
"for",
"(",
"vector",
"2f",
"uv",
":",
"entry",
"get",
"value",
"(",
")",
")",
"{",
"face",
"u",
"v",
"add",
"local",
"(",
"uv",
")",
";",
"}",
"face",
"u",
"v",
"divide",
"local",
"(",
"entry",
"get",
"value",
"(",
")",
"size",
"(",
")",
")",
";",
"result",
"put",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"face",
"u",
"v",
")",
";",
"}",
"}",
"return",
"result",
";"
]
|
[
"the",
"mesh",
"interpolates",
"the",
"values",
"of",
"vertex",
"groups",
"weights",
"for",
"new",
"vertices"
]
| [
"map",
"<",
"string",
",",
"float",
">",
"weight",
"sums",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"float",
">",
"(",
")",
";",
"if",
"(",
"vertex",
"groups",
"size",
"(",
")",
">",
"0",
")",
"{",
"for",
"(",
"map",
"<",
"string",
",",
"float",
">",
"v",
"group",
":",
"vertex",
"groups",
")",
"{",
"for",
"(",
"entry",
"<",
"string",
",",
"float",
">",
"entry",
":",
"v",
"group",
"entry",
"set",
"(",
")",
")",
"{",
"if",
"(",
"weight",
"sums",
"contains",
"key",
"(",
"entry",
"get",
"key",
"(",
")",
")",
")",
"{",
"weight",
"sums",
"put",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"weight",
"sums",
"get",
"(",
"entry",
"get",
"key",
"(",
")",
")",
"+",
"entry",
"get",
"value",
"(",
")",
")",
";",
"}",
"else",
"{",
"weight",
"sums",
"put",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
")",
";",
"}",
"}",
"}",
"}",
"map",
"<",
"string",
",",
"float",
">",
"result",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"float",
">",
"(",
"weight",
"sums",
"size",
"(",
")",
")",
";",
"for",
"(",
"entry",
"<",
"string",
",",
"float",
">",
"entry",
":",
"weight",
"sums",
"entry",
"set",
"(",
")",
")",
"{",
"result",
"put",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
"/",
"vertex",
"groups",
"size",
"(",
")",
")",
";",
"}",
"return",
"result",
";"
]
|
[
"the",
"method",
"computes",
"the",
"vertex",
"groups",
"values",
"for",
"face",
"s",
"middle",
"point"
]
| [
"if",
"(",
"face",
"get",
"temporal",
"mesh",
"(",
")",
"get",
"vertex",
"groups",
"(",
")",
"size",
"(",
")",
">",
"0",
")",
"{",
"list",
"<",
"map",
"<",
"string",
",",
"float",
">",
">",
"vertex",
"groups",
"=",
"new",
"array",
"list",
"<",
"map",
"<",
"string",
",",
"float",
">",
">",
"(",
"face",
"get",
"indexes",
"(",
")",
"size",
"(",
")",
")",
";",
"for",
"(",
"integer",
"index",
":",
"face",
"get",
"indexes",
"(",
")",
")",
"{",
"vertex",
"groups",
"add",
"(",
"face",
"get",
"temporal",
"mesh",
"(",
")",
"get",
"vertex",
"groups",
"(",
")",
"get",
"(",
"index",
")",
")",
";",
"}",
"return",
"this",
"interpolate",
"vertex",
"groups",
"(",
"vertex",
"groups",
")",
";",
"}",
"return",
"new",
"hash",
"map",
"<",
"string",
",",
"float",
">",
"(",
")",
";"
]
|
[
"the",
"method",
"computes",
"face",
"s",
"middle",
"point",
"vertex",
"color"
]
| [
"if",
"(",
"face",
"get",
"vertex",
"colors",
"(",
")",
"!",
"=",
"null",
")",
"{",
"return",
"this",
"interpolate",
"vertex",
"colors",
"(",
"face",
"get",
"vertex",
"colors",
"(",
")",
"to",
"array",
"(",
"new",
"byte",
"[",
"face",
"get",
"vertex",
"colors",
"(",
")",
"size",
"(",
")",
"]",
"[",
"]",
")",
")",
";",
"}",
"return",
"null",
";"
]
|
[
"the",
"method",
"computes",
"the",
"average",
"value",
"for",
"the",
"given",
"vertex",
"colors"
]
| [
"texture",
"pixel",
"pixel",
"=",
"new",
"texture",
"pixel",
"(",
")",
";",
"texture",
"pixel",
"temp",
"=",
"new",
"texture",
"pixel",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"colors",
"length",
";",
"+",
"+",
"i",
")",
"{",
"temp",
"from",
"a",
"r",
"g",
"b",
"8",
"(",
"colors",
"[",
"i",
"]",
"[",
"3",
"]",
",",
"colors",
"[",
"i",
"]",
"[",
"0",
"]",
",",
"colors",
"[",
"i",
"]",
"[",
"1",
"]",
",",
"colors",
"[",
"i",
"]",
"[",
"2",
"]",
")",
";",
"pixel",
"add",
"(",
"temp",
")",
";",
"}",
"pixel",
"divide",
"(",
"colors",
"length",
")",
";",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"pixel",
"to",
"r",
"g",
"b",
"a",
"8",
"(",
"result",
")",
";",
"return",
"result",
";"
]
|
[
"the",
"method",
"finds",
"an",
"edge",
"between",
"the",
"given",
"vertices",
"in",
"the",
"mesh"
]
| [
"for",
"(",
"edge",
"edge",
":",
"temporal",
"mesh",
"get",
"edges",
"(",
")",
")",
"{",
"if",
"(",
"edge",
"get",
"first",
"index",
"(",
")",
"=",
"=",
"index",
"1",
"&",
"&",
"edge",
"get",
"second",
"index",
"(",
")",
"=",
"=",
"index",
"2",
"|",
"|",
"edge",
"get",
"first",
"index",
"(",
")",
"=",
"=",
"index",
"2",
"&",
"&",
"edge",
"get",
"second",
"index",
"(",
")",
"=",
"=",
"index",
"1",
")",
"{",
"return",
"edge",
";",
"}",
"}",
"return",
"null",
";"
]
|
[
"adds",
"a",
"uv",
"-",
"face",
"to",
"the",
"mesh"
]
| [
"integer",
"[",
"]",
"indexes",
"=",
"new",
"integer",
"[",
"uvs",
"size",
"(",
")",
"]",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"vector",
"2f",
"uv",
":",
"uvs",
")",
"{",
"vector",
"3f",
"v",
"=",
"new",
"vector",
"3f",
"(",
"uv",
"x",
",",
"uv",
"y",
",",
"0",
")",
";",
"int",
"index",
"=",
"vertices",
"index",
"of",
"(",
"v",
")",
";",
"if",
"(",
"index",
">",
"=",
"0",
")",
"{",
"indexes",
"[",
"i",
"+",
"+",
"]",
"=",
"index",
";",
"}",
"else",
"{",
"indexes",
"[",
"i",
"+",
"+",
"]",
"=",
"vertices",
"size",
"(",
")",
";",
"vertices",
"add",
"(",
"v",
")",
";",
"normals",
"add",
"(",
"normal",
")",
";",
"}",
"}",
"faces",
"add",
"(",
"new",
"face",
"(",
"indexes",
",",
"false",
",",
"0",
",",
"null",
",",
"null",
",",
"this",
")",
")",
";",
"for",
"(",
"i",
"=",
"1",
";",
"i",
"<",
"indexes",
"length",
";",
"+",
"+",
"i",
")",
"{",
"edges",
"add",
"(",
"new",
"edge",
"(",
"indexes",
"[",
"i",
"-",
"1",
"]",
",",
"indexes",
"[",
"i",
"]",
",",
"0",
",",
"true",
",",
"this",
")",
")",
";",
"}",
"edges",
"add",
"(",
"new",
"edge",
"(",
"indexes",
"[",
"indexes",
"length",
"-",
"1",
"]",
",",
"indexes",
"[",
"0",
"]",
",",
"0",
",",
"true",
",",
"this",
")",
")",
";"
]
|
[
"converts",
"the",
"mesh",
"back",
"into",
"uv",
"coordinates",
"for",
"the",
"given",
"face"
]
| [
"face",
"face",
"=",
"faces",
"get",
"(",
"face",
"index",
")",
";",
"list",
"<",
"vector",
"2f",
">",
"result",
"=",
"new",
"array",
"list",
"<",
"vector",
"2f",
">",
"(",
"face",
"get",
"indexes",
"(",
")",
"size",
"(",
")",
")",
";",
"for",
"(",
"integer",
"index",
":",
"face",
"get",
"indexes",
"(",
")",
")",
"{",
"vector",
"3f",
"v",
"=",
"vertices",
"get",
"(",
"index",
")",
";",
"result",
"add",
"(",
"new",
"vector",
"2f",
"(",
"v",
"x",
",",
"v",
"y",
")",
")",
";",
"}",
"return",
"result",
";"
]
|
[
"returns",
"a",
"{",
"@",
"code",
"p",
"collection",
"view",
"<",
"t",
">",
"}",
"capable",
"of",
"processing",
"elements",
"windowed",
"using",
"the",
"provided",
"{",
"@",
"link",
"windowing",
"strategy",
"}"
]
| [
"return",
"new",
"simple",
"p",
"collection",
"view",
"<",
">",
"(",
"p",
"collection",
",",
"new",
"singleton",
"view",
"fn",
"<",
">",
"(",
"has",
"default",
",",
"default",
"value",
",",
"default",
"value",
"coder",
")",
",",
"windowing",
"strategy",
"get",
"window",
"fn",
"(",
")",
"get",
"default",
"window",
"mapping",
"fn",
"(",
")",
",",
"windowing",
"strategy",
")",
";"
]
|
[
"returns",
"a",
"{"
]
| [
"return",
"new",
"simple",
"p",
"collection",
"view",
"<",
">",
"(",
"p",
"collection",
",",
"new",
"iterable",
"view",
"fn",
"<",
"t",
">",
"(",
")",
",",
"windowing",
"strategy",
"get",
"window",
"fn",
"(",
")",
"get",
"default",
"window",
"mapping",
"fn",
"(",
")",
",",
"windowing",
"strategy",
")",
";"
]
|
[
"returns",
"a",
"{"
]
| [
"return",
"new",
"simple",
"p",
"collection",
"view",
"<",
">",
"(",
"p",
"collection",
",",
"new",
"list",
"view",
"fn",
"<",
"t",
">",
"(",
")",
",",
"windowing",
"strategy",
"get",
"window",
"fn",
"(",
")",
"get",
"default",
"window",
"mapping",
"fn",
"(",
")",
",",
"windowing",
"strategy",
")",
";"
]
|
[
"returns",
"a",
"{"
]
| [
"return",
"new",
"simple",
"p",
"collection",
"view",
"<",
">",
"(",
"p",
"collection",
",",
"new",
"map",
"view",
"fn",
"<",
"k",
",",
"v",
">",
"(",
")",
",",
"windowing",
"strategy",
"get",
"window",
"fn",
"(",
")",
"get",
"default",
"window",
"mapping",
"fn",
"(",
")",
",",
"windowing",
"strategy",
")",
";"
]
|
[
"returns",
"a",
"{"
]
| [
"return",
"new",
"simple",
"p",
"collection",
"view",
"<",
">",
"(",
"p",
"collection",
",",
"new",
"multimap",
"view",
"fn",
"<",
"k",
",",
"v",
">",
"(",
")",
",",
"windowing",
"strategy",
"get",
"window",
"fn",
"(",
")",
"get",
"default",
"window",
"mapping",
"fn",
"(",
")",
",",
"windowing",
"strategy",
")",
";"
]
|
[
"expands",
"a",
"list",
"of",
"{"
]
| [
"immutable",
"map",
"builder",
"<",
"tuple",
"tag",
"<",
"?",
">",
",",
"p",
"value",
">",
"additional",
"inputs",
"=",
"immutable",
"map",
"builder",
"(",
")",
";",
"for",
"(",
"p",
"collection",
"view",
"<",
"?",
">",
"view",
":",
"views",
")",
"{",
"additional",
"inputs",
"put",
"(",
"view",
"get",
"tag",
"internal",
"(",
")",
",",
"view",
"get",
"p",
"collection",
"(",
")",
")",
";",
"}",
"return",
"additional",
"inputs",
"build",
"(",
")",
";"
]
|
[
"returns",
"if",
"a",
"default",
"value",
"was",
"specified"
]
| [
"return",
"has",
"default",
";"
]
|
[
"returns",
"a",
"unique",
"{",
"@",
"link",
"tuple",
"tag",
"}",
"identifying",
"this",
"{",
"@",
"link",
"p",
"collection",
"view",
"}"
]
| [
"return",
"tag",
";"
]
|
[
"<",
"p",
">",
"the",
"name",
"of",
"the",
"classifier",
"<",
"/",
"p",
">"
]
| [
"set",
"name",
"(",
"name",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"an",
"identifier",
"of",
"the",
"data",
"format",
"that",
"the",
"classifier",
"matches",
"such",
"as",
"twitter",
"json",
"omniture",
"logs",
"and",
"so",
"on",
"<",
"/",
"p",
">"
]
| [
"set",
"classification",
"(",
"classification",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"time",
"this",
"classifier",
"was",
"registered",
"<",
"/",
"p",
">"
]
| [
"set",
"creation",
"time",
"(",
"creation",
"time",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"time",
"this",
"classifier",
"was",
"last",
"updated",
"<",
"/",
"p",
">"
]
| [
"set",
"last",
"updated",
"(",
"last",
"updated",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"version",
"of",
"this",
"classifier",
"<",
"/",
"p",
">"
]
| [
"set",
"version",
"(",
"version",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"the",
"grok",
"pattern",
"applied",
"to",
"a",
"data",
"store",
"by",
"this",
"classifier",
"for",
"more",
"information",
"see",
"built",
"-",
"in",
"patterns",
"in",
"<",
"a",
"href",
"=",
"http",
":",
"/",
"/",
"docs",
"aws",
"amazon",
"com",
"/",
"glue",
"/",
"latest",
"/",
"dg",
"/",
"custom",
"-",
"classifier",
"html",
">",
"writing",
"custom",
"classifers",
"<",
"/",
"a",
">",
"<",
"/",
"p",
">"
]
| [
"set",
"grok",
"pattern",
"(",
"grok",
"pattern",
")",
";",
"return",
"this",
";"
]
|
[
"<",
"p",
">",
"optional",
"custom",
"grok",
"patterns",
"defined",
"by",
"this",
"classifier",
"for",
"more",
"information",
"see",
"custom",
"patterns",
"in",
"<",
"a",
"href",
"=",
"http",
":",
"/",
"/",
"docs",
"aws",
"amazon",
"com",
"/",
"glue",
"/",
"latest",
"/",
"dg",
"/",
"custom",
"-",
"classifier",
"html",
">",
"writing",
"custom",
"classifers",
"<",
"/",
"a",
">",
"<",
"/",
"p",
">"
]
| [
"set",
"custom",
"patterns",
"(",
"custom",
"patterns",
")",
";",
"return",
"this",
";"
]
|
[
"checks",
"to",
"see",
"that",
"this",
"device",
"has",
"accessibility",
"and",
"touch",
"exploration",
"enabled"
]
| [
"accessibility",
"manager",
"manager",
"=",
"(",
"accessibility",
"manager",
")",
"context",
"get",
"system",
"service",
"(",
"context",
"accessibility",
"service",
")",
";",
"return",
"manager",
"!",
"=",
"null",
"&",
"&",
"manager",
"is",
"enabled",
"(",
")",
"&",
"&",
"manager",
"is",
"touch",
"exploration",
"enabled",
"(",
")",
";"
]
|
[
"a",
"client",
"token",
"used",
"to",
"correlate",
"requests",
"and",
"responses"
]
| [
"set",
"amzn",
"client",
"token",
"(",
"amzn",
"client",
"token",
")",
";",
"return",
"this",
";"
]
|
[
"if",
"true",
"performs",
"a",
"best",
"-",
"effort",
"only",
"core",
"reset"
]
| [
"set",
"force",
"(",
"force",
")",
";",
"return",
"this",
";"
]
|
[
"the",
"id",
"of",
"the",
"aws",
"greengrass",
"group"
]
| [
"set",
"group",
"id",
"(",
"group",
"id",
")",
";",
"return",
"this",
";"
]
|
[
"finding",
"statistics",
"object"
]
| [
"this",
"finding",
"statistics",
"=",
"finding",
"statistics",
";"
]
|
[
"finding",
"statistics",
"object"
]
| [
"return",
"this",
"finding",
"statistics",
";"
]
|
[
"finding",
"statistics",
"object"
]
| [
"set",
"finding",
"statistics",
"(",
"finding",
"statistics",
")",
";",
"return",
"this",
";"
]
|
[
"main",
"method"
]
| [
"tree",
"node",
"root",
"=",
"new",
"tree",
"node",
"(",
"5",
")",
";",
"root",
"left",
"=",
"new",
"tree",
"node",
"(",
"4",
")",
";",
"root",
"left",
"left",
"=",
"new",
"tree",
"node",
"(",
"3",
")",
";",
"root",
"left",
"left",
"left",
"=",
"new",
"tree",
"node",
"(",
"-",
"1",
")",
";",
"root",
"right",
"=",
"new",
"tree",
"node",
"(",
"7",
")",
";",
"root",
"right",
"left",
"=",
"new",
"tree",
"node",
"(",
"2",
")",
";",
"root",
"right",
"left",
"left",
"=",
"new",
"tree",
"node",
"(",
"9",
")",
";",
"system",
"out",
"println",
"(",
"new",
"binary",
"tree",
"maximum",
"path",
"sum",
"(",
")",
"max",
"path",
"sum",
"(",
"root",
")",
")",
";"
]
|
[
"returns",
"true",
"if",
"the",
"given",
"sequence",
"ends",
"with",
"the",
"given",
"suffix",
"(",
"case",
"sensitive",
")"
]
| [
"return",
"ends",
"with",
"(",
"sequence",
",",
"sequence",
"length",
"(",
")",
",",
"suffix",
")",
";"
]
|
[
"returns",
"true",
"if",
"the",
"given",
"sequence",
"ends",
"at",
"the",
"given",
"offset",
"with",
"the",
"given",
"suffix",
"(",
"case",
"sensitive",
")"
]
| [
"if",
"(",
"end",
"offset",
"<",
"suffix",
"length",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"end",
"offset",
"-",
"1",
",",
"j",
"=",
"suffix",
"length",
"(",
")",
"-",
"1",
";",
"j",
">",
"=",
"0",
";",
"i",
"-",
"-",
",",
"j",
"-",
"-",
")",
"{",
"if",
"(",
"sequence",
"char",
"at",
"(",
"i",
")",
"!",
"=",
"suffix",
"char",
"at",
"(",
"j",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";"
]
|
[
"returns",
"the",
"corresponding",
"{",
"@",
"link",
"file",
"}",
"for",
"the",
"given",
"file",
":",
"/",
"/",
"url"
]
| [
"return",
"url",
"to",
"file",
"(",
"new",
"url",
"(",
"url",
")",
")",
";"
]
|
[
"returns",
"the",
"corresponding",
"url",
"for",
"the",
"given",
"{",
"@",
"link",
"file",
"}"
]
| [
"return",
"file",
"to",
"u",
"r",
"i",
"(",
")",
"to",
"u",
"r",
"l",
"(",
")",
";"
]
|
[
"translates",
"an",
"xml",
"name",
"(",
"e",
"g",
"xml",
"-",
"name",
")",
"into",
"a",
"java",
"/",
"c",
"+",
"+",
"constant",
"name",
"(",
"e",
"g",
"xml",
"name",
")"
]
| [
"return",
"case",
"format",
"lower",
"hyphen",
"to",
"(",
"case",
"format",
"upper",
"underscore",
",",
"xml",
"name",
")",
";"
]
|
[
"translates",
"a",
"camel",
"case",
"name",
"(",
"e",
"g",
"xml",
"name",
")",
"into",
"a",
"java",
"/",
"c",
"+",
"+",
"constant",
"name",
"(",
"e",
"g",
"xml",
"name",
")"
]
| [
"return",
"case",
"format",
"lower",
"camel",
"to",
"(",
"case",
"format",
"upper",
"underscore",
",",
"camel",
"case",
"name",
")",
";"
]
|
[
"translates",
"a",
"java",
"/",
"c",
"+",
"+",
"constant",
"name",
"(",
"e",
"g",
"xml",
"name",
")",
"into",
"camel",
"case",
"name",
"(",
"e",
"g",
"xml",
"name",
")"
]
| [
"return",
"case",
"format",
"upper",
"underscore",
"to",
"(",
"case",
"format",
"lower",
"camel",
",",
"constant",
"name",
")",
";"
]
|
[
"translates",
"a",
"java",
"/",
"c",
"+",
"+",
"constant",
"name",
"(",
"e",
"g",
"xml",
"name",
")",
"into",
"a",
"xml",
"case",
"name",
"(",
"e",
"g",
"xml",
"-",
"name",
")"
]
| [
"return",
"case",
"format",
"upper",
"underscore",
"to",
"(",
"case",
"format",
"lower",
"hyphen",
",",
"constant",
"name",
")",
";"
]
|
[
"returns",
"true",
"if",
"the",
"given",
"file",
"path",
"points",
"to",
"an",
"image",
"file",
"recognized",
"by",
"android",
"see",
"http",
":",
"/",
"/",
"developer",
"android",
"com",
"/",
"guide",
"/",
"appendix",
"/",
"media",
"-",
"formats",
"html",
"for",
"details"
]
| [
"for",
"(",
"string",
"ext",
":",
"image",
"extensions",
")",
"{",
"if",
"(",
"ends",
"with",
"ignore",
"case",
"(",
"path",
",",
"ext",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";"
]
|
[
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"singleton"
]
| [
"return",
"instance",
";"
]
|
[
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"getters",
"/",
"setters"
]
| [
"return",
"dao",
"provider",
"util",
"get",
"instance",
"(",
"anomaly",
"function",
"manager",
"impl",
"class",
")",
";"
]
|
[
"{"
]
| [
"ignite",
"configuration",
"cfg",
"=",
"super",
"get",
"configuration",
"(",
"grid",
"name",
")",
";",
"cfg",
"set",
"failure",
"handler",
"(",
"new",
"abstract",
"failure",
"handler",
"(",
")",
"{",
"@",
"override",
"protected",
"boolean",
"handle",
"(",
"ignite",
"ignite",
",",
"failure",
"context",
"failure",
"ctx",
")",
"{",
"failure",
"set",
"(",
"true",
")",
";",
"return",
"true",
";",
"}",
"}",
")",
";",
"cfg",
"set",
"cache",
"configuration",
"(",
"new",
"cache",
"configuration",
"(",
")",
"set",
"name",
"(",
"default",
"cache",
"name",
")",
"set",
"affinity",
"(",
"new",
"rendezvous",
"affinity",
"function",
"(",
"false",
",",
"num",
"tasks",
"/",
"2",
")",
")",
")",
";",
"cfg",
"set",
"data",
"storage",
"configuration",
"(",
"get",
"data",
"storage",
"configuration",
"(",
")",
")",
";",
"return",
"cfg",
";"
]
|
[
"default",
"data",
"storage",
"configuration"
]
| [
"data",
"storage",
"configuration",
"db",
"cfg",
"=",
"new",
"data",
"storage",
"configuration",
"(",
")",
";",
"db",
"cfg",
"set",
"page",
"size",
"(",
"page",
"size",
")",
";",
"db",
"cfg",
"set",
"file",
"i",
"o",
"factory",
"(",
"new",
"slow",
"i",
"o",
"factory",
"(",
")",
")",
";",
"db",
"cfg",
"set",
"default",
"data",
"region",
"configuration",
"(",
"new",
"data",
"region",
"configuration",
"(",
")",
"set",
"max",
"size",
"(",
"100",
"*",
"1024",
"*",
"1024",
")",
"set",
"persistence",
"enabled",
"(",
"true",
")",
")",
";",
"return",
"db",
"cfg",
";"
]
|
[
"used",
"in",
"testing"
]
| [
"caffeine",
"<",
"object",
",",
"object",
">",
"builder",
"=",
"caffeine",
"new",
"builder",
"(",
")",
"record",
"stats",
"(",
")",
";",
"if",
"(",
"config",
"get",
"expire",
"after",
"(",
")",
">",
"=",
"0",
")",
"{",
"builder",
"expire",
"after",
"access",
"(",
"config",
"get",
"expire",
"after",
"(",
")",
",",
"time",
"unit",
"milliseconds",
")",
";",
"}",
"if",
"(",
"config",
"get",
"size",
"in",
"bytes",
"(",
")",
">",
"=",
"0",
")",
"{",
"builder",
"maximum",
"weight",
"(",
"config",
"get",
"size",
"in",
"bytes",
"(",
")",
")",
";",
"}",
"else",
"{",
"builder",
"maximum",
"weight",
"(",
"math",
"min",
"(",
"max",
"default",
"bytes",
",",
"runtime",
"get",
"runtime",
"(",
")",
"max",
"memory",
"(",
")",
"/",
"10",
")",
")",
";",
"}",
"builder",
"weigher",
"(",
"(",
"named",
"key",
"key",
",",
"byte",
"[",
"]",
"value",
")",
"-",
">",
"value",
"length",
"+",
"key",
"key",
"length",
"+",
"key",
"namespace",
"length",
"(",
")",
"*",
"character",
"bytes",
"+",
"fixed",
"cost",
")",
"executor",
"(",
"executor",
")",
";",
"return",
"new",
"caffeine",
"cache",
"(",
"builder",
"build",
"(",
")",
",",
"config",
")",
";"
]
|
[
"this",
"is",
"completely",
"racy",
"with",
"put",
"any",
"values",
"missed",
"should",
"be",
"evicted",
"later",
"anyways",
"so",
"no",
"worries"
]
| [
"if",
"(",
"config",
"is",
"evict",
"on",
"close",
"(",
")",
")",
"{",
"cache",
"as",
"map",
"(",
")",
"key",
"set",
"(",
")",
"remove",
"if",
"(",
"key",
"-",
">",
"key",
"namespace",
"equals",
"(",
"namespace",
")",
")",
";",
"}"
]
|
[
"<",
"p",
">",
"the",
"status",
"of",
"the",
"operation",
"<",
"/",
"p",
">"
]
| [
"set",
"status",
"(",
"status",
")",
";",
"return",
"this",
";"
]
|
[
"compute",
"memory",
"bandwidth",
"in",
"bytes",
"/",
"second"
]
| [
"final",
"double",
"membw",
"[",
"]",
"=",
"new",
"double",
"[",
"num",
"threads",
"]",
";",
"thread",
"[",
"]",
"threads",
"=",
"new",
"thread",
"[",
"num",
"threads",
"]",
";",
"for",
"(",
"int",
"t",
"=",
"0",
";",
"t",
"<",
"num",
"threads",
";",
"+",
"+",
"t",
")",
"{",
"final",
"int",
"thread",
"num",
"=",
"t",
";",
"threads",
"[",
"t",
"]",
"=",
"new",
"thread",
"(",
")",
"{",
"public",
"void",
"run",
"(",
")",
"{",
"memory",
"bandwidth",
"l",
"=",
"new",
"memory",
"bandwidth",
"(",
")",
";",
"membw",
"[",
"thread",
"num",
"]",
"=",
"l",
"run",
"benchmark",
"(",
")",
";",
"}",
"}",
";",
"}",
"for",
"(",
"int",
"t",
"=",
"0",
";",
"t",
"<",
"num",
"threads",
";",
"+",
"+",
"t",
")",
"{",
"threads",
"[",
"t",
"]",
"start",
"(",
")",
";",
"}",
"for",
"(",
"int",
"t",
"=",
"0",
";",
"t",
"<",
"num",
"threads",
";",
"+",
"+",
"t",
")",
"{",
"try",
"{",
"threads",
"[",
"t",
"]",
"join",
"(",
")",
";",
"}",
"catch",
"(",
"interrupted",
"exception",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"}",
"}",
"return",
"array",
"utils",
"sum",
"(",
"membw",
")",
";"
]
|
[
"splits",
"dataset",
"into",
"train",
"and",
"test",
"subsets"
]
| [
"return",
"split",
"(",
"train",
"size",
",",
"1",
"-",
"train",
"size",
")",
";"
]
|
[
"splits",
"dataset",
"into",
"train",
"and",
"test",
"subsets"
]
| [
"return",
"new",
"train",
"test",
"split",
"<",
">",
"(",
"new",
"dataset",
"split",
"filter",
"(",
"mapper",
",",
"0",
",",
"train",
"size",
")",
",",
"new",
"dataset",
"split",
"filter",
"(",
"mapper",
",",
"train",
"size",
",",
"train",
"size",
"+",
"test",
"size",
")",
")",
";"
]
|
[
"calls",
"the",
"provided",
"metric",
"getter",
"on",
"all",
"the",
"tracked",
"environments",
"and",
"obtains",
"their",
"values"
]
| [
"list",
"<",
"long",
">",
"vals",
"=",
"new",
"array",
"list",
"<",
"long",
">",
"(",
")",
";",
"for",
"(",
"bdb",
"environment",
"stats",
"env",
"stats",
":",
"environment",
"stats",
"tracked",
")",
"{",
"vals",
"add",
"(",
"(",
"long",
")",
"reflect",
"utils",
"call",
"method",
"(",
"env",
"stats",
",",
"bdb",
"environment",
"stats",
"class",
",",
"metric",
"getter",
"name",
",",
"new",
"class",
"<",
"?",
">",
"[",
"0",
"]",
",",
"new",
"object",
"[",
"0",
"]",
")",
")",
";",
"}",
"return",
"vals",
";"
]
|
[
"expert",
":",
"returns",
"the",
"sequential",
"sub",
"readers",
"that",
"this",
"reader",
"is",
"logically",
"composed",
"of",
"this",
"method",
"may",
"not",
"return",
"{",
"@",
"code",
"null",
"}"
]
| [
"protected",
"abstract",
"list",
"<",
"?",
"extends",
"index",
"reader",
">",
"get",
"sequential",
"sub",
"readers",
"(",
")",
";"
]
|
[
"todo",
":",
"move",
"responsibility",
"for",
"combining",
"attributes",
"to",
"renderable",
"provider"
]
| [
"tmp",
"attributes",
"clear",
"(",
")",
";",
"if",
"(",
"renderable",
"environment",
"!",
"=",
"null",
")",
"tmp",
"attributes",
"set",
"(",
"renderable",
"environment",
")",
";",
"if",
"(",
"renderable",
"material",
"!",
"=",
"null",
")",
"tmp",
"attributes",
"set",
"(",
"renderable",
"material",
")",
";",
"return",
"tmp",
"attributes",
";"
]
|
[
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/",
"/"
]
| [
"if",
"(",
"not",
"contains",
"alert",
"id",
"(",
"alert",
"id",
")",
")",
"alert",
"ids",
"add",
"(",
"alert",
"id",
")",
";"
]
|
[
"set",
"up",
"the",
"output",
"label",
"format"
]
| [
"this",
"is",
"keeping",
"raw",
"labels",
"=",
"is",
"keeping",
"raw",
"labels",
";",
"return",
"this",
";"
]
|
[
"set",
"up",
"the",
"threshold"
]
| [
"this",
"threshold",
"=",
"threshold",
";",
"return",
"this",
";"
]
|
[
"set",
"up",
"the",
"weights"
]
| [
"this",
"weights",
"=",
"weights",
";",
"return",
"this",
";"
]
|
[
"set",
"up",
"the",
"intercept"
]
| [
"this",
"intercept",
"=",
"intercept",
";",
"return",
"this",
";"
]
|
[
"{"
]
| [
"final",
"double",
"res",
"=",
"input",
"dot",
"(",
"weights",
")",
"+",
"intercept",
";",
"if",
"(",
"is",
"keeping",
"raw",
"labels",
")",
"return",
"res",
";",
"else",
"return",
"res",
"-",
"threshold",
">",
"0",
"?",
"1",
"0",
":",
"0",
";"
]
|
[
"gets",
"the",
"output",
"label",
"format",
"mode"
]
| [
"return",
"is",
"keeping",
"raw",
"labels",
";"
]
|
[
"gets",
"the",
"threshold"
]
| [
"return",
"threshold",
";"
]
|
[
"gets",
"the",
"weights"
]
| [
"return",
"weights",
";"
]
|
[
"gets",
"the",
"intercept"
]
| [
"return",
"intercept",
";"
]
|
[
"{"
]
| [
"exporter",
"save",
"(",
"this",
",",
"path",
")",
";"
]
|
[
"{"
]
| [
"if",
"(",
"this",
"=",
"=",
"o",
")",
"return",
"true",
";",
"if",
"(",
"o",
"=",
"=",
"null",
"|",
"|",
"get",
"class",
"(",
")",
"!",
"=",
"o",
"get",
"class",
"(",
")",
")",
"return",
"false",
";",
"s",
"v",
"m",
"linear",
"binary",
"classification",
"model",
"mdl",
"=",
"(",
"s",
"v",
"m",
"linear",
"binary",
"classification",
"model",
")",
"o",
";",
"return",
"double",
"compare",
"(",
"mdl",
"intercept",
",",
"intercept",
")",
"=",
"=",
"0",
"&",
"&",
"double",
"compare",
"(",
"mdl",
"threshold",
",",
"threshold",
")",
"=",
"=",
"0",
"&",
"&",
"boolean",
"compare",
"(",
"mdl",
"is",
"keeping",
"raw",
"labels",
",",
"is",
"keeping",
"raw",
"labels",
")",
"=",
"=",
"0",
"&",
"&",
"objects",
"equals",
"(",
"weights",
",",
"mdl",
"weights",
")",
";"
]
|
[
"{"
]
| [
"return",
"objects",
"hash",
"(",
"weights",
",",
"intercept",
",",
"is",
"keeping",
"raw",
"labels",
",",
"threshold",
")",
";"
]
|
[
"this",
"probably",
"doesn",
"t",
"need",
"to",
"be",
"sync",
"but",
"nobody",
"calls",
"this",
"so",
"it",
"doesn",
"t",
"matter"
]
| [
"return",
"state",
";"
]
|
[
"verify",
"that",
"that",
"a",
"service",
"is",
"in",
"a",
"given",
"state"
]
| [
"service",
"operations",
"ensure",
"current",
"state",
"(",
"state",
",",
"current",
"state",
")",
";"
]
|
[
"whether",
"to",
"ignore",
"checking",
"{"
]
| [
"ignore",
"equals",
"ignore",
"case",
"=",
"new",
"value",
";"
]
|
[
"determine",
"whether",
"slist",
"begins",
"static",
"or",
"non",
"-",
"static",
"block",
"and",
"add",
"it",
"as",
"a",
"frame",
"in",
"this",
"case"
]
| [
"final",
"int",
"parent",
"type",
"=",
"ast",
"get",
"parent",
"(",
")",
"get",
"type",
"(",
")",
";",
"if",
"(",
"parent",
"type",
"=",
"=",
"token",
"types",
"slist",
"|",
"|",
"parent",
"type",
"=",
"=",
"token",
"types",
"static",
"init",
"|",
"|",
"parent",
"type",
"=",
"=",
"token",
"types",
"instance",
"init",
")",
"{",
"final",
"field",
"frame",
"frame",
"=",
"new",
"field",
"frame",
"(",
"current",
"frame",
")",
";",
"current",
"frame",
"add",
"child",
"(",
"frame",
")",
";",
"current",
"frame",
"=",
"frame",
";",
"}"
]
|
[
"determine",
"whether",
"slist",
"begins",
"static",
"or",
"non",
"-",
"static",
"block"
]
| [
"final",
"int",
"parent",
"type",
"=",
"ast",
"get",
"parent",
"(",
")",
"get",
"type",
"(",
")",
";",
"if",
"(",
"parent",
"type",
"=",
"=",
"token",
"types",
"slist",
"|",
"|",
"parent",
"type",
"=",
"=",
"token",
"types",
"static",
"init",
"|",
"|",
"parent",
"type",
"=",
"=",
"token",
"types",
"instance",
"init",
")",
"{",
"current",
"frame",
"=",
"current",
"frame",
"get",
"parent",
"(",
")",
";",
"}"
]
|
[
"process",
"class",
"def",
"method",
"def",
"literal",
"if",
"literal",
"for",
"literal",
"while",
"literal",
"do",
"literal",
"catch",
"literal",
"try",
"ctor",
"def",
"enum",
"def",
"enum",
"constant",
"def"
]
| [
"final",
"field",
"frame",
"frame",
"=",
"new",
"field",
"frame",
"(",
"current",
"frame",
")",
";",
"final",
"int",
"ast",
"type",
"=",
"ast",
"get",
"type",
"(",
")",
";",
"if",
"(",
"ast",
"type",
"=",
"=",
"token",
"types",
"class",
"def",
"|",
"|",
"ast",
"type",
"=",
"=",
"token",
"types",
"enum",
"def",
"|",
"|",
"ast",
"type",
"=",
"=",
"token",
"types",
"enum",
"constant",
"def",
")",
"{",
"frame",
"set",
"class",
"or",
"enum",
"or",
"enum",
"const",
"def",
"(",
"true",
")",
";",
"frame",
"set",
"frame",
"name",
"(",
"ast",
"find",
"first",
"token",
"(",
"token",
"types",
"ident",
")",
"get",
"text",
"(",
")",
")",
";",
"}",
"current",
"frame",
"add",
"child",
"(",
"frame",
")",
";",
"current",
"frame",
"=",
"frame",
";"
]
|
[
"determine",
"whether",
"literal",
"new",
"is",
"an",
"anonymous",
"class",
"definition",
"and",
"add",
"it",
"as",
"a",
"frame",
"in",
"this",
"case"
]
| [
"if",
"(",
"ast",
"find",
"first",
"token",
"(",
"token",
"types",
"objblock",
")",
"!",
"=",
"null",
")",
"{",
"final",
"field",
"frame",
"frame",
"=",
"new",
"field",
"frame",
"(",
"current",
"frame",
")",
";",
"current",
"frame",
"add",
"child",
"(",
"frame",
")",
";",
"current",
"frame",
"=",
"frame",
";",
"}"
]
|
[
"traverse",
"the",
"tree",
"of",
"the",
"field",
"frames",
"to",
"check",
"all",
"equals",
"method",
"calls"
]
| [
"for",
"(",
"field",
"frame",
"child",
":",
"frame",
"get",
"children",
"(",
")",
")",
"{",
"if",
"(",
"!",
"child",
"get",
"children",
"(",
")",
"is",
"empty",
"(",
")",
")",
"{",
"traverse",
"field",
"frame",
"tree",
"(",
"child",
")",
";",
"}",
"current",
"frame",
"=",
"child",
";",
"child",
"get",
"method",
"calls",
"(",
")",
"for",
"each",
"(",
"this",
":",
":",
"check",
"method",
"call",
")",
";",
"}"
]
|
[
"check",
"whether",
"the",
"method",
"call",
"should",
"be",
"violated"
]
| [
"detail",
"a",
"s",
"t",
"obj",
"called",
"on",
"=",
"method",
"call",
"get",
"first",
"child",
"(",
")",
"get",
"first",
"child",
"(",
")",
";",
"if",
"(",
"obj",
"called",
"on",
"get",
"type",
"(",
")",
"=",
"=",
"token",
"types",
"dot",
")",
"{",
"obj",
"called",
"on",
"=",
"obj",
"called",
"on",
"get",
"last",
"child",
"(",
")",
";",
"}",
"final",
"detail",
"a",
"s",
"t",
"expr",
"=",
"method",
"call",
"find",
"first",
"token",
"(",
"token",
"types",
"elist",
")",
"get",
"first",
"child",
"(",
")",
";",
"if",
"(",
"is",
"object",
"valid",
"(",
"obj",
"called",
"on",
")",
"&",
"&",
"contains",
"one",
"argument",
"(",
"method",
"call",
")",
"&",
"&",
"contains",
"all",
"safe",
"tokens",
"(",
"expr",
")",
"&",
"&",
"is",
"called",
"on",
"string",
"field",
"or",
"variable",
"(",
"obj",
"called",
"on",
")",
")",
"{",
"final",
"string",
"method",
"name",
"=",
"method",
"call",
"get",
"first",
"child",
"(",
")",
"get",
"last",
"child",
"(",
")",
"get",
"text",
"(",
")",
";",
"if",
"(",
"equals",
"equals",
"(",
"method",
"name",
")",
")",
"{",
"log",
"(",
"method",
"call",
",",
"msg",
"equals",
"avoid",
"null",
")",
";",
"}",
"else",
"{",
"log",
"(",
"method",
"call",
",",
"msg",
"equals",
"ignore",
"case",
"avoid",
"null",
")",
";",
"}",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.