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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
153,600 | watchrabbit/rabbit-commons | src/main/java/com/watchrabbit/commons/sleep/Sleep.java | Sleep.sleep | public static void sleep(long timeout, TimeUnit unit) throws SystemException {
suppress((Long sleepTimeout) -> Thread.sleep(sleepTimeout))
.accept(TimeUnit.MILLISECONDS.convert(timeout, unit));
} | java | public static void sleep(long timeout, TimeUnit unit) throws SystemException {
suppress((Long sleepTimeout) -> Thread.sleep(sleepTimeout))
.accept(TimeUnit.MILLISECONDS.convert(timeout, unit));
} | [
"public",
"static",
"void",
"sleep",
"(",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"throws",
"SystemException",
"{",
"suppress",
"(",
"(",
"Long",
"sleepTimeout",
")",
"->",
"Thread",
".",
"sleep",
"(",
"sleepTimeout",
")",
")",
".",
"accept",
"(",... | Causes the current thread to wait until the specified waiting time
elapses.
<p>
Any {@code InterruptedException}'s are suppress and logged. Any
{@code Exception}'s thrown by callable are propagate as SystemException
@param timeout the maximum time to wait
@param unit the time unit of the {@code timeout} argument
@thr... | [
"Causes",
"the",
"current",
"thread",
"to",
"wait",
"until",
"the",
"specified",
"waiting",
"time",
"elapses",
"."
] | b11c9f804b5ab70b9264635c34a02f5029bd2a5d | https://github.com/watchrabbit/rabbit-commons/blob/b11c9f804b5ab70b9264635c34a02f5029bd2a5d/src/main/java/com/watchrabbit/commons/sleep/Sleep.java#L42-L45 |
153,601 | watchrabbit/rabbit-commons | src/main/java/com/watchrabbit/commons/sleep/Sleep.java | Sleep.untilEmpty | public static <T extends Collection> T untilEmpty(Callable<T> callable, long timeout, TimeUnit unit) {
return SleepBuilder.<T>sleep()
.withComparer(argument -> argument.isEmpty())
.withTimeout(timeout, unit)
.withStatement(callable)
.build();
... | java | public static <T extends Collection> T untilEmpty(Callable<T> callable, long timeout, TimeUnit unit) {
return SleepBuilder.<T>sleep()
.withComparer(argument -> argument.isEmpty())
.withTimeout(timeout, unit)
.withStatement(callable)
.build();
... | [
"public",
"static",
"<",
"T",
"extends",
"Collection",
">",
"T",
"untilEmpty",
"(",
"Callable",
"<",
"T",
">",
"callable",
",",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"{",
"return",
"SleepBuilder",
".",
"<",
"T",
">",
"sleep",
"(",
")",
".",
... | Causes the current thread to wait until the callable is returning empty
collection, or the specified waiting time elapses.
<p>
If the callable returns not empty collection then this method returns
immediately with the value returned by callable.
<p>
Any {@code InterruptedException}'s are suppress and logged. Any
{@co... | [
"Causes",
"the",
"current",
"thread",
"to",
"wait",
"until",
"the",
"callable",
"is",
"returning",
"empty",
"collection",
"or",
"the",
"specified",
"waiting",
"time",
"elapses",
"."
] | b11c9f804b5ab70b9264635c34a02f5029bd2a5d | https://github.com/watchrabbit/rabbit-commons/blob/b11c9f804b5ab70b9264635c34a02f5029bd2a5d/src/main/java/com/watchrabbit/commons/sleep/Sleep.java#L169-L175 |
153,602 | jkyamog/DeDS | mobile-dds/src/main/java/nz/net/catalyst/mobile/dds/WurflCapabilityServiceImpl.java | WurflCapabilityServiceImpl.init | public void init() {
// before running init check to see if attributes has been injected/set
if (wurflDirPath == null)
throw new IllegalStateException ("wurflDirPath not properly set");
// look for wurfl file and patches
File wurflDir = new File(wurflDirPath);
// if ... | java | public void init() {
// before running init check to see if attributes has been injected/set
if (wurflDirPath == null)
throw new IllegalStateException ("wurflDirPath not properly set");
// look for wurfl file and patches
File wurflDir = new File(wurflDirPath);
// if ... | [
"public",
"void",
"init",
"(",
")",
"{",
"// before running init check to see if attributes has been injected/set",
"if",
"(",
"wurflDirPath",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"wurflDirPath not properly set\"",
")",
";",
"// look for wurfl fi... | init will properly initialize this service. this would look for wurfl files
and instantiate a wurfl holder | [
"init",
"will",
"properly",
"initialize",
"this",
"service",
".",
"this",
"would",
"look",
"for",
"wurfl",
"files",
"and",
"instantiate",
"a",
"wurfl",
"holder"
] | d8cf6a294a23daa8e8a92073827c73b1befe3fa1 | https://github.com/jkyamog/DeDS/blob/d8cf6a294a23daa8e8a92073827c73b1befe3fa1/mobile-dds/src/main/java/nz/net/catalyst/mobile/dds/WurflCapabilityServiceImpl.java#L76-L115 |
153,603 | jkyamog/DeDS | mobile-dds/src/main/java/nz/net/catalyst/mobile/dds/WurflCapabilityServiceImpl.java | WurflCapabilityServiceImpl.startWatchingFiles | protected synchronized void startWatchingFiles() {
famList.clear();
FilesystemAlterationMonitor fam = new FilesystemAlterationMonitor();
FileChangeListener wurflListener = new WurflFileListener();
fam.addListener(wurflFile, wurflListener);
fam.start();
famList.add(fam);
logger... | java | protected synchronized void startWatchingFiles() {
famList.clear();
FilesystemAlterationMonitor fam = new FilesystemAlterationMonitor();
FileChangeListener wurflListener = new WurflFileListener();
fam.addListener(wurflFile, wurflListener);
fam.start();
famList.add(fam);
logger... | [
"protected",
"synchronized",
"void",
"startWatchingFiles",
"(",
")",
"{",
"famList",
".",
"clear",
"(",
")",
";",
"FilesystemAlterationMonitor",
"fam",
"=",
"new",
"FilesystemAlterationMonitor",
"(",
")",
";",
"FileChangeListener",
"wurflListener",
"=",
"new",
"Wurf... | create listeners and monitors for wurfl and its patches | [
"create",
"listeners",
"and",
"monitors",
"for",
"wurfl",
"and",
"its",
"patches"
] | d8cf6a294a23daa8e8a92073827c73b1befe3fa1 | https://github.com/jkyamog/DeDS/blob/d8cf6a294a23daa8e8a92073827c73b1befe3fa1/mobile-dds/src/main/java/nz/net/catalyst/mobile/dds/WurflCapabilityServiceImpl.java#L179-L198 |
153,604 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.checkFile | public static Exception checkFile(final File file)
{
Exception ex = null;
String error = null;
// check if the file does not exists...
if (!file.exists())
{
error = "The " + file + " does not exists.";
ex = new FileDoesNotExistException(error);
return ex;
}
// check if the file is not a director... | java | public static Exception checkFile(final File file)
{
Exception ex = null;
String error = null;
// check if the file does not exists...
if (!file.exists())
{
error = "The " + file + " does not exists.";
ex = new FileDoesNotExistException(error);
return ex;
}
// check if the file is not a director... | [
"public",
"static",
"Exception",
"checkFile",
"(",
"final",
"File",
"file",
")",
"{",
"Exception",
"ex",
"=",
"null",
";",
"String",
"error",
"=",
"null",
";",
"// check if the file does not exists...",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
")",
")",
... | Checks the File if it is a directory or if its exists or if it is empty.
@param file
The File to check.
@return Null if nothing is wrong otherwise an Exception. | [
"Checks",
"the",
"File",
"if",
"it",
"is",
"a",
"directory",
"or",
"if",
"its",
"exists",
"or",
"if",
"it",
"is",
"empty",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L60-L87 |
153,605 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.delete | public static void delete(final @NonNull File file) throws IOException
{
if (file.isDirectory())
{
DeleteFileExtensions.deleteAllFiles(file);
}
else
{
String error = null;
// If the file is not deleted
if (!file.delete())
{
error = "Cannot delete the File " + file.getAbsolutePath() + ".";
... | java | public static void delete(final @NonNull File file) throws IOException
{
if (file.isDirectory())
{
DeleteFileExtensions.deleteAllFiles(file);
}
else
{
String error = null;
// If the file is not deleted
if (!file.delete())
{
error = "Cannot delete the File " + file.getAbsolutePath() + ".";
... | [
"public",
"static",
"void",
"delete",
"(",
"final",
"@",
"NonNull",
"File",
"file",
")",
"throws",
"IOException",
"{",
"if",
"(",
"file",
".",
"isDirectory",
"(",
")",
")",
"{",
"DeleteFileExtensions",
".",
"deleteAllFiles",
"(",
"file",
")",
";",
"}",
"... | Tries to delete a file and if its a directory than its deletes all the sub-directories.
@param file
The File to delete.
@throws IOException
Signals that an I/O exception has occurred. | [
"Tries",
"to",
"delete",
"a",
"file",
"and",
"if",
"its",
"a",
"directory",
"than",
"its",
"deletes",
"all",
"the",
"sub",
"-",
"directories",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L115-L133 |
153,606 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.deleteAllFiles | public static void deleteAllFiles(final File file) throws IOException
{
String error = null;
if (!file.exists())
{
return;
}
final Exception ex = checkFile(file);
if (ex != null)
{
try
{
throw ex;
}
catch (final Exception e)
{
e.printStackTrace();
}
}
DeleteFileExtensions... | java | public static void deleteAllFiles(final File file) throws IOException
{
String error = null;
if (!file.exists())
{
return;
}
final Exception ex = checkFile(file);
if (ex != null)
{
try
{
throw ex;
}
catch (final Exception e)
{
e.printStackTrace();
}
}
DeleteFileExtensions... | [
"public",
"static",
"void",
"deleteAllFiles",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"String",
"error",
"=",
"null",
";",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
")",
")",
"{",
"return",
";",
"}",
"final",
"Exception",
"ex... | Deletes the File and if it is an directory it deletes his sub-directories recursively.
@param file
The File to delete.
@throws IOException
Signals that an I/O exception has occurred. | [
"Deletes",
"the",
"File",
"and",
"if",
"it",
"is",
"an",
"directory",
"it",
"deletes",
"his",
"sub",
"-",
"directories",
"recursively",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L144-L171 |
153,607 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.deleteAllFilesWithSuffix | public static void deleteAllFilesWithSuffix(final File file, final String theSuffix)
throws IOException
{
final String filePath = file.getAbsolutePath();
final String suffix[] = { theSuffix };
final List<File> files = FileSearchExtensions.findFiles(filePath, suffix);
final int fileCount = files.size();
for... | java | public static void deleteAllFilesWithSuffix(final File file, final String theSuffix)
throws IOException
{
final String filePath = file.getAbsolutePath();
final String suffix[] = { theSuffix };
final List<File> files = FileSearchExtensions.findFiles(filePath, suffix);
final int fileCount = files.size();
for... | [
"public",
"static",
"void",
"deleteAllFilesWithSuffix",
"(",
"final",
"File",
"file",
",",
"final",
"String",
"theSuffix",
")",
"throws",
"IOException",
"{",
"final",
"String",
"filePath",
"=",
"file",
".",
"getAbsolutePath",
"(",
")",
";",
"final",
"String",
... | Deletes all files with the given suffix recursively.
@param file
The directory from where to delete the files wiht the given suffix.
@param theSuffix
The suffix from the files to delete.
@throws IOException
Signals that an I/O exception has occurred. | [
"Deletes",
"all",
"files",
"with",
"the",
"given",
"suffix",
"recursively",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L184-L195 |
153,608 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.deleteFiles | public static void deleteFiles(final File file) throws IOException
{
final File[] ff = file.listFiles();
if (ff != null)
{
for (final File f : ff)
{
DeleteFileExtensions.delete(f);
}
}
} | java | public static void deleteFiles(final File file) throws IOException
{
final File[] ff = file.listFiles();
if (ff != null)
{
for (final File f : ff)
{
DeleteFileExtensions.delete(f);
}
}
} | [
"public",
"static",
"void",
"deleteFiles",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"final",
"File",
"[",
"]",
"ff",
"=",
"file",
".",
"listFiles",
"(",
")",
";",
"if",
"(",
"ff",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
... | Tries to delete all files in the Directory.
@param file
The Directory to delete files.
@throws IOException
Signals that an I/O exception has occurred. | [
"Tries",
"to",
"delete",
"all",
"files",
"in",
"the",
"Directory",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L220-L230 |
153,609 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.deleteFilesWithFileFilter | public static void deleteFilesWithFileFilter(final File source,
final FileFilter includeFileFilter)
throws FileIsNotADirectoryException, IOException, FileIsSecurityRestrictedException
{
DeleteFileExtensions.deleteFilesWithFileFilter(source, includeFileFilter, null);
} | java | public static void deleteFilesWithFileFilter(final File source,
final FileFilter includeFileFilter)
throws FileIsNotADirectoryException, IOException, FileIsSecurityRestrictedException
{
DeleteFileExtensions.deleteFilesWithFileFilter(source, includeFileFilter, null);
} | [
"public",
"static",
"void",
"deleteFilesWithFileFilter",
"(",
"final",
"File",
"source",
",",
"final",
"FileFilter",
"includeFileFilter",
")",
"throws",
"FileIsNotADirectoryException",
",",
"IOException",
",",
"FileIsSecurityRestrictedException",
"{",
"DeleteFileExtensions",
... | Tries to delete all files that match to the given includeFileFilter from the given source
directory.
@param source
The source directory.
@param includeFileFilter
The FileFilter for the files to be deleted. If null all files will be deleted.
@throws FileIsNotADirectoryException
Is thrown if the destination file is a d... | [
"Tries",
"to",
"delete",
"all",
"files",
"that",
"match",
"to",
"the",
"given",
"includeFileFilter",
"from",
"the",
"given",
"source",
"directory",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L248-L253 |
153,610 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.deleteFilesWithFileFilter | public static void deleteFilesWithFileFilter(final File source,
final FileFilter includeFileFilter, final FileFilter excludeFileFilter)
throws FileIsNotADirectoryException, IOException, FileIsSecurityRestrictedException
{
if (!source.isDirectory())
{
throw new FileIsNotADirectoryException(
"Source file ... | java | public static void deleteFilesWithFileFilter(final File source,
final FileFilter includeFileFilter, final FileFilter excludeFileFilter)
throws FileIsNotADirectoryException, IOException, FileIsSecurityRestrictedException
{
if (!source.isDirectory())
{
throw new FileIsNotADirectoryException(
"Source file ... | [
"public",
"static",
"void",
"deleteFilesWithFileFilter",
"(",
"final",
"File",
"source",
",",
"final",
"FileFilter",
"includeFileFilter",
",",
"final",
"FileFilter",
"excludeFileFilter",
")",
"throws",
"FileIsNotADirectoryException",
",",
"IOException",
",",
"FileIsSecuri... | Tries to delete all files that match to the given includeFileFilter and does not delete the
files that match the excludeFileFilter from the given source directory.
@param source
The source directory.
@param includeFileFilter
The FileFilter for the files to be deleted. If null all files will be deleted.
@param excludeF... | [
"Tries",
"to",
"delete",
"all",
"files",
"that",
"match",
"to",
"the",
"given",
"includeFileFilter",
"and",
"does",
"not",
"delete",
"the",
"files",
"that",
"match",
"the",
"excludeFileFilter",
"from",
"the",
"given",
"source",
"directory",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L274-L347 |
153,611 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.deleteFilesWithFilenameFilter | public static void deleteFilesWithFilenameFilter(final File source,
final FilenameFilter includeFilenameFilter)
throws FileIsNotADirectoryException, IOException, FileIsSecurityRestrictedException
{
DeleteFileExtensions.deleteFilesWithFilenameFilter(source, includeFilenameFilter, null);
} | java | public static void deleteFilesWithFilenameFilter(final File source,
final FilenameFilter includeFilenameFilter)
throws FileIsNotADirectoryException, IOException, FileIsSecurityRestrictedException
{
DeleteFileExtensions.deleteFilesWithFilenameFilter(source, includeFilenameFilter, null);
} | [
"public",
"static",
"void",
"deleteFilesWithFilenameFilter",
"(",
"final",
"File",
"source",
",",
"final",
"FilenameFilter",
"includeFilenameFilter",
")",
"throws",
"FileIsNotADirectoryException",
",",
"IOException",
",",
"FileIsSecurityRestrictedException",
"{",
"DeleteFileE... | Tries to delete all files that match to the given includeFilenameFilter from the given source
directory.
@param source
The source directory.
@param includeFilenameFilter
The FilenameFilter for the files to be deleted. If null all files will be deleted.
@throws FileIsNotADirectoryException
Is thrown if the destination... | [
"Tries",
"to",
"delete",
"all",
"files",
"that",
"match",
"to",
"the",
"given",
"includeFilenameFilter",
"from",
"the",
"given",
"source",
"directory",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L365-L370 |
153,612 | lightblueseas/file-worker | src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java | DeleteFileExtensions.deleteFilesWithFilenameFilter | public static void deleteFilesWithFilenameFilter(final File source,
final FilenameFilter includeFilenameFilter, final FilenameFilter excludeFilenameFilter)
throws FileIsNotADirectoryException, IOException, FileIsSecurityRestrictedException
{
if (!source.isDirectory())
{
throw new FileIsNotADirectoryExceptio... | java | public static void deleteFilesWithFilenameFilter(final File source,
final FilenameFilter includeFilenameFilter, final FilenameFilter excludeFilenameFilter)
throws FileIsNotADirectoryException, IOException, FileIsSecurityRestrictedException
{
if (!source.isDirectory())
{
throw new FileIsNotADirectoryExceptio... | [
"public",
"static",
"void",
"deleteFilesWithFilenameFilter",
"(",
"final",
"File",
"source",
",",
"final",
"FilenameFilter",
"includeFilenameFilter",
",",
"final",
"FilenameFilter",
"excludeFilenameFilter",
")",
"throws",
"FileIsNotADirectoryException",
",",
"IOException",
... | Tries to delete all files that match to the given includeFilenameFilter and does not delete
the files that match the excludeFilenameFilter from the given source directory.
@param source
The source directory.
@param includeFilenameFilter
The FilenameFilter for the files to be deleted. If null all files will be deleted.... | [
"Tries",
"to",
"delete",
"all",
"files",
"that",
"match",
"to",
"the",
"given",
"includeFilenameFilter",
"and",
"does",
"not",
"delete",
"the",
"files",
"that",
"match",
"the",
"excludeFilenameFilter",
"from",
"the",
"given",
"source",
"directory",
"."
] | 2c81de10fb5d68de64c1abc3ed64ca681ce76da8 | https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/delete/DeleteFileExtensions.java#L391-L464 |
153,613 | incodehq-legacy/incode-module-base | dom/src/main/java/org/incode/module/base/dom/valuetypes/AbstractInterval.java | AbstractInterval.contains | public boolean contains(final LocalDate date) {
if (date == null){
return false;
}
if (endDate() == null) {
if (startDate() == null) {
return true;
}
if (date.isEqual(startDate()) || date.isAfter(startDate())) {
retu... | java | public boolean contains(final LocalDate date) {
if (date == null){
return false;
}
if (endDate() == null) {
if (startDate() == null) {
return true;
}
if (date.isEqual(startDate()) || date.isAfter(startDate())) {
retu... | [
"public",
"boolean",
"contains",
"(",
"final",
"LocalDate",
"date",
")",
"{",
"if",
"(",
"date",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"endDate",
"(",
")",
"==",
"null",
")",
"{",
"if",
"(",
"startDate",
"(",
")",
"==",
... | Does this date contain the specified time interval.
@param date
@return | [
"Does",
"this",
"date",
"contain",
"the",
"specified",
"time",
"interval",
"."
] | 8dfbf946c26423adf6d3e751698968b035c4ef11 | https://github.com/incodehq-legacy/incode-module-base/blob/8dfbf946c26423adf6d3e751698968b035c4ef11/dom/src/main/java/org/incode/module/base/dom/valuetypes/AbstractInterval.java#L106-L120 |
153,614 | incodehq-legacy/incode-module-base | dom/src/main/java/org/incode/module/base/dom/valuetypes/AbstractInterval.java | AbstractInterval.days | public int days() {
if (isInfinite()) {
return 0;
}
Period p = new Period(asInterval(), PeriodType.days());
return p.getDays();
} | java | public int days() {
if (isInfinite()) {
return 0;
}
Period p = new Period(asInterval(), PeriodType.days());
return p.getDays();
} | [
"public",
"int",
"days",
"(",
")",
"{",
"if",
"(",
"isInfinite",
"(",
")",
")",
"{",
"return",
"0",
";",
"}",
"Period",
"p",
"=",
"new",
"Period",
"(",
"asInterval",
"(",
")",
",",
"PeriodType",
".",
"days",
"(",
")",
")",
";",
"return",
"p",
"... | The duration in days
@return | [
"The",
"duration",
"in",
"days"
] | 8dfbf946c26423adf6d3e751698968b035c4ef11 | https://github.com/incodehq-legacy/incode-module-base/blob/8dfbf946c26423adf6d3e751698968b035c4ef11/dom/src/main/java/org/incode/module/base/dom/valuetypes/AbstractInterval.java#L137-L143 |
153,615 | incodehq-legacy/incode-module-base | dom/src/main/java/org/incode/module/base/dom/valuetypes/AbstractInterval.java | AbstractInterval.dateToString | protected String dateToString(LocalDate localDate, String format) {
return localDate == null ? "----------" : localDate.toString(format);
} | java | protected String dateToString(LocalDate localDate, String format) {
return localDate == null ? "----------" : localDate.toString(format);
} | [
"protected",
"String",
"dateToString",
"(",
"LocalDate",
"localDate",
",",
"String",
"format",
")",
"{",
"return",
"localDate",
"==",
"null",
"?",
"\"----------\"",
":",
"localDate",
".",
"toString",
"(",
"format",
")",
";",
"}"
] | For benefit of subclass toString implementations. | [
"For",
"benefit",
"of",
"subclass",
"toString",
"implementations",
"."
] | 8dfbf946c26423adf6d3e751698968b035c4ef11 | https://github.com/incodehq-legacy/incode-module-base/blob/8dfbf946c26423adf6d3e751698968b035c4ef11/dom/src/main/java/org/incode/module/base/dom/valuetypes/AbstractInterval.java#L179-L181 |
153,616 | incodehq-legacy/incode-module-base | dom/src/main/java/org/incode/module/base/dom/valuetypes/AbstractInterval.java | AbstractInterval.overlap | @SuppressWarnings("unchecked")
public T overlap(final T otherInterval) {
if (otherInterval == null) {
return null;
}
if (otherInterval.isInfinite()) {
return (T)this;
}
if (this.isInfinite()) {
return otherInterval;
}
final ... | java | @SuppressWarnings("unchecked")
public T overlap(final T otherInterval) {
if (otherInterval == null) {
return null;
}
if (otherInterval.isInfinite()) {
return (T)this;
}
if (this.isInfinite()) {
return otherInterval;
}
final ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"T",
"overlap",
"(",
"final",
"T",
"otherInterval",
")",
"{",
"if",
"(",
"otherInterval",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"otherInterval",
".",
"isInfinite",
"(",
... | Gets the overlap between this interval and another interval.
@param otherInterval
@return | [
"Gets",
"the",
"overlap",
"between",
"this",
"interval",
"and",
"another",
"interval",
"."
] | 8dfbf946c26423adf6d3e751698968b035c4ef11 | https://github.com/incodehq-legacy/incode-module-base/blob/8dfbf946c26423adf6d3e751698968b035c4ef11/dom/src/main/java/org/incode/module/base/dom/valuetypes/AbstractInterval.java#L189-L207 |
153,617 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/ElasticChain.java | ElasticChain.horizontalForce | public double horizontalForce(Double T, double d)
{
return AE*Math.sqrt(Math.pow(T/AE+1, 2)-2*w*d/AE)-AE;
} | java | public double horizontalForce(Double T, double d)
{
return AE*Math.sqrt(Math.pow(T/AE+1, 2)-2*w*d/AE)-AE;
} | [
"public",
"double",
"horizontalForce",
"(",
"Double",
"T",
",",
"double",
"d",
")",
"{",
"return",
"AE",
"*",
"Math",
".",
"sqrt",
"(",
"Math",
".",
"pow",
"(",
"T",
"/",
"AE",
"+",
"1",
",",
"2",
")",
"-",
"2",
"*",
"w",
"*",
"d",
"/",
"AE",... | Horizontal force for a given fairlead tension T
@param T Fairlead tension
@param d depth
@return | [
"Horizontal",
"force",
"for",
"a",
"given",
"fairlead",
"tension",
"T"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/ElasticChain.java#L50-L53 |
153,618 | jbundle/jbundle | base/model/src/main/java/org/jbundle/base/model/Resources.java | Resources.getKey | public String getKey(String strValue)
{
for (String key : m_resourceBundle.keySet())
{
String strKeyValue = m_resourceBundle.getString(key);
if (strValue.startsWith(strKeyValue))
return key;
}
return strValue; // Can't find it, t... | java | public String getKey(String strValue)
{
for (String key : m_resourceBundle.keySet())
{
String strKeyValue = m_resourceBundle.getString(key);
if (strValue.startsWith(strKeyValue))
return key;
}
return strValue; // Can't find it, t... | [
"public",
"String",
"getKey",
"(",
"String",
"strValue",
")",
"{",
"for",
"(",
"String",
"key",
":",
"m_resourceBundle",
".",
"keySet",
"(",
")",
")",
"{",
"String",
"strKeyValue",
"=",
"m_resourceBundle",
".",
"getString",
"(",
"key",
")",
";",
"if",
"(... | From the value, find the key.
Does a reverse-lookup for the key from this value.
This is useful for foreign-language buttons that do a command using their english name.
@param strValue The value to search for.
@returns The key associated with this value (or this value if not found). | [
"From",
"the",
"value",
"find",
"the",
"key",
".",
"Does",
"a",
"reverse",
"-",
"lookup",
"for",
"the",
"key",
"from",
"this",
"value",
".",
"This",
"is",
"useful",
"for",
"foreign",
"-",
"language",
"buttons",
"that",
"do",
"a",
"command",
"using",
"t... | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/model/src/main/java/org/jbundle/base/model/Resources.java#L110-L119 |
153,619 | jkyamog/DeDS | mobile-dds/src/main/java/nz/net/catalyst/mobile/dds/RequestInfo.java | RequestInfo.getRequestInfo | public static RequestInfo getRequestInfo(HttpServletRequest request) {
RequestInfo requestInfo = (RequestInfo) request.getAttribute(REQUEST_INFO);
if (requestInfo == null) {
requestInfo = new RequestInfo(request);
request.setAttribute(REQUEST_INFO, requestInfo);
}
return... | java | public static RequestInfo getRequestInfo(HttpServletRequest request) {
RequestInfo requestInfo = (RequestInfo) request.getAttribute(REQUEST_INFO);
if (requestInfo == null) {
requestInfo = new RequestInfo(request);
request.setAttribute(REQUEST_INFO, requestInfo);
}
return... | [
"public",
"static",
"RequestInfo",
"getRequestInfo",
"(",
"HttpServletRequest",
"request",
")",
"{",
"RequestInfo",
"requestInfo",
"=",
"(",
"RequestInfo",
")",
"request",
".",
"getAttribute",
"(",
"REQUEST_INFO",
")",
";",
"if",
"(",
"requestInfo",
"==",
"null",
... | this either creates a new RequestInfo or gets the cached instance from the
reqeust
@param request
@return | [
"this",
"either",
"creates",
"a",
"new",
"RequestInfo",
"or",
"gets",
"the",
"cached",
"instance",
"from",
"the",
"reqeust"
] | d8cf6a294a23daa8e8a92073827c73b1befe3fa1 | https://github.com/jkyamog/DeDS/blob/d8cf6a294a23daa8e8a92073827c73b1befe3fa1/mobile-dds/src/main/java/nz/net/catalyst/mobile/dds/RequestInfo.java#L83-L91 |
153,620 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/message/event/ModelMessageHandler.java | ModelMessageHandler.handleMessage | public int handleMessage(BaseMessage message)
{
Map<String,Object> properties = new HashMap<String,Object>();
String strMessageType = (String)message.get(MessageConstants.MESSAGE_TYPE_PARAM);
String strStartIndex = (String)message.get(START_INDEX_PARAM);
String strEndIndex = (String... | java | public int handleMessage(BaseMessage message)
{
Map<String,Object> properties = new HashMap<String,Object>();
String strMessageType = (String)message.get(MessageConstants.MESSAGE_TYPE_PARAM);
String strStartIndex = (String)message.get(START_INDEX_PARAM);
String strEndIndex = (String... | [
"public",
"int",
"handleMessage",
"(",
"BaseMessage",
"message",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"String",
"strMessageType",
"=",
"(",
"String",
")... | Handle this message.
Update the model depending of the message.
@param message The message to handle. | [
"Handle",
"this",
"message",
".",
"Update",
"the",
"model",
"depending",
"of",
"the",
"message",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/message/event/ModelMessageHandler.java#L92-L125 |
153,621 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java | ClassInfo.getLink | public String getLink()
{
String strType = this.getField(ClassInfo.CLASS_TYPE).getString();
String strLink = this.getField(ClassInfo.CLASS_NAME).getString();
if (this.getField(ClassInfo.CLASS_PACKAGE).getLength() > 0)
strLink = DBConstants.ROOT_PACKAGE + this.getField(ClassInfo.C... | java | public String getLink()
{
String strType = this.getField(ClassInfo.CLASS_TYPE).getString();
String strLink = this.getField(ClassInfo.CLASS_NAME).getString();
if (this.getField(ClassInfo.CLASS_PACKAGE).getLength() > 0)
strLink = DBConstants.ROOT_PACKAGE + this.getField(ClassInfo.C... | [
"public",
"String",
"getLink",
"(",
")",
"{",
"String",
"strType",
"=",
"this",
".",
"getField",
"(",
"ClassInfo",
".",
"CLASS_TYPE",
")",
".",
"getString",
"(",
")",
";",
"String",
"strLink",
"=",
"this",
".",
"getField",
"(",
"ClassInfo",
".",
"CLASS_N... | Get the link that will run this class. | [
"Get",
"the",
"link",
"that",
"will",
"run",
"this",
"class",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java#L215-L226 |
153,622 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java | ClassInfo.readClassInfo | public ClassInfoModel readClassInfo(PropertyOwner recordOwner, String className)
{
String strParamRecord = null;
String strParamScreenType = null;
String strParamMenu = null;
String strParamHelp = null;
if (className == null)
{
strParamRecord = re... | java | public ClassInfoModel readClassInfo(PropertyOwner recordOwner, String className)
{
String strParamRecord = null;
String strParamScreenType = null;
String strParamMenu = null;
String strParamHelp = null;
if (className == null)
{
strParamRecord = re... | [
"public",
"ClassInfoModel",
"readClassInfo",
"(",
"PropertyOwner",
"recordOwner",
",",
"String",
"className",
")",
"{",
"String",
"strParamRecord",
"=",
"null",
";",
"String",
"strParamScreenType",
"=",
"null",
";",
"String",
"strParamMenu",
"=",
"null",
";",
"Str... | Read the ClassInfoService record
@param recordOwner The record owner to use to create the this record AND to optionally get the classinfo.
@param className if non-null read this class name, if null, use the recordowner properties to figure out the class.
@param getRecord If true, read the record.
. | [
"Read",
"the",
"ClassInfoService",
"record"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java#L234-L288 |
153,623 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java | ClassInfo.getPackageName | public String getPackageName(ClassProject.CodeType codeType)
{
if (codeType == null)
codeType = ClassProject.CodeType.THICK;
String packageName = this.getField(ClassInfo.CLASS_PACKAGE).toString();
ClassProject classProject = (ClassProject)((ReferenceField)this.getField(ClassInfo.... | java | public String getPackageName(ClassProject.CodeType codeType)
{
if (codeType == null)
codeType = ClassProject.CodeType.THICK;
String packageName = this.getField(ClassInfo.CLASS_PACKAGE).toString();
ClassProject classProject = (ClassProject)((ReferenceField)this.getField(ClassInfo.... | [
"public",
"String",
"getPackageName",
"(",
"ClassProject",
".",
"CodeType",
"codeType",
")",
"{",
"if",
"(",
"codeType",
"==",
"null",
")",
"codeType",
"=",
"ClassProject",
".",
"CodeType",
".",
"THICK",
";",
"String",
"packageName",
"=",
"this",
".",
"getFi... | Get the full class name. | [
"Get",
"the",
"full",
"class",
"name",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java#L292-L302 |
153,624 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java | ClassInfo.getFullClassName | public String getFullClassName()
{
String className = this.getField(ClassInfo.CLASS_NAME).toString();
ClassProject classProject = (ClassProject)((ReferenceField)this.getField(ClassInfo.CLASS_PROJECT_ID)).getReference();
String packageName = classProject.getFullPackage(ClassProject.CodeType.T... | java | public String getFullClassName()
{
String className = this.getField(ClassInfo.CLASS_NAME).toString();
ClassProject classProject = (ClassProject)((ReferenceField)this.getField(ClassInfo.CLASS_PROJECT_ID)).getReference();
String packageName = classProject.getFullPackage(ClassProject.CodeType.T... | [
"public",
"String",
"getFullClassName",
"(",
")",
"{",
"String",
"className",
"=",
"this",
".",
"getField",
"(",
"ClassInfo",
".",
"CLASS_NAME",
")",
".",
"toString",
"(",
")",
";",
"ClassProject",
"classProject",
"=",
"(",
"ClassProject",
")",
"(",
"(",
"... | GetFullClassName Method. | [
"GetFullClassName",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java#L313-L322 |
153,625 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java | ClassInfo.printHtmlTechInfo | public void printHtmlTechInfo(PrintWriter out, String strTag, String strParams, String strData)
{
FieldData fieldInfo = new FieldData(this.findRecordOwner());
String strClass = this.getClassName();
fieldInfo.setKeyArea(FieldData.FIELD_FILE_NAME_KEY);
fieldInfo.addListener(ne... | java | public void printHtmlTechInfo(PrintWriter out, String strTag, String strParams, String strData)
{
FieldData fieldInfo = new FieldData(this.findRecordOwner());
String strClass = this.getClassName();
fieldInfo.setKeyArea(FieldData.FIELD_FILE_NAME_KEY);
fieldInfo.addListener(ne... | [
"public",
"void",
"printHtmlTechInfo",
"(",
"PrintWriter",
"out",
",",
"String",
"strTag",
",",
"String",
"strParams",
",",
"String",
"strData",
")",
"{",
"FieldData",
"fieldInfo",
"=",
"new",
"FieldData",
"(",
"this",
".",
"findRecordOwner",
"(",
")",
")",
... | PrintHtmlTechInfo Method. | [
"PrintHtmlTechInfo",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java#L375-L409 |
153,626 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java | ClassInfo.isARecord | public boolean isARecord(boolean isAFile)
{
Record recFileHdr = (Record)this.getRecordOwner().getRecord(FileHdr.FILE_HDR_FILE);
if (recFileHdr == null)
{
recFileHdr = new FileHdr(this.getRecordOwner());
this.addListener(new FreeOnFreeHandler(recFileHdr));
}
... | java | public boolean isARecord(boolean isAFile)
{
Record recFileHdr = (Record)this.getRecordOwner().getRecord(FileHdr.FILE_HDR_FILE);
if (recFileHdr == null)
{
recFileHdr = new FileHdr(this.getRecordOwner());
this.addListener(new FreeOnFreeHandler(recFileHdr));
}
... | [
"public",
"boolean",
"isARecord",
"(",
"boolean",
"isAFile",
")",
"{",
"Record",
"recFileHdr",
"=",
"(",
"Record",
")",
"this",
".",
"getRecordOwner",
"(",
")",
".",
"getRecord",
"(",
"FileHdr",
".",
"FILE_HDR_FILE",
")",
";",
"if",
"(",
"recFileHdr",
"=="... | IsARecord Method. | [
"IsARecord",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/ClassInfo.java#L466-L500 |
153,627 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/SaxHtmlHandler.java | SaxHtmlHandler.startDocument | public void startDocument(String namespaceURI, String localName, String qName, Attributes attr) throws SAXException
{
startTable = false;
col = 0;
row = 0;
} | java | public void startDocument(String namespaceURI, String localName, String qName, Attributes attr) throws SAXException
{
startTable = false;
col = 0;
row = 0;
} | [
"public",
"void",
"startDocument",
"(",
"String",
"namespaceURI",
",",
"String",
"localName",
",",
"String",
"qName",
",",
"Attributes",
"attr",
")",
"throws",
"SAXException",
"{",
"startTable",
"=",
"false",
";",
"col",
"=",
"0",
";",
"row",
"=",
"0",
";"... | StartDocument Method. | [
"StartDocument",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/SaxHtmlHandler.java#L63-L68 |
153,628 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/SaxHtmlHandler.java | SaxHtmlHandler.startElement | public void startElement(String namespaceURI, String localName, String qName, Attributes attr)
{
if (localName.equalsIgnoreCase(TABLE))
{
String strClass = attr.getValue("", "class");
if (strClass != null)
if (strClass.equalsIgnoreCase("table-in")) // NO NO N... | java | public void startElement(String namespaceURI, String localName, String qName, Attributes attr)
{
if (localName.equalsIgnoreCase(TABLE))
{
String strClass = attr.getValue("", "class");
if (strClass != null)
if (strClass.equalsIgnoreCase("table-in")) // NO NO N... | [
"public",
"void",
"startElement",
"(",
"String",
"namespaceURI",
",",
"String",
"localName",
",",
"String",
"qName",
",",
"Attributes",
"attr",
")",
"{",
"if",
"(",
"localName",
".",
"equalsIgnoreCase",
"(",
"TABLE",
")",
")",
"{",
"String",
"strClass",
"=",... | StartElement Method. | [
"StartElement",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/SaxHtmlHandler.java#L79-L103 |
153,629 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/SaxHtmlHandler.java | SaxHtmlHandler.endElement | public void endElement(String namespaceURI, String localName, String qName) throws SAXException
{
if (localName.equalsIgnoreCase(TABLE))
{
if (startTable)
if (m_record.getEditMode() == DBConstants.EDIT_ADD)
{
try {
... | java | public void endElement(String namespaceURI, String localName, String qName) throws SAXException
{
if (localName.equalsIgnoreCase(TABLE))
{
if (startTable)
if (m_record.getEditMode() == DBConstants.EDIT_ADD)
{
try {
... | [
"public",
"void",
"endElement",
"(",
"String",
"namespaceURI",
",",
"String",
"localName",
",",
"String",
"qName",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"localName",
".",
"equalsIgnoreCase",
"(",
"TABLE",
")",
")",
"{",
"if",
"(",
"startTable",
")",... | EndElement Method. | [
"EndElement",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/SaxHtmlHandler.java#L107-L122 |
153,630 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/SaxHtmlHandler.java | SaxHtmlHandler.characters | public void characters(char[] ch, int start, int length) throws SAXException
{
if (startTable)
{
try {
String string = new String(ch, start, length);
for (int i = string.length() - 1; i >= 0; i--)
{ // Trim trailing spaces
... | java | public void characters(char[] ch, int start, int length) throws SAXException
{
if (startTable)
{
try {
String string = new String(ch, start, length);
for (int i = string.length() - 1; i >= 0; i--)
{ // Trim trailing spaces
... | [
"public",
"void",
"characters",
"(",
"char",
"[",
"]",
"ch",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"startTable",
")",
"{",
"try",
"{",
"String",
"string",
"=",
"new",
"String",
"(",
"ch",
",",
"star... | Characters Method. | [
"Characters",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/SaxHtmlHandler.java#L126-L158 |
153,631 | tvesalainen/util | util/src/main/java/org/vesalainen/navi/AnchorageSimulator.java | AnchorageSimulator.simulate | public void simulate(LocationSource locationSource, long period, boolean isDaemon) throws IOException
{
this.locationSource = locationSource;
dis = new DataInputStream(new BufferedInputStream(url.openStream()));
if (timer == null)
{
timer = new Timer("AnchorageSimul... | java | public void simulate(LocationSource locationSource, long period, boolean isDaemon) throws IOException
{
this.locationSource = locationSource;
dis = new DataInputStream(new BufferedInputStream(url.openStream()));
if (timer == null)
{
timer = new Timer("AnchorageSimul... | [
"public",
"void",
"simulate",
"(",
"LocationSource",
"locationSource",
",",
"long",
"period",
",",
"boolean",
"isDaemon",
")",
"throws",
"IOException",
"{",
"this",
".",
"locationSource",
"=",
"locationSource",
";",
"dis",
"=",
"new",
"DataInputStream",
"(",
"ne... | Starts simulating anchorige.
@param locationSource
@param period Update rate in millis.
@param isDaemon Sets timer thread. In single thread this should be false.
This parament is used only if external Timer was not provided!
@throws IOException | [
"Starts",
"simulating",
"anchorige",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/AnchorageSimulator.java#L61-L70 |
153,632 | tvesalainen/util | util/src/main/java/org/vesalainen/util/Merger.java | Merger.iterator | public static <T> Iterator<T> iterator(Queue<T> queue)
{
return new XIteratorImpl<>(()->!queue.isEmpty(), queue::remove);
} | java | public static <T> Iterator<T> iterator(Queue<T> queue)
{
return new XIteratorImpl<>(()->!queue.isEmpty(), queue::remove);
} | [
"public",
"static",
"<",
"T",
">",
"Iterator",
"<",
"T",
">",
"iterator",
"(",
"Queue",
"<",
"T",
">",
"queue",
")",
"{",
"return",
"new",
"XIteratorImpl",
"<>",
"(",
"(",
")",
"->",
"!",
"queue",
".",
"isEmpty",
"(",
")",
",",
"queue",
"::",
"re... | Returns Queue as iterator. Calls isEmpty and remove methods
@param <T>
@param queue
@return | [
"Returns",
"Queue",
"as",
"iterator",
".",
"Calls",
"isEmpty",
"and",
"remove",
"methods"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/Merger.java#L118-L121 |
153,633 | tvesalainen/util | util/src/main/java/org/vesalainen/util/Merger.java | Merger.iterator | public static <T> Iterator<T> iterator(BlockingQueue<T> queue)
{
return iterator(queue, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
} | java | public static <T> Iterator<T> iterator(BlockingQueue<T> queue)
{
return iterator(queue, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
} | [
"public",
"static",
"<",
"T",
">",
"Iterator",
"<",
"T",
">",
"iterator",
"(",
"BlockingQueue",
"<",
"T",
">",
"queue",
")",
"{",
"return",
"iterator",
"(",
"queue",
",",
"Long",
".",
"MAX_VALUE",
",",
"TimeUnit",
".",
"MILLISECONDS",
")",
";",
"}"
] | Returns Queue as iterator. Calls poll method
@param <T>
@param queue
@return | [
"Returns",
"Queue",
"as",
"iterator",
".",
"Calls",
"poll",
"method"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/Merger.java#L128-L131 |
153,634 | tvesalainen/util | util/src/main/java/org/vesalainen/util/Merger.java | Merger.iterator | public static <T> Iterator<T> iterator(BlockingQueue<T> queue, long time, TimeUnit unit)
{
return new XIteratorImpl<>(()->true, ()->
{
try
{
T item = queue.poll(time, unit);
if (item == null)
{
throw... | java | public static <T> Iterator<T> iterator(BlockingQueue<T> queue, long time, TimeUnit unit)
{
return new XIteratorImpl<>(()->true, ()->
{
try
{
T item = queue.poll(time, unit);
if (item == null)
{
throw... | [
"public",
"static",
"<",
"T",
">",
"Iterator",
"<",
"T",
">",
"iterator",
"(",
"BlockingQueue",
"<",
"T",
">",
"queue",
",",
"long",
"time",
",",
"TimeUnit",
"unit",
")",
"{",
"return",
"new",
"XIteratorImpl",
"<>",
"(",
"(",
")",
"->",
"true",
",",
... | Returns Queue as iterator. Calls poll method. When timeout throws
NoSuchElementException which will remove it from merger.
@param <T>
@param queue
@param time
@param unit
@return | [
"Returns",
"Queue",
"as",
"iterator",
".",
"Calls",
"poll",
"method",
".",
"When",
"timeout",
"throws",
"NoSuchElementException",
"which",
"will",
"remove",
"it",
"from",
"merger",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/Merger.java#L141-L159 |
153,635 | microfocus-idol/java-configuration-impl | src/main/java/com/hp/autonomy/frontend/configuration/SimpleComponent.java | SimpleComponent.merge | @SuppressWarnings({"unchecked", "rawtypes"})
@Override
public C merge(final C other) {
return (C) ConfigurationUtils.defaultMerge((ConfigurationComponent) this, (ConfigurationComponent) other);
} | java | @SuppressWarnings({"unchecked", "rawtypes"})
@Override
public C merge(final C other) {
return (C) ConfigurationUtils.defaultMerge((ConfigurationComponent) this, (ConfigurationComponent) other);
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"@",
"Override",
"public",
"C",
"merge",
"(",
"final",
"C",
"other",
")",
"{",
"return",
"(",
"C",
")",
"ConfigurationUtils",
".",
"defaultMerge",
"(",
"(",
"ConfigurationComp... | Performs a default merge operation between current bean instance and defaults instance
@param other The configuration to merge with.
@return the merged configuration | [
"Performs",
"a",
"default",
"merge",
"operation",
"between",
"current",
"bean",
"instance",
"and",
"defaults",
"instance"
] | cd9d744cacfaaae3c76cacc211e65742bbc7b00a | https://github.com/microfocus-idol/java-configuration-impl/blob/cd9d744cacfaaae3c76cacc211e65742bbc7b00a/src/main/java/com/hp/autonomy/frontend/configuration/SimpleComponent.java#L18-L22 |
153,636 | microfocus-idol/java-configuration-impl | src/main/java/com/hp/autonomy/frontend/configuration/SimpleComponent.java | SimpleComponent.basicValidate | @SuppressWarnings("rawtypes")
@Override
public void basicValidate(final String section) throws ConfigException {
ConfigurationUtils.defaultValidate((ConfigurationComponent) this, section);
} | java | @SuppressWarnings("rawtypes")
@Override
public void basicValidate(final String section) throws ConfigException {
ConfigurationUtils.defaultValidate((ConfigurationComponent) this, section);
} | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"@",
"Override",
"public",
"void",
"basicValidate",
"(",
"final",
"String",
"section",
")",
"throws",
"ConfigException",
"{",
"ConfigurationUtils",
".",
"defaultValidate",
"(",
"(",
"ConfigurationComponent",
")",
"t... | Skeleton validation, triggering validate on any subComponents
@param section the configuration section; should often be hard-coded
@throws ConfigException validation failure | [
"Skeleton",
"validation",
"triggering",
"validate",
"on",
"any",
"subComponents"
] | cd9d744cacfaaae3c76cacc211e65742bbc7b00a | https://github.com/microfocus-idol/java-configuration-impl/blob/cd9d744cacfaaae3c76cacc211e65742bbc7b00a/src/main/java/com/hp/autonomy/frontend/configuration/SimpleComponent.java#L30-L34 |
153,637 | tvesalainen/util | util/src/main/java/org/vesalainen/util/stream/Streams.java | Streams.reducingStream | public static final IntStream reducingStream(IntStream stream, ReducingFunction func)
{
return StreamSupport.intStream(new ReducingSpliterator(stream, func), false);
} | java | public static final IntStream reducingStream(IntStream stream, ReducingFunction func)
{
return StreamSupport.intStream(new ReducingSpliterator(stream, func), false);
} | [
"public",
"static",
"final",
"IntStream",
"reducingStream",
"(",
"IntStream",
"stream",
",",
"ReducingFunction",
"func",
")",
"{",
"return",
"StreamSupport",
".",
"intStream",
"(",
"new",
"ReducingSpliterator",
"(",
"stream",
",",
"func",
")",
",",
"false",
")",... | Converts Stream to Stream where one or more int items are mapped to
one int item. Mapping is done by func method. Func must return
true after calling consumer method. Otherwise behavior is unpredictable.
@param stream
@param func
@return
@throws IllegalStateException if Stream ends when mapping is unfinished.
@depreca... | [
"Converts",
"Stream",
"to",
"Stream",
"where",
"one",
"or",
"more",
"int",
"items",
"are",
"mapped",
"to",
"one",
"int",
"item",
".",
"Mapping",
"is",
"done",
"by",
"func",
"method",
".",
"Func",
"must",
"return",
"true",
"after",
"calling",
"consumer",
... | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/stream/Streams.java#L52-L55 |
153,638 | js-lib-com/net-client | src/main/java/js/net/client/encoder/StreamValueReader.java | StreamValueReader.getInstance | public static Closeable getInstance(InputStream inputStream, Type type) throws IOException {
Params.notNull(inputStream, "Input stream");
// TODO: construct instance reflexively to allow for user defined input stream
// an user defined input stream should have a constructor with a single parameter of type In... | java | public static Closeable getInstance(InputStream inputStream, Type type) throws IOException {
Params.notNull(inputStream, "Input stream");
// TODO: construct instance reflexively to allow for user defined input stream
// an user defined input stream should have a constructor with a single parameter of type In... | [
"public",
"static",
"Closeable",
"getInstance",
"(",
"InputStream",
"inputStream",
",",
"Type",
"type",
")",
"throws",
"IOException",
"{",
"Params",
".",
"notNull",
"(",
"inputStream",
",",
"\"Input stream\"",
")",
";",
"// TODO: construct instance reflexively to allow ... | Create stream of requested type wrapping given input stream. Both returned bytes and character streams are closeable.
@param inputStream input stream to wrap,
@param type the type of stream, byte or character.
@return newly create stream.
@throws IOException if newly stream creation fails. | [
"Create",
"stream",
"of",
"requested",
"type",
"wrapping",
"given",
"input",
"stream",
".",
"Both",
"returned",
"bytes",
"and",
"character",
"streams",
"are",
"closeable",
"."
] | 0489f85d8baa1be1ff115aa79929e0cf05d4c72d | https://github.com/js-lib-com/net-client/blob/0489f85d8baa1be1ff115aa79929e0cf05d4c72d/src/main/java/js/net/client/encoder/StreamValueReader.java#L39-L70 |
153,639 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/StringField.java | StringField.getSQLType | public String getSQLType(boolean bIncludeLength, Map<String, Object> properties)
{
String strType = (String)properties.get(DBSQLTypes.STRING);
if (strType == null)
strType = "VARCHAR"; // The default SQL Type
if (this.getMaxLength() < 127)
{
String str... | java | public String getSQLType(boolean bIncludeLength, Map<String, Object> properties)
{
String strType = (String)properties.get(DBSQLTypes.STRING);
if (strType == null)
strType = "VARCHAR"; // The default SQL Type
if (this.getMaxLength() < 127)
{
String str... | [
"public",
"String",
"getSQLType",
"(",
"boolean",
"bIncludeLength",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"String",
"strType",
"=",
"(",
"String",
")",
"properties",
".",
"get",
"(",
"DBSQLTypes",
".",
"STRING",
")",
";",
... | Get the SQL type of this field.
Typically STRING, VARCHAR, or LONGSTRING if over 127 chars.
@param bIncludeLength Include the field length in this description.
@param properties Database properties to determine the SQL type. | [
"Get",
"the",
"SQL",
"type",
"of",
"this",
"field",
".",
"Typically",
"STRING",
"VARCHAR",
"or",
"LONGSTRING",
"if",
"over",
"127",
"chars",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/StringField.java#L101-L119 |
153,640 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/StringField.java | StringField.setString | public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value
{
int iMaxLength = this.getMaxLength();
if (strString != null) if (strString.length() > iMaxLength)
strString = strString.substring(0, iMaxLength);
... | java | public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value
{
int iMaxLength = this.getMaxLength();
if (strString != null) if (strString.length() > iMaxLength)
strString = strString.substring(0, iMaxLength);
... | [
"public",
"int",
"setString",
"(",
"String",
"strString",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"// init this field override for other value",
"{",
"int",
"iMaxLength",
"=",
"this",
".",
"getMaxLength",
"(",
")",
";",
"if",
"(",
"strStrin... | Convert and move string to this field.
Data is already in string format, so just move it!
@param bState the state to set the data to.
@param bDisplayOption Display the data on the screen if true.
@param iMoveMode INIT, SCREEN, or READ move mode.
@return The error code. | [
"Convert",
"and",
"move",
"string",
"to",
"this",
"field",
".",
"Data",
"is",
"already",
"in",
"string",
"format",
"so",
"just",
"move",
"it!"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/StringField.java#L153-L161 |
153,641 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/util/StreamOut.java | StreamOut.writeit | public void writeit(String strTemp)
{
String strTabs = "";
int i = 0;
for (i = 0; i < m_iTabs; i++)
{
strTabs += "\t";
}
if (m_bTabOnNextLine) if ((strTemp.length() > 0) && (strTemp.charAt(0) != '\n'))
strTemp = strTabs + strTemp;
m_bTa... | java | public void writeit(String strTemp)
{
String strTabs = "";
int i = 0;
for (i = 0; i < m_iTabs; i++)
{
strTabs += "\t";
}
if (m_bTabOnNextLine) if ((strTemp.length() > 0) && (strTemp.charAt(0) != '\n'))
strTemp = strTabs + strTemp;
m_bTa... | [
"public",
"void",
"writeit",
"(",
"String",
"strTemp",
")",
"{",
"String",
"strTabs",
"=",
"\"\"",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"m_iTabs",
";",
"i",
"++",
")",
"{",
"strTabs",
"+=",
"\"\\t\"",
";",
"... | Writeit Method. | [
"Writeit",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/util/StreamOut.java#L67-L105 |
153,642 | wigforss/Ka-Commons-Reflection | src/main/java/org/kasource/commons/reflection/ClassIntrospectorImpl.java | ClassIntrospectorImpl.getDeclaredInterfaces | @Override
public Set<Class<?>> getDeclaredInterfaces(ClassFilter filter) {
return ClassUtils.getDeclaredInterfaces(target, filter);
} | java | @Override
public Set<Class<?>> getDeclaredInterfaces(ClassFilter filter) {
return ClassUtils.getDeclaredInterfaces(target, filter);
} | [
"@",
"Override",
"public",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"getDeclaredInterfaces",
"(",
"ClassFilter",
"filter",
")",
"{",
"return",
"ClassUtils",
".",
"getDeclaredInterfaces",
"(",
"target",
",",
"filter",
")",
";",
"}"
] | Returns a set of interfaces that that passes the supplied filter.
@param filter The class filter to use.
@return all Interface classes from clazz that passes the filter. | [
"Returns",
"a",
"set",
"of",
"interfaces",
"that",
"that",
"passes",
"the",
"supplied",
"filter",
"."
] | a80f7a164cd800089e4f4dd948ca6f0e7badcf33 | https://github.com/wigforss/Ka-Commons-Reflection/blob/a80f7a164cd800089e4f4dd948ca6f0e7badcf33/src/main/java/org/kasource/commons/reflection/ClassIntrospectorImpl.java#L232-L235 |
153,643 | wigforss/Ka-Commons-Reflection | src/main/java/org/kasource/commons/reflection/ClassIntrospectorImpl.java | ClassIntrospectorImpl.getDeclaredFields | @Override
public Set<Field> getDeclaredFields(FieldFilter filter) {
return FieldUtils.getDeclaredFields(target, filter);
} | java | @Override
public Set<Field> getDeclaredFields(FieldFilter filter) {
return FieldUtils.getDeclaredFields(target, filter);
} | [
"@",
"Override",
"public",
"Set",
"<",
"Field",
">",
"getDeclaredFields",
"(",
"FieldFilter",
"filter",
")",
"{",
"return",
"FieldUtils",
".",
"getDeclaredFields",
"(",
"target",
",",
"filter",
")",
";",
"}"
] | Returns a set of all fields matching the supplied filter
declared in the target class.
@param filter Filter to use.
@return All matching fields declared by the target class. | [
"Returns",
"a",
"set",
"of",
"all",
"fields",
"matching",
"the",
"supplied",
"filter",
"declared",
"in",
"the",
"target",
"class",
"."
] | a80f7a164cd800089e4f4dd948ca6f0e7badcf33 | https://github.com/wigforss/Ka-Commons-Reflection/blob/a80f7a164cd800089e4f4dd948ca6f0e7badcf33/src/main/java/org/kasource/commons/reflection/ClassIntrospectorImpl.java#L248-L251 |
153,644 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java | AbstractNotification.setParam | public int setParam(String param, Object value) {
int i = findParam(param);
if (value == null && i < 0) {
return i;
}
if (i < 0) {
i = extraInfo.length;
extraInfo = Arrays.copyOf(extraInfo, i + 1);
}
if (value... | java | public int setParam(String param, Object value) {
int i = findParam(param);
if (value == null && i < 0) {
return i;
}
if (i < 0) {
i = extraInfo.length;
extraInfo = Arrays.copyOf(extraInfo, i + 1);
}
if (value... | [
"public",
"int",
"setParam",
"(",
"String",
"param",
",",
"Object",
"value",
")",
"{",
"int",
"i",
"=",
"findParam",
"(",
"param",
")",
";",
"if",
"(",
"value",
"==",
"null",
"&&",
"i",
"<",
"0",
")",
"{",
"return",
"i",
";",
"}",
"if",
"(",
"i... | Sets the value for a parameter in extra info.
@param param Parameter name.
@param value Parameter value (null to remove).
@return Index of parameter in extra info. | [
"Sets",
"the",
"value",
"for",
"a",
"parameter",
"in",
"extra",
"info",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java#L274-L293 |
153,645 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java | AbstractNotification.getDisplayText | public String getDisplayText() {
StringBuilder sb = new StringBuilder();
appendText(sb, getPatientName(), "patient");
appendText(sb, getSubject(), "subject");
appendText(sb, getSenderName(), "sender");
appendText(sb, DateUtil.formatDate(getDeliveryDate()), "delivered");
a... | java | public String getDisplayText() {
StringBuilder sb = new StringBuilder();
appendText(sb, getPatientName(), "patient");
appendText(sb, getSubject(), "subject");
appendText(sb, getSenderName(), "sender");
appendText(sb, DateUtil.formatDate(getDeliveryDate()), "delivered");
a... | [
"public",
"String",
"getDisplayText",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"appendText",
"(",
"sb",
",",
"getPatientName",
"(",
")",
",",
"\"patient\"",
")",
";",
"appendText",
"(",
"sb",
",",
"getSubject",
"(",... | Returns the display text for this notification.
@return Display text. | [
"Returns",
"the",
"display",
"text",
"for",
"this",
"notification",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java#L300-L318 |
153,646 | carewebframework/carewebframework-vista | org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java | AbstractNotification.appendText | private void appendText(StringBuilder sb, String text, String format) {
if (text != null && !text.isEmpty()) {
format = "@vistanotification.detail." + format + ".label";
sb.append(StrUtil.formatMessage(format, text)).append("\n");
}
} | java | private void appendText(StringBuilder sb, String text, String format) {
if (text != null && !text.isEmpty()) {
format = "@vistanotification.detail." + format + ".label";
sb.append(StrUtil.formatMessage(format, text)).append("\n");
}
} | [
"private",
"void",
"appendText",
"(",
"StringBuilder",
"sb",
",",
"String",
"text",
",",
"String",
"format",
")",
"{",
"if",
"(",
"text",
"!=",
"null",
"&&",
"!",
"text",
".",
"isEmpty",
"(",
")",
")",
"{",
"format",
"=",
"\"@vistanotification.detail.\"",
... | Appends a text element if it is not null or empty.
@param sb String builder.
@param text Text value to append.
@param format Format specifier. | [
"Appends",
"a",
"text",
"element",
"if",
"it",
"is",
"not",
"null",
"or",
"empty",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java#L327-L332 |
153,647 | OwlPlatform/java-owl-solver | src/main/java/com/owlplatform/solver/protocol/messages/SubscriptionMessage.java | SubscriptionMessage.getLengthPrefix | public int getLengthPrefix() {
// Message ID
int length = 1;
// Number of rules
length += 4;
if (this.rules != null) {
for (SubscriptionRequestRule rule : this.rules) {
// Physical Layer
++length;
// Transmitters
length += 4 + rule.getNumTransmitters()
... | java | public int getLengthPrefix() {
// Message ID
int length = 1;
// Number of rules
length += 4;
if (this.rules != null) {
for (SubscriptionRequestRule rule : this.rules) {
// Physical Layer
++length;
// Transmitters
length += 4 + rule.getNumTransmitters()
... | [
"public",
"int",
"getLengthPrefix",
"(",
")",
"{",
"// Message ID",
"int",
"length",
"=",
"1",
";",
"// Number of rules",
"length",
"+=",
"4",
";",
"if",
"(",
"this",
".",
"rules",
"!=",
"null",
")",
"{",
"for",
"(",
"SubscriptionRequestRule",
"rule",
":",... | Returns the length prefix value for this message, as encoded according to
the Solver-Aggregator protocol.
@return the length prefix for this message. | [
"Returns",
"the",
"length",
"prefix",
"value",
"for",
"this",
"message",
"as",
"encoded",
"according",
"to",
"the",
"Solver",
"-",
"Aggregator",
"protocol",
"."
] | 53a1faabd63613c716203922cd52f871e5fedb9b | https://github.com/OwlPlatform/java-owl-solver/blob/53a1faabd63613c716203922cd52f871e5fedb9b/src/main/java/com/owlplatform/solver/protocol/messages/SubscriptionMessage.java#L54-L73 |
153,648 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/ReComputeFieldHandler.java | ReComputeFieldHandler.fieldChanged | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
double srcValue = ((NumberField)this.getOwner()).getValue();
BaseField fldTarget = this.getFieldTarget();
if (this.getOwner().isNull()) // If null, set the target to null
return fldTarget.moveFieldToThis(this.getO... | java | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
double srcValue = ((NumberField)this.getOwner()).getValue();
BaseField fldTarget = this.getFieldTarget();
if (this.getOwner().isNull()) // If null, set the target to null
return fldTarget.moveFieldToThis(this.getO... | [
"public",
"int",
"fieldChanged",
"(",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"double",
"srcValue",
"=",
"(",
"(",
"NumberField",
")",
"this",
".",
"getOwner",
"(",
")",
")",
".",
"getValue",
"(",
")",
";",
"BaseField",
"fldTarget",... | The Field has Changed.
Get the value of this listener's owner, pass it to the computeValue method and
set the returned value to the target field.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_RETURN if okay).
Field c... | [
"The",
"Field",
"has",
"Changed",
".",
"Get",
"the",
"value",
"of",
"this",
"listener",
"s",
"owner",
"pass",
"it",
"to",
"the",
"computeValue",
"method",
"and",
"set",
"the",
"returned",
"value",
"to",
"the",
"target",
"field",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ReComputeFieldHandler.java#L129-L142 |
153,649 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/ReComputeFieldHandler.java | ReComputeFieldHandler.getFieldTarget | public BaseField getFieldTarget()
{
BaseField fldTarget = m_fldTarget;
if (fldTarget == null)
if (targetFieldName != null)
fldTarget = (NumberField)(this.getOwner().getRecord().getField(targetFieldName));
if (fldTarget == null)
fldTarget = this.getOwne... | java | public BaseField getFieldTarget()
{
BaseField fldTarget = m_fldTarget;
if (fldTarget == null)
if (targetFieldName != null)
fldTarget = (NumberField)(this.getOwner().getRecord().getField(targetFieldName));
if (fldTarget == null)
fldTarget = this.getOwne... | [
"public",
"BaseField",
"getFieldTarget",
"(",
")",
"{",
"BaseField",
"fldTarget",
"=",
"m_fldTarget",
";",
"if",
"(",
"fldTarget",
"==",
"null",
")",
"if",
"(",
"targetFieldName",
"!=",
"null",
")",
"fldTarget",
"=",
"(",
"NumberField",
")",
"(",
"this",
"... | Get the field target. | [
"Get",
"the",
"field",
"target",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ReComputeFieldHandler.java#L146-L155 |
153,650 | eliwan/ew-profiling | profiling-core/src/main/java/be/eliwan/profiling/service/ProfilingContainer.java | ProfilingContainer.start | @PostConstruct
public void start() {
threadFactory = Executors.defaultThreadFactory();
disruptor = new Disruptor<>(Registration.FACTORY,
ringSize,
threadFactory,
ProducerType.MULTI,
new BlockingWaitStrategy());
disruptor.handleE... | java | @PostConstruct
public void start() {
threadFactory = Executors.defaultThreadFactory();
disruptor = new Disruptor<>(Registration.FACTORY,
ringSize,
threadFactory,
ProducerType.MULTI,
new BlockingWaitStrategy());
disruptor.handleE... | [
"@",
"PostConstruct",
"public",
"void",
"start",
"(",
")",
"{",
"threadFactory",
"=",
"Executors",
".",
"defaultThreadFactory",
"(",
")",
";",
"disruptor",
"=",
"new",
"Disruptor",
"<>",
"(",
"Registration",
".",
"FACTORY",
",",
"ringSize",
",",
"threadFactory... | Set up the disruptor service to have a single consumer which aggregates the data. | [
"Set",
"up",
"the",
"disruptor",
"service",
"to",
"have",
"a",
"single",
"consumer",
"which",
"aggregates",
"the",
"data",
"."
] | 3315a0038de967fceb2f4be3c29393857d7b15a2 | https://github.com/eliwan/ew-profiling/blob/3315a0038de967fceb2f4be3c29393857d7b15a2/profiling-core/src/main/java/be/eliwan/profiling/service/ProfilingContainer.java#L61-L71 |
153,651 | jbundle/jbundle | thin/base/screen/cal/sample/basic/src/main/java/org/jbundle/thin/base/screen/cal/sample/basic/CalendarProduct.java | CalendarProduct.getMealDesc | public String getMealDesc(Date date)
{
if (!date.before(m_startTime)) if (!date.after(m_endTime))
return m_strMeals;
return null;
} | java | public String getMealDesc(Date date)
{
if (!date.before(m_startTime)) if (!date.after(m_endTime))
return m_strMeals;
return null;
} | [
"public",
"String",
"getMealDesc",
"(",
"Date",
"date",
")",
"{",
"if",
"(",
"!",
"date",
".",
"before",
"(",
"m_startTime",
")",
")",
"if",
"(",
"!",
"date",
".",
"after",
"(",
"m_endTime",
")",
")",
"return",
"m_strMeals",
";",
"return",
"null",
";... | Get the meal description on this date. | [
"Get",
"the",
"meal",
"description",
"on",
"this",
"date",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/cal/sample/basic/src/main/java/org/jbundle/thin/base/screen/cal/sample/basic/CalendarProduct.java#L100-L105 |
153,652 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBusiness.java | JDefaultBusiness.creditCardExpiryDate | public static Date creditCardExpiryDate() {
DateTime dateTime = new DateTime();
DateTime addedMonths = dateTime.plusMonths(JDefaultNumber.randomIntBetweenTwoNumbers(24, 48));
return addedMonths.dayOfMonth().withMaximumValue().toDate();
} | java | public static Date creditCardExpiryDate() {
DateTime dateTime = new DateTime();
DateTime addedMonths = dateTime.plusMonths(JDefaultNumber.randomIntBetweenTwoNumbers(24, 48));
return addedMonths.dayOfMonth().withMaximumValue().toDate();
} | [
"public",
"static",
"Date",
"creditCardExpiryDate",
"(",
")",
"{",
"DateTime",
"dateTime",
"=",
"new",
"DateTime",
"(",
")",
";",
"DateTime",
"addedMonths",
"=",
"dateTime",
".",
"plusMonths",
"(",
"JDefaultNumber",
".",
"randomIntBetweenTwoNumbers",
"(",
"24",
... | Typically Cards are good for 3 years. Will create a random date between 24 and 48 months
@return date | [
"Typically",
"Cards",
"are",
"good",
"for",
"3",
"years",
".",
"Will",
"create",
"a",
"random",
"date",
"between",
"24",
"and",
"48",
"months"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBusiness.java#L38-L42 |
153,653 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBusiness.java | JDefaultBusiness.creditCardNumber | public static String creditCardNumber(JDefaultCreditCardType type) {
String ccNumber = null;
switch (type) {
case VISA: {
StringBuffer tempCC = new StringBuffer("4");
tempCC.append(JDefaultNumber.randomNumberString(14));
ccNumber = tempCC.appen... | java | public static String creditCardNumber(JDefaultCreditCardType type) {
String ccNumber = null;
switch (type) {
case VISA: {
StringBuffer tempCC = new StringBuffer("4");
tempCC.append(JDefaultNumber.randomNumberString(14));
ccNumber = tempCC.appen... | [
"public",
"static",
"String",
"creditCardNumber",
"(",
"JDefaultCreditCardType",
"type",
")",
"{",
"String",
"ccNumber",
"=",
"null",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"VISA",
":",
"{",
"StringBuffer",
"tempCC",
"=",
"new",
"StringBuffer",
"(",
"... | Create a Credit Card number for different types of cards. The number that is generated can pass through a
Luhn verification process, since the proper check digit is calculated.
@param type of credit card number to create
@return credit card number string | [
"Create",
"a",
"Credit",
"Card",
"number",
"for",
"different",
"types",
"of",
"cards",
".",
"The",
"number",
"that",
"is",
"generated",
"can",
"pass",
"through",
"a",
"Luhn",
"verification",
"process",
"since",
"the",
"proper",
"check",
"digit",
"is",
"calcu... | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBusiness.java#L51-L82 |
153,654 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultBusiness.java | JDefaultBusiness.money | public static Double money(int maxDollars) {
int dollars = RandomUtils.nextInt(maxDollars + 1);
int cents = RandomUtils.nextInt(100);
Double d = new Double(dollars + "." + cents);
return d;
} | java | public static Double money(int maxDollars) {
int dollars = RandomUtils.nextInt(maxDollars + 1);
int cents = RandomUtils.nextInt(100);
Double d = new Double(dollars + "." + cents);
return d;
} | [
"public",
"static",
"Double",
"money",
"(",
"int",
"maxDollars",
")",
"{",
"int",
"dollars",
"=",
"RandomUtils",
".",
"nextInt",
"(",
"maxDollars",
"+",
"1",
")",
";",
"int",
"cents",
"=",
"RandomUtils",
".",
"nextInt",
"(",
"100",
")",
";",
"Double",
... | Random dollar amount starting at zero
@param maxDollars to return
@return double value of random money | [
"Random",
"dollar",
"amount",
"starting",
"at",
"zero"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultBusiness.java#L121-L126 |
153,655 | ArpNetworking/metrics-incubator-extra | src/main/java/com/arpnetworking/metrics/incubator/impl/ReadWriteLockedReference.java | ReadWriteLockedReference.getAndSetReference | public T getAndSetReference(final T newValue) {
_lock.writeLock().lock();
final T oldReference = _reference.getAndSet(newValue);
_lock.writeLock().unlock();
return oldReference;
} | java | public T getAndSetReference(final T newValue) {
_lock.writeLock().lock();
final T oldReference = _reference.getAndSet(newValue);
_lock.writeLock().unlock();
return oldReference;
} | [
"public",
"T",
"getAndSetReference",
"(",
"final",
"T",
"newValue",
")",
"{",
"_lock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"final",
"T",
"oldReference",
"=",
"_reference",
".",
"getAndSet",
"(",
"newValue",
")",
";",
"_lock",
".",
"... | Replaces the held reference safely.
@param newValue the new reference
@return the old reference | [
"Replaces",
"the",
"held",
"reference",
"safely",
"."
] | 6a0fe67b8eb714e0c4097d24383e6e7936bc1e2f | https://github.com/ArpNetworking/metrics-incubator-extra/blob/6a0fe67b8eb714e0c4097d24383e6e7936bc1e2f/src/main/java/com/arpnetworking/metrics/incubator/impl/ReadWriteLockedReference.java#L68-L73 |
153,656 | inkstand-io/scribble | scribble-core/src/main/java/io/inkstand/scribble/rules/ExternalResource.java | ExternalResource.apply | @Override
public Statement apply(final Statement base, final Description description) {
if (description.isSuite()) {
return super.apply(classStatement(base), description);
}
return super.apply(statement(base), description);
} | java | @Override
public Statement apply(final Statement base, final Description description) {
if (description.isSuite()) {
return super.apply(classStatement(base), description);
}
return super.apply(statement(base), description);
} | [
"@",
"Override",
"public",
"Statement",
"apply",
"(",
"final",
"Statement",
"base",
",",
"final",
"Description",
"description",
")",
"{",
"if",
"(",
"description",
".",
"isSuite",
"(",
")",
")",
"{",
"return",
"super",
".",
"apply",
"(",
"classStatement",
... | Verifies if the caller is a Suite and triggers the beforeClass and afterClass behavior. | [
"Verifies",
"if",
"the",
"caller",
"is",
"a",
"Suite",
"and",
"triggers",
"the",
"beforeClass",
"and",
"afterClass",
"behavior",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-core/src/main/java/io/inkstand/scribble/rules/ExternalResource.java#L42-L48 |
153,657 | AlexLandau/gdl-validation | src/main/java/net/alloyggp/griddle/validator/ValidatorConfiguration.java | ValidatorConfiguration.createExperimental | public static ValidatorConfiguration createExperimental() {
Map<Check, Level> checks = getStandardChecks();
checks.put(GdlArityCheck.INSTANCE, Level.ERROR);
checks.put(GdlNotInRuleHeadCheck.INSTANCE, Level.ERROR);
checks.put(UnrecognizedGdlArgumentCheck.INSTANCE, Level.WARNING);
... | java | public static ValidatorConfiguration createExperimental() {
Map<Check, Level> checks = getStandardChecks();
checks.put(GdlArityCheck.INSTANCE, Level.ERROR);
checks.put(GdlNotInRuleHeadCheck.INSTANCE, Level.ERROR);
checks.put(UnrecognizedGdlArgumentCheck.INSTANCE, Level.WARNING);
... | [
"public",
"static",
"ValidatorConfiguration",
"createExperimental",
"(",
")",
"{",
"Map",
"<",
"Check",
",",
"Level",
">",
"checks",
"=",
"getStandardChecks",
"(",
")",
";",
"checks",
".",
"put",
"(",
"GdlArityCheck",
".",
"INSTANCE",
",",
"Level",
".",
"ERR... | This validator includes support for the experimental GDL keyword and associated
GDL variants. | [
"This",
"validator",
"includes",
"support",
"for",
"the",
"experimental",
"GDL",
"keyword",
"and",
"associated",
"GDL",
"variants",
"."
] | ec87cc9fdd8af32d79aa7d130b7cb062f29834fb | https://github.com/AlexLandau/gdl-validation/blob/ec87cc9fdd8af32d79aa7d130b7cb062f29834fb/src/main/java/net/alloyggp/griddle/validator/ValidatorConfiguration.java#L56-L67 |
153,658 | CrazyOrr/RollingLogger | src/main/java/com/github/crazyorr/rollinglogger/RollingLogger.java | RollingLogger.getLogFileIndex | private int getLogFileIndex(String fileName) {
int fileIndex = 0;
try {
fileIndex = Integer.parseInt(fileName.substring(fileName
.lastIndexOf(COUNT_SEPARATOR) + 1));
} catch (NumberFormatException e) {
e.printStackTrace();
}
return fileIndex;
} | java | private int getLogFileIndex(String fileName) {
int fileIndex = 0;
try {
fileIndex = Integer.parseInt(fileName.substring(fileName
.lastIndexOf(COUNT_SEPARATOR) + 1));
} catch (NumberFormatException e) {
e.printStackTrace();
}
return fileIndex;
} | [
"private",
"int",
"getLogFileIndex",
"(",
"String",
"fileName",
")",
"{",
"int",
"fileIndex",
"=",
"0",
";",
"try",
"{",
"fileIndex",
"=",
"Integer",
".",
"parseInt",
"(",
"fileName",
".",
"substring",
"(",
"fileName",
".",
"lastIndexOf",
"(",
"COUNT_SEPARAT... | Get the log file index from the composed log file name.
@param fileName
Log file name with index appended
@return Log file index | [
"Get",
"the",
"log",
"file",
"index",
"from",
"the",
"composed",
"log",
"file",
"name",
"."
] | 5203ba7424a932e58f374ca5cbfa31175715ed82 | https://github.com/CrazyOrr/RollingLogger/blob/5203ba7424a932e58f374ca5cbfa31175715ed82/src/main/java/com/github/crazyorr/rollinglogger/RollingLogger.java#L197-L206 |
153,659 | mijecu25/dsa | src/main/java/com/mijecu25/dsa/algorithms/sort/linearlogarithmic/Merge.java | Merge.sort | private static <E extends Comparable<E>> void sort(List<E> list, int start, int end, boolean descending) {
if(start == end) {
return ;
}
int middle = (start + end) >> 1;
Merge.sort(list, start, middle, descending);
Merge.sort(list, middle + 1, end, d... | java | private static <E extends Comparable<E>> void sort(List<E> list, int start, int end, boolean descending) {
if(start == end) {
return ;
}
int middle = (start + end) >> 1;
Merge.sort(list, start, middle, descending);
Merge.sort(list, middle + 1, end, d... | [
"private",
"static",
"<",
"E",
"extends",
"Comparable",
"<",
"E",
">",
">",
"void",
"sort",
"(",
"List",
"<",
"E",
">",
"list",
",",
"int",
"start",
",",
"int",
"end",
",",
"boolean",
"descending",
")",
"{",
"if",
"(",
"start",
"==",
"end",
")",
... | Sort routine that recursively calls itself after splitting the original list
in half. This routine is used for both ascending and descending sort since
the work done is similar. The only difference is when calling the merge
routine.
@param <E> the type of elements in this list.
@param list list that we want to sort
@... | [
"Sort",
"routine",
"that",
"recursively",
"calls",
"itself",
"after",
"splitting",
"the",
"original",
"list",
"in",
"half",
".",
"This",
"routine",
"is",
"used",
"for",
"both",
"ascending",
"and",
"descending",
"sort",
"since",
"the",
"work",
"done",
"is",
"... | a22971b746833e78a3939ae4de65e8f6bf2e3fd4 | https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/sort/linearlogarithmic/Merge.java#L1099-L1115 |
153,660 | nwillc/almost-functional | src/main/java/almost/functional/ImmutableIterator.java | ImmutableIterator.makeImmutable | public static <E> ImmutableIterator<E> makeImmutable(final Iterator<E> iterator) {
return new ImmutableIterator<E>() {
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public E next() {
return... | java | public static <E> ImmutableIterator<E> makeImmutable(final Iterator<E> iterator) {
return new ImmutableIterator<E>() {
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public E next() {
return... | [
"public",
"static",
"<",
"E",
">",
"ImmutableIterator",
"<",
"E",
">",
"makeImmutable",
"(",
"final",
"Iterator",
"<",
"E",
">",
"iterator",
")",
"{",
"return",
"new",
"ImmutableIterator",
"<",
"E",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"boolean... | Make an iterator immutable.
@param iterator the iterator
@param <E> the type the iterator returns
@return an immutable iterator | [
"Make",
"an",
"iterator",
"immutable",
"."
] | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/ImmutableIterator.java#L37-L49 |
153,661 | js-lib-com/commons | src/main/java/js/io/FilesOutputStream.java | FilesOutputStream.addFile | public void addFile(File file) throws IOException {
if (!file.exists()) {
throw new IllegalArgumentException(String.format("File |%s| does not exist.", file));
}
if (file.isDirectory()) {
throw new IllegalArgumentException(String.format("File |%s| is a directory.", file));
}
addFileEntry(file.get... | java | public void addFile(File file) throws IOException {
if (!file.exists()) {
throw new IllegalArgumentException(String.format("File |%s| does not exist.", file));
}
if (file.isDirectory()) {
throw new IllegalArgumentException(String.format("File |%s| is a directory.", file));
}
addFileEntry(file.get... | [
"public",
"void",
"addFile",
"(",
"File",
"file",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"String",
".",
"format",
"(",
"\"File |%s| does not exist.\"",
",... | Inject file content into archive using file relative path as archive entry name. File to add is relative to a common base
directory. All files from this archive should be part of that base directory hierarchy; it is user code responsibility to
enforce this constrain.
@param file file to add to this archive.
@throws Il... | [
"Inject",
"file",
"content",
"into",
"archive",
"using",
"file",
"relative",
"path",
"as",
"archive",
"entry",
"name",
".",
"File",
"to",
"add",
"is",
"relative",
"to",
"a",
"common",
"base",
"directory",
".",
"All",
"files",
"from",
"this",
"archive",
"sh... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/io/FilesOutputStream.java#L144-L152 |
153,662 | js-lib-com/commons | src/main/java/js/io/FilesOutputStream.java | FilesOutputStream.addFileEntry | private void addFileEntry(String entryName, InputStream inputStream) throws IOException {
// write lazily the manifest before adding the first file
if (manifest != null) {
addManifestEntry();
}
ZipEntry entry = new ZipEntry(entryName);
filesArchive.putNextEntry(entry);
inputStream = new Buffer... | java | private void addFileEntry(String entryName, InputStream inputStream) throws IOException {
// write lazily the manifest before adding the first file
if (manifest != null) {
addManifestEntry();
}
ZipEntry entry = new ZipEntry(entryName);
filesArchive.putNextEntry(entry);
inputStream = new Buffer... | [
"private",
"void",
"addFileEntry",
"(",
"String",
"entryName",
",",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"// write lazily the manifest before adding the first file\r",
"if",
"(",
"manifest",
"!=",
"null",
")",
"{",
"addManifestEntry",
"(",
")... | Add file entry to this files archive. This method takes care to lazily write manifest just before first file entry.
@param entryName entry name,
@param inputStream file content.
@throws IOException if file entry write fails. | [
"Add",
"file",
"entry",
"to",
"this",
"files",
"archive",
".",
"This",
"method",
"takes",
"care",
"to",
"lazily",
"write",
"manifest",
"just",
"before",
"first",
"file",
"entry",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/io/FilesOutputStream.java#L191-L214 |
153,663 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseFrame.java | JBaseFrame.free | public void free()
{
if (this.getContentPane().getComponentCount() > 0)
if (this.getContentPane().getComponent(0) instanceof BaseApplet)
((BaseApplet)this.getContentPane().getComponent(0)).free();
this.dispose();
} | java | public void free()
{
if (this.getContentPane().getComponentCount() > 0)
if (this.getContentPane().getComponent(0) instanceof BaseApplet)
((BaseApplet)this.getContentPane().getComponent(0)).free();
this.dispose();
} | [
"public",
"void",
"free",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getContentPane",
"(",
")",
".",
"getComponentCount",
"(",
")",
">",
"0",
")",
"if",
"(",
"this",
".",
"getContentPane",
"(",
")",
".",
"getComponent",
"(",
"0",
")",
"instanceof",
"Bas... | Close this frame and free the baseApplet. | [
"Close",
"this",
"frame",
"and",
"free",
"the",
"baseApplet",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseFrame.java#L71-L77 |
153,664 | krotscheck/data-file-reader | data-file-reader-bson/src/main/java/net/krotscheck/dfr/bson/BSONDataEncoder.java | BSONDataEncoder.dispose | @Override
protected void dispose() {
try {
if (generator != null) {
generator.writeEndArray();
generator.close();
}
this.getOutputStream().close();
} catch (IOException ioe) {
logger.error("Unable to close stream", ioe);... | java | @Override
protected void dispose() {
try {
if (generator != null) {
generator.writeEndArray();
generator.close();
}
this.getOutputStream().close();
} catch (IOException ioe) {
logger.error("Unable to close stream", ioe);... | [
"@",
"Override",
"protected",
"void",
"dispose",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"generator",
"!=",
"null",
")",
"{",
"generator",
".",
"writeEndArray",
"(",
")",
";",
"generator",
".",
"close",
"(",
")",
";",
"}",
"this",
".",
"getOutputStream",... | Closes the output stream. | [
"Closes",
"the",
"output",
"stream",
"."
] | b9a85bd07dc9f9b8291ffbfb6945443d96371811 | https://github.com/krotscheck/data-file-reader/blob/b9a85bd07dc9f9b8291ffbfb6945443d96371811/data-file-reader-bson/src/main/java/net/krotscheck/dfr/bson/BSONDataEncoder.java#L72-L87 |
153,665 | jbundle/jbundle | app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/HtmlSource.java | HtmlSource.parseNextLine | public boolean parseNextLine()
{
if (firstTime)
{
firstTime = false;
// Obtain an instance of an XMLReader implementation from a system property
try {
XMLReader parser = org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
... | java | public boolean parseNextLine()
{
if (firstTime)
{
firstTime = false;
// Obtain an instance of an XMLReader implementation from a system property
try {
XMLReader parser = org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
... | [
"public",
"boolean",
"parseNextLine",
"(",
")",
"{",
"if",
"(",
"firstTime",
")",
"{",
"firstTime",
"=",
"false",
";",
"// Obtain an instance of an XMLReader implementation from a system property",
"try",
"{",
"XMLReader",
"parser",
"=",
"org",
".",
"xml",
".",
"sax... | Parse the next line and return false at EOF. | [
"Parse",
"the",
"next",
"line",
"and",
"return",
"false",
"at",
"EOF",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/data/importfix/base/HtmlSource.java#L60-L90 |
153,666 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java | JBasePanel.free | public void free()
{
if (this.getTargetScreen(JBaseFrame.class) != null)
((JBaseFrame)this.getTargetScreen(JBaseFrame.class)).setTitle(null);
this.freeSubComponents(this);
} | java | public void free()
{
if (this.getTargetScreen(JBaseFrame.class) != null)
((JBaseFrame)this.getTargetScreen(JBaseFrame.class)).setTitle(null);
this.freeSubComponents(this);
} | [
"public",
"void",
"free",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getTargetScreen",
"(",
"JBaseFrame",
".",
"class",
")",
"!=",
"null",
")",
"(",
"(",
"JBaseFrame",
")",
"this",
".",
"getTargetScreen",
"(",
"JBaseFrame",
".",
"class",
")",
")",
".",
... | Free the resources held by this object.
This method calls freeSubComponents for this. | [
"Free",
"the",
"resources",
"held",
"by",
"this",
"object",
".",
"This",
"method",
"calls",
"freeSubComponents",
"for",
"this",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L104-L109 |
153,667 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java | JBasePanel.getSubScreen | public static Component getSubScreen(Container container, Class<?> targetClass)
{
for (int i = container.getComponentCount() - 1; i >= 0; i--)
{ // Go backwards to do toolbars, menubars last.
Component component = container.getComponent(i);
if (targetClass.isAssignableFrom(... | java | public static Component getSubScreen(Container container, Class<?> targetClass)
{
for (int i = container.getComponentCount() - 1; i >= 0; i--)
{ // Go backwards to do toolbars, menubars last.
Component component = container.getComponent(i);
if (targetClass.isAssignableFrom(... | [
"public",
"static",
"Component",
"getSubScreen",
"(",
"Container",
"container",
",",
"Class",
"<",
"?",
">",
"targetClass",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"container",
".",
"getComponentCount",
"(",
")",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",... | Climb down through the panel hierarchy until you find a component of this class.
@param component The (non-inclusive) component to start climbing down to find this class.
@param targetClass The class type to find (or inherited).
@return The first parent down the tree to match this class (or null). | [
"Climb",
"down",
"through",
"the",
"panel",
"hierarchy",
"until",
"you",
"find",
"a",
"component",
"of",
"this",
"class",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L391-L406 |
153,668 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java | JBasePanel.getComponentByName | public Component getComponentByName(String strName, Container parent)
{
for (int i = 0; i < parent.getComponentCount(); i++)
{
Component component = parent.getComponent(i);
if (strName.equals(component.getName()))
return component;
if (component in... | java | public Component getComponentByName(String strName, Container parent)
{
for (int i = 0; i < parent.getComponentCount(); i++)
{
Component component = parent.getComponent(i);
if (strName.equals(component.getName()))
return component;
if (component in... | [
"public",
"Component",
"getComponentByName",
"(",
"String",
"strName",
",",
"Container",
"parent",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"parent",
".",
"getComponentCount",
"(",
")",
";",
"i",
"++",
")",
"{",
"Component",
"component"... | Get the sub-component with this name.
@param strName The name I'm looking for.
@param parent The container to start the search from.
@return The component with this name (or null). | [
"Get",
"the",
"sub",
"-",
"component",
"with",
"this",
"name",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L422-L437 |
153,669 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java | JBasePanel.addScrollbars | public JPanel addScrollbars(JComponent screen)
{
Dimension dimension = screen.getPreferredSize();
if ((dimension.height == 0) && (dimension.width == 0))
dimension = JScreenConstants.PREFERRED_SCREEN_SIZE;
else if ((screen.getBounds().width != 0) && (screen.getBounds().height != 0... | java | public JPanel addScrollbars(JComponent screen)
{
Dimension dimension = screen.getPreferredSize();
if ((dimension.height == 0) && (dimension.width == 0))
dimension = JScreenConstants.PREFERRED_SCREEN_SIZE;
else if ((screen.getBounds().width != 0) && (screen.getBounds().height != 0... | [
"public",
"JPanel",
"addScrollbars",
"(",
"JComponent",
"screen",
")",
"{",
"Dimension",
"dimension",
"=",
"screen",
".",
"getPreferredSize",
"(",
")",
";",
"if",
"(",
"(",
"dimension",
".",
"height",
"==",
"0",
")",
"&&",
"(",
"dimension",
".",
"width",
... | Add a scrollpane to this component and return the component with
the scroller and this screen in it.
@param screen The screen to add a scroller around. | [
"Add",
"a",
"scrollpane",
"to",
"this",
"component",
"and",
"return",
"the",
"component",
"with",
"the",
"scroller",
"and",
"this",
"screen",
"in",
"it",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L481-L507 |
153,670 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java | JBasePanel.getToolbarParent | public JBasePanel getToolbarParent()
{
JBasePanel parent = (JBasePanel)this.getTargetScreen(JBasePanel.class);
if (parent == null)
if (m_parent instanceof JBasePanel)
parent = (JBasePanel)m_parent;
if (parent == null)
return this;
return parent... | java | public JBasePanel getToolbarParent()
{
JBasePanel parent = (JBasePanel)this.getTargetScreen(JBasePanel.class);
if (parent == null)
if (m_parent instanceof JBasePanel)
parent = (JBasePanel)m_parent;
if (parent == null)
return this;
return parent... | [
"public",
"JBasePanel",
"getToolbarParent",
"(",
")",
"{",
"JBasePanel",
"parent",
"=",
"(",
"JBasePanel",
")",
"this",
".",
"getTargetScreen",
"(",
"JBasePanel",
".",
"class",
")",
";",
"if",
"(",
"parent",
"==",
"null",
")",
"if",
"(",
"m_parent",
"insta... | Get the highest level parent that is a JBasePanel.
This is where a toolbar or menubar should be added.
@return The top level parent (if none, return this). | [
"Get",
"the",
"highest",
"level",
"parent",
"that",
"is",
"a",
"JBasePanel",
".",
"This",
"is",
"where",
"a",
"toolbar",
"or",
"menubar",
"should",
"be",
"added",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L513-L522 |
153,671 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java | JBasePanel.addToolbar | public JPanel addToolbar(JComponent screen, JComponent toolbar)
{
JPanel panelMain = new JPanel();
panelMain.setOpaque(false);
panelMain.setLayout(new BoxLayout(panelMain, BoxLayout.Y_AXIS));
panelMain.add(toolbar);
toolbar.setAlignmentX(0);
panelMain.add(screen);
... | java | public JPanel addToolbar(JComponent screen, JComponent toolbar)
{
JPanel panelMain = new JPanel();
panelMain.setOpaque(false);
panelMain.setLayout(new BoxLayout(panelMain, BoxLayout.Y_AXIS));
panelMain.add(toolbar);
toolbar.setAlignmentX(0);
panelMain.add(screen);
... | [
"public",
"JPanel",
"addToolbar",
"(",
"JComponent",
"screen",
",",
"JComponent",
"toolbar",
")",
"{",
"JPanel",
"panelMain",
"=",
"new",
"JPanel",
"(",
")",
";",
"panelMain",
".",
"setOpaque",
"(",
"false",
")",
";",
"panelMain",
".",
"setLayout",
"(",
"n... | Add this toolbar to this panel and return the new main panel.
@param screen The screen to add a toolbar to.
@param toolbar The toolbar to add.
@return The new panel with these two components in them. | [
"Add",
"this",
"toolbar",
"to",
"this",
"panel",
"and",
"return",
"the",
"new",
"main",
"panel",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBasePanel.java#L571-L581 |
153,672 | jeroenvanmaanen/bridge-pattern | src/main/java/org/leialearns/bridge/FactoryAccessor.java | FactoryAccessor.set | public void set(BridgeFactory factory) {
if (factory.getNearType() != nearType) {
throw new IllegalArgumentException("Type mismatch: " + nearType + ": " + factory.getNearType());
}
factorySetting.set(factory);
} | java | public void set(BridgeFactory factory) {
if (factory.getNearType() != nearType) {
throw new IllegalArgumentException("Type mismatch: " + nearType + ": " + factory.getNearType());
}
factorySetting.set(factory);
} | [
"public",
"void",
"set",
"(",
"BridgeFactory",
"factory",
")",
"{",
"if",
"(",
"factory",
".",
"getNearType",
"(",
")",
"!=",
"nearType",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Type mismatch: \"",
"+",
"nearType",
"+",
"\": \"",
"+",
"... | Sets the bridge factory to use with this accessor. The near type of the given bridge factory has to match
the near type of this bridge accessor.
@param factory The bridge factory to set | [
"Sets",
"the",
"bridge",
"factory",
"to",
"use",
"with",
"this",
"accessor",
".",
"The",
"near",
"type",
"of",
"the",
"given",
"bridge",
"factory",
"has",
"to",
"match",
"the",
"near",
"type",
"of",
"this",
"bridge",
"accessor",
"."
] | 55bd2de8cff800a1a97e26e97d3600e6dfb00b59 | https://github.com/jeroenvanmaanen/bridge-pattern/blob/55bd2de8cff800a1a97e26e97d3600e6dfb00b59/src/main/java/org/leialearns/bridge/FactoryAccessor.java#L33-L38 |
153,673 | jeroenvanmaanen/bridge-pattern | src/main/java/org/leialearns/bridge/FactoryAccessor.java | FactoryAccessor.get | public BridgeFactory get() {
BridgeFactory result;
try {
result = factorySetting.get();
} catch (RuntimeException exception) {
RuntimeException wrapper = new IllegalStateException("Missing factory for: " + display(nearType), exception);
logger.trace("Stack tra... | java | public BridgeFactory get() {
BridgeFactory result;
try {
result = factorySetting.get();
} catch (RuntimeException exception) {
RuntimeException wrapper = new IllegalStateException("Missing factory for: " + display(nearType), exception);
logger.trace("Stack tra... | [
"public",
"BridgeFactory",
"get",
"(",
")",
"{",
"BridgeFactory",
"result",
";",
"try",
"{",
"result",
"=",
"factorySetting",
".",
"get",
"(",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"exception",
")",
"{",
"RuntimeException",
"wrapper",
"=",
"new",
... | Returns the bridge factory for this accessor.
@return The bridge factory for this accessor | [
"Returns",
"the",
"bridge",
"factory",
"for",
"this",
"accessor",
"."
] | 55bd2de8cff800a1a97e26e97d3600e6dfb00b59 | https://github.com/jeroenvanmaanen/bridge-pattern/blob/55bd2de8cff800a1a97e26e97d3600e6dfb00b59/src/main/java/org/leialearns/bridge/FactoryAccessor.java#L44-L54 |
153,674 | jeroenvanmaanen/bridge-pattern | src/main/java/org/leialearns/bridge/FactoryAccessor.java | FactoryAccessor.getNearObject | public NT getNearObject(Object farObject) {
return nearType.cast(factorySetting.get().getNearObject(farObject));
} | java | public NT getNearObject(Object farObject) {
return nearType.cast(factorySetting.get().getNearObject(farObject));
} | [
"public",
"NT",
"getNearObject",
"(",
"Object",
"farObject",
")",
"{",
"return",
"nearType",
".",
"cast",
"(",
"factorySetting",
".",
"get",
"(",
")",
".",
"getNearObject",
"(",
"farObject",
")",
")",
";",
"}"
] | Returns the near object that corresponds to the given far object. The types must match the bridge factory
associated with this accessor and the bridge factory must be set.
@param farObject The far object to look up
@return The corresponding near object | [
"Returns",
"the",
"near",
"object",
"that",
"corresponds",
"to",
"the",
"given",
"far",
"object",
".",
"The",
"types",
"must",
"match",
"the",
"bridge",
"factory",
"associated",
"with",
"this",
"accessor",
"and",
"the",
"bridge",
"factory",
"must",
"be",
"se... | 55bd2de8cff800a1a97e26e97d3600e6dfb00b59 | https://github.com/jeroenvanmaanen/bridge-pattern/blob/55bd2de8cff800a1a97e26e97d3600e6dfb00b59/src/main/java/org/leialearns/bridge/FactoryAccessor.java#L70-L72 |
153,675 | evandor/unitprofiler | unitprofiler.core/src/main/java/de/twenty11/unitprofile/callback/ProfilerCallback.java | ProfilerCallback.start | public static MethodInvocation start(String objectName, String methodName, int lineNumber) {
bigMessage("Starting profiling... " + objectName + "#" + methodName + " (" + lineNumber + ")");
if (profiling()) {
logger.error("Profiling was already started for '{}'", callstack.getFirst().getCls()... | java | public static MethodInvocation start(String objectName, String methodName, int lineNumber) {
bigMessage("Starting profiling... " + objectName + "#" + methodName + " (" + lineNumber + ")");
if (profiling()) {
logger.error("Profiling was already started for '{}'", callstack.getFirst().getCls()... | [
"public",
"static",
"MethodInvocation",
"start",
"(",
"String",
"objectName",
",",
"String",
"methodName",
",",
"int",
"lineNumber",
")",
"{",
"bigMessage",
"(",
"\"Starting profiling... \"",
"+",
"objectName",
"+",
"\"#\"",
"+",
"methodName",
"+",
"\" (\"",
"+",
... | the first invocation for this profiling session.
@param objectName
@param methodName
@return | [
"the",
"first",
"invocation",
"for",
"this",
"profiling",
"session",
"."
] | a875635d0f45ca7f9694c5e9c815109877d056b5 | https://github.com/evandor/unitprofiler/blob/a875635d0f45ca7f9694c5e9c815109877d056b5/unitprofiler.core/src/main/java/de/twenty11/unitprofile/callback/ProfilerCallback.java#L40-L54 |
153,676 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java | BaseSession.getMainRecord | public Record getMainRecord()
{
Record record = super.getMainRecord();
if (record == null) if (m_sessionObjectParent != null)
record = ((BaseSession)m_sessionObjectParent).getMainRecord(); // Look thru the parent window now
return record;
} | java | public Record getMainRecord()
{
Record record = super.getMainRecord();
if (record == null) if (m_sessionObjectParent != null)
record = ((BaseSession)m_sessionObjectParent).getMainRecord(); // Look thru the parent window now
return record;
} | [
"public",
"Record",
"getMainRecord",
"(",
")",
"{",
"Record",
"record",
"=",
"super",
".",
"getMainRecord",
"(",
")",
";",
"if",
"(",
"record",
"==",
"null",
")",
"if",
"(",
"m_sessionObjectParent",
"!=",
"null",
")",
"record",
"=",
"(",
"(",
"BaseSessio... | Get the main record for this session.
@return The main record (or null if none). | [
"Get",
"the",
"main",
"record",
"for",
"this",
"session",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L167-L173 |
153,677 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java | BaseSession.getScreenRecord | public Record getScreenRecord()
{
Record record = super.getScreenRecord();
if (record == null) if (m_sessionObjectParent != null)
record = ((BaseSession)m_sessionObjectParent).getScreenRecord(); // Look thru the parent window now
return record;
} | java | public Record getScreenRecord()
{
Record record = super.getScreenRecord();
if (record == null) if (m_sessionObjectParent != null)
record = ((BaseSession)m_sessionObjectParent).getScreenRecord(); // Look thru the parent window now
return record;
} | [
"public",
"Record",
"getScreenRecord",
"(",
")",
"{",
"Record",
"record",
"=",
"super",
".",
"getScreenRecord",
"(",
")",
";",
"if",
"(",
"record",
"==",
"null",
")",
"if",
"(",
"m_sessionObjectParent",
"!=",
"null",
")",
"record",
"=",
"(",
"(",
"BaseSe... | Get the screen query.
@return The screen record (or null if none). | [
"Get",
"the",
"screen",
"query",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L190-L196 |
153,678 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java | BaseSession.setRecordCurrent | public Record setRecordCurrent()
{
Record recordMain = this.getMainRecord();
try {
if (recordMain != null)
{
if (m_objectID != null)
{ // Read the request
if (recordMain.setHandle(m_objectID, DBConstants.BOOKMARK_HANDLE) !... | java | public Record setRecordCurrent()
{
Record recordMain = this.getMainRecord();
try {
if (recordMain != null)
{
if (m_objectID != null)
{ // Read the request
if (recordMain.setHandle(m_objectID, DBConstants.BOOKMARK_HANDLE) !... | [
"public",
"Record",
"setRecordCurrent",
"(",
")",
"{",
"Record",
"recordMain",
"=",
"this",
".",
"getMainRecord",
"(",
")",
";",
"try",
"{",
"if",
"(",
"recordMain",
"!=",
"null",
")",
"{",
"if",
"(",
"m_objectID",
"!=",
"null",
")",
"{",
"// Read the re... | Set the record to the bookmark passed in.
@return the record with the bookmark set to the initial value. | [
"Set",
"the",
"record",
"to",
"the",
"bookmark",
"passed",
"in",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L221-L249 |
153,679 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java | BaseSession.addSessionObject | public void addSessionObject(BaseSession sessionObject)
{
if (sessionObject == null)
return;
if (m_vSessionObjectList == null)
m_vSessionObjectList = new Vector<BaseSession>();
m_vSessionObjectList.addElement(sessionObject);
} | java | public void addSessionObject(BaseSession sessionObject)
{
if (sessionObject == null)
return;
if (m_vSessionObjectList == null)
m_vSessionObjectList = new Vector<BaseSession>();
m_vSessionObjectList.addElement(sessionObject);
} | [
"public",
"void",
"addSessionObject",
"(",
"BaseSession",
"sessionObject",
")",
"{",
"if",
"(",
"sessionObject",
"==",
"null",
")",
"return",
";",
"if",
"(",
"m_vSessionObjectList",
"==",
"null",
")",
"m_vSessionObjectList",
"=",
"new",
"Vector",
"<",
"BaseSessi... | Add this sub-session to this session.
@param sessionObject The session to add. | [
"Add",
"this",
"sub",
"-",
"session",
"to",
"this",
"session",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L273-L280 |
153,680 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java | BaseSession.removeSessionObject | public boolean removeSessionObject(BaseSession sessionObject)
{
if (m_vSessionObjectList == null)
return false;
boolean bFlag = m_vSessionObjectList.removeElement(sessionObject);
return bFlag;
} | java | public boolean removeSessionObject(BaseSession sessionObject)
{
if (m_vSessionObjectList == null)
return false;
boolean bFlag = m_vSessionObjectList.removeElement(sessionObject);
return bFlag;
} | [
"public",
"boolean",
"removeSessionObject",
"(",
"BaseSession",
"sessionObject",
")",
"{",
"if",
"(",
"m_vSessionObjectList",
"==",
"null",
")",
"return",
"false",
";",
"boolean",
"bFlag",
"=",
"m_vSessionObjectList",
".",
"removeElement",
"(",
"sessionObject",
")",... | Remove this sub-session from this session.
@param sessionObject The session to remove.
@return true If successful. | [
"Remove",
"this",
"sub",
"-",
"session",
"from",
"this",
"session",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L286-L292 |
153,681 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java | BaseSession.getSessionObjectAt | public BaseSession getSessionObjectAt(int iIndex)
{
if (m_vSessionObjectList == null)
return null;
return (BaseSession)m_vSessionObjectList.elementAt(iIndex);
} | java | public BaseSession getSessionObjectAt(int iIndex)
{
if (m_vSessionObjectList == null)
return null;
return (BaseSession)m_vSessionObjectList.elementAt(iIndex);
} | [
"public",
"BaseSession",
"getSessionObjectAt",
"(",
"int",
"iIndex",
")",
"{",
"if",
"(",
"m_vSessionObjectList",
"==",
"null",
")",
"return",
"null",
";",
"return",
"(",
"BaseSession",
")",
"m_vSessionObjectList",
".",
"elementAt",
"(",
"iIndex",
")",
";",
"}... | Get the sub-session at this location.
@param iIndex index.
@return The sub-session (or null). | [
"Get",
"the",
"sub",
"-",
"session",
"at",
"this",
"location",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L308-L313 |
153,682 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java | BaseSession.getFieldData | public Map<String,Object> getFieldData(Map<String,Object> properties)
{
Map<String, Object> propReturn = null;
if (properties != null)
{
propReturn = new Hashtable<String, Object>();
for (int i = 1; ; i++)
{
String strFieldNumber = DBParams... | java | public Map<String,Object> getFieldData(Map<String,Object> properties)
{
Map<String, Object> propReturn = null;
if (properties != null)
{
propReturn = new Hashtable<String, Object>();
for (int i = 1; ; i++)
{
String strFieldNumber = DBParams... | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getFieldData",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"propReturn",
"=",
"null",
";",
"if",
"(",
"properties",
"!=",
"null",
... | GetFieldData Method. | [
"GetFieldData",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L393-L419 |
153,683 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java | BaseSession.getDatabaseSession | public DatabaseSession getDatabaseSession(BaseDatabase database)
{
for (int iFieldSeq = 0; iFieldSeq < this.getSessionObjectCount(); iFieldSeq++)
{ // See if any of my children want to handle this command
if (this.getSessionObjectAt(iFieldSeq).getDatabaseSession(database) != null)
... | java | public DatabaseSession getDatabaseSession(BaseDatabase database)
{
for (int iFieldSeq = 0; iFieldSeq < this.getSessionObjectCount(); iFieldSeq++)
{ // See if any of my children want to handle this command
if (this.getSessionObjectAt(iFieldSeq).getDatabaseSession(database) != null)
... | [
"public",
"DatabaseSession",
"getDatabaseSession",
"(",
"BaseDatabase",
"database",
")",
"{",
"for",
"(",
"int",
"iFieldSeq",
"=",
"0",
";",
"iFieldSeq",
"<",
"this",
".",
"getSessionObjectCount",
"(",
")",
";",
"iFieldSeq",
"++",
")",
"{",
"// See if any of my ... | If this database is in my database list, return this object.
@param database The database to lookup.
@return this if successful. | [
"If",
"this",
"database",
"is",
"in",
"my",
"database",
"list",
"return",
"this",
"object",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L425-L433 |
153,684 | jbundle/jbundle | thin/opt/location/src/main/java/org/jbundle/thin/opt/location/JTreePanel.java | JTreePanel.mySingleClick | public NodeData mySingleClick(int selRow, TreePath selPath)
{
Object[] x = selPath.getPath();
DynamicTreeNode nodeCurrent = (DynamicTreeNode)x[x.length - 1]; // Last one in list
NodeData data = (NodeData)nodeCurrent.getUserObject();
String strDescription = data.toString();
... | java | public NodeData mySingleClick(int selRow, TreePath selPath)
{
Object[] x = selPath.getPath();
DynamicTreeNode nodeCurrent = (DynamicTreeNode)x[x.length - 1]; // Last one in list
NodeData data = (NodeData)nodeCurrent.getUserObject();
String strDescription = data.toString();
... | [
"public",
"NodeData",
"mySingleClick",
"(",
"int",
"selRow",
",",
"TreePath",
"selPath",
")",
"{",
"Object",
"[",
"]",
"x",
"=",
"selPath",
".",
"getPath",
"(",
")",
";",
"DynamicTreeNode",
"nodeCurrent",
"=",
"(",
"DynamicTreeNode",
")",
"x",
"[",
"x",
... | User selected item. | [
"User",
"selected",
"item",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/opt/location/src/main/java/org/jbundle/thin/opt/location/JTreePanel.java#L136-L148 |
153,685 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlInOut.java | XmlInOut.run | public void run()
{
Record record = this.getMainRecord();
String strFileName = this.getProperty("filename");
String strImport = this.getProperty("import");
if (strFileName == null)
strFileName = strImport;
String strExport = this.getProperty("export");
if ... | java | public void run()
{
Record record = this.getMainRecord();
String strFileName = this.getProperty("filename");
String strImport = this.getProperty("import");
if (strFileName == null)
strFileName = strImport;
String strExport = this.getProperty("export");
if ... | [
"public",
"void",
"run",
"(",
")",
"{",
"Record",
"record",
"=",
"this",
".",
"getMainRecord",
"(",
")",
";",
"String",
"strFileName",
"=",
"this",
".",
"getProperty",
"(",
"\"filename\"",
")",
";",
"String",
"strImport",
"=",
"this",
".",
"getProperty",
... | Run this process given the parameters passed in on initialization. | [
"Run",
"this",
"process",
"given",
"the",
"parameters",
"passed",
"in",
"on",
"initialization",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlInOut.java#L186-L207 |
153,686 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlInOut.java | XmlInOut.importXML | public boolean importXML(BaseTable table, String filename, InputStream inStream)
{
Record record = table.getRecord();
XmlInOut.enableAllBehaviors(record, false, false);
DocumentBuilder db = Utility.getDocumentBuilder();
DocumentBuilder stringdb = Utility.getDocumentBuilder();
//... | java | public boolean importXML(BaseTable table, String filename, InputStream inStream)
{
Record record = table.getRecord();
XmlInOut.enableAllBehaviors(record, false, false);
DocumentBuilder db = Utility.getDocumentBuilder();
DocumentBuilder stringdb = Utility.getDocumentBuilder();
//... | [
"public",
"boolean",
"importXML",
"(",
"BaseTable",
"table",
",",
"String",
"filename",
",",
"InputStream",
"inStream",
")",
"{",
"Record",
"record",
"=",
"table",
".",
"getRecord",
"(",
")",
";",
"XmlInOut",
".",
"enableAllBehaviors",
"(",
"record",
",",
"f... | Parses this XML text and place it in new records.
@param record The record to place this parsed XML into (If this is null, the file name is supplied in the XML).
@param filename The XML file to parse. | [
"Parses",
"this",
"XML",
"text",
"and",
"place",
"it",
"in",
"new",
"records",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlInOut.java#L369-L430 |
153,687 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlInOut.java | XmlInOut.enableAllBehaviors | public static void enableAllBehaviors(Record record, boolean bEnableRecordBehaviors, boolean bEnableFieldBehaviors)
{
if (record == null)
return;
record.setEnableListeners(bEnableRecordBehaviors); // Disable all file behaviors
for (int iFieldSeq = 0; iFieldSeq < record.getField... | java | public static void enableAllBehaviors(Record record, boolean bEnableRecordBehaviors, boolean bEnableFieldBehaviors)
{
if (record == null)
return;
record.setEnableListeners(bEnableRecordBehaviors); // Disable all file behaviors
for (int iFieldSeq = 0; iFieldSeq < record.getField... | [
"public",
"static",
"void",
"enableAllBehaviors",
"(",
"Record",
"record",
",",
"boolean",
"bEnableRecordBehaviors",
",",
"boolean",
"bEnableFieldBehaviors",
")",
"{",
"if",
"(",
"record",
"==",
"null",
")",
"return",
";",
"record",
".",
"setEnableListeners",
"(",... | Enable or disable all the behaviors.
@param record The target record.
@param bEnableRecordBehaviors Enable/disable all the record behaviors.
@param bEnableFieldBehaviors Enable/disable all the field behaviors. | [
"Enable",
"or",
"disable",
"all",
"the",
"behaviors",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlInOut.java#L624-L634 |
153,688 | jbundle/jbundle | app/program/packages/src/main/java/org/jbundle/app/program/packages/screen/PackagesScanListener.java | PackagesScanListener.directoryContainsFiles | public boolean directoryContainsFiles(File fileDir)
{
boolean containsFiles = false;
File[] files = fileDir.listFiles();
if (files != null)
{
for (File file : files)
{
if (!file.isDirectory())
containsFiles = true;
... | java | public boolean directoryContainsFiles(File fileDir)
{
boolean containsFiles = false;
File[] files = fileDir.listFiles();
if (files != null)
{
for (File file : files)
{
if (!file.isDirectory())
containsFiles = true;
... | [
"public",
"boolean",
"directoryContainsFiles",
"(",
"File",
"fileDir",
")",
"{",
"boolean",
"containsFiles",
"=",
"false",
";",
"File",
"[",
"]",
"files",
"=",
"fileDir",
".",
"listFiles",
"(",
")",
";",
"if",
"(",
"files",
"!=",
"null",
")",
"{",
"for",... | Get the projectID if this directory has any files in it.
Otherwise, return 0 meaning I don't have to specify this package. | [
"Get",
"the",
"projectID",
"if",
"this",
"directory",
"has",
"any",
"files",
"in",
"it",
".",
"Otherwise",
"return",
"0",
"meaning",
"I",
"don",
"t",
"have",
"to",
"specify",
"this",
"package",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/packages/src/main/java/org/jbundle/app/program/packages/screen/PackagesScanListener.java#L172-L185 |
153,689 | FitLayout/classify | src/main/java/org/fit/layout/classify/ColorAnalyzer.java | ColorAnalyzer.getColorPercentage | public double getColorPercentage(Color color)
{
if (color == null)
return 0;
else
{
Integer num = colors.get(colorKey(color));
if (num == null) num = 0;
if (totalLength == 0)
return 0;
else
return (do... | java | public double getColorPercentage(Color color)
{
if (color == null)
return 0;
else
{
Integer num = colors.get(colorKey(color));
if (num == null) num = 0;
if (totalLength == 0)
return 0;
else
return (do... | [
"public",
"double",
"getColorPercentage",
"(",
"Color",
"color",
")",
"{",
"if",
"(",
"color",
"==",
"null",
")",
"return",
"0",
";",
"else",
"{",
"Integer",
"num",
"=",
"colors",
".",
"get",
"(",
"colorKey",
"(",
"color",
")",
")",
";",
"if",
"(",
... | Obtains the percentage of the text that has the given color.
@param color the color to be tested.
@return the percentage (0..1) | [
"Obtains",
"the",
"percentage",
"of",
"the",
"text",
"that",
"has",
"the",
"given",
"color",
"."
] | 0b43ceb2f0be4e6d26263491893884d811f0d605 | https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/ColorAnalyzer.java#L44-L57 |
153,690 | FitLayout/classify | src/main/java/org/fit/layout/classify/ColorAnalyzer.java | ColorAnalyzer.getColorPercentage | public double getColorPercentage(Area node)
{
int tlen = 0;
double sum = 0;
for (Box box : node.getBoxes())
{
int len = letterLength(box.getText());
if (len > 0)
{
sum += getColorPercentage(box.getColor()) * len;
tlen += len;
}
}
... | java | public double getColorPercentage(Area node)
{
int tlen = 0;
double sum = 0;
for (Box box : node.getBoxes())
{
int len = letterLength(box.getText());
if (len > 0)
{
sum += getColorPercentage(box.getColor()) * len;
tlen += len;
}
}
... | [
"public",
"double",
"getColorPercentage",
"(",
"Area",
"node",
")",
"{",
"int",
"tlen",
"=",
"0",
";",
"double",
"sum",
"=",
"0",
";",
"for",
"(",
"Box",
"box",
":",
"node",
".",
"getBoxes",
"(",
")",
")",
"{",
"int",
"len",
"=",
"letterLength",
"(... | Obtains the average percentage of all the text that has the given color.
@param color the color to be tested.
@return the percentage (0..1) | [
"Obtains",
"the",
"average",
"percentage",
"of",
"all",
"the",
"text",
"that",
"has",
"the",
"given",
"color",
"."
] | 0b43ceb2f0be4e6d26263491893884d811f0d605 | https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/ColorAnalyzer.java#L64-L90 |
153,691 | aequologica/geppaequo | geppaequo-config/src/main/java/net/aequologica/neo/geppaequo/config/ConfigManager.java | ConfigManager.set | public void set(final String originalKey, final Object object) {
final String key = applicationName + "." + originalKey;
if (object == null || (object instanceof String && ((String) object).length() == 0)) {
// remove
application.setConfig(application.getConfig().withoutPath(key)... | java | public void set(final String originalKey, final Object object) {
final String key = applicationName + "." + originalKey;
if (object == null || (object instanceof String && ((String) object).length() == 0)) {
// remove
application.setConfig(application.getConfig().withoutPath(key)... | [
"public",
"void",
"set",
"(",
"final",
"String",
"originalKey",
",",
"final",
"Object",
"object",
")",
"{",
"final",
"String",
"key",
"=",
"applicationName",
"+",
"\".\"",
"+",
"originalKey",
";",
"if",
"(",
"object",
"==",
"null",
"||",
"(",
"object",
"... | will throw exception if key is not found | [
"will",
"throw",
"exception",
"if",
"key",
"is",
"not",
"found"
] | b72e5f6356535fd045a931f8c544d4a8ea6e35a2 | https://github.com/aequologica/geppaequo/blob/b72e5f6356535fd045a931f8c544d4a8ea6e35a2/geppaequo-config/src/main/java/net/aequologica/neo/geppaequo/config/ConfigManager.java#L74-L86 |
153,692 | aequologica/geppaequo | geppaequo-config/src/main/java/net/aequologica/neo/geppaequo/config/ConfigManager.java | ConfigManager.loadConfigs | void loadConfigs() throws IOException {
application.loadConfig();
user.loadConfig();
system.loadConfig();
config = application.getConfig().withFallback(user.getConfig()).withFallback(system.getConfig());
dump2debugLog("MERGED", config);
} | java | void loadConfigs() throws IOException {
application.loadConfig();
user.loadConfig();
system.loadConfig();
config = application.getConfig().withFallback(user.getConfig()).withFallback(system.getConfig());
dump2debugLog("MERGED", config);
} | [
"void",
"loadConfigs",
"(",
")",
"throws",
"IOException",
"{",
"application",
".",
"loadConfig",
"(",
")",
";",
"user",
".",
"loadConfig",
"(",
")",
";",
"system",
".",
"loadConfig",
"(",
")",
";",
"config",
"=",
"application",
".",
"getConfig",
"(",
")"... | THE BIG LOAD AND MERGE | [
"THE",
"BIG",
"LOAD",
"AND",
"MERGE"
] | b72e5f6356535fd045a931f8c544d4a8ea6e35a2 | https://github.com/aequologica/geppaequo/blob/b72e5f6356535fd045a931f8c544d4a8ea6e35a2/geppaequo-config/src/main/java/net/aequologica/neo/geppaequo/config/ConfigManager.java#L96-L104 |
153,693 | aequologica/geppaequo | geppaequo-config/src/main/java/net/aequologica/neo/geppaequo/config/ConfigManager.java | ConfigManager.dumpConfig | static void dumpConfig(final String name, final Config config, final PrintWriter printWriter) {
if (printWriter == null) {
throw new IllegalArgumentException("writer argument cannot be null");
}
printWriter.println();
printWriter.println("^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ... | java | static void dumpConfig(final String name, final Config config, final PrintWriter printWriter) {
if (printWriter == null) {
throw new IllegalArgumentException("writer argument cannot be null");
}
printWriter.println();
printWriter.println("^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ... | [
"static",
"void",
"dumpConfig",
"(",
"final",
"String",
"name",
",",
"final",
"Config",
"config",
",",
"final",
"PrintWriter",
"printWriter",
")",
"{",
"if",
"(",
"printWriter",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"writer... | end of class ConfigSource | [
"end",
"of",
"class",
"ConfigSource"
] | b72e5f6356535fd045a931f8c544d4a8ea6e35a2 | https://github.com/aequologica/geppaequo/blob/b72e5f6356535fd045a931f8c544d4a8ea6e35a2/geppaequo-config/src/main/java/net/aequologica/neo/geppaequo/config/ConfigManager.java#L204-L215 |
153,694 | aequologica/geppaequo | geppaequo-config/src/main/java/net/aequologica/neo/geppaequo/config/ConfigManager.java | ConfigManager.reader2String | private static String reader2String(final Reader reader) throws IOException {
final StringBuilder stringBuilder = new StringBuilder();
try (BufferedReader bufferedReader = new BufferedReader(reader)) {
String line = null;
while ((line = bufferedReader.readLine()) != null) {
... | java | private static String reader2String(final Reader reader) throws IOException {
final StringBuilder stringBuilder = new StringBuilder();
try (BufferedReader bufferedReader = new BufferedReader(reader)) {
String line = null;
while ((line = bufferedReader.readLine()) != null) {
... | [
"private",
"static",
"String",
"reader2String",
"(",
"final",
"Reader",
"reader",
")",
"throws",
"IOException",
"{",
"final",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"try",
"(",
"BufferedReader",
"bufferedReader",
"=",
"new",
... | convert Reader to String | [
"convert",
"Reader",
"to",
"String"
] | b72e5f6356535fd045a931f8c544d4a8ea6e35a2 | https://github.com/aequologica/geppaequo/blob/b72e5f6356535fd045a931f8c544d4a8ea6e35a2/geppaequo-config/src/main/java/net/aequologica/neo/geppaequo/config/ConfigManager.java#L500-L514 |
153,695 | jbundle/jbundle | base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java | JdbcDatabase.init | public void init(DatabaseOwner databaseOwner, String strDbName, int iDatabaseType, Map<String, Object> properties)
{
super.init(databaseOwner, strDbName, iDatabaseType, properties);
// Typically, JDBC databases do not support locking (Change to "true" otherwise on JDBC open)
this.setProperty... | java | public void init(DatabaseOwner databaseOwner, String strDbName, int iDatabaseType, Map<String, Object> properties)
{
super.init(databaseOwner, strDbName, iDatabaseType, properties);
// Typically, JDBC databases do not support locking (Change to "true" otherwise on JDBC open)
this.setProperty... | [
"public",
"void",
"init",
"(",
"DatabaseOwner",
"databaseOwner",
",",
"String",
"strDbName",
",",
"int",
"iDatabaseType",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"super",
".",
"init",
"(",
"databaseOwner",
",",
"strDbName",
","... | Initialize this database and add it to the databaseOwner.
@param databaseOwner My databaseOwner.
@param iDatabaseType The database type (LOCAL/REMOTE).
@param strDBName The database name. | [
"Initialize",
"this",
"database",
"and",
"add",
"it",
"to",
"the",
"databaseOwner",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java#L140-L151 |
153,696 | jbundle/jbundle | base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java | JdbcDatabase.fixDatabaseProductName | public String fixDatabaseProductName(String strDatabaseProductName)
{
if (strDatabaseProductName == null)
return null;
if (strDatabaseProductName.lastIndexOf(' ') != -1)
strDatabaseProductName = strDatabaseProductName.substring(strDatabaseProductName.lastIndexOf(' ') + 1);
return strDatab... | java | public String fixDatabaseProductName(String strDatabaseProductName)
{
if (strDatabaseProductName == null)
return null;
if (strDatabaseProductName.lastIndexOf(' ') != -1)
strDatabaseProductName = strDatabaseProductName.substring(strDatabaseProductName.lastIndexOf(' ') + 1);
return strDatab... | [
"public",
"String",
"fixDatabaseProductName",
"(",
"String",
"strDatabaseProductName",
")",
"{",
"if",
"(",
"strDatabaseProductName",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"strDatabaseProductName",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
"!=",
"-"... | Fix the database product name.
@param strDatabaseProductName
@return | [
"Fix",
"the",
"database",
"product",
"name",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java#L227-L234 |
153,697 | jbundle/jbundle | base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java | JdbcDatabase.close | public void close()
{
super.close(); // Do any inherrited
try {
if (m_JDBCConnection != null)
m_JDBCConnection.close();
} catch (SQLException ex) {
// Ignore error
}
m_JDBCConnection = null;
} | java | public void close()
{
super.close(); // Do any inherrited
try {
if (m_JDBCConnection != null)
m_JDBCConnection.close();
} catch (SQLException ex) {
// Ignore error
}
m_JDBCConnection = null;
} | [
"public",
"void",
"close",
"(",
")",
"{",
"super",
".",
"close",
"(",
")",
";",
"// Do any inherrited",
"try",
"{",
"if",
"(",
"m_JDBCConnection",
"!=",
"null",
")",
"m_JDBCConnection",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"SQLException",
"ex"... | Close the physical database. | [
"Close",
"the",
"physical",
"database",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java#L342-L352 |
153,698 | jbundle/jbundle | base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java | JdbcDatabase.initConnection | public void initConnection()
{
try {
boolean bAutoCommit = true;
if (DBConstants.FALSE.equalsIgnoreCase(this.getProperty(SQLParams.AUTO_COMMIT_PARAM)))
bAutoCommit = false;
m_JDBCConnection.setAutoCommit(bAutoCommit);
DatabaseMetaData dma = m... | java | public void initConnection()
{
try {
boolean bAutoCommit = true;
if (DBConstants.FALSE.equalsIgnoreCase(this.getProperty(SQLParams.AUTO_COMMIT_PARAM)))
bAutoCommit = false;
m_JDBCConnection.setAutoCommit(bAutoCommit);
DatabaseMetaData dma = m... | [
"public",
"void",
"initConnection",
"(",
")",
"{",
"try",
"{",
"boolean",
"bAutoCommit",
"=",
"true",
";",
"if",
"(",
"DBConstants",
".",
"FALSE",
".",
"equalsIgnoreCase",
"(",
"this",
".",
"getProperty",
"(",
"SQLParams",
".",
"AUTO_COMMIT_PARAM",
")",
")",... | Setup the new connection. | [
"Setup",
"the",
"new",
"connection",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java#L635-L668 |
153,699 | jbundle/jbundle | base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java | JdbcDatabase.create | public boolean create(String strDatabaseName) throws DBException
{
try {
String strDBName = this.getProperty(SQLParams.INTERNAL_DB_NAME);
int iDatabaseType = DBConstants.SYSTEM_DATABASE;
DatabaseOwner env = this.getDatabaseOwner();
JdbcDatabase db = (JdbcDatab... | java | public boolean create(String strDatabaseName) throws DBException
{
try {
String strDBName = this.getProperty(SQLParams.INTERNAL_DB_NAME);
int iDatabaseType = DBConstants.SYSTEM_DATABASE;
DatabaseOwner env = this.getDatabaseOwner();
JdbcDatabase db = (JdbcDatab... | [
"public",
"boolean",
"create",
"(",
"String",
"strDatabaseName",
")",
"throws",
"DBException",
"{",
"try",
"{",
"String",
"strDBName",
"=",
"this",
".",
"getProperty",
"(",
"SQLParams",
".",
"INTERNAL_DB_NAME",
")",
";",
"int",
"iDatabaseType",
"=",
"DBConstants... | Create a new empty database using the definition in the record.
@exception DBException Open errors passed from SQL.
@return true if successful. | [
"Create",
"a",
"new",
"empty",
"database",
"using",
"the",
"definition",
"in",
"the",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcDatabase.java#L704-L746 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.