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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
149,900 | bwkimmel/jdcp | jdcp-console/src/main/java/ca/eandb/jdcp/client/VerifyCommand.java | VerifyCommand.verify | public void verify(String pkg, File path, Configuration conf) {
if (!path.isDirectory()) {
throw new IllegalArgumentException(path.getAbsolutePath().concat(" is not a directory."));
}
for (File file : path.listFiles()) {
if (file.isDirectory()) {
verify(combine(pkg, file.getName()), fil... | java | public void verify(String pkg, File path, Configuration conf) {
if (!path.isDirectory()) {
throw new IllegalArgumentException(path.getAbsolutePath().concat(" is not a directory."));
}
for (File file : path.listFiles()) {
if (file.isDirectory()) {
verify(combine(pkg, file.getName()), fil... | [
"public",
"void",
"verify",
"(",
"String",
"pkg",
",",
"File",
"path",
",",
"Configuration",
"conf",
")",
"{",
"if",
"(",
"!",
"path",
".",
"isDirectory",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"path",
".",
"getAbsolutePath",
... | Reports classes in the specified directory tree which differ from those
on the server or which do not exist on the server.
@param pkg The package name associated with the root of the directory
tree.
@param path The <code>File</code> indicating the root of the directory
tree.
@param conf The application command line opt... | [
"Reports",
"classes",
"in",
"the",
"specified",
"directory",
"tree",
"which",
"differ",
"from",
"those",
"on",
"the",
"server",
"or",
"which",
"do",
"not",
"exist",
"on",
"the",
"server",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/client/VerifyCommand.java#L62-L99 |
149,901 | bwkimmel/jdcp | jdcp-console/src/main/java/ca/eandb/jdcp/client/VerifyCommand.java | VerifyCommand.matches | private boolean matches(File file, byte[] digest, Configuration conf) throws IOException {
byte[] fileDigest = getDigest(file, conf);
return Arrays.equals(fileDigest, digest);
} | java | private boolean matches(File file, byte[] digest, Configuration conf) throws IOException {
byte[] fileDigest = getDigest(file, conf);
return Arrays.equals(fileDigest, digest);
} | [
"private",
"boolean",
"matches",
"(",
"File",
"file",
",",
"byte",
"[",
"]",
"digest",
",",
"Configuration",
"conf",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"fileDigest",
"=",
"getDigest",
"(",
"file",
",",
"conf",
")",
";",
"return",
"Array... | Determines whether the digest of the specified file matches the given
digest.
@param file The <code>File</code> to check.
@param digest The digest to compare against.
@param conf The application command line options.
@return A value indicating whether the digest of the specified file
matches the given digest.
@throws I... | [
"Determines",
"whether",
"the",
"digest",
"of",
"the",
"specified",
"file",
"matches",
"the",
"given",
"digest",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/client/VerifyCommand.java#L111-L114 |
149,902 | SourcePond/fileobserver | fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/fs/DirectoryRebase.java | DirectoryRebase.collectExistingRoots | private Collection<Directory> collectExistingRoots(final Directory pNewRoot) {
final Path parentPath = pNewRoot.getPath();
final Collection<Directory> pathsToRebase = new LinkedList<>();
dirs.entrySet().forEach(e -> {
final Path childPath = e.getKey();
if (childPath.start... | java | private Collection<Directory> collectExistingRoots(final Directory pNewRoot) {
final Path parentPath = pNewRoot.getPath();
final Collection<Directory> pathsToRebase = new LinkedList<>();
dirs.entrySet().forEach(e -> {
final Path childPath = e.getKey();
if (childPath.start... | [
"private",
"Collection",
"<",
"Directory",
">",
"collectExistingRoots",
"(",
"final",
"Directory",
"pNewRoot",
")",
"{",
"final",
"Path",
"parentPath",
"=",
"pNewRoot",
".",
"getPath",
"(",
")",
";",
"final",
"Collection",
"<",
"Directory",
">",
"pathsToRebase",... | Collects all existing root directories which are children of the new root directory specified specified.
@param pNewRoot New root directory to match, must not be {@code null}
@return Collection of directories, never {@code null}. | [
"Collects",
"all",
"existing",
"root",
"directories",
"which",
"are",
"children",
"of",
"the",
"new",
"root",
"directory",
"specified",
"specified",
"."
] | dfb3055ed35759a47f52f6cfdea49879c415fd6b | https://github.com/SourcePond/fileobserver/blob/dfb3055ed35759a47f52f6cfdea49879c415fd6b/fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/fs/DirectoryRebase.java#L61-L71 |
149,903 | SourcePond/fileobserver | fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/fs/DirectoryRebase.java | DirectoryRebase.cancelAndRebaseDiscardedDirectory | void cancelAndRebaseDiscardedDirectory(final Directory pDiscardedParent) {
pDiscardedParent.cancelKey();
dirs.remove(pDiscardedParent.getPath());
final List<Directory> toBeConvertedIntoRoot = new LinkedList<>();
cancelDiscardedDirectories(pDiscardedParent, toBeConvertedIntoRoot);
... | java | void cancelAndRebaseDiscardedDirectory(final Directory pDiscardedParent) {
pDiscardedParent.cancelKey();
dirs.remove(pDiscardedParent.getPath());
final List<Directory> toBeConvertedIntoRoot = new LinkedList<>();
cancelDiscardedDirectories(pDiscardedParent, toBeConvertedIntoRoot);
... | [
"void",
"cancelAndRebaseDiscardedDirectory",
"(",
"final",
"Directory",
"pDiscardedParent",
")",
"{",
"pDiscardedParent",
".",
"cancelKey",
"(",
")",
";",
"dirs",
".",
"remove",
"(",
"pDiscardedParent",
".",
"getPath",
"(",
")",
")",
";",
"final",
"List",
"<",
... | Cancels the watch-key of the discarded directory specified. Additionally, cancels and removes any sub-directory
which was not a root itself sometime in the past. Any sub-directory which was a root directory in the past
will be converted back to a root-directory.
@param pDiscardedParent Discarded directory, never {@cod... | [
"Cancels",
"the",
"watch",
"-",
"key",
"of",
"the",
"discarded",
"directory",
"specified",
".",
"Additionally",
"cancels",
"and",
"removes",
"any",
"sub",
"-",
"directory",
"which",
"was",
"not",
"a",
"root",
"itself",
"sometime",
"in",
"the",
"past",
".",
... | dfb3055ed35759a47f52f6cfdea49879c415fd6b | https://github.com/SourcePond/fileobserver/blob/dfb3055ed35759a47f52f6cfdea49879c415fd6b/fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/fs/DirectoryRebase.java#L150-L161 |
149,904 | bwkimmel/jdcp | jdcp-console/src/main/java/ca/eandb/jdcp/console/WorkerState.java | WorkerState.start | @CommandArgument
public void start(
@OptionArgument("ncpus") int numberOfCpus,
@OptionArgument("host") final String host,
@OptionArgument("username") final String username,
@OptionArgument("password") final String password,
@OptionArgument(value="nodb", shortKey='i') final boolean intern... | java | @CommandArgument
public void start(
@OptionArgument("ncpus") int numberOfCpus,
@OptionArgument("host") final String host,
@OptionArgument("username") final String username,
@OptionArgument("password") final String password,
@OptionArgument(value="nodb", shortKey='i') final boolean intern... | [
"@",
"CommandArgument",
"public",
"void",
"start",
"(",
"@",
"OptionArgument",
"(",
"\"ncpus\"",
")",
"int",
"numberOfCpus",
",",
"@",
"OptionArgument",
"(",
"\"host\"",
")",
"final",
"String",
"host",
",",
"@",
"OptionArgument",
"(",
"\"username\"",
")",
"fin... | Starts the worker process.
@param numberOfCpus The number of worker threads to spawn.
@param host The name of the host to connect to.
@param username The user name to log in with.
@param password The password to log in with.
@param internal If set, class definitions downloaded from the server will
be cached in memory o... | [
"Starts",
"the",
"worker",
"process",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/console/WorkerState.java#L112-L189 |
149,905 | bwkimmel/jdcp | jdcp-console/src/main/java/ca/eandb/jdcp/console/WorkerState.java | WorkerState.stop | @CommandArgument
public void stop() {
System.out.println("Stopping worker");
worker.shutdown();
workerThread.interrupt();
try {
workerThread.join();
} catch (InterruptedException e) {
logger.warn("Joining to worker thread interrupted", e);
}
worker = null;
workerThread = nu... | java | @CommandArgument
public void stop() {
System.out.println("Stopping worker");
worker.shutdown();
workerThread.interrupt();
try {
workerThread.join();
} catch (InterruptedException e) {
logger.warn("Joining to worker thread interrupted", e);
}
worker = null;
workerThread = nu... | [
"@",
"CommandArgument",
"public",
"void",
"stop",
"(",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Stopping worker\"",
")",
";",
"worker",
".",
"shutdown",
"(",
")",
";",
"workerThread",
".",
"interrupt",
"(",
")",
";",
"try",
"{",
"workerThr... | Stops the worker process. | [
"Stops",
"the",
"worker",
"process",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/console/WorkerState.java#L254-L267 |
149,906 | BellaDati/belladati-sdk-api | src/main/java/com/belladati/sdk/filter/Filter.java | Filter.toJson | public ObjectNode toJson() {
ObjectMapper mapper = new ObjectMapper();
ObjectNode node = mapper.createObjectNode();
ObjectNode attributeNode = mapper.createObjectNode();
node.put(attribute.getCode(), attributeNode);
attributeNode.put("op", operation.getOp());
return node;
} | java | public ObjectNode toJson() {
ObjectMapper mapper = new ObjectMapper();
ObjectNode node = mapper.createObjectNode();
ObjectNode attributeNode = mapper.createObjectNode();
node.put(attribute.getCode(), attributeNode);
attributeNode.put("op", operation.getOp());
return node;
} | [
"public",
"ObjectNode",
"toJson",
"(",
")",
"{",
"ObjectMapper",
"mapper",
"=",
"new",
"ObjectMapper",
"(",
")",
";",
"ObjectNode",
"node",
"=",
"mapper",
".",
"createObjectNode",
"(",
")",
";",
"ObjectNode",
"attributeNode",
"=",
"mapper",
".",
"createObjectN... | Returns a JSON representation of this filter to send to the server. Used
by the SDK internally.
@return a JSON representation of this filter | [
"Returns",
"a",
"JSON",
"representation",
"of",
"this",
"filter",
"to",
"send",
"to",
"the",
"server",
".",
"Used",
"by",
"the",
"SDK",
"internally",
"."
] | ec45a42048d8255838ad0200aa6784a8e8a121c1 | https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/filter/Filter.java#L61-L70 |
149,907 | mlhartme/mork | src/main/java/net/oneandone/mork/regexpr/Sequence.java | Sequence.createKeyword | public static RegExpr createKeyword(String str) {
int i;
RegExpr[] chars;
if (str.length() == 1) {
return new Range(str.charAt(0));
} else {
chars = new RegExpr[str.length()];
for (i = 0; i < chars.length; i++) {
chars[i] = new Range(s... | java | public static RegExpr createKeyword(String str) {
int i;
RegExpr[] chars;
if (str.length() == 1) {
return new Range(str.charAt(0));
} else {
chars = new RegExpr[str.length()];
for (i = 0; i < chars.length; i++) {
chars[i] = new Range(s... | [
"public",
"static",
"RegExpr",
"createKeyword",
"(",
"String",
"str",
")",
"{",
"int",
"i",
";",
"RegExpr",
"[",
"]",
"chars",
";",
"if",
"(",
"str",
".",
"length",
"(",
")",
"==",
"1",
")",
"{",
"return",
"new",
"Range",
"(",
"str",
".",
"charAt",... | returns a Range for strings of length 1 | [
"returns",
"a",
"Range",
"for",
"strings",
"of",
"length",
"1"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/regexpr/Sequence.java#L42-L55 |
149,908 | mlhartme/mork | src/main/java/net/oneandone/mork/compiler/GenericCompiler.java | GenericCompiler.findField | private Function findField(String name) {
Selection slkt;
Function f;
if (name.indexOf('.') == -1) {
name = type.getName() + "." + name;
}
slkt = Method.forName(name);
if (slkt.size() == 0) {
f = Field.forName(name);
if (f != null) {
... | java | private Function findField(String name) {
Selection slkt;
Function f;
if (name.indexOf('.') == -1) {
name = type.getName() + "." + name;
}
slkt = Method.forName(name);
if (slkt.size() == 0) {
f = Field.forName(name);
if (f != null) {
... | [
"private",
"Function",
"findField",
"(",
"String",
"name",
")",
"{",
"Selection",
"slkt",
";",
"Function",
"f",
";",
"if",
"(",
"name",
".",
"indexOf",
"(",
"'",
"'",
")",
"==",
"-",
"1",
")",
"{",
"name",
"=",
"type",
".",
"getName",
"(",
")",
"... | helper method for constructor | [
"helper",
"method",
"for",
"constructor"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/compiler/GenericCompiler.java#L122-L146 |
149,909 | mlhartme/mork | src/main/java/net/oneandone/mork/compiler/GenericCompiler.java | GenericCompiler.findConstr | private java.lang.reflect.Method findConstr(String name) {
Selection slkt;
int i;
slkt = Method.forName(name);
slkt = slkt.restrictArgumentCount(fields.length);
for (i = 0; i < fields.length; i++) {
slkt.restrictArgumentType(i, fields[i].getReturnType());
}
... | java | private java.lang.reflect.Method findConstr(String name) {
Selection slkt;
int i;
slkt = Method.forName(name);
slkt = slkt.restrictArgumentCount(fields.length);
for (i = 0; i < fields.length; i++) {
slkt.restrictArgumentType(i, fields[i].getReturnType());
}
... | [
"private",
"java",
".",
"lang",
".",
"reflect",
".",
"Method",
"findConstr",
"(",
"String",
"name",
")",
"{",
"Selection",
"slkt",
";",
"int",
"i",
";",
"slkt",
"=",
"Method",
".",
"forName",
"(",
"name",
")",
";",
"slkt",
"=",
"slkt",
".",
"restrict... | Helper method for the constructor. | [
"Helper",
"method",
"for",
"the",
"constructor",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/compiler/GenericCompiler.java#L149-L166 |
149,910 | mlhartme/mork | src/main/java/net/oneandone/mork/scanner/Buffer.java | Buffer.resetEndOfs | public void resetEndOfs(int ofs) {
if (endPageIdx == 0) {
// because a precondition is that ofs is left of the
// end
end = ofs;
} else {
endPageIdx = ofs / pageSize;
end = ofs % pageSize;
if (end == 0 && pages.getLastNo() == endPag... | java | public void resetEndOfs(int ofs) {
if (endPageIdx == 0) {
// because a precondition is that ofs is left of the
// end
end = ofs;
} else {
endPageIdx = ofs / pageSize;
end = ofs % pageSize;
if (end == 0 && pages.getLastNo() == endPag... | [
"public",
"void",
"resetEndOfs",
"(",
"int",
"ofs",
")",
"{",
"if",
"(",
"endPageIdx",
"==",
"0",
")",
"{",
"// because a precondition is that ofs is left of the",
"// end",
"end",
"=",
"ofs",
";",
"}",
"else",
"{",
"endPageIdx",
"=",
"ofs",
"/",
"pageSize",
... | Sets the current end ofs by to the specified value
@param ofs < getEndOfs() | [
"Sets",
"the",
"current",
"end",
"ofs",
"by",
"to",
"the",
"specified",
"value"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Buffer.java#L119-L135 |
149,911 | mlhartme/mork | src/main/java/net/oneandone/mork/scanner/Buffer.java | Buffer.read | public int read() throws IOException {
if (end == endFilled) {
switch (pages.read(endPageIdx, endFilled)) {
case -1:
eof = true;
return Scanner.EOF;
case 0:
endFilled = pages.getFilled(endPageIdx);
... | java | public int read() throws IOException {
if (end == endFilled) {
switch (pages.read(endPageIdx, endFilled)) {
case -1:
eof = true;
return Scanner.EOF;
case 0:
endFilled = pages.getFilled(endPageIdx);
... | [
"public",
"int",
"read",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"end",
"==",
"endFilled",
")",
"{",
"switch",
"(",
"pages",
".",
"read",
"(",
"endPageIdx",
",",
"endFilled",
")",
")",
"{",
"case",
"-",
"1",
":",
"eof",
"=",
"true",
";",... | Advances the end and returns the character at this positio.
@return character or Scanner.EOF | [
"Advances",
"the",
"end",
"and",
"returns",
"the",
"character",
"at",
"this",
"positio",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Buffer.java#L149-L169 |
149,912 | mlhartme/mork | src/main/java/net/oneandone/mork/scanner/Buffer.java | Buffer.eat | public void eat() {
int i;
if (endPageIdx == 0) {
position.update(endPage, start, end);
start = end;
} else {
position.update(pages.get(0), start, pageSize);
for (i = 1; i < endPageIdx; i++) {
position.update(pages.get(i), 0, pageS... | java | public void eat() {
int i;
if (endPageIdx == 0) {
position.update(endPage, start, end);
start = end;
} else {
position.update(pages.get(0), start, pageSize);
for (i = 1; i < endPageIdx; i++) {
position.update(pages.get(i), 0, pageS... | [
"public",
"void",
"eat",
"(",
")",
"{",
"int",
"i",
";",
"if",
"(",
"endPageIdx",
"==",
"0",
")",
"{",
"position",
".",
"update",
"(",
"endPage",
",",
"start",
",",
"end",
")",
";",
"start",
"=",
"end",
";",
"}",
"else",
"{",
"position",
".",
"... | Move start forward to the current position. | [
"Move",
"start",
"forward",
"to",
"the",
"current",
"position",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Buffer.java#L176-L193 |
149,913 | mlhartme/mork | src/main/java/net/oneandone/mork/scanner/Buffer.java | Buffer.createString | public String createString() {
int i;
int count;
if (endPageIdx == 0) {
// speedup the most frequent situation
return new String(endPage, start, end - start);
} else {
char[] buffer;
buffer = new char[endPageIdx * pageSize + end - start];... | java | public String createString() {
int i;
int count;
if (endPageIdx == 0) {
// speedup the most frequent situation
return new String(endPage, start, end - start);
} else {
char[] buffer;
buffer = new char[endPageIdx * pageSize + end - start];... | [
"public",
"String",
"createString",
"(",
")",
"{",
"int",
"i",
";",
"int",
"count",
";",
"if",
"(",
"endPageIdx",
"==",
"0",
")",
"{",
"// speedup the most frequent situation",
"return",
"new",
"String",
"(",
"endPage",
",",
"start",
",",
"end",
"-",
"star... | Returns the string between start and the current position. | [
"Returns",
"the",
"string",
"between",
"start",
"and",
"the",
"current",
"position",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Buffer.java#L198-L218 |
149,914 | eurekaclinical/javautil | src/main/java/org/arp/javautil/io/IOUtil.java | IOUtil.readResourceAsLines | public static List<String> readResourceAsLines(
Class<?> classObj, String resourceName) throws IOException {
InputStream in = getResourceAsStream(resourceName, classObj);
try (BufferedReader buffer = new BufferedReader(new InputStreamReader(in))) {
List<String> lines = new ArrayL... | java | public static List<String> readResourceAsLines(
Class<?> classObj, String resourceName) throws IOException {
InputStream in = getResourceAsStream(resourceName, classObj);
try (BufferedReader buffer = new BufferedReader(new InputStreamReader(in))) {
List<String> lines = new ArrayL... | [
"public",
"static",
"List",
"<",
"String",
">",
"readResourceAsLines",
"(",
"Class",
"<",
"?",
">",
"classObj",
",",
"String",
"resourceName",
")",
"throws",
"IOException",
"{",
"InputStream",
"in",
"=",
"getResourceAsStream",
"(",
"resourceName",
",",
"classObj... | Reads everything from a textual resource as lines using the default
character set.
@param classObj the <code>Class</code> from which
<code>Class.getResourceAsStream</code> is invoked. If <code>null</code>,
will use <code>IOUtil.class</code>.
@param resourceName a resource name <code>String</code>.
@return a <code>Stri... | [
"Reads",
"everything",
"from",
"a",
"textual",
"resource",
"as",
"lines",
"using",
"the",
"default",
"character",
"set",
"."
] | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/io/IOUtil.java#L99-L110 |
149,915 | eurekaclinical/javautil | src/main/java/org/arp/javautil/io/IOUtil.java | IOUtil.readPropertiesFromResource | public static void readPropertiesFromResource(Properties properties,
Class<?> classObj, String resourceName) throws IOException {
if (classObj == null) {
throw new IllegalArgumentException("classObj cannot be null");
}
if (resourceName != null) {
InputStream i... | java | public static void readPropertiesFromResource(Properties properties,
Class<?> classObj, String resourceName) throws IOException {
if (classObj == null) {
throw new IllegalArgumentException("classObj cannot be null");
}
if (resourceName != null) {
InputStream i... | [
"public",
"static",
"void",
"readPropertiesFromResource",
"(",
"Properties",
"properties",
",",
"Class",
"<",
"?",
">",
"classObj",
",",
"String",
"resourceName",
")",
"throws",
"IOException",
"{",
"if",
"(",
"classObj",
"==",
"null",
")",
"{",
"throw",
"new",... | Loads properties from the given resource into the given properties
object.
@param properties the {@link Properties}, using the given class'
<code>getResourceAsStream</code> method.
@param classObj the {@link Class} whose <code>getResourceAsStream</code>
method is called, cannot be <code>null</code>.
@param resourceNam... | [
"Loads",
"properties",
"from",
"the",
"given",
"resource",
"into",
"the",
"given",
"properties",
"object",
"."
] | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/io/IOUtil.java#L125-L142 |
149,916 | eurekaclinical/javautil | src/main/java/org/arp/javautil/io/IOUtil.java | IOUtil.resourceToFile | public static File resourceToFile(String resourceName, String filePrefix,
String fileSuffix) throws IOException {
BufferedReader reader = new BufferedReader(
new InputStreamReader(getResourceAsStream(resourceName)));
File outFile = File.createTempFile(filePrefix, fileSuffix);... | java | public static File resourceToFile(String resourceName, String filePrefix,
String fileSuffix) throws IOException {
BufferedReader reader = new BufferedReader(
new InputStreamReader(getResourceAsStream(resourceName)));
File outFile = File.createTempFile(filePrefix, fileSuffix);... | [
"public",
"static",
"File",
"resourceToFile",
"(",
"String",
"resourceName",
",",
"String",
"filePrefix",
",",
"String",
"fileSuffix",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
... | Converts a resource into a temporary file that can be read by objects
that look up files by name. Returns the file that was created. The file
will be deleted when the program exits.
@param resourceName the resource to convert. Cannot be <code>null</code>.
@param filePrefix the prefix of the temporary file. Cannot be
<... | [
"Converts",
"a",
"resource",
"into",
"a",
"temporary",
"file",
"that",
"can",
"be",
"read",
"by",
"objects",
"that",
"look",
"up",
"files",
"by",
"name",
".",
"Returns",
"the",
"file",
"that",
"was",
"created",
".",
"The",
"file",
"will",
"be",
"deleted"... | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/io/IOUtil.java#L252-L269 |
149,917 | almondtools/picklock | src/main/java/com/almondtools/picklock/ObjectSnoop.java | ObjectSnoop.isUnlockable | public List<Method> isUnlockable(Class<?> interfaceClazz) {
List<Method> conflicts = new LinkedList<Method>();
for (Method method : interfaceClazz.getDeclaredMethods()) {
try {
findInvocationHandler(method);
} catch (NoSuchMethodException e) {
conflicts.add(method);
}
}
return conflicts;
} | java | public List<Method> isUnlockable(Class<?> interfaceClazz) {
List<Method> conflicts = new LinkedList<Method>();
for (Method method : interfaceClazz.getDeclaredMethods()) {
try {
findInvocationHandler(method);
} catch (NoSuchMethodException e) {
conflicts.add(method);
}
}
return conflicts;
} | [
"public",
"List",
"<",
"Method",
">",
"isUnlockable",
"(",
"Class",
"<",
"?",
">",
"interfaceClazz",
")",
"{",
"List",
"<",
"Method",
">",
"conflicts",
"=",
"new",
"LinkedList",
"<",
"Method",
">",
"(",
")",
";",
"for",
"(",
"Method",
"method",
":",
... | collects all methods of the given interface conflicting with the wrapped object
@param interfaceClazz
the interface to check on conflicts
@return a list of methods conflicting | [
"collects",
"all",
"methods",
"of",
"the",
"given",
"interface",
"conflicting",
"with",
"the",
"wrapped",
"object"
] | 8ec05d58bcd1a893d8d5fe67d2f170183c80012f | https://github.com/almondtools/picklock/blob/8ec05d58bcd1a893d8d5fe67d2f170183c80012f/src/main/java/com/almondtools/picklock/ObjectSnoop.java#L29-L39 |
149,918 | generators-io-projects/generators | generators-core/src/main/java/io/generators/core/GeneratorIterable.java | GeneratorIterable.iterator | @Override
public Iterator<T> iterator() {
return new Iterator<T>() {
private int cursor = 0;
@Override
public boolean hasNext() {
return size == INFINITE_SIZE || cursor < size;
}
@Override
public T next() {
... | java | @Override
public Iterator<T> iterator() {
return new Iterator<T>() {
private int cursor = 0;
@Override
public boolean hasNext() {
return size == INFINITE_SIZE || cursor < size;
}
@Override
public T next() {
... | [
"@",
"Override",
"public",
"Iterator",
"<",
"T",
">",
"iterator",
"(",
")",
"{",
"return",
"new",
"Iterator",
"<",
"T",
">",
"(",
")",
"{",
"private",
"int",
"cursor",
"=",
"0",
";",
"@",
"Override",
"public",
"boolean",
"hasNext",
"(",
")",
"{",
"... | Provides iterator over this iterable
@return iterator over this iterable | [
"Provides",
"iterator",
"over",
"this",
"iterable"
] | bee273970e638b4ed144337c442b795c816d6d61 | https://github.com/generators-io-projects/generators/blob/bee273970e638b4ed144337c442b795c816d6d61/generators-core/src/main/java/io/generators/core/GeneratorIterable.java#L53-L77 |
149,919 | icoloma/simpleds | src/main/java/org/simpleds/cache/Level1Cache.java | Level1Cache.get | @SuppressWarnings("unchecked")
public <T> Map<Serializable, T> get(Collection<? extends Serializable> keys) {
Map<Serializable, T> result = Maps.newHashMapWithExpectedSize(keys.size());
for (Serializable key : keys) {
T value = (T) contents.getIfPresent(key);
if (value != null) {
result.put(key, va... | java | @SuppressWarnings("unchecked")
public <T> Map<Serializable, T> get(Collection<? extends Serializable> keys) {
Map<Serializable, T> result = Maps.newHashMapWithExpectedSize(keys.size());
for (Serializable key : keys) {
T value = (T) contents.getIfPresent(key);
if (value != null) {
result.put(key, va... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"Map",
"<",
"Serializable",
",",
"T",
">",
"get",
"(",
"Collection",
"<",
"?",
"extends",
"Serializable",
">",
"keys",
")",
"{",
"Map",
"<",
"Serializable",
",",
"T",
">",
"re... | Return the list of values from cache. Only entries with non-null value will be returned | [
"Return",
"the",
"list",
"of",
"values",
"from",
"cache",
".",
"Only",
"entries",
"with",
"non",
"-",
"null",
"value",
"will",
"be",
"returned"
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/cache/Level1Cache.java#L100-L113 |
149,920 | mlhartme/mork | examples/command/src/main/java/command/Console.java | Console.createRunner | private static Thread createRunner(
final String cmd, final JTextArea dest,
final JDialog dialog, final JButton okButton) {
return new Thread() {
@Override
public void run() {
Process p;
StringBuffer exit;
Thread log1;
... | java | private static Thread createRunner(
final String cmd, final JTextArea dest,
final JDialog dialog, final JButton okButton) {
return new Thread() {
@Override
public void run() {
Process p;
StringBuffer exit;
Thread log1;
... | [
"private",
"static",
"Thread",
"createRunner",
"(",
"final",
"String",
"cmd",
",",
"final",
"JTextArea",
"dest",
",",
"final",
"JDialog",
"dialog",
",",
"final",
"JButton",
"okButton",
")",
"{",
"return",
"new",
"Thread",
"(",
")",
"{",
"@",
"Override",
"p... | Create a new thread to execute the specified command.
Enables the specified button when done. | [
"Create",
"a",
"new",
"thread",
"to",
"execute",
"the",
"specified",
"command",
".",
"Enables",
"the",
"specified",
"button",
"when",
"done",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/examples/command/src/main/java/command/Console.java#L70-L111 |
149,921 | Metrink/croquet | croquet-core/src/main/java/com/metrink/croquet/PidManager.java | PidManager.dropPidFile | private boolean dropPidFile() {
LOG.trace("Entering dropPidFile()");
// we cannot create pid files on Windows
if (System.getProperty("os.name").startsWith("Windows")) {
LOG.info("Pid file creation is unsupported on Windows... skipping");
return true;
}
t... | java | private boolean dropPidFile() {
LOG.trace("Entering dropPidFile()");
// we cannot create pid files on Windows
if (System.getProperty("os.name").startsWith("Windows")) {
LOG.info("Pid file creation is unsupported on Windows... skipping");
return true;
}
t... | [
"private",
"boolean",
"dropPidFile",
"(",
")",
"{",
"LOG",
".",
"trace",
"(",
"\"Entering dropPidFile()\"",
")",
";",
"// we cannot create pid files on Windows",
"if",
"(",
"System",
".",
"getProperty",
"(",
"\"os.name\"",
")",
".",
"startsWith",
"(",
"\"Windows\"",... | Create a file with the current process id in it. This is a no-op on Windows. Prior copies of the file must be
removed prior to launch.
@return true if the pid file was successfully created | [
"Create",
"a",
"file",
"with",
"the",
"current",
"process",
"id",
"in",
"it",
".",
"This",
"is",
"a",
"no",
"-",
"op",
"on",
"Windows",
".",
"Prior",
"copies",
"of",
"the",
"file",
"must",
"be",
"removed",
"prior",
"to",
"launch",
"."
] | 1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b | https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-core/src/main/java/com/metrink/croquet/PidManager.java#L52-L82 |
149,922 | craterdog/java-general-utilities | src/main/java/craterdog/utils/Base64Utils.java | Base64Utils.encode | public static String encode(byte[] bytes, String indentation) {
int length = bytes.length;
if (length == 0) return ""; // empty byte array
String encoded = Base64.encodeBase64String(bytes).replaceAll("\\s", ""); // remove all white space
StringBuilder result = new StringBuilder();
... | java | public static String encode(byte[] bytes, String indentation) {
int length = bytes.length;
if (length == 0) return ""; // empty byte array
String encoded = Base64.encodeBase64String(bytes).replaceAll("\\s", ""); // remove all white space
StringBuilder result = new StringBuilder();
... | [
"public",
"static",
"String",
"encode",
"(",
"byte",
"[",
"]",
"bytes",
",",
"String",
"indentation",
")",
"{",
"int",
"length",
"=",
"bytes",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"\"\"",
";",
"// empty byte array",
"String"... | This function encodes a byte array using base 64 with a specific indentation of new lines.
@param bytes The byte array to be encoded.
@param indentation The indentation string to be inserted before each new line.
@return The base 64 encoded string. | [
"This",
"function",
"encodes",
"a",
"byte",
"array",
"using",
"base",
"64",
"with",
"a",
"specific",
"indentation",
"of",
"new",
"lines",
"."
] | a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57 | https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/Base64Utils.java#L42-L58 |
149,923 | almondtools/picklock | src/main/java/com/almondtools/picklock/ObjectAccess.java | ObjectAccess.features | @SuppressWarnings("unchecked")
public <T> T features(Class<T> interfaceClass) {
try {
List<Class<?>> todo = new ArrayList<Class<?>>();
Set<Class<?>> done = new HashSet<Class<?>>();
todo.add(interfaceClass);
while (!todo.isEmpty()) {
Class<?> currentClass = todo.remove(0);
done.add(currentClass);
... | java | @SuppressWarnings("unchecked")
public <T> T features(Class<T> interfaceClass) {
try {
List<Class<?>> todo = new ArrayList<Class<?>>();
Set<Class<?>> done = new HashSet<Class<?>>();
todo.add(interfaceClass);
while (!todo.isEmpty()) {
Class<?> currentClass = todo.remove(0);
done.add(currentClass);
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"T",
"features",
"(",
"Class",
"<",
"T",
">",
"interfaceClass",
")",
"{",
"try",
"{",
"List",
"<",
"Class",
"<",
"?",
">",
">",
"todo",
"=",
"new",
"ArrayList",
"<",
"Class"... | maps the given interface to the wrapped object
@param interfaceClass
the given interface class (defining the type of the result)
@return an object of the type of interfaceClass (mapped to the members of the wrapped object)
@throws NoSuchMethodException
if a method of the interface class could not be mapped according t... | [
"maps",
"the",
"given",
"interface",
"to",
"the",
"wrapped",
"object"
] | 8ec05d58bcd1a893d8d5fe67d2f170183c80012f | https://github.com/almondtools/picklock/blob/8ec05d58bcd1a893d8d5fe67d2f170183c80012f/src/main/java/com/almondtools/picklock/ObjectAccess.java#L117-L141 |
149,924 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassUtils.java | ClassUtils.flatten | public static String flatten(List lines, String sep) {
return flatten(lines.toArray(new Object[lines.size()]), sep);
} | java | public static String flatten(List lines, String sep) {
return flatten(lines.toArray(new Object[lines.size()]), sep);
} | [
"public",
"static",
"String",
"flatten",
"(",
"List",
"lines",
",",
"String",
"sep",
")",
"{",
"return",
"flatten",
"(",
"lines",
".",
"toArray",
"(",
"new",
"Object",
"[",
"lines",
".",
"size",
"(",
")",
"]",
")",
",",
"sep",
")",
";",
"}"
] | Flattens the list into a single, long string. The separator string gets
added between the objects, but not after the last one.
@param lines the lines to flatten
@param sep the separator
@return the generated string | [
"Flattens",
"the",
"list",
"into",
"a",
"single",
"long",
"string",
".",
"The",
"separator",
"string",
"gets",
"added",
"between",
"the",
"objects",
"but",
"not",
"after",
"the",
"last",
"one",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassUtils.java#L148-L150 |
149,925 | craterdog/java-general-utilities | src/main/java/craterdog/utils/Base16Utils.java | Base16Utils.encode | static public String encode(byte[] bytes, String indentation) {
StringBuilder result = new StringBuilder();
int length = bytes.length;
if (length == 0) return ""; // empty byte array
if (indentation != null) result.append(indentation);
encodeByte(bytes, 0, result);
for (... | java | static public String encode(byte[] bytes, String indentation) {
StringBuilder result = new StringBuilder();
int length = bytes.length;
if (length == 0) return ""; // empty byte array
if (indentation != null) result.append(indentation);
encodeByte(bytes, 0, result);
for (... | [
"static",
"public",
"String",
"encode",
"(",
"byte",
"[",
"]",
"bytes",
",",
"String",
"indentation",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"length",
"=",
"bytes",
".",
"length",
";",
"if",
"(",
"length",... | This function encodes a byte array using base 16 with a specific indentation of new lines.
@param bytes The byte array to be encoded.
@param indentation The indentation string to be inserted before each new line.
@return The base 16 encoded string. | [
"This",
"function",
"encodes",
"a",
"byte",
"array",
"using",
"base",
"16",
"with",
"a",
"specific",
"indentation",
"of",
"new",
"lines",
"."
] | a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57 | https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/Base16Utils.java#L39-L54 |
149,926 | craterdog/java-general-utilities | src/main/java/craterdog/utils/Base16Utils.java | Base16Utils.decode | static public byte[] decode(String base16) {
String string = base16.replaceAll("\\s", ""); // remove all white space
int length = string.length();
byte[] bytes = new byte[(int) Math.ceil(length / 2.0)];
for (int i = 0; i < bytes.length; i++) {
decodeByte(string, i, bytes);
... | java | static public byte[] decode(String base16) {
String string = base16.replaceAll("\\s", ""); // remove all white space
int length = string.length();
byte[] bytes = new byte[(int) Math.ceil(length / 2.0)];
for (int i = 0; i < bytes.length; i++) {
decodeByte(string, i, bytes);
... | [
"static",
"public",
"byte",
"[",
"]",
"decode",
"(",
"String",
"base16",
")",
"{",
"String",
"string",
"=",
"base16",
".",
"replaceAll",
"(",
"\"\\\\s\"",
",",
"\"\"",
")",
";",
"// remove all white space",
"int",
"length",
"=",
"string",
".",
"length",
"(... | This function decodes a base 16 string into its corresponding byte array.
@param base16 The base 16 encoded string.
@return The corresponding byte array. | [
"This",
"function",
"decodes",
"a",
"base",
"16",
"string",
"into",
"its",
"corresponding",
"byte",
"array",
"."
] | a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57 | https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/Base16Utils.java#L63-L71 |
149,927 | bwkimmel/jdcp | jdcp-console/src/main/java/ca/eandb/jdcp/client/ClientMain.java | ClientMain.main | public static void main(String[] args) {
ArgumentProcessor<Configuration> argProcessor = new ArgumentProcessor<Configuration>("");
argProcessor.addOption("verbose", 'V', new BooleanFieldOption<Configuration>("verbose"));
argProcessor.addOption("host", 'h', new StringFieldOption<Configuration>("host"));
... | java | public static void main(String[] args) {
ArgumentProcessor<Configuration> argProcessor = new ArgumentProcessor<Configuration>("");
argProcessor.addOption("verbose", 'V', new BooleanFieldOption<Configuration>("verbose"));
argProcessor.addOption("host", 'h', new StringFieldOption<Configuration>("host"));
... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"ArgumentProcessor",
"<",
"Configuration",
">",
"argProcessor",
"=",
"new",
"ArgumentProcessor",
"<",
"Configuration",
">",
"(",
"\"\"",
")",
";",
"argProcessor",
".",
"addOption",
... | Application entry point.
@param args Command line arguments. | [
"Application",
"entry",
"point",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/client/ClientMain.java#L45-L64 |
149,928 | trustathsh/ifmapj | src/main/java/util/CanonicalXML.java | CanonicalXML.toCanonicalXml2 | public String toCanonicalXml2(XMLReader parser, InputSource inputSource, boolean stripSpace) throws Exception {
mStrip = stripSpace;
mOut = new StringWriter();
parser.setContentHandler(this);
parser.setErrorHandler(this);
parser.parse(inputSource);
return mOut.toString();
} | java | public String toCanonicalXml2(XMLReader parser, InputSource inputSource, boolean stripSpace) throws Exception {
mStrip = stripSpace;
mOut = new StringWriter();
parser.setContentHandler(this);
parser.setErrorHandler(this);
parser.parse(inputSource);
return mOut.toString();
} | [
"public",
"String",
"toCanonicalXml2",
"(",
"XMLReader",
"parser",
",",
"InputSource",
"inputSource",
",",
"boolean",
"stripSpace",
")",
"throws",
"Exception",
"{",
"mStrip",
"=",
"stripSpace",
";",
"mOut",
"=",
"new",
"StringWriter",
"(",
")",
";",
"parser",
... | Create canonical XML silently, throwing exceptions rather than displaying messages
@param parser
@param inputSource
@param stripSpace
@return
@throws Exception | [
"Create",
"canonical",
"XML",
"silently",
"throwing",
"exceptions",
"rather",
"than",
"displaying",
"messages"
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/util/CanonicalXML.java#L132-L139 |
149,929 | trustathsh/ifmapj | src/main/java/util/CanonicalXML.java | CanonicalXML.toCanonicalXml3 | public String toCanonicalXml3(TransformerFactory factory, XMLReader resultParser, String inxml, boolean stripSpace)
throws Exception {
mStrip = stripSpace;
mOut = new StringWriter();
Transformer t = factory.newTransformer();
SAXSource ss = new SAXSource(resultParser, new InputSource(new StringReader(inxml)))... | java | public String toCanonicalXml3(TransformerFactory factory, XMLReader resultParser, String inxml, boolean stripSpace)
throws Exception {
mStrip = stripSpace;
mOut = new StringWriter();
Transformer t = factory.newTransformer();
SAXSource ss = new SAXSource(resultParser, new InputSource(new StringReader(inxml)))... | [
"public",
"String",
"toCanonicalXml3",
"(",
"TransformerFactory",
"factory",
",",
"XMLReader",
"resultParser",
",",
"String",
"inxml",
",",
"boolean",
"stripSpace",
")",
"throws",
"Exception",
"{",
"mStrip",
"=",
"stripSpace",
";",
"mOut",
"=",
"new",
"StringWrite... | Create canonical XML silently, throwing exceptions rather than displaying messages. This version
of the method uses the Saxon identityTransformer rather than parsing directly, because for some reason
we seem to be able to get XML 1.1 to work this way. | [
"Create",
"canonical",
"XML",
"silently",
"throwing",
"exceptions",
"rather",
"than",
"displaying",
"messages",
".",
"This",
"version",
"of",
"the",
"method",
"uses",
"the",
"Saxon",
"identityTransformer",
"rather",
"than",
"parsing",
"directly",
"because",
"for",
... | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/util/CanonicalXML.java#L147-L158 |
149,930 | dhemery/hartley | src/main/java/com/dhemery/polling/events/ConditionDissatisfied.java | ConditionDissatisfied.reason | public String reason() {
Description description = new StringDescription();
condition.describeDissatisfactionTo(description);
return description.toString();
} | java | public String reason() {
Description description = new StringDescription();
condition.describeDissatisfactionTo(description);
return description.toString();
} | [
"public",
"String",
"reason",
"(",
")",
"{",
"Description",
"description",
"=",
"new",
"StringDescription",
"(",
")",
";",
"condition",
".",
"describeDissatisfactionTo",
"(",
"description",
")",
";",
"return",
"description",
".",
"toString",
"(",
")",
";",
"}"... | The reason the condition was dissatisfied. | [
"The",
"reason",
"the",
"condition",
"was",
"dissatisfied",
"."
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/polling/events/ConditionDissatisfied.java#L34-L38 |
149,931 | SourcePond/fileobserver | fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/directory/Directory.java | Directory.streamDirectoryAndForceInform | private void streamDirectoryAndForceInform(final EventDispatcher pDispatcher) {
try (final DirectoryStream<Path> stream = newDirectoryStream(getPath(), Files::isRegularFile)) {
stream.forEach(p ->
createKeys(p).forEach(k ->
pDispatcher.modified(k, p, e... | java | private void streamDirectoryAndForceInform(final EventDispatcher pDispatcher) {
try (final DirectoryStream<Path> stream = newDirectoryStream(getPath(), Files::isRegularFile)) {
stream.forEach(p ->
createKeys(p).forEach(k ->
pDispatcher.modified(k, p, e... | [
"private",
"void",
"streamDirectoryAndForceInform",
"(",
"final",
"EventDispatcher",
"pDispatcher",
")",
"{",
"try",
"(",
"final",
"DirectoryStream",
"<",
"Path",
">",
"stream",
"=",
"newDirectoryStream",
"(",
"getPath",
"(",
")",
",",
"Files",
"::",
"isRegularFil... | Iterates over all files contained by this directory and informs for each entry
the currently focused listener. Only direct children will be considered,
sub-directories and non-regular files will be ignored. | [
"Iterates",
"over",
"all",
"files",
"contained",
"by",
"this",
"directory",
"and",
"informs",
"for",
"each",
"entry",
"the",
"currently",
"focused",
"listener",
".",
"Only",
"direct",
"children",
"will",
"be",
"considered",
"sub",
"-",
"directories",
"and",
"n... | dfb3055ed35759a47f52f6cfdea49879c415fd6b | https://github.com/SourcePond/fileobserver/blob/dfb3055ed35759a47f52f6cfdea49879c415fd6b/fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/directory/Directory.java#L59-L67 |
149,932 | eurekaclinical/javautil | src/main/java/org/arp/javautil/collections/Iterators.java | Iterators.equal | public static boolean equal(Iterator itr1, Iterator itr2) {
if (itr1 == null || itr2 == null) {
return false;
} else {
while (itr1.hasNext() && itr2.hasNext()) {
Object i = itr1.next();
Object i2 = itr2.next();
if ((i == null && i2 ... | java | public static boolean equal(Iterator itr1, Iterator itr2) {
if (itr1 == null || itr2 == null) {
return false;
} else {
while (itr1.hasNext() && itr2.hasNext()) {
Object i = itr1.next();
Object i2 = itr2.next();
if ((i == null && i2 ... | [
"public",
"static",
"boolean",
"equal",
"(",
"Iterator",
"itr1",
",",
"Iterator",
"itr2",
")",
"{",
"if",
"(",
"itr1",
"==",
"null",
"||",
"itr2",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"while",
"(",
"itr1",
".",
"hasNext",... | Tests two iterators for equality, meaning that they have the same
elements enumerated in the same order.
@param itr1
an <code>Iterator</code>.
@param itr2
an <code>Iterator</code>.
@return <code>true</code> if the two iterators are not
<code>null</code> and equal, <code>false</code> otherwise. | [
"Tests",
"two",
"iterators",
"for",
"equality",
"meaning",
"that",
"they",
"have",
"the",
"same",
"elements",
"enumerated",
"in",
"the",
"same",
"order",
"."
] | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/collections/Iterators.java#L43-L59 |
149,933 | eurekaclinical/javautil | src/main/java/org/arp/javautil/collections/Iterators.java | Iterators.asList | public static <T> List<T> asList(Iterator<T> itr) {
List<T> l = new ArrayList<>();
if (itr != null) {
while (itr.hasNext()) {
l.add(itr.next());
}
}
return l;
} | java | public static <T> List<T> asList(Iterator<T> itr) {
List<T> l = new ArrayList<>();
if (itr != null) {
while (itr.hasNext()) {
l.add(itr.next());
}
}
return l;
} | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"asList",
"(",
"Iterator",
"<",
"T",
">",
"itr",
")",
"{",
"List",
"<",
"T",
">",
"l",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"itr",
"!=",
"null",
")",
"{",
"while",
... | Returns an iterator as a list.
@param itr
an <code>Iterator</code>.
@return a <code>List</code>. | [
"Returns",
"an",
"iterator",
"as",
"a",
"list",
"."
] | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/collections/Iterators.java#L68-L76 |
149,934 | Terradue/jcatalogue-client | apis/src/main/java/com/terradue/jcatalogue/lang/Objects.java | Objects.hash | public static int hash( int initialNonZeroOddNumber, int multiplierNonZeroOddNumber, Object...objs )
{
int result = initialNonZeroOddNumber;
for ( Object obj : objs )
{
result = multiplierNonZeroOddNumber * result + ( obj != null ? obj.hashCode() : 0 );
}
return r... | java | public static int hash( int initialNonZeroOddNumber, int multiplierNonZeroOddNumber, Object...objs )
{
int result = initialNonZeroOddNumber;
for ( Object obj : objs )
{
result = multiplierNonZeroOddNumber * result + ( obj != null ? obj.hashCode() : 0 );
}
return r... | [
"public",
"static",
"int",
"hash",
"(",
"int",
"initialNonZeroOddNumber",
",",
"int",
"multiplierNonZeroOddNumber",
",",
"Object",
"...",
"objs",
")",
"{",
"int",
"result",
"=",
"initialNonZeroOddNumber",
";",
"for",
"(",
"Object",
"obj",
":",
"objs",
")",
"{"... | Computes a hashCode given the input objects.
@param initialNonZeroOddNumber a non-zero, odd number used as the initial value.
@param multiplierNonZeroOddNumber a non-zero, odd number used as the multiplier.
@param objs the objects to compute hash code.
@return the computed hashCode. | [
"Computes",
"a",
"hashCode",
"given",
"the",
"input",
"objects",
"."
] | 1f24c4da952d8ad2373c4fa97eed48b0b8a88d21 | https://github.com/Terradue/jcatalogue-client/blob/1f24c4da952d8ad2373c4fa97eed48b0b8a88d21/apis/src/main/java/com/terradue/jcatalogue/lang/Objects.java#L42-L50 |
149,935 | dhemery/hartley | src/main/java/com/dhemery/osx/AppleScriptBuilder.java | AppleScriptBuilder.withLines | public AppleScriptBuilder withLines(List<String> lines) {
for (String line : lines) {
withLine(line);
}
return this;
} | java | public AppleScriptBuilder withLines(List<String> lines) {
for (String line : lines) {
withLine(line);
}
return this;
} | [
"public",
"AppleScriptBuilder",
"withLines",
"(",
"List",
"<",
"String",
">",
"lines",
")",
"{",
"for",
"(",
"String",
"line",
":",
"lines",
")",
"{",
"withLine",
"(",
"line",
")",
";",
"}",
"return",
"this",
";",
"}"
] | Append lines to the script.
@param lines the lines to append
@return this script command builder | [
"Append",
"lines",
"to",
"the",
"script",
"."
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/osx/AppleScriptBuilder.java#L42-L47 |
149,936 | icoloma/simpleds | src/main/java/org/simpleds/metadata/PersistenceMetadataRepository.java | PersistenceMetadataRepository.add | public ClassMetadata add(Class<?> clazz) {
ClassMetadata metadata = classMetadataFactory.createMetadata(clazz);
log.debug("Adding persistent class " + metadata.getKind());
metadata.validate();
if (metadataByKind.get(metadata.getKind()) != null) {
throw new DuplicateException("Two entities found with kind='" ... | java | public ClassMetadata add(Class<?> clazz) {
ClassMetadata metadata = classMetadataFactory.createMetadata(clazz);
log.debug("Adding persistent class " + metadata.getKind());
metadata.validate();
if (metadataByKind.get(metadata.getKind()) != null) {
throw new DuplicateException("Two entities found with kind='" ... | [
"public",
"ClassMetadata",
"add",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"ClassMetadata",
"metadata",
"=",
"classMetadataFactory",
".",
"createMetadata",
"(",
"clazz",
")",
";",
"log",
".",
"debug",
"(",
"\"Adding persistent class \"",
"+",
"metadata",
... | Adds a persistent class to the repository
@return the ClassMetadata instance created for this persistent class | [
"Adds",
"a",
"persistent",
"class",
"to",
"the",
"repository"
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/metadata/PersistenceMetadataRepository.java#L35-L45 |
149,937 | icoloma/simpleds | src/main/java/org/simpleds/metadata/PersistenceMetadataRepository.java | PersistenceMetadataRepository.remove | public void remove(Class<?> clazz) {
ClassMetadata metadata = get(clazz);
metadataByClass.remove(clazz);
metadataByKind.remove(metadata.getKind());
} | java | public void remove(Class<?> clazz) {
ClassMetadata metadata = get(clazz);
metadataByClass.remove(clazz);
metadataByKind.remove(metadata.getKind());
} | [
"public",
"void",
"remove",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"ClassMetadata",
"metadata",
"=",
"get",
"(",
"clazz",
")",
";",
"metadataByClass",
".",
"remove",
"(",
"clazz",
")",
";",
"metadataByKind",
".",
"remove",
"(",
"metadata",
".",
... | Removes a persistent class from the repository
@param clazz the persistent class to remove
@throws IllegalArgumentException if the class is not present in the repository | [
"Removes",
"a",
"persistent",
"class",
"from",
"the",
"repository"
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/metadata/PersistenceMetadataRepository.java#L52-L56 |
149,938 | mlhartme/mork | src/main/java/net/oneandone/mork/classfile/Jsr.java | Jsr.addRetSuccessors | public static void addRetSuccessors(List<Jsr> jsrs, int idx, IntCollection result) {
int i, max;
max = jsrs.size();
for (i = 0; i < max; i++) {
((Jsr) jsrs.get(i)).addRetSuccessors(idx, result);
}
} | java | public static void addRetSuccessors(List<Jsr> jsrs, int idx, IntCollection result) {
int i, max;
max = jsrs.size();
for (i = 0; i < max; i++) {
((Jsr) jsrs.get(i)).addRetSuccessors(idx, result);
}
} | [
"public",
"static",
"void",
"addRetSuccessors",
"(",
"List",
"<",
"Jsr",
">",
"jsrs",
",",
"int",
"idx",
",",
"IntCollection",
"result",
")",
"{",
"int",
"i",
",",
"max",
";",
"max",
"=",
"jsrs",
".",
"size",
"(",
")",
";",
"for",
"(",
"i",
"=",
... | idx index of ret | [
"idx",
"index",
"of",
"ret"
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/Jsr.java#L144-L151 |
149,939 | eurekaclinical/javautil | src/main/java/org/arp/javautil/junit/JUnitUtil.java | JUnitUtil.serializeAndDeserialize | public static Object serializeAndDeserialize(Object o) throws IOException,
ClassNotFoundException {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bytes);
try {
out.writeObject(o);
} finally {
out.close();
}
ObjectInputStream in = new Obj... | java | public static Object serializeAndDeserialize(Object o) throws IOException,
ClassNotFoundException {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bytes);
try {
out.writeObject(o);
} finally {
out.close();
}
ObjectInputStream in = new Obj... | [
"public",
"static",
"Object",
"serializeAndDeserialize",
"(",
"Object",
"o",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"ByteArrayOutputStream",
"bytes",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"ObjectOutputStream",
"out",
"=",
"new"... | Serializes and deserializes the given object.
@param o
an <code>Object</code>.
@return an <code>Object</code>.
@throws IOException
@throws ClassNotFoundException | [
"Serializes",
"and",
"deserializes",
"the",
"given",
"object",
"."
] | 779bbc5bf096c75f8eed4f99ca45b99c1d44df43 | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/junit/JUnitUtil.java#L51-L69 |
149,940 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java | RestrictionsContainer.addEq | public <Y extends Comparable<? super Y>> RestrictionsContainer addEq(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Eq<Y>(property, value));
// On retourne le conteneur
return this;
} | java | public <Y extends Comparable<? super Y>> RestrictionsContainer addEq(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Eq<Y>(property, value));
// On retourne le conteneur
return this;
} | [
"public",
"<",
"Y",
"extends",
"Comparable",
"<",
"?",
"super",
"Y",
">",
">",
"RestrictionsContainer",
"addEq",
"(",
"String",
"property",
",",
"Y",
"value",
")",
"{",
"// Ajout de la restriction\r",
"restrictions",
".",
"add",
"(",
"new",
"Eq",
"<",
"Y",
... | Methode d'ajout de la restriction Eq
@param property Nom de la Propriete
@param value Valeur de la propriete
@param <Y> Type de valeur
@return Conteneur | [
"Methode",
"d",
"ajout",
"de",
"la",
"restriction",
"Eq"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L89-L96 |
149,941 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java | RestrictionsContainer.addNotEq | public <Y extends Comparable<? super Y>> RestrictionsContainer addNotEq(String property, Y value) {
// Ajout de la restriction
restrictions.add(new NotEq<Y>(property, value));
// On retourne le conteneur
return this;
} | java | public <Y extends Comparable<? super Y>> RestrictionsContainer addNotEq(String property, Y value) {
// Ajout de la restriction
restrictions.add(new NotEq<Y>(property, value));
// On retourne le conteneur
return this;
} | [
"public",
"<",
"Y",
"extends",
"Comparable",
"<",
"?",
"super",
"Y",
">",
">",
"RestrictionsContainer",
"addNotEq",
"(",
"String",
"property",
",",
"Y",
"value",
")",
"{",
"// Ajout de la restriction\r",
"restrictions",
".",
"add",
"(",
"new",
"NotEq",
"<",
... | Methode d'ajout de la restriction NotEq
@param property Nom de la Propriete
@param value Valeur de la propriete
@param <Y> Type de valeur
@return Conteneur | [
"Methode",
"d",
"ajout",
"de",
"la",
"restriction",
"NotEq"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L105-L112 |
149,942 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java | RestrictionsContainer.addGe | public <Y extends Comparable<? super Y>> RestrictionsContainer addGe(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Ge<Y>(property, value));
// On retourne le conteneur
return this;
} | java | public <Y extends Comparable<? super Y>> RestrictionsContainer addGe(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Ge<Y>(property, value));
// On retourne le conteneur
return this;
} | [
"public",
"<",
"Y",
"extends",
"Comparable",
"<",
"?",
"super",
"Y",
">",
">",
"RestrictionsContainer",
"addGe",
"(",
"String",
"property",
",",
"Y",
"value",
")",
"{",
"// Ajout de la restriction\r",
"restrictions",
".",
"add",
"(",
"new",
"Ge",
"<",
"Y",
... | Methode d'ajout de la restriction GE
@param property Nom de la Propriete
@param value Valeur de la propriete
@param <Y> Type de valeur
@return Conteneur | [
"Methode",
"d",
"ajout",
"de",
"la",
"restriction",
"GE"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L121-L128 |
149,943 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java | RestrictionsContainer.addGt | public <Y extends Comparable<? super Y>> RestrictionsContainer addGt(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Gt<Y>(property, value));
// On retourne le conteneur
return this;
} | java | public <Y extends Comparable<? super Y>> RestrictionsContainer addGt(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Gt<Y>(property, value));
// On retourne le conteneur
return this;
} | [
"public",
"<",
"Y",
"extends",
"Comparable",
"<",
"?",
"super",
"Y",
">",
">",
"RestrictionsContainer",
"addGt",
"(",
"String",
"property",
",",
"Y",
"value",
")",
"{",
"// Ajout de la restriction\r",
"restrictions",
".",
"add",
"(",
"new",
"Gt",
"<",
"Y",
... | Methode d'ajout de la restriction GT
@param property Nom de la Propriete
@param value Valeur de la propriete
@param <Y> Type de valeur
@return Conteneur | [
"Methode",
"d",
"ajout",
"de",
"la",
"restriction",
"GT"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L137-L144 |
149,944 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java | RestrictionsContainer.addLt | public <Y extends Comparable<? super Y>> RestrictionsContainer addLt(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Lt<Y>(property, value));
// On retourne le conteneur
return this;
} | java | public <Y extends Comparable<? super Y>> RestrictionsContainer addLt(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Lt<Y>(property, value));
// On retourne le conteneur
return this;
} | [
"public",
"<",
"Y",
"extends",
"Comparable",
"<",
"?",
"super",
"Y",
">",
">",
"RestrictionsContainer",
"addLt",
"(",
"String",
"property",
",",
"Y",
"value",
")",
"{",
"// Ajout de la restriction\r",
"restrictions",
".",
"add",
"(",
"new",
"Lt",
"<",
"Y",
... | Methode d'ajout de la restriction Lt
@param property Nom de la Propriete
@param value Valeur de la propriete
@param <Y> Type de valeur
@return Conteneur | [
"Methode",
"d",
"ajout",
"de",
"la",
"restriction",
"Lt"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L153-L160 |
149,945 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java | RestrictionsContainer.addLike | public RestrictionsContainer addLike(String property, String value) {
// Ajout de la restriction
restrictions.add(new Like(property, value));
// On retourne le conteneur
return this;
} | java | public RestrictionsContainer addLike(String property, String value) {
// Ajout de la restriction
restrictions.add(new Like(property, value));
// On retourne le conteneur
return this;
} | [
"public",
"RestrictionsContainer",
"addLike",
"(",
"String",
"property",
",",
"String",
"value",
")",
"{",
"// Ajout de la restriction\r",
"restrictions",
".",
"add",
"(",
"new",
"Like",
"(",
"property",
",",
"value",
")",
")",
";",
"// On retourne le conteneur\r",
... | Methode d'ajout de la restriction Like
@param property Nom de la Propriete
@param value Valeur de la propriete
@return Conteneur | [
"Methode",
"d",
"ajout",
"de",
"la",
"restriction",
"Like"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L168-L175 |
149,946 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java | RestrictionsContainer.addNotLike | public RestrictionsContainer addNotLike(String property, String value) {
// Ajout de la restriction
restrictions.add(new NotLike(property, value));
// On retourne le conteneur
return this;
} | java | public RestrictionsContainer addNotLike(String property, String value) {
// Ajout de la restriction
restrictions.add(new NotLike(property, value));
// On retourne le conteneur
return this;
} | [
"public",
"RestrictionsContainer",
"addNotLike",
"(",
"String",
"property",
",",
"String",
"value",
")",
"{",
"// Ajout de la restriction\r",
"restrictions",
".",
"add",
"(",
"new",
"NotLike",
"(",
"property",
",",
"value",
")",
")",
";",
"// On retourne le conteneu... | Methode d'ajout de la restriction NotLike
@param property Nom de la Propriete
@param value Valeur de la propriete
@return Conteneur | [
"Methode",
"d",
"ajout",
"de",
"la",
"restriction",
"NotLike"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L183-L190 |
149,947 | leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java | RestrictionsContainer.addLe | public <Y extends Comparable<? super Y>> RestrictionsContainer addLe(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Le<Y>(property, value));
// On retourne le conteneur
return this;
} | java | public <Y extends Comparable<? super Y>> RestrictionsContainer addLe(String property, Y value) {
// Ajout de la restriction
restrictions.add(new Le<Y>(property, value));
// On retourne le conteneur
return this;
} | [
"public",
"<",
"Y",
"extends",
"Comparable",
"<",
"?",
"super",
"Y",
">",
">",
"RestrictionsContainer",
"addLe",
"(",
"String",
"property",
",",
"Y",
"value",
")",
"{",
"// Ajout de la restriction\r",
"restrictions",
".",
"add",
"(",
"new",
"Le",
"<",
"Y",
... | Methode d'ajout de la restriction Le
@param property Nom de la Propriete
@param value Valeur de la propriete
@param <Y> Type de valeur
@return Conteneur | [
"Methode",
"d",
"ajout",
"de",
"la",
"restriction",
"Le"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/RestrictionsContainer.java#L199-L206 |
149,948 | seedstack/jms-addon | src/it/java/org/seedstack/jms/JmsPollingIT.java | JmsPollingIT.message_polling_is_working | @Test
public void message_polling_is_working() throws JMSException {
testSender4.send("HELLO");
try {
count.await(5, TimeUnit.SECONDS);
Assertions.assertThat(text).isEqualTo("HELLO");
} catch (InterruptedException e) {
fail("Thread interrupted");
... | java | @Test
public void message_polling_is_working() throws JMSException {
testSender4.send("HELLO");
try {
count.await(5, TimeUnit.SECONDS);
Assertions.assertThat(text).isEqualTo("HELLO");
} catch (InterruptedException e) {
fail("Thread interrupted");
... | [
"@",
"Test",
"public",
"void",
"message_polling_is_working",
"(",
")",
"throws",
"JMSException",
"{",
"testSender4",
".",
"send",
"(",
"\"HELLO\"",
")",
";",
"try",
"{",
"count",
".",
"await",
"(",
"5",
",",
"TimeUnit",
".",
"SECONDS",
")",
";",
"Assertion... | TestSender4 and TestMessageListener4. | [
"TestSender4",
"and",
"TestMessageListener4",
"."
] | d6014811daaac29f591b32bfd2358500fb25d804 | https://github.com/seedstack/jms-addon/blob/d6014811daaac29f591b32bfd2358500fb25d804/src/it/java/org/seedstack/jms/JmsPollingIT.java#L34-L45 |
149,949 | mlhartme/mork | src/main/java/net/oneandone/mork/semantics/Partition.java | Partition.getDisconnected | public static List getDisconnected(
Collection leftCollection, Graph relation, Collection rightCollection)
{
List disconnected;
Iterator iter;
Object left;
EdgeIterator relationIter;
disconnected = new ArrayList();
iter = leftCollection.iterator();
wh... | java | public static List getDisconnected(
Collection leftCollection, Graph relation, Collection rightCollection)
{
List disconnected;
Iterator iter;
Object left;
EdgeIterator relationIter;
disconnected = new ArrayList();
iter = leftCollection.iterator();
wh... | [
"public",
"static",
"List",
"getDisconnected",
"(",
"Collection",
"leftCollection",
",",
"Graph",
"relation",
",",
"Collection",
"rightCollection",
")",
"{",
"List",
"disconnected",
";",
"Iterator",
"iter",
";",
"Object",
"left",
";",
"EdgeIterator",
"relationIter",... | Returns all objects from leftCollection whole images are a disjoin from rightCollection,
none of the resulting objects has an image in rightCollection. Compares objects using ==.
Note that lefts with no image show up in the result. | [
"Returns",
"all",
"objects",
"from",
"leftCollection",
"whole",
"images",
"are",
"a",
"disjoin",
"from",
"rightCollection",
"none",
"of",
"the",
"resulting",
"objects",
"has",
"an",
"image",
"in",
"rightCollection",
".",
"Compares",
"objects",
"using",
"==",
"."... | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/semantics/Partition.java#L83-L109 |
149,950 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj/extendedIdentifiers/IcsIdentifiers.java | IcsIdentifiers.createOverlayManagerGroup | public static Identity createOverlayManagerGroup(String name) {
return ExtendedIdentifiers.createExtendedIdentifier(IfmapStrings.ICS_METADATA_NS_URI,
IfmapStrings.ICS_METADATA_PREFIX, "overlay-manager-group", name);
} | java | public static Identity createOverlayManagerGroup(String name) {
return ExtendedIdentifiers.createExtendedIdentifier(IfmapStrings.ICS_METADATA_NS_URI,
IfmapStrings.ICS_METADATA_PREFIX, "overlay-manager-group", name);
} | [
"public",
"static",
"Identity",
"createOverlayManagerGroup",
"(",
"String",
"name",
")",
"{",
"return",
"ExtendedIdentifiers",
".",
"createExtendedIdentifier",
"(",
"IfmapStrings",
".",
"ICS_METADATA_NS_URI",
",",
"IfmapStrings",
".",
"ICS_METADATA_PREFIX",
",",
"\"overla... | Create a overlay-manager-group identifier,
that is an extended identity identifier.
@param name
name of a particular Overlay Manager group
@return the new {@link Identity} instance | [
"Create",
"a",
"overlay",
"-",
"manager",
"-",
"group",
"identifier",
"that",
"is",
"an",
"extended",
"identity",
"identifier",
"."
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/extendedIdentifiers/IcsIdentifiers.java#L73-L76 |
149,951 | mlhartme/mork | src/main/java/net/oneandone/mork/mapping/RelatedArgument.java | RelatedArgument.sort | public static List<List<Argument>> sort(List<Argument> args) {
int i;
int max;
List<List<Argument>> result;
List<RelatedArgument> remaining; // List of RelatedArguments
List<RelatedArgument> heads; // List of RelatedArguments
result = new ArrayList<List<Argument>>()... | java | public static List<List<Argument>> sort(List<Argument> args) {
int i;
int max;
List<List<Argument>> result;
List<RelatedArgument> remaining; // List of RelatedArguments
List<RelatedArgument> heads; // List of RelatedArguments
result = new ArrayList<List<Argument>>()... | [
"public",
"static",
"List",
"<",
"List",
"<",
"Argument",
">",
">",
"sort",
"(",
"List",
"<",
"Argument",
">",
"args",
")",
"{",
"int",
"i",
";",
"int",
"max",
";",
"List",
"<",
"List",
"<",
"Argument",
">",
">",
"result",
";",
"List",
"<",
"Rela... | Returns the sorted list of lists of arguments.
@param args normal argument, not related arguments | [
"Returns",
"the",
"sorted",
"list",
"of",
"lists",
"of",
"arguments",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/mapping/RelatedArgument.java#L32-L53 |
149,952 | sevensource/html-email-service | src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java | DefaultEmailModel.setEnvelopeFrom | public void setEnvelopeFrom(String address) throws AddressException {
if(StringUtils.isEmpty(address)) {
this.envelopeFrom = address;
} else {
InternetAddress tmp = toInternetAddress(address, null);
this.envelopeFrom = tmp.getAddress();
}
} | java | public void setEnvelopeFrom(String address) throws AddressException {
if(StringUtils.isEmpty(address)) {
this.envelopeFrom = address;
} else {
InternetAddress tmp = toInternetAddress(address, null);
this.envelopeFrom = tmp.getAddress();
}
} | [
"public",
"void",
"setEnvelopeFrom",
"(",
"String",
"address",
")",
"throws",
"AddressException",
"{",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"address",
")",
")",
"{",
"this",
".",
"envelopeFrom",
"=",
"address",
";",
"}",
"else",
"{",
"InternetAddre... | set the SMTP Envelope address of the email
@param address a valid email address
@throws AddressException in case of an invalid email address | [
"set",
"the",
"SMTP",
"Envelope",
"address",
"of",
"the",
"email"
] | a55d9ef1a2173917cb5f870854bc24e5aaebd182 | https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java#L55-L62 |
149,953 | sevensource/html-email-service | src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java | DefaultEmailModel.setFrom | public void setFrom(String address, String personal) throws AddressException {
from = toInternetAddress(address, personal);
} | java | public void setFrom(String address, String personal) throws AddressException {
from = toInternetAddress(address, personal);
} | [
"public",
"void",
"setFrom",
"(",
"String",
"address",
",",
"String",
"personal",
")",
"throws",
"AddressException",
"{",
"from",
"=",
"toInternetAddress",
"(",
"address",
",",
"personal",
")",
";",
"}"
] | set the From address of the email
@param address a valid email address
@param personal the real world name of the sender (can be null)
@throws AddressException in case of an invalid email address | [
"set",
"the",
"From",
"address",
"of",
"the",
"email"
] | a55d9ef1a2173917cb5f870854bc24e5aaebd182 | https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java#L71-L73 |
149,954 | sevensource/html-email-service | src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java | DefaultEmailModel.setReplyTo | public void setReplyTo(String address, String personal) throws AddressException {
replyTo = toInternetAddress(address, personal);
} | java | public void setReplyTo(String address, String personal) throws AddressException {
replyTo = toInternetAddress(address, personal);
} | [
"public",
"void",
"setReplyTo",
"(",
"String",
"address",
",",
"String",
"personal",
")",
"throws",
"AddressException",
"{",
"replyTo",
"=",
"toInternetAddress",
"(",
"address",
",",
"personal",
")",
";",
"}"
] | sets the reply to address
@param address a valid email address
@param personal the real world name of the sender (can be null)
@throws AddressException in case of an invalid email address | [
"sets",
"the",
"reply",
"to",
"address"
] | a55d9ef1a2173917cb5f870854bc24e5aaebd182 | https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java#L82-L84 |
149,955 | sevensource/html-email-service | src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java | DefaultEmailModel.addCc | public void addCc(String address, String personal) throws AddressException {
if(cc == null) {
cc = new ArrayList<>();
}
cc.add( toInternetAddress(address, personal) );
} | java | public void addCc(String address, String personal) throws AddressException {
if(cc == null) {
cc = new ArrayList<>();
}
cc.add( toInternetAddress(address, personal) );
} | [
"public",
"void",
"addCc",
"(",
"String",
"address",
",",
"String",
"personal",
")",
"throws",
"AddressException",
"{",
"if",
"(",
"cc",
"==",
"null",
")",
"{",
"cc",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"}",
"cc",
".",
"add",
"(",
"toIntern... | adds a CC recipient
@param address a valid email address
@param personal the real world name of the sender (can be null)
@throws AddressException in case of an invalid email address | [
"adds",
"a",
"CC",
"recipient"
] | a55d9ef1a2173917cb5f870854bc24e5aaebd182 | https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java#L107-L112 |
149,956 | sevensource/html-email-service | src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java | DefaultEmailModel.addBcc | public void addBcc(String address, String personal) throws AddressException {
if(bcc == null) {
bcc = new ArrayList<>();
}
bcc.add( toInternetAddress(address, personal) );
} | java | public void addBcc(String address, String personal) throws AddressException {
if(bcc == null) {
bcc = new ArrayList<>();
}
bcc.add( toInternetAddress(address, personal) );
} | [
"public",
"void",
"addBcc",
"(",
"String",
"address",
",",
"String",
"personal",
")",
"throws",
"AddressException",
"{",
"if",
"(",
"bcc",
"==",
"null",
")",
"{",
"bcc",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"}",
"bcc",
".",
"add",
"(",
"toIn... | adds a BCC recipient
@param address a valid email address
@param personal the real world name of the sender (can be null)
@throws AddressException in case of an invalid email address | [
"adds",
"a",
"BCC",
"recipient"
] | a55d9ef1a2173917cb5f870854bc24e5aaebd182 | https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java#L121-L126 |
149,957 | Terradue/jcatalogue-client | apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java | Proxy.setType | public Proxy setType( String type )
{
if ( this.type.equals( type ) || ( type == null && this.type.length() <= 0 ) )
{
return this;
}
return new Proxy( type, host, port, auth );
} | java | public Proxy setType( String type )
{
if ( this.type.equals( type ) || ( type == null && this.type.length() <= 0 ) )
{
return this;
}
return new Proxy( type, host, port, auth );
} | [
"public",
"Proxy",
"setType",
"(",
"String",
"type",
")",
"{",
"if",
"(",
"this",
".",
"type",
".",
"equals",
"(",
"type",
")",
"||",
"(",
"type",
"==",
"null",
"&&",
"this",
".",
"type",
".",
"length",
"(",
")",
"<=",
"0",
")",
")",
"{",
"retu... | Sets the type of the proxy.
@param type The type of the proxy, e.g. "http", may be {@code null}.
@return The new proxy, never {@code null}. | [
"Sets",
"the",
"type",
"of",
"the",
"proxy",
"."
] | 1f24c4da952d8ad2373c4fa97eed48b0b8a88d21 | https://github.com/Terradue/jcatalogue-client/blob/1f24c4da952d8ad2373c4fa97eed48b0b8a88d21/apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java#L79-L86 |
149,958 | Terradue/jcatalogue-client | apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java | Proxy.setHost | public Proxy setHost( String host )
{
if ( this.host.equals( host ) || ( host == null && this.host.length() <= 0 ) )
{
return this;
}
return new Proxy( type, host, port, auth );
} | java | public Proxy setHost( String host )
{
if ( this.host.equals( host ) || ( host == null && this.host.length() <= 0 ) )
{
return this;
}
return new Proxy( type, host, port, auth );
} | [
"public",
"Proxy",
"setHost",
"(",
"String",
"host",
")",
"{",
"if",
"(",
"this",
".",
"host",
".",
"equals",
"(",
"host",
")",
"||",
"(",
"host",
"==",
"null",
"&&",
"this",
".",
"host",
".",
"length",
"(",
")",
"<=",
"0",
")",
")",
"{",
"retu... | Sets the host of the proxy.
@param host The host of the proxy, may be {@code null}.
@return The new proxy, never {@code null}. | [
"Sets",
"the",
"host",
"of",
"the",
"proxy",
"."
] | 1f24c4da952d8ad2373c4fa97eed48b0b8a88d21 | https://github.com/Terradue/jcatalogue-client/blob/1f24c4da952d8ad2373c4fa97eed48b0b8a88d21/apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java#L104-L111 |
149,959 | Terradue/jcatalogue-client | apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java | Proxy.setPort | public Proxy setPort( int port )
{
if ( this.port == port )
{
return this;
}
return new Proxy( type, host, port, auth );
} | java | public Proxy setPort( int port )
{
if ( this.port == port )
{
return this;
}
return new Proxy( type, host, port, auth );
} | [
"public",
"Proxy",
"setPort",
"(",
"int",
"port",
")",
"{",
"if",
"(",
"this",
".",
"port",
"==",
"port",
")",
"{",
"return",
"this",
";",
"}",
"return",
"new",
"Proxy",
"(",
"type",
",",
"host",
",",
"port",
",",
"auth",
")",
";",
"}"
] | Sets the port number for the proxy.
@param port The port number for the proxy.
@return The new proxy, never {@code null}. | [
"Sets",
"the",
"port",
"number",
"for",
"the",
"proxy",
"."
] | 1f24c4da952d8ad2373c4fa97eed48b0b8a88d21 | https://github.com/Terradue/jcatalogue-client/blob/1f24c4da952d8ad2373c4fa97eed48b0b8a88d21/apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java#L129-L136 |
149,960 | Terradue/jcatalogue-client | apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java | Proxy.setAuthentication | public Proxy setAuthentication( Authentication auth )
{
if ( eq( this.auth, auth ) )
{
return this;
}
return new Proxy( type, host, port, auth );
} | java | public Proxy setAuthentication( Authentication auth )
{
if ( eq( this.auth, auth ) )
{
return this;
}
return new Proxy( type, host, port, auth );
} | [
"public",
"Proxy",
"setAuthentication",
"(",
"Authentication",
"auth",
")",
"{",
"if",
"(",
"eq",
"(",
"this",
".",
"auth",
",",
"auth",
")",
")",
"{",
"return",
"this",
";",
"}",
"return",
"new",
"Proxy",
"(",
"type",
",",
"host",
",",
"port",
",",
... | Sets the authentication to use for the proxy connection.
@param auth The authentication to use, may be {@code null}.
@return The new proxy, never {@code null}. | [
"Sets",
"the",
"authentication",
"to",
"use",
"for",
"the",
"proxy",
"connection",
"."
] | 1f24c4da952d8ad2373c4fa97eed48b0b8a88d21 | https://github.com/Terradue/jcatalogue-client/blob/1f24c4da952d8ad2373c4fa97eed48b0b8a88d21/apis/src/main/java/com/terradue/jcatalogue/repository/Proxy.java#L154-L161 |
149,961 | BellaDati/belladati-sdk-api | src/main/java/com/belladati/sdk/dataset/data/DataRow.java | DataRow.get | public String get(String columnCode) throws UnknownColumnException {
for (DataColumn column : columns) {
if (columnCode.equals(column.getCode())) {
return content.get(column);
}
}
throw new UnknownColumnException(columnCode);
} | java | public String get(String columnCode) throws UnknownColumnException {
for (DataColumn column : columns) {
if (columnCode.equals(column.getCode())) {
return content.get(column);
}
}
throw new UnknownColumnException(columnCode);
} | [
"public",
"String",
"get",
"(",
"String",
"columnCode",
")",
"throws",
"UnknownColumnException",
"{",
"for",
"(",
"DataColumn",
"column",
":",
"columns",
")",
"{",
"if",
"(",
"columnCode",
".",
"equals",
"(",
"column",
".",
"getCode",
"(",
")",
")",
")",
... | Returns this row's content for the given column.
@param columnCode the column to read
@return this row's content for the given column
@throws UnknownColumnException if the column doesn't exist | [
"Returns",
"this",
"row",
"s",
"content",
"for",
"the",
"given",
"column",
"."
] | ec45a42048d8255838ad0200aa6784a8e8a121c1 | https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/dataset/data/DataRow.java#L57-L64 |
149,962 | BellaDati/belladati-sdk-api | src/main/java/com/belladati/sdk/dataset/data/DataRow.java | DataRow.set | public DataRow set(String columnCode, String value) throws UnknownColumnException {
for (DataColumn column : columns) {
if (columnCode.equals(column.getCode())) {
content.put(column, value);
return this;
}
}
throw new UnknownColumnException(columnCode);
} | java | public DataRow set(String columnCode, String value) throws UnknownColumnException {
for (DataColumn column : columns) {
if (columnCode.equals(column.getCode())) {
content.put(column, value);
return this;
}
}
throw new UnknownColumnException(columnCode);
} | [
"public",
"DataRow",
"set",
"(",
"String",
"columnCode",
",",
"String",
"value",
")",
"throws",
"UnknownColumnException",
"{",
"for",
"(",
"DataColumn",
"column",
":",
"columns",
")",
"{",
"if",
"(",
"columnCode",
".",
"equals",
"(",
"column",
".",
"getCode"... | Sets this row's content for the given column.
@param columnCode the column to set
@param value the value to enter
@return this row, to allow chaining
@throws UnknownColumnException if the column doesn't exist | [
"Sets",
"this",
"row",
"s",
"content",
"for",
"the",
"given",
"column",
"."
] | ec45a42048d8255838ad0200aa6784a8e8a121c1 | https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/dataset/data/DataRow.java#L88-L96 |
149,963 | BellaDati/belladati-sdk-api | src/main/java/com/belladati/sdk/dataset/data/DataRow.java | DataRow.setAll | public DataRow setAll(int offset, String... values) throws TooManyColumnsException {
if (offset + values.length > columns.size()) {
throw new TooManyColumnsException(columns.size(), offset + values.length);
}
for (int i = 0; i + offset < columns.size() && i < values.length; i++) {
content.put(columns.get(i)... | java | public DataRow setAll(int offset, String... values) throws TooManyColumnsException {
if (offset + values.length > columns.size()) {
throw new TooManyColumnsException(columns.size(), offset + values.length);
}
for (int i = 0; i + offset < columns.size() && i < values.length; i++) {
content.put(columns.get(i)... | [
"public",
"DataRow",
"setAll",
"(",
"int",
"offset",
",",
"String",
"...",
"values",
")",
"throws",
"TooManyColumnsException",
"{",
"if",
"(",
"offset",
"+",
"values",
".",
"length",
">",
"columns",
".",
"size",
"(",
")",
")",
"{",
"throw",
"new",
"TooMa... | Sets multiple columns of this row, starting from the given offset.
@param offset represents offset
@param values the column values to set
@return this row, to allow chaining
@throws TooManyColumnsException if more values are given than columns are
available after the offset | [
"Sets",
"multiple",
"columns",
"of",
"this",
"row",
"starting",
"from",
"the",
"given",
"offset",
"."
] | ec45a42048d8255838ad0200aa6784a8e8a121c1 | https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/dataset/data/DataRow.java#L119-L127 |
149,964 | mlhartme/mork | src/main/java/net/oneandone/mork/mapping/ToArray.java | ToArray.readObject | private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException, NoSuchMethodException {
componentType = ClassRef.read(in);
} | java | private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException, NoSuchMethodException {
componentType = ClassRef.read(in);
} | [
"private",
"void",
"readObject",
"(",
"ObjectInputStream",
"in",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
",",
"NoSuchMethodException",
"{",
"componentType",
"=",
"ClassRef",
".",
"read",
"(",
"in",
")",
";",
"}"
] | Reads this Constructor.
@param in source to read from | [
"Reads",
"this",
"Constructor",
"."
] | a069b087750c4133bfeebaf1f599c3bc96762113 | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/mapping/ToArray.java#L111-L114 |
149,965 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj/channel/CommunicationHandlerFactory.java | CommunicationHandlerFactory.newHandlerPreference | private static CommunicationHandler newHandlerPreference(String handlerProp,
String url, String user, String pass,
SSLSocketFactory sslSocketFactory, HostnameVerifier verifier, int initialConnectionTimeout)
throws InitializationException {
if (handlerProp == null) {
throw new NullPointerException();
}... | java | private static CommunicationHandler newHandlerPreference(String handlerProp,
String url, String user, String pass,
SSLSocketFactory sslSocketFactory, HostnameVerifier verifier, int initialConnectionTimeout)
throws InitializationException {
if (handlerProp == null) {
throw new NullPointerException();
}... | [
"private",
"static",
"CommunicationHandler",
"newHandlerPreference",
"(",
"String",
"handlerProp",
",",
"String",
"url",
",",
"String",
"user",
",",
"String",
"pass",
",",
"SSLSocketFactory",
"sslSocketFactory",
",",
"HostnameVerifier",
"verifier",
",",
"int",
"initia... | Helper to return the handler which is indicated by handlerProp
@param handlerProp
@param url
@param user
@param pass
@param sslSocketFactory
@param verifier
@param initialConnectionTimeout the initial connection timeout in milliseconds
@return
@throws InitializationException | [
"Helper",
"to",
"return",
"the",
"handler",
"which",
"is",
"indicated",
"by",
"handlerProp"
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/channel/CommunicationHandlerFactory.java#L122-L143 |
149,966 | Metrink/croquet | croquet-core/src/main/java/com/metrink/croquet/logging/CroquetLoggingFactory.java | CroquetLoggingFactory.configureLogging | public void configureLogging(final LoggingSettings loggingSettings) {
final Logger root = (Logger)LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
final LoggerContext context = root.getLoggerContext();
// Reset prior configuration
context.reset();
// Propagate level... | java | public void configureLogging(final LoggingSettings loggingSettings) {
final Logger root = (Logger)LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
final LoggerContext context = root.getLoggerContext();
// Reset prior configuration
context.reset();
// Propagate level... | [
"public",
"void",
"configureLogging",
"(",
"final",
"LoggingSettings",
"loggingSettings",
")",
"{",
"final",
"Logger",
"root",
"=",
"(",
"Logger",
")",
"LoggerFactory",
".",
"getLogger",
"(",
"org",
".",
"slf4j",
".",
"Logger",
".",
"ROOT_LOGGER_NAME",
")",
";... | Configure logging.
@param loggingSettings the logging settings | [
"Configure",
"logging",
"."
] | 1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b | https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-core/src/main/java/com/metrink/croquet/logging/CroquetLoggingFactory.java#L35-L63 |
149,967 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassLister.java | ClassLister.initialize | public void initialize() {
Enumeration enm;
String superclass;
String[] packages;
try {
m_CacheNames = new HashMap<>();
m_ListNames = new HashMap<>();
m_CacheClasses = new HashMap<>();
m_ListClasses = new HashMap<>();
enm = m_Packages.propertyNames();
while... | java | public void initialize() {
Enumeration enm;
String superclass;
String[] packages;
try {
m_CacheNames = new HashMap<>();
m_ListNames = new HashMap<>();
m_CacheClasses = new HashMap<>();
m_ListClasses = new HashMap<>();
enm = m_Packages.propertyNames();
while... | [
"public",
"void",
"initialize",
"(",
")",
"{",
"Enumeration",
"enm",
";",
"String",
"superclass",
";",
"String",
"[",
"]",
"packages",
";",
"try",
"{",
"m_CacheNames",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"m_ListNames",
"=",
"new",
"HashMap",
"<>"... | loads the props file and interpretes it. | [
"loads",
"the",
"props",
"file",
"and",
"interpretes",
"it",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L350-L372 |
149,968 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassLister.java | ClassLister.getClassnames | public String[] getClassnames(Class superclass) {
List<String> list;
list = m_ListNames.get(superclass.getName());
if (list == null)
return new String[0];
else
return list.toArray(new String[list.size()]);
} | java | public String[] getClassnames(Class superclass) {
List<String> list;
list = m_ListNames.get(superclass.getName());
if (list == null)
return new String[0];
else
return list.toArray(new String[list.size()]);
} | [
"public",
"String",
"[",
"]",
"getClassnames",
"(",
"Class",
"superclass",
")",
"{",
"List",
"<",
"String",
">",
"list",
";",
"list",
"=",
"m_ListNames",
".",
"get",
"(",
"superclass",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"list",
"==",
"nul... | Returns all the classnames that were found for this superclass.
@param superclass the superclass to return the derived classes for
@return the classnames of the derived classes | [
"Returns",
"all",
"the",
"classnames",
"that",
"were",
"found",
"for",
"this",
"superclass",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L380-L388 |
149,969 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassLister.java | ClassLister.getClasses | public Class[] getClasses(String superclass) {
List<Class> list;
list = m_ListClasses.get(superclass);
if (list == null)
return new Class[0];
else
return list.toArray(new Class[list.size()]);
} | java | public Class[] getClasses(String superclass) {
List<Class> list;
list = m_ListClasses.get(superclass);
if (list == null)
return new Class[0];
else
return list.toArray(new Class[list.size()]);
} | [
"public",
"Class",
"[",
"]",
"getClasses",
"(",
"String",
"superclass",
")",
"{",
"List",
"<",
"Class",
">",
"list",
";",
"list",
"=",
"m_ListClasses",
".",
"get",
"(",
"superclass",
")",
";",
"if",
"(",
"list",
"==",
"null",
")",
"return",
"new",
"C... | Returns all the classes that were found for this superclass.
@param superclass the superclass to return the derived classes for
@return the classes of the derived classes | [
"Returns",
"all",
"the",
"classes",
"that",
"were",
"found",
"for",
"this",
"superclass",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L406-L414 |
149,970 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassLister.java | ClassLister.getSuperclasses | public String[] getSuperclasses(String cls) {
List<String> result;
result = new ArrayList<>();
for (String superclass: m_CacheNames.keySet()) {
if (m_CacheNames.get(superclass).contains(cls))
result.add(superclass);
}
if (result.size() > 1)
Collections.sort(result);
retur... | java | public String[] getSuperclasses(String cls) {
List<String> result;
result = new ArrayList<>();
for (String superclass: m_CacheNames.keySet()) {
if (m_CacheNames.get(superclass).contains(cls))
result.add(superclass);
}
if (result.size() > 1)
Collections.sort(result);
retur... | [
"public",
"String",
"[",
"]",
"getSuperclasses",
"(",
"String",
"cls",
")",
"{",
"List",
"<",
"String",
">",
"result",
";",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"String",
"superclass",
":",
"m_CacheNames",
".",
"keySet",
... | Returns the superclasses that the specified classes was listed under.
@param cls the class to look up its superclasses
@return the superclass(es) | [
"Returns",
"the",
"superclasses",
"that",
"the",
"specified",
"classes",
"was",
"listed",
"under",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L432-L446 |
149,971 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassLister.java | ClassLister.getSuperclasses | public String[] getSuperclasses() {
List<String> result;
result = new ArrayList<>(m_CacheNames.keySet());
Collections.sort(result);
return result.toArray(new String[result.size()]);
} | java | public String[] getSuperclasses() {
List<String> result;
result = new ArrayList<>(m_CacheNames.keySet());
Collections.sort(result);
return result.toArray(new String[result.size()]);
} | [
"public",
"String",
"[",
"]",
"getSuperclasses",
"(",
")",
"{",
"List",
"<",
"String",
">",
"result",
";",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
"m_CacheNames",
".",
"keySet",
"(",
")",
")",
";",
"Collections",
".",
"sort",
"(",
"result",
")",
... | Returns the all superclasses that define class hierarchies.
@return the superclasses | [
"Returns",
"the",
"all",
"superclasses",
"that",
"define",
"class",
"hierarchies",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L453-L460 |
149,972 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassLister.java | ClassLister.getPackages | public String[] getPackages(String superclass) {
String packages;
packages = m_Packages.getProperty(superclass);
if ((packages == null) || (packages.length() == 0))
return new String[0];
else
return packages.split(",");
} | java | public String[] getPackages(String superclass) {
String packages;
packages = m_Packages.getProperty(superclass);
if ((packages == null) || (packages.length() == 0))
return new String[0];
else
return packages.split(",");
} | [
"public",
"String",
"[",
"]",
"getPackages",
"(",
"String",
"superclass",
")",
"{",
"String",
"packages",
";",
"packages",
"=",
"m_Packages",
".",
"getProperty",
"(",
"superclass",
")",
";",
"if",
"(",
"(",
"packages",
"==",
"null",
")",
"||",
"(",
"pack... | Returns all the packages that were found for this superclass.
@param superclass the superclass to return the packages for
@return the packages | [
"Returns",
"all",
"the",
"packages",
"that",
"were",
"found",
"for",
"this",
"superclass",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L478-L486 |
149,973 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassLister.java | ClassLister.getSingleton | public static synchronized ClassLister getSingleton(ClassTraversal traversal) {
Class<? extends ClassTraversal> cls;
cls = (traversal == null) ? null : traversal.getClass();
if (m_Singleton == null)
m_Singleton = new HashMap<>();
if (!m_Singleton.containsKey(cls))
m_Singleton.put(cls, new C... | java | public static synchronized ClassLister getSingleton(ClassTraversal traversal) {
Class<? extends ClassTraversal> cls;
cls = (traversal == null) ? null : traversal.getClass();
if (m_Singleton == null)
m_Singleton = new HashMap<>();
if (!m_Singleton.containsKey(cls))
m_Singleton.put(cls, new C... | [
"public",
"static",
"synchronized",
"ClassLister",
"getSingleton",
"(",
"ClassTraversal",
"traversal",
")",
"{",
"Class",
"<",
"?",
"extends",
"ClassTraversal",
">",
"cls",
";",
"cls",
"=",
"(",
"traversal",
"==",
"null",
")",
"?",
"null",
":",
"traversal",
... | Returns the singleton instance of the class lister.
@param traversal the class traversal to use, can be null for default one
@return the singleton | [
"Returns",
"the",
"singleton",
"instance",
"of",
"the",
"class",
"lister",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L535-L545 |
149,974 | Waikato/jclasslocator | src/main/java/nz/ac/waikato/cms/locator/ClassLister.java | ClassLister.load | public static Properties load(String props, Properties defProps) {
Properties result;
InputStream is;
result = new Properties(defProps);
is = null;
try {
is = ClassLoader.getSystemResourceAsStream(props);
result.load(is);
}
catch (Exception e) {
result = defProps;
... | java | public static Properties load(String props, Properties defProps) {
Properties result;
InputStream is;
result = new Properties(defProps);
is = null;
try {
is = ClassLoader.getSystemResourceAsStream(props);
result.load(is);
}
catch (Exception e) {
result = defProps;
... | [
"public",
"static",
"Properties",
"load",
"(",
"String",
"props",
",",
"Properties",
"defProps",
")",
"{",
"Properties",
"result",
";",
"InputStream",
"is",
";",
"result",
"=",
"new",
"Properties",
"(",
"defProps",
")",
";",
"is",
"=",
"null",
";",
"try",
... | Loads the properties from the classpath.
@param props the path, e.g., "nz/ac/waikato/cms/locator/ClassLister.props"
@return the properties, the default ones if failed to load | [
"Loads",
"the",
"properties",
"from",
"the",
"classpath",
"."
] | c899072fff607a56ee7f8c2d01fbeb15157ad144 | https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L563-L587 |
149,975 | gildur/jshint4j | src/main/java/pl/gildur/jshint4j/JsHint.java | JsHint.lint | public List<Error> lint(String source, String options) {
if (source == null) {
throw new NullPointerException("Source must not be null.");
}
Context cx = Context.enter();
try {
Scriptable scope = cx.initStandardObjects();
evaluateJSHint(cx, sc... | java | public List<Error> lint(String source, String options) {
if (source == null) {
throw new NullPointerException("Source must not be null.");
}
Context cx = Context.enter();
try {
Scriptable scope = cx.initStandardObjects();
evaluateJSHint(cx, sc... | [
"public",
"List",
"<",
"Error",
">",
"lint",
"(",
"String",
"source",
",",
"String",
"options",
")",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"Source must not be null.\"",
")",
";",
"}",
"Context",
"c... | Runs JSHint on given JavaScript source code.
@param source JavaScript source code
@param options JSHint options
@return JSHint errors | [
"Runs",
"JSHint",
"on",
"given",
"JavaScript",
"source",
"code",
"."
] | b6f9e2fb00e248a4194f38a2df07eb34d55177f7 | https://github.com/gildur/jshint4j/blob/b6f9e2fb00e248a4194f38a2df07eb34d55177f7/src/main/java/pl/gildur/jshint4j/JsHint.java#L26-L39 |
149,976 | likethecolor/Alchemy-API | src/main/java/com/likethecolor/alchemy/api/entity/NamedEntityAlchemyEntity.java | NamedEntityAlchemyEntity.addQuotation | public void addQuotation(final QuotationAlchemyEntity quotation) {
if(quotation != null && !quotations.contains(quotation)) {
quotations.add(quotation);
}
} | java | public void addQuotation(final QuotationAlchemyEntity quotation) {
if(quotation != null && !quotations.contains(quotation)) {
quotations.add(quotation);
}
} | [
"public",
"void",
"addQuotation",
"(",
"final",
"QuotationAlchemyEntity",
"quotation",
")",
"{",
"if",
"(",
"quotation",
"!=",
"null",
"&&",
"!",
"quotations",
".",
"contains",
"(",
"quotation",
")",
")",
"{",
"quotations",
".",
"add",
"(",
"quotation",
")",... | Set extracted quotations for the detected entity.
@param quotation extracted quotations for the detected entity | [
"Set",
"extracted",
"quotations",
"for",
"the",
"detected",
"entity",
"."
] | 5208cfc92a878ceeaff052787af29da92d98db7e | https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/entity/NamedEntityAlchemyEntity.java#L343-L347 |
149,977 | ahome-it/ahome-tooling-nativetools | src/main/java/com/ait/tooling/nativetools/client/collection/NFastArrayList.java | NFastArrayList.get | public final M get(final int index)
{
if ((index >= 0) && (index < size()))
{
return m_jso.get(index);
}
return null;
} | java | public final M get(final int index)
{
if ((index >= 0) && (index < size()))
{
return m_jso.get(index);
}
return null;
} | [
"public",
"final",
"M",
"get",
"(",
"final",
"int",
"index",
")",
"{",
"if",
"(",
"(",
"index",
">=",
"0",
")",
"&&",
"(",
"index",
"<",
"size",
"(",
")",
")",
")",
"{",
"return",
"m_jso",
".",
"get",
"(",
"index",
")",
";",
"}",
"return",
"n... | Return the primitive found at the specified index.
@param index
@return | [
"Return",
"the",
"primitive",
"found",
"at",
"the",
"specified",
"index",
"."
] | 0618b7c9998c09b0dcce74667478d5e767dad2e8 | https://github.com/ahome-it/ahome-tooling-nativetools/blob/0618b7c9998c09b0dcce74667478d5e767dad2e8/src/main/java/com/ait/tooling/nativetools/client/collection/NFastArrayList.java#L85-L92 |
149,978 | ahome-it/ahome-tooling-nativetools | src/main/java/com/ait/tooling/nativetools/client/collection/NFastArrayList.java | NFastArrayList.set | public final NFastArrayList<M> set(final int i, final M value)
{
m_jso.set(i, value);
return this;
} | java | public final NFastArrayList<M> set(final int i, final M value)
{
m_jso.set(i, value);
return this;
} | [
"public",
"final",
"NFastArrayList",
"<",
"M",
">",
"set",
"(",
"final",
"int",
"i",
",",
"final",
"M",
"value",
")",
"{",
"m_jso",
".",
"set",
"(",
"i",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Add a value to the List
@param value | [
"Add",
"a",
"value",
"to",
"the",
"List"
] | 0618b7c9998c09b0dcce74667478d5e767dad2e8 | https://github.com/ahome-it/ahome-tooling-nativetools/blob/0618b7c9998c09b0dcce74667478d5e767dad2e8/src/main/java/com/ait/tooling/nativetools/client/collection/NFastArrayList.java#L109-L114 |
149,979 | BellaDati/belladati-sdk-api | src/main/java/com/belladati/sdk/intervals/AbsoluteInterval.java | AbsoluteInterval.getStart | public Calendar getStart() {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(start);
return cal;
} | java | public Calendar getStart() {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(start);
return cal;
} | [
"public",
"Calendar",
"getStart",
"(",
")",
"{",
"Calendar",
"cal",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"cal",
".",
"setTimeInMillis",
"(",
"start",
")",
";",
"return",
"cal",
";",
"}"
] | Returns the start of the interval. This is the whole date that was
specified during instantiation, even if it's too detailed for the given
interval unit.
@return the start of the interval | [
"Returns",
"the",
"start",
"of",
"the",
"interval",
".",
"This",
"is",
"the",
"whole",
"date",
"that",
"was",
"specified",
"during",
"instantiation",
"even",
"if",
"it",
"s",
"too",
"detailed",
"for",
"the",
"given",
"interval",
"unit",
"."
] | ec45a42048d8255838ad0200aa6784a8e8a121c1 | https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/intervals/AbsoluteInterval.java#L61-L65 |
149,980 | BellaDati/belladati-sdk-api | src/main/java/com/belladati/sdk/intervals/AbsoluteInterval.java | AbsoluteInterval.getEnd | public Calendar getEnd() {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(end);
return cal;
} | java | public Calendar getEnd() {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(end);
return cal;
} | [
"public",
"Calendar",
"getEnd",
"(",
")",
"{",
"Calendar",
"cal",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"cal",
".",
"setTimeInMillis",
"(",
"end",
")",
";",
"return",
"cal",
";",
"}"
] | Returns the end of the interval. This is the whole date that was
specified during instantiation, even if it's too detailed for the given
interval unit.
@return the start of the interval | [
"Returns",
"the",
"end",
"of",
"the",
"interval",
".",
"This",
"is",
"the",
"whole",
"date",
"that",
"was",
"specified",
"during",
"instantiation",
"even",
"if",
"it",
"s",
"too",
"detailed",
"for",
"the",
"given",
"interval",
"unit",
"."
] | ec45a42048d8255838ad0200aa6784a8e8a121c1 | https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/intervals/AbsoluteInterval.java#L74-L78 |
149,981 | Metrink/croquet | croquet-examples/src/main/java/com/metrink/croquet/examples/crm/Main.java | Main.main | public static void main(final String[] args) {
// create the croquet object through the builder
final CroquetWicket<CrmSettings> croquet = configureBuilder(CrmSettings.class, args).build();
// get the custom settings for the application
// if custom settings aren't needed for Guice modu... | java | public static void main(final String[] args) {
// create the croquet object through the builder
final CroquetWicket<CrmSettings> croquet = configureBuilder(CrmSettings.class, args).build();
// get the custom settings for the application
// if custom settings aren't needed for Guice modu... | [
"public",
"static",
"void",
"main",
"(",
"final",
"String",
"[",
"]",
"args",
")",
"{",
"// create the croquet object through the builder",
"final",
"CroquetWicket",
"<",
"CrmSettings",
">",
"croquet",
"=",
"configureBuilder",
"(",
"CrmSettings",
".",
"class",
",",
... | The main method of this application.
@param args the command line arguments. | [
"The",
"main",
"method",
"of",
"this",
"application",
"."
] | 1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b | https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-examples/src/main/java/com/metrink/croquet/examples/crm/Main.java#L32-L52 |
149,982 | dhemery/hartley | src/main/java/com/dhemery/os/PublishingProcess.java | PublishingProcess.output | @Override
public String output() {
String output = process.output();
publisher.publish(new Returned(command, output));
return output;
} | java | @Override
public String output() {
String output = process.output();
publisher.publish(new Returned(command, output));
return output;
} | [
"@",
"Override",
"public",
"String",
"output",
"(",
")",
"{",
"String",
"output",
"=",
"process",
".",
"output",
"(",
")",
";",
"publisher",
".",
"publish",
"(",
"new",
"Returned",
"(",
"command",
",",
"output",
")",
")",
";",
"return",
"output",
";",
... | Publish and return the output from the underlying process. | [
"Publish",
"and",
"return",
"the",
"output",
"from",
"the",
"underlying",
"process",
"."
] | 7754bd6bc12695f2249601b8890da530a61fcf33 | https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/os/PublishingProcess.java#L33-L38 |
149,983 | bwkimmel/jdcp | jdcp-worker/src/main/java/ca/eandb/jdcp/worker/ThreadServiceWorker.java | ThreadServiceWorker.getWorker | private Worker getWorker() throws InterruptedException {
while (!courtesyMonitor.allowTasksToRun()) {
courtesyMonitor.waitFor();
}
while (numWorkers > maxWorkers) {
workerQueue.take();
numWorkers--;
}
return workerQueue.take();
} | java | private Worker getWorker() throws InterruptedException {
while (!courtesyMonitor.allowTasksToRun()) {
courtesyMonitor.waitFor();
}
while (numWorkers > maxWorkers) {
workerQueue.take();
numWorkers--;
}
return workerQueue.take();
} | [
"private",
"Worker",
"getWorker",
"(",
")",
"throws",
"InterruptedException",
"{",
"while",
"(",
"!",
"courtesyMonitor",
".",
"allowTasksToRun",
"(",
")",
")",
"{",
"courtesyMonitor",
".",
"waitFor",
"(",
")",
";",
"}",
"while",
"(",
"numWorkers",
">",
"maxW... | Gets the next worker available to process a task.
@return The next available worker.
@throws InterruptedException If the thread is interrupted while waiting
for an available worker. | [
"Gets",
"the",
"next",
"worker",
"available",
"to",
"process",
"a",
"task",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-worker/src/main/java/ca/eandb/jdcp/worker/ThreadServiceWorker.java#L248-L257 |
149,984 | leadware/jpersistence-tools | jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/ExpressionModel.java | ExpressionModel.addParameter | public void addParameter(String parameterName, String parameterExpression) {
// Si le nom du parametre est null
if(parameterName == null || parameterName.trim().length() == 0) return;
// Si l'expression est vide
if(parameterExpression == null || parameterExpression.trim().length() == 0) return;
... | java | public void addParameter(String parameterName, String parameterExpression) {
// Si le nom du parametre est null
if(parameterName == null || parameterName.trim().length() == 0) return;
// Si l'expression est vide
if(parameterExpression == null || parameterExpression.trim().length() == 0) return;
... | [
"public",
"void",
"addParameter",
"(",
"String",
"parameterName",
",",
"String",
"parameterExpression",
")",
"{",
"// Si le nom du parametre est null\r",
"if",
"(",
"parameterName",
"==",
"null",
"||",
"parameterName",
".",
"trim",
"(",
")",
".",
"length",
"(",
")... | Methode d'ajout d'un Parametre
@param parameterName Nom du parametre
@param parameterExpression Expression du parametre | [
"Methode",
"d",
"ajout",
"d",
"un",
"Parametre"
] | 4c15372993584579d7dbb9b23dd4c0c0fdc9e789 | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/utils/ExpressionModel.java#L112-L122 |
149,985 | icoloma/simpleds | src/main/java/org/simpleds/metadata/ClassMetadataFactory.java | ClassMetadataFactory.isCandidate | private boolean isCandidate(Field field) {
return !Modifier.isStatic(field.getModifiers()) && field.getAnnotation(Transient.class) == null;
} | java | private boolean isCandidate(Field field) {
return !Modifier.isStatic(field.getModifiers()) && field.getAnnotation(Transient.class) == null;
} | [
"private",
"boolean",
"isCandidate",
"(",
"Field",
"field",
")",
"{",
"return",
"!",
"Modifier",
".",
"isStatic",
"(",
"field",
".",
"getModifiers",
"(",
")",
")",
"&&",
"field",
".",
"getAnnotation",
"(",
"Transient",
".",
"class",
")",
"==",
"null",
";... | Return true if the field is static or marked as transient | [
"Return",
"true",
"if",
"the",
"field",
"is",
"static",
"or",
"marked",
"as",
"transient"
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/metadata/ClassMetadataFactory.java#L173-L175 |
149,986 | icoloma/simpleds | src/main/java/org/simpleds/metadata/ClassMetadataFactory.java | ClassMetadataFactory.isCandidate | private boolean isCandidate(PropertyDescriptor property) {
if ("class".equals(property.getName()) || property.getReadMethod() == null || Modifier.isStatic(property.getReadMethod().getModifiers())) {
return false;
}
Field field = getDeclaredField(property);
if (field == null && property.getWriteMethod() == nu... | java | private boolean isCandidate(PropertyDescriptor property) {
if ("class".equals(property.getName()) || property.getReadMethod() == null || Modifier.isStatic(property.getReadMethod().getModifiers())) {
return false;
}
Field field = getDeclaredField(property);
if (field == null && property.getWriteMethod() == nu... | [
"private",
"boolean",
"isCandidate",
"(",
"PropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"\"class\"",
".",
"equals",
"(",
"property",
".",
"getName",
"(",
")",
")",
"||",
"property",
".",
"getReadMethod",
"(",
")",
"==",
"null",
"||",
"Modifier",
"... | Return true if the field is private or marked as transient | [
"Return",
"true",
"if",
"the",
"field",
"is",
"private",
"or",
"marked",
"as",
"transient"
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/metadata/ClassMetadataFactory.java#L188-L198 |
149,987 | bwkimmel/jdcp | jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/MainWindow.java | MainWindow.startWorker | private void startWorker() {
JobServiceFactory serviceFactory = new JobServiceFactory() {
private boolean first = true;
public JobService connect() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
setStatus("Connecting...");
}
});
... | java | private void startWorker() {
JobServiceFactory serviceFactory = new JobServiceFactory() {
private boolean first = true;
public JobService connect() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
setStatus("Connecting...");
}
});
... | [
"private",
"void",
"startWorker",
"(",
")",
"{",
"JobServiceFactory",
"serviceFactory",
"=",
"new",
"JobServiceFactory",
"(",
")",
"{",
"private",
"boolean",
"first",
"=",
"true",
";",
"public",
"JobService",
"connect",
"(",
")",
"{",
"SwingUtilities",
".",
"i... | Start the worker thread. | [
"Start",
"the",
"worker",
"thread",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/MainWindow.java#L486-L576 |
149,988 | likethecolor/Alchemy-API | src/main/java/com/likethecolor/alchemy/api/entity/KeywordAlchemyEntity.java | KeywordAlchemyEntity.setKeyword | public void setKeyword(String keyword) {
if(keyword != null) {
keyword = keyword.trim();
}
this.keyword = keyword;
} | java | public void setKeyword(String keyword) {
if(keyword != null) {
keyword = keyword.trim();
}
this.keyword = keyword;
} | [
"public",
"void",
"setKeyword",
"(",
"String",
"keyword",
")",
"{",
"if",
"(",
"keyword",
"!=",
"null",
")",
"{",
"keyword",
"=",
"keyword",
".",
"trim",
"(",
")",
";",
"}",
"this",
".",
"keyword",
"=",
"keyword",
";",
"}"
] | Set the detected keyword text.
@param keyword detected keyword text | [
"Set",
"the",
"detected",
"keyword",
"text",
"."
] | 5208cfc92a878ceeaff052787af29da92d98db7e | https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/entity/KeywordAlchemyEntity.java#L48-L53 |
149,989 | icoloma/simpleds | src/main/java/org/simpleds/util/GenericCollectionTypeResolver.java | GenericCollectionTypeResolver.extractTypeFromParameterizedType | private static Class<?> extractTypeFromParameterizedType(MethodParameter methodParam,
ParameterizedType ptype, Class<?> source, int typeIndex, int nestingLevel, int currentLevel) {
if (!(ptype.getRawType() instanceof Class)) {
return null;
}
Class rawType = (Class) ptype.getRawType();
Type[] paramTypes =... | java | private static Class<?> extractTypeFromParameterizedType(MethodParameter methodParam,
ParameterizedType ptype, Class<?> source, int typeIndex, int nestingLevel, int currentLevel) {
if (!(ptype.getRawType() instanceof Class)) {
return null;
}
Class rawType = (Class) ptype.getRawType();
Type[] paramTypes =... | [
"private",
"static",
"Class",
"<",
"?",
">",
"extractTypeFromParameterizedType",
"(",
"MethodParameter",
"methodParam",
",",
"ParameterizedType",
"ptype",
",",
"Class",
"<",
"?",
">",
"source",
",",
"int",
"typeIndex",
",",
"int",
"nestingLevel",
",",
"int",
"cu... | Extract the generic type from the given ParameterizedType object.
@param methodParam the method parameter specification
@param ptype the ParameterizedType to check
@param source the expected raw source type (can be <code>null</code>)
@param typeIndex the index of the actual type argument
@param nestingLevel the nesting... | [
"Extract",
"the",
"generic",
"type",
"from",
"the",
"given",
"ParameterizedType",
"object",
"."
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/util/GenericCollectionTypeResolver.java#L291-L353 |
149,990 | sevensource/html-email-service | src/main/java/org/sevensource/commons/email/service/EmailTemplateRendererService.java | EmailTemplateRendererService.render | public String render(String templateName, EmailModel emailModel, Map<String, Object> model, Locale locale) {
if (logger.isDebugEnabled()) {
logger.debug("Rendering template [{}] for recipient [{}]", templateName, emailModel.getTo());
}
final IEngineConfiguration engineConfiguration = templateEngineFactory.ge... | java | public String render(String templateName, EmailModel emailModel, Map<String, Object> model, Locale locale) {
if (logger.isDebugEnabled()) {
logger.debug("Rendering template [{}] for recipient [{}]", templateName, emailModel.getTo());
}
final IEngineConfiguration engineConfiguration = templateEngineFactory.ge... | [
"public",
"String",
"render",
"(",
"String",
"templateName",
",",
"EmailModel",
"emailModel",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"model",
",",
"Locale",
"locale",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logg... | renders a template and returns its output
@param templateName the templateName to be resolved by Thymeleafs templateResolver
@param emailModel the emailModel
@param model additional model
@param locale the locale
@return rendered output | [
"renders",
"a",
"template",
"and",
"returns",
"its",
"output"
] | a55d9ef1a2173917cb5f870854bc24e5aaebd182 | https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/service/EmailTemplateRendererService.java#L53-L68 |
149,991 | sevensource/html-email-service | src/main/java/org/sevensource/commons/email/service/EmailTemplateRendererService.java | EmailTemplateRendererService.htmlToText | public String htmlToText(String html) {
final Source source = new Source(html);
return source.getRenderer().toString();
} | java | public String htmlToText(String html) {
final Source source = new Source(html);
return source.getRenderer().toString();
} | [
"public",
"String",
"htmlToText",
"(",
"String",
"html",
")",
"{",
"final",
"Source",
"source",
"=",
"new",
"Source",
"(",
"html",
")",
";",
"return",
"source",
".",
"getRenderer",
"(",
")",
".",
"toString",
"(",
")",
";",
"}"
] | Converts HTML to plain text using Jericho HTML parser
@see <a href="http://jericho.htmlparser.net">http://jericho.htmlparser.net</a>
@param html valid html Content
@return a plain text representation of the HTML content (line breaks, list items, tables, etc. converted) | [
"Converts",
"HTML",
"to",
"plain",
"text",
"using",
"Jericho",
"HTML",
"parser"
] | a55d9ef1a2173917cb5f870854bc24e5aaebd182 | https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/service/EmailTemplateRendererService.java#L77-L80 |
149,992 | icoloma/simpleds | src/main/java/org/simpleds/SimpleQuery.java | SimpleQuery.asList | public <T> List<T> asList() {
String cacheKey = null;
// is the result of the query cached?
if (isCacheable() && transaction == null) {
cacheKey = getCacheKey();
List<Key> keys = getCacheManager().get(cacheNamespace, cacheKey);
if (keys != null) {
if (isKeysOnly()) {
return (List) keys;
}... | java | public <T> List<T> asList() {
String cacheKey = null;
// is the result of the query cached?
if (isCacheable() && transaction == null) {
cacheKey = getCacheKey();
List<Key> keys = getCacheManager().get(cacheNamespace, cacheKey);
if (keys != null) {
if (isKeysOnly()) {
return (List) keys;
}... | [
"public",
"<",
"T",
">",
"List",
"<",
"T",
">",
"asList",
"(",
")",
"{",
"String",
"cacheKey",
"=",
"null",
";",
"// is the result of the query cached?",
"if",
"(",
"isCacheable",
"(",
")",
"&&",
"transaction",
"==",
"null",
")",
"{",
"cacheKey",
"=",
"g... | Execute the provided query and returns the result as a List of java objects
@return the list of resulting java entities | [
"Execute",
"the",
"provided",
"query",
"and",
"returns",
"the",
"result",
"as",
"a",
"List",
"of",
"java",
"objects"
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/SimpleQuery.java#L379-L410 |
149,993 | icoloma/simpleds | src/main/java/org/simpleds/SimpleQuery.java | SimpleQuery.asCursorList | public <T> CursorList<T> asCursorList(int size) {
CursorList<T> result = CursorList.create(this, size);
return result;
} | java | public <T> CursorList<T> asCursorList(int size) {
CursorList<T> result = CursorList.create(this, size);
return result;
} | [
"public",
"<",
"T",
">",
"CursorList",
"<",
"T",
">",
"asCursorList",
"(",
"int",
"size",
")",
"{",
"CursorList",
"<",
"T",
">",
"result",
"=",
"CursorList",
".",
"create",
"(",
"this",
",",
"size",
")",
";",
"return",
"result",
";",
"}"
] | Execute the query and return a CursorList
@return the CursorList according to the provided startCursor and limit values | [
"Execute",
"the",
"query",
"and",
"return",
"a",
"CursorList"
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/SimpleQuery.java#L425-L428 |
149,994 | icoloma/simpleds | src/main/java/org/simpleds/SimpleQuery.java | SimpleQuery.asSingleResult | public <T> T asSingleResult() {
T javaObject = null;
String cacheKey = getCacheKey();
if (isCacheable() && transaction == null) {
Collection<Key> keys = getCacheManager().get(cacheNamespace, cacheKey);
if (keys != null && keys.size() > 0) {
Key key = keys.iterator().next();
try {
javaObject = (... | java | public <T> T asSingleResult() {
T javaObject = null;
String cacheKey = getCacheKey();
if (isCacheable() && transaction == null) {
Collection<Key> keys = getCacheManager().get(cacheNamespace, cacheKey);
if (keys != null && keys.size() > 0) {
Key key = keys.iterator().next();
try {
javaObject = (... | [
"public",
"<",
"T",
">",
"T",
"asSingleResult",
"(",
")",
"{",
"T",
"javaObject",
"=",
"null",
";",
"String",
"cacheKey",
"=",
"getCacheKey",
"(",
")",
";",
"if",
"(",
"isCacheable",
"(",
")",
"&&",
"transaction",
"==",
"null",
")",
"{",
"Collection",
... | Execute the query and return a single result
@return the first result of the query
@throws EntityNotFoundException if the query did not return any result | [
"Execute",
"the",
"query",
"and",
"return",
"a",
"single",
"result"
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/SimpleQuery.java#L435-L461 |
149,995 | icoloma/simpleds | src/main/java/org/simpleds/SimpleQuery.java | SimpleQuery.count | public int count() {
Integer result = null;
if (result == null) {
SimpleQuery q = this.isKeysOnly()? this : this.clone().keysOnly();
result = getDatastoreService().prepare(q.getQuery()).countEntities(fetchOptions);
}
return result;
} | java | public int count() {
Integer result = null;
if (result == null) {
SimpleQuery q = this.isKeysOnly()? this : this.clone().keysOnly();
result = getDatastoreService().prepare(q.getQuery()).countEntities(fetchOptions);
}
return result;
} | [
"public",
"int",
"count",
"(",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"SimpleQuery",
"q",
"=",
"this",
".",
"isKeysOnly",
"(",
")",
"?",
"this",
":",
"this",
".",
"clone",
"(",
")",
".",
"key... | Counts the number of instances returned from this query. This method will only
retrieve the matching keys, not the entities themselves. | [
"Counts",
"the",
"number",
"of",
"instances",
"returned",
"from",
"this",
"query",
".",
"This",
"method",
"will",
"only",
"retrieve",
"the",
"matching",
"keys",
"not",
"the",
"entities",
"themselves",
"."
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/SimpleQuery.java#L477-L484 |
149,996 | icoloma/simpleds | src/main/java/org/simpleds/SimpleQuery.java | SimpleQuery.addCommonCacheKeyParts | private void addCommonCacheKeyParts(StringBuilder builder) {
builder.append("kind=").append(getKind());
List<FilterPredicate> predicates = query.getFilterPredicates();
if (predicates.size() > 0) {
builder.append(",pred=").append(predicates);
}
} | java | private void addCommonCacheKeyParts(StringBuilder builder) {
builder.append("kind=").append(getKind());
List<FilterPredicate> predicates = query.getFilterPredicates();
if (predicates.size() > 0) {
builder.append(",pred=").append(predicates);
}
} | [
"private",
"void",
"addCommonCacheKeyParts",
"(",
"StringBuilder",
"builder",
")",
"{",
"builder",
".",
"append",
"(",
"\"kind=\"",
")",
".",
"append",
"(",
"getKind",
"(",
")",
")",
";",
"List",
"<",
"FilterPredicate",
">",
"predicates",
"=",
"query",
".",
... | Add cache key parts that are common to query data and query count.
@param builder | [
"Add",
"cache",
"key",
"parts",
"that",
"are",
"common",
"to",
"query",
"data",
"and",
"query",
"count",
"."
] | b07763df98b9375b764e625f617a6c78df4b068d | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/SimpleQuery.java#L559-L565 |
149,997 | io7m/jcanephora | com.io7m.jcanephora.jogl/src/main/java/com/io7m/jcanephora/jogl/JOGLTypeConversions.java | JOGLTypeConversions.polygonModeFromGL | public static JCGLPolygonMode polygonModeFromGL(
final int g)
{
switch (g) {
case GL2GL3.GL_FILL:
return JCGLPolygonMode.POLYGON_FILL;
case GL2GL3.GL_LINE:
return JCGLPolygonMode.POLYGON_LINES;
case GL2GL3.GL_POINT:
return JCGLPolygonMode.POLYGON_POINTS;
default... | java | public static JCGLPolygonMode polygonModeFromGL(
final int g)
{
switch (g) {
case GL2GL3.GL_FILL:
return JCGLPolygonMode.POLYGON_FILL;
case GL2GL3.GL_LINE:
return JCGLPolygonMode.POLYGON_LINES;
case GL2GL3.GL_POINT:
return JCGLPolygonMode.POLYGON_POINTS;
default... | [
"public",
"static",
"JCGLPolygonMode",
"polygonModeFromGL",
"(",
"final",
"int",
"g",
")",
"{",
"switch",
"(",
"g",
")",
"{",
"case",
"GL2GL3",
".",
"GL_FILL",
":",
"return",
"JCGLPolygonMode",
".",
"POLYGON_FILL",
";",
"case",
"GL2GL3",
".",
"GL_LINE",
":",... | Convert polygon modes from GL constants.
@param g The GL constant.
@return The value. | [
"Convert",
"polygon",
"modes",
"from",
"GL",
"constants",
"."
] | 0004c1744b7f0969841d04cd4fa693f402b10980 | https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.jogl/src/main/java/com/io7m/jcanephora/jogl/JOGLTypeConversions.java#L168-L181 |
149,998 | vikingbrain/thedavidbox-client4j | src/main/java/com/vikingbrain/nmt/client/modules/impl/ModuleMetadataDatabaseImpl.java | ModuleMetadataDatabaseImpl.getDatabase | private MetadataDatabase getDatabase(String deviceUrl) throws TheDavidBoxClientException{
ResponseCheckDatabase responseCheckDatabase = buildCheckDatabaseOperation(deviceUrl).execute();
String databasePath = responseCheckDatabase.getDatabasePath();
MetadataDatabase database = new MetadataDatabase(deviceUr... | java | private MetadataDatabase getDatabase(String deviceUrl) throws TheDavidBoxClientException{
ResponseCheckDatabase responseCheckDatabase = buildCheckDatabaseOperation(deviceUrl).execute();
String databasePath = responseCheckDatabase.getDatabasePath();
MetadataDatabase database = new MetadataDatabase(deviceUr... | [
"private",
"MetadataDatabase",
"getDatabase",
"(",
"String",
"deviceUrl",
")",
"throws",
"TheDavidBoxClientException",
"{",
"ResponseCheckDatabase",
"responseCheckDatabase",
"=",
"buildCheckDatabaseOperation",
"(",
"deviceUrl",
")",
".",
"execute",
"(",
")",
";",
"String"... | Get a possible database from a device url.
@param deviceUrl the device url
@return the metadata database
@throws TheDavidBoxClientException exception in the client | [
"Get",
"a",
"possible",
"database",
"from",
"a",
"device",
"url",
"."
] | b2375a59b30fc3bd5dae34316bda68e01d006535 | https://github.com/vikingbrain/thedavidbox-client4j/blob/b2375a59b30fc3bd5dae34316bda68e01d006535/src/main/java/com/vikingbrain/nmt/client/modules/impl/ModuleMetadataDatabaseImpl.java#L100-L106 |
149,999 | vikingbrain/thedavidbox-client4j | src/main/java/com/vikingbrain/nmt/controller/impl/RemoteHttpServiceImpl.java | RemoteHttpServiceImpl.encodeHttpParameter | private String encodeHttpParameter(String str){
//It translates the empty space
String encoded = str.replaceAll(" ", "%20");
//It translates the & symbol
encoded = encoded.replaceAll("&", "%26");
// encoded = encoded.replaceAll("$", "%24");
// encoded = encoded.replaceAll("`", "%60");
// encoded = ... | java | private String encodeHttpParameter(String str){
//It translates the empty space
String encoded = str.replaceAll(" ", "%20");
//It translates the & symbol
encoded = encoded.replaceAll("&", "%26");
// encoded = encoded.replaceAll("$", "%24");
// encoded = encoded.replaceAll("`", "%60");
// encoded = ... | [
"private",
"String",
"encodeHttpParameter",
"(",
"String",
"str",
")",
"{",
"//It translates the empty space",
"String",
"encoded",
"=",
"str",
".",
"replaceAll",
"(",
"\" \"",
",",
"\"%20\"",
")",
";",
"//It translates the & symbol\t\t\t\t",
"encoded",
"=",
"encoded"... | It encodes special symbols in their valid representations
for http requests.
@param str the text to encode
@return the text encoded for http | [
"It",
"encodes",
"special",
"symbols",
"in",
"their",
"valid",
"representations",
"for",
"http",
"requests",
"."
] | b2375a59b30fc3bd5dae34316bda68e01d006535 | https://github.com/vikingbrain/thedavidbox-client4j/blob/b2375a59b30fc3bd5dae34316bda68e01d006535/src/main/java/com/vikingbrain/nmt/controller/impl/RemoteHttpServiceImpl.java#L62-L80 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.