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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
150,800 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/shell/SkbShellFactory.java | SkbShellFactory.newArgumentArray | public static SkbShellArgument[] newArgumentArray(SkbShellArgument ... args){
if(args==null){
return null;
}
Set<SkbShellArgument> ret = new HashSet<>();
for(SkbShellArgument arg : args){
if(arg!=null){
ret.add(arg);
}
}
return ret.toArray(new SkbShellArgument[args.length]);
} | java | public static SkbShellArgument[] newArgumentArray(SkbShellArgument ... args){
if(args==null){
return null;
}
Set<SkbShellArgument> ret = new HashSet<>();
for(SkbShellArgument arg : args){
if(arg!=null){
ret.add(arg);
}
}
return ret.toArray(new SkbShellArgument[args.length]);
} | [
"public",
"static",
"SkbShellArgument",
"[",
"]",
"newArgumentArray",
"(",
"SkbShellArgument",
"...",
"args",
")",
"{",
"if",
"(",
"args",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Set",
"<",
"SkbShellArgument",
">",
"ret",
"=",
"new",
"HashSet"... | Returns a new argument array.
@param args input arguments, any argument being null will be ignored
@return argument array, null if none provided | [
"Returns",
"a",
"new",
"argument",
"array",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/SkbShellFactory.java#L164-L175 |
150,801 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java | Sample.fixSampleLoops | public void fixSampleLoops(int modType)
{
if (sample==null || length==0) return;
if (repeatStop>length)
{
repeatStop = length;
repeatLength = repeatStop - repeatStart;
}
if (repeatStart+2>repeatStop)
{
repeatStop = repeatStart = 0;
repeatLength = repeatStop - repeatStart;
loopType = 0;
}
... | java | public void fixSampleLoops(int modType)
{
if (sample==null || length==0) return;
if (repeatStop>length)
{
repeatStop = length;
repeatLength = repeatStop - repeatStart;
}
if (repeatStart+2>repeatStop)
{
repeatStop = repeatStart = 0;
repeatLength = repeatStop - repeatStart;
loopType = 0;
}
... | [
"public",
"void",
"fixSampleLoops",
"(",
"int",
"modType",
")",
"{",
"if",
"(",
"sample",
"==",
"null",
"||",
"length",
"==",
"0",
")",
"return",
";",
"if",
"(",
"repeatStop",
">",
"length",
")",
"{",
"repeatStop",
"=",
"length",
";",
"repeatLength",
"... | Fits the loop-data given in instruments loaded
These values are often not correkt
@since 27.08.2006
@param modType | [
"Fits",
"the",
"loop",
"-",
"data",
"given",
"in",
"instruments",
"loaded",
"These",
"values",
"are",
"often",
"not",
"correkt"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java#L83-L106 |
150,802 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java | Sample.getLinearInterpolated | private int getLinearInterpolated(final int currentSamplePos, final int currentTuningPos)
{
final long s1 = ((long)sample[currentSamplePos ])<<Helpers.SAMPLE_SHIFT;
final long s2 = ((long)sample[currentSamplePos+1])<<Helpers.SAMPLE_SHIFT;
return (int)((s1 + (((s2-s1)*((long)currentTuningPos))>>Helpers.SHIFT))>>... | java | private int getLinearInterpolated(final int currentSamplePos, final int currentTuningPos)
{
final long s1 = ((long)sample[currentSamplePos ])<<Helpers.SAMPLE_SHIFT;
final long s2 = ((long)sample[currentSamplePos+1])<<Helpers.SAMPLE_SHIFT;
return (int)((s1 + (((s2-s1)*((long)currentTuningPos))>>Helpers.SHIFT))>>... | [
"private",
"int",
"getLinearInterpolated",
"(",
"final",
"int",
"currentSamplePos",
",",
"final",
"int",
"currentTuningPos",
")",
"{",
"final",
"long",
"s1",
"=",
"(",
"(",
"long",
")",
"sample",
"[",
"currentSamplePos",
"]",
")",
"<<",
"Helpers",
".",
"SAMP... | Does the linear interpolation with the next sample
@since 06.06.2006
@param currentTuningPos
@return | [
"Does",
"the",
"linear",
"interpolation",
"with",
"the",
"next",
"sample"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java#L138-L143 |
150,803 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java | Sample.getCubicInterpolated | private int getCubicInterpolated(final int currentSamplePos, final int currentTuningPos)
{
final int poslo = (currentTuningPos >> CubicSpline.SPLINE_FRACSHIFT) & CubicSpline.SPLINE_FRACMASK;
final long v1 = (((currentSamplePos-1)<0)?0L: (long)CubicSpline.lut[poslo ]*(long)sample[currentSamplePos-1]) +
... | java | private int getCubicInterpolated(final int currentSamplePos, final int currentTuningPos)
{
final int poslo = (currentTuningPos >> CubicSpline.SPLINE_FRACSHIFT) & CubicSpline.SPLINE_FRACMASK;
final long v1 = (((currentSamplePos-1)<0)?0L: (long)CubicSpline.lut[poslo ]*(long)sample[currentSamplePos-1]) +
... | [
"private",
"int",
"getCubicInterpolated",
"(",
"final",
"int",
"currentSamplePos",
",",
"final",
"int",
"currentTuningPos",
")",
"{",
"final",
"int",
"poslo",
"=",
"(",
"currentTuningPos",
">>",
"CubicSpline",
".",
"SPLINE_FRACSHIFT",
")",
"&",
"CubicSpline",
".",... | does cubic interpolation with the next sample
@since 06.06.2006
@param currentTuningPos
@return | [
"does",
"cubic",
"interpolation",
"with",
"the",
"next",
"sample"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java#L150-L160 |
150,804 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java | Sample.getFIRInterpolated | private int getFIRInterpolated(final int currentSamplePos, final int currentTuningPos)
{
final int poslo = currentTuningPos & WindowedFIR.WFIR_POSFRACMASK;
final int firidx = ((poslo+WindowedFIR.WFIR_FRACHALVE)>>WindowedFIR.WFIR_FRACSHIFT) & WindowedFIR.WFIR_FRACMASK;
final long v1 = (((currentSamplePos-3)<0)?... | java | private int getFIRInterpolated(final int currentSamplePos, final int currentTuningPos)
{
final int poslo = currentTuningPos & WindowedFIR.WFIR_POSFRACMASK;
final int firidx = ((poslo+WindowedFIR.WFIR_FRACHALVE)>>WindowedFIR.WFIR_FRACSHIFT) & WindowedFIR.WFIR_FRACMASK;
final long v1 = (((currentSamplePos-3)<0)?... | [
"private",
"int",
"getFIRInterpolated",
"(",
"final",
"int",
"currentSamplePos",
",",
"final",
"int",
"currentTuningPos",
")",
"{",
"final",
"int",
"poslo",
"=",
"currentTuningPos",
"&",
"WindowedFIR",
".",
"WFIR_POSFRACMASK",
";",
"final",
"int",
"firidx",
"=",
... | does a windowed fir interploation with the next sample
@since 15.06.2006
@param currentTuningPos
@return | [
"does",
"a",
"windowed",
"fir",
"interploation",
"with",
"the",
"next",
"sample"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java#L167-L180 |
150,805 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/TurnArray.java | TurnArray.contains | @Override
public synchronized boolean contains(Object o) {
if (start == end) return false; // empty
if (end == -1) {
// full
for (int i = array.length - 1; i >= 0; --i)
if (array[i].equals(o))
return true;
return false;
}
if (end < start) {
for (int i = array.length - 1; i >= st... | java | @Override
public synchronized boolean contains(Object o) {
if (start == end) return false; // empty
if (end == -1) {
// full
for (int i = array.length - 1; i >= 0; --i)
if (array[i].equals(o))
return true;
return false;
}
if (end < start) {
for (int i = array.length - 1; i >= st... | [
"@",
"Override",
"public",
"synchronized",
"boolean",
"contains",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"start",
"==",
"end",
")",
"return",
"false",
";",
"// empty\r",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"{",
"// full\r",
"for",
"(",
"int",
"i... | other operation which may cost | [
"other",
"operation",
"which",
"may",
"cost"
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/TurnArray.java#L370-L393 |
150,806 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/TurnArray.java | TurnArray.removeAny | public synchronized boolean removeAny(Object element) {
if (end == start) return false;
if (end == -1) {
for (int i = array.length - 1; i >= 0; --i)
if (array[i].equals(element)) {
removeAt(i);
return true;
}
return false;
}
if (end < start) {
for (int i = array.length - 1;... | java | public synchronized boolean removeAny(Object element) {
if (end == start) return false;
if (end == -1) {
for (int i = array.length - 1; i >= 0; --i)
if (array[i].equals(element)) {
removeAt(i);
return true;
}
return false;
}
if (end < start) {
for (int i = array.length - 1;... | [
"public",
"synchronized",
"boolean",
"removeAny",
"(",
"Object",
"element",
")",
"{",
"if",
"(",
"end",
"==",
"start",
")",
"return",
"false",
";",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"array",
".",
"length",
"-"... | remove this element, not necessarily the first or last occurrence. | [
"remove",
"this",
"element",
"not",
"necessarily",
"the",
"first",
"or",
"last",
"occurrence",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/TurnArray.java#L403-L432 |
150,807 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/TurnArray.java | TurnArray.removeInstance | public synchronized boolean removeInstance(T element) {
if (end == start) return false;
if (end == -1) {
for (int i = array.length - 1; i >= 0; --i)
if (array[i] == element) {
removeAt(i);
return true;
}
return false;
}
if (end < start) {
for (int i = array.length - 1; i >=... | java | public synchronized boolean removeInstance(T element) {
if (end == start) return false;
if (end == -1) {
for (int i = array.length - 1; i >= 0; --i)
if (array[i] == element) {
removeAt(i);
return true;
}
return false;
}
if (end < start) {
for (int i = array.length - 1; i >=... | [
"public",
"synchronized",
"boolean",
"removeInstance",
"(",
"T",
"element",
")",
"{",
"if",
"(",
"end",
"==",
"start",
")",
"return",
"false",
";",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"array",
".",
"length",
"-"... | Remove the given instance. | [
"Remove",
"the",
"given",
"instance",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/TurnArray.java#L509-L538 |
150,808 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/TurnArray.java | TurnArray.removeAllNoOrder | @SuppressWarnings("unchecked")
public synchronized List<T> removeAllNoOrder() {
if (end == -1) {
List<Object> a = Arrays.asList(array);
array = new Object[array.length];
start = end = 0;
return (List<T>)a;
}
if (start == end) return Collections.EMPTY_LIST;
if (end > start) {
Object[] a... | java | @SuppressWarnings("unchecked")
public synchronized List<T> removeAllNoOrder() {
if (end == -1) {
List<Object> a = Arrays.asList(array);
array = new Object[array.length];
start = end = 0;
return (List<T>)a;
}
if (start == end) return Collections.EMPTY_LIST;
if (end > start) {
Object[] a... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"synchronized",
"List",
"<",
"T",
">",
"removeAllNoOrder",
"(",
")",
"{",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"{",
"List",
"<",
"Object",
">",
"a",
"=",
"Arrays",
".",
"asList",
"(",
"a... | Remove all elements and return them, but the returned list is not ordered.
The reason it is not ordered is for performance, when the order is not important. | [
"Remove",
"all",
"elements",
"and",
"return",
"them",
"but",
"the",
"returned",
"list",
"is",
"not",
"ordered",
".",
"The",
"reason",
"it",
"is",
"not",
"ordered",
"is",
"for",
"performance",
"when",
"the",
"order",
"is",
"not",
"important",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/TurnArray.java#L707-L730 |
150,809 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.createFileFilter | private void createFileFilter()
{
HashMap<String, String[]> extensionMap = MultimediaContainerManager.getSupportedFileExtensionsPerContainer();
ArrayList<FileFilter> chooserFilterArray = new ArrayList<FileFilter>(extensionMap.size() + 1);
// add all single file extensions grouped by container
Set<String> c... | java | private void createFileFilter()
{
HashMap<String, String[]> extensionMap = MultimediaContainerManager.getSupportedFileExtensionsPerContainer();
ArrayList<FileFilter> chooserFilterArray = new ArrayList<FileFilter>(extensionMap.size() + 1);
// add all single file extensions grouped by container
Set<String> c... | [
"private",
"void",
"createFileFilter",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"String",
"[",
"]",
">",
"extensionMap",
"=",
"MultimediaContainerManager",
".",
"getSupportedFileExtensionsPerContainer",
"(",
")",
";",
"ArrayList",
"<",
"FileFilter",
">",
"cho... | Create the file filters so that we do have them for
the dialogs
@since 05.01.2008 | [
"Create",
"the",
"file",
"filters",
"so",
"that",
"we",
"do",
"have",
"them",
"for",
"the",
"dialogs"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L548-L589 |
150,810 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.initialize | private void initialize()
{
Log.addLogListener(new LogMessageCallBack()
{
@Override
public void debug(String message)
{
showMessage(message);
}
@Override
public void info(String message)
{
showMessage(message);
}
@Override
public void error(String message, Throwable ex)
{
... | java | private void initialize()
{
Log.addLogListener(new LogMessageCallBack()
{
@Override
public void debug(String message)
{
showMessage(message);
}
@Override
public void info(String message)
{
showMessage(message);
}
@Override
public void error(String message, Throwable ex)
{
... | [
"private",
"void",
"initialize",
"(",
")",
"{",
"Log",
".",
"addLogListener",
"(",
"new",
"LogMessageCallBack",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"debug",
"(",
"String",
"message",
")",
"{",
"showMessage",
"(",
"message",
")",
";",
"}",
"... | Do main initials
@since 22.06.2006 | [
"Do",
"main",
"initials"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L594-L691 |
150,811 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.setLookAndFeel | private void setLookAndFeel(String lookAndFeelClassName)
{
try
{
javax.swing.UIManager.setLookAndFeel(lookAndFeelClassName);
}
catch (Throwable e)
{
showMessage("The selected Look&Feel is not supported or not reachable through the classpath. Switching to system default...");
try
... | java | private void setLookAndFeel(String lookAndFeelClassName)
{
try
{
javax.swing.UIManager.setLookAndFeel(lookAndFeelClassName);
}
catch (Throwable e)
{
showMessage("The selected Look&Feel is not supported or not reachable through the classpath. Switching to system default...");
try
... | [
"private",
"void",
"setLookAndFeel",
"(",
"String",
"lookAndFeelClassName",
")",
"{",
"try",
"{",
"javax",
".",
"swing",
".",
"UIManager",
".",
"setLookAndFeel",
"(",
"lookAndFeelClassName",
")",
";",
"}",
"catch",
"(",
"Throwable",
"e",
")",
"{",
"showMessage... | set the selected look and feel
@since 01.07.2006
@param lookAndFeelClassName
@return | [
"set",
"the",
"selected",
"look",
"and",
"feel"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L745-L764 |
150,812 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.updateLookAndFeel | private void updateLookAndFeel(String lookAndFeelClassName)
{
setLookAndFeel(lookAndFeelClassName);
MultimediaContainerManager.updateLookAndFeel();
SwingUtilities.updateComponentTreeUI(this); pack();
for (Window window : windows)
{
SwingUtilities.updateComponentTreeUI(window); window.pack();
... | java | private void updateLookAndFeel(String lookAndFeelClassName)
{
setLookAndFeel(lookAndFeelClassName);
MultimediaContainerManager.updateLookAndFeel();
SwingUtilities.updateComponentTreeUI(this); pack();
for (Window window : windows)
{
SwingUtilities.updateComponentTreeUI(window); window.pack();
... | [
"private",
"void",
"updateLookAndFeel",
"(",
"String",
"lookAndFeelClassName",
")",
"{",
"setLookAndFeel",
"(",
"lookAndFeelClassName",
")",
";",
"MultimediaContainerManager",
".",
"updateLookAndFeel",
"(",
")",
";",
"SwingUtilities",
".",
"updateComponentTreeUI",
"(",
... | Changes the look and feel to the new ClassName
@since 22.06.2006
@param lookAndFeelClassName
@return | [
"Changes",
"the",
"look",
"and",
"feel",
"to",
"the",
"new",
"ClassName"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L771-L780 |
150,813 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.doClose | private void doClose()
{
// set visible, if system tray active and frame is iconified
if (useSystemTray && (getExtendedState()&ICONIFIED)!=0) setVisible(true);
doStopPlaying();
getSeekBarPanel().pauseThread();
getVULMeterPanel().pauseThread();
getVURMeterPanel().pauseThread();
getSALMeterPanel().pause... | java | private void doClose()
{
// set visible, if system tray active and frame is iconified
if (useSystemTray && (getExtendedState()&ICONIFIED)!=0) setVisible(true);
doStopPlaying();
getSeekBarPanel().pauseThread();
getVULMeterPanel().pauseThread();
getVURMeterPanel().pauseThread();
getSALMeterPanel().pause... | [
"private",
"void",
"doClose",
"(",
")",
"{",
"// set visible, if system tray active and frame is iconified",
"if",
"(",
"useSystemTray",
"&&",
"(",
"getExtendedState",
"(",
")",
"&",
"ICONIFIED",
")",
"!=",
"0",
")",
"setVisible",
"(",
"true",
")",
";",
"doStopPla... | Default Close Operation
@since 22.06.2006 | [
"Default",
"Close",
"Operation"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L2065-L2093 |
150,814 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.doOpenFile | public void doOpenFile(File[] files)
{
if (files!=null)
{
if (files.length==1)
{
File f = files[0];
if (f.isFile())
{
String modFileName = f.getAbsolutePath();
int i = modFileName.lastIndexOf(File.separatorChar);
searchPath = modFileName.substring(0, i... | java | public void doOpenFile(File[] files)
{
if (files!=null)
{
if (files.length==1)
{
File f = files[0];
if (f.isFile())
{
String modFileName = f.getAbsolutePath();
int i = modFileName.lastIndexOf(File.separatorChar);
searchPath = modFileName.substring(0, i... | [
"public",
"void",
"doOpenFile",
"(",
"File",
"[",
"]",
"files",
")",
"{",
"if",
"(",
"files",
"!=",
"null",
")",
"{",
"if",
"(",
"files",
".",
"length",
"==",
"1",
")",
"{",
"File",
"f",
"=",
"files",
"[",
"0",
"]",
";",
"if",
"(",
"f",
".",
... | Open a new File
@since 22.06.2006 | [
"Open",
"a",
"new",
"File"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L2108-L2133 |
150,815 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.doExportToWave | private void doExportToWave()
{
doStopPlaying();
if (currentContainer==null)
{
JOptionPane.showMessageDialog(this, "You need to load a file first!", "Ups!", JOptionPane.ERROR_MESSAGE);
}
else
{
do
{
String fileName = Helpers.createLocalFileStringFromURL(currentContainer... | java | private void doExportToWave()
{
doStopPlaying();
if (currentContainer==null)
{
JOptionPane.showMessageDialog(this, "You need to load a file first!", "Ups!", JOptionPane.ERROR_MESSAGE);
}
else
{
do
{
String fileName = Helpers.createLocalFileStringFromURL(currentContainer... | [
"private",
"void",
"doExportToWave",
"(",
")",
"{",
"doStopPlaying",
"(",
")",
";",
"if",
"(",
"currentContainer",
"==",
"null",
")",
"{",
"JOptionPane",
".",
"showMessageDialog",
"(",
"this",
",",
"\"You need to load a file first!\"",
",",
"\"Ups!\"",
",",
"JOp... | Exports to a Wavefile
@since 01.07.2006 | [
"Exports",
"to",
"a",
"Wavefile"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L2159-L2211 |
150,816 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.doStopPlaying | private void doStopPlaying()
{
if (playerThread!=null)
{
playerThread.stopMod();
getSoundOutputStream().closeAllDevices();
playerThread = null;
removeMixer();
}
} | java | private void doStopPlaying()
{
if (playerThread!=null)
{
playerThread.stopMod();
getSoundOutputStream().closeAllDevices();
playerThread = null;
removeMixer();
}
} | [
"private",
"void",
"doStopPlaying",
"(",
")",
"{",
"if",
"(",
"playerThread",
"!=",
"null",
")",
"{",
"playerThread",
".",
"stopMod",
"(",
")",
";",
"getSoundOutputStream",
"(",
")",
".",
"closeAllDevices",
"(",
")",
";",
"playerThread",
"=",
"null",
";",
... | stop playback of a mod
@since 01.07.2006 | [
"stop",
"playback",
"of",
"a",
"mod"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L2354-L2363 |
150,817 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/gui/MainForm.java | MainForm.showMessage | private synchronized void showMessage(final String msg)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
getMessages().setText(msg);
}
});
} | java | private synchronized void showMessage(final String msg)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
getMessages().setText(msg);
}
});
} | [
"private",
"synchronized",
"void",
"showMessage",
"(",
"final",
"String",
"msg",
")",
"{",
"SwingUtilities",
".",
"invokeLater",
"(",
"new",
"Runnable",
"(",
")",
"{",
"public",
"void",
"run",
"(",
")",
"{",
"getMessages",
"(",
")",
".",
"setText",
"(",
... | Shows the given Message
@since 22.06.2006
@param msg | [
"Shows",
"the",
"given",
"Message"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/gui/MainForm.java#L2559-L2568 |
150,818 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java | Threading.registerResource | public static void registerResource(Object resource, TaskManager tm) {
if (resource == null) return;
synchronized (resources) {
resources.put(resource, tm);
}
} | java | public static void registerResource(Object resource, TaskManager tm) {
if (resource == null) return;
synchronized (resources) {
resources.put(resource, tm);
}
} | [
"public",
"static",
"void",
"registerResource",
"(",
"Object",
"resource",
",",
"TaskManager",
"tm",
")",
"{",
"if",
"(",
"resource",
"==",
"null",
")",
"return",
";",
"synchronized",
"(",
"resources",
")",
"{",
"resources",
".",
"put",
"(",
"resource",
",... | Register a resource. | [
"Register",
"a",
"resource",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java#L159-L164 |
150,819 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java | Threading.unregisterResource | public static TaskManager unregisterResource(Object resource) {
if (resource == null) return null;
synchronized (resources) {
return resources.remove(resource);
}
} | java | public static TaskManager unregisterResource(Object resource) {
if (resource == null) return null;
synchronized (resources) {
return resources.remove(resource);
}
} | [
"public",
"static",
"TaskManager",
"unregisterResource",
"(",
"Object",
"resource",
")",
"{",
"if",
"(",
"resource",
"==",
"null",
")",
"return",
"null",
";",
"synchronized",
"(",
"resources",
")",
"{",
"return",
"resources",
".",
"remove",
"(",
"resource",
... | Unregister a resource. | [
"Unregister",
"a",
"resource",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java#L167-L172 |
150,820 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java | Threading.registerBlockedThreadHandler | public static void registerBlockedThreadHandler(BlockedThreadHandler handler, Thread thread) {
synchronized (blockedHandlers) {
blockedHandlers.put(thread, handler);
}
} | java | public static void registerBlockedThreadHandler(BlockedThreadHandler handler, Thread thread) {
synchronized (blockedHandlers) {
blockedHandlers.put(thread, handler);
}
} | [
"public",
"static",
"void",
"registerBlockedThreadHandler",
"(",
"BlockedThreadHandler",
"handler",
",",
"Thread",
"thread",
")",
"{",
"synchronized",
"(",
"blockedHandlers",
")",
"{",
"blockedHandlers",
".",
"put",
"(",
"thread",
",",
"handler",
")",
";",
"}",
... | Rregister the given thread. | [
"Rregister",
"the",
"given",
"thread",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java#L189-L193 |
150,821 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java | Threading.waitFinished | public static void waitFinished(Collection<? extends Task<?,?>> tasks) throws Exception {
for (Task<?,?> t : tasks) {
t.getOutput().blockThrow(0);
}
} | java | public static void waitFinished(Collection<? extends Task<?,?>> tasks) throws Exception {
for (Task<?,?> t : tasks) {
t.getOutput().blockThrow(0);
}
} | [
"public",
"static",
"void",
"waitFinished",
"(",
"Collection",
"<",
"?",
"extends",
"Task",
"<",
"?",
",",
"?",
">",
">",
"tasks",
")",
"throws",
"Exception",
"{",
"for",
"(",
"Task",
"<",
"?",
",",
"?",
">",
"t",
":",
"tasks",
")",
"{",
"t",
"."... | Wait for the given tasks to be done. | [
"Wait",
"for",
"the",
"given",
"tasks",
"to",
"be",
"done",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java#L208-L212 |
150,822 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java | Threading.waitUnblockedWithError | public static <TError extends Exception> void waitUnblockedWithError(Collection<AsyncWork<?,TError>> tasks) throws TError, CancelException {
for (AsyncWork<?,TError> t : tasks)
t.blockResult(0);
} | java | public static <TError extends Exception> void waitUnblockedWithError(Collection<AsyncWork<?,TError>> tasks) throws TError, CancelException {
for (AsyncWork<?,TError> t : tasks)
t.blockResult(0);
} | [
"public",
"static",
"<",
"TError",
"extends",
"Exception",
">",
"void",
"waitUnblockedWithError",
"(",
"Collection",
"<",
"AsyncWork",
"<",
"?",
",",
"TError",
">",
">",
"tasks",
")",
"throws",
"TError",
",",
"CancelException",
"{",
"for",
"(",
"AsyncWork",
... | Wait for the given tasks to finish, if one has an error this error is immediately thrown without waiting for other tasks. | [
"Wait",
"for",
"the",
"given",
"tasks",
"to",
"finish",
"if",
"one",
"has",
"an",
"error",
"this",
"error",
"is",
"immediately",
"thrown",
"without",
"waiting",
"for",
"other",
"tasks",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java#L215-L218 |
150,823 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java | Threading.waitOneFinished | public static void waitOneFinished(List<? extends Task<?,?>> tasks) {
if (tasks.isEmpty()) return;
if (tasks.size() == 1)
try { tasks.get(0).getOutput().block(0); }
catch (Throwable e) { /* ignore */ }
SynchronizationPoint<Exception> sp = new SynchronizationPoint<>();
for (Task<?,?> t : tasks) {
... | java | public static void waitOneFinished(List<? extends Task<?,?>> tasks) {
if (tasks.isEmpty()) return;
if (tasks.size() == 1)
try { tasks.get(0).getOutput().block(0); }
catch (Throwable e) { /* ignore */ }
SynchronizationPoint<Exception> sp = new SynchronizationPoint<>();
for (Task<?,?> t : tasks) {
... | [
"public",
"static",
"void",
"waitOneFinished",
"(",
"List",
"<",
"?",
"extends",
"Task",
"<",
"?",
",",
"?",
">",
">",
"tasks",
")",
"{",
"if",
"(",
"tasks",
".",
"isEmpty",
"(",
")",
")",
"return",
";",
"if",
"(",
"tasks",
".",
"size",
"(",
")",... | Wait for one of the given task to be done. | [
"Wait",
"for",
"one",
"of",
"the",
"given",
"task",
"to",
"be",
"done",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java#L221-L232 |
150,824 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java | Threading.debug | public static String debug() {
StringBuilder s = new StringBuilder();
for (TaskManager tm : resources.values())
tm.debug(s);
return s.toString();
} | java | public static String debug() {
StringBuilder s = new StringBuilder();
for (TaskManager tm : resources.values())
tm.debug(s);
return s.toString();
} | [
"public",
"static",
"String",
"debug",
"(",
")",
"{",
"StringBuilder",
"s",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"TaskManager",
"tm",
":",
"resources",
".",
"values",
"(",
")",
")",
"tm",
".",
"debug",
"(",
"s",
")",
";",
"return",... | Return a string containing multi-threading status for debugging purposes. | [
"Return",
"a",
"string",
"containing",
"multi",
"-",
"threading",
"status",
"for",
"debugging",
"purposes",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/Threading.java#L235-L240 |
150,825 | jtrfp/javamod | src/main/java/de/quippy/jflac/frame/Frame.java | Frame.getMaxRicePartitionOrderFromBlocksize | public static int getMaxRicePartitionOrderFromBlocksize(int blocksize) {
int maxRicePartitionOrder = 0;
while ((blocksize & 1) == 0) {
maxRicePartitionOrder++;
blocksize >>= 1;
}
return Math.min(Constants.MAX_RICE_PARTITION_ORDER, maxRicePartitionOrder);
} | java | public static int getMaxRicePartitionOrderFromBlocksize(int blocksize) {
int maxRicePartitionOrder = 0;
while ((blocksize & 1) == 0) {
maxRicePartitionOrder++;
blocksize >>= 1;
}
return Math.min(Constants.MAX_RICE_PARTITION_ORDER, maxRicePartitionOrder);
} | [
"public",
"static",
"int",
"getMaxRicePartitionOrderFromBlocksize",
"(",
"int",
"blocksize",
")",
"{",
"int",
"maxRicePartitionOrder",
"=",
"0",
";",
"while",
"(",
"(",
"blocksize",
"&",
"1",
")",
"==",
"0",
")",
"{",
"maxRicePartitionOrder",
"++",
";",
"block... | Return the maximum Rice partition order based on the block size.
@param blocksize The block size
@return The maximum Rice partition order | [
"Return",
"the",
"maximum",
"Rice",
"partition",
"order",
"based",
"on",
"the",
"block",
"size",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/frame/Frame.java#L59-L66 |
150,826 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/CommandLine.java | CommandLine.showHelp | private static void showHelp()
{
Log.info("java -jar ./javamod [-rx] [-b{8,16,24}] [-s{+,-}] [-i{+,-}] [-w{+,-}] [-n{+,-}] [-m{+,-}] [-l{+,-}] [-h{+,-}] [-j{+,-}] [-v0.0-1.0]");
Log.info(" [-eWAVFILE] MODFILE\n");
Log.info("-rx : use Samplerate x (8000/11025/22050/44100/96000...");
Lo... | java | private static void showHelp()
{
Log.info("java -jar ./javamod [-rx] [-b{8,16,24}] [-s{+,-}] [-i{+,-}] [-w{+,-}] [-n{+,-}] [-m{+,-}] [-l{+,-}] [-h{+,-}] [-j{+,-}] [-v0.0-1.0]");
Log.info(" [-eWAVFILE] MODFILE\n");
Log.info("-rx : use Samplerate x (8000/11025/22050/44100/96000...");
Lo... | [
"private",
"static",
"void",
"showHelp",
"(",
")",
"{",
"Log",
".",
"info",
"(",
"\"java -jar ./javamod [-rx] [-b{8,16,24}] [-s{+,-}] [-i{+,-}] [-w{+,-}] [-n{+,-}] [-m{+,-}] [-l{+,-}] [-h{+,-}] [-j{+,-}] [-v0.0-1.0]\"",
")",
";",
"Log",
".",
"info",
"(",
"\" [-... | Show a help screen... | [
"Show",
"a",
"help",
"screen",
"..."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/CommandLine.java#L74-L92 |
150,827 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/CommandLine.java | CommandLine.doStartPlaying | private void doStartPlaying()
{
if (currentContainer!=null)
{
doStopPlaying();
if (currentContainer instanceof ModContainer)
{
System.out.println(((ModContainer) currentContainer).getCurrentMod().toString());
}
Mixer mixer = createNewMixer();
mixer.setExportFile(wavFileName);
playerThread ... | java | private void doStartPlaying()
{
if (currentContainer!=null)
{
doStopPlaying();
if (currentContainer instanceof ModContainer)
{
System.out.println(((ModContainer) currentContainer).getCurrentMod().toString());
}
Mixer mixer = createNewMixer();
mixer.setExportFile(wavFileName);
playerThread ... | [
"private",
"void",
"doStartPlaying",
"(",
")",
"{",
"if",
"(",
"currentContainer",
"!=",
"null",
")",
"{",
"doStopPlaying",
"(",
")",
";",
"if",
"(",
"currentContainer",
"instanceof",
"ModContainer",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"("... | Plays the modfile with the current
parameters set | [
"Plays",
"the",
"modfile",
"with",
"the",
"current",
"parameters",
"set"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/CommandLine.java#L195-L209 |
150,828 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/menu/MenuList.java | MenuList.add | public Menu add(Menu m) {
submenus.add(m);
m.setParent(this);
return m;
} | java | public Menu add(Menu m) {
submenus.add(m);
m.setParent(this);
return m;
} | [
"public",
"Menu",
"add",
"(",
"Menu",
"m",
")",
"{",
"submenus",
".",
"add",
"(",
"m",
")",
";",
"m",
".",
"setParent",
"(",
"this",
")",
";",
"return",
"m",
";",
"}"
] | Add the given menu to the submenu list
@param m The submenu to add
@return The same added menu. | [
"Add",
"the",
"given",
"menu",
"to",
"the",
"submenu",
"list"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/menu/MenuList.java#L24-L28 |
150,829 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/event/ListenableLongProperty.java | ListenableLongProperty.set | public void set(long value) {
if (this.value == value) return;
long previous = this.value;
this.value = value;
event.fire(Long.valueOf(previous));
} | java | public void set(long value) {
if (this.value == value) return;
long previous = this.value;
this.value = value;
event.fire(Long.valueOf(previous));
} | [
"public",
"void",
"set",
"(",
"long",
"value",
")",
"{",
"if",
"(",
"this",
".",
"value",
"==",
"value",
")",
"return",
";",
"long",
"previous",
"=",
"this",
".",
"value",
";",
"this",
".",
"value",
"=",
"value",
";",
"event",
".",
"fire",
"(",
"... | Set a new value. | [
"Set",
"a",
"new",
"value",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/event/ListenableLongProperty.java#L25-L30 |
150,830 | PistoiaHELM/ChemistryToolkit | src/main/java/org/helm/chemtoolkit/AbstractChemistryManipulator.java | AbstractChemistryManipulator.convertExtendedSmiles | public String convertExtendedSmiles(String data){
if(data != null){
Pattern pattern = Pattern.compile("\\[\\*\\]|\\*");
Matcher matcher = pattern.matcher(data);
if(matcher != null){
String smiles = data.split("\\|")[0];
List<Integer> rgroupInformation = extractRgroups(data);
StringBu... | java | public String convertExtendedSmiles(String data){
if(data != null){
Pattern pattern = Pattern.compile("\\[\\*\\]|\\*");
Matcher matcher = pattern.matcher(data);
if(matcher != null){
String smiles = data.split("\\|")[0];
List<Integer> rgroupInformation = extractRgroups(data);
StringBu... | [
"public",
"String",
"convertExtendedSmiles",
"(",
"String",
"data",
")",
"{",
"if",
"(",
"data",
"!=",
"null",
")",
"{",
"Pattern",
"pattern",
"=",
"Pattern",
".",
"compile",
"(",
"\"\\\\[\\\\*\\\\]|\\\\*\"",
")",
";",
"Matcher",
"matcher",
"=",
"pattern",
"... | convert extended smiles format to smiles with atom mappings
@param data chemical notation to convert
@return chemical notation | [
"convert",
"extended",
"smiles",
"format",
"to",
"smiles",
"with",
"atom",
"mappings"
] | f8969865b3e9d4dd796ff3e536613a96d69a395d | https://github.com/PistoiaHELM/ChemistryToolkit/blob/f8969865b3e9d4dd796ff3e536613a96d69a395d/src/main/java/org/helm/chemtoolkit/AbstractChemistryManipulator.java#L103-L128 |
150,831 | PistoiaHELM/ChemistryToolkit | src/main/java/org/helm/chemtoolkit/AbstractChemistryManipulator.java | AbstractChemistryManipulator.extractRgroups | private List<Integer> extractRgroups(String data){
Pattern pattern = Pattern.compile("R[1-9]\\d*");
Matcher matcher = pattern.matcher(data);
List<Integer> listValues = new ArrayList<Integer>();
while(matcher.find()){
listValues.add(Integer.parseInt(matcher.group().split("R")[1]));
}
re... | java | private List<Integer> extractRgroups(String data){
Pattern pattern = Pattern.compile("R[1-9]\\d*");
Matcher matcher = pattern.matcher(data);
List<Integer> listValues = new ArrayList<Integer>();
while(matcher.find()){
listValues.add(Integer.parseInt(matcher.group().split("R")[1]));
}
re... | [
"private",
"List",
"<",
"Integer",
">",
"extractRgroups",
"(",
"String",
"data",
")",
"{",
"Pattern",
"pattern",
"=",
"Pattern",
".",
"compile",
"(",
"\"R[1-9]\\\\d*\"",
")",
";",
"Matcher",
"matcher",
"=",
"pattern",
".",
"matcher",
"(",
"data",
")",
";",... | extract Rgroups from extended smiles
@param data extended smiles
@return List of Rgroups | [
"extract",
"Rgroups",
"from",
"extended",
"smiles"
] | f8969865b3e9d4dd796ff3e536613a96d69a395d | https://github.com/PistoiaHELM/ChemistryToolkit/blob/f8969865b3e9d4dd796ff3e536613a96d69a395d/src/main/java/org/helm/chemtoolkit/AbstractChemistryManipulator.java#L136-L145 |
150,832 | PistoiaHELM/ChemistryToolkit | src/main/java/org/helm/chemtoolkit/AbstractChemistryManipulator.java | AbstractChemistryManipulator.merge | public AbstractMolecule merge(AbstractMolecule firstContainer, IAtomBase firstRgroup,
AbstractMolecule secondContainer,
IAtomBase secondRgroup) throws CTKException {
if (firstContainer.isSingleStereo(firstRgroup) && secondContainer.isSingleStereo(secondRgroup)) {
throw new CTKException("Both... | java | public AbstractMolecule merge(AbstractMolecule firstContainer, IAtomBase firstRgroup,
AbstractMolecule secondContainer,
IAtomBase secondRgroup) throws CTKException {
if (firstContainer.isSingleStereo(firstRgroup) && secondContainer.isSingleStereo(secondRgroup)) {
throw new CTKException("Both... | [
"public",
"AbstractMolecule",
"merge",
"(",
"AbstractMolecule",
"firstContainer",
",",
"IAtomBase",
"firstRgroup",
",",
"AbstractMolecule",
"secondContainer",
",",
"IAtomBase",
"secondRgroup",
")",
"throws",
"CTKException",
"{",
"if",
"(",
"firstContainer",
".",
"isSing... | merges second molecule to first using given rGroups
@param firstContainer a first molecule to merge instance of {@link AbstractMolecule}
@param firstRgroup atom of first molecule to be removed, the connected atom is used for merging, instance of
{@link IAtomBase}
@param secondContainer a second molecule to merge, inst... | [
"merges",
"second",
"molecule",
"to",
"first",
"using",
"given",
"rGroups"
] | f8969865b3e9d4dd796ff3e536613a96d69a395d | https://github.com/PistoiaHELM/ChemistryToolkit/blob/f8969865b3e9d4dd796ff3e536613a96d69a395d/src/main/java/org/helm/chemtoolkit/AbstractChemistryManipulator.java#L227-L269 |
150,833 | PistoiaHELM/ChemistryToolkit | src/main/java/org/helm/chemtoolkit/AbstractChemistryManipulator.java | AbstractChemistryManipulator.setStereoInformation | protected boolean setStereoInformation(AbstractMolecule firstContainer, IAtomBase firstRgroup,
AbstractMolecule secondContainer, IAtomBase secondRgroup, IAtomBase atom1, IAtomBase atom2) throws CTKException {
IStereoElementBase stereo = null;
boolean result = false;
if (firstContainer.isSingleSter... | java | protected boolean setStereoInformation(AbstractMolecule firstContainer, IAtomBase firstRgroup,
AbstractMolecule secondContainer, IAtomBase secondRgroup, IAtomBase atom1, IAtomBase atom2) throws CTKException {
IStereoElementBase stereo = null;
boolean result = false;
if (firstContainer.isSingleSter... | [
"protected",
"boolean",
"setStereoInformation",
"(",
"AbstractMolecule",
"firstContainer",
",",
"IAtomBase",
"firstRgroup",
",",
"AbstractMolecule",
"secondContainer",
",",
"IAtomBase",
"secondRgroup",
",",
"IAtomBase",
"atom1",
",",
"IAtomBase",
"atom2",
")",
"throws",
... | recycles and set stereo information on firstContaner
@param firstContainer a first molecule instance of {@link AbstractMolecule}
@param firstRgroup atom to remove, instance of {@link IAtomBase}
@param secondContainer a second molecule, instance of {@link AbstractMolecule}
@param secondRgroup atom to remove, instance o... | [
"recycles",
"and",
"set",
"stereo",
"information",
"on",
"firstContaner"
] | f8969865b3e9d4dd796ff3e536613a96d69a395d | https://github.com/PistoiaHELM/ChemistryToolkit/blob/f8969865b3e9d4dd796ff3e536613a96d69a395d/src/main/java/org/helm/chemtoolkit/AbstractChemistryManipulator.java#L283-L302 |
150,834 | jtrfp/javamod | src/main/java/de/quippy/mp3/decoder/Obuffer.java | Obuffer.appendSamples | public void appendSamples(int channel, float[] f)
{
for (int i = 0; i < 32;)
{
final float fs = f[i++];
append(channel, (short) (fs > 32767.0f ? 32767.0f : (fs < -32768.0f ? -32768.0f : fs)));
}
} | java | public void appendSamples(int channel, float[] f)
{
for (int i = 0; i < 32;)
{
final float fs = f[i++];
append(channel, (short) (fs > 32767.0f ? 32767.0f : (fs < -32768.0f ? -32768.0f : fs)));
}
} | [
"public",
"void",
"appendSamples",
"(",
"int",
"channel",
",",
"float",
"[",
"]",
"f",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"32",
";",
")",
"{",
"final",
"float",
"fs",
"=",
"f",
"[",
"i",
"++",
"]",
";",
"append",
"(",
... | Accepts 32 new PCM samples. | [
"Accepts",
"32",
"new",
"PCM",
"samples",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/Obuffer.java#L53-L60 |
150,835 | livetribe/livetribe-slp | core/src/main/java/org/livetribe/slp/Scopes.java | Scopes.from | public static Scopes from(String... scopes)
{
if (scopes == null || scopes.length == 0) return NONE;
return new Scopes(scopes, true);
} | java | public static Scopes from(String... scopes)
{
if (scopes == null || scopes.length == 0) return NONE;
return new Scopes(scopes, true);
} | [
"public",
"static",
"Scopes",
"from",
"(",
"String",
"...",
"scopes",
")",
"{",
"if",
"(",
"scopes",
"==",
"null",
"||",
"scopes",
".",
"length",
"==",
"0",
")",
"return",
"NONE",
";",
"return",
"new",
"Scopes",
"(",
"scopes",
",",
"true",
")",
";",
... | Creates a Scopes object from the given strings.
@param scopes the scope strings
@return a new Scope instance | [
"Creates",
"a",
"Scopes",
"object",
"from",
"the",
"given",
"strings",
"."
] | 6cc13dbe81feab133fe3dd291ca081cbc6e1f591 | https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/Scopes.java#L81-L85 |
150,836 | livetribe/livetribe-slp | core/src/main/java/org/livetribe/slp/Scopes.java | Scopes.escape | private String escape(String value)
{
StringBuilder result = new StringBuilder();
for (int i = 0; i < value.length(); ++i)
{
char c = value.charAt(i);
if (c < reservedChars.length && reservedChars[c] == c)
{
result.append(ESCAPE_PREFIX);
... | java | private String escape(String value)
{
StringBuilder result = new StringBuilder();
for (int i = 0; i < value.length(); ++i)
{
char c = value.charAt(i);
if (c < reservedChars.length && reservedChars[c] == c)
{
result.append(ESCAPE_PREFIX);
... | [
"private",
"String",
"escape",
"(",
"String",
"value",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"value",
".",
"length",
"(",
")",
";",
"++",
"i",
")",
"{",
"... | Escapes the scope string following RFC 2608, 6.4.1
@param value The scope string to escape
@return The escaped scope string
@see #unescape(String) | [
"Escapes",
"the",
"scope",
"string",
"following",
"RFC",
"2608",
"6",
".",
"4",
".",
"1"
] | 6cc13dbe81feab133fe3dd291ca081cbc6e1f591 | https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/Scopes.java#L215-L234 |
150,837 | livetribe/livetribe-slp | core/src/main/java/org/livetribe/slp/Scopes.java | Scopes.unescape | private String unescape(String value)
{
StringBuilder result = new StringBuilder();
for (int i = 0; i < value.length(); ++i)
{
char c = value.charAt(i);
if (c == ESCAPE_PREFIX)
{
String codeString = value.substring(i + 1, i + 3);
... | java | private String unescape(String value)
{
StringBuilder result = new StringBuilder();
for (int i = 0; i < value.length(); ++i)
{
char c = value.charAt(i);
if (c == ESCAPE_PREFIX)
{
String codeString = value.substring(i + 1, i + 3);
... | [
"private",
"String",
"unescape",
"(",
"String",
"value",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"value",
".",
"length",
"(",
")",
";",
"++",
"i",
")",
"{",
... | Unescapes the scope string following RFC 2608, 6.4.1
@param value The scope string to unescape
@return The unescaped scope string
@see #escape(String) | [
"Unescapes",
"the",
"scope",
"string",
"following",
"RFC",
"2608",
"6",
".",
"4",
".",
"1"
] | 6cc13dbe81feab133fe3dd291ca081cbc6e1f591 | https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/Scopes.java#L243-L269 |
150,838 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/xml/XMLWriter.java | XMLWriter.start | public ISynchronizationPoint<IOException> start(String rootNamespaceURI, String rootLocalName, Map<String, String> namespaces) {
if (includeXMLDeclaration) {
writer.write(XML_DECLARATION_START);
writer.write(output.getEncoding().name());
writer.write(XML_DECLARATION_END);
}
writer.write('<');
if... | java | public ISynchronizationPoint<IOException> start(String rootNamespaceURI, String rootLocalName, Map<String, String> namespaces) {
if (includeXMLDeclaration) {
writer.write(XML_DECLARATION_START);
writer.write(output.getEncoding().name());
writer.write(XML_DECLARATION_END);
}
writer.write('<');
if... | [
"public",
"ISynchronizationPoint",
"<",
"IOException",
">",
"start",
"(",
"String",
"rootNamespaceURI",
",",
"String",
"rootLocalName",
",",
"Map",
"<",
"String",
",",
"String",
">",
"namespaces",
")",
"{",
"if",
"(",
"includeXMLDeclaration",
")",
"{",
"writer",... | Start the document with the XML processing instruction if needed, and opening the root element.
@param rootNamespaceURI namespace of the root element
@param rootLocalName name of the root element
@param namespaces mapping from namespace URI and prefix, prefix may be empty for default namespace | [
"Start",
"the",
"document",
"with",
"the",
"XML",
"processing",
"instruction",
"if",
"needed",
"and",
"opening",
"the",
"root",
"element",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/xml/XMLWriter.java#L109-L144 |
150,839 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/xml/XMLWriter.java | XMLWriter.end | public ISynchronizationPoint<IOException> end() {
while (!context.isEmpty())
closeElement();
ISynchronizationPoint<IOException> write = writer.flush();
if (!write.isUnblocked()) {
SynchronizationPoint<IOException> sp = new SynchronizationPoint<>();
write.listenInline(() -> { output.flush().listenIn... | java | public ISynchronizationPoint<IOException> end() {
while (!context.isEmpty())
closeElement();
ISynchronizationPoint<IOException> write = writer.flush();
if (!write.isUnblocked()) {
SynchronizationPoint<IOException> sp = new SynchronizationPoint<>();
write.listenInline(() -> { output.flush().listenIn... | [
"public",
"ISynchronizationPoint",
"<",
"IOException",
">",
"end",
"(",
")",
"{",
"while",
"(",
"!",
"context",
".",
"isEmpty",
"(",
")",
")",
"closeElement",
"(",
")",
";",
"ISynchronizationPoint",
"<",
"IOException",
">",
"write",
"=",
"writer",
".",
"fl... | End the document, close any open element, and flush the output stream. | [
"End",
"the",
"document",
"close",
"any",
"open",
"element",
"and",
"flush",
"the",
"output",
"stream",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/xml/XMLWriter.java#L147-L159 |
150,840 | jtrfp/javamod | src/main/java/de/quippy/mp3/decoder/SynthesisFilter.java | SynthesisFilter.reset | public void reset()
{
// float[] floatp;
// float[] floatp2;
// initialize v1[] and v2[]:
// for (floatp = v1 + 512, floatp2 = v2 + 512; floatp > v1; )
// *--floatp = *--floatp2 = 0.0;
for (int p = 0; p < 512; p++)
v1[p] = v2[p] = 0.0f;
// initialize samples[]:
// for (floatp = samples + 32; float... | java | public void reset()
{
// float[] floatp;
// float[] floatp2;
// initialize v1[] and v2[]:
// for (floatp = v1 + 512, floatp2 = v2 + 512; floatp > v1; )
// *--floatp = *--floatp2 = 0.0;
for (int p = 0; p < 512; p++)
v1[p] = v2[p] = 0.0f;
// initialize samples[]:
// for (floatp = samples + 32; float... | [
"public",
"void",
"reset",
"(",
")",
"{",
"// float[] floatp;",
"// float[] floatp2;",
"// initialize v1[] and v2[]:",
"// for (floatp = v1 + 512, floatp2 = v2 + 512; floatp > v1; )",
"// *--floatp = *--floatp2 = 0.0;",
"for",
"(",
"int",
"p",
"=",
"0",
";",
"p",
"<",
"512",
... | Reset the synthesis filter. | [
"Reset",
"the",
"synthesis",
"filter",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/SynthesisFilter.java#L119-L138 |
150,841 | jtrfp/javamod | src/main/java/de/quippy/mp3/decoder/SynthesisFilter.java | SynthesisFilter.calculate_pcm_samples | public void calculate_pcm_samples(Obuffer buffer)
{
compute_new_v();
compute_pcm_samples(buffer);
actual_write_pos = (actual_write_pos + 1) & 0xf;
actual_v = (actual_v == v1) ? v2 : v1;
// initialize samples[]:
// for (register float *floatp = samples + 32; floatp > samples; )
// *--floatp = 0.0f;
/... | java | public void calculate_pcm_samples(Obuffer buffer)
{
compute_new_v();
compute_pcm_samples(buffer);
actual_write_pos = (actual_write_pos + 1) & 0xf;
actual_v = (actual_v == v1) ? v2 : v1;
// initialize samples[]:
// for (register float *floatp = samples + 32; floatp > samples; )
// *--floatp = 0.0f;
/... | [
"public",
"void",
"calculate_pcm_samples",
"(",
"Obuffer",
"buffer",
")",
"{",
"compute_new_v",
"(",
")",
";",
"compute_pcm_samples",
"(",
"buffer",
")",
";",
"actual_write_pos",
"=",
"(",
"actual_write_pos",
"+",
"1",
")",
"&",
"0xf",
";",
"actual_v",
"=",
... | Calculate 32 PCM samples and put the into the Obuffer-object. | [
"Calculate",
"32",
"PCM",
"samples",
"and",
"put",
"the",
"into",
"the",
"Obuffer",
"-",
"object",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/SynthesisFilter.java#L1270-L1286 |
150,842 | jtrfp/javamod | src/main/java/de/quippy/mp3/decoder/SynthesisFilter.java | SynthesisFilter.splitArray | static private float[][] splitArray(final float[] array, final int blockSize)
{
int size = array.length / blockSize;
float[][] split = new float[size][];
for (int i = 0; i < size; i++)
{
split[i] = subArray(array, i * blockSize, blockSize);
}
return split;
} | java | static private float[][] splitArray(final float[] array, final int blockSize)
{
int size = array.length / blockSize;
float[][] split = new float[size][];
for (int i = 0; i < size; i++)
{
split[i] = subArray(array, i * blockSize, blockSize);
}
return split;
} | [
"static",
"private",
"float",
"[",
"]",
"[",
"]",
"splitArray",
"(",
"final",
"float",
"[",
"]",
"array",
",",
"final",
"int",
"blockSize",
")",
"{",
"int",
"size",
"=",
"array",
".",
"length",
"/",
"blockSize",
";",
"float",
"[",
"]",
"[",
"]",
"s... | Converts a 1D array into a number of smaller arrays. This is used
to achieve offset + constant indexing into an array. Each sub-array
represents a block of values of the original array.
@param array
The array to split up into blocks.
@param blockSize
The size of the blocks to split the array
into. This must be an exac... | [
"Converts",
"a",
"1D",
"array",
"into",
"a",
"number",
"of",
"smaller",
"arrays",
".",
"This",
"is",
"used",
"to",
"achieve",
"offset",
"+",
"constant",
"indexing",
"into",
"an",
"array",
".",
"Each",
"sub",
"-",
"array",
"represents",
"a",
"block",
"of"... | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/SynthesisFilter.java#L1367-L1376 |
150,843 | jtrfp/javamod | src/main/java/de/quippy/mp3/decoder/SynthesisFilter.java | SynthesisFilter.subArray | static private float[] subArray(final float[] array, final int offs, int len)
{
if (offs + len > array.length)
{
len = array.length - offs;
}
if (len < 0) len = 0;
float[] subarray = new float[len];
for (int i = 0; i < len; i++)
{
subarray[i] = array[offs + i];
}
return subarray;
} | java | static private float[] subArray(final float[] array, final int offs, int len)
{
if (offs + len > array.length)
{
len = array.length - offs;
}
if (len < 0) len = 0;
float[] subarray = new float[len];
for (int i = 0; i < len; i++)
{
subarray[i] = array[offs + i];
}
return subarray;
} | [
"static",
"private",
"float",
"[",
"]",
"subArray",
"(",
"final",
"float",
"[",
"]",
"array",
",",
"final",
"int",
"offs",
",",
"int",
"len",
")",
"{",
"if",
"(",
"offs",
"+",
"len",
">",
"array",
".",
"length",
")",
"{",
"len",
"=",
"array",
"."... | Returns a subarray of an existing array.
@param array
The array to retrieve a subarra from.
@param offs
The offset in the array that corresponds to
the first index of the subarray.
@param len
The number of indeces in the subarray.
@return The subarray, which may be of length 0. | [
"Returns",
"a",
"subarray",
"of",
"an",
"existing",
"array",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/SynthesisFilter.java#L1390-L1406 |
150,844 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/map/MapUtil.java | MapUtil.removeValue | public static <T> void removeValue(Map<?,T> map, T value) {
ArrayList<Object> keys = new ArrayList<>();
for (Map.Entry<?,T> e : map.entrySet())
if (e.getValue().equals(value))
keys.add(e.getKey());
for (Object key : keys)
map.remove(key);
} | java | public static <T> void removeValue(Map<?,T> map, T value) {
ArrayList<Object> keys = new ArrayList<>();
for (Map.Entry<?,T> e : map.entrySet())
if (e.getValue().equals(value))
keys.add(e.getKey());
for (Object key : keys)
map.remove(key);
} | [
"public",
"static",
"<",
"T",
">",
"void",
"removeValue",
"(",
"Map",
"<",
"?",
",",
"T",
">",
"map",
",",
"T",
"value",
")",
"{",
"ArrayList",
"<",
"Object",
">",
"keys",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Map",
".",
"E... | Remove all keys associated with the given value. | [
"Remove",
"all",
"keys",
"associated",
"with",
"the",
"given",
"value",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/map/MapUtil.java#L14-L21 |
150,845 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/ApplicationConfiguration.java | ApplicationConfiguration.load | public static ApplicationConfiguration load(File file) throws Exception {
try (FileInputStream in = new FileInputStream(file)) {
return load(in);
}
} | java | public static ApplicationConfiguration load(File file) throws Exception {
try (FileInputStream in = new FileInputStream(file)) {
return load(in);
}
} | [
"public",
"static",
"ApplicationConfiguration",
"load",
"(",
"File",
"file",
")",
"throws",
"Exception",
"{",
"try",
"(",
"FileInputStream",
"in",
"=",
"new",
"FileInputStream",
"(",
"file",
")",
")",
"{",
"return",
"load",
"(",
"in",
")",
";",
"}",
"}"
] | Load the given file. | [
"Load",
"the",
"given",
"file",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/ApplicationConfiguration.java#L24-L28 |
150,846 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/ApplicationConfiguration.java | ApplicationConfiguration.load | public static ApplicationConfiguration load(InputStream input) throws Exception {
XMLStreamReader xml = XMLInputFactory.newFactory().createXMLStreamReader(input);
while (xml.hasNext()) {
xml.next();
if (xml.getEventType() == XMLStreamConstants.START_ELEMENT) {
if (!"project".equals(xml.getLocalName()... | java | public static ApplicationConfiguration load(InputStream input) throws Exception {
XMLStreamReader xml = XMLInputFactory.newFactory().createXMLStreamReader(input);
while (xml.hasNext()) {
xml.next();
if (xml.getEventType() == XMLStreamConstants.START_ELEMENT) {
if (!"project".equals(xml.getLocalName()... | [
"public",
"static",
"ApplicationConfiguration",
"load",
"(",
"InputStream",
"input",
")",
"throws",
"Exception",
"{",
"XMLStreamReader",
"xml",
"=",
"XMLInputFactory",
".",
"newFactory",
"(",
")",
".",
"createXMLStreamReader",
"(",
"input",
")",
";",
"while",
"(",... | Load from the given stream. | [
"Load",
"from",
"the",
"given",
"stream",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/ApplicationConfiguration.java#L31-L56 |
150,847 | PistoiaHELM/ChemistryToolkit | src/main/java/org/helm/chemtoolkit/AbstractMolecule.java | AbstractMolecule.removeAttachment | public void removeAttachment(IAtomBase toRemove) throws CTKException {
Map<String, IAtomBase> groups = getRgroups();
for (String key : groups.keySet()) {
if (groups.get(key).compare(toRemove)) {
for (int i = 0; i < attachments.size(); i++) {
if (attachments.get(i).getLabel().equ... | java | public void removeAttachment(IAtomBase toRemove) throws CTKException {
Map<String, IAtomBase> groups = getRgroups();
for (String key : groups.keySet()) {
if (groups.get(key).compare(toRemove)) {
for (int i = 0; i < attachments.size(); i++) {
if (attachments.get(i).getLabel().equ... | [
"public",
"void",
"removeAttachment",
"(",
"IAtomBase",
"toRemove",
")",
"throws",
"CTKException",
"{",
"Map",
"<",
"String",
",",
"IAtomBase",
">",
"groups",
"=",
"getRgroups",
"(",
")",
";",
"for",
"(",
"String",
"key",
":",
"groups",
".",
"keySet",
"(",... | removes a given attachment from molecule
@param toRemove a atom to be removed
@throws CTKException general ChemToolKit exception passed to HELMToolKit | [
"removes",
"a",
"given",
"attachment",
"from",
"molecule"
] | f8969865b3e9d4dd796ff3e536613a96d69a395d | https://github.com/PistoiaHELM/ChemistryToolkit/blob/f8969865b3e9d4dd796ff3e536613a96d69a395d/src/main/java/org/helm/chemtoolkit/AbstractMolecule.java#L136-L150 |
150,848 | mgledi/DRUMS | src/main/java/com/unister/semweb/drums/DRUMSParameterSet.java | DRUMSParameterSet.initParameters | private void initParameters() throws FileNotFoundException {
InputStream fileStream;
if (new File(parameterfile).exists()) {
logger.info("Try reading properties directly from {}.", parameterfile);
fileStream = new FileInputStream(new File(parameterfile));
} else {
... | java | private void initParameters() throws FileNotFoundException {
InputStream fileStream;
if (new File(parameterfile).exists()) {
logger.info("Try reading properties directly from {}.", parameterfile);
fileStream = new FileInputStream(new File(parameterfile));
} else {
... | [
"private",
"void",
"initParameters",
"(",
")",
"throws",
"FileNotFoundException",
"{",
"InputStream",
"fileStream",
";",
"if",
"(",
"new",
"File",
"(",
"parameterfile",
")",
".",
"exists",
"(",
")",
")",
"{",
"logger",
".",
"info",
"(",
"\"Try reading properti... | Initialises all Parameters.
@throws FileNotFoundException | [
"Initialises",
"all",
"Parameters",
"."
] | a670f17a2186c9a15725f26617d77ce8e444e072 | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/DRUMSParameterSet.java#L183-L216 |
150,849 | mgledi/DRUMS | src/main/java/com/unister/semweb/drums/DRUMSParameterSet.java | DRUMSParameterSet.configToLogInfo | public void configToLogInfo() {
logger.info("----- MEMEORY USAGE -----");
logger.info("BUCKET_MEMORY = {}", BUCKET_MEMORY);
logger.info("MEMORY_CHUNK = {}", MEMORY_CHUNK);
logger.info("MAX_MEMORY_PER_BUCKET = {}", MAX_MEMORY_PER_BUCKET);
logger.info("CHUNKSIZE = {}", SYNC_CH... | java | public void configToLogInfo() {
logger.info("----- MEMEORY USAGE -----");
logger.info("BUCKET_MEMORY = {}", BUCKET_MEMORY);
logger.info("MEMORY_CHUNK = {}", MEMORY_CHUNK);
logger.info("MAX_MEMORY_PER_BUCKET = {}", MAX_MEMORY_PER_BUCKET);
logger.info("CHUNKSIZE = {}", SYNC_CH... | [
"public",
"void",
"configToLogInfo",
"(",
")",
"{",
"logger",
".",
"info",
"(",
"\"----- MEMEORY USAGE -----\"",
")",
";",
"logger",
".",
"info",
"(",
"\"BUCKET_MEMORY = {}\"",
",",
"BUCKET_MEMORY",
")",
";",
"logger",
".",
"info",
"(",
"\"MEMORY_CHUNK = {}\"",
... | Outputs the configuration to the Logger. | [
"Outputs",
"the",
"configuration",
"to",
"the",
"Logger",
"."
] | a670f17a2186c9a15725f26617d77ce8e444e072 | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/DRUMSParameterSet.java#L221-L232 |
150,850 | mgledi/DRUMS | src/main/java/com/unister/semweb/drums/DRUMSParameterSet.java | DRUMSParameterSet.parseSize | public static long parseSize(String s) {
Matcher m = p_mem.matcher(s);
if (m.find()) {
long i = Long.parseLong(m.group(1));
char multiplier = 'B';
if (m.group(2) != null && m.group(2).length() == 1) {
multiplier = m.group(2).charAt(0);
... | java | public static long parseSize(String s) {
Matcher m = p_mem.matcher(s);
if (m.find()) {
long i = Long.parseLong(m.group(1));
char multiplier = 'B';
if (m.group(2) != null && m.group(2).length() == 1) {
multiplier = m.group(2).charAt(0);
... | [
"public",
"static",
"long",
"parseSize",
"(",
"String",
"s",
")",
"{",
"Matcher",
"m",
"=",
"p_mem",
".",
"matcher",
"(",
"s",
")",
";",
"if",
"(",
"m",
".",
"find",
"(",
")",
")",
"{",
"long",
"i",
"=",
"Long",
".",
"parseLong",
"(",
"m",
".",... | This methods parses the given String, which should represent a size, to a long. 'K' is interpreted as 1024, 'M'
as 1024^2 and 'G' as 1024^3.
@param s
the String to parse
@return size in byte. -1 if the String was not parsable. | [
"This",
"methods",
"parses",
"the",
"given",
"String",
"which",
"should",
"represent",
"a",
"size",
"to",
"a",
"long",
".",
"K",
"is",
"interpreted",
"as",
"1024",
"M",
"as",
"1024^2",
"and",
"G",
"as",
"1024^3",
"."
] | a670f17a2186c9a15725f26617d77ce8e444e072 | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/DRUMSParameterSet.java#L244-L266 |
150,851 | oaqa/uima-ecd | src/main/java/edu/cmu/lti/oaqa/framework/types/OutputElement.java | OutputElement.getSequenceId | public String getSequenceId() {
if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_sequenceId == null)
jcasType.jcas.throwFeatMissing("sequenceId", "edu.cmu.lti.oaqa.framework.types.OutputElement");
return jcasType.ll_cas.ll_getStringValue(addr, ((OutputElement_Type)jcasType).casFe... | java | public String getSequenceId() {
if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_sequenceId == null)
jcasType.jcas.throwFeatMissing("sequenceId", "edu.cmu.lti.oaqa.framework.types.OutputElement");
return jcasType.ll_cas.ll_getStringValue(addr, ((OutputElement_Type)jcasType).casFe... | [
"public",
"String",
"getSequenceId",
"(",
")",
"{",
"if",
"(",
"OutputElement_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"OutputElement_Type",
")",
"jcasType",
")",
".",
"casFeat_sequenceId",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing",
"... | getter for sequenceId - gets
@generated | [
"getter",
"for",
"sequenceId",
"-",
"gets"
] | 09a0ae26647490b43affc36ab3a01100702b989f | https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/framework/types/OutputElement.java#L67-L70 |
150,852 | oaqa/uima-ecd | src/main/java/edu/cmu/lti/oaqa/framework/types/OutputElement.java | OutputElement.setSequenceId | public void setSequenceId(String v) {
if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_sequenceId == null)
jcasType.jcas.throwFeatMissing("sequenceId", "edu.cmu.lti.oaqa.framework.types.OutputElement");
jcasType.ll_cas.ll_setStringValue(addr, ((OutputElement_Type)jcasType).casFea... | java | public void setSequenceId(String v) {
if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_sequenceId == null)
jcasType.jcas.throwFeatMissing("sequenceId", "edu.cmu.lti.oaqa.framework.types.OutputElement");
jcasType.ll_cas.ll_setStringValue(addr, ((OutputElement_Type)jcasType).casFea... | [
"public",
"void",
"setSequenceId",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"OutputElement_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"OutputElement_Type",
")",
"jcasType",
")",
".",
"casFeat_sequenceId",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throw... | setter for sequenceId - sets
@generated | [
"setter",
"for",
"sequenceId",
"-",
"sets"
] | 09a0ae26647490b43affc36ab3a01100702b989f | https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/framework/types/OutputElement.java#L74-L77 |
150,853 | oaqa/uima-ecd | src/main/java/edu/cmu/lti/oaqa/framework/types/OutputElement.java | OutputElement.getAnswer | public String getAnswer() {
if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_answer == null)
jcasType.jcas.throwFeatMissing("answer", "edu.cmu.lti.oaqa.framework.types.OutputElement");
return jcasType.ll_cas.ll_getStringValue(addr, ((OutputElement_Type)jcasType).casFeatCode_answe... | java | public String getAnswer() {
if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_answer == null)
jcasType.jcas.throwFeatMissing("answer", "edu.cmu.lti.oaqa.framework.types.OutputElement");
return jcasType.ll_cas.ll_getStringValue(addr, ((OutputElement_Type)jcasType).casFeatCode_answe... | [
"public",
"String",
"getAnswer",
"(",
")",
"{",
"if",
"(",
"OutputElement_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"OutputElement_Type",
")",
"jcasType",
")",
".",
"casFeat_answer",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing",
"(",
"\... | getter for answer - gets
@generated | [
"getter",
"for",
"answer",
"-",
"gets"
] | 09a0ae26647490b43affc36ab3a01100702b989f | https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/framework/types/OutputElement.java#L85-L88 |
150,854 | oaqa/uima-ecd | src/main/java/edu/cmu/lti/oaqa/framework/types/OutputElement.java | OutputElement.setAnswer | public void setAnswer(String v) {
if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_answer == null)
jcasType.jcas.throwFeatMissing("answer", "edu.cmu.lti.oaqa.framework.types.OutputElement");
jcasType.ll_cas.ll_setStringValue(addr, ((OutputElement_Type)jcasType).casFeatCode_answer... | java | public void setAnswer(String v) {
if (OutputElement_Type.featOkTst && ((OutputElement_Type)jcasType).casFeat_answer == null)
jcasType.jcas.throwFeatMissing("answer", "edu.cmu.lti.oaqa.framework.types.OutputElement");
jcasType.ll_cas.ll_setStringValue(addr, ((OutputElement_Type)jcasType).casFeatCode_answer... | [
"public",
"void",
"setAnswer",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"OutputElement_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"OutputElement_Type",
")",
"jcasType",
")",
".",
"casFeat_answer",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMiss... | setter for answer - sets
@generated | [
"setter",
"for",
"answer",
"-",
"sets"
] | 09a0ae26647490b43affc36ab3a01100702b989f | https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/framework/types/OutputElement.java#L92-L95 |
150,855 | adamfisk/dnsjava-fork | src/org/xbill/DNS/Compression.java | Compression.add | public void
add(int pos, Name name) {
if (pos > MAX_POINTER)
return;
int row = (name.hashCode() & 0x7FFFFFFF) % TABLE_SIZE;
Entry entry = new Entry();
entry.name = name;
entry.pos = pos;
entry.next = table[row];
table[row] = entry;
if (verbose)
System.err.println("Adding " + name + " at " + pos);
} | java | public void
add(int pos, Name name) {
if (pos > MAX_POINTER)
return;
int row = (name.hashCode() & 0x7FFFFFFF) % TABLE_SIZE;
Entry entry = new Entry();
entry.name = name;
entry.pos = pos;
entry.next = table[row];
table[row] = entry;
if (verbose)
System.err.println("Adding " + name + " at " + pos);
} | [
"public",
"void",
"add",
"(",
"int",
"pos",
",",
"Name",
"name",
")",
"{",
"if",
"(",
"pos",
">",
"MAX_POINTER",
")",
"return",
";",
"int",
"row",
"=",
"(",
"name",
".",
"hashCode",
"(",
")",
"&",
"0x7FFFFFFF",
")",
"%",
"TABLE_SIZE",
";",
"Entry",... | Adds a compression entry mapping a name to a position in a message.
@param pos The position at which the name is added.
@param name The name being added to the message. | [
"Adds",
"a",
"compression",
"entry",
"mapping",
"a",
"name",
"to",
"a",
"position",
"in",
"a",
"message",
"."
] | 69510a1cad0518badb19a6615724313bebc61f90 | https://github.com/adamfisk/dnsjava-fork/blob/69510a1cad0518badb19a6615724313bebc61f90/src/org/xbill/DNS/Compression.java#L39-L51 |
150,856 | adamfisk/dnsjava-fork | src/org/xbill/DNS/Compression.java | Compression.get | public int
get(Name name) {
int row = (name.hashCode() & 0x7FFFFFFF) % TABLE_SIZE;
int pos = -1;
for (Entry entry = table[row]; entry != null; entry = entry.next) {
if (entry.name.equals(name))
pos = entry.pos;
}
if (verbose)
System.err.println("Looking for " + name + ", found " + pos);
return pos;
} | java | public int
get(Name name) {
int row = (name.hashCode() & 0x7FFFFFFF) % TABLE_SIZE;
int pos = -1;
for (Entry entry = table[row]; entry != null; entry = entry.next) {
if (entry.name.equals(name))
pos = entry.pos;
}
if (verbose)
System.err.println("Looking for " + name + ", found " + pos);
return pos;
} | [
"public",
"int",
"get",
"(",
"Name",
"name",
")",
"{",
"int",
"row",
"=",
"(",
"name",
".",
"hashCode",
"(",
")",
"&",
"0x7FFFFFFF",
")",
"%",
"TABLE_SIZE",
";",
"int",
"pos",
"=",
"-",
"1",
";",
"for",
"(",
"Entry",
"entry",
"=",
"table",
"[",
... | Retrieves the position of the given name, if it has been previously
included in the message.
@param name The name to find in the compression table.
@return The position of the name, or -1 if not found. | [
"Retrieves",
"the",
"position",
"of",
"the",
"given",
"name",
"if",
"it",
"has",
"been",
"previously",
"included",
"in",
"the",
"message",
"."
] | 69510a1cad0518badb19a6615724313bebc61f90 | https://github.com/adamfisk/dnsjava-fork/blob/69510a1cad0518badb19a6615724313bebc61f90/src/org/xbill/DNS/Compression.java#L59-L70 |
150,857 | jtrfp/javamod | src/main/java/de/quippy/javamod/io/wav/RiffFile.java | RiffFile.open | public int open(String Filename, int NewMode)
{
int retcode = DDC_SUCCESS;
if (fmode != RFM_UNKNOWN)
{
retcode = close();
}
if (retcode == DDC_SUCCESS)
{
switch (NewMode)
{
case RFM_WRITE:
try
{
file = new RandomAccessFile(Filename, "rw");
fmode = RFM_WRITE;
// Wr... | java | public int open(String Filename, int NewMode)
{
int retcode = DDC_SUCCESS;
if (fmode != RFM_UNKNOWN)
{
retcode = close();
}
if (retcode == DDC_SUCCESS)
{
switch (NewMode)
{
case RFM_WRITE:
try
{
file = new RandomAccessFile(Filename, "rw");
fmode = RFM_WRITE;
// Wr... | [
"public",
"int",
"open",
"(",
"String",
"Filename",
",",
"int",
"NewMode",
")",
"{",
"int",
"retcode",
"=",
"DDC_SUCCESS",
";",
"if",
"(",
"fmode",
"!=",
"RFM_UNKNOWN",
")",
"{",
"retcode",
"=",
"close",
"(",
")",
";",
"}",
"if",
"(",
"retcode",
"=="... | Open a RIFF file. | [
"Open",
"a",
"RIFF",
"file",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/io/wav/RiffFile.java#L91-L154 |
150,858 | jtrfp/javamod | src/main/java/de/quippy/javamod/io/wav/RiffFile.java | RiffFile.read | public int read(byte[] Data, int NumBytes)
{
int retcode = DDC_SUCCESS;
try
{
file.read(Data, 0, NumBytes);
}
catch (IOException ioe)
{
retcode = DDC_FILE_ERROR;
}
return retcode;
} | java | public int read(byte[] Data, int NumBytes)
{
int retcode = DDC_SUCCESS;
try
{
file.read(Data, 0, NumBytes);
}
catch (IOException ioe)
{
retcode = DDC_FILE_ERROR;
}
return retcode;
} | [
"public",
"int",
"read",
"(",
"byte",
"[",
"]",
"Data",
",",
"int",
"NumBytes",
")",
"{",
"int",
"retcode",
"=",
"DDC_SUCCESS",
";",
"try",
"{",
"file",
".",
"read",
"(",
"Data",
",",
"0",
",",
"NumBytes",
")",
";",
"}",
"catch",
"(",
"IOException"... | Read NumBytes data. | [
"Read",
"NumBytes",
"data",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/io/wav/RiffFile.java#L271-L283 |
150,859 | jtrfp/javamod | src/main/java/de/quippy/javamod/io/wav/RiffFile.java | RiffFile.expect | public int expect(String Data, int NumBytes)
{
byte target = 0;
int cnt = 0;
try
{
while ((NumBytes--) != 0)
{
target = file.readByte();
if (target != Data.charAt(cnt++)) return DDC_FILE_ERROR;
}
}
catch (IOException ioe)
{
return DDC_FILE_ERROR;
}
return DDC_SUCCESS;
} | java | public int expect(String Data, int NumBytes)
{
byte target = 0;
int cnt = 0;
try
{
while ((NumBytes--) != 0)
{
target = file.readByte();
if (target != Data.charAt(cnt++)) return DDC_FILE_ERROR;
}
}
catch (IOException ioe)
{
return DDC_FILE_ERROR;
}
return DDC_SUCCESS;
} | [
"public",
"int",
"expect",
"(",
"String",
"Data",
",",
"int",
"NumBytes",
")",
"{",
"byte",
"target",
"=",
"0",
";",
"int",
"cnt",
"=",
"0",
";",
"try",
"{",
"while",
"(",
"(",
"NumBytes",
"--",
")",
"!=",
"0",
")",
"{",
"target",
"=",
"file",
... | Expect NumBytes data. | [
"Expect",
"NumBytes",
"data",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/io/wav/RiffFile.java#L288-L305 |
150,860 | jtrfp/javamod | src/main/java/de/quippy/javamod/io/wav/RiffFile.java | RiffFile.close | public int close()
{
int retcode = DDC_SUCCESS;
switch (fmode)
{
case RFM_WRITE:
try
{
file.seek(0);
try
{
writeHeader_internally(riff_header);
file.close();
}
catch (IOException ioe)
{
retcode = DDC_FILE_ERROR;
}
}
catch (IOException ioe)
... | java | public int close()
{
int retcode = DDC_SUCCESS;
switch (fmode)
{
case RFM_WRITE:
try
{
file.seek(0);
try
{
writeHeader_internally(riff_header);
file.close();
}
catch (IOException ioe)
{
retcode = DDC_FILE_ERROR;
}
}
catch (IOException ioe)
... | [
"public",
"int",
"close",
"(",
")",
"{",
"int",
"retcode",
"=",
"DDC_SUCCESS",
";",
"switch",
"(",
"fmode",
")",
"{",
"case",
"RFM_WRITE",
":",
"try",
"{",
"file",
".",
"seek",
"(",
"0",
")",
";",
"try",
"{",
"writeHeader_internally",
"(",
"riff_header... | Close Riff File.
Length is written too. | [
"Close",
"Riff",
"File",
".",
"Length",
"is",
"written",
"too",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/io/wav/RiffFile.java#L311-L351 |
150,861 | jtrfp/javamod | src/main/java/de/quippy/javamod/io/wav/RiffFile.java | RiffFile.backpatchHeader | public int backpatchHeader(long FileOffset, RiffChunkHeader data)
{
if (file == null)
{
return DDC_INVALID_CALL;
}
try
{
file.seek(FileOffset);
}
catch (IOException ioe)
{
return DDC_FILE_ERROR;
}
return writeHeader_internally(data);
} | java | public int backpatchHeader(long FileOffset, RiffChunkHeader data)
{
if (file == null)
{
return DDC_INVALID_CALL;
}
try
{
file.seek(FileOffset);
}
catch (IOException ioe)
{
return DDC_FILE_ERROR;
}
return writeHeader_internally(data);
} | [
"public",
"int",
"backpatchHeader",
"(",
"long",
"FileOffset",
",",
"RiffChunkHeader",
"data",
")",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"{",
"return",
"DDC_INVALID_CALL",
";",
"}",
"try",
"{",
"file",
".",
"seek",
"(",
"FileOffset",
")",
";",
"}",... | Write Data to specified offset. | [
"Write",
"Data",
"to",
"specified",
"offset",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/io/wav/RiffFile.java#L373-L388 |
150,862 | jtrfp/javamod | src/main/java/de/quippy/javamod/io/wav/RiffFile.java | RiffFile.seek | protected int seek(long offset)
{
int rc;
try
{
file.seek(offset);
rc = DDC_SUCCESS;
}
catch (IOException ioe)
{
rc = DDC_FILE_ERROR;
}
return rc;
} | java | protected int seek(long offset)
{
int rc;
try
{
file.seek(offset);
rc = DDC_SUCCESS;
}
catch (IOException ioe)
{
rc = DDC_FILE_ERROR;
}
return rc;
} | [
"protected",
"int",
"seek",
"(",
"long",
"offset",
")",
"{",
"int",
"rc",
";",
"try",
"{",
"file",
".",
"seek",
"(",
"offset",
")",
";",
"rc",
"=",
"DDC_SUCCESS",
";",
"}",
"catch",
"(",
"IOException",
"ioe",
")",
"{",
"rc",
"=",
"DDC_FILE_ERROR",
... | Seek in the File. | [
"Seek",
"in",
"the",
"File",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/io/wav/RiffFile.java#L410-L423 |
150,863 | jtrfp/javamod | src/main/java/de/quippy/javamod/io/wav/RiffFile.java | RiffFile.fourCC | public static int fourCC(String ChunkName)
{
byte[] p =
{
0x20, 0x20, 0x20, 0x20
};
System.arraycopy(ChunkName.getBytes(), 0, p, 0, 4);
int ret = (((p[0] << 24) & 0xFF000000) | ((p[1] << 16) & 0x00FF0000) | ((p[2] << 8) & 0x0000FF00) | (p[3] & 0x000000FF));
return ret;
} | java | public static int fourCC(String ChunkName)
{
byte[] p =
{
0x20, 0x20, 0x20, 0x20
};
System.arraycopy(ChunkName.getBytes(), 0, p, 0, 4);
int ret = (((p[0] << 24) & 0xFF000000) | ((p[1] << 16) & 0x00FF0000) | ((p[2] << 8) & 0x0000FF00) | (p[3] & 0x000000FF));
return ret;
} | [
"public",
"static",
"int",
"fourCC",
"(",
"String",
"ChunkName",
")",
"{",
"byte",
"[",
"]",
"p",
"=",
"{",
"0x20",
",",
"0x20",
",",
"0x20",
",",
"0x20",
"}",
";",
"System",
".",
"arraycopy",
"(",
"ChunkName",
".",
"getBytes",
"(",
")",
",",
"0",
... | Fill the header. | [
"Fill",
"the",
"header",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/io/wav/RiffFile.java#L445-L454 |
150,864 | diegossilveira/jcors | src/main/java/org/jcors/config/ConfigBuilder.java | ConfigBuilder.buildConfig | JCorsConfig buildConfig() {
JCorsConfig config = new JCorsConfig();
if (enableNonCorsRequests != null) {
config.setEnableNonCorsRequests(enableNonCorsRequests);
}
if (resourcesSupportCredentials != null) {
config.setResourcesSupportCredentials(resourcesSupportCredentials);
}
if (preflightResultCac... | java | JCorsConfig buildConfig() {
JCorsConfig config = new JCorsConfig();
if (enableNonCorsRequests != null) {
config.setEnableNonCorsRequests(enableNonCorsRequests);
}
if (resourcesSupportCredentials != null) {
config.setResourcesSupportCredentials(resourcesSupportCredentials);
}
if (preflightResultCac... | [
"JCorsConfig",
"buildConfig",
"(",
")",
"{",
"JCorsConfig",
"config",
"=",
"new",
"JCorsConfig",
"(",
")",
";",
"if",
"(",
"enableNonCorsRequests",
"!=",
"null",
")",
"{",
"config",
".",
"setEnableNonCorsRequests",
"(",
"enableNonCorsRequests",
")",
";",
"}",
... | Build a new configuration
@return | [
"Build",
"a",
"new",
"configuration"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/ConfigBuilder.java#L50-L72 |
150,865 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2Footer.java | ID3v2Footer.checkFooter | private boolean checkFooter(RandomAccessInputStream raf, int location) throws IOException
{
raf.seek(location);
byte[] buf = new byte[FOOT_SIZE];
if (raf.read(buf) != FOOT_SIZE)
{
throw new IOException("Error encountered finding id3v2 footer");
}
String result = new String(buf, ENC_TYPE);
if (result... | java | private boolean checkFooter(RandomAccessInputStream raf, int location) throws IOException
{
raf.seek(location);
byte[] buf = new byte[FOOT_SIZE];
if (raf.read(buf) != FOOT_SIZE)
{
throw new IOException("Error encountered finding id3v2 footer");
}
String result = new String(buf, ENC_TYPE);
if (result... | [
"private",
"boolean",
"checkFooter",
"(",
"RandomAccessInputStream",
"raf",
",",
"int",
"location",
")",
"throws",
"IOException",
"{",
"raf",
".",
"seek",
"(",
"location",
")",
";",
"byte",
"[",
"]",
"buf",
"=",
"new",
"byte",
"[",
"FOOT_SIZE",
"]",
";",
... | Checks to see if there is an id3v2 footer in the file provided to the
constructor.
@param location where the footer should be located in the file
@return true if an id3v2 footer exists in the file
@exception FileNotFoundException if an error occurs
@exception IOException if an error occurs | [
"Checks",
"to",
"see",
"if",
"there",
"is",
"an",
"id3v2",
"footer",
"in",
"the",
"file",
"provided",
"to",
"the",
"constructor",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2Footer.java#L81-L104 |
150,866 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2Footer.java | ID3v2Footer.readFooter | private void readFooter(RandomAccessInputStream raf, int location) throws IOException
{
raf.seek(location);
byte[] foot = new byte[FOOT_SIZE];
if (raf.read(foot) != FOOT_SIZE)
{
throw new IOException("Error encountered reading id3v2 footer");
}
majorVersion = (int) foot[3];
if (majorVersion <= NEW_... | java | private void readFooter(RandomAccessInputStream raf, int location) throws IOException
{
raf.seek(location);
byte[] foot = new byte[FOOT_SIZE];
if (raf.read(foot) != FOOT_SIZE)
{
throw new IOException("Error encountered reading id3v2 footer");
}
majorVersion = (int) foot[3];
if (majorVersion <= NEW_... | [
"private",
"void",
"readFooter",
"(",
"RandomAccessInputStream",
"raf",
",",
"int",
"location",
")",
"throws",
"IOException",
"{",
"raf",
".",
"seek",
"(",
"location",
")",
";",
"byte",
"[",
"]",
"foot",
"=",
"new",
"byte",
"[",
"FOOT_SIZE",
"]",
";",
"i... | Extracts the information from the footer.
@param location where the footer is in the file
@exception FileNotFoundException if an error occurs
@exception IOException if an error occurs | [
"Extracts",
"the",
"information",
"from",
"the",
"footer",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v2Footer.java#L113-L134 |
150,867 | hawkular/hawkular-inventory | hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/model/SyncHash.java | SyncHash.of | public static String of(InventoryStructure<?> structure, CanonicalPath rootPath) {
return ComputeHash.of(structure, rootPath, true, true, true).getSyncHash();
} | java | public static String of(InventoryStructure<?> structure, CanonicalPath rootPath) {
return ComputeHash.of(structure, rootPath, true, true, true).getSyncHash();
} | [
"public",
"static",
"String",
"of",
"(",
"InventoryStructure",
"<",
"?",
">",
"structure",
",",
"CanonicalPath",
"rootPath",
")",
"{",
"return",
"ComputeHash",
".",
"of",
"(",
"structure",
",",
"rootPath",
",",
"true",
",",
"true",
",",
"true",
")",
".",
... | The root path is required so that paths in the blueprints can be correctly relativized.
@param structure the structure to compute the root hash of.
@param rootPath the canonical path of the root of the inventory structure
@return the sync hash of the root of the structure | [
"The",
"root",
"path",
"is",
"required",
"so",
"that",
"paths",
"in",
"the",
"blueprints",
"can",
"be",
"correctly",
"relativized",
"."
] | f56dc10323dca21777feb5b609a9e9cc70ffaf62 | https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/model/SyncHash.java#L47-L49 |
150,868 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java | Field.visualize | public Object visualize(PMContext ctx, Operation operation, Entity entity) throws PMException {
debug("Converting [" + operation.getId() + "]" + entity.getId() + "." + getId());
try {
Converter c = null;
if (getConverters() != null) {
c = getConverter(operation.ge... | java | public Object visualize(PMContext ctx, Operation operation, Entity entity) throws PMException {
debug("Converting [" + operation.getId() + "]" + entity.getId() + "." + getId());
try {
Converter c = null;
if (getConverters() != null) {
c = getConverter(operation.ge... | [
"public",
"Object",
"visualize",
"(",
"PMContext",
"ctx",
",",
"Operation",
"operation",
",",
"Entity",
"entity",
")",
"throws",
"PMException",
"{",
"debug",
"(",
"\"Converting [\"",
"+",
"operation",
".",
"getId",
"(",
")",
"+",
"\"]\"",
"+",
"entity",
".",... | Visualize the field using the given operation and entity
@param ctx the context
@param operation The operation
@param entity The entity
@return The string visualization
@throws PMException | [
"Visualize",
"the",
"field",
"using",
"the",
"given",
"operation",
"and",
"entity"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java#L71-L96 |
150,869 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java | Field.getDefaultConverter | public Converter getDefaultConverter() {
if (getPm().getDefaultConverter() == null) {
Converter c = new GenericConverter();
Properties properties = new Properties();
properties.put("filename", "converters/show.tostring.converter");
c.setProperties(properties);
... | java | public Converter getDefaultConverter() {
if (getPm().getDefaultConverter() == null) {
Converter c = new GenericConverter();
Properties properties = new Properties();
properties.put("filename", "converters/show.tostring.converter");
c.setProperties(properties);
... | [
"public",
"Converter",
"getDefaultConverter",
"(",
")",
"{",
"if",
"(",
"getPm",
"(",
")",
".",
"getDefaultConverter",
"(",
")",
"==",
"null",
")",
"{",
"Converter",
"c",
"=",
"new",
"GenericConverter",
"(",
")",
";",
"Properties",
"properties",
"=",
"new"... | Return the default converter if none is defined
@return The converter | [
"Return",
"the",
"default",
"converter",
"if",
"none",
"is",
"defined"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java#L103-L113 |
150,870 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java | Field.visualize | public Object visualize(PMContext ctx, Operation operation) throws PMException {
return visualize(ctx, operation, ctx.getEntity());
} | java | public Object visualize(PMContext ctx, Operation operation) throws PMException {
return visualize(ctx, operation, ctx.getEntity());
} | [
"public",
"Object",
"visualize",
"(",
"PMContext",
"ctx",
",",
"Operation",
"operation",
")",
"throws",
"PMException",
"{",
"return",
"visualize",
"(",
"ctx",
",",
"operation",
",",
"ctx",
".",
"getEntity",
"(",
")",
")",
";",
"}"
] | Visualize the field using the given operation and context entity
@param ctx the context
@param operation The operation
@return The String visualization
@throws PMException | [
"Visualize",
"the",
"field",
"using",
"the",
"given",
"operation",
"and",
"context",
"entity"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java#L123-L125 |
150,871 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java | Field.shouldDisplay | public boolean shouldDisplay(String operationId, PMSecurityUser user) {
if (operationId == null) {
return false;
}
//First we check permissions
for (FieldOperationConfig config : getConfigs()) {
if (config.includes(operationId)) {
if (config.getPer... | java | public boolean shouldDisplay(String operationId, PMSecurityUser user) {
if (operationId == null) {
return false;
}
//First we check permissions
for (FieldOperationConfig config : getConfigs()) {
if (config.includes(operationId)) {
if (config.getPer... | [
"public",
"boolean",
"shouldDisplay",
"(",
"String",
"operationId",
",",
"PMSecurityUser",
"user",
")",
"{",
"if",
"(",
"operationId",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"//First we check permissions",
"for",
"(",
"FieldOperationConfig",
"config"... | Indicates if the field is shown in the given operation id
@param operationId The Operation id
@return true if field is displayed on the operation | [
"Indicates",
"if",
"the",
"field",
"is",
"shown",
"in",
"the",
"given",
"operation",
"id"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java#L208-L230 |
150,872 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java | Field.getTitle | public String getTitle() {
final String key = String.format("pm.field.%s.%s", getEntity().getId(), getId());
final String message = getPm().message(key);
if (key.equals(message)) {
final Entity extendzEntity = getEntity().getExtendzEntity();
if (extendzEntity != null && e... | java | public String getTitle() {
final String key = String.format("pm.field.%s.%s", getEntity().getId(), getId());
final String message = getPm().message(key);
if (key.equals(message)) {
final Entity extendzEntity = getEntity().getExtendzEntity();
if (extendzEntity != null && e... | [
"public",
"String",
"getTitle",
"(",
")",
"{",
"final",
"String",
"key",
"=",
"String",
".",
"format",
"(",
"\"pm.field.%s.%s\"",
",",
"getEntity",
"(",
")",
".",
"getId",
"(",
")",
",",
"getId",
"(",
")",
")",
";",
"final",
"String",
"message",
"=",
... | Returns the internationalized field title | [
"Returns",
"the",
"internationalized",
"field",
"title"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java#L334-L344 |
150,873 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java | Field.getTooltip | public String getTooltip() {
final String key = "pm.field." + getEntity().getId() + "." + getId() + ".tooltip";
if (key == null) {
return null;
}
final String message = getPm().message(key);
if (key.equals(message)) {
return null;
}
return ... | java | public String getTooltip() {
final String key = "pm.field." + getEntity().getId() + "." + getId() + ".tooltip";
if (key == null) {
return null;
}
final String message = getPm().message(key);
if (key.equals(message)) {
return null;
}
return ... | [
"public",
"String",
"getTooltip",
"(",
")",
"{",
"final",
"String",
"key",
"=",
"\"pm.field.\"",
"+",
"getEntity",
"(",
")",
".",
"getId",
"(",
")",
"+",
"\".\"",
"+",
"getId",
"(",
")",
"+",
"\".tooltip\"",
";",
"if",
"(",
"key",
"==",
"null",
")",
... | Returns the internationalized field tooltip | [
"Returns",
"the",
"internationalized",
"field",
"tooltip"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java#L349-L359 |
150,874 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java | Field.getConverter | public Converter getConverter(String operation) {
//First we check "covnerters" list
Converter c = getConverters().getConverterForOperation(operation);
if (c == null) {
// if not found, we check configs
for (FieldOperationConfig config : getConfigs()) {
if... | java | public Converter getConverter(String operation) {
//First we check "covnerters" list
Converter c = getConverters().getConverterForOperation(operation);
if (c == null) {
// if not found, we check configs
for (FieldOperationConfig config : getConfigs()) {
if... | [
"public",
"Converter",
"getConverter",
"(",
"String",
"operation",
")",
"{",
"//First we check \"covnerters\" list",
"Converter",
"c",
"=",
"getConverters",
"(",
")",
".",
"getConverterForOperation",
"(",
"operation",
")",
";",
"if",
"(",
"c",
"==",
"null",
")",
... | Find the right converter for this field on the given operation.
@param operation
@return a converter | [
"Find",
"the",
"right",
"converter",
"for",
"this",
"field",
"on",
"the",
"given",
"operation",
"."
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Field.java#L376-L404 |
150,875 | amlinv/amq-monitor | amq-monitor-web-impl/src/main/java/com/amlinv/activemq/stats/QueueStatisticsRegistry.java | QueueStatisticsRegistry.onUpdatedStats | public void onUpdatedStats(ActiveMQQueueJmxStats updatedStats) {
QueueStatisticsCollection queueStatisticsCollection;
synchronized ( this.queueStats ) {
queueStatisticsCollection = this.queueStats.get(updatedStats.getQueueName());
if ( queueStatisticsCollection == null ) {
... | java | public void onUpdatedStats(ActiveMQQueueJmxStats updatedStats) {
QueueStatisticsCollection queueStatisticsCollection;
synchronized ( this.queueStats ) {
queueStatisticsCollection = this.queueStats.get(updatedStats.getQueueName());
if ( queueStatisticsCollection == null ) {
... | [
"public",
"void",
"onUpdatedStats",
"(",
"ActiveMQQueueJmxStats",
"updatedStats",
")",
"{",
"QueueStatisticsCollection",
"queueStatisticsCollection",
";",
"synchronized",
"(",
"this",
".",
"queueStats",
")",
"{",
"queueStatisticsCollection",
"=",
"this",
".",
"queueStats"... | Update the statistics in the registry given one set of polled statistics. These statistics are assigned a
timestamp equal to "now".
@param updatedStats statistics with which to update the registry. | [
"Update",
"the",
"statistics",
"in",
"the",
"registry",
"given",
"one",
"set",
"of",
"polled",
"statistics",
".",
"These",
"statistics",
"are",
"assigned",
"a",
"timestamp",
"equal",
"to",
"now",
"."
] | 0ae0156f56d7d3edf98bca9c30b153b770fe5bfa | https://github.com/amlinv/amq-monitor/blob/0ae0156f56d7d3edf98bca9c30b153b770fe5bfa/amq-monitor-web-impl/src/main/java/com/amlinv/activemq/stats/QueueStatisticsRegistry.java#L52-L65 |
150,876 | amlinv/amq-monitor | amq-monitor-web-impl/src/main/java/com/amlinv/activemq/stats/QueueStatisticsRegistry.java | QueueStatisticsRegistry.getQueueStats | public Map<String, ActiveMQQueueStats> getQueueStats() {
Map<String, ActiveMQQueueStats> result;
result = new TreeMap<>();
synchronized ( this.queueStats ) {
for (QueueStatisticsCollection queueStatisticsCollection : this.queueStats.values()) {
result.put(queueStati... | java | public Map<String, ActiveMQQueueStats> getQueueStats() {
Map<String, ActiveMQQueueStats> result;
result = new TreeMap<>();
synchronized ( this.queueStats ) {
for (QueueStatisticsCollection queueStatisticsCollection : this.queueStats.values()) {
result.put(queueStati... | [
"public",
"Map",
"<",
"String",
",",
"ActiveMQQueueStats",
">",
"getQueueStats",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"ActiveMQQueueStats",
">",
"result",
";",
"result",
"=",
"new",
"TreeMap",
"<>",
"(",
")",
";",
"synchronized",
"(",
"this",
".",
"... | Retrieve statistics for all of the queues.
@return map of aggregated statistics for each queue in the registry. | [
"Retrieve",
"statistics",
"for",
"all",
"of",
"the",
"queues",
"."
] | 0ae0156f56d7d3edf98bca9c30b153b770fe5bfa | https://github.com/amlinv/amq-monitor/blob/0ae0156f56d7d3edf98bca9c30b153b770fe5bfa/amq-monitor-web-impl/src/main/java/com/amlinv/activemq/stats/QueueStatisticsRegistry.java#L72-L84 |
150,877 | socialsensor/geo-util | src/main/java/eu/socialsensor/geo/Countrycoder.java | Countrycoder.getMentionedGnObjects | public List<GeoObject> getMentionedGnObjects(List<String> tokenList){
//logger.info("tokenList: " + tokenList);
Set<Integer> gnIds = new HashSet<Integer>();
for (int i = 0; i < tokenList.size(); i++){
Set<Integer> ids = gnObjectMapNameLookup.get(tokenList.get(i));
if (ids != null){
gnIds.addAll(ids)... | java | public List<GeoObject> getMentionedGnObjects(List<String> tokenList){
//logger.info("tokenList: " + tokenList);
Set<Integer> gnIds = new HashSet<Integer>();
for (int i = 0; i < tokenList.size(); i++){
Set<Integer> ids = gnObjectMapNameLookup.get(tokenList.get(i));
if (ids != null){
gnIds.addAll(ids)... | [
"public",
"List",
"<",
"GeoObject",
">",
"getMentionedGnObjects",
"(",
"List",
"<",
"String",
">",
"tokenList",
")",
"{",
"//logger.info(\"tokenList: \" + tokenList);",
"Set",
"<",
"Integer",
">",
"gnIds",
"=",
"new",
"HashSet",
"<",
"Integer",
">",
"(",
")",
... | Given an arbitrary text string, extract the referred names of locations
@param tokenList List of tokens.
@return List of mentioned LightweightGeoObjects in the list of tokens. | [
"Given",
"an",
"arbitrary",
"text",
"string",
"extract",
"the",
"referred",
"names",
"of",
"locations"
] | ffe729896187dc589f4a362d6e6819fc155ced1d | https://github.com/socialsensor/geo-util/blob/ffe729896187dc589f4a362d6e6819fc155ced1d/src/main/java/eu/socialsensor/geo/Countrycoder.java#L220-L248 |
150,878 | socialsensor/geo-util | src/main/java/eu/socialsensor/geo/Countrycoder.java | Countrycoder.getTokens | protected List<String> getTokens(String text){
String[] tokens = text.toLowerCase().split("[\\s\\p{Punct}]");
List<String> tokenList = new ArrayList<String>(tokens.length);
for (int i = 0; i < tokens.length; i++){
if (tokens[i].trim().length() < 1){
continue;
}
tokenList.add(tokens[i].trim());
}
... | java | protected List<String> getTokens(String text){
String[] tokens = text.toLowerCase().split("[\\s\\p{Punct}]");
List<String> tokenList = new ArrayList<String>(tokens.length);
for (int i = 0; i < tokens.length; i++){
if (tokens[i].trim().length() < 1){
continue;
}
tokenList.add(tokens[i].trim());
}
... | [
"protected",
"List",
"<",
"String",
">",
"getTokens",
"(",
"String",
"text",
")",
"{",
"String",
"[",
"]",
"tokens",
"=",
"text",
".",
"toLowerCase",
"(",
")",
".",
"split",
"(",
"\"[\\\\s\\\\p{Punct}]\"",
")",
";",
"List",
"<",
"String",
">",
"tokenList... | Utility method for splitting a piece of text to tokens
@param text
@return List of tokens | [
"Utility",
"method",
"for",
"splitting",
"a",
"piece",
"of",
"text",
"to",
"tokens"
] | ffe729896187dc589f4a362d6e6819fc155ced1d | https://github.com/socialsensor/geo-util/blob/ffe729896187dc589f4a362d6e6819fc155ced1d/src/main/java/eu/socialsensor/geo/Countrycoder.java#L255-L265 |
150,879 | jpaoletti/java-presentation-manager | modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/actions/ActionSupport.java | ActionSupport.success | protected void success(PMStrutsContext ctx, String url, boolean redirect) throws PMForwardException {
if (ctx.getOperation() != null && ctx.getOperation().getFollows() != null) {
final String plainUrl = PMTags.plainUrl(
ctx.getPmsession(),
"/" + ctx.getOpe... | java | protected void success(PMStrutsContext ctx, String url, boolean redirect) throws PMForwardException {
if (ctx.getOperation() != null && ctx.getOperation().getFollows() != null) {
final String plainUrl = PMTags.plainUrl(
ctx.getPmsession(),
"/" + ctx.getOpe... | [
"protected",
"void",
"success",
"(",
"PMStrutsContext",
"ctx",
",",
"String",
"url",
",",
"boolean",
"redirect",
")",
"throws",
"PMForwardException",
"{",
"if",
"(",
"ctx",
".",
"getOperation",
"(",
")",
"!=",
"null",
"&&",
"ctx",
".",
"getOperation",
"(",
... | Consider the operation successful and redirect or forward to the given
url
@param ctx Context
@param url Next url
@param redirect If true, redirects, else, forwards
@throws PMForwardException always | [
"Consider",
"the",
"operation",
"successful",
"and",
"redirect",
"or",
"forward",
"to",
"the",
"given",
"url"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/actions/ActionSupport.java#L112-L126 |
150,880 | jpaoletti/java-presentation-manager | modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/actions/ActionSupport.java | ActionSupport.jSONSuccess | protected void jSONSuccess(PMStrutsContext ctx, Object object) throws PMForwardException {
final String toJson = new Gson().toJson(object);
ctx.put(PM_VOID_TEXT, toJson);
success(ctx, "converters/void.jsp", false);
} | java | protected void jSONSuccess(PMStrutsContext ctx, Object object) throws PMForwardException {
final String toJson = new Gson().toJson(object);
ctx.put(PM_VOID_TEXT, toJson);
success(ctx, "converters/void.jsp", false);
} | [
"protected",
"void",
"jSONSuccess",
"(",
"PMStrutsContext",
"ctx",
",",
"Object",
"object",
")",
"throws",
"PMForwardException",
"{",
"final",
"String",
"toJson",
"=",
"new",
"Gson",
"(",
")",
".",
"toJson",
"(",
"object",
")",
";",
"ctx",
".",
"put",
"(",... | Just a helper to return a serialized object with jSON.
Specially useful dealing with encoding problems | [
"Just",
"a",
"helper",
"to",
"return",
"a",
"serialized",
"object",
"with",
"jSON",
"."
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/actions/ActionSupport.java#L144-L148 |
150,881 | isisaddons-legacy/isis-module-publishmq | dom/servicespi/src/main/java/org/isisaddons/module/publishmq/dom/servicespi/PublisherServiceUsingActiveMq.java | PublisherServiceUsingActiveMq.init | @PostConstruct
public void init(Map<String,String> properties) {
vmTransportUrl = properties.getOrDefault(KEY_VM_TRANSPORT_URL, KEY_VM_TRANSPORT_URL_DEFAULT);
memberInteractionsQueueName = properties.getOrDefault(KEY_MEMBER_INTERACTIONS_QUEUE,
KEY_MEMBER_INTERACTIONS_QUEUE_DEFAULT);... | java | @PostConstruct
public void init(Map<String,String> properties) {
vmTransportUrl = properties.getOrDefault(KEY_VM_TRANSPORT_URL, KEY_VM_TRANSPORT_URL_DEFAULT);
memberInteractionsQueueName = properties.getOrDefault(KEY_MEMBER_INTERACTIONS_QUEUE,
KEY_MEMBER_INTERACTIONS_QUEUE_DEFAULT);... | [
"@",
"PostConstruct",
"public",
"void",
"init",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
")",
"{",
"vmTransportUrl",
"=",
"properties",
".",
"getOrDefault",
"(",
"KEY_VM_TRANSPORT_URL",
",",
"KEY_VM_TRANSPORT_URL_DEFAULT",
")",
";",
"memberInte... | region > init, shutdown | [
"region",
">",
"init",
"shutdown"
] | b1a424f95b26a2a0369aac706c2e30074b7f6e43 | https://github.com/isisaddons-legacy/isis-module-publishmq/blob/b1a424f95b26a2a0369aac706c2e30074b7f6e43/dom/servicespi/src/main/java/org/isisaddons/module/publishmq/dom/servicespi/PublisherServiceUsingActiveMq.java#L81-L104 |
150,882 | icode/ameba-utils | src/main/java/ameba/util/MimeType.java | MimeType.getExtension | private static String getExtension(String fileName) {
// play it safe and get rid of any fragment id
// that might be there
int length = fileName.length();
int newEnd = fileName.lastIndexOf('#');
if (newEnd == -1) {
newEnd = length;
}
int i = fileName... | java | private static String getExtension(String fileName) {
// play it safe and get rid of any fragment id
// that might be there
int length = fileName.length();
int newEnd = fileName.lastIndexOf('#');
if (newEnd == -1) {
newEnd = length;
}
int i = fileName... | [
"private",
"static",
"String",
"getExtension",
"(",
"String",
"fileName",
")",
"{",
"// play it safe and get rid of any fragment id",
"// that might be there",
"int",
"length",
"=",
"fileName",
".",
"length",
"(",
")",
";",
"int",
"newEnd",
"=",
"fileName",
".",
"la... | Get extension of file, without fragment id | [
"Get",
"extension",
"of",
"file",
"without",
"fragment",
"id"
] | 1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35 | https://github.com/icode/ameba-utils/blob/1aad5317a22e546c83dfe2dc0c80a1dc1fa0ea35/src/main/java/ameba/util/MimeType.java#L104-L120 |
150,883 | GerdHolz/TOVAL | src/de/invation/code/toval/types/DynamicMatrix.java | DynamicMatrix.getValuesAsString | public String getValuesAsString() {
StringBuilder builder = new StringBuilder();
for(E row: rowKeys.keySet())
for(E col: colKeys.keySet()) {
builder.append(getValueAsString(row, col, true));
builder.append('\n');
}
return builder.toString();
} | java | public String getValuesAsString() {
StringBuilder builder = new StringBuilder();
for(E row: rowKeys.keySet())
for(E col: colKeys.keySet()) {
builder.append(getValueAsString(row, col, true));
builder.append('\n');
}
return builder.toString();
} | [
"public",
"String",
"getValuesAsString",
"(",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"E",
"row",
":",
"rowKeys",
".",
"keySet",
"(",
")",
")",
"for",
"(",
"E",
"col",
":",
"colKeys",
".",
"keySet",... | Returns a String representation of all matrix entries.
@return String representation of all matrix entries
@see #getValueAsString(Object, Object, boolean) | [
"Returns",
"a",
"String",
"representation",
"of",
"all",
"matrix",
"entries",
"."
] | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/types/DynamicMatrix.java#L96-L104 |
150,884 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/utils/ArtifactMatcher.java | ArtifactMatcher.match | public boolean match( Artifact artifact )
throws InvalidVersionSpecificationException
{
for ( Pattern pattern : patterns )
{
if ( pattern.match( artifact ) )
{
for ( Pattern ignorePattern : ignorePatterns )
{
if ( ig... | java | public boolean match( Artifact artifact )
throws InvalidVersionSpecificationException
{
for ( Pattern pattern : patterns )
{
if ( pattern.match( artifact ) )
{
for ( Pattern ignorePattern : ignorePatterns )
{
if ( ig... | [
"public",
"boolean",
"match",
"(",
"Artifact",
"artifact",
")",
"throws",
"InvalidVersionSpecificationException",
"{",
"for",
"(",
"Pattern",
"pattern",
":",
"patterns",
")",
"{",
"if",
"(",
"pattern",
".",
"match",
"(",
"artifact",
")",
")",
"{",
"for",
"("... | Check if artifact matches patterns.
@throws InvalidVersionSpecificationException | [
"Check",
"if",
"artifact",
"matches",
"patterns",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/utils/ArtifactMatcher.java#L195-L213 |
150,885 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/provider/IOProviderFromURL.java | IOProviderFromURL.registerProtocol | public void registerProtocol(String protocol, IOProviderFrom<URL> provider) {
protocols.put(protocol.toLowerCase(), provider);
} | java | public void registerProtocol(String protocol, IOProviderFrom<URL> provider) {
protocols.put(protocol.toLowerCase(), provider);
} | [
"public",
"void",
"registerProtocol",
"(",
"String",
"protocol",
",",
"IOProviderFrom",
"<",
"URL",
">",
"provider",
")",
"{",
"protocols",
".",
"put",
"(",
"protocol",
".",
"toLowerCase",
"(",
")",
",",
"provider",
")",
";",
"}"
] | Register a new IOProvider from URL for a specific protocol. | [
"Register",
"a",
"new",
"IOProvider",
"from",
"URL",
"for",
"a",
"specific",
"protocol",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/provider/IOProviderFromURL.java#L24-L26 |
150,886 | netarchivesuite/heritrix3-wrapper | src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java | Heritrix3Wrapper.exitJavaProcess | public EngineResult exitJavaProcess(List<String> ignoreJobs) {
HttpPost postRequest = new HttpPost(baseUrl);
List<NameValuePair> nvp = new LinkedList<NameValuePair>();
// 3.2.x
//nvp.add(new BasicNameValuePair("action", "Exit Java Process"));
// 3.3.x
nvp.add(new BasicNam... | java | public EngineResult exitJavaProcess(List<String> ignoreJobs) {
HttpPost postRequest = new HttpPost(baseUrl);
List<NameValuePair> nvp = new LinkedList<NameValuePair>();
// 3.2.x
//nvp.add(new BasicNameValuePair("action", "Exit Java Process"));
// 3.3.x
nvp.add(new BasicNam... | [
"public",
"EngineResult",
"exitJavaProcess",
"(",
"List",
"<",
"String",
">",
"ignoreJobs",
")",
"{",
"HttpPost",
"postRequest",
"=",
"new",
"HttpPost",
"(",
"baseUrl",
")",
";",
"List",
"<",
"NameValuePair",
">",
"nvp",
"=",
"new",
"LinkedList",
"<",
"NameV... | Send JVM shutdown action to Heritrix 3.
If there are any running jobs they must be included in the ignored jobs list passed as argument.
Otherwise the shutdown action is ignored.
@return <code>EngineResult</code>, but only in case the shutdown was not performed | [
"Send",
"JVM",
"shutdown",
"action",
"to",
"Heritrix",
"3",
".",
"If",
"there",
"are",
"any",
"running",
"jobs",
"they",
"must",
"be",
"included",
"in",
"the",
"ignored",
"jobs",
"list",
"passed",
"as",
"argument",
".",
"Otherwise",
"the",
"shutdown",
"act... | e53ec5736cbac0bdd3925b5331737dc905871629 | https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java#L175-L199 |
150,887 | netarchivesuite/heritrix3-wrapper | src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java | Heritrix3Wrapper.createNewJob | public EngineResult createNewJob(String jobname) {
HttpPost postRequest = new HttpPost(baseUrl);
List<NameValuePair> nvp = new LinkedList<NameValuePair>();
nvp.add(new BasicNameValuePair("action", "create"));
nvp.add(new BasicNameValuePair("createpath", jobname));
StringEntity po... | java | public EngineResult createNewJob(String jobname) {
HttpPost postRequest = new HttpPost(baseUrl);
List<NameValuePair> nvp = new LinkedList<NameValuePair>();
nvp.add(new BasicNameValuePair("action", "create"));
nvp.add(new BasicNameValuePair("createpath", jobname));
StringEntity po... | [
"public",
"EngineResult",
"createNewJob",
"(",
"String",
"jobname",
")",
"{",
"HttpPost",
"postRequest",
"=",
"new",
"HttpPost",
"(",
"baseUrl",
")",
";",
"List",
"<",
"NameValuePair",
">",
"nvp",
"=",
"new",
"LinkedList",
"<",
"NameValuePair",
">",
"(",
")"... | Creates a new job and initialises it with the default cxml file which must be modified before launch.
@param jobname name of the new job
@return engine state and a list of registered jobs | [
"Creates",
"a",
"new",
"job",
"and",
"initialises",
"it",
"with",
"the",
"default",
"cxml",
"file",
"which",
"must",
"be",
"modified",
"before",
"launch",
"."
] | e53ec5736cbac0bdd3925b5331737dc905871629 | https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java#L275-L290 |
150,888 | netarchivesuite/heritrix3-wrapper | src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java | Heritrix3Wrapper.engineResult | public EngineResult engineResult(HttpRequestBase request) {
EngineResult engineResult = new EngineResult();
try {
HttpResponse response = httpClient.execute(request);
if (response != null) {
engineResult.responseCode = response.getStatusLine().getStatusCode();
... | java | public EngineResult engineResult(HttpRequestBase request) {
EngineResult engineResult = new EngineResult();
try {
HttpResponse response = httpClient.execute(request);
if (response != null) {
engineResult.responseCode = response.getStatusLine().getStatusCode();
... | [
"public",
"EngineResult",
"engineResult",
"(",
"HttpRequestBase",
"request",
")",
"{",
"EngineResult",
"engineResult",
"=",
"new",
"EngineResult",
"(",
")",
";",
"try",
"{",
"HttpResponse",
"response",
"=",
"httpClient",
".",
"execute",
"(",
"request",
")",
";",... | Process the engine result XML and turn it into a Java object.
@param request HTTP request
@return engine state and a list of registered jobs | [
"Process",
"the",
"engine",
"result",
"XML",
"and",
"turn",
"it",
"into",
"a",
"Java",
"object",
"."
] | e53ec5736cbac0bdd3925b5331737dc905871629 | https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java#L319-L378 |
150,889 | netarchivesuite/heritrix3-wrapper | src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java | Heritrix3Wrapper.jobResult | public JobResult jobResult(HttpRequestBase request) {
JobResult jobResult = new JobResult();
try {
HttpResponse response = httpClient.execute(request);
if (response != null) {
jobResult.responseCode = response.getStatusLine().getStatusCode();
HttpE... | java | public JobResult jobResult(HttpRequestBase request) {
JobResult jobResult = new JobResult();
try {
HttpResponse response = httpClient.execute(request);
if (response != null) {
jobResult.responseCode = response.getStatusLine().getStatusCode();
HttpE... | [
"public",
"JobResult",
"jobResult",
"(",
"HttpRequestBase",
"request",
")",
"{",
"JobResult",
"jobResult",
"=",
"new",
"JobResult",
"(",
")",
";",
"try",
"{",
"HttpResponse",
"response",
"=",
"httpClient",
".",
"execute",
"(",
"request",
")",
";",
"if",
"(",... | Send a job request and process the XML response and turn it into a Java object.
@param request HTTP request
@return job state | [
"Send",
"a",
"job",
"request",
"and",
"process",
"the",
"XML",
"response",
"and",
"turn",
"it",
"into",
"a",
"Java",
"object",
"."
] | e53ec5736cbac0bdd3925b5331737dc905871629 | https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java#L385-L444 |
150,890 | netarchivesuite/heritrix3-wrapper | src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java | Heritrix3Wrapper.job | public JobResult job(String jobname) {
HttpGet getRequest = new HttpGet(baseUrl + "job/" + jobname);
getRequest.addHeader("Accept", "application/xml");
return jobResult(getRequest);
} | java | public JobResult job(String jobname) {
HttpGet getRequest = new HttpGet(baseUrl + "job/" + jobname);
getRequest.addHeader("Accept", "application/xml");
return jobResult(getRequest);
} | [
"public",
"JobResult",
"job",
"(",
"String",
"jobname",
")",
"{",
"HttpGet",
"getRequest",
"=",
"new",
"HttpGet",
"(",
"baseUrl",
"+",
"\"job/\"",
"+",
"jobname",
")",
";",
"getRequest",
".",
"addHeader",
"(",
"\"Accept\"",
",",
"\"application/xml\"",
")",
"... | Returns the job state object given a jobname.
@param jobname job name
@return job state | [
"Returns",
"the",
"job",
"state",
"object",
"given",
"a",
"jobname",
"."
] | e53ec5736cbac0bdd3925b5331737dc905871629 | https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java#L451-L455 |
150,891 | netarchivesuite/heritrix3-wrapper | src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java | Heritrix3Wrapper.copyJob | public JobResult copyJob(String srcJobname, String dstJobName, boolean bAsProfile) {
HttpPost postRequest = new HttpPost(baseUrl + "job/" + srcJobname);
List<NameValuePair> nvp = new LinkedList<NameValuePair>();
nvp.add(new BasicNameValuePair("copyTo", dstJobName));
if (bAsProfile) {
... | java | public JobResult copyJob(String srcJobname, String dstJobName, boolean bAsProfile) {
HttpPost postRequest = new HttpPost(baseUrl + "job/" + srcJobname);
List<NameValuePair> nvp = new LinkedList<NameValuePair>();
nvp.add(new BasicNameValuePair("copyTo", dstJobName));
if (bAsProfile) {
... | [
"public",
"JobResult",
"copyJob",
"(",
"String",
"srcJobname",
",",
"String",
"dstJobName",
",",
"boolean",
"bAsProfile",
")",
"{",
"HttpPost",
"postRequest",
"=",
"new",
"HttpPost",
"(",
"baseUrl",
"+",
"\"job/\"",
"+",
"srcJobname",
")",
";",
"List",
"<",
... | Copy a job.
@param srcJobname source job name
@param dstJobName destination job name
@param bAsProfile define if the job should be copied as a profile or not
@return job state of new job | [
"Copy",
"a",
"job",
"."
] | e53ec5736cbac0bdd3925b5331737dc905871629 | https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java#L503-L520 |
150,892 | netarchivesuite/heritrix3-wrapper | src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java | Heritrix3Wrapper.buildJobConfiguration | public JobResult buildJobConfiguration(String jobname){
HttpPost postRequest = new HttpPost(baseUrl + "job/" + jobname);
StringEntity postEntity = null;
try {
postEntity = new StringEntity(BUILD_ACTION);
} catch (UnsupportedEncodingException e) {
e.printStackTrace... | java | public JobResult buildJobConfiguration(String jobname){
HttpPost postRequest = new HttpPost(baseUrl + "job/" + jobname);
StringEntity postEntity = null;
try {
postEntity = new StringEntity(BUILD_ACTION);
} catch (UnsupportedEncodingException e) {
e.printStackTrace... | [
"public",
"JobResult",
"buildJobConfiguration",
"(",
"String",
"jobname",
")",
"{",
"HttpPost",
"postRequest",
"=",
"new",
"HttpPost",
"(",
"baseUrl",
"+",
"\"job/\"",
"+",
"jobname",
")",
";",
"StringEntity",
"postEntity",
"=",
"null",
";",
"try",
"{",
"postE... | Build an existing job.
@param jobname job name
@return job state | [
"Build",
"an",
"existing",
"job",
"."
] | e53ec5736cbac0bdd3925b5331737dc905871629 | https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java#L527-L539 |
150,893 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/OldestList.java | OldestList.add | public void add(long date, T element) {
if (size == 0) {
elements[0] = element;
dates[0] = date;
size = 1;
oldestIndex = 0;
newestIndex = 0;
return;
}
if (size < elements.length) {
elements[size] = element;
dates[size] = date;
if (date < dates[oldestIndex]) oldestIndex = siz... | java | public void add(long date, T element) {
if (size == 0) {
elements[0] = element;
dates[0] = date;
size = 1;
oldestIndex = 0;
newestIndex = 0;
return;
}
if (size < elements.length) {
elements[size] = element;
dates[size] = date;
if (date < dates[oldestIndex]) oldestIndex = siz... | [
"public",
"void",
"add",
"(",
"long",
"date",
",",
"T",
"element",
")",
"{",
"if",
"(",
"size",
"==",
"0",
")",
"{",
"elements",
"[",
"0",
"]",
"=",
"element",
";",
"dates",
"[",
"0",
"]",
"=",
"date",
";",
"size",
"=",
"1",
";",
"oldestIndex",... | Add an elements with the given timestamp. | [
"Add",
"an",
"elements",
"with",
"the",
"given",
"timestamp",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/OldestList.java#L34-L68 |
150,894 | PureSolTechnologies/extended-objects-titan | titan/src/main/java/com/puresoltechnologies/xo/titan/impl/GremlinManager.java | GremlinManager.getGremlinExpression | public static <QL> GremlinExpression getGremlinExpression(QL expression,
Map<String, Object> parameters) {
GremlinExpression gremlinExpression = null;
if (expression instanceof String) {
gremlinExpression = new GremlinExpression("", (String) expression);
} else if (expression instanceof Gremlin) {
Gre... | java | public static <QL> GremlinExpression getGremlinExpression(QL expression,
Map<String, Object> parameters) {
GremlinExpression gremlinExpression = null;
if (expression instanceof String) {
gremlinExpression = new GremlinExpression("", (String) expression);
} else if (expression instanceof Gremlin) {
Gre... | [
"public",
"static",
"<",
"QL",
">",
"GremlinExpression",
"getGremlinExpression",
"(",
"QL",
"expression",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
")",
"{",
"GremlinExpression",
"gremlinExpression",
"=",
"null",
";",
"if",
"(",
"expression",
... | This is a helper method to extract the Gremlin expression.
@param expression
is the object which comes in from
DatastoreSession#executeQuery(Object, java.util.Map).
@param parameters
is a Map of parameters.
@return A {@link String} containing a Gremlin expression is returned.
@param <QL>
is the query language. | [
"This",
"is",
"a",
"helper",
"method",
"to",
"extract",
"the",
"Gremlin",
"expression",
"."
] | 26c091f04d03d858af7c97230c71f7f7205b4519 | https://github.com/PureSolTechnologies/extended-objects-titan/blob/26c091f04d03d858af7c97230c71f7f7205b4519/titan/src/main/java/com/puresoltechnologies/xo/titan/impl/GremlinManager.java#L33-L58 |
150,895 | hawkular/hawkular-bus | hawkular-bus-common/src/main/java/org/hawkular/bus/common/SimpleBasicMessage.java | SimpleBasicMessage.getDetails | public Map<String, String> getDetails() {
if (details == null) {
return null;
}
return Collections.unmodifiableMap(details);
} | java | public Map<String, String> getDetails() {
if (details == null) {
return null;
}
return Collections.unmodifiableMap(details);
} | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getDetails",
"(",
")",
"{",
"if",
"(",
"details",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"Collections",
".",
"unmodifiableMap",
"(",
"details",
")",
";",
"}"
] | Optional additional details about this message. This could be null if there are no additional details associated
with this message.
@return the details of this message or null. This is an unmodifiable, read-only map of details. | [
"Optional",
"additional",
"details",
"about",
"this",
"message",
".",
"This",
"could",
"be",
"null",
"if",
"there",
"are",
"no",
"additional",
"details",
"associated",
"with",
"this",
"message",
"."
] | 28d6b58bec81a50f8344d39f309b6971271ae627 | https://github.com/hawkular/hawkular-bus/blob/28d6b58bec81a50f8344d39f309b6971271ae627/hawkular-bus-common/src/main/java/org/hawkular/bus/common/SimpleBasicMessage.java#L77-L82 |
150,896 | livetribe/livetribe-slp | core/src/main/java/org/livetribe/slp/spi/sa/ServiceAgentInfo.java | ServiceAgentInfo.from | public static ServiceAgentInfo from(SAAdvert saAdvert)
{
IdentifierExtension identifierExtension = IdentifierExtension.findFirst(saAdvert.getExtensions());
String identifier = identifierExtension == null ? null : identifierExtension.getIdentifier();
return new ServiceAgentInfo(identifier, sa... | java | public static ServiceAgentInfo from(SAAdvert saAdvert)
{
IdentifierExtension identifierExtension = IdentifierExtension.findFirst(saAdvert.getExtensions());
String identifier = identifierExtension == null ? null : identifierExtension.getIdentifier();
return new ServiceAgentInfo(identifier, sa... | [
"public",
"static",
"ServiceAgentInfo",
"from",
"(",
"SAAdvert",
"saAdvert",
")",
"{",
"IdentifierExtension",
"identifierExtension",
"=",
"IdentifierExtension",
".",
"findFirst",
"(",
"saAdvert",
".",
"getExtensions",
"(",
")",
")",
";",
"String",
"identifier",
"=",... | private final int port; | [
"private",
"final",
"int",
"port",
";"
] | 6cc13dbe81feab133fe3dd291ca081cbc6e1f591 | https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/spi/sa/ServiceAgentInfo.java#L41-L46 |
150,897 | skuzzle/TinyPlugz | tiny-plugz/src/main/java/de/skuzzle/tinyplugz/servlet/TinyPlugzContextServlet.java | TinyPlugzContextServlet.wrap | public static Servlet wrap(Servlet servlet) {
Require.nonNull(servlet, "servlet");
if (servlet instanceof TinyPlugzContextServlet) {
return servlet;
}
return new TinyPlugzContextServlet(servlet);
} | java | public static Servlet wrap(Servlet servlet) {
Require.nonNull(servlet, "servlet");
if (servlet instanceof TinyPlugzContextServlet) {
return servlet;
}
return new TinyPlugzContextServlet(servlet);
} | [
"public",
"static",
"Servlet",
"wrap",
"(",
"Servlet",
"servlet",
")",
"{",
"Require",
".",
"nonNull",
"(",
"servlet",
",",
"\"servlet\"",
")",
";",
"if",
"(",
"servlet",
"instanceof",
"TinyPlugzContextServlet",
")",
"{",
"return",
"servlet",
";",
"}",
"retu... | Wraps the given Servlet.
@param servlet The servlet to wrap.
@return The decorated servlet. | [
"Wraps",
"the",
"given",
"Servlet",
"."
] | 739858ed0ba5a0c75b6ccf18df9a4d5612374a4b | https://github.com/skuzzle/TinyPlugz/blob/739858ed0ba5a0c75b6ccf18df9a4d5612374a4b/tiny-plugz/src/main/java/de/skuzzle/tinyplugz/servlet/TinyPlugzContextServlet.java#L37-L43 |
150,898 | jtrfp/javamod | src/main/java/de/quippy/javamod/main/applet/JavaModAppletBase.java | JavaModAppletBase.getPlayingPosition | public int getPlayingPosition()
{
if (playerThread!=null)
{
final Mixer mixer = playerThread.getCurrentMixer();
if (mixer!=null && mixer instanceof ModMixer)
{
final BasicModMixer modMixer = ((ModMixer)mixer).getModMixer();
if (modMixer!=null) return modMixer.getCurrentPatternPosition();
}
}
... | java | public int getPlayingPosition()
{
if (playerThread!=null)
{
final Mixer mixer = playerThread.getCurrentMixer();
if (mixer!=null && mixer instanceof ModMixer)
{
final BasicModMixer modMixer = ((ModMixer)mixer).getModMixer();
if (modMixer!=null) return modMixer.getCurrentPatternPosition();
}
}
... | [
"public",
"int",
"getPlayingPosition",
"(",
")",
"{",
"if",
"(",
"playerThread",
"!=",
"null",
")",
"{",
"final",
"Mixer",
"mixer",
"=",
"playerThread",
".",
"getCurrentMixer",
"(",
")",
";",
"if",
"(",
"mixer",
"!=",
"null",
"&&",
"mixer",
"instanceof",
... | PLAYER INFO METHOD FOR JAVASCRIPT | [
"PLAYER",
"INFO",
"METHOD",
"FOR",
"JAVASCRIPT"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/main/applet/JavaModAppletBase.java#L233-L245 |
150,899 | jtrfp/javamod | src/main/java/de/quippy/jflac/metadata/SeekTable.java | SeekTable.getSeekPoint | public SeekPoint getSeekPoint(int idx) {
if (idx < 0 || idx >= points.length) return null;
return points[idx];
} | java | public SeekPoint getSeekPoint(int idx) {
if (idx < 0 || idx >= points.length) return null;
return points[idx];
} | [
"public",
"SeekPoint",
"getSeekPoint",
"(",
"int",
"idx",
")",
"{",
"if",
"(",
"idx",
"<",
"0",
"||",
"idx",
">=",
"points",
".",
"length",
")",
"return",
"null",
";",
"return",
"points",
"[",
"idx",
"]",
";",
"}"
] | Return the selected seek point.
@param idx The seek point number
@return The selected seek point | [
"Return",
"the",
"selected",
"seek",
"point",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/metadata/SeekTable.java#L100-L103 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.