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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
11,100 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.checkoutTag | public Ref checkoutTag(Git git, String tag) {
try {
return git.checkout()
.setName("tags/" + tag).call();
} catch (GitAPIException e) {
throw new IllegalStateException(e);
}
} | java | public Ref checkoutTag(Git git, String tag) {
try {
return git.checkout()
.setName("tags/" + tag).call();
} catch (GitAPIException e) {
throw new IllegalStateException(e);
}
} | [
"public",
"Ref",
"checkoutTag",
"(",
"Git",
"git",
",",
"String",
"tag",
")",
"{",
"try",
"{",
"return",
"git",
".",
"checkout",
"(",
")",
".",
"setName",
"(",
"\"tags/\"",
"+",
"tag",
")",
".",
"call",
"(",
")",
";",
"}",
"catch",
"(",
"GitAPIExce... | Checkout existing tag.
@param git
instance.
@param tag
to move
@return Ref to current branch | [
"Checkout",
"existing",
"tag",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L78-L85 |
11,101 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.isLocalBranch | public boolean isLocalBranch(final Git git, final String branch) {
try {
final List<Ref> refs = git.branchList().call();
return refs.stream()
.anyMatch(ref -> ref.getName().endsWith(branch));
} catch (GitAPIException e) {
throw new IllegalStateExceptio... | java | public boolean isLocalBranch(final Git git, final String branch) {
try {
final List<Ref> refs = git.branchList().call();
return refs.stream()
.anyMatch(ref -> ref.getName().endsWith(branch));
} catch (GitAPIException e) {
throw new IllegalStateExceptio... | [
"public",
"boolean",
"isLocalBranch",
"(",
"final",
"Git",
"git",
",",
"final",
"String",
"branch",
")",
"{",
"try",
"{",
"final",
"List",
"<",
"Ref",
">",
"refs",
"=",
"git",
".",
"branchList",
"(",
")",
".",
"call",
"(",
")",
";",
"return",
"refs",... | Checks if given branch has been checkedout locally too.
@param git
instance.
@param branch
to check.
@return True if it is local, false otherwise. | [
"Checks",
"if",
"given",
"branch",
"has",
"been",
"checkedout",
"locally",
"too",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L97-L105 |
11,102 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.isRemoteBranch | public boolean isRemoteBranch(final Git git, final String branch, final String remote) {
try {
final List<Ref> refs = git.branchList()
.setListMode(ListBranchCommand.ListMode.REMOTE).call();
final String remoteBranch = remote + "/" + branch;
return refs.strea... | java | public boolean isRemoteBranch(final Git git, final String branch, final String remote) {
try {
final List<Ref> refs = git.branchList()
.setListMode(ListBranchCommand.ListMode.REMOTE).call();
final String remoteBranch = remote + "/" + branch;
return refs.strea... | [
"public",
"boolean",
"isRemoteBranch",
"(",
"final",
"Git",
"git",
",",
"final",
"String",
"branch",
",",
"final",
"String",
"remote",
")",
"{",
"try",
"{",
"final",
"List",
"<",
"Ref",
">",
"refs",
"=",
"git",
".",
"branchList",
"(",
")",
".",
"setLis... | Checks if given branch is remote.
@param git
instance.
@param branch
to check.
@param remote
name.
@return True if it is remote, false otherwise. | [
"Checks",
"if",
"given",
"branch",
"is",
"remote",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L119-L129 |
11,103 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.checkoutBranch | public Ref checkoutBranch(Git git, String branch) {
try {
return git.checkout()
.setName(branch)
.call();
} catch (GitAPIException e) {
throw new IllegalStateException(e);
}
} | java | public Ref checkoutBranch(Git git, String branch) {
try {
return git.checkout()
.setName(branch)
.call();
} catch (GitAPIException e) {
throw new IllegalStateException(e);
}
} | [
"public",
"Ref",
"checkoutBranch",
"(",
"Git",
"git",
",",
"String",
"branch",
")",
"{",
"try",
"{",
"return",
"git",
".",
"checkout",
"(",
")",
".",
"setName",
"(",
"branch",
")",
".",
"call",
"(",
")",
";",
"}",
"catch",
"(",
"GitAPIException",
"e"... | Checkout existing branch.
@param git
instance.
@param branch
to move
@return Ref to current branch | [
"Checkout",
"existing",
"branch",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L141-L149 |
11,104 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.createBranchAndCheckout | public Ref createBranchAndCheckout(Git git, String branch) {
try {
return git.checkout()
.setCreateBranch(true)
.setName(branch)
.setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.TRACK)
.call();
} catch (GitAPIException e) ... | java | public Ref createBranchAndCheckout(Git git, String branch) {
try {
return git.checkout()
.setCreateBranch(true)
.setName(branch)
.setUpstreamMode(CreateBranchCommand.SetupUpstreamMode.TRACK)
.call();
} catch (GitAPIException e) ... | [
"public",
"Ref",
"createBranchAndCheckout",
"(",
"Git",
"git",
",",
"String",
"branch",
")",
"{",
"try",
"{",
"return",
"git",
".",
"checkout",
"(",
")",
".",
"setCreateBranch",
"(",
"true",
")",
".",
"setName",
"(",
"branch",
")",
".",
"setUpstreamMode",
... | Executes a checkout -b command using given branch.
@param git
instance.
@param branch
to create and checkout.
@return Ref to current branch. | [
"Executes",
"a",
"checkout",
"-",
"b",
"command",
"using",
"given",
"branch",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L186-L196 |
11,105 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.addAndCommit | public RevCommit addAndCommit(Git git, String message) {
try {
git.add()
.addFilepattern(".")
.call();
return git.commit()
.setMessage(message)
.call();
} catch (GitAPIException e) {
throw new IllegalStat... | java | public RevCommit addAndCommit(Git git, String message) {
try {
git.add()
.addFilepattern(".")
.call();
return git.commit()
.setMessage(message)
.call();
} catch (GitAPIException e) {
throw new IllegalStat... | [
"public",
"RevCommit",
"addAndCommit",
"(",
"Git",
"git",
",",
"String",
"message",
")",
"{",
"try",
"{",
"git",
".",
"add",
"(",
")",
".",
"addFilepattern",
"(",
"\".\"",
")",
".",
"call",
"(",
")",
";",
"return",
"git",
".",
"commit",
"(",
")",
"... | Add all files and commit them with given message. This is equivalent as doing git add . git commit -m "message".
@param git
instance.
@param message
of the commit.
@return RevCommit of this commit. | [
"Add",
"all",
"files",
"and",
"commit",
"them",
"with",
"given",
"message",
".",
"This",
"is",
"equivalent",
"as",
"doing",
"git",
"add",
".",
"git",
"commit",
"-",
"m",
"message",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L208-L219 |
11,106 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.createTag | public Ref createTag(Git git, String name) {
try {
return git.tag()
.setName(name)
.call();
} catch (GitAPIException e) {
throw new IllegalStateException(e);
}
} | java | public Ref createTag(Git git, String name) {
try {
return git.tag()
.setName(name)
.call();
} catch (GitAPIException e) {
throw new IllegalStateException(e);
}
} | [
"public",
"Ref",
"createTag",
"(",
"Git",
"git",
",",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"git",
".",
"tag",
"(",
")",
".",
"setName",
"(",
"name",
")",
".",
"call",
"(",
")",
";",
"}",
"catch",
"(",
"GitAPIException",
"e",
")",
"{"... | Creates a tag.
@param git
instance.
@param name
of the tag.
@return Ref created to tag. | [
"Creates",
"a",
"tag",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L329-L337 |
11,107 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.cloneRepository | public Git cloneRepository(String remoteUrl, Path localPath) {
try {
return Git.cloneRepository()
.setURI(remoteUrl)
.setDirectory(localPath.toFile())
.call();
} catch (GitAPIException e) {
throw new IllegalStateException(e);
... | java | public Git cloneRepository(String remoteUrl, Path localPath) {
try {
return Git.cloneRepository()
.setURI(remoteUrl)
.setDirectory(localPath.toFile())
.call();
} catch (GitAPIException e) {
throw new IllegalStateException(e);
... | [
"public",
"Git",
"cloneRepository",
"(",
"String",
"remoteUrl",
",",
"Path",
"localPath",
")",
"{",
"try",
"{",
"return",
"Git",
".",
"cloneRepository",
"(",
")",
".",
"setURI",
"(",
"remoteUrl",
")",
".",
"setDirectory",
"(",
"localPath",
".",
"toFile",
"... | Clones a public remote git repository. Caller is responsible of closing git repository.
@param remoteUrl
to connect.
@param localPath
where to clone the repo.
@return Git instance. Caller is responsible to close the connection. | [
"Clones",
"a",
"public",
"remote",
"git",
"repository",
".",
"Caller",
"is",
"responsible",
"of",
"closing",
"git",
"repository",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L471-L480 |
11,108 | arquillian/arquillian-algeron | common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java | GitOperations.hasAtLeastOneReference | public boolean hasAtLeastOneReference(Repository repo) {
for (Ref ref : repo.getAllRefs().values()) {
if (ref.getObjectId() == null)
continue;
return true;
}
return false;
} | java | public boolean hasAtLeastOneReference(Repository repo) {
for (Ref ref : repo.getAllRefs().values()) {
if (ref.getObjectId() == null)
continue;
return true;
}
return false;
} | [
"public",
"boolean",
"hasAtLeastOneReference",
"(",
"Repository",
"repo",
")",
"{",
"for",
"(",
"Ref",
"ref",
":",
"repo",
".",
"getAllRefs",
"(",
")",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"ref",
".",
"getObjectId",
"(",
")",
"==",
"null",
"... | Checks if a repo has been cloned correctly.
@param repo
to check
@return true if has been cloned correctly, false otherwise | [
"Checks",
"if",
"a",
"repo",
"has",
"been",
"cloned",
"correctly",
"."
] | ec79372defdafe99ab2f7bb696f1c1eabdbbacb6 | https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L565-L574 |
11,109 | shrinkwrap/descriptors | spi/src/main/java/org/jboss/shrinkwrap/descriptor/spi/node/Node.java | Node.removeChildren | public List<Node> removeChildren(final String name) throws IllegalArgumentException {
if (name == null || name.trim().length() == 0) {
throw new IllegalArgumentException("Path must not be null or empty");
}
List<Node> found = get(name);
for (Node child : found) {
... | java | public List<Node> removeChildren(final String name) throws IllegalArgumentException {
if (name == null || name.trim().length() == 0) {
throw new IllegalArgumentException("Path must not be null or empty");
}
List<Node> found = get(name);
for (Node child : found) {
... | [
"public",
"List",
"<",
"Node",
">",
"removeChildren",
"(",
"final",
"String",
"name",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"name",
"==",
"null",
"||",
"name",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
... | Remove all child nodes found at the given query.
@return the {@link List} of removed children.
@throws IllegalArgumentException
If the specified name is not specified | [
"Remove",
"all",
"child",
"nodes",
"found",
"at",
"the",
"given",
"query",
"."
] | 023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba | https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/spi/src/main/java/org/jboss/shrinkwrap/descriptor/spi/node/Node.java#L350-L360 |
11,110 | shrinkwrap/descriptors | spi/src/main/java/org/jboss/shrinkwrap/descriptor/spi/node/Node.java | Node.getTextValueForPatternName | public String getTextValueForPatternName(final String name) {
Node n = this.getSingle(name);
String text = n == null ? null : n.getText();
return text;
} | java | public String getTextValueForPatternName(final String name) {
Node n = this.getSingle(name);
String text = n == null ? null : n.getText();
return text;
} | [
"public",
"String",
"getTextValueForPatternName",
"(",
"final",
"String",
"name",
")",
"{",
"Node",
"n",
"=",
"this",
".",
"getSingle",
"(",
"name",
")",
";",
"String",
"text",
"=",
"n",
"==",
"null",
"?",
"null",
":",
"n",
".",
"getText",
"(",
")",
... | Get the text value of the element found at the given query name. If no element is found, or no text exists,
return null; | [
"Get",
"the",
"text",
"value",
"of",
"the",
"element",
"found",
"at",
"the",
"given",
"query",
"name",
".",
"If",
"no",
"element",
"is",
"found",
"or",
"no",
"text",
"exists",
"return",
"null",
";"
] | 023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba | https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/spi/src/main/java/org/jboss/shrinkwrap/descriptor/spi/node/Node.java#L449-L453 |
11,111 | shrinkwrap/descriptors | spi/src/main/java/org/jboss/shrinkwrap/descriptor/spi/node/Node.java | Node.getTextValuesForPatternName | public List<String> getTextValuesForPatternName(final String name) {
List<String> result = new ArrayList<String>();
List<Node> jars = this.get(name);
for (Node node : jars) {
String text = node.getText();
if (text != null) {
result.add(text);
}... | java | public List<String> getTextValuesForPatternName(final String name) {
List<String> result = new ArrayList<String>();
List<Node> jars = this.get(name);
for (Node node : jars) {
String text = node.getText();
if (text != null) {
result.add(text);
}... | [
"public",
"List",
"<",
"String",
">",
"getTextValuesForPatternName",
"(",
"final",
"String",
"name",
")",
"{",
"List",
"<",
"String",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"List",
"<",
"Node",
">",
"jars",
"=",
"thi... | Get the text values of all elements found at the given query name. If no elements are found, or no text exists,
return an empty list; | [
"Get",
"the",
"text",
"values",
"of",
"all",
"elements",
"found",
"at",
"the",
"given",
"query",
"name",
".",
"If",
"no",
"elements",
"are",
"found",
"or",
"no",
"text",
"exists",
"return",
"an",
"empty",
"list",
";"
] | 023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba | https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/spi/src/main/java/org/jboss/shrinkwrap/descriptor/spi/node/Node.java#L459-L469 |
11,112 | shrinkwrap/descriptors | spi/src/main/java/org/jboss/shrinkwrap/descriptor/spi/node/Node.java | Node.validateAndMergePatternInput | private Pattern[] validateAndMergePatternInput(final Pattern pattern, final Pattern... patterns) {
// Precondition check
if (pattern == null) {
throw new IllegalArgumentException("At least one pattern must not be specified");
}
final List<Pattern> merged = new ArrayList<Patte... | java | private Pattern[] validateAndMergePatternInput(final Pattern pattern, final Pattern... patterns) {
// Precondition check
if (pattern == null) {
throw new IllegalArgumentException("At least one pattern must not be specified");
}
final List<Pattern> merged = new ArrayList<Patte... | [
"private",
"Pattern",
"[",
"]",
"validateAndMergePatternInput",
"(",
"final",
"Pattern",
"pattern",
",",
"final",
"Pattern",
"...",
"patterns",
")",
"{",
"// Precondition check",
"if",
"(",
"pattern",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentExcepti... | Validates that at least one pattern was specified, merges all patterns together, and returns the result
@param pattern
@param patterns
@return | [
"Validates",
"that",
"at",
"least",
"one",
"pattern",
"was",
"specified",
"merges",
"all",
"patterns",
"together",
"and",
"returns",
"the",
"result"
] | 023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba | https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/spi/src/main/java/org/jboss/shrinkwrap/descriptor/spi/node/Node.java#L619-L630 |
11,113 | shrinkwrap/descriptors | api-base/src/main/java/org/jboss/shrinkwrap/descriptor/api/Descriptors.java | Descriptors.create | public static <T extends Descriptor> T create(final Class<T> type) throws IllegalArgumentException {
return create(type, null);
} | java | public static <T extends Descriptor> T create(final Class<T> type) throws IllegalArgumentException {
return create(type, null);
} | [
"public",
"static",
"<",
"T",
"extends",
"Descriptor",
">",
"T",
"create",
"(",
"final",
"Class",
"<",
"T",
">",
"type",
")",
"throws",
"IllegalArgumentException",
"{",
"return",
"create",
"(",
"type",
",",
"null",
")",
";",
"}"
] | Creates a new Descriptor instance; the predefined default descriptor name for this type will be used.
@param <T>
@param type
@return
@see #create(Class, String)
@throws IllegalArgumentException
If the type is not specified | [
"Creates",
"a",
"new",
"Descriptor",
"instance",
";",
"the",
"predefined",
"default",
"descriptor",
"name",
"for",
"this",
"type",
"will",
"be",
"used",
"."
] | 023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba | https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/api-base/src/main/java/org/jboss/shrinkwrap/descriptor/api/Descriptors.java#L45-L47 |
11,114 | shrinkwrap/descriptors | metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/codegen/CodeGen.java | CodeGen.generateEnums | public void generateEnums() throws JClassAlreadyExistsException, IOException {
final JCodeModel cm = new JCodeModel();
for (final MetadataEnum metadataEnum : metadata.getEnumList()) {
final String fqnEnum = metadataEnum.getPackageApi() + "." + getPascalizeCase(metadataEnum.getName());
... | java | public void generateEnums() throws JClassAlreadyExistsException, IOException {
final JCodeModel cm = new JCodeModel();
for (final MetadataEnum metadataEnum : metadata.getEnumList()) {
final String fqnEnum = metadataEnum.getPackageApi() + "." + getPascalizeCase(metadataEnum.getName());
... | [
"public",
"void",
"generateEnums",
"(",
")",
"throws",
"JClassAlreadyExistsException",
",",
"IOException",
"{",
"final",
"JCodeModel",
"cm",
"=",
"new",
"JCodeModel",
"(",
")",
";",
"for",
"(",
"final",
"MetadataEnum",
"metadataEnum",
":",
"metadata",
".",
"getE... | Generates all enumeration classes.
@param metadata
@throws JClassAlreadyExistsException
@throws IOException | [
"Generates",
"all",
"enumeration",
"classes",
"."
] | 023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba | https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/codegen/CodeGen.java#L77-L97 |
11,115 | shrinkwrap/descriptors | metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/codegen/CodeGen.java | CodeGen.isEnum | public boolean isEnum(final String elementType) {
final String namespace = splitElementType(elementType)[0];
final String localname = splitElementType(elementType)[1];
boolean isEnum = false;
for (final MetadataEnum metadataEnum : metadata.getEnumList()) {
if (metadataEnum.g... | java | public boolean isEnum(final String elementType) {
final String namespace = splitElementType(elementType)[0];
final String localname = splitElementType(elementType)[1];
boolean isEnum = false;
for (final MetadataEnum metadataEnum : metadata.getEnumList()) {
if (metadataEnum.g... | [
"public",
"boolean",
"isEnum",
"(",
"final",
"String",
"elementType",
")",
"{",
"final",
"String",
"namespace",
"=",
"splitElementType",
"(",
"elementType",
")",
"[",
"0",
"]",
";",
"final",
"String",
"localname",
"=",
"splitElementType",
"(",
"elementType",
"... | Returns true, if the given string argument represents a enumeration class.
@param elementName
@return true, if the string represents a enumeration, otherwise false. | [
"Returns",
"true",
"if",
"the",
"given",
"string",
"argument",
"represents",
"a",
"enumeration",
"class",
"."
] | 023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba | https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/codegen/CodeGen.java#L211-L224 |
11,116 | craftercms/profile | security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java | SecurityUtils.getProfileLastModifiedCookie | public static Long getProfileLastModifiedCookie(HttpServletRequest request) {
String profileLastModified = HttpUtils.getCookieValue(PROFILE_LAST_MODIFIED_COOKIE_NAME, request);
if (StringUtils.isNotEmpty(profileLastModified)) {
try {
return new Long(profileLastModified);
... | java | public static Long getProfileLastModifiedCookie(HttpServletRequest request) {
String profileLastModified = HttpUtils.getCookieValue(PROFILE_LAST_MODIFIED_COOKIE_NAME, request);
if (StringUtils.isNotEmpty(profileLastModified)) {
try {
return new Long(profileLastModified);
... | [
"public",
"static",
"Long",
"getProfileLastModifiedCookie",
"(",
"HttpServletRequest",
"request",
")",
"{",
"String",
"profileLastModified",
"=",
"HttpUtils",
".",
"getCookieValue",
"(",
"PROFILE_LAST_MODIFIED_COOKIE_NAME",
",",
"request",
")",
";",
"if",
"(",
"StringUt... | Returns the last modified timestamp cookie from the request.
@param request the request where to retrieve the last modified timestamp from
@return the last modified timestamp of the authenticated profile | [
"Returns",
"the",
"last",
"modified",
"timestamp",
"cookie",
"from",
"the",
"request",
"."
] | d829c1136b0fd21d87dc925cb7046cbd38a300a4 | https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java#L68-L79 |
11,117 | craftercms/profile | security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java | SecurityUtils.getCurrentAuthentication | public static Authentication getCurrentAuthentication() {
RequestContext context = RequestContext.getCurrent();
if (context != null) {
return getAuthentication(context.getRequest());
} else {
return null;
}
} | java | public static Authentication getCurrentAuthentication() {
RequestContext context = RequestContext.getCurrent();
if (context != null) {
return getAuthentication(context.getRequest());
} else {
return null;
}
} | [
"public",
"static",
"Authentication",
"getCurrentAuthentication",
"(",
")",
"{",
"RequestContext",
"context",
"=",
"RequestContext",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"context",
"!=",
"null",
")",
"{",
"return",
"getAuthentication",
"(",
"context",
".... | Returns the authentication attribute from the current request.
@return the authentication object | [
"Returns",
"the",
"authentication",
"attribute",
"from",
"the",
"current",
"request",
"."
] | d829c1136b0fd21d87dc925cb7046cbd38a300a4 | https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java#L86-L93 |
11,118 | craftercms/profile | security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java | SecurityUtils.setCurrentAuthentication | public static void setCurrentAuthentication(Authentication authentication) {
RequestContext context = RequestContext.getCurrent();
if (context != null) {
setAuthentication(context.getRequest(), authentication);
}
} | java | public static void setCurrentAuthentication(Authentication authentication) {
RequestContext context = RequestContext.getCurrent();
if (context != null) {
setAuthentication(context.getRequest(), authentication);
}
} | [
"public",
"static",
"void",
"setCurrentAuthentication",
"(",
"Authentication",
"authentication",
")",
"{",
"RequestContext",
"context",
"=",
"RequestContext",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"context",
"!=",
"null",
")",
"{",
"setAuthentication",
"(",... | Sets the authentication attribute in the current request.
@param authentication the authentication object to set as request attribute | [
"Sets",
"the",
"authentication",
"attribute",
"in",
"the",
"current",
"request",
"."
] | d829c1136b0fd21d87dc925cb7046cbd38a300a4 | https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java#L100-L105 |
11,119 | craftercms/profile | security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java | SecurityUtils.removeCurrentAuthentication | public static void removeCurrentAuthentication() {
RequestContext context = RequestContext.getCurrent();
if (context != null) {
removeAuthentication(context.getRequest());
}
} | java | public static void removeCurrentAuthentication() {
RequestContext context = RequestContext.getCurrent();
if (context != null) {
removeAuthentication(context.getRequest());
}
} | [
"public",
"static",
"void",
"removeCurrentAuthentication",
"(",
")",
"{",
"RequestContext",
"context",
"=",
"RequestContext",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"context",
"!=",
"null",
")",
"{",
"removeAuthentication",
"(",
"context",
".",
"getRequest... | Removes the authentication attribute from the current request. | [
"Removes",
"the",
"authentication",
"attribute",
"from",
"the",
"current",
"request",
"."
] | d829c1136b0fd21d87dc925cb7046cbd38a300a4 | https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java#L110-L115 |
11,120 | craftercms/profile | security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java | SecurityUtils.getCurrentProfile | public static Profile getCurrentProfile() {
RequestContext context = RequestContext.getCurrent();
if (context != null) {
return getProfile(context.getRequest());
} else {
return null;
}
} | java | public static Profile getCurrentProfile() {
RequestContext context = RequestContext.getCurrent();
if (context != null) {
return getProfile(context.getRequest());
} else {
return null;
}
} | [
"public",
"static",
"Profile",
"getCurrentProfile",
"(",
")",
"{",
"RequestContext",
"context",
"=",
"RequestContext",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"context",
"!=",
"null",
")",
"{",
"return",
"getProfile",
"(",
"context",
".",
"getRequest",
... | Returns the profile from authentication attribute from the current request.
@return the profile object, or null if there's no authentication | [
"Returns",
"the",
"profile",
"from",
"authentication",
"attribute",
"from",
"the",
"current",
"request",
"."
] | d829c1136b0fd21d87dc925cb7046cbd38a300a4 | https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java#L152-L159 |
11,121 | craftercms/profile | security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java | SecurityUtils.getProfile | public static Profile getProfile(HttpServletRequest request) {
Authentication auth = getAuthentication(request);
if (auth != null) {
return auth.getProfile();
} else {
return null;
}
} | java | public static Profile getProfile(HttpServletRequest request) {
Authentication auth = getAuthentication(request);
if (auth != null) {
return auth.getProfile();
} else {
return null;
}
} | [
"public",
"static",
"Profile",
"getProfile",
"(",
"HttpServletRequest",
"request",
")",
"{",
"Authentication",
"auth",
"=",
"getAuthentication",
"(",
"request",
")",
";",
"if",
"(",
"auth",
"!=",
"null",
")",
"{",
"return",
"auth",
".",
"getProfile",
"(",
")... | Returns the profile from authentication attribute from the specified request.
@return the profile object, or null if there's no authentication | [
"Returns",
"the",
"profile",
"from",
"authentication",
"attribute",
"from",
"the",
"specified",
"request",
"."
] | d829c1136b0fd21d87dc925cb7046cbd38a300a4 | https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/utils/SecurityUtils.java#L166-L173 |
11,122 | craftercms/profile | security-provider/src/main/java/org/craftercms/security/processors/impl/UrlAccessRestrictionCheckingProcessor.java | UrlAccessRestrictionCheckingProcessor.setUrlRestrictions | @Required
public void setUrlRestrictions(Map<String, String> restrictions) {
urlRestrictions = new LinkedHashMap<>();
ExpressionParser parser = new SpelExpressionParser();
for (Map.Entry<String, String> entry : restrictions.entrySet()) {
urlRestrictions.put(entry.getKey(), pars... | java | @Required
public void setUrlRestrictions(Map<String, String> restrictions) {
urlRestrictions = new LinkedHashMap<>();
ExpressionParser parser = new SpelExpressionParser();
for (Map.Entry<String, String> entry : restrictions.entrySet()) {
urlRestrictions.put(entry.getKey(), pars... | [
"@",
"Required",
"public",
"void",
"setUrlRestrictions",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"restrictions",
")",
"{",
"urlRestrictions",
"=",
"new",
"LinkedHashMap",
"<>",
"(",
")",
";",
"ExpressionParser",
"parser",
"=",
"new",
"SpelExpressionParser... | Sets the map of restrictions. Each key of the map is ANT-style path pattern, used to match the URLs of incoming
requests, and each value is a Spring EL expression. | [
"Sets",
"the",
"map",
"of",
"restrictions",
".",
"Each",
"key",
"of",
"the",
"map",
"is",
"ANT",
"-",
"style",
"path",
"pattern",
"used",
"to",
"match",
"the",
"URLs",
"of",
"incoming",
"requests",
"and",
"each",
"value",
"is",
"a",
"Spring",
"EL",
"ex... | d829c1136b0fd21d87dc925cb7046cbd38a300a4 | https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/processors/impl/UrlAccessRestrictionCheckingProcessor.java#L95-L104 |
11,123 | pedrovgs/Nox | nox/src/main/java/com/github/pedrovgs/nox/imageloader/PicassoImageLoader.java | PicassoImageLoader.loadImage | private void loadImage() {
List<Transformation> transformations = getTransformations();
boolean hasUrl = url != null;
boolean hasResourceId = resourceId != null;
boolean hasPlaceholder = placeholderId != null;
ListenerTarget listenerTarget = getLinearTarget(listener);
if (hasUrl) {
Request... | java | private void loadImage() {
List<Transformation> transformations = getTransformations();
boolean hasUrl = url != null;
boolean hasResourceId = resourceId != null;
boolean hasPlaceholder = placeholderId != null;
ListenerTarget listenerTarget = getLinearTarget(listener);
if (hasUrl) {
Request... | [
"private",
"void",
"loadImage",
"(",
")",
"{",
"List",
"<",
"Transformation",
">",
"transformations",
"=",
"getTransformations",
"(",
")",
";",
"boolean",
"hasUrl",
"=",
"url",
"!=",
"null",
";",
"boolean",
"hasResourceId",
"=",
"resourceId",
"!=",
"null",
"... | Uses the configuration previously applied using this ImageLoader builder to download a
resource asynchronously and notify the result to the listener. | [
"Uses",
"the",
"configuration",
"previously",
"applied",
"using",
"this",
"ImageLoader",
"builder",
"to",
"download",
"a",
"resource",
"asynchronously",
"and",
"notify",
"the",
"result",
"to",
"the",
"listener",
"."
] | b4dfe37895e1b7bf2084d60139931dd4fb12f3f4 | https://github.com/pedrovgs/Nox/blob/b4dfe37895e1b7bf2084d60139931dd4fb12f3f4/nox/src/main/java/com/github/pedrovgs/nox/imageloader/PicassoImageLoader.java#L105-L132 |
11,124 | pedrovgs/Nox | nox/src/main/java/com/github/pedrovgs/nox/imageloader/PicassoImageLoader.java | PicassoImageLoader.getLinearTarget | private ListenerTarget getLinearTarget(final Listener listener) {
ListenerTarget target = targets.get(listener);
if (target == null) {
target = new ListenerTarget(listener);
targets.put(listener, target);
}
return target;
} | java | private ListenerTarget getLinearTarget(final Listener listener) {
ListenerTarget target = targets.get(listener);
if (target == null) {
target = new ListenerTarget(listener);
targets.put(listener, target);
}
return target;
} | [
"private",
"ListenerTarget",
"getLinearTarget",
"(",
"final",
"Listener",
"listener",
")",
"{",
"ListenerTarget",
"target",
"=",
"targets",
".",
"get",
"(",
"listener",
")",
";",
"if",
"(",
"target",
"==",
"null",
")",
"{",
"target",
"=",
"new",
"ListenerTar... | Given a listener passed as argument creates or returns a lazy instance of a Picasso Target.
This implementation is needed because Picasso doesn't keep a strong reference to the target
passed as parameter. Without this method Picasso looses the reference to the target and never
notifies when the resource has been downlo... | [
"Given",
"a",
"listener",
"passed",
"as",
"argument",
"creates",
"or",
"returns",
"a",
"lazy",
"instance",
"of",
"a",
"Picasso",
"Target",
".",
"This",
"implementation",
"is",
"needed",
"because",
"Picasso",
"doesn",
"t",
"keep",
"a",
"strong",
"reference",
... | b4dfe37895e1b7bf2084d60139931dd4fb12f3f4 | https://github.com/pedrovgs/Nox/blob/b4dfe37895e1b7bf2084d60139931dd4fb12f3f4/nox/src/main/java/com/github/pedrovgs/nox/imageloader/PicassoImageLoader.java#L143-L150 |
11,125 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/server/delegation/RequestDelegator.java | RequestDelegator.delegate | private void delegate(RequestDelegationService service, HttpServletRequest request, HttpServletResponse response,
FilterChain filterChain) {
try {
service.delegate(request, response, filterChain);
} catch (Exception e) {
throw new RequestDelegationException(
... | java | private void delegate(RequestDelegationService service, HttpServletRequest request, HttpServletResponse response,
FilterChain filterChain) {
try {
service.delegate(request, response, filterChain);
} catch (Exception e) {
throw new RequestDelegationException(
... | [
"private",
"void",
"delegate",
"(",
"RequestDelegationService",
"service",
",",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"FilterChain",
"filterChain",
")",
"{",
"try",
"{",
"service",
".",
"delegate",
"(",
"request",
",",
"respon... | Delegates given request and response to be processed by given service.
@throws RequestDelegationException in case the delegated request processing fails | [
"Delegates",
"given",
"request",
"and",
"response",
"to",
"be",
"processed",
"by",
"given",
"service",
"."
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/server/delegation/RequestDelegator.java#L69-L77 |
11,126 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/server/delegation/RequestDelegator.java | RequestDelegator.canDelegate | private boolean canDelegate(RequestDelegationService delegate, HttpServletRequest request) {
try {
return delegate.canDelegate(request);
} catch (Exception e) {
log.log(Level.SEVERE,
String.format("The delegation service can't check the delegability of the request... | java | private boolean canDelegate(RequestDelegationService delegate, HttpServletRequest request) {
try {
return delegate.canDelegate(request);
} catch (Exception e) {
log.log(Level.SEVERE,
String.format("The delegation service can't check the delegability of the request... | [
"private",
"boolean",
"canDelegate",
"(",
"RequestDelegationService",
"delegate",
",",
"HttpServletRequest",
"request",
")",
"{",
"try",
"{",
"return",
"delegate",
".",
"canDelegate",
"(",
"request",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"lo... | Checks whether the given service can serve given request. | [
"Checks",
"whether",
"the",
"given",
"service",
"can",
"serve",
"given",
"request",
"."
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/server/delegation/RequestDelegator.java#L82-L91 |
11,127 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/client/execution/SynchronizationPoint.java | SynchronizationPoint.awaitRequests | void awaitRequests() {
if (!isWaitingForEnriching()) {
return;
}
for (int i = 0; i < NUMBER_OF_WAIT_LOOPS; i++) {
try {
Thread.sleep(THREAD_SLEEP);
if (!isEnrichmentAdvertised()) {
return;
}
}... | java | void awaitRequests() {
if (!isWaitingForEnriching()) {
return;
}
for (int i = 0; i < NUMBER_OF_WAIT_LOOPS; i++) {
try {
Thread.sleep(THREAD_SLEEP);
if (!isEnrichmentAdvertised()) {
return;
}
}... | [
"void",
"awaitRequests",
"(",
")",
"{",
"if",
"(",
"!",
"isWaitingForEnriching",
"(",
")",
")",
"{",
"return",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"NUMBER_OF_WAIT_LOOPS",
";",
"i",
"++",
")",
"{",
"try",
"{",
"Thread",
".",
... | Await client activity causing requests in order to enrich requests | [
"Await",
"client",
"activity",
"causing",
"requests",
"in",
"order",
"to",
"enrich",
"requests"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/client/execution/SynchronizationPoint.java#L131-L146 |
11,128 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/client/execution/SynchronizationPoint.java | SynchronizationPoint.awaitResponses | void awaitResponses() {
try {
boolean finishedNicely = responseFinished.await(WAIT_TIMEOUT_MILISECONDS, TimeUnit.MILLISECONDS);
if (!finishedNicely) {
throw new WarpSynchronizationException(WarpContextStore.get());
}
} catch (InterruptedException e) {
... | java | void awaitResponses() {
try {
boolean finishedNicely = responseFinished.await(WAIT_TIMEOUT_MILISECONDS, TimeUnit.MILLISECONDS);
if (!finishedNicely) {
throw new WarpSynchronizationException(WarpContextStore.get());
}
} catch (InterruptedException e) {
... | [
"void",
"awaitResponses",
"(",
")",
"{",
"try",
"{",
"boolean",
"finishedNicely",
"=",
"responseFinished",
".",
"await",
"(",
"WAIT_TIMEOUT_MILISECONDS",
",",
"TimeUnit",
".",
"MILLISECONDS",
")",
";",
"if",
"(",
"!",
"finishedNicely",
")",
"{",
"throw",
"new"... | Await responses for requests or premature finishing | [
"Await",
"responses",
"for",
"requests",
"or",
"premature",
"finishing"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/client/execution/SynchronizationPoint.java#L151-L159 |
11,129 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/ParseDateTimeTag.java | ParseDateTimeTag.setDateTimeZone | public void setDateTimeZone(Object dtz) throws JspTagException {
if (dtz == null || dtz instanceof String
&& ((String) dtz).length() == 0) {
this.dateTimeZone = null;
} else if (dtz instanceof DateTimeZone) {
this.dateTimeZone = (DateTimeZone) dtz;
} else ... | java | public void setDateTimeZone(Object dtz) throws JspTagException {
if (dtz == null || dtz instanceof String
&& ((String) dtz).length() == 0) {
this.dateTimeZone = null;
} else if (dtz instanceof DateTimeZone) {
this.dateTimeZone = (DateTimeZone) dtz;
} else ... | [
"public",
"void",
"setDateTimeZone",
"(",
"Object",
"dtz",
")",
"throws",
"JspTagException",
"{",
"if",
"(",
"dtz",
"==",
"null",
"||",
"dtz",
"instanceof",
"String",
"&&",
"(",
"(",
"String",
")",
"dtz",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
... | Sets the zone attribute.
@param dtz the zone | [
"Sets",
"the",
"zone",
"attribute",
"."
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/ParseDateTimeTag.java#L69-L82 |
11,130 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/ParseDateTimeTag.java | ParseDateTimeTag.setLocale | public void setLocale(Object loc) throws JspTagException {
if (loc == null
|| (loc instanceof String && ((String) loc).length() == 0)) {
this.locale = null;
} else if (loc instanceof Locale) {
this.locale = (Locale) loc;
} else {
locale = Util.... | java | public void setLocale(Object loc) throws JspTagException {
if (loc == null
|| (loc instanceof String && ((String) loc).length() == 0)) {
this.locale = null;
} else if (loc instanceof Locale) {
this.locale = (Locale) loc;
} else {
locale = Util.... | [
"public",
"void",
"setLocale",
"(",
"Object",
"loc",
")",
"throws",
"JspTagException",
"{",
"if",
"(",
"loc",
"==",
"null",
"||",
"(",
"loc",
"instanceof",
"String",
"&&",
"(",
"(",
"String",
")",
"loc",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
... | Sets the style attribute.
@param loc the locale | [
"Sets",
"the",
"style",
"attribute",
"."
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/ParseDateTimeTag.java#L89-L98 |
11,131 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/JodaTagLibraryValidator.java | JodaTagLibraryValidator.hasNoInvalidScope | protected boolean hasNoInvalidScope(Attributes a) {
String scope = a.getValue(SCOPE);
if ((scope != null) && !scope.equals(PAGE_SCOPE)
&& !scope.equals(REQUEST_SCOPE) && !scope.equals(SESSION_SCOPE)
&& !scope.equals(APPLICATION_SCOPE)) {
return false;
... | java | protected boolean hasNoInvalidScope(Attributes a) {
String scope = a.getValue(SCOPE);
if ((scope != null) && !scope.equals(PAGE_SCOPE)
&& !scope.equals(REQUEST_SCOPE) && !scope.equals(SESSION_SCOPE)
&& !scope.equals(APPLICATION_SCOPE)) {
return false;
... | [
"protected",
"boolean",
"hasNoInvalidScope",
"(",
"Attributes",
"a",
")",
"{",
"String",
"scope",
"=",
"a",
".",
"getValue",
"(",
"SCOPE",
")",
";",
"if",
"(",
"(",
"scope",
"!=",
"null",
")",
"&&",
"!",
"scope",
".",
"equals",
"(",
"PAGE_SCOPE",
")",
... | returns true if the 'scope' attribute is valid | [
"returns",
"true",
"if",
"the",
"scope",
"attribute",
"is",
"valid"
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/JodaTagLibraryValidator.java#L246-L254 |
11,132 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/JodaTagLibraryValidator.java | JodaTagLibraryValidator.hasDanglingScope | protected boolean hasDanglingScope(Attributes a) {
return (a.getValue(SCOPE) != null && a.getValue(VAR) == null);
} | java | protected boolean hasDanglingScope(Attributes a) {
return (a.getValue(SCOPE) != null && a.getValue(VAR) == null);
} | [
"protected",
"boolean",
"hasDanglingScope",
"(",
"Attributes",
"a",
")",
"{",
"return",
"(",
"a",
".",
"getValue",
"(",
"SCOPE",
")",
"!=",
"null",
"&&",
"a",
".",
"getValue",
"(",
"VAR",
")",
"==",
"null",
")",
";",
"}"
] | returns true if the 'scope' attribute is present without 'var' | [
"returns",
"true",
"if",
"the",
"scope",
"attribute",
"is",
"present",
"without",
"var"
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/JodaTagLibraryValidator.java#L262-L264 |
11,133 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/JodaTagLibraryValidator.java | JodaTagLibraryValidator.getLocalPart | protected String getLocalPart(String qname) {
int colon = qname.indexOf(":");
return (colon == -1) ? qname : qname.substring(colon + 1);
} | java | protected String getLocalPart(String qname) {
int colon = qname.indexOf(":");
return (colon == -1) ? qname : qname.substring(colon + 1);
} | [
"protected",
"String",
"getLocalPart",
"(",
"String",
"qname",
")",
"{",
"int",
"colon",
"=",
"qname",
".",
"indexOf",
"(",
"\":\"",
")",
";",
"return",
"(",
"colon",
"==",
"-",
"1",
")",
"?",
"qname",
":",
"qname",
".",
"substring",
"(",
"colon",
"+... | retrieves the local part of a QName | [
"retrieves",
"the",
"local",
"part",
"of",
"a",
"QName"
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/JodaTagLibraryValidator.java#L267-L270 |
11,134 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/server/commandBus/CommandBusOnServer.java | CommandBusOnServer.executeGetOperation | private void executeGetOperation(HttpServletRequest request, HttpServletResponse response)
throws IOException, ClassNotFoundException {
if (request.getContentLength() > 0) {
response.setStatus(HttpServletResponse.SC_NO_CONTENT);
ObjectInputStream input = new ObjectInputStream(new... | java | private void executeGetOperation(HttpServletRequest request, HttpServletResponse response)
throws IOException, ClassNotFoundException {
if (request.getContentLength() > 0) {
response.setStatus(HttpServletResponse.SC_NO_CONTENT);
ObjectInputStream input = new ObjectInputStream(new... | [
"private",
"void",
"executeGetOperation",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"if",
"(",
"request",
".",
"getContentLength",
"(",
")",
">",
"0",
")",
"{",
"... | Container-to-Client command execution | [
"Container",
"-",
"to",
"-",
"Client",
"command",
"execution"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/server/commandBus/CommandBusOnServer.java#L113-L131 |
11,135 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/server/commandBus/CommandBusOnServer.java | CommandBusOnServer.executePutOperation | private void executePutOperation(HttpServletRequest request, HttpServletResponse response)
throws IOException, ClassNotFoundException {
if (request.getContentLength() > 0) {
ObjectInputStream input = new ObjectInputStream(new BufferedInputStream(request.getInputStream()));
Comman... | java | private void executePutOperation(HttpServletRequest request, HttpServletResponse response)
throws IOException, ClassNotFoundException {
if (request.getContentLength() > 0) {
ObjectInputStream input = new ObjectInputStream(new BufferedInputStream(request.getInputStream()));
Comman... | [
"private",
"void",
"executePutOperation",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"if",
"(",
"request",
".",
"getContentLength",
"(",
")",
">",
"0",
")",
"{",
"... | Client-to-Container event propagation | [
"Client",
"-",
"to",
"-",
"Container",
"event",
"propagation"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/server/commandBus/CommandBusOnServer.java#L136-L160 |
11,136 | datasift/datasift-java | src/main/java/com/datasift/client/DataSiftClient.java | DataSiftClient.dpu | public FutureData<Dpu> dpu(String historicsId) {
final FutureData<Dpu> future = new FutureData<Dpu>();
URI uri = newParams().put("historics_id", historicsId).forURL(config.newAPIEndpointURI(DPU));
Request request = config.http().GET(uri, new PageReader(newRequestCallback(future, new Dpu(), confi... | java | public FutureData<Dpu> dpu(String historicsId) {
final FutureData<Dpu> future = new FutureData<Dpu>();
URI uri = newParams().put("historics_id", historicsId).forURL(config.newAPIEndpointURI(DPU));
Request request = config.http().GET(uri, new PageReader(newRequestCallback(future, new Dpu(), confi... | [
"public",
"FutureData",
"<",
"Dpu",
">",
"dpu",
"(",
"String",
"historicsId",
")",
"{",
"final",
"FutureData",
"<",
"Dpu",
">",
"future",
"=",
"new",
"FutureData",
"<",
"Dpu",
">",
"(",
")",
";",
"URI",
"uri",
"=",
"newParams",
"(",
")",
".",
"put",
... | Retrieve the DPU usage of a historics job
@param historicsId id of the historics job to get the DPU usage of
@return future containing DPU response | [
"Retrieve",
"the",
"DPU",
"usage",
"of",
"a",
"historics",
"job"
] | 09de124f2a1a507ff6181e59875c6f325290850e | https://github.com/datasift/datasift-java/blob/09de124f2a1a507ff6181e59875c6f325290850e/src/main/java/com/datasift/client/DataSiftClient.java#L210-L216 |
11,137 | spotify/docgenerator | scanner/src/main/java/com/spotify/docgenerator/JacksonJerseyAnnotationProcessor.java | JacksonJerseyAnnotationProcessor.computeRequestMethod | private String computeRequestMethod(Element e) {
for (AnnotationMirror am : e.getAnnotationMirrors()) {
final String typeString = am.getAnnotationType().toString();
if (typeString.endsWith(".GET")) {
return "GET";
} else if (typeString.endsWith(".PUT")) {
return "PUT";
} else... | java | private String computeRequestMethod(Element e) {
for (AnnotationMirror am : e.getAnnotationMirrors()) {
final String typeString = am.getAnnotationType().toString();
if (typeString.endsWith(".GET")) {
return "GET";
} else if (typeString.endsWith(".PUT")) {
return "PUT";
} else... | [
"private",
"String",
"computeRequestMethod",
"(",
"Element",
"e",
")",
"{",
"for",
"(",
"AnnotationMirror",
"am",
":",
"e",
".",
"getAnnotationMirrors",
"(",
")",
")",
"{",
"final",
"String",
"typeString",
"=",
"am",
".",
"getAnnotationType",
"(",
")",
".",
... | Find the request method annotation the method was annotated with and return a string
representing the request method. | [
"Find",
"the",
"request",
"method",
"annotation",
"the",
"method",
"was",
"annotated",
"with",
"and",
"return",
"a",
"string",
"representing",
"the",
"request",
"method",
"."
] | a7965f6d4a1546864a3f8584b86841cef9ac2f65 | https://github.com/spotify/docgenerator/blob/a7965f6d4a1546864a3f8584b86841cef9ac2f65/scanner/src/main/java/com/spotify/docgenerator/JacksonJerseyAnnotationProcessor.java#L187-L204 |
11,138 | spotify/docgenerator | scanner/src/main/java/com/spotify/docgenerator/JacksonJerseyAnnotationProcessor.java | JacksonJerseyAnnotationProcessor.generateOutput | private void generateOutput() {
final Filer filer = processingEnv.getFiler();
writeJsonToFile(filer, "JSONClasses", jsonClasses);
writeJsonToFile(filer, "debugcrud", debugMessages);
final List<ResourceMethod> resources = Lists.newArrayList();
for (ResourceClass klass : resourceClasses.values()) {
... | java | private void generateOutput() {
final Filer filer = processingEnv.getFiler();
writeJsonToFile(filer, "JSONClasses", jsonClasses);
writeJsonToFile(filer, "debugcrud", debugMessages);
final List<ResourceMethod> resources = Lists.newArrayList();
for (ResourceClass klass : resourceClasses.values()) {
... | [
"private",
"void",
"generateOutput",
"(",
")",
"{",
"final",
"Filer",
"filer",
"=",
"processingEnv",
".",
"getFiler",
"(",
")",
";",
"writeJsonToFile",
"(",
"filer",
",",
"\"JSONClasses\"",
",",
"jsonClasses",
")",
";",
"writeJsonToFile",
"(",
"filer",
",",
... | Dump the contents of our discoveries. | [
"Dump",
"the",
"contents",
"of",
"our",
"discoveries",
"."
] | a7965f6d4a1546864a3f8584b86841cef9ac2f65 | https://github.com/spotify/docgenerator/blob/a7965f6d4a1546864a3f8584b86841cef9ac2f65/scanner/src/main/java/com/spotify/docgenerator/JacksonJerseyAnnotationProcessor.java#L318-L335 |
11,139 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/client/deployment/DeploymentEnricher.java | DeploymentEnricher.process | @Override
public void process(TestDeployment testDeployment, Archive<?> protocolArchive) {
final TestClass testClass = this.testClass.get();
final Archive<?> applicationArchive = testDeployment.getApplicationArchive();
if (WarpCommons.isWarpTest(testClass.getJavaClass())) {
if (... | java | @Override
public void process(TestDeployment testDeployment, Archive<?> protocolArchive) {
final TestClass testClass = this.testClass.get();
final Archive<?> applicationArchive = testDeployment.getApplicationArchive();
if (WarpCommons.isWarpTest(testClass.getJavaClass())) {
if (... | [
"@",
"Override",
"public",
"void",
"process",
"(",
"TestDeployment",
"testDeployment",
",",
"Archive",
"<",
"?",
">",
"protocolArchive",
")",
"{",
"final",
"TestClass",
"testClass",
"=",
"this",
".",
"testClass",
".",
"get",
"(",
")",
";",
"final",
"Archive"... | Adds Warp archive to the protocol archive to make it available for WARs and EARs. | [
"Adds",
"Warp",
"archive",
"to",
"the",
"protocol",
"archive",
"to",
"make",
"it",
"available",
"for",
"WARs",
"and",
"EARs",
"."
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/client/deployment/DeploymentEnricher.java#L106-L123 |
11,140 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/client/deployment/DeploymentEnricher.java | DeploymentEnricher.addWarpExtensionsDeployment | private void addWarpExtensionsDeployment(WebArchive archive) {
final Collection<WarpDeploymentEnrichmentExtension> lifecycleExtensions = serviceLoader.get().all(
WarpDeploymentEnrichmentExtension.class);
for (WarpDeploymentEnrichmentExtension extension : lifecycleExtensions) {
J... | java | private void addWarpExtensionsDeployment(WebArchive archive) {
final Collection<WarpDeploymentEnrichmentExtension> lifecycleExtensions = serviceLoader.get().all(
WarpDeploymentEnrichmentExtension.class);
for (WarpDeploymentEnrichmentExtension extension : lifecycleExtensions) {
J... | [
"private",
"void",
"addWarpExtensionsDeployment",
"(",
"WebArchive",
"archive",
")",
"{",
"final",
"Collection",
"<",
"WarpDeploymentEnrichmentExtension",
">",
"lifecycleExtensions",
"=",
"serviceLoader",
".",
"get",
"(",
")",
".",
"all",
"(",
"WarpDeploymentEnrichmentE... | Adds all Warp lifecycle extension packages to the archive | [
"Adds",
"all",
"Warp",
"lifecycle",
"extension",
"packages",
"to",
"the",
"archive"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/client/deployment/DeploymentEnricher.java#L135-L146 |
11,141 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/Util.java | Util.getScope | public static int getScope(String scope) {
int ret = PageContext.PAGE_SCOPE; // default
if (REQUEST.equalsIgnoreCase(scope)) {
ret = PageContext.REQUEST_SCOPE;
} else if (SESSION.equalsIgnoreCase(scope)) {
ret = PageContext.SESSION_SCOPE;
} else if (APPLICATION.e... | java | public static int getScope(String scope) {
int ret = PageContext.PAGE_SCOPE; // default
if (REQUEST.equalsIgnoreCase(scope)) {
ret = PageContext.REQUEST_SCOPE;
} else if (SESSION.equalsIgnoreCase(scope)) {
ret = PageContext.SESSION_SCOPE;
} else if (APPLICATION.e... | [
"public",
"static",
"int",
"getScope",
"(",
"String",
"scope",
")",
"{",
"int",
"ret",
"=",
"PageContext",
".",
"PAGE_SCOPE",
";",
"// default",
"if",
"(",
"REQUEST",
".",
"equalsIgnoreCase",
"(",
"scope",
")",
")",
"{",
"ret",
"=",
"PageContext",
".",
"... | Converts the given string description of a scope to the corresponding
PageContext constant.
The validity of the given scope has already been checked by the
appropriate TLV.
@param scope String description of scope
@return PageContext constant corresponding to given scope description | [
"Converts",
"the",
"given",
"string",
"description",
"of",
"a",
"scope",
"to",
"the",
"corresponding",
"PageContext",
"constant",
"."
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/Util.java#L69-L80 |
11,142 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/Util.java | Util.findFormattingMatch | private static Locale findFormattingMatch(Locale pref, Locale[] avail) {
Locale match = null;
boolean langAndCountryMatch = false;
for (int i = 0; i < avail.length; i++) {
if (pref.equals(avail[i])) {
// Exact match
match = avail[i];
br... | java | private static Locale findFormattingMatch(Locale pref, Locale[] avail) {
Locale match = null;
boolean langAndCountryMatch = false;
for (int i = 0; i < avail.length; i++) {
if (pref.equals(avail[i])) {
// Exact match
match = avail[i];
br... | [
"private",
"static",
"Locale",
"findFormattingMatch",
"(",
"Locale",
"pref",
",",
"Locale",
"[",
"]",
"avail",
")",
"{",
"Locale",
"match",
"=",
"null",
";",
"boolean",
"langAndCountryMatch",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",... | Returns the best match between the given preferred locale and the given
available locales.
The best match is given as the first available locale that exactly
matches the given preferred locale ("exact match"). If no exact match
exists, the best match is given to an available locale that meets the
following criteria (i... | [
"Returns",
"the",
"best",
"match",
"between",
"the",
"given",
"preferred",
"locale",
"and",
"the",
"given",
"available",
"locales",
"."
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/Util.java#L406-L431 |
11,143 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/Util.java | Util.getLocalizationContext | public static LocalizationContext getLocalizationContext(PageContext pc) {
LocalizationContext locCtxt = null;
Object obj = Config.find(pc, Config.FMT_LOCALIZATION_CONTEXT);
if (obj == null) {
return null;
}
if (obj instanceof LocalizationContext) {
locC... | java | public static LocalizationContext getLocalizationContext(PageContext pc) {
LocalizationContext locCtxt = null;
Object obj = Config.find(pc, Config.FMT_LOCALIZATION_CONTEXT);
if (obj == null) {
return null;
}
if (obj instanceof LocalizationContext) {
locC... | [
"public",
"static",
"LocalizationContext",
"getLocalizationContext",
"(",
"PageContext",
"pc",
")",
"{",
"LocalizationContext",
"locCtxt",
"=",
"null",
";",
"Object",
"obj",
"=",
"Config",
".",
"find",
"(",
"pc",
",",
"Config",
".",
"FMT_LOCALIZATION_CONTEXT",
")"... | Gets the default I18N localization context.
@param pc Page in which to look up the default I18N localization context | [
"Gets",
"the",
"default",
"I18N",
"localization",
"context",
"."
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/Util.java#L438-L454 |
11,144 | nmorel/gwt-jackson-rest | api/src/main/java/com/github/nmorel/gwtjackson/rest/api/RestRequestBuilder.java | RestRequestBuilder.addQueryParam | public RestRequestBuilder<B, R> addQueryParam( String name, Collection<?> values ) {
if ( null != values ) {
List<Object> allValues = getQueryParams( name );
allValues.addAll( values );
}
return this;
} | java | public RestRequestBuilder<B, R> addQueryParam( String name, Collection<?> values ) {
if ( null != values ) {
List<Object> allValues = getQueryParams( name );
allValues.addAll( values );
}
return this;
} | [
"public",
"RestRequestBuilder",
"<",
"B",
",",
"R",
">",
"addQueryParam",
"(",
"String",
"name",
",",
"Collection",
"<",
"?",
">",
"values",
")",
"{",
"if",
"(",
"null",
"!=",
"values",
")",
"{",
"List",
"<",
"Object",
">",
"allValues",
"=",
"getQueryP... | Add a query parameter. If a null or empty collection is passed, the param is ignored.
@param name Name of the parameter
@param values Value of the parameter
@return this builder | [
"Add",
"a",
"query",
"parameter",
".",
"If",
"a",
"null",
"or",
"empty",
"collection",
"is",
"passed",
"the",
"param",
"is",
"ignored",
"."
] | 2493554a4e61a33644931da58d27145553572f09 | https://github.com/nmorel/gwt-jackson-rest/blob/2493554a4e61a33644931da58d27145553572f09/api/src/main/java/com/github/nmorel/gwtjackson/rest/api/RestRequestBuilder.java#L188-L194 |
11,145 | nmorel/gwt-jackson-rest | api/src/main/java/com/github/nmorel/gwtjackson/rest/api/RestRequestBuilder.java | RestRequestBuilder.addQueryParam | public RestRequestBuilder<B, R> addQueryParam( String name, Object[] values ) {
if ( null != values ) {
List<Object> allValues = getQueryParams( name );
for ( Object value : values ) {
allValues.add( value );
}
}
return this;
} | java | public RestRequestBuilder<B, R> addQueryParam( String name, Object[] values ) {
if ( null != values ) {
List<Object> allValues = getQueryParams( name );
for ( Object value : values ) {
allValues.add( value );
}
}
return this;
} | [
"public",
"RestRequestBuilder",
"<",
"B",
",",
"R",
">",
"addQueryParam",
"(",
"String",
"name",
",",
"Object",
"[",
"]",
"values",
")",
"{",
"if",
"(",
"null",
"!=",
"values",
")",
"{",
"List",
"<",
"Object",
">",
"allValues",
"=",
"getQueryParams",
"... | Add a query parameter. If a null or empty array is passed, the param is ignored.
@param name Name of the parameter
@param values Value of the parameter
@return this builder | [
"Add",
"a",
"query",
"parameter",
".",
"If",
"a",
"null",
"or",
"empty",
"array",
"is",
"passed",
"the",
"param",
"is",
"ignored",
"."
] | 2493554a4e61a33644931da58d27145553572f09 | https://github.com/nmorel/gwt-jackson-rest/blob/2493554a4e61a33644931da58d27145553572f09/api/src/main/java/com/github/nmorel/gwtjackson/rest/api/RestRequestBuilder.java#L204-L212 |
11,146 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/utils/Base64.java | Base64.encodeInteger | public static byte[] encodeInteger(BigInteger bigInt) {
if (bigInt == null) {
throw new NullPointerException("encodeInteger called with null parameter");
}
return encodeBase64(toIntegerBytes(bigInt), false);
} | java | public static byte[] encodeInteger(BigInteger bigInt) {
if (bigInt == null) {
throw new NullPointerException("encodeInteger called with null parameter");
}
return encodeBase64(toIntegerBytes(bigInt), false);
} | [
"public",
"static",
"byte",
"[",
"]",
"encodeInteger",
"(",
"BigInteger",
"bigInt",
")",
"{",
"if",
"(",
"bigInt",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"encodeInteger called with null parameter\"",
")",
";",
"}",
"return",
"enco... | Encodes to a byte64-encoded integer according to crypto standards such as W3C's XML-Signature
@param bigInt a BigInteger
@return A byte array containing base64 character data
@throws NullPointerException if null is passed in
@since 1.4 | [
"Encodes",
"to",
"a",
"byte64",
"-",
"encoded",
"integer",
"according",
"to",
"crypto",
"standards",
"such",
"as",
"W3C",
"s",
"XML",
"-",
"Signature"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/utils/Base64.java#L662-L667 |
11,147 | nmorel/gwt-jackson-rest | processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/RestServiceMethod.java | RestServiceMethod.removeEnclosedCurlyBraces | private String removeEnclosedCurlyBraces( String str ) {
final char curlyReplacement = 6;
char[] chars = str.toCharArray();
int open = 0;
for ( int i = 0; i < chars.length; i++ ) {
if ( chars[i] == '{' ) {
if ( open != 0 ) chars[i] = curlyReplacement;
... | java | private String removeEnclosedCurlyBraces( String str ) {
final char curlyReplacement = 6;
char[] chars = str.toCharArray();
int open = 0;
for ( int i = 0; i < chars.length; i++ ) {
if ( chars[i] == '{' ) {
if ( open != 0 ) chars[i] = curlyReplacement;
... | [
"private",
"String",
"removeEnclosedCurlyBraces",
"(",
"String",
"str",
")",
"{",
"final",
"char",
"curlyReplacement",
"=",
"6",
";",
"char",
"[",
"]",
"chars",
"=",
"str",
".",
"toCharArray",
"(",
")",
";",
"int",
"open",
"=",
"0",
";",
"for",
"(",
"i... | Enclosed curly braces cannot be matched with a regex. Thus we remove them before applying the replaceAll method | [
"Enclosed",
"curly",
"braces",
"cannot",
"be",
"matched",
"with",
"a",
"regex",
".",
"Thus",
"we",
"remove",
"them",
"before",
"applying",
"the",
"replaceAll",
"method"
] | 2493554a4e61a33644931da58d27145553572f09 | https://github.com/nmorel/gwt-jackson-rest/blob/2493554a4e61a33644931da58d27145553572f09/processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/RestServiceMethod.java#L91-L118 |
11,148 | arquillian/arquillian-extension-warp | api/src/main/java/org/jboss/arquillian/warp/Warp.java | Warp.initiate | public static WarpExecutionBuilder initiate(Activity activity) {
WarpRuntime runtime = WarpRuntime.getInstance();
if (runtime == null) {
throw new IllegalStateException(
"The Warp runtime isn't initialized. You need to make sure arquillian-warp-impl is on classpath and anno... | java | public static WarpExecutionBuilder initiate(Activity activity) {
WarpRuntime runtime = WarpRuntime.getInstance();
if (runtime == null) {
throw new IllegalStateException(
"The Warp runtime isn't initialized. You need to make sure arquillian-warp-impl is on classpath and anno... | [
"public",
"static",
"WarpExecutionBuilder",
"initiate",
"(",
"Activity",
"activity",
")",
"{",
"WarpRuntime",
"runtime",
"=",
"WarpRuntime",
".",
"getInstance",
"(",
")",
";",
"if",
"(",
"runtime",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",... | Takes client activity which should be performed in order to cause server request.
@param activity the client activity to execute
@return {@link WarpActivityBuilder} instance | [
"Takes",
"client",
"activity",
"which",
"should",
"be",
"performed",
"in",
"order",
"to",
"cause",
"server",
"request",
"."
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/api/src/main/java/org/jboss/arquillian/warp/Warp.java#L36-L46 |
11,149 | joakime/android-apk-parser | src/main/java/net/erdfelt/android/apk/io/LEInputStream.java | LEInputStream.readInt | public int readInt() throws IOException {
int value = 0;
value += (read() & 0xff) << 0;
value += (read() & 0xff) << 8;
value += (read() & 0xff) << 16;
value += (read() & 0xff) << 24;
return (int) value;
} | java | public int readInt() throws IOException {
int value = 0;
value += (read() & 0xff) << 0;
value += (read() & 0xff) << 8;
value += (read() & 0xff) << 16;
value += (read() & 0xff) << 24;
return (int) value;
} | [
"public",
"int",
"readInt",
"(",
")",
"throws",
"IOException",
"{",
"int",
"value",
"=",
"0",
";",
"value",
"+=",
"(",
"read",
"(",
")",
"&",
"0xff",
")",
"<<",
"0",
";",
"value",
"+=",
"(",
"read",
"(",
")",
"&",
"0xff",
")",
"<<",
"8",
";",
... | Read 32bit word as integer.
@return the integer value
@throws IOException | [
"Read",
"32bit",
"word",
"as",
"integer",
"."
] | fe7be2f15ae1134834fea826eb2b94073b3c93e3 | https://github.com/joakime/android-apk-parser/blob/fe7be2f15ae1134834fea826eb2b94073b3c93e3/src/main/java/net/erdfelt/android/apk/io/LEInputStream.java#L53-L60 |
11,150 | joakime/android-apk-parser | src/main/java/net/erdfelt/android/apk/io/LEInputStream.java | LEInputStream.readIntArray | public int[] readIntArray(int length) throws IOException {
int arr[] = new int[length];
for (int i = 0; i < length; i++) {
arr[i] = readInt();
}
return arr;
} | java | public int[] readIntArray(int length) throws IOException {
int arr[] = new int[length];
for (int i = 0; i < length; i++) {
arr[i] = readInt();
}
return arr;
} | [
"public",
"int",
"[",
"]",
"readIntArray",
"(",
"int",
"length",
")",
"throws",
"IOException",
"{",
"int",
"arr",
"[",
"]",
"=",
"new",
"int",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
"... | Read an array of 32bit words.
@param length
size of the array (in 32bit word count, not byte count)
@return the array of 32bit words
@throws IOException | [
"Read",
"an",
"array",
"of",
"32bit",
"words",
"."
] | fe7be2f15ae1134834fea826eb2b94073b3c93e3 | https://github.com/joakime/android-apk-parser/blob/fe7be2f15ae1134834fea826eb2b94073b3c93e3/src/main/java/net/erdfelt/android/apk/io/LEInputStream.java#L85-L91 |
11,151 | joakime/android-apk-parser | src/main/java/net/erdfelt/android/apk/io/LEInputStream.java | LEInputStream.readByteArray | public byte[] readByteArray(int length) throws IOException {
byte buf[] = new byte[length];
for (int i = 0; i < length; i++) {
buf[i] = (byte) read();
}
return buf;
} | java | public byte[] readByteArray(int length) throws IOException {
byte buf[] = new byte[length];
for (int i = 0; i < length; i++) {
buf[i] = (byte) read();
}
return buf;
} | [
"public",
"byte",
"[",
"]",
"readByteArray",
"(",
"int",
"length",
")",
"throws",
"IOException",
"{",
"byte",
"buf",
"[",
"]",
"=",
"new",
"byte",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",... | Read an array of bytes.
@param length
size of the array (in bytes)
@return the array of bytes
@throws IOException | [
"Read",
"an",
"array",
"of",
"bytes",
"."
] | fe7be2f15ae1134834fea826eb2b94073b3c93e3 | https://github.com/joakime/android-apk-parser/blob/fe7be2f15ae1134834fea826eb2b94073b3c93e3/src/main/java/net/erdfelt/android/apk/io/LEInputStream.java#L101-L107 |
11,152 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/utils/Rethrow.java | Rethrow.asUnchecked | public static void asUnchecked(Throwable t, Class<? extends RuntimeException> checkedExceptionWrapper) {
if (t instanceof AssertionError) {
throw (AssertionError) t;
} else if (t instanceof RuntimeException) {
throw (RuntimeException) t;
} else {
RuntimeExcept... | java | public static void asUnchecked(Throwable t, Class<? extends RuntimeException> checkedExceptionWrapper) {
if (t instanceof AssertionError) {
throw (AssertionError) t;
} else if (t instanceof RuntimeException) {
throw (RuntimeException) t;
} else {
RuntimeExcept... | [
"public",
"static",
"void",
"asUnchecked",
"(",
"Throwable",
"t",
",",
"Class",
"<",
"?",
"extends",
"RuntimeException",
">",
"checkedExceptionWrapper",
")",
"{",
"if",
"(",
"t",
"instanceof",
"AssertionError",
")",
"{",
"throw",
"(",
"AssertionError",
")",
"t... | Checks whether given throwable is unchecked and if not, it will be wrapped as unchecked exception of given type | [
"Checks",
"whether",
"given",
"throwable",
"is",
"unchecked",
"and",
"if",
"not",
"it",
"will",
"be",
"wrapped",
"as",
"unchecked",
"exception",
"of",
"given",
"type"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/utils/Rethrow.java#L41-L55 |
11,153 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/Resources.java | Resources.getMessage | public static String getMessage(String name, Object[] a)
throws MissingResourceException {
String res = rb.getString(name);
return MessageFormat.format(res, a);
} | java | public static String getMessage(String name, Object[] a)
throws MissingResourceException {
String res = rb.getString(name);
return MessageFormat.format(res, a);
} | [
"public",
"static",
"String",
"getMessage",
"(",
"String",
"name",
",",
"Object",
"[",
"]",
"a",
")",
"throws",
"MissingResourceException",
"{",
"String",
"res",
"=",
"rb",
".",
"getString",
"(",
"name",
")",
";",
"return",
"MessageFormat",
".",
"format",
... | Retrieves a message with arbitrarily many arguments. | [
"Retrieves",
"a",
"message",
"with",
"arbitrarily",
"many",
"arguments",
"."
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/Resources.java#L64-L68 |
11,154 | JodaOrg/joda-time-jsptags | src/main/java/org/joda/time/contrib/jsptag/Resources.java | Resources.getMessage | public static String getMessage(String name,
Object a1,
Object a2,
Object a3,
Object a4)
throws MissingResourceException {
return getMessage(name, new Object[] { a1, a2, a3, a4 });
} | java | public static String getMessage(String name,
Object a1,
Object a2,
Object a3,
Object a4)
throws MissingResourceException {
return getMessage(name, new Object[] { a1, a2, a3, a4 });
} | [
"public",
"static",
"String",
"getMessage",
"(",
"String",
"name",
",",
"Object",
"a1",
",",
"Object",
"a2",
",",
"Object",
"a3",
",",
"Object",
"a4",
")",
"throws",
"MissingResourceException",
"{",
"return",
"getMessage",
"(",
"name",
",",
"new",
"Object",
... | Retrieves a message with four arguments. | [
"Retrieves",
"a",
"message",
"with",
"four",
"arguments",
"."
] | 69008a813568cb6f3e37ea7a80f8b1f2070edf14 | https://github.com/JodaOrg/joda-time-jsptags/blob/69008a813568cb6f3e37ea7a80f8b1f2070edf14/src/main/java/org/joda/time/contrib/jsptag/Resources.java#L92-L99 |
11,155 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/client/verification/SecurityActions.java | SecurityActions.getAncestors | static Class<?>[] getAncestors(Class<?> clazz) {
Set<Class<?>> classes = new HashSet<Class<?>>();
while (clazz != null) {
classes.add(clazz);
if (clazz.getSuperclass() != null) {
classes.add(clazz.getSuperclass());
}
classes.addAll(Arrays.a... | java | static Class<?>[] getAncestors(Class<?> clazz) {
Set<Class<?>> classes = new HashSet<Class<?>>();
while (clazz != null) {
classes.add(clazz);
if (clazz.getSuperclass() != null) {
classes.add(clazz.getSuperclass());
}
classes.addAll(Arrays.a... | [
"static",
"Class",
"<",
"?",
">",
"[",
"]",
"getAncestors",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"classes",
"=",
"new",
"HashSet",
"<",
"Class",
"<",
"?",
">",
">",
"(",
")",
";",
"while",
"... | Get all subclasses and interfaces in whole class hierarchy | [
"Get",
"all",
"subclasses",
"and",
"interfaces",
"in",
"whole",
"class",
"hierarchy"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/client/verification/SecurityActions.java#L293-L309 |
11,156 | nmorel/gwt-jackson-rest | processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/GenRestBuilderProcessor.java | GenRestBuilderProcessor.generateBuilder | private TypeSpec generateBuilder( RestService restService ) {
TypeSpec.Builder typeBuilder = TypeSpec.classBuilder( restService.getBuilderSimpleClassName() )
.addModifiers( Modifier.PUBLIC, Modifier.FINAL )
.addJavadoc( "Generated REST service builder for {@link $L}.\n", restSer... | java | private TypeSpec generateBuilder( RestService restService ) {
TypeSpec.Builder typeBuilder = TypeSpec.classBuilder( restService.getBuilderSimpleClassName() )
.addModifiers( Modifier.PUBLIC, Modifier.FINAL )
.addJavadoc( "Generated REST service builder for {@link $L}.\n", restSer... | [
"private",
"TypeSpec",
"generateBuilder",
"(",
"RestService",
"restService",
")",
"{",
"TypeSpec",
".",
"Builder",
"typeBuilder",
"=",
"TypeSpec",
".",
"classBuilder",
"(",
"restService",
".",
"getBuilderSimpleClassName",
"(",
")",
")",
".",
"addModifiers",
"(",
"... | Generate the rest service builder
@param restService The rest service | [
"Generate",
"the",
"rest",
"service",
"builder"
] | 2493554a4e61a33644931da58d27145553572f09 | https://github.com/nmorel/gwt-jackson-rest/blob/2493554a4e61a33644931da58d27145553572f09/processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/GenRestBuilderProcessor.java#L153-L167 |
11,157 | nmorel/gwt-jackson-rest | processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/GenRestBuilderProcessor.java | GenRestBuilderProcessor.note | public void note( Element e, String msg, Object... args ) {
messager.printMessage( Diagnostic.Kind.NOTE, String.format( msg, args ), e );
} | java | public void note( Element e, String msg, Object... args ) {
messager.printMessage( Diagnostic.Kind.NOTE, String.format( msg, args ), e );
} | [
"public",
"void",
"note",
"(",
"Element",
"e",
",",
"String",
"msg",
",",
"Object",
"...",
"args",
")",
"{",
"messager",
".",
"printMessage",
"(",
"Diagnostic",
".",
"Kind",
".",
"NOTE",
",",
"String",
".",
"format",
"(",
"msg",
",",
"args",
")",
","... | Prints a note message
@param e The element which has caused the error. Can be null
@param msg The error message
@param args if the error message contains %s, %d etc. placeholders this arguments will be used
to replace them | [
"Prints",
"a",
"note",
"message"
] | 2493554a4e61a33644931da58d27145553572f09 | https://github.com/nmorel/gwt-jackson-rest/blob/2493554a4e61a33644931da58d27145553572f09/processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/GenRestBuilderProcessor.java#L340-L342 |
11,158 | nmorel/gwt-jackson-rest | processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/GenRestBuilderProcessor.java | GenRestBuilderProcessor.warn | public void warn( Element e, String msg, Object... args ) {
messager.printMessage( Diagnostic.Kind.WARNING, String.format( msg, args ), e );
} | java | public void warn( Element e, String msg, Object... args ) {
messager.printMessage( Diagnostic.Kind.WARNING, String.format( msg, args ), e );
} | [
"public",
"void",
"warn",
"(",
"Element",
"e",
",",
"String",
"msg",
",",
"Object",
"...",
"args",
")",
"{",
"messager",
".",
"printMessage",
"(",
"Diagnostic",
".",
"Kind",
".",
"WARNING",
",",
"String",
".",
"format",
"(",
"msg",
",",
"args",
")",
... | Prints a warning message
@param e The element which has caused the error. Can be null
@param msg The error message
@param args if the error message contains %s, %d etc. placeholders this arguments will be used
to replace them | [
"Prints",
"a",
"warning",
"message"
] | 2493554a4e61a33644931da58d27145553572f09 | https://github.com/nmorel/gwt-jackson-rest/blob/2493554a4e61a33644931da58d27145553572f09/processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/GenRestBuilderProcessor.java#L352-L354 |
11,159 | nmorel/gwt-jackson-rest | processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/GenRestBuilderProcessor.java | GenRestBuilderProcessor.error | public void error( Element e, String msg, Object... args ) {
messager.printMessage( Diagnostic.Kind.ERROR, String.format( msg, args ), e );
} | java | public void error( Element e, String msg, Object... args ) {
messager.printMessage( Diagnostic.Kind.ERROR, String.format( msg, args ), e );
} | [
"public",
"void",
"error",
"(",
"Element",
"e",
",",
"String",
"msg",
",",
"Object",
"...",
"args",
")",
"{",
"messager",
".",
"printMessage",
"(",
"Diagnostic",
".",
"Kind",
".",
"ERROR",
",",
"String",
".",
"format",
"(",
"msg",
",",
"args",
")",
"... | Prints an error message
@param e The element which has caused the error. Can be null
@param msg The error message
@param args if the error message contains %s, %d etc. placeholders this arguments will be used
to replace them | [
"Prints",
"an",
"error",
"message"
] | 2493554a4e61a33644931da58d27145553572f09 | https://github.com/nmorel/gwt-jackson-rest/blob/2493554a4e61a33644931da58d27145553572f09/processor/src/main/java/com/github/nmorel/gwtjackson/rest/processor/GenRestBuilderProcessor.java#L364-L366 |
11,160 | datasift/datasift-java | src/main/java/com/datasift/client/managedsource/sources/FacebookPage.java | FacebookPage.addInstagramLinkedPage | public FacebookPage addInstagramLinkedPage(String pageid) {
ResourceParams parameterSet = newResourceParams();
parameterSet.set("id", pageid);
parameterSet.set("type", "instagram");
return this;
} | java | public FacebookPage addInstagramLinkedPage(String pageid) {
ResourceParams parameterSet = newResourceParams();
parameterSet.set("id", pageid);
parameterSet.set("type", "instagram");
return this;
} | [
"public",
"FacebookPage",
"addInstagramLinkedPage",
"(",
"String",
"pageid",
")",
"{",
"ResourceParams",
"parameterSet",
"=",
"newResourceParams",
"(",
")",
";",
"parameterSet",
".",
"set",
"(",
"\"id\"",
",",
"pageid",
")",
";",
"parameterSet",
".",
"set",
"(",... | Add a facebook page to be crawled for instagram content
@param pageid the ID of the page, usually numerical
@return | [
"Add",
"a",
"facebook",
"page",
"to",
"be",
"crawled",
"for",
"instagram",
"content"
] | 09de124f2a1a507ff6181e59875c6f325290850e | https://github.com/datasift/datasift-java/blob/09de124f2a1a507ff6181e59875c6f325290850e/src/main/java/com/datasift/client/managedsource/sources/FacebookPage.java#L102-L107 |
11,161 | datasift/datasift-java | src/main/java/com/datasift/client/managedsource/sources/FacebookPage.java | FacebookPage.addInstagramUser | public FacebookPage addInstagramUser(String username) {
ResourceParams parameterSet = newResourceParams();
parameterSet.set("id", username);
parameterSet.set("type", "instagram_user");
return this;
} | java | public FacebookPage addInstagramUser(String username) {
ResourceParams parameterSet = newResourceParams();
parameterSet.set("id", username);
parameterSet.set("type", "instagram_user");
return this;
} | [
"public",
"FacebookPage",
"addInstagramUser",
"(",
"String",
"username",
")",
"{",
"ResourceParams",
"parameterSet",
"=",
"newResourceParams",
"(",
")",
";",
"parameterSet",
".",
"set",
"(",
"\"id\"",
",",
"username",
")",
";",
"parameterSet",
".",
"set",
"(",
... | Add an instagram user to be crawled for content
@param username ID of the user to be checked, usually a textual name
@return | [
"Add",
"an",
"instagram",
"user",
"to",
"be",
"crawled",
"for",
"content"
] | 09de124f2a1a507ff6181e59875c6f325290850e | https://github.com/datasift/datasift-java/blob/09de124f2a1a507ff6181e59875c6f325290850e/src/main/java/com/datasift/client/managedsource/sources/FacebookPage.java#L115-L120 |
11,162 | arquillian/arquillian-extension-warp | impl/src/main/java/org/jboss/arquillian/warp/impl/client/commandBus/CommandBusOnClient.java | CommandBusOnClient.execute | private <T> T execute(String url, Class<T> returnType, Object requestObject) throws Exception {
URLConnection connection = new URL(url).openConnection();
if (!(connection instanceof HttpURLConnection)) {
throw new IllegalStateException("Not an http connection! " + connection);
}
... | java | private <T> T execute(String url, Class<T> returnType, Object requestObject) throws Exception {
URLConnection connection = new URL(url).openConnection();
if (!(connection instanceof HttpURLConnection)) {
throw new IllegalStateException("Not an http connection! " + connection);
}
... | [
"private",
"<",
"T",
">",
"T",
"execute",
"(",
"String",
"url",
",",
"Class",
"<",
"T",
">",
"returnType",
",",
"Object",
"requestObject",
")",
"throws",
"Exception",
"{",
"URLConnection",
"connection",
"=",
"new",
"URL",
"(",
"url",
")",
".",
"openConne... | Executes the request to the remote url | [
"Executes",
"the",
"request",
"to",
"the",
"remote",
"url"
] | e958f4d782851baf7f40e39835d3d1ad185b74dd | https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/client/commandBus/CommandBusOnClient.java#L196-L268 |
11,163 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/persistency/GrammarIdDispenser.java | GrammarIdDispenser.getEqualGrammar | private Grammar getEqualGrammar(Grammar gr) {
for (Grammar gx : this.grammars) {
if (gr == gx) {
// System.out.println("Exactly the same grammar found: " + gx);
return gx;
}
if (isSameGrammarType(gr, gx)) {
// type of grammar the same
if (gr.getNumberOfEvents() == gx.getNumberOfEvents()) {... | java | private Grammar getEqualGrammar(Grammar gr) {
for (Grammar gx : this.grammars) {
if (gr == gx) {
// System.out.println("Exactly the same grammar found: " + gx);
return gx;
}
if (isSameGrammarType(gr, gx)) {
// type of grammar the same
if (gr.getNumberOfEvents() == gx.getNumberOfEvents()) {... | [
"private",
"Grammar",
"getEqualGrammar",
"(",
"Grammar",
"gr",
")",
"{",
"for",
"(",
"Grammar",
"gx",
":",
"this",
".",
"grammars",
")",
"{",
"if",
"(",
"gr",
"==",
"gx",
")",
"{",
"// System.out.println(\"Exactly the same grammar found: \" + gx);",
"return",
"g... | != null ... found equal grammar | [
"!",
"=",
"null",
"...",
"found",
"equal",
"grammar"
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/persistency/GrammarIdDispenser.java#L91-L116 |
11,164 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/regex/RegularExpression.java | RegularExpression.compile | private synchronized void compile(Token tok) {
if (this.operations != null)
return;
this.numberOfClosures = 0;
this.operations = this.compile(tok, null, false);
} | java | private synchronized void compile(Token tok) {
if (this.operations != null)
return;
this.numberOfClosures = 0;
this.operations = this.compile(tok, null, false);
} | [
"private",
"synchronized",
"void",
"compile",
"(",
"Token",
"tok",
")",
"{",
"if",
"(",
"this",
".",
"operations",
"!=",
"null",
")",
"return",
";",
"this",
".",
"numberOfClosures",
"=",
"0",
";",
"this",
".",
"operations",
"=",
"this",
".",
"compile",
... | Compiles a token tree into an operation flow. | [
"Compiles",
"a",
"token",
"tree",
"into",
"an",
"operation",
"flow",
"."
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/regex/RegularExpression.java#L590-L595 |
11,165 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/XSDGrammarsBuilder.java | XSDGrammarsBuilder.translateSimpleTypeDefinitionToFSA | protected SchemaInformedFirstStartTagGrammar translateSimpleTypeDefinitionToFSA(
XSSimpleTypeDefinition std) throws EXIException {
/*
* Simple content
*/
// QName valueType = this.getValueType(std);
Characters chSchemaValid = new Characters(getDatatype(std)); // valueType,
SchemaInformedGram... | java | protected SchemaInformedFirstStartTagGrammar translateSimpleTypeDefinitionToFSA(
XSSimpleTypeDefinition std) throws EXIException {
/*
* Simple content
*/
// QName valueType = this.getValueType(std);
Characters chSchemaValid = new Characters(getDatatype(std)); // valueType,
SchemaInformedGram... | [
"protected",
"SchemaInformedFirstStartTagGrammar",
"translateSimpleTypeDefinitionToFSA",
"(",
"XSSimpleTypeDefinition",
"std",
")",
"throws",
"EXIException",
"{",
"/*\r\n\t\t * Simple content\r\n\t\t */",
"// QName valueType = this.getValueType(std);\r",
"Characters",
"chSchemaValid",
"=... | protected SchemaInformedElement translateSimpleTypeDefinitionToFSA( | [
"protected",
"SchemaInformedElement",
"translateSimpleTypeDefinitionToFSA",
"("
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/XSDGrammarsBuilder.java#L1753-L1774 |
11,166 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/DecodedVorbisAudioInputStream.java | DecodedVorbisAudioInputStream.init_jorbis | private void init_jorbis() {
oggSyncState_ = new SyncState();
oggStreamState_ = new StreamState();
oggPage_ = new Page();
oggPacket_ = new Packet();
vorbisInfo = new Info();
vorbisComment = new Comment();
vorbisDspState = new DspState();
vorbisBlock = new ... | java | private void init_jorbis() {
oggSyncState_ = new SyncState();
oggStreamState_ = new StreamState();
oggPage_ = new Page();
oggPacket_ = new Packet();
vorbisInfo = new Info();
vorbisComment = new Comment();
vorbisDspState = new DspState();
vorbisBlock = new ... | [
"private",
"void",
"init_jorbis",
"(",
")",
"{",
"oggSyncState_",
"=",
"new",
"SyncState",
"(",
")",
";",
"oggStreamState_",
"=",
"new",
"StreamState",
"(",
")",
";",
"oggPage_",
"=",
"new",
"Page",
"(",
")",
";",
"oggPacket_",
"=",
"new",
"Packet",
"(",... | Initializes all the jOrbis and jOgg vars that are used for song playback. | [
"Initializes",
"all",
"the",
"jOrbis",
"and",
"jOgg",
"vars",
"that",
"are",
"used",
"for",
"song",
"playback",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/DecodedVorbisAudioInputStream.java#L96-L109 |
11,167 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/DecodedVorbisAudioInputStream.java | DecodedVorbisAudioInputStream.outputSamples | private void outputSamples() {
int samples;
while ((samples = vorbisDspState.synthesis_pcmout(_pcmf, _index)) > 0) {
float[][] pcmf = _pcmf[0];
bout = (samples < convsize ? samples : convsize);
// convert doubles to 16 bit signed ints (host order) and
// i... | java | private void outputSamples() {
int samples;
while ((samples = vorbisDspState.synthesis_pcmout(_pcmf, _index)) > 0) {
float[][] pcmf = _pcmf[0];
bout = (samples < convsize ? samples : convsize);
// convert doubles to 16 bit signed ints (host order) and
// i... | [
"private",
"void",
"outputSamples",
"(",
")",
"{",
"int",
"samples",
";",
"while",
"(",
"(",
"samples",
"=",
"vorbisDspState",
".",
"synthesis_pcmout",
"(",
"_pcmf",
",",
"_index",
")",
")",
">",
"0",
")",
"{",
"float",
"[",
"]",
"[",
"]",
"pcmf",
"=... | This routine was extracted so that when the output buffer fills up, we
can break out of the loop, let the music channel drain, then continue
from where we were. | [
"This",
"routine",
"was",
"extracted",
"so",
"that",
"when",
"the",
"output",
"buffer",
"fills",
"up",
"we",
"can",
"break",
"out",
"of",
"the",
"loop",
"let",
"the",
"music",
"channel",
"drain",
"then",
"continue",
"from",
"where",
"we",
"were",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/DecodedVorbisAudioInputStream.java#L265-L308 |
11,168 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/regex/Match.java | Match.getBeginning | public int getBeginning(int index) {
if (this.beginpos == null)
throw new IllegalStateException("A result is not set.");
if (index < 0 || this.nofgroups <= index)
throw new IllegalArgumentException(
"The parameter must be less than " + this.nofgroups + ": "
+ index);
return this.beginpos[... | java | public int getBeginning(int index) {
if (this.beginpos == null)
throw new IllegalStateException("A result is not set.");
if (index < 0 || this.nofgroups <= index)
throw new IllegalArgumentException(
"The parameter must be less than " + this.nofgroups + ": "
+ index);
return this.beginpos[... | [
"public",
"int",
"getBeginning",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"this",
".",
"beginpos",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"A result is not set.\"",
")",
";",
"if",
"(",
"index",
"<",
"0",
"||",
"this",
".",
"n... | Return a start position in the target text matched to specified regular
expression group.
@param index
Less than <code>getNumberOfGroups()</code>. | [
"Return",
"a",
"start",
"position",
"in",
"the",
"target",
"text",
"matched",
"to",
"specified",
"regular",
"expression",
"group",
"."
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/regex/Match.java#L145-L153 |
11,169 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/regex/Match.java | Match.getEnd | public int getEnd(int index) {
if (this.endpos == null)
throw new IllegalStateException("A result is not set.");
if (index < 0 || this.nofgroups <= index)
throw new IllegalArgumentException(
"The parameter must be less than " + this.nofgroups + ": "
+ index);
return this.endpos[index];
... | java | public int getEnd(int index) {
if (this.endpos == null)
throw new IllegalStateException("A result is not set.");
if (index < 0 || this.nofgroups <= index)
throw new IllegalArgumentException(
"The parameter must be less than " + this.nofgroups + ": "
+ index);
return this.endpos[index];
... | [
"public",
"int",
"getEnd",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"this",
".",
"endpos",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"A result is not set.\"",
")",
";",
"if",
"(",
"index",
"<",
"0",
"||",
"this",
".",
"nofgroups... | Return an end position in the target text matched to specified regular
expression group.
@param index
Less than <code>getNumberOfGroups()</code>. | [
"Return",
"an",
"end",
"position",
"in",
"the",
"target",
"text",
"matched",
"to",
"specified",
"regular",
"expression",
"group",
"."
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/regex/Match.java#L162-L170 |
11,170 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/regex/Match.java | Match.getCapturedText | public String getCapturedText(int index) {
if (this.beginpos == null)
throw new IllegalStateException("match() has never been called.");
if (index < 0 || this.nofgroups <= index)
throw new IllegalArgumentException(
"The parameter must be less than " + this.nofgroups + ": "
+ index);
Strin... | java | public String getCapturedText(int index) {
if (this.beginpos == null)
throw new IllegalStateException("match() has never been called.");
if (index < 0 || this.nofgroups <= index)
throw new IllegalArgumentException(
"The parameter must be less than " + this.nofgroups + ": "
+ index);
Strin... | [
"public",
"String",
"getCapturedText",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"this",
".",
"beginpos",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"match() has never been called.\"",
")",
";",
"if",
"(",
"index",
"<",
"0",
"||",
"th... | Return an substring of the target text matched to specified regular
expression group.
@param index
Less than <code>getNumberOfGroups()</code>. | [
"Return",
"an",
"substring",
"of",
"the",
"target",
"text",
"matched",
"to",
"specified",
"regular",
"expression",
"group",
"."
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/regex/Match.java#L179-L198 |
11,171 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/regex/RangeToken.java | RangeToken.addRange | protected void addRange(int start, int end) {
this.icaseCache = null;
// System.err.println("Token#addRange(): "+start+" "+end);
int r1, r2;
if (start <= end) {
r1 = start;
r2 = end;
} else {
r1 = end;
r2 = start;
}
int pos = 0;
if (this.ranges == null) {
this.ranges = new ... | java | protected void addRange(int start, int end) {
this.icaseCache = null;
// System.err.println("Token#addRange(): "+start+" "+end);
int r1, r2;
if (start <= end) {
r1 = start;
r2 = end;
} else {
r1 = end;
r2 = start;
}
int pos = 0;
if (this.ranges == null) {
this.ranges = new ... | [
"protected",
"void",
"addRange",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"this",
".",
"icaseCache",
"=",
"null",
";",
"// System.err.println(\"Token#addRange(): \"+start+\" \"+end);\r",
"int",
"r1",
",",
"r2",
";",
"if",
"(",
"start",
"<=",
"end",
")... | for RANGE or NRANGE | [
"for",
"RANGE",
"or",
"NRANGE"
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/regex/RangeToken.java#L46-L80 |
11,172 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java | VorbisAudioFileReader.getAudioFileFormat | @Override
public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioFileFormat(File file)");
try (InputStream inputStream = new BufferedInputStream(new FileInputStream(file))) {
inputStream.mark(MARK_LIMIT);
... | java | @Override
public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioFileFormat(File file)");
try (InputStream inputStream = new BufferedInputStream(new FileInputStream(file))) {
inputStream.mark(MARK_LIMIT);
... | [
"@",
"Override",
"public",
"AudioFileFormat",
"getAudioFileFormat",
"(",
"File",
"file",
")",
"throws",
"UnsupportedAudioFileException",
",",
"IOException",
"{",
"LOG",
".",
"log",
"(",
"Level",
".",
"FINE",
",",
"\"getAudioFileFormat(File file)\"",
")",
";",
"try",... | Return the AudioFileFormat from the given file.
@return
@throws javax.sound.sampled.UnsupportedAudioFileException
@throws java.io.IOException | [
"Return",
"the",
"AudioFileFormat",
"from",
"the",
"given",
"file",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java#L96-L109 |
11,173 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java | VorbisAudioFileReader.getAudioFileFormat | @Override
public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioFileFormat(URL url)");
InputStream inputStream = url.openStream();
try {
return getAudioFileFormat(inputStream);
} finally {
... | java | @Override
public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioFileFormat(URL url)");
InputStream inputStream = url.openStream();
try {
return getAudioFileFormat(inputStream);
} finally {
... | [
"@",
"Override",
"public",
"AudioFileFormat",
"getAudioFileFormat",
"(",
"URL",
"url",
")",
"throws",
"UnsupportedAudioFileException",
",",
"IOException",
"{",
"LOG",
".",
"log",
"(",
"Level",
".",
"FINE",
",",
"\"getAudioFileFormat(URL url)\"",
")",
";",
"InputStre... | Return the AudioFileFormat from the given URL.
@return
@throws javax.sound.sampled.UnsupportedAudioFileException
@throws java.io.IOException | [
"Return",
"the",
"AudioFileFormat",
"from",
"the",
"given",
"URL",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java#L118-L129 |
11,174 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java | VorbisAudioFileReader.getAudioFileFormat | @Override
public AudioFileFormat getAudioFileFormat(InputStream inputStream) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioFileFormat(InputStream inputStream)");
try {
if (!inputStream.markSupported()) {
inputStream = new BufferedInputSt... | java | @Override
public AudioFileFormat getAudioFileFormat(InputStream inputStream) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioFileFormat(InputStream inputStream)");
try {
if (!inputStream.markSupported()) {
inputStream = new BufferedInputSt... | [
"@",
"Override",
"public",
"AudioFileFormat",
"getAudioFileFormat",
"(",
"InputStream",
"inputStream",
")",
"throws",
"UnsupportedAudioFileException",
",",
"IOException",
"{",
"LOG",
".",
"log",
"(",
"Level",
".",
"FINE",
",",
"\"getAudioFileFormat(InputStream inputStream... | Return the AudioFileFormat from the given InputStream.
@return
@throws javax.sound.sampled.UnsupportedAudioFileException
@throws java.io.IOException | [
"Return",
"the",
"AudioFileFormat",
"from",
"the",
"given",
"InputStream",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java#L138-L150 |
11,175 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java | VorbisAudioFileReader.getAudioFileFormat | @Override
public AudioFileFormat getAudioFileFormat(InputStream inputStream, long medialength) throws UnsupportedAudioFileException, IOException {
return getAudioFileFormat(inputStream, (int) medialength, AudioSystem.NOT_SPECIFIED);
} | java | @Override
public AudioFileFormat getAudioFileFormat(InputStream inputStream, long medialength) throws UnsupportedAudioFileException, IOException {
return getAudioFileFormat(inputStream, (int) medialength, AudioSystem.NOT_SPECIFIED);
} | [
"@",
"Override",
"public",
"AudioFileFormat",
"getAudioFileFormat",
"(",
"InputStream",
"inputStream",
",",
"long",
"medialength",
")",
"throws",
"UnsupportedAudioFileException",
",",
"IOException",
"{",
"return",
"getAudioFileFormat",
"(",
"inputStream",
",",
"(",
"int... | Return the AudioFileFormat from the given InputStream and length in
bytes.
@param medialength
@return
@throws javax.sound.sampled.UnsupportedAudioFileException
@throws java.io.IOException | [
"Return",
"the",
"AudioFileFormat",
"from",
"the",
"given",
"InputStream",
"and",
"length",
"in",
"bytes",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java#L161-L164 |
11,176 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java | VorbisAudioFileReader.getAudioInputStream | @Override
public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioInputStream(File file)");
InputStream inputStream = new FileInputStream(file);
try {
return getAudioInputStream(inputStream);
... | java | @Override
public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioInputStream(File file)");
InputStream inputStream = new FileInputStream(file);
try {
return getAudioInputStream(inputStream);
... | [
"@",
"Override",
"public",
"AudioInputStream",
"getAudioInputStream",
"(",
"File",
"file",
")",
"throws",
"UnsupportedAudioFileException",
",",
"IOException",
"{",
"LOG",
".",
"log",
"(",
"Level",
".",
"FINE",
",",
"\"getAudioInputStream(File file)\"",
")",
";",
"In... | Return the AudioInputStream from the given File.
@return
@throws javax.sound.sampled.UnsupportedAudioFileException
@throws java.io.IOException | [
"Return",
"the",
"AudioInputStream",
"from",
"the",
"given",
"File",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java#L313-L323 |
11,177 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java | VorbisAudioFileReader.getAudioInputStream | @Override
public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioInputStream(URL url)");
InputStream inputStream = url.openStream();
try {
return getAudioInputStream(inputStream);
} catch (Unsu... | java | @Override
public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException {
LOG.log(Level.FINE, "getAudioInputStream(URL url)");
InputStream inputStream = url.openStream();
try {
return getAudioInputStream(inputStream);
} catch (Unsu... | [
"@",
"Override",
"public",
"AudioInputStream",
"getAudioInputStream",
"(",
"URL",
"url",
")",
"throws",
"UnsupportedAudioFileException",
",",
"IOException",
"{",
"LOG",
".",
"log",
"(",
"Level",
".",
"FINE",
",",
"\"getAudioInputStream(URL url)\"",
")",
";",
"InputS... | Return the AudioInputStream from the given URL.
@return
@throws javax.sound.sampled.UnsupportedAudioFileException
@throws java.io.IOException | [
"Return",
"the",
"AudioInputStream",
"from",
"the",
"given",
"URL",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java#L332-L344 |
11,178 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/VorbisFile.java | VorbisFile.decode_clear | void decode_clear() {
os.clear();
vd.clear();
vb.clear();
decode_ready = false;
bittrack = 0.f;
samptrack = 0.f;
} | java | void decode_clear() {
os.clear();
vd.clear();
vb.clear();
decode_ready = false;
bittrack = 0.f;
samptrack = 0.f;
} | [
"void",
"decode_clear",
"(",
")",
"{",
"os",
".",
"clear",
"(",
")",
";",
"vd",
".",
"clear",
"(",
")",
";",
"vb",
".",
"clear",
"(",
")",
";",
"decode_ready",
"=",
"false",
";",
"bittrack",
"=",
"0.f",
";",
"samptrack",
"=",
"0.f",
";",
"}"
] | clear out the current logical bitstream decoder | [
"clear",
"out",
"the",
"current",
"logical",
"bitstream",
"decoder"
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/VorbisFile.java#L469-L476 |
11,179 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/VorbisFile.java | VorbisFile.process_packet | int process_packet(int readp) {
Page og = new Page();
// handle one packet. Try to fetch it from current stream state
// extract packets from page
while (true) {
// process a packet if we can. If the machine isn't loaded,
// neither is a page
if (de... | java | int process_packet(int readp) {
Page og = new Page();
// handle one packet. Try to fetch it from current stream state
// extract packets from page
while (true) {
// process a packet if we can. If the machine isn't loaded,
// neither is a page
if (de... | [
"int",
"process_packet",
"(",
"int",
"readp",
")",
"{",
"Page",
"og",
"=",
"new",
"Page",
"(",
")",
";",
"// handle one packet. Try to fetch it from current stream state",
"// extract packets from page",
"while",
"(",
"true",
")",
"{",
"// process a packet if we can. If... | 1) got a packet | [
"1",
")",
"got",
"a",
"packet"
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/VorbisFile.java#L487-L612 |
11,180 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/VorbisFile.java | VorbisFile.clear | int clear() {
vb.clear();
vd.clear();
os.clear();
if (vi != null && links != 0) {
for (int i = 0; i < links; i++) {
vi[i].clear();
vc[i].clear();
}
vi = null;
vc = null;
}
if (dataoffsets != ... | java | int clear() {
vb.clear();
vd.clear();
os.clear();
if (vi != null && links != 0) {
for (int i = 0; i < links; i++) {
vi[i].clear();
vc[i].clear();
}
vi = null;
vc = null;
}
if (dataoffsets != ... | [
"int",
"clear",
"(",
")",
"{",
"vb",
".",
"clear",
"(",
")",
";",
"vd",
".",
"clear",
"(",
")",
";",
"os",
".",
"clear",
"(",
")",
";",
"if",
"(",
"vi",
"!=",
"null",
"&&",
"links",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
... | clear out the OggVorbis_File struct | [
"clear",
"out",
"the",
"OggVorbis_File",
"struct"
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/VorbisFile.java#L616-L644 |
11,181 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisFormatConversionProvider.java | VorbisFormatConversionProvider.getAudioInputStream | @Override
public AudioInputStream getAudioInputStream(AudioFormat targetFormat, AudioInputStream audioInputStream) {
if (isConversionSupported(targetFormat, audioInputStream.getFormat())) {
return new DecodedVorbisAudioInputStream(targetFormat, audioInputStream);
} else {
thr... | java | @Override
public AudioInputStream getAudioInputStream(AudioFormat targetFormat, AudioInputStream audioInputStream) {
if (isConversionSupported(targetFormat, audioInputStream.getFormat())) {
return new DecodedVorbisAudioInputStream(targetFormat, audioInputStream);
} else {
thr... | [
"@",
"Override",
"public",
"AudioInputStream",
"getAudioInputStream",
"(",
"AudioFormat",
"targetFormat",
",",
"AudioInputStream",
"audioInputStream",
")",
"{",
"if",
"(",
"isConversionSupported",
"(",
"targetFormat",
",",
"audioInputStream",
".",
"getFormat",
"(",
")",... | Returns converted AudioInputStream.
@param audioInputStream
@return | [
"Returns",
"converted",
"AudioInputStream",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisFormatConversionProvider.java#L141-L148 |
11,182 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/sampled/AudioFormats.java | AudioFormats.matches | public static boolean matches(AudioFormat format1,
AudioFormat format2) {
//$$fb 19 Dec 99: endian must be checked, too.
//
// we do have a problem with redundant elements:
// e.g.
// encoding=ALAW || ULAW -> bigEndian and samplesizeinbits don't matter
// sample siz... | java | public static boolean matches(AudioFormat format1,
AudioFormat format2) {
//$$fb 19 Dec 99: endian must be checked, too.
//
// we do have a problem with redundant elements:
// e.g.
// encoding=ALAW || ULAW -> bigEndian and samplesizeinbits don't matter
// sample siz... | [
"public",
"static",
"boolean",
"matches",
"(",
"AudioFormat",
"format1",
",",
"AudioFormat",
"format2",
")",
"{",
"//$$fb 19 Dec 99: endian must be checked, too.",
"//",
"// we do have a problem with redundant elements:",
"// e.g.",
"// encoding=ALAW || ULAW -> bigEndian and samplesi... | and a AudioFormat.Encoding.matches method. | [
"and",
"a",
"AudioFormat",
".",
"Encoding",
".",
"matches",
"method",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/sampled/AudioFormats.java#L66-L94 |
11,183 | gustavkarlsson/g-wiz | src/main/java/se/gustavkarlsson/gwiz/wizards/JFrameWizard.java | JFrameWizard.setupWizard | private void setupWizard() {
setupComponents();
layoutComponents();
setMinimumSize(defaultminimumSize);
// Center on screen
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int xPosition = (screenSize.width / 2) - (defaultminimumSize.width / 2);
int yPosition = (screenSize.height / 2)... | java | private void setupWizard() {
setupComponents();
layoutComponents();
setMinimumSize(defaultminimumSize);
// Center on screen
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int xPosition = (screenSize.width / 2) - (defaultminimumSize.width / 2);
int yPosition = (screenSize.height / 2)... | [
"private",
"void",
"setupWizard",
"(",
")",
"{",
"setupComponents",
"(",
")",
";",
"layoutComponents",
"(",
")",
";",
"setMinimumSize",
"(",
"defaultminimumSize",
")",
";",
"// Center on screen",
"Dimension",
"screenSize",
"=",
"Toolkit",
".",
"getDefaultToolkit",
... | Sets up wizard upon construction. | [
"Sets",
"up",
"wizard",
"upon",
"construction",
"."
] | cf290272e0626d7a515283b71ad99745f29ab106 | https://github.com/gustavkarlsson/g-wiz/blob/cf290272e0626d7a515283b71ad99745f29ab106/src/main/java/se/gustavkarlsson/gwiz/wizards/JFrameWizard.java#L103-L116 |
11,184 | gustavkarlsson/g-wiz | src/main/java/se/gustavkarlsson/gwiz/wizards/JFrameWizard.java | JFrameWizard.setupComponents | private void setupComponents() {
cancelButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dispose();
}
});
finishButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessag... | java | private void setupComponents() {
cancelButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dispose();
}
});
finishButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessag... | [
"private",
"void",
"setupComponents",
"(",
")",
"{",
"cancelButton",
".",
"addActionListener",
"(",
"new",
"ActionListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"actionPerformed",
"(",
"ActionEvent",
"e",
")",
"{",
"dispose",
"(",
")",
";",
"}"... | Sets up the components of the wizard with listeners and mnemonics. | [
"Sets",
"up",
"the",
"components",
"of",
"the",
"wizard",
"with",
"listeners",
"and",
"mnemonics",
"."
] | cf290272e0626d7a515283b71ad99745f29ab106 | https://github.com/gustavkarlsson/g-wiz/blob/cf290272e0626d7a515283b71ad99745f29ab106/src/main/java/se/gustavkarlsson/gwiz/wizards/JFrameWizard.java#L121-L143 |
11,185 | gustavkarlsson/g-wiz | src/main/java/se/gustavkarlsson/gwiz/wizards/JFrameWizard.java | JFrameWizard.layoutComponents | private void layoutComponents() {
GridBagLayout layout = new GridBagLayout();
layout.rowWeights = new double[]{1.0, 0.0, 0.0};
layout.columnWeights = new double[]{1.0, 0.0, 0.0, 0.0, 0.0};
layout.rowHeights = new int[] {0, 0, 0};
layout.columnWidths = new int[] {0, 0, 0, 0, 0};
getContentPane().setLayout(la... | java | private void layoutComponents() {
GridBagLayout layout = new GridBagLayout();
layout.rowWeights = new double[]{1.0, 0.0, 0.0};
layout.columnWeights = new double[]{1.0, 0.0, 0.0, 0.0, 0.0};
layout.rowHeights = new int[] {0, 0, 0};
layout.columnWidths = new int[] {0, 0, 0, 0, 0};
getContentPane().setLayout(la... | [
"private",
"void",
"layoutComponents",
"(",
")",
"{",
"GridBagLayout",
"layout",
"=",
"new",
"GridBagLayout",
"(",
")",
";",
"layout",
".",
"rowWeights",
"=",
"new",
"double",
"[",
"]",
"{",
"1.0",
",",
"0.0",
",",
"0.0",
"}",
";",
"layout",
".",
"colu... | Lays out the components in the wizards content pane. | [
"Lays",
"out",
"the",
"components",
"in",
"the",
"wizards",
"content",
"pane",
"."
] | cf290272e0626d7a515283b71ad99745f29ab106 | https://github.com/gustavkarlsson/g-wiz/blob/cf290272e0626d7a515283b71ad99745f29ab106/src/main/java/se/gustavkarlsson/gwiz/wizards/JFrameWizard.java#L148-L195 |
11,186 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/GrammarFactory.java | GrammarFactory.createXSDTypesOnlyGrammars | public Grammars createXSDTypesOnlyGrammars() throws EXIException {
grammarBuilder.loadXSDTypesOnlyGrammars();
SchemaInformedGrammars g = grammarBuilder.toGrammars();
g.setBuiltInXMLSchemaTypesOnly(true); // builtInXMLSchemaTypesOnly
return g;
} | java | public Grammars createXSDTypesOnlyGrammars() throws EXIException {
grammarBuilder.loadXSDTypesOnlyGrammars();
SchemaInformedGrammars g = grammarBuilder.toGrammars();
g.setBuiltInXMLSchemaTypesOnly(true); // builtInXMLSchemaTypesOnly
return g;
} | [
"public",
"Grammars",
"createXSDTypesOnlyGrammars",
"(",
")",
"throws",
"EXIException",
"{",
"grammarBuilder",
".",
"loadXSDTypesOnlyGrammars",
"(",
")",
";",
"SchemaInformedGrammars",
"g",
"=",
"grammarBuilder",
".",
"toGrammars",
"(",
")",
";",
"g",
".",
"setBuilt... | No user defined schema information is generated for processing the EXI
body; however, the built-in XML schema types are available for use in the
EXI body.
@return built-in XSD EXI grammars
@throws EXIException
EXI exception | [
"No",
"user",
"defined",
"schema",
"information",
"is",
"generated",
"for",
"processing",
"the",
"EXI",
"body",
";",
"however",
"the",
"built",
"-",
"in",
"XML",
"schema",
"types",
"are",
"available",
"for",
"use",
"in",
"the",
"EXI",
"body",
"."
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/GrammarFactory.java#L138-L143 |
11,187 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/sampled/spi/SimpleFormatConversionProvider.java | SimpleFormatConversionProvider.getTargetEncodings | @Override
public AudioFormat.Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
if (isAllowedSourceFormat(sourceFormat)) {
return getTargetEncodings();
} else {
return EMPTY_ENCODING_ARRAY;
}
} | java | @Override
public AudioFormat.Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
if (isAllowedSourceFormat(sourceFormat)) {
return getTargetEncodings();
} else {
return EMPTY_ENCODING_ARRAY;
}
} | [
"@",
"Override",
"public",
"AudioFormat",
".",
"Encoding",
"[",
"]",
"getTargetEncodings",
"(",
"AudioFormat",
"sourceFormat",
")",
"{",
"if",
"(",
"isAllowedSourceFormat",
"(",
"sourceFormat",
")",
")",
"{",
"return",
"getTargetEncodings",
"(",
")",
";",
"}",
... | This implementation assumes that the converter can convert from each of
its source encodings to each of its target encodings. If this is not the
case, the converter has to override this method.
@param sourceFormat
@return | [
"This",
"implementation",
"assumes",
"that",
"the",
"converter",
"can",
"convert",
"from",
"each",
"of",
"its",
"source",
"encodings",
"to",
"each",
"of",
"its",
"target",
"encodings",
".",
"If",
"this",
"is",
"not",
"the",
"case",
"the",
"converter",
"has",... | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/sampled/spi/SimpleFormatConversionProvider.java#L111-L118 |
11,188 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/sampled/spi/SimpleFormatConversionProvider.java | SimpleFormatConversionProvider.getTargetFormats | @Override
public AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) {
if (isConversionSupported(targetEncoding, sourceFormat)) {
return m_targetFormats.toArray(EMPTY_FORMAT_ARRAY);
} else {
return EMPTY_FORMAT_ARRAY;
}
} | java | @Override
public AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat) {
if (isConversionSupported(targetEncoding, sourceFormat)) {
return m_targetFormats.toArray(EMPTY_FORMAT_ARRAY);
} else {
return EMPTY_FORMAT_ARRAY;
}
} | [
"@",
"Override",
"public",
"AudioFormat",
"[",
"]",
"getTargetFormats",
"(",
"AudioFormat",
".",
"Encoding",
"targetEncoding",
",",
"AudioFormat",
"sourceFormat",
")",
"{",
"if",
"(",
"isConversionSupported",
"(",
"targetEncoding",
",",
"sourceFormat",
")",
")",
"... | This implementation assumes that the converter can convert from each of
its source formats to each of its target formats. If this is not the
case, the converter has to override this method.
@param targetEncoding
@param sourceFormat
@return | [
"This",
"implementation",
"assumes",
"that",
"the",
"converter",
"can",
"convert",
"from",
"each",
"of",
"its",
"source",
"formats",
"to",
"each",
"of",
"its",
"target",
"formats",
".",
"If",
"this",
"is",
"not",
"the",
"case",
"the",
"converter",
"has",
"... | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/sampled/spi/SimpleFormatConversionProvider.java#L129-L136 |
11,189 | EXIficient/exificient-grammars | src/main/java/com/siemens/ct/exi/grammars/regex/Token.java | Token.getMinLength | final int getMinLength() {
switch (this.type) {
case CONCAT:
int sum = 0;
for (int i = 0; i < this.size(); i++)
sum += this.getChild(i).getMinLength();
return sum;
case CONDITION:
case UNION:
if (this.size() == 0)
return 0;
int ret = this.getChild(0).getMinLength();
for (... | java | final int getMinLength() {
switch (this.type) {
case CONCAT:
int sum = 0;
for (int i = 0; i < this.size(); i++)
sum += this.getChild(i).getMinLength();
return sum;
case CONDITION:
case UNION:
if (this.size() == 0)
return 0;
int ret = this.getChild(0).getMinLength();
for (... | [
"final",
"int",
"getMinLength",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"type",
")",
"{",
"case",
"CONCAT",
":",
"int",
"sum",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"size",
"(",
")",
";",
"i",
"++",
... | How many characters are needed? | [
"How",
"many",
"characters",
"are",
"needed?"
] | d96477062ebdd4245920e44cc1995259699fc7fb | https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/regex/Token.java#L303-L360 |
11,190 | gustavkarlsson/g-wiz | src/main/java/se/gustavkarlsson/gwiz/WizardController.java | WizardController.showNextPage | public boolean showNextPage(AbstractWizardPage nextPage) {
if (nextPage == null) {
// Next page is null. Updating buttons and ignoring request.
updateButtons();
return false;
}
if (currentPage != null) {
pageHistory.push(currentPage);
}
setPage(nextPage);
return true;
} | java | public boolean showNextPage(AbstractWizardPage nextPage) {
if (nextPage == null) {
// Next page is null. Updating buttons and ignoring request.
updateButtons();
return false;
}
if (currentPage != null) {
pageHistory.push(currentPage);
}
setPage(nextPage);
return true;
} | [
"public",
"boolean",
"showNextPage",
"(",
"AbstractWizardPage",
"nextPage",
")",
"{",
"if",
"(",
"nextPage",
"==",
"null",
")",
"{",
"// Next page is null. Updating buttons and ignoring request.",
"updateButtons",
"(",
")",
";",
"return",
"false",
";",
"}",
"if",
"(... | Sets the current page of this wizard to the specified page and adds the previous "current page" to the history.
@param nextPage
the page to set as the current page
@return <code>true</code> if the current page was changed, otherwise <code>false</code> | [
"Sets",
"the",
"current",
"page",
"of",
"this",
"wizard",
"to",
"the",
"specified",
"page",
"and",
"adds",
"the",
"previous",
"current",
"page",
"to",
"the",
"history",
"."
] | cf290272e0626d7a515283b71ad99745f29ab106 | https://github.com/gustavkarlsson/g-wiz/blob/cf290272e0626d7a515283b71ad99745f29ab106/src/main/java/se/gustavkarlsson/gwiz/WizardController.java#L61-L72 |
11,191 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/CodeBook.java | CodeBook.encode | int encode(int a, Buffer b) {
b.write(codelist[a], c.lengthlist[a]);
return (c.lengthlist[a]);
} | java | int encode(int a, Buffer b) {
b.write(codelist[a], c.lengthlist[a]);
return (c.lengthlist[a]);
} | [
"int",
"encode",
"(",
"int",
"a",
",",
"Buffer",
"b",
")",
"{",
"b",
".",
"write",
"(",
"codelist",
"[",
"a",
"]",
",",
"c",
".",
"lengthlist",
"[",
"a",
"]",
")",
";",
"return",
"(",
"c",
".",
"lengthlist",
"[",
"a",
"]",
")",
";",
"}"
] | returns the number of bits | [
"returns",
"the",
"number",
"of",
"bits"
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/CodeBook.java#L37-L40 |
11,192 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/CodeBook.java | CodeBook.decodevs_add | synchronized int decodevs_add(float[] a, int offset, Buffer b, int n) {
int step = n / dim;
int entry;
int i, j, o;
if (t.length < step) {
t = new int[step];
}
for (i = 0; i < step; i++) {
entry = decode(b);
if (entry == -1) {
... | java | synchronized int decodevs_add(float[] a, int offset, Buffer b, int n) {
int step = n / dim;
int entry;
int i, j, o;
if (t.length < step) {
t = new int[step];
}
for (i = 0; i < step; i++) {
entry = decode(b);
if (entry == -1) {
... | [
"synchronized",
"int",
"decodevs_add",
"(",
"float",
"[",
"]",
"a",
",",
"int",
"offset",
",",
"Buffer",
"b",
",",
"int",
"n",
")",
"{",
"int",
"step",
"=",
"n",
"/",
"dim",
";",
"int",
"entry",
";",
"int",
"i",
",",
"j",
",",
"o",
";",
"if",
... | decodevs_add is synchronized for re-using t. | [
"decodevs_add",
"is",
"synchronized",
"for",
"re",
"-",
"using",
"t",
"."
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/CodeBook.java#L81-L104 |
11,193 | Trilarion/java-vorbis-support | src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/StaticCodeBook.java | StaticCodeBook.maptype1_quantvals | private int maptype1_quantvals() {
int vals = (int) (Math.floor(Math.pow(entries, 1. / dim)));
// the above *should* be reliable, but we'll not assume that FP is
// ever reliable when bitstream sync is at stake; verify via integer
// means that vals really is the greatest value of dim f... | java | private int maptype1_quantvals() {
int vals = (int) (Math.floor(Math.pow(entries, 1. / dim)));
// the above *should* be reliable, but we'll not assume that FP is
// ever reliable when bitstream sync is at stake; verify via integer
// means that vals really is the greatest value of dim f... | [
"private",
"int",
"maptype1_quantvals",
"(",
")",
"{",
"int",
"vals",
"=",
"(",
"int",
")",
"(",
"Math",
".",
"floor",
"(",
"Math",
".",
"pow",
"(",
"entries",
",",
"1.",
"/",
"dim",
")",
")",
")",
";",
"// the above *should* be reliable, but we'll not ass... | thought of it. Therefore, we opt on the side of caution | [
"thought",
"of",
"it",
".",
"Therefore",
"we",
"opt",
"on",
"the",
"side",
"of",
"caution"
] | f72aba7d97167fe0ff20b1b719fdb5bb662ff736 | https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/StaticCodeBook.java#L313-L338 |
11,194 | j-a-w-r/jawr | jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/ResourceBundleDefinition.java | ResourceBundleDefinition.setBundleId | public void setBundleId(String bundleId) {
if (JawrRequestHandler.CLIENTSIDE_HANDLER_REQ_PATH.equals(bundleId))
throw new IllegalArgumentException("The provided id [" + JawrRequestHandler.CLIENTSIDE_HANDLER_REQ_PATH
+ "] can't be used since it's the same as the clientside handler path. Please change this id (... | java | public void setBundleId(String bundleId) {
if (JawrRequestHandler.CLIENTSIDE_HANDLER_REQ_PATH.equals(bundleId))
throw new IllegalArgumentException("The provided id [" + JawrRequestHandler.CLIENTSIDE_HANDLER_REQ_PATH
+ "] can't be used since it's the same as the clientside handler path. Please change this id (... | [
"public",
"void",
"setBundleId",
"(",
"String",
"bundleId",
")",
"{",
"if",
"(",
"JawrRequestHandler",
".",
"CLIENTSIDE_HANDLER_REQ_PATH",
".",
"equals",
"(",
"bundleId",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The provided id [\"",
"+",
"JawrR... | Sets the bundle ID
@param bundleId
the bundle ID to set | [
"Sets",
"the",
"bundle",
"ID"
] | 1fa7cd46ebcd36908bd90b298ca316fa5b0c1b0d | https://github.com/j-a-w-r/jawr/blob/1fa7cd46ebcd36908bd90b298ca316fa5b0c1b0d/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/ResourceBundleDefinition.java#L144-L149 |
11,195 | j-a-w-r/jawr | jawr-core/src/main/java/net/jawr/web/servlet/util/ClientAbortExceptionResolver.java | ClientAbortExceptionResolver.isClientAbortException | public static boolean isClientAbortException(IOException e) {
String exceptionClassName = e.getClass().getName();
return exceptionClassName.endsWith(".EofException")
|| exceptionClassName.endsWith(".ClientAbortException");
} | java | public static boolean isClientAbortException(IOException e) {
String exceptionClassName = e.getClass().getName();
return exceptionClassName.endsWith(".EofException")
|| exceptionClassName.endsWith(".ClientAbortException");
} | [
"public",
"static",
"boolean",
"isClientAbortException",
"(",
"IOException",
"e",
")",
"{",
"String",
"exceptionClassName",
"=",
"e",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"return",
"exceptionClassName",
".",
"endsWith",
"(",
"\".EofException... | Checks if the exception is a client abort exception
@param e
@return true if the exception is a client abort exception | [
"Checks",
"if",
"the",
"exception",
"is",
"a",
"client",
"abort",
"exception"
] | 1fa7cd46ebcd36908bd90b298ca316fa5b0c1b0d | https://github.com/j-a-w-r/jawr/blob/1fa7cd46ebcd36908bd90b298ca316fa5b0c1b0d/jawr-core/src/main/java/net/jawr/web/servlet/util/ClientAbortExceptionResolver.java#L32-L37 |
11,196 | d-michail/jheaps | src/main/java/org/jheaps/tree/ReflectedHeap.java | ReflectedHeap.insertPair | @SuppressWarnings("unchecked")
private void insertPair(ReflectedHandle<K, V> handle1, ReflectedHandle<K, V> handle2) {
int c;
if (comparator == null) {
c = ((Comparable<? super K>) handle1.key).compareTo(handle2.key);
} else {
c = comparator.compare(handle1.key, handl... | java | @SuppressWarnings("unchecked")
private void insertPair(ReflectedHandle<K, V> handle1, ReflectedHandle<K, V> handle2) {
int c;
if (comparator == null) {
c = ((Comparable<? super K>) handle1.key).compareTo(handle2.key);
} else {
c = comparator.compare(handle1.key, handl... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"void",
"insertPair",
"(",
"ReflectedHandle",
"<",
"K",
",",
"V",
">",
"handle1",
",",
"ReflectedHandle",
"<",
"K",
",",
"V",
">",
"handle2",
")",
"{",
"int",
"c",
";",
"if",
"(",
"comparator... | Insert a pair of elements, one in the min heap and one in the max heap.
@param handle1
a handle to the first element
@param handle2
a handle to the second element | [
"Insert",
"a",
"pair",
"of",
"elements",
"one",
"in",
"the",
"min",
"heap",
"and",
"one",
"in",
"the",
"max",
"heap",
"."
] | 7146451dd6591c2a8559dc564c9c40428c4a2c10 | https://github.com/d-michail/jheaps/blob/7146451dd6591c2a8559dc564c9c40428c4a2c10/src/main/java/org/jheaps/tree/ReflectedHeap.java#L510-L538 |
11,197 | d-michail/jheaps | src/main/java/org/jheaps/tree/ReflectedHeap.java | ReflectedHeap.delete | private void delete(ReflectedHandle<K, V> n) {
if (n.inner == null && free != n) {
throw new IllegalArgumentException("Invalid handle!");
}
if (free == n) {
free = null;
} else {
// delete from inner queue
AddressableHeap.Handle<K, HandleM... | java | private void delete(ReflectedHandle<K, V> n) {
if (n.inner == null && free != n) {
throw new IllegalArgumentException("Invalid handle!");
}
if (free == n) {
free = null;
} else {
// delete from inner queue
AddressableHeap.Handle<K, HandleM... | [
"private",
"void",
"delete",
"(",
"ReflectedHandle",
"<",
"K",
",",
"V",
">",
"n",
")",
"{",
"if",
"(",
"n",
".",
"inner",
"==",
"null",
"&&",
"free",
"!=",
"n",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid handle!\"",
")",
";"... | Delete an element
@param n
a handle to the element | [
"Delete",
"an",
"element"
] | 7146451dd6591c2a8559dc564c9c40428c4a2c10 | https://github.com/d-michail/jheaps/blob/7146451dd6591c2a8559dc564c9c40428c4a2c10/src/main/java/org/jheaps/tree/ReflectedHeap.java#L546-L577 |
11,198 | d-michail/jheaps | src/main/java/org/jheaps/tree/ReflectedHeap.java | ReflectedHeap.decreaseKey | @SuppressWarnings("unchecked")
private void decreaseKey(ReflectedHandle<K, V> n, K newKey) {
if (n.inner == null && free != n) {
throw new IllegalArgumentException("Invalid handle!");
}
int c;
if (comparator == null) {
c = ((Comparable<? super K>) newKey).com... | java | @SuppressWarnings("unchecked")
private void decreaseKey(ReflectedHandle<K, V> n, K newKey) {
if (n.inner == null && free != n) {
throw new IllegalArgumentException("Invalid handle!");
}
int c;
if (comparator == null) {
c = ((Comparable<? super K>) newKey).com... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"void",
"decreaseKey",
"(",
"ReflectedHandle",
"<",
"K",
",",
"V",
">",
"n",
",",
"K",
"newKey",
")",
"{",
"if",
"(",
"n",
".",
"inner",
"==",
"null",
"&&",
"free",
"!=",
"n",
")",
"{",
... | Decrease the key of an element.
@param n
the element
@param newKey
the new key | [
"Decrease",
"the",
"key",
"of",
"an",
"element",
"."
] | 7146451dd6591c2a8559dc564c9c40428c4a2c10 | https://github.com/d-michail/jheaps/blob/7146451dd6591c2a8559dc564c9c40428c4a2c10/src/main/java/org/jheaps/tree/ReflectedHeap.java#L587-L632 |
11,199 | ibm-bluemix-mobile-services/bms-clientsdk-android-core | lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/core/api/Request.java | Request.send | public void send(Context context, byte[] data, ResponseListener listener) {
setContext(context);
super.send(data, listener);
} | java | public void send(Context context, byte[] data, ResponseListener listener) {
setContext(context);
super.send(data, listener);
} | [
"public",
"void",
"send",
"(",
"Context",
"context",
",",
"byte",
"[",
"]",
"data",
",",
"ResponseListener",
"listener",
")",
"{",
"setContext",
"(",
"context",
")",
";",
"super",
".",
"send",
"(",
"data",
",",
"listener",
")",
";",
"}"
] | Send this resource request asynchronously, with the given byte array as the request body.
This method does not set any Content-Type header; if such a header is required, it must be set before calling this method.
@param context The context that will be passed to authentication listener.
@param data The byte arr... | [
"Send",
"this",
"resource",
"request",
"asynchronously",
"with",
"the",
"given",
"byte",
"array",
"as",
"the",
"request",
"body",
".",
"This",
"method",
"does",
"not",
"set",
"any",
"Content",
"-",
"Type",
"header",
";",
"if",
"such",
"a",
"header",
"is",
... | 8db4f00d0d564792397bfc0e5bd57d52a238b858 | https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/core/api/Request.java#L205-L208 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.