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,100 | eurekaclinical/datastore | src/main/java/org/eurekaclinical/datastore/bdb/BdbStoreFactory.java | BdbStoreFactory.closeAndRemoveAllDatabaseHandles | final void closeAndRemoveAllDatabaseHandles() {
for (Database databaseHandle : this.databaseHandles) {
try {
databaseHandle.close();
} catch (EnvironmentFailureException | IllegalStateException ex) {
LOGGER.log(Level.SEVERE,
"Error ... | java | final void closeAndRemoveAllDatabaseHandles() {
for (Database databaseHandle : this.databaseHandles) {
try {
databaseHandle.close();
} catch (EnvironmentFailureException | IllegalStateException ex) {
LOGGER.log(Level.SEVERE,
"Error ... | [
"final",
"void",
"closeAndRemoveAllDatabaseHandles",
"(",
")",
"{",
"for",
"(",
"Database",
"databaseHandle",
":",
"this",
".",
"databaseHandles",
")",
"{",
"try",
"{",
"databaseHandle",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"EnvironmentFailureExceptio... | Closes all databases that this factory instance previously created.
@throws EnvironmentFailureException if an unexpected, internal or
environment-wide failure occurs.
@throws IllegalStateException if the database has been closed. | [
"Closes",
"all",
"databases",
"that",
"this",
"factory",
"instance",
"previously",
"created",
"."
] | a03a70819bb562ba45eac66ca49f778035ee45e0 | https://github.com/eurekaclinical/datastore/blob/a03a70819bb562ba45eac66ca49f778035ee45e0/src/main/java/org/eurekaclinical/datastore/bdb/BdbStoreFactory.java#L197-L207 |
150,101 | eurekaclinical/datastore | src/main/java/org/eurekaclinical/datastore/bdb/BdbStoreFactory.java | BdbStoreFactory.createEnvironment | private Environment createEnvironment() {
EnvironmentConfig envConf = createEnvConfig();
if (!envFile.exists()) {
envFile.mkdirs();
}
LOGGER.log(Level.INFO,
"Initialized BerkeleyDB cache environment at {0}",
envFile.getAbsolutePath());
... | java | private Environment createEnvironment() {
EnvironmentConfig envConf = createEnvConfig();
if (!envFile.exists()) {
envFile.mkdirs();
}
LOGGER.log(Level.INFO,
"Initialized BerkeleyDB cache environment at {0}",
envFile.getAbsolutePath());
... | [
"private",
"Environment",
"createEnvironment",
"(",
")",
"{",
"EnvironmentConfig",
"envConf",
"=",
"createEnvConfig",
"(",
")",
";",
"if",
"(",
"!",
"envFile",
".",
"exists",
"(",
")",
")",
"{",
"envFile",
".",
"mkdirs",
"(",
")",
";",
"}",
"LOGGER",
"."... | Creates a Berkeley DB database environment from the provided environment
configuration.
@return an environment instance.
@throws SecurityException if the directory for storing the databases
could not be created.
@throws EnvironmentNotFoundException if the environment does not exist
(does not contain at least one log ... | [
"Creates",
"a",
"Berkeley",
"DB",
"database",
"environment",
"from",
"the",
"provided",
"environment",
"configuration",
"."
] | a03a70819bb562ba45eac66ca49f778035ee45e0 | https://github.com/eurekaclinical/datastore/blob/a03a70819bb562ba45eac66ca49f778035ee45e0/src/main/java/org/eurekaclinical/datastore/bdb/BdbStoreFactory.java#L244-L254 |
150,102 | io7m/jcanephora | com.io7m.jcanephora.lwjgl3/src/main/java/com/io7m/jcanephora/lwjgl3/LWJGL3TypeConversions.java | LWJGL3TypeConversions.framebufferBlitFilterFromGL | public static JCGLFramebufferBlitFilter framebufferBlitFilterFromGL(
final int filter)
{
switch (filter) {
case GL11.GL_LINEAR: {
return JCGLFramebufferBlitFilter.FRAMEBUFFER_BLIT_FILTER_LINEAR;
}
case GL11.GL_NEAREST: {
return JCGLFramebufferBlitFilter.FRAMEBUFFER_BLIT_FILTE... | java | public static JCGLFramebufferBlitFilter framebufferBlitFilterFromGL(
final int filter)
{
switch (filter) {
case GL11.GL_LINEAR: {
return JCGLFramebufferBlitFilter.FRAMEBUFFER_BLIT_FILTER_LINEAR;
}
case GL11.GL_NEAREST: {
return JCGLFramebufferBlitFilter.FRAMEBUFFER_BLIT_FILTE... | [
"public",
"static",
"JCGLFramebufferBlitFilter",
"framebufferBlitFilterFromGL",
"(",
"final",
"int",
"filter",
")",
"{",
"switch",
"(",
"filter",
")",
"{",
"case",
"GL11",
".",
"GL_LINEAR",
":",
"{",
"return",
"JCGLFramebufferBlitFilter",
".",
"FRAMEBUFFER_BLIT_FILTER... | Convert framebuffer blit filter from GL constants.
@param filter The GL constant.
@return The value. | [
"Convert",
"framebuffer",
"blit",
"filter",
"from",
"GL",
"constants",
"."
] | 0004c1744b7f0969841d04cd4fa693f402b10980 | https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.lwjgl3/src/main/java/com/io7m/jcanephora/lwjgl3/LWJGL3TypeConversions.java#L1191-L1204 |
150,103 | io7m/jcanephora | com.io7m.jcanephora.lwjgl3/src/main/java/com/io7m/jcanephora/lwjgl3/LWJGL3TypeConversions.java | LWJGL3TypeConversions.faceSelectionToGL | public static int faceSelectionToGL(
final JCGLFaceSelection faces)
{
switch (faces) {
case FACE_BACK:
return GL11.GL_BACK;
case FACE_FRONT:
return GL11.GL_FRONT;
case FACE_FRONT_AND_BACK:
return GL11.GL_FRONT_AND_BACK;
}
throw new UnreachableCodeException();... | java | public static int faceSelectionToGL(
final JCGLFaceSelection faces)
{
switch (faces) {
case FACE_BACK:
return GL11.GL_BACK;
case FACE_FRONT:
return GL11.GL_FRONT;
case FACE_FRONT_AND_BACK:
return GL11.GL_FRONT_AND_BACK;
}
throw new UnreachableCodeException();... | [
"public",
"static",
"int",
"faceSelectionToGL",
"(",
"final",
"JCGLFaceSelection",
"faces",
")",
"{",
"switch",
"(",
"faces",
")",
"{",
"case",
"FACE_BACK",
":",
"return",
"GL11",
".",
"GL_BACK",
";",
"case",
"FACE_FRONT",
":",
"return",
"GL11",
".",
"GL_FRO... | Convert faces to GL constants.
@param faces The faces.
@return The resulting GL constant. | [
"Convert",
"faces",
"to",
"GL",
"constants",
"."
] | 0004c1744b7f0969841d04cd4fa693f402b10980 | https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.lwjgl3/src/main/java/com/io7m/jcanephora/lwjgl3/LWJGL3TypeConversions.java#L1324-L1337 |
150,104 | io7m/jcanephora | com.io7m.jcanephora.lwjgl3/src/main/java/com/io7m/jcanephora/lwjgl3/LWJGL3TypeConversions.java | LWJGL3TypeConversions.faceWindingOrderToGL | public static int faceWindingOrderToGL(
final JCGLFaceWindingOrder f)
{
switch (f) {
case FRONT_FACE_CLOCKWISE:
return GL11.GL_CW;
case FRONT_FACE_COUNTER_CLOCKWISE:
return GL11.GL_CCW;
}
throw new UnreachableCodeException();
} | java | public static int faceWindingOrderToGL(
final JCGLFaceWindingOrder f)
{
switch (f) {
case FRONT_FACE_CLOCKWISE:
return GL11.GL_CW;
case FRONT_FACE_COUNTER_CLOCKWISE:
return GL11.GL_CCW;
}
throw new UnreachableCodeException();
} | [
"public",
"static",
"int",
"faceWindingOrderToGL",
"(",
"final",
"JCGLFaceWindingOrder",
"f",
")",
"{",
"switch",
"(",
"f",
")",
"{",
"case",
"FRONT_FACE_CLOCKWISE",
":",
"return",
"GL11",
".",
"GL_CW",
";",
"case",
"FRONT_FACE_COUNTER_CLOCKWISE",
":",
"return",
... | Convert face winding orders to GL constants.
@param f The face winding order.
@return The resulting GL constant. | [
"Convert",
"face",
"winding",
"orders",
"to",
"GL",
"constants",
"."
] | 0004c1744b7f0969841d04cd4fa693f402b10980 | https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.lwjgl3/src/main/java/com/io7m/jcanephora/lwjgl3/LWJGL3TypeConversions.java#L1368-L1379 |
150,105 | eurekaclinical/eurekaclinical-standard-apis | src/main/java/org/eurekaclinical/standardapis/filter/RolesFromDbFilter.java | RolesFromDbFilter.getRoles | @Override
protected String[] getRoles(Principal inPrincipal, ServletRequest inRequest) {
UserEntity user = this.userDao.getByPrincipal(inPrincipal);
if (user != null) {
return user.getRoleNames();
} else {
return null;
}
} | java | @Override
protected String[] getRoles(Principal inPrincipal, ServletRequest inRequest) {
UserEntity user = this.userDao.getByPrincipal(inPrincipal);
if (user != null) {
return user.getRoleNames();
} else {
return null;
}
} | [
"@",
"Override",
"protected",
"String",
"[",
"]",
"getRoles",
"(",
"Principal",
"inPrincipal",
",",
"ServletRequest",
"inRequest",
")",
"{",
"UserEntity",
"user",
"=",
"this",
".",
"userDao",
".",
"getByPrincipal",
"(",
"inPrincipal",
")",
";",
"if",
"(",
"u... | The getRoles method will now return
Null if UserObject not found,
EMPTY_ARRAY if the user found and don't have any associated roles and
String Array if the user found and have associated roles.
@param inPrincipal the user principal.
@param inRequest the HTTP request.
@return Array of Roles, empth array if no roles asso... | [
"The",
"getRoles",
"method",
"will",
"now",
"return",
"Null",
"if",
"UserObject",
"not",
"found",
"EMPTY_ARRAY",
"if",
"the",
"user",
"found",
"and",
"don",
"t",
"have",
"any",
"associated",
"roles",
"and",
"String",
"Array",
"if",
"the",
"user",
"found",
... | 690036dde82a4f2c2106d32403cdf1c713429377 | https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/filter/RolesFromDbFilter.java#L63-L72 |
150,106 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj21/ClockSkewDetector.java | ClockSkewDetector.performClockSkewDetection | public long performClockSkewDetection(Calendar clientTime) throws IfmapErrorResult, IfmapException {
publishTime(clientTime);
Element time = searchTime();
deleteTimes();
mClockSkew = calculateTimeDiff(time);
mLastTimeSynchronization = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
return mClockSkew;
... | java | public long performClockSkewDetection(Calendar clientTime) throws IfmapErrorResult, IfmapException {
publishTime(clientTime);
Element time = searchTime();
deleteTimes();
mClockSkew = calculateTimeDiff(time);
mLastTimeSynchronization = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
return mClockSkew;
... | [
"public",
"long",
"performClockSkewDetection",
"(",
"Calendar",
"clientTime",
")",
"throws",
"IfmapErrorResult",
",",
"IfmapException",
"{",
"publishTime",
"(",
"clientTime",
")",
";",
"Element",
"time",
"=",
"searchTime",
"(",
")",
";",
"deleteTimes",
"(",
")",
... | Send a client-time publish request with the current time followed by
a search request in order to synchronize time to MAPS.
<pre>
This function implements the behaviour described in sec. 4.6.1
of published TNC IF-MAP Binding for SOAP specification 2.1 Rev 15.
</pre>
@since 0.1.5
@throws IfmapErrorResult
@throws Ifmap... | [
"Send",
"a",
"client",
"-",
"time",
"publish",
"request",
"with",
"the",
"current",
"time",
"followed",
"by",
"a",
"search",
"request",
"in",
"order",
"to",
"synchronize",
"time",
"to",
"MAPS",
"."
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj21/ClockSkewDetector.java#L169-L178 |
150,107 | trustathsh/ifmapj | src/main/java/de/hshannover/f4/trust/ifmapj21/ClockSkewDetector.java | ClockSkewDetector.getClockOfServer | public Calendar getClockOfServer() {
Calendar retCal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
retCal.add(Calendar.MILLISECOND, mClockSkew.intValue());
return retCal;
} | java | public Calendar getClockOfServer() {
Calendar retCal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
retCal.add(Calendar.MILLISECOND, mClockSkew.intValue());
return retCal;
} | [
"public",
"Calendar",
"getClockOfServer",
"(",
")",
"{",
"Calendar",
"retCal",
"=",
"Calendar",
".",
"getInstance",
"(",
"TimeZone",
".",
"getTimeZone",
"(",
"\"UTC\"",
")",
")",
";",
"retCal",
".",
"add",
"(",
"Calendar",
".",
"MILLISECOND",
",",
"mClockSke... | The corrected server time
@since 0.1.5
@return current UTC server time | [
"The",
"corrected",
"server",
"time"
] | 44ece9e95a3d2a1b7019573ba6178598a6cbdaa3 | https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj21/ClockSkewDetector.java#L246-L250 |
150,108 | agmip/dome | src/main/java/org/agmip/dome/Engine.java | Engine.getGenerators | public ArrayList<String> getGenerators() {
ArrayList<String> genList = new ArrayList<String>();
for (ArrayList<HashMap<String, String>> genGroup : genGroups) {
if (!genGroup.isEmpty()) {
HashMap<String, String> genRule = genGroup.get(genGroup.size() - 1);
if (... | java | public ArrayList<String> getGenerators() {
ArrayList<String> genList = new ArrayList<String>();
for (ArrayList<HashMap<String, String>> genGroup : genGroups) {
if (!genGroup.isEmpty()) {
HashMap<String, String> genRule = genGroup.get(genGroup.size() - 1);
if (... | [
"public",
"ArrayList",
"<",
"String",
">",
"getGenerators",
"(",
")",
"{",
"ArrayList",
"<",
"String",
">",
"genList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"ArrayList",
"<",
"HashMap",
"<",
"String",
",",
"String",
">... | Get the list of loaded generator rules
@return The list of DOME command string with format
(command,variable,arguments) | [
"Get",
"the",
"list",
"of",
"loaded",
"generator",
"rules"
] | ca7c15bf2bae09bb7e8d51160e77592bbda9343d | https://github.com/agmip/dome/blob/ca7c15bf2bae09bb7e8d51160e77592bbda9343d/src/main/java/org/agmip/dome/Engine.java#L591-L603 |
150,109 | aragozin/jorka | src/main/java/org/gridkit/jorka/Jorka.java | Jorka.addPatternFromFile | public void addPatternFromFile(String file) throws IOException {
File f = new File(file);
addPatternFromReader(new FileReader(f));
} | java | public void addPatternFromFile(String file) throws IOException {
File f = new File(file);
addPatternFromReader(new FileReader(f));
} | [
"public",
"void",
"addPatternFromFile",
"(",
"String",
"file",
")",
"throws",
"IOException",
"{",
"File",
"f",
"=",
"new",
"File",
"(",
"file",
")",
";",
"addPatternFromReader",
"(",
"new",
"FileReader",
"(",
"f",
")",
")",
";",
"}"
] | Add patterns from a file | [
"Add",
"patterns",
"from",
"a",
"file"
] | 9f380a97e834c32cbfbe10508365683ea969b533 | https://github.com/aragozin/jorka/blob/9f380a97e834c32cbfbe10508365683ea969b533/src/main/java/org/gridkit/jorka/Jorka.java#L143-L147 |
150,110 | aragozin/jorka | src/main/java/org/gridkit/jorka/Jorka.java | Jorka.addPatternFromReader | public void addPatternFromReader(Reader r) throws IOException {
BufferedReader br = new BufferedReader(r);
String line;
// We dont want \n and commented line
Pattern MY_PATTERN = Pattern.compile("^([A-z0-9_]+)([~]?)\\s+(.*)$");
while ((line = br.readLine()) != null) {
Matcher m = MY_PATTERN.matcher(line);
... | java | public void addPatternFromReader(Reader r) throws IOException {
BufferedReader br = new BufferedReader(r);
String line;
// We dont want \n and commented line
Pattern MY_PATTERN = Pattern.compile("^([A-z0-9_]+)([~]?)\\s+(.*)$");
while ((line = br.readLine()) != null) {
Matcher m = MY_PATTERN.matcher(line);
... | [
"public",
"void",
"addPatternFromReader",
"(",
"Reader",
"r",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"br",
"=",
"new",
"BufferedReader",
"(",
"r",
")",
";",
"String",
"line",
";",
"// We dont want \\n and commented line",
"Pattern",
"MY_PATTERN",
"=",
... | Add patterns from a reader | [
"Add",
"patterns",
"from",
"a",
"reader"
] | 9f380a97e834c32cbfbe10508365683ea969b533 | https://github.com/aragozin/jorka/blob/9f380a97e834c32cbfbe10508365683ea969b533/src/main/java/org/gridkit/jorka/Jorka.java#L152-L170 |
150,111 | aragozin/jorka | src/main/java/org/gridkit/jorka/Jorka.java | Jorka.compile | public void compile(String pattern) {
this.expandedPattern = expand(pattern);
// Compile the regex
if (!expandedPattern.isEmpty()) {
regexp = Pattern.compile(expandedPattern);
} else {
throw new IllegalArgumentException("Pattern is not found '"
+ pattern + "'");
}
} | java | public void compile(String pattern) {
this.expandedPattern = expand(pattern);
// Compile the regex
if (!expandedPattern.isEmpty()) {
regexp = Pattern.compile(expandedPattern);
} else {
throw new IllegalArgumentException("Pattern is not found '"
+ pattern + "'");
}
} | [
"public",
"void",
"compile",
"(",
"String",
"pattern",
")",
"{",
"this",
".",
"expandedPattern",
"=",
"expand",
"(",
"pattern",
")",
";",
"// Compile the regex",
"if",
"(",
"!",
"expandedPattern",
".",
"isEmpty",
"(",
")",
")",
"{",
"regexp",
"=",
"Pattern... | Transform Jorka regex into a compiled regex | [
"Transform",
"Jorka",
"regex",
"into",
"a",
"compiled",
"regex"
] | 9f380a97e834c32cbfbe10508365683ea969b533 | https://github.com/aragozin/jorka/blob/9f380a97e834c32cbfbe10508365683ea969b533/src/main/java/org/gridkit/jorka/Jorka.java#L227-L237 |
150,112 | bwkimmel/jdcp | jdcp-worker/src/main/java/ca/eandb/jdcp/worker/DbCachingJobServiceClassLoaderStrategy.java | DbCachingJobServiceClassLoaderStrategy.prepareDataSource | public static void prepareDataSource(DataSource ds) throws SQLException {
Connection con = null;
String sql;
try {
con = ds.getConnection();
con.setAutoCommit(false);
DatabaseMetaData meta = con.getMetaData();
ResultSet rs = meta.getTables(null, null, null, new String[]{"TABLE"});
... | java | public static void prepareDataSource(DataSource ds) throws SQLException {
Connection con = null;
String sql;
try {
con = ds.getConnection();
con.setAutoCommit(false);
DatabaseMetaData meta = con.getMetaData();
ResultSet rs = meta.getTables(null, null, null, new String[]{"TABLE"});
... | [
"public",
"static",
"void",
"prepareDataSource",
"(",
"DataSource",
"ds",
")",
"throws",
"SQLException",
"{",
"Connection",
"con",
"=",
"null",
";",
"String",
"sql",
";",
"try",
"{",
"con",
"=",
"ds",
".",
"getConnection",
"(",
")",
";",
"con",
".",
"set... | Prepares the data source to store cached class definitions.
@param ds The <code>DataSource</code> to prepare.
@throws SQLException If an error occurs while communicating with the
database. | [
"Prepares",
"the",
"data",
"source",
"to",
"store",
"cached",
"class",
"definitions",
"."
] | 630c5150c245054e2556ff370f4bad2ec793dfb7 | https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-worker/src/main/java/ca/eandb/jdcp/worker/DbCachingJobServiceClassLoaderStrategy.java#L63-L103 |
150,113 | jtrfp/javamod | src/main/java/de/quippy/sidplay/libsidplay/components/sidtune/PP20.java | PP20.decompress | public int /* udword_ppt */decompress(
final short[] /* const void* */source, int /* udword_ppt */size,
final Decompressed decomp) {
this.source = source;
globalError = false; // assume no error
readPtr = 0;
if (!isCompressed(source, size)) {
return 0;
}
// Uncompressed size is stored at end of ... | java | public int /* udword_ppt */decompress(
final short[] /* const void* */source, int /* udword_ppt */size,
final Decompressed decomp) {
this.source = source;
globalError = false; // assume no error
readPtr = 0;
if (!isCompressed(source, size)) {
return 0;
}
// Uncompressed size is stored at end of ... | [
"public",
"int",
"/* udword_ppt */",
"decompress",
"(",
"final",
"short",
"[",
"]",
"/* const void* */",
"source",
",",
"int",
"/* udword_ppt */",
"size",
",",
"final",
"Decompressed",
"decomp",
")",
"{",
"this",
".",
"source",
"=",
"source",
";",
"globalError",... | If successful, allocates a new buffer containing the uncompresse data and
returns the uncompressed length. Else, returns 0.
@return | [
"If",
"successful",
"allocates",
"a",
"new",
"buffer",
"containing",
"the",
"uncompresse",
"data",
"and",
"returns",
"the",
"uncompressed",
"length",
".",
"Else",
"returns",
"0",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/sidplay/libsidplay/components/sidtune/PP20.java#L52-L109 |
150,114 | jtrfp/javamod | src/main/java/de/quippy/sidplay/libsidplay/components/sidtune/PP20.java | PP20.readBEdword | int /* udword_ppt */readBEdword(final short[] /* ubyte_ppt[4] */ptr,
int pos) {
return (((((short /* udword_ppt */) ptr[pos + 0]) << 24)
+ (((short /* udword_ppt */) ptr[pos + 1]) << 16)
+ (((short /* udword_ppt */) ptr[pos + 2]) << 8) + ((short /* udword_ppt */) ptr[pos + 3])) << 0);
} | java | int /* udword_ppt */readBEdword(final short[] /* ubyte_ppt[4] */ptr,
int pos) {
return (((((short /* udword_ppt */) ptr[pos + 0]) << 24)
+ (((short /* udword_ppt */) ptr[pos + 1]) << 16)
+ (((short /* udword_ppt */) ptr[pos + 2]) << 8) + ((short /* udword_ppt */) ptr[pos + 3])) << 0);
} | [
"int",
"/* udword_ppt */",
"readBEdword",
"(",
"final",
"short",
"[",
"]",
"/* ubyte_ppt[4] */",
"ptr",
",",
"int",
"pos",
")",
"{",
"return",
"(",
"(",
"(",
"(",
"(",
"short",
"/* udword_ppt */",
")",
"ptr",
"[",
"pos",
"+",
"0",
"]",
")",
"<<",
"24",... | Read a big-endian 32-bit word from four bytes in memory. No
endian-specific optimizations applied.
@param ptr
@param pos
@return | [
"Read",
"a",
"big",
"-",
"endian",
"32",
"-",
"bit",
"word",
"from",
"four",
"bytes",
"in",
"memory",
".",
"No",
"endian",
"-",
"specific",
"optimizations",
"applied",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/sidplay/libsidplay/components/sidtune/PP20.java#L272-L277 |
150,115 | jtrfp/javamod | src/main/java/de/quippy/jflac/frame/EntropyPartitionedRice.java | EntropyPartitionedRice.readResidual | void readResidual(BitInputStream is, int predictorOrder, int partitionOrder, Header header, int[] residual) throws IOException {
//System.out.println("readREsidual Pred="+predictorOrder+" part="+partitionOrder);
int sample = 0;
int partitions = 1 << partitionOrder;
int partitionSamples =... | java | void readResidual(BitInputStream is, int predictorOrder, int partitionOrder, Header header, int[] residual) throws IOException {
//System.out.println("readREsidual Pred="+predictorOrder+" part="+partitionOrder);
int sample = 0;
int partitions = 1 << partitionOrder;
int partitionSamples =... | [
"void",
"readResidual",
"(",
"BitInputStream",
"is",
",",
"int",
"predictorOrder",
",",
"int",
"partitionOrder",
",",
"Header",
"header",
",",
"int",
"[",
"]",
"residual",
")",
"throws",
"IOException",
"{",
"//System.out.println(\"readREsidual Pred=\"+predictorOrder+\" ... | Read compressed signal residual data.
@param is The InputBitStream
@param predictorOrder The predicate order
@param partitionOrder The partition order
@param header The FLAC Frame Header
@param residual The residual signal (output)
@throws IOException On error reading from... | [
"Read",
"compressed",
"signal",
"residual",
"data",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/frame/EntropyPartitionedRice.java#L49-L72 |
150,116 | jtrfp/javamod | src/main/java/de/quippy/jflac/metadata/StreamInfo.java | StreamInfo.calcLength | public int calcLength() {
int bits = STREAMINFO_MIN_BLOCK_SIZE_LEN
+ STREAMINFO_MAX_BLOCK_SIZE_LEN
+ STREAMINFO_MIN_FRAME_SIZE_LEN
+ STREAMINFO_MAX_FRAME_SIZE_LEN
+ STREAMINFO_SAMPLE_RATE_LEN
+ STREAMINFO_CHANNELS_LE... | java | public int calcLength() {
int bits = STREAMINFO_MIN_BLOCK_SIZE_LEN
+ STREAMINFO_MAX_BLOCK_SIZE_LEN
+ STREAMINFO_MIN_FRAME_SIZE_LEN
+ STREAMINFO_MAX_FRAME_SIZE_LEN
+ STREAMINFO_SAMPLE_RATE_LEN
+ STREAMINFO_CHANNELS_LE... | [
"public",
"int",
"calcLength",
"(",
")",
"{",
"int",
"bits",
"=",
"STREAMINFO_MIN_BLOCK_SIZE_LEN",
"+",
"STREAMINFO_MAX_BLOCK_SIZE_LEN",
"+",
"STREAMINFO_MIN_FRAME_SIZE_LEN",
"+",
"STREAMINFO_MAX_FRAME_SIZE_LEN",
"+",
"STREAMINFO_SAMPLE_RATE_LEN",
"+",
"STREAMINFO_CHANNELS_LEN"... | Calculate the metadata block size.
@return The metadata block size | [
"Calculate",
"the",
"metadata",
"block",
"size",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/metadata/StreamInfo.java#L128-L139 |
150,117 | jtrfp/javamod | src/main/java/de/quippy/jflac/metadata/StreamInfo.java | StreamInfo.compatiable | public boolean compatiable(StreamInfo info) {
if (sampleRate != info.sampleRate) return false;
if (channels != info.channels) return false;
if (bitsPerSample != info.bitsPerSample) return false;
return true;
} | java | public boolean compatiable(StreamInfo info) {
if (sampleRate != info.sampleRate) return false;
if (channels != info.channels) return false;
if (bitsPerSample != info.bitsPerSample) return false;
return true;
} | [
"public",
"boolean",
"compatiable",
"(",
"StreamInfo",
"info",
")",
"{",
"if",
"(",
"sampleRate",
"!=",
"info",
".",
"sampleRate",
")",
"return",
"false",
";",
"if",
"(",
"channels",
"!=",
"info",
".",
"channels",
")",
"return",
"false",
";",
"if",
"(",
... | Check for compatiable StreamInfo.
Checks if sampleRate, channels, and bitsPerSample are equal
@param info The StreamInfo block to check
@return True if this and info are compatable | [
"Check",
"for",
"compatiable",
"StreamInfo",
".",
"Checks",
"if",
"sampleRate",
"channels",
"and",
"bitsPerSample",
"are",
"equal"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/metadata/StreamInfo.java#L147-L152 |
150,118 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/converter/GenericConverter.java | GenericConverter.readFile | public void readFile(String filename) throws ConverterException {
try {
content = "";
final InputStream input = ResourceManager.getInputStream(filename);
while (input.available() > 0) {
content = content + (char) input.read();
}
input.c... | java | public void readFile(String filename) throws ConverterException {
try {
content = "";
final InputStream input = ResourceManager.getInputStream(filename);
while (input.available() > 0) {
content = content + (char) input.read();
}
input.c... | [
"public",
"void",
"readFile",
"(",
"String",
"filename",
")",
"throws",
"ConverterException",
"{",
"try",
"{",
"content",
"=",
"\"\"",
";",
"final",
"InputStream",
"input",
"=",
"ResourceManager",
".",
"getInputStream",
"(",
"filename",
")",
";",
"while",
"(",... | Reads the content of the converter file
@param filename The file
@throws ConverterException | [
"Reads",
"the",
"content",
"of",
"the",
"converter",
"file"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/converter/GenericConverter.java#L97-L108 |
150,119 | zmarko/jPasswordObfuscator | jPasswordObfuscator-lib/src/main/java/rs/in/zivanovic/obfuscator/Unobfuscated.java | Unobfuscated.asByteArray | public byte[] asByteArray() {
Objects.requireNonNull(data);
byte[] ret = Arrays.copyOf(data, data.length);
Arrays.fill(data, (byte) 0);
data = null;
return ret;
} | java | public byte[] asByteArray() {
Objects.requireNonNull(data);
byte[] ret = Arrays.copyOf(data, data.length);
Arrays.fill(data, (byte) 0);
data = null;
return ret;
} | [
"public",
"byte",
"[",
"]",
"asByteArray",
"(",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"data",
")",
";",
"byte",
"[",
"]",
"ret",
"=",
"Arrays",
".",
"copyOf",
"(",
"data",
",",
"data",
".",
"length",
")",
";",
"Arrays",
".",
"fill",
"(",... | Return un-obfuscated data as byte array.
@return un-obfuscated data | [
"Return",
"un",
"-",
"obfuscated",
"data",
"as",
"byte",
"array",
"."
] | 40844a826bb4d6ccac0caa2480cd89c6362cfdd0 | https://github.com/zmarko/jPasswordObfuscator/blob/40844a826bb4d6ccac0caa2480cd89c6362cfdd0/jPasswordObfuscator-lib/src/main/java/rs/in/zivanovic/obfuscator/Unobfuscated.java#L66-L72 |
150,120 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/launcher/DynamicLibrariesManager.java | DynamicLibrariesManager.getResourceFrom | public IO.Readable getResourceFrom(ClassLoader cl, String path, byte priority) {
IOProvider.Readable provider = new IOProviderFromPathUsingClassloader(cl).get(path);
if (provider == null)
return null;
try {
return provider.provideIOReadable(priority);
} catch (IOException e) {
return null;
}
... | java | public IO.Readable getResourceFrom(ClassLoader cl, String path, byte priority) {
IOProvider.Readable provider = new IOProviderFromPathUsingClassloader(cl).get(path);
if (provider == null)
return null;
try {
return provider.provideIOReadable(priority);
} catch (IOException e) {
return null;
}
... | [
"public",
"IO",
".",
"Readable",
"getResourceFrom",
"(",
"ClassLoader",
"cl",
",",
"String",
"path",
",",
"byte",
"priority",
")",
"{",
"IOProvider",
".",
"Readable",
"provider",
"=",
"new",
"IOProviderFromPathUsingClassloader",
"(",
"cl",
")",
".",
"get",
"("... | Open a resource from the given class loader. | [
"Open",
"a",
"resource",
"from",
"the",
"given",
"class",
"loader",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/launcher/DynamicLibrariesManager.java#L800-L809 |
150,121 | OSSIndex/heuristic-version | src/main/java/net/ossindex/version/impl/VersionListener.java | VersionListener.exitIdentifier | @Override
public void exitIdentifier(VersionParser.IdentifierContext ctx) {
String postfix = ctx.getText();
// A numeric postfix cannot have leading zeroes
// FIXME: Check to see if an alphanumeric postfix with leading zeroes counts
Matcher m = numericHasLeadingZeroes.matcher(postfix);
while (m.fi... | java | @Override
public void exitIdentifier(VersionParser.IdentifierContext ctx) {
String postfix = ctx.getText();
// A numeric postfix cannot have leading zeroes
// FIXME: Check to see if an alphanumeric postfix with leading zeroes counts
Matcher m = numericHasLeadingZeroes.matcher(postfix);
while (m.fi... | [
"@",
"Override",
"public",
"void",
"exitIdentifier",
"(",
"VersionParser",
".",
"IdentifierContext",
"ctx",
")",
"{",
"String",
"postfix",
"=",
"ctx",
".",
"getText",
"(",
")",
";",
"// A numeric postfix cannot have leading zeroes",
"// FIXME: Check to see if an alphanume... | Normalize the postfix to something that semantic version can handle | [
"Normalize",
"the",
"postfix",
"to",
"something",
"that",
"semantic",
"version",
"can",
"handle"
] | 9fe33a49d74acec54ddb91de9a3c3cd2f98fba40 | https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/impl/VersionListener.java#L126-L140 |
150,122 | OSSIndex/heuristic-version | src/main/java/net/ossindex/version/impl/VersionListener.java | VersionListener.exitNamed_version | @Override
public void exitNamed_version(VersionParser.Named_versionContext ctx)
{
IVersion version = null;
try {
version = new NamedVersion(ctx.getText());
}
catch (InvalidRangeException e) {
throw new InvalidRangeRuntimeException(e.getMessage(), e);
}
stack.push(version);
} | java | @Override
public void exitNamed_version(VersionParser.Named_versionContext ctx)
{
IVersion version = null;
try {
version = new NamedVersion(ctx.getText());
}
catch (InvalidRangeException e) {
throw new InvalidRangeRuntimeException(e.getMessage(), e);
}
stack.push(version);
} | [
"@",
"Override",
"public",
"void",
"exitNamed_version",
"(",
"VersionParser",
".",
"Named_versionContext",
"ctx",
")",
"{",
"IVersion",
"version",
"=",
"null",
";",
"try",
"{",
"version",
"=",
"new",
"NamedVersion",
"(",
"ctx",
".",
"getText",
"(",
")",
")",... | Get a named version. | [
"Get",
"a",
"named",
"version",
"."
] | 9fe33a49d74acec54ddb91de9a3c3cd2f98fba40 | https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/impl/VersionListener.java#L244-L255 |
150,123 | OSSIndex/heuristic-version | src/main/java/net/ossindex/version/impl/VersionListener.java | VersionListener.exitRange | @Override
public void exitRange(VersionParser.RangeContext ctx)
{
Object o = stack.pop();
if (o instanceof IVersion) {
//range = new SemanticVersionRange((SemanticVersion)o);
range = new VersionSet((IVersion) o);
}
else if (o instanceof IVersionRange) {
range = (IVersionRange) o;
... | java | @Override
public void exitRange(VersionParser.RangeContext ctx)
{
Object o = stack.pop();
if (o instanceof IVersion) {
//range = new SemanticVersionRange((SemanticVersion)o);
range = new VersionSet((IVersion) o);
}
else if (o instanceof IVersionRange) {
range = (IVersionRange) o;
... | [
"@",
"Override",
"public",
"void",
"exitRange",
"(",
"VersionParser",
".",
"RangeContext",
"ctx",
")",
"{",
"Object",
"o",
"=",
"stack",
".",
"pop",
"(",
")",
";",
"if",
"(",
"o",
"instanceof",
"IVersion",
")",
"{",
"//range = new SemanticVersionRange((Semanti... | Get whatever is on the stack and make a version range out of it
@see net.ossindex.version.parser.VersionBaseListener#exitRange(net.ossindex.version.parser.VersionParser.RangeContext) | [
"Get",
"whatever",
"is",
"on",
"the",
"stack",
"and",
"make",
"a",
"version",
"range",
"out",
"of",
"it"
] | 9fe33a49d74acec54ddb91de9a3c3cd2f98fba40 | https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/impl/VersionListener.java#L262-L274 |
150,124 | OSSIndex/heuristic-version | src/main/java/net/ossindex/version/impl/VersionListener.java | VersionListener.exitSemantic_range | @Override
public void exitSemantic_range(VersionParser.Semantic_rangeContext ctx) {
String operator = ctx.getChild(0).getText();
Object o = stack.pop();
if (o instanceof SemanticVersion) {
switch (operator) {
case "^":
SemanticVersion sv = (SemanticVersion) o;
VersionRang... | java | @Override
public void exitSemantic_range(VersionParser.Semantic_rangeContext ctx) {
String operator = ctx.getChild(0).getText();
Object o = stack.pop();
if (o instanceof SemanticVersion) {
switch (operator) {
case "^":
SemanticVersion sv = (SemanticVersion) o;
VersionRang... | [
"@",
"Override",
"public",
"void",
"exitSemantic_range",
"(",
"VersionParser",
".",
"Semantic_rangeContext",
"ctx",
")",
"{",
"String",
"operator",
"=",
"ctx",
".",
"getChild",
"(",
"0",
")",
".",
"getText",
"(",
")",
";",
"Object",
"o",
"=",
"stack",
".",... | Special semantic version type ranges | [
"Special",
"semantic",
"version",
"type",
"ranges"
] | 9fe33a49d74acec54ddb91de9a3c3cd2f98fba40 | https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/impl/VersionListener.java#L279-L297 |
150,125 | OSSIndex/heuristic-version | src/main/java/net/ossindex/version/impl/VersionListener.java | VersionListener.exitSimple_range | @Override
public void exitSimple_range(VersionParser.Simple_rangeContext ctx)
{
String operator = ctx.getChild(0).getText();
Object o = stack.pop();
if (o instanceof SemanticVersion) {
//range = new SemanticVersionRange((SemanticVersion)o);
switch (operator) {
case "~>":
//... | java | @Override
public void exitSimple_range(VersionParser.Simple_rangeContext ctx)
{
String operator = ctx.getChild(0).getText();
Object o = stack.pop();
if (o instanceof SemanticVersion) {
//range = new SemanticVersionRange((SemanticVersion)o);
switch (operator) {
case "~>":
//... | [
"@",
"Override",
"public",
"void",
"exitSimple_range",
"(",
"VersionParser",
".",
"Simple_rangeContext",
"ctx",
")",
"{",
"String",
"operator",
"=",
"ctx",
".",
"getChild",
"(",
"0",
")",
".",
"getText",
"(",
")",
";",
"Object",
"o",
"=",
"stack",
".",
"... | A simple range.
< 1.2.5
@see net.ossindex.version.parser.VersionBaseListener#exitSimple_range(net.ossindex.version.parser.VersionParser.Simple_rangeContext) | [
"A",
"simple",
"range",
"."
] | 9fe33a49d74acec54ddb91de9a3c3cd2f98fba40 | https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/impl/VersionListener.java#L306-L331 |
150,126 | OSSIndex/heuristic-version | src/main/java/net/ossindex/version/impl/VersionListener.java | VersionListener.exitVersion_set | @Override
public void exitVersion_set(VersionParser.Version_setContext ctx)
{
Object o1 = stack.pop();
if (strict && (o1 instanceof NamedVersion)) {
String name = o1.toString();
// FIXME: There needs to be a better way to identify illegal named versions. Perhaps insist it contains an alphanumeri... | java | @Override
public void exitVersion_set(VersionParser.Version_setContext ctx)
{
Object o1 = stack.pop();
if (strict && (o1 instanceof NamedVersion)) {
String name = o1.toString();
// FIXME: There needs to be a better way to identify illegal named versions. Perhaps insist it contains an alphanumeri... | [
"@",
"Override",
"public",
"void",
"exitVersion_set",
"(",
"VersionParser",
".",
"Version_setContext",
"ctx",
")",
"{",
"Object",
"o1",
"=",
"stack",
".",
"pop",
"(",
")",
";",
"if",
"(",
"strict",
"&&",
"(",
"o1",
"instanceof",
"NamedVersion",
")",
")",
... | Set of versions
@see net.ossindex.version.parser.VersionBaseListener#exitVersion_set(net.ossindex.version.parser.VersionParser.Version_setContext) | [
"Set",
"of",
"versions"
] | 9fe33a49d74acec54ddb91de9a3c3cd2f98fba40 | https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/impl/VersionListener.java#L338-L361 |
150,127 | OSSIndex/heuristic-version | src/main/java/net/ossindex/version/impl/NamedVersion.java | NamedVersion.isValidNamedVersion | public boolean isValidNamedVersion(final String s) {
if (SEMANTIC_RANGE_SPECIAL_CHARS.matcher(s).find()
|| SET_RANGE_SPECIAL_CHARS.matcher(s).find()
|| INVALID_VERSION_CHARS.matcher(s).find()
) {
return false;
}
return true;
} | java | public boolean isValidNamedVersion(final String s) {
if (SEMANTIC_RANGE_SPECIAL_CHARS.matcher(s).find()
|| SET_RANGE_SPECIAL_CHARS.matcher(s).find()
|| INVALID_VERSION_CHARS.matcher(s).find()
) {
return false;
}
return true;
} | [
"public",
"boolean",
"isValidNamedVersion",
"(",
"final",
"String",
"s",
")",
"{",
"if",
"(",
"SEMANTIC_RANGE_SPECIAL_CHARS",
".",
"matcher",
"(",
"s",
")",
".",
"find",
"(",
")",
"||",
"SET_RANGE_SPECIAL_CHARS",
".",
"matcher",
"(",
"s",
")",
".",
"find",
... | People use all sorts of whack characters in version. We are just excluding
the smallest set that we can. | [
"People",
"use",
"all",
"sorts",
"of",
"whack",
"characters",
"in",
"version",
".",
"We",
"are",
"just",
"excluding",
"the",
"smallest",
"set",
"that",
"we",
"can",
"."
] | 9fe33a49d74acec54ddb91de9a3c3cd2f98fba40 | https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/impl/NamedVersion.java#L154-L162 |
150,128 | danidemi/jlubricant | jlubricant-embeddable-h2/src/main/java/com/danidemi/jlubricant/embeddable/h2/H2Dbms.java | H2Dbms.dbByName | @Override
public JdbcDatabaseDescriptor dbByName(final String dbName) {
Collection<H2DatabaseWorking> select = CollectionUtils.select(dbsw, new Predicate<H2DatabaseWorking>() {
@Override
public boolean evaluate(H2DatabaseWorking db) {
return dbName.equals( db.getName() );
}
});
if(CollectionUtils.... | java | @Override
public JdbcDatabaseDescriptor dbByName(final String dbName) {
Collection<H2DatabaseWorking> select = CollectionUtils.select(dbsw, new Predicate<H2DatabaseWorking>() {
@Override
public boolean evaluate(H2DatabaseWorking db) {
return dbName.equals( db.getName() );
}
});
if(CollectionUtils.... | [
"@",
"Override",
"public",
"JdbcDatabaseDescriptor",
"dbByName",
"(",
"final",
"String",
"dbName",
")",
"{",
"Collection",
"<",
"H2DatabaseWorking",
">",
"select",
"=",
"CollectionUtils",
".",
"select",
"(",
"dbsw",
",",
"new",
"Predicate",
"<",
"H2DatabaseWorking... | Get a database by its name. | [
"Get",
"a",
"database",
"by",
"its",
"name",
"."
] | a9937c141c69ec34b768bd603b8093e496329b3a | https://github.com/danidemi/jlubricant/blob/a9937c141c69ec34b768bd603b8093e496329b3a/jlubricant-embeddable-h2/src/main/java/com/danidemi/jlubricant/embeddable/h2/H2Dbms.java#L108-L125 |
150,129 | PureSolTechnologies/graphs | trees/src/main/java/com/puresoltechnologies/graphs/trees/TreeWalker.java | TreeWalker.walk | private WalkingAction walk(N tree, TreeVisitor<N> walkerClient) {
WalkingAction action = walkerClient.visit(tree);
if (action == WalkingAction.ABORT) {
return WalkingAction.ABORT;
} else if (action == WalkingAction.LEAVE_BRANCH) {
return WalkingAction.PROCEED;
}
for (N child : tree.getChildren()) {
... | java | private WalkingAction walk(N tree, TreeVisitor<N> walkerClient) {
WalkingAction action = walkerClient.visit(tree);
if (action == WalkingAction.ABORT) {
return WalkingAction.ABORT;
} else if (action == WalkingAction.LEAVE_BRANCH) {
return WalkingAction.PROCEED;
}
for (N child : tree.getChildren()) {
... | [
"private",
"WalkingAction",
"walk",
"(",
"N",
"tree",
",",
"TreeVisitor",
"<",
"N",
">",
"walkerClient",
")",
"{",
"WalkingAction",
"action",
"=",
"walkerClient",
".",
"visit",
"(",
"tree",
")",
";",
"if",
"(",
"action",
"==",
"WalkingAction",
".",
"ABORT"... | This is the recursive part of the walk method.
@param tree
@param walkerClient
@return | [
"This",
"is",
"the",
"recursive",
"part",
"of",
"the",
"walk",
"method",
"."
] | 35dbbd11ccaacbbc6321dcdcd4d31e9a1090d6f1 | https://github.com/PureSolTechnologies/graphs/blob/35dbbd11ccaacbbc6321dcdcd4d31e9a1090d6f1/trees/src/main/java/com/puresoltechnologies/graphs/trees/TreeWalker.java#L61-L74 |
150,130 | amlinv/amq-monitor | amq-monitor-web-impl/src/main/java/com/amlinv/activemq/monitor/model/ActiveMQQueueJmxStats.java | ActiveMQQueueJmxStats.addCounts | public ActiveMQQueueJmxStats addCounts(ActiveMQQueueJmxStats other, String resultBrokerName) {
ActiveMQQueueJmxStats result = new ActiveMQQueueJmxStats(resultBrokerName, this.queueName);
result.setCursorPercentUsage(this.getCursorPercentUsage());
result.setDequeueCount(this.getDequeueCount() + o... | java | public ActiveMQQueueJmxStats addCounts(ActiveMQQueueJmxStats other, String resultBrokerName) {
ActiveMQQueueJmxStats result = new ActiveMQQueueJmxStats(resultBrokerName, this.queueName);
result.setCursorPercentUsage(this.getCursorPercentUsage());
result.setDequeueCount(this.getDequeueCount() + o... | [
"public",
"ActiveMQQueueJmxStats",
"addCounts",
"(",
"ActiveMQQueueJmxStats",
"other",
",",
"String",
"resultBrokerName",
")",
"{",
"ActiveMQQueueJmxStats",
"result",
"=",
"new",
"ActiveMQQueueJmxStats",
"(",
"resultBrokerName",
",",
"this",
".",
"queueName",
")",
";",
... | Return a new queue stats structure with the total of the stats from this structure and the one given. Returning
a new structure keeps all three structures unchanged, in the manner of immutability, to make it easier to have
safe usage under concurrency. Note that non-count values are copied out from this instance; tho... | [
"Return",
"a",
"new",
"queue",
"stats",
"structure",
"with",
"the",
"total",
"of",
"the",
"stats",
"from",
"this",
"structure",
"and",
"the",
"one",
"given",
".",
"Returning",
"a",
"new",
"structure",
"keeps",
"all",
"three",
"structures",
"unchanged",
"in",... | 0ae0156f56d7d3edf98bca9c30b153b770fe5bfa | https://github.com/amlinv/amq-monitor/blob/0ae0156f56d7d3edf98bca9c30b153b770fe5bfa/amq-monitor-web-impl/src/main/java/com/amlinv/activemq/monitor/model/ActiveMQQueueJmxStats.java#L146-L158 |
150,131 | amlinv/amq-monitor | amq-monitor-web-impl/src/main/java/com/amlinv/activemq/monitor/model/ActiveMQQueueJmxStats.java | ActiveMQQueueJmxStats.dup | public ActiveMQQueueJmxStats dup (String brokerName) {
ActiveMQQueueJmxStats result = new ActiveMQQueueJmxStats(brokerName, this.queueName);
this.copyOut(result);
return result;
} | java | public ActiveMQQueueJmxStats dup (String brokerName) {
ActiveMQQueueJmxStats result = new ActiveMQQueueJmxStats(brokerName, this.queueName);
this.copyOut(result);
return result;
} | [
"public",
"ActiveMQQueueJmxStats",
"dup",
"(",
"String",
"brokerName",
")",
"{",
"ActiveMQQueueJmxStats",
"result",
"=",
"new",
"ActiveMQQueueJmxStats",
"(",
"brokerName",
",",
"this",
".",
"queueName",
")",
";",
"this",
".",
"copyOut",
"(",
"result",
")",
";",
... | Return a duplicate of this queue stats structure.
@return new queue stats structure with the same values. | [
"Return",
"a",
"duplicate",
"of",
"this",
"queue",
"stats",
"structure",
"."
] | 0ae0156f56d7d3edf98bca9c30b153b770fe5bfa | https://github.com/amlinv/amq-monitor/blob/0ae0156f56d7d3edf98bca9c30b153b770fe5bfa/amq-monitor-web-impl/src/main/java/com/amlinv/activemq/monitor/model/ActiveMQQueueJmxStats.java#L165-L170 |
150,132 | amlinv/amq-monitor | amq-monitor-web-impl/src/main/java/com/amlinv/activemq/monitor/model/ActiveMQQueueJmxStats.java | ActiveMQQueueJmxStats.copyOut | public void copyOut (ActiveMQQueueJmxStats other) {
other.setCursorPercentUsage(this.getCursorPercentUsage());
other.setDequeueCount(this.getDequeueCount());
other.setEnqueueCount(this.getEnqueueCount());
other.setMemoryPercentUsage(this.getMemoryPercentUsage());
other.setNumCons... | java | public void copyOut (ActiveMQQueueJmxStats other) {
other.setCursorPercentUsage(this.getCursorPercentUsage());
other.setDequeueCount(this.getDequeueCount());
other.setEnqueueCount(this.getEnqueueCount());
other.setMemoryPercentUsage(this.getMemoryPercentUsage());
other.setNumCons... | [
"public",
"void",
"copyOut",
"(",
"ActiveMQQueueJmxStats",
"other",
")",
"{",
"other",
".",
"setCursorPercentUsage",
"(",
"this",
".",
"getCursorPercentUsage",
"(",
")",
")",
";",
"other",
".",
"setDequeueCount",
"(",
"this",
".",
"getDequeueCount",
"(",
")",
... | Copy out the values to the given destination.
@param other target stats object to receive the values from this one. | [
"Copy",
"out",
"the",
"values",
"to",
"the",
"given",
"destination",
"."
] | 0ae0156f56d7d3edf98bca9c30b153b770fe5bfa | https://github.com/amlinv/amq-monitor/blob/0ae0156f56d7d3edf98bca9c30b153b770fe5bfa/amq-monitor-web-impl/src/main/java/com/amlinv/activemq/monitor/model/ActiveMQQueueJmxStats.java#L177-L186 |
150,133 | jtrfp/javamod | src/main/java/de/quippy/ogg/jorbis/Mdct.java | Mdct.init | void init(int n){
bitrev=new int[n/4];
trig=new float[n+n/4];
log2n=(int)Math.rint(Math.log(n)/Math.log(2));
this.n=n;
int AE=0;
int AO=1;
int BE=AE+n/2;
int BO=BE+1;
int CE=BE+n/2;
int CO=CE+1;
// trig lookups...
for(int i=0; i<n/4; i++){
trig[AE+i*2]=(float)Math... | java | void init(int n){
bitrev=new int[n/4];
trig=new float[n+n/4];
log2n=(int)Math.rint(Math.log(n)/Math.log(2));
this.n=n;
int AE=0;
int AO=1;
int BE=AE+n/2;
int BO=BE+1;
int CE=BE+n/2;
int CO=CE+1;
// trig lookups...
for(int i=0; i<n/4; i++){
trig[AE+i*2]=(float)Math... | [
"void",
"init",
"(",
"int",
"n",
")",
"{",
"bitrev",
"=",
"new",
"int",
"[",
"n",
"/",
"4",
"]",
";",
"trig",
"=",
"new",
"float",
"[",
"n",
"+",
"n",
"/",
"4",
"]",
";",
"log2n",
"=",
"(",
"int",
")",
"Math",
".",
"rint",
"(",
"Math",
".... | float scale; | [
"float",
"scale",
";"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/ogg/jorbis/Mdct.java#L39-L78 |
150,134 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/converter/Converters.java | Converters.getConverterForOperation | public Converter getConverterForOperation(String operId) {
if (getConverters() != null) {
for (Converter converter : getConverters()) {
if (check(converter, converter.getOperations(), operId)) {
return converter;
}
}
}
i... | java | public Converter getConverterForOperation(String operId) {
if (getConverters() != null) {
for (Converter converter : getConverters()) {
if (check(converter, converter.getOperations(), operId)) {
return converter;
}
}
}
i... | [
"public",
"Converter",
"getConverterForOperation",
"(",
"String",
"operId",
")",
"{",
"if",
"(",
"getConverters",
"(",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"Converter",
"converter",
":",
"getConverters",
"(",
")",
")",
"{",
"if",
"(",
"check",
"(",
"... | Looks for an aproppiate converter for the given operation id.
@param operId The operation id
@return The first converter that matches this operation. | [
"Looks",
"for",
"an",
"aproppiate",
"converter",
"for",
"the",
"given",
"operation",
"id",
"."
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/converter/Converters.java#L18-L36 |
150,135 | jtrfp/javamod | src/main/java/de/quippy/ogg/jorbis/Residue0.java | Residue0._01inverse | synchronized static int _01inverse(Block vb, Object vl, float[][] in, int ch,
int decodepart){
int i, j, k, l, s;
LookResidue0 look=(LookResidue0)vl;
InfoResidue0 info=look.info;
// move all this setup out later
int samples_per_partition=info.grouping;
int partitions_per_word=look.phraseb... | java | synchronized static int _01inverse(Block vb, Object vl, float[][] in, int ch,
int decodepart){
int i, j, k, l, s;
LookResidue0 look=(LookResidue0)vl;
InfoResidue0 info=look.info;
// move all this setup out later
int samples_per_partition=info.grouping;
int partitions_per_word=look.phraseb... | [
"synchronized",
"static",
"int",
"_01inverse",
"(",
"Block",
"vb",
",",
"Object",
"vl",
",",
"float",
"[",
"]",
"[",
"]",
"in",
",",
"int",
"ch",
",",
"int",
"decodepart",
")",
"{",
"int",
"i",
",",
"j",
",",
"k",
",",
"l",
",",
"s",
";",
"Look... | re-using partword | [
"re",
"-",
"using",
"partword"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/ogg/jorbis/Residue0.java#L159-L227 |
150,136 | PureSolTechnologies/graphs | trees/src/main/java/com/puresoltechnologies/graphs/trees/TreeIterator.java | TreeIterator.gotoEnd | public void gotoEnd() {
currentNode = tree;
while (currentNode.hasChildren()) {
currentNode = currentNode.getChildren().get(
currentNode.getChildren().size() - 1);
}
} | java | public void gotoEnd() {
currentNode = tree;
while (currentNode.hasChildren()) {
currentNode = currentNode.getChildren().get(
currentNode.getChildren().size() - 1);
}
} | [
"public",
"void",
"gotoEnd",
"(",
")",
"{",
"currentNode",
"=",
"tree",
";",
"while",
"(",
"currentNode",
".",
"hasChildren",
"(",
")",
")",
"{",
"currentNode",
"=",
"currentNode",
".",
"getChildren",
"(",
")",
".",
"get",
"(",
"currentNode",
".",
"getCh... | This method sets the iterator onto the last tree element. | [
"This",
"method",
"sets",
"the",
"iterator",
"onto",
"the",
"last",
"tree",
"element",
"."
] | 35dbbd11ccaacbbc6321dcdcd4d31e9a1090d6f1 | https://github.com/PureSolTechnologies/graphs/blob/35dbbd11ccaacbbc6321dcdcd4d31e9a1090d6f1/trees/src/main/java/com/puresoltechnologies/graphs/trees/TreeIterator.java#L57-L63 |
150,137 | PureSolTechnologies/graphs | trees/src/main/java/com/puresoltechnologies/graphs/trees/TreeIterator.java | TreeIterator.goForward | public boolean goForward() {
if (currentNode.hasChildren()) {
currentNode = currentNode.getChildren().get(0);
return true;
} else if (currentNode.getParent() == null) {
return false;
}
while (true) {
N parent = currentNode.getParent();
if ((parent == null) || (currentNode == tree)) {
retu... | java | public boolean goForward() {
if (currentNode.hasChildren()) {
currentNode = currentNode.getChildren().get(0);
return true;
} else if (currentNode.getParent() == null) {
return false;
}
while (true) {
N parent = currentNode.getParent();
if ((parent == null) || (currentNode == tree)) {
retu... | [
"public",
"boolean",
"goForward",
"(",
")",
"{",
"if",
"(",
"currentNode",
".",
"hasChildren",
"(",
")",
")",
"{",
"currentNode",
"=",
"currentNode",
".",
"getChildren",
"(",
")",
".",
"get",
"(",
"0",
")",
";",
"return",
"true",
";",
"}",
"else",
"i... | This method walks forward one node.
@return <code>true</code> is returned if this was successful.
<code>false</code> is returned otherwise, when the current node
is the last node reachable. | [
"This",
"method",
"walks",
"forward",
"one",
"node",
"."
] | 35dbbd11ccaacbbc6321dcdcd4d31e9a1090d6f1 | https://github.com/PureSolTechnologies/graphs/blob/35dbbd11ccaacbbc6321dcdcd4d31e9a1090d6f1/trees/src/main/java/com/puresoltechnologies/graphs/trees/TreeIterator.java#L72-L92 |
150,138 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/loader/ModuleFactory.java | ModuleFactory.getFileExtensionMap | private static HashMap<String, Module> getFileExtensionMap()
{
if (fileExtensionMap==null)
fileExtensionMap= new HashMap<String, Module>();
return fileExtensionMap;
} | java | private static HashMap<String, Module> getFileExtensionMap()
{
if (fileExtensionMap==null)
fileExtensionMap= new HashMap<String, Module>();
return fileExtensionMap;
} | [
"private",
"static",
"HashMap",
"<",
"String",
",",
"Module",
">",
"getFileExtensionMap",
"(",
")",
"{",
"if",
"(",
"fileExtensionMap",
"==",
"null",
")",
"fileExtensionMap",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Module",
">",
"(",
")",
";",
"return"... | Lazy instantiation access method
@since 04.01.2010
@return | [
"Lazy",
"instantiation",
"access",
"method"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/ModuleFactory.java#L57-L63 |
150,139 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/loader/ModuleFactory.java | ModuleFactory.getModuleFromStreamByID | private static Module getModuleFromStreamByID(ModfileInputStream input)
{
Iterator<Module> iter = getModulesArray().iterator();
while (iter.hasNext())
{
Module mod = iter.next();
try
{
if (mod.checkLoadingPossible(input)) return mod;
}
catch (IOException ex)
{
/* Ignoring */
}
}
... | java | private static Module getModuleFromStreamByID(ModfileInputStream input)
{
Iterator<Module> iter = getModulesArray().iterator();
while (iter.hasNext())
{
Module mod = iter.next();
try
{
if (mod.checkLoadingPossible(input)) return mod;
}
catch (IOException ex)
{
/* Ignoring */
}
}
... | [
"private",
"static",
"Module",
"getModuleFromStreamByID",
"(",
"ModfileInputStream",
"input",
")",
"{",
"Iterator",
"<",
"Module",
">",
"iter",
"=",
"getModulesArray",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iter",
".",
"hasNext",
"(",
")",
... | Finds the appropriate loader through the IDs
@since 04.01.2010
@param input
@return | [
"Finds",
"the",
"appropriate",
"loader",
"through",
"the",
"IDs"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/ModuleFactory.java#L105-L121 |
150,140 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/loader/ModuleFactory.java | ModuleFactory.getModuleFromStream | private static Module getModuleFromStream(ModfileInputStream input)
{
Iterator<Module> iter = getModulesArray().iterator();
while (iter.hasNext())
{
Module mod = iter.next();
try
{
Module result = mod.loadModFile(input);
input.seek(0);
return result; // <-- here this loading was a success!
... | java | private static Module getModuleFromStream(ModfileInputStream input)
{
Iterator<Module> iter = getModulesArray().iterator();
while (iter.hasNext())
{
Module mod = iter.next();
try
{
Module result = mod.loadModFile(input);
input.seek(0);
return result; // <-- here this loading was a success!
... | [
"private",
"static",
"Module",
"getModuleFromStream",
"(",
"ModfileInputStream",
"input",
")",
"{",
"Iterator",
"<",
"Module",
">",
"iter",
"=",
"getModulesArray",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iter",
".",
"hasNext",
"(",
")",
")... | Finds the appropriate loader through simply loading it!
@since 13.06.2010
@param input
@return | [
"Finds",
"the",
"appropriate",
"loader",
"through",
"simply",
"loading",
"it!"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/ModuleFactory.java#L128-L146 |
150,141 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/loader/ModuleFactory.java | ModuleFactory.getInstance | public static Module getInstance(URL url) throws IOException
{
ModfileInputStream inputStream = null;
try
{
inputStream = new ModfileInputStream(url);
Module mod = getModuleFromStreamByID(inputStream);
// If the header gives no infos, it's obviously a Noise Tracker file
// So let's try all loaders
... | java | public static Module getInstance(URL url) throws IOException
{
ModfileInputStream inputStream = null;
try
{
inputStream = new ModfileInputStream(url);
Module mod = getModuleFromStreamByID(inputStream);
// If the header gives no infos, it's obviously a Noise Tracker file
// So let's try all loaders
... | [
"public",
"static",
"Module",
"getInstance",
"(",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"ModfileInputStream",
"inputStream",
"=",
"null",
";",
"try",
"{",
"inputStream",
"=",
"new",
"ModfileInputStream",
"(",
"url",
")",
";",
"Module",
"mod",
"=",
... | Uses the File-Extension to find a suitable loader.
@param url URL-Instance of the path to the modfile
@return null, if fails | [
"Uses",
"the",
"File",
"-",
"Extension",
"to",
"find",
"a",
"suitable",
"loader",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/ModuleFactory.java#L170-L199 |
150,142 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.loadChunks | public final static Map<String, Set<String>> loadChunks(){
return new HashMap<String, Set<String>>(){
private static final long serialVersionUID = 1L;{
put("max", new HashSet<String>(){
private static final long serialVersionUID = 1L;{
add("name"); add("number"); add("type");
}}
);
}
}... | java | public final static Map<String, Set<String>> loadChunks(){
return new HashMap<String, Set<String>>(){
private static final long serialVersionUID = 1L;{
put("max", new HashSet<String>(){
private static final long serialVersionUID = 1L;{
add("name"); add("number"); add("type");
}}
);
}
}... | [
"public",
"final",
"static",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"loadChunks",
"(",
")",
"{",
"return",
"new",
"HashMap",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"(",
")",
"{",
"private",
"static",
"final",
"long",
... | Returns a map set with all expected template names and their expected arguments.
The map that maintains the expected templates and their arguments for the manager.
Any STGroup handed over the the manager will be tested against this map.
Templates or template arguments that are missing can be reported, and the report m... | [
"Returns",
"a",
"map",
"set",
"with",
"all",
"expected",
"template",
"names",
"and",
"their",
"expected",
"arguments",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L66-L76 |
150,143 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.createInfoMessage | public static Message5WH createInfoMessage(String what, Object ... obj){
return new Message5WH_Builder().addWhat(FormattingTupleWrapper.create(what, obj)).setType(E_MessageType.INFO).build();
} | java | public static Message5WH createInfoMessage(String what, Object ... obj){
return new Message5WH_Builder().addWhat(FormattingTupleWrapper.create(what, obj)).setType(E_MessageType.INFO).build();
} | [
"public",
"static",
"Message5WH",
"createInfoMessage",
"(",
"String",
"what",
",",
"Object",
"...",
"obj",
")",
"{",
"return",
"new",
"Message5WH_Builder",
"(",
")",
".",
"addWhat",
"(",
"FormattingTupleWrapper",
".",
"create",
"(",
"what",
",",
"obj",
")",
... | Creates a new information message.
@param what the what part of the message (what has happened)
@param obj objects to add to the message
@return new information message | [
"Creates",
"a",
"new",
"information",
"message",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L102-L104 |
150,144 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.createWarningMessage | public static Message5WH createWarningMessage(String what, Object ... obj){
return new Message5WH_Builder().addWhat(FormattingTupleWrapper.create(what, obj)).setType(E_MessageType.WARNING).build();
} | java | public static Message5WH createWarningMessage(String what, Object ... obj){
return new Message5WH_Builder().addWhat(FormattingTupleWrapper.create(what, obj)).setType(E_MessageType.WARNING).build();
} | [
"public",
"static",
"Message5WH",
"createWarningMessage",
"(",
"String",
"what",
",",
"Object",
"...",
"obj",
")",
"{",
"return",
"new",
"Message5WH_Builder",
"(",
")",
".",
"addWhat",
"(",
"FormattingTupleWrapper",
".",
"create",
"(",
"what",
",",
"obj",
")",... | Creates a new warning message.
@param what the what part of the message (what has happened)
@param obj objects to add to the message
@return new information message | [
"Creates",
"a",
"new",
"warning",
"message",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L112-L114 |
150,145 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.createErrorMessage | public static Message5WH createErrorMessage(String what, Object ... obj){
return new Message5WH_Builder().addWhat(FormattingTupleWrapper.create(what, obj)).setType(E_MessageType.ERROR).build();
} | java | public static Message5WH createErrorMessage(String what, Object ... obj){
return new Message5WH_Builder().addWhat(FormattingTupleWrapper.create(what, obj)).setType(E_MessageType.ERROR).build();
} | [
"public",
"static",
"Message5WH",
"createErrorMessage",
"(",
"String",
"what",
",",
"Object",
"...",
"obj",
")",
"{",
"return",
"new",
"Message5WH_Builder",
"(",
")",
".",
"addWhat",
"(",
"FormattingTupleWrapper",
".",
"create",
"(",
"what",
",",
"obj",
")",
... | Creates a new error message.
@param what the what part of the message (what has happened)
@param obj objects to add to the message
@return new information message | [
"Creates",
"a",
"new",
"error",
"message",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L122-L124 |
150,146 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.hasErrors | public boolean hasErrors(){
if(this.messageHandlers.containsKey(E_MessageType.ERROR)){
return (this.messageHandlers.get(E_MessageType.ERROR).getCount()==0)?false:true;
}
return false;
} | java | public boolean hasErrors(){
if(this.messageHandlers.containsKey(E_MessageType.ERROR)){
return (this.messageHandlers.get(E_MessageType.ERROR).getCount()==0)?false:true;
}
return false;
} | [
"public",
"boolean",
"hasErrors",
"(",
")",
"{",
"if",
"(",
"this",
".",
"messageHandlers",
".",
"containsKey",
"(",
"E_MessageType",
".",
"ERROR",
")",
")",
"{",
"return",
"(",
"this",
".",
"messageHandlers",
".",
"get",
"(",
"E_MessageType",
".",
"ERROR"... | Returns true if the manager has errors reported, false otherwise
@return true if errors have been reported, false otherwise | [
"Returns",
"true",
"if",
"the",
"manager",
"has",
"errors",
"reported",
"false",
"otherwise"
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L175-L180 |
150,147 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.hasWarnings | public boolean hasWarnings(){
if(this.messageHandlers.containsKey(E_MessageType.WARNING)){
return (this.messageHandlers.get(E_MessageType.WARNING).getCount()==0)?false:true;
}
return false;
} | java | public boolean hasWarnings(){
if(this.messageHandlers.containsKey(E_MessageType.WARNING)){
return (this.messageHandlers.get(E_MessageType.WARNING).getCount()==0)?false:true;
}
return false;
} | [
"public",
"boolean",
"hasWarnings",
"(",
")",
"{",
"if",
"(",
"this",
".",
"messageHandlers",
".",
"containsKey",
"(",
"E_MessageType",
".",
"WARNING",
")",
")",
"{",
"return",
"(",
"this",
".",
"messageHandlers",
".",
"get",
"(",
"E_MessageType",
".",
"WA... | Returns true if the manager has warnings reported, false otherwise
@return true if warnings have been reported, false otherwise | [
"Returns",
"true",
"if",
"the",
"manager",
"has",
"warnings",
"reported",
"false",
"otherwise"
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L186-L191 |
150,148 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.hasInfos | public boolean hasInfos(){
if(this.messageHandlers.containsKey(E_MessageType.INFO)){
return (this.messageHandlers.get(E_MessageType.INFO).getCount()==0)?false:true;
}
return false;
} | java | public boolean hasInfos(){
if(this.messageHandlers.containsKey(E_MessageType.INFO)){
return (this.messageHandlers.get(E_MessageType.INFO).getCount()==0)?false:true;
}
return false;
} | [
"public",
"boolean",
"hasInfos",
"(",
")",
"{",
"if",
"(",
"this",
".",
"messageHandlers",
".",
"containsKey",
"(",
"E_MessageType",
".",
"INFO",
")",
")",
"{",
"return",
"(",
"this",
".",
"messageHandlers",
".",
"get",
"(",
"E_MessageType",
".",
"INFO",
... | Returns true if the manager has infos reported, false otherwise
@return true if infos have been reported, false otherwise | [
"Returns",
"true",
"if",
"the",
"manager",
"has",
"infos",
"reported",
"false",
"otherwise"
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L197-L202 |
150,149 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.getMessageCount | public int getMessageCount(E_MessageType type) {
if(this.messageHandlers.containsKey(type)){
return this.messageHandlers.get(type).getCount();
}
return -1;
} | java | public int getMessageCount(E_MessageType type) {
if(this.messageHandlers.containsKey(type)){
return this.messageHandlers.get(type).getCount();
}
return -1;
} | [
"public",
"int",
"getMessageCount",
"(",
"E_MessageType",
"type",
")",
"{",
"if",
"(",
"this",
".",
"messageHandlers",
".",
"containsKey",
"(",
"type",
")",
")",
"{",
"return",
"this",
".",
"messageHandlers",
".",
"get",
"(",
"type",
")",
".",
"getCount",
... | Returns the current count for the given message type since its last initialization or reset.
@param type message type to report count for
@return current count of messages, -1 if not in active list | [
"Returns",
"the",
"current",
"count",
"for",
"the",
"given",
"message",
"type",
"since",
"its",
"last",
"initialization",
"or",
"reset",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L209-L214 |
150,150 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.isEnabledFor | public boolean isEnabledFor(E_MessageType type) {
if(!this.messageHandlers.containsKey(type)){
return false;
}
return this.messageHandlers.get(type).isEnabled();
} | java | public boolean isEnabledFor(E_MessageType type) {
if(!this.messageHandlers.containsKey(type)){
return false;
}
return this.messageHandlers.get(type).isEnabled();
} | [
"public",
"boolean",
"isEnabledFor",
"(",
"E_MessageType",
"type",
")",
"{",
"if",
"(",
"!",
"this",
".",
"messageHandlers",
".",
"containsKey",
"(",
"type",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"this",
".",
"messageHandlers",
".",
"get",
... | Returns is the report level is enabled or not.
@param type message type to check
@return true if the message type is in the list of active message types of the manager and if the associated logger is enabled, false otherwise | [
"Returns",
"is",
"the",
"report",
"level",
"is",
"enabled",
"or",
"not",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L221-L226 |
150,151 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java | MessageMgr.clear | public MessageMgr clear() {
for(MessageTypeHandler handler : this.messageHandlers.values()){
handler.clear();
}
this.messages.clear();
return this;
} | java | public MessageMgr clear() {
for(MessageTypeHandler handler : this.messageHandlers.values()){
handler.clear();
}
this.messages.clear();
return this;
} | [
"public",
"MessageMgr",
"clear",
"(",
")",
"{",
"for",
"(",
"MessageTypeHandler",
"handler",
":",
"this",
".",
"messageHandlers",
".",
"values",
"(",
")",
")",
"{",
"handler",
".",
"clear",
"(",
")",
";",
"}",
"this",
".",
"messages",
".",
"clear",
"("... | Resets the collected messages and all counters.
@return returns self to allow for chained calls | [
"Resets",
"the",
"collected",
"messages",
"and",
"all",
"counters",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageMgr.java#L351-L357 |
150,152 | jtrfp/javamod | src/main/java/de/quippy/jflac/FLACDecoder.java | FLACDecoder.decodeFrame | public ByteData decodeFrame(Frame frame, ByteData pcmData) {
// required size of the byte buffer
int byteSize = frame.header.blockSize * channels * ((streamInfo.getBitsPerSample() + 7) / 2);
if (pcmData == null || pcmData.getData().length < byteSize ) {
pcmData = new ByteData(byteSize);
} else... | java | public ByteData decodeFrame(Frame frame, ByteData pcmData) {
// required size of the byte buffer
int byteSize = frame.header.blockSize * channels * ((streamInfo.getBitsPerSample() + 7) / 2);
if (pcmData == null || pcmData.getData().length < byteSize ) {
pcmData = new ByteData(byteSize);
} else... | [
"public",
"ByteData",
"decodeFrame",
"(",
"Frame",
"frame",
",",
"ByteData",
"pcmData",
")",
"{",
"// required size of the byte buffer",
"int",
"byteSize",
"=",
"frame",
".",
"header",
".",
"blockSize",
"*",
"channels",
"*",
"(",
"(",
"streamInfo",
".",
"getBits... | Fill the given ByteData object with PCM data from the frame.
@param frame the frame to send to the PCM processors
@param pcmData the byte data to be filled, or null if it should be allocated
@return the ByteData that was filled (may be a new instance from <code>space</code>) | [
"Fill",
"the",
"given",
"ByteData",
"object",
"with",
"PCM",
"data",
"from",
"the",
"frame",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FLACDecoder.java#L260-L293 |
150,153 | jtrfp/javamod | src/main/java/de/quippy/jflac/FLACDecoder.java | FLACDecoder.readStreamInfo | public StreamInfo readStreamInfo() throws IOException {
readStreamSync();
Metadata metadata = readNextMetadata();
if (!(metadata instanceof StreamInfo)) throw new IOException("StreamInfo metadata block missing");
return (StreamInfo) metadata;
} | java | public StreamInfo readStreamInfo() throws IOException {
readStreamSync();
Metadata metadata = readNextMetadata();
if (!(metadata instanceof StreamInfo)) throw new IOException("StreamInfo metadata block missing");
return (StreamInfo) metadata;
} | [
"public",
"StreamInfo",
"readStreamInfo",
"(",
")",
"throws",
"IOException",
"{",
"readStreamSync",
"(",
")",
";",
"Metadata",
"metadata",
"=",
"readNextMetadata",
"(",
")",
";",
"if",
"(",
"!",
"(",
"metadata",
"instanceof",
"StreamInfo",
")",
")",
"throw",
... | Read the FLAC stream info.
@return The FLAC Stream Info record
@throws IOException On read error | [
"Read",
"the",
"FLAC",
"stream",
"info",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FLACDecoder.java#L300-L305 |
150,154 | jtrfp/javamod | src/main/java/de/quippy/jflac/FLACDecoder.java | FLACDecoder.decode | public void decode() throws IOException {
readMetadata();
try {
while (true) {
//switch (state) {
//case DECODER_SEARCH_FOR_METADATA :
// readStreamSync();
// break;
//case DECODER_READ_METADATA :
... | java | public void decode() throws IOException {
readMetadata();
try {
while (true) {
//switch (state) {
//case DECODER_SEARCH_FOR_METADATA :
// readStreamSync();
// break;
//case DECODER_READ_METADATA :
... | [
"public",
"void",
"decode",
"(",
")",
"throws",
"IOException",
"{",
"readMetadata",
"(",
")",
";",
"try",
"{",
"while",
"(",
"true",
")",
"{",
"//switch (state) {",
"//case DECODER_SEARCH_FOR_METADATA :",
"// readStreamSync();",
"// break;",
"//case DECODER_READ_M... | Decode the FLAC file.
@throws IOException On read error | [
"Decode",
"the",
"FLAC",
"file",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FLACDecoder.java#L405-L439 |
150,155 | jtrfp/javamod | src/main/java/de/quippy/jflac/FLACDecoder.java | FLACDecoder.decode | public void decode(SeekPoint from, SeekPoint to) throws IOException {
// position random access file
if (!(inputStream instanceof RandomFileInputStream)) throw new IOException("Not a RandomFileInputStream: " + inputStream.getClass().getName());
((RandomFileInputStream)inputStream).seek(from.getS... | java | public void decode(SeekPoint from, SeekPoint to) throws IOException {
// position random access file
if (!(inputStream instanceof RandomFileInputStream)) throw new IOException("Not a RandomFileInputStream: " + inputStream.getClass().getName());
((RandomFileInputStream)inputStream).seek(from.getS... | [
"public",
"void",
"decode",
"(",
"SeekPoint",
"from",
",",
"SeekPoint",
"to",
")",
"throws",
"IOException",
"{",
"// position random access file",
"if",
"(",
"!",
"(",
"inputStream",
"instanceof",
"RandomFileInputStream",
")",
")",
"throw",
"new",
"IOException",
"... | Decode the data frames between two seek points.
@param from The starting seek point
@param to The ending seek point (non-inclusive)
@throws IOException On read error | [
"Decode",
"the",
"data",
"frames",
"between",
"two",
"seek",
"points",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FLACDecoder.java#L487-L531 |
150,156 | jtrfp/javamod | src/main/java/de/quippy/jflac/FLACDecoder.java | FLACDecoder.readStreamSync | private void readStreamSync() throws IOException {
int id = 0;
for (int i = 0; i < 4;) {
int x = bitStream.readRawUInt(8);
if (x == Constants.STREAM_SYNC_STRING[i]) {
i++;
id = 0;
} else if (x == ID3V2_TAG[id]) {
id++;
... | java | private void readStreamSync() throws IOException {
int id = 0;
for (int i = 0; i < 4;) {
int x = bitStream.readRawUInt(8);
if (x == Constants.STREAM_SYNC_STRING[i]) {
i++;
id = 0;
} else if (x == ID3V2_TAG[id]) {
id++;
... | [
"private",
"void",
"readStreamSync",
"(",
")",
"throws",
"IOException",
"{",
"int",
"id",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
")",
"{",
"int",
"x",
"=",
"bitStream",
".",
"readRawUInt",
"(",
"8",
")",
";",
... | Read the stream sync string.
@throws IOException On read error | [
"Read",
"the",
"stream",
"sync",
"string",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FLACDecoder.java#L646-L666 |
150,157 | jtrfp/javamod | src/main/java/de/quippy/jflac/FLACDecoder.java | FLACDecoder.readNextMetadata | public Metadata readNextMetadata() throws IOException {
Metadata metadata = null;
boolean isLast = (bitStream.readRawUInt(Metadata.STREAM_METADATA_IS_LAST_LEN) != 0);
int type = bitStream.readRawUInt(Metadata.STREAM_METADATA_TYPE_LEN);
int length = bitStream.readRawUInt(Metadata... | java | public Metadata readNextMetadata() throws IOException {
Metadata metadata = null;
boolean isLast = (bitStream.readRawUInt(Metadata.STREAM_METADATA_IS_LAST_LEN) != 0);
int type = bitStream.readRawUInt(Metadata.STREAM_METADATA_TYPE_LEN);
int length = bitStream.readRawUInt(Metadata... | [
"public",
"Metadata",
"readNextMetadata",
"(",
")",
"throws",
"IOException",
"{",
"Metadata",
"metadata",
"=",
"null",
";",
"boolean",
"isLast",
"=",
"(",
"bitStream",
".",
"readRawUInt",
"(",
"Metadata",
".",
"STREAM_METADATA_IS_LAST_LEN",
")",
"!=",
"0",
")",
... | Read a single metadata record.
@return The next metadata record
@throws IOException on read error | [
"Read",
"a",
"single",
"metadata",
"record",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FLACDecoder.java#L673-L701 |
150,158 | jtrfp/javamod | src/main/java/de/quippy/jflac/FLACDecoder.java | FLACDecoder.seekTo | public void seekTo(long seekToSamples) throws IOException
{
// Seek with SeekTable if any provided
if (seekTable!=null)
{
for (int s=0; s < seekTable.numberOfPoints(); s++)
{
SeekPoint p = seekTable.getSeekPoint(s);
samplesDecoded = p.getSampleNumber();
if (samplesDecoded >= seekToSamples... | java | public void seekTo(long seekToSamples) throws IOException
{
// Seek with SeekTable if any provided
if (seekTable!=null)
{
for (int s=0; s < seekTable.numberOfPoints(); s++)
{
SeekPoint p = seekTable.getSeekPoint(s);
samplesDecoded = p.getSampleNumber();
if (samplesDecoded >= seekToSamples... | [
"public",
"void",
"seekTo",
"(",
"long",
"seekToSamples",
")",
"throws",
"IOException",
"{",
"// Seek with SeekTable if any provided",
"if",
"(",
"seekTable",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"s",
"=",
"0",
";",
"s",
"<",
"seekTable",
".",
"numberO... | This will do a forward seek - backwards is not possible yet
because we would need to reset the inputstream
@since 18.02.2012
@param seekToSamples | [
"This",
"will",
"do",
"a",
"forward",
"seek",
"-",
"backwards",
"is",
"not",
"possible",
"yet",
"because",
"we",
"would",
"need",
"to",
"reset",
"the",
"inputstream"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FLACDecoder.java#L947-L983 |
150,159 | jtrfp/javamod | src/main/java/de/quippy/mp3/decoder/Equalizer.java | Equalizer.getBand | public float getBand(int band)
{
float eq = 0.0f;
if ((band>=0) && (band<BANDS))
{
eq = settings[band];
}
return eq;
} | java | public float getBand(int band)
{
float eq = 0.0f;
if ((band>=0) && (band<BANDS))
{
eq = settings[band];
}
return eq;
} | [
"public",
"float",
"getBand",
"(",
"int",
"band",
")",
"{",
"float",
"eq",
"=",
"0.0f",
";",
"if",
"(",
"(",
"band",
">=",
"0",
")",
"&&",
"(",
"band",
"<",
"BANDS",
")",
")",
"{",
"eq",
"=",
"settings",
"[",
"band",
"]",
";",
"}",
"return",
... | Retrieves the eq setting for a given band. | [
"Retrieves",
"the",
"eq",
"setting",
"for",
"a",
"given",
"band",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/Equalizer.java#L149-L159 |
150,160 | jtrfp/javamod | src/main/java/de/quippy/mp3/decoder/Equalizer.java | Equalizer.getBandFactors | float[] getBandFactors()
{
float[] factors = new float[BANDS];
for (int i=0, maxCount=BANDS; i<maxCount; i++)
{
factors[i] = getBandFactor(settings[i]);
}
return factors;
} | java | float[] getBandFactors()
{
float[] factors = new float[BANDS];
for (int i=0, maxCount=BANDS; i<maxCount; i++)
{
factors[i] = getBandFactor(settings[i]);
}
return factors;
} | [
"float",
"[",
"]",
"getBandFactors",
"(",
")",
"{",
"float",
"[",
"]",
"factors",
"=",
"new",
"float",
"[",
"BANDS",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"maxCount",
"=",
"BANDS",
";",
"i",
"<",
"maxCount",
";",
"i",
"++",
")",
"{",... | Retrieves an array of floats whose values represent a
scaling factor that can be applied to linear samples
in each band to provide the equalization represented by
this instance.
@return an array of factors that can be applied to the
subbands. | [
"Retrieves",
"an",
"array",
"of",
"floats",
"whose",
"values",
"represent",
"a",
"scaling",
"factor",
"that",
"can",
"be",
"applied",
"to",
"linear",
"samples",
"in",
"each",
"band",
"to",
"provide",
"the",
"equalization",
"represented",
"by",
"this",
"instanc... | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/Equalizer.java#L182-L191 |
150,161 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/TreeWithParent.java | TreeWithParent.add | public Node<T> add(T element) {
Node<T> node = new Node<>(this, element);
nodes.add(node);
return node;
} | java | public Node<T> add(T element) {
Node<T> node = new Node<>(this, element);
nodes.add(node);
return node;
} | [
"public",
"Node",
"<",
"T",
">",
"add",
"(",
"T",
"element",
")",
"{",
"Node",
"<",
"T",
">",
"node",
"=",
"new",
"Node",
"<>",
"(",
"this",
",",
"element",
")",
";",
"nodes",
".",
"add",
"(",
"node",
")",
";",
"return",
"node",
";",
"}"
] | Append a new node with the given element. | [
"Append",
"a",
"new",
"node",
"with",
"the",
"given",
"element",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/TreeWithParent.java#L43-L47 |
150,162 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/TreeWithParent.java | TreeWithParent.remove | public boolean remove(T element) {
for (Iterator<Node<T>> it = nodes.iterator(); it.hasNext(); )
if (ObjectUtil.equalsOrNull(it.next().element, element)) {
it.remove();
return true;
}
return false;
} | java | public boolean remove(T element) {
for (Iterator<Node<T>> it = nodes.iterator(); it.hasNext(); )
if (ObjectUtil.equalsOrNull(it.next().element, element)) {
it.remove();
return true;
}
return false;
} | [
"public",
"boolean",
"remove",
"(",
"T",
"element",
")",
"{",
"for",
"(",
"Iterator",
"<",
"Node",
"<",
"T",
">",
">",
"it",
"=",
"nodes",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"if",
"(",
"ObjectUtil",
".",
"... | Remove the first occurrence of the given element.
@return true if an element has been removed | [
"Remove",
"the",
"first",
"occurrence",
"of",
"the",
"given",
"element",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/TreeWithParent.java#L52-L59 |
150,163 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/collections/TreeWithParent.java | TreeWithParent.get | public Node<T> get(T element) {
for (Node<T> node : nodes)
if (node.element.equals(element))
return node;
return null;
} | java | public Node<T> get(T element) {
for (Node<T> node : nodes)
if (node.element.equals(element))
return node;
return null;
} | [
"public",
"Node",
"<",
"T",
">",
"get",
"(",
"T",
"element",
")",
"{",
"for",
"(",
"Node",
"<",
"T",
">",
"node",
":",
"nodes",
")",
"if",
"(",
"node",
".",
"element",
".",
"equals",
"(",
"element",
")",
")",
"return",
"node",
";",
"return",
"n... | Get the node containing the given element. | [
"Get",
"the",
"node",
"containing",
"the",
"given",
"element",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/TreeWithParent.java#L74-L79 |
150,164 | jpaoletti/java-presentation-manager | modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/tags/PMTags.java | PMTags.tooltip | public static String tooltip(Field field) {
final String tooltip = field.getTooltip();
if (tooltip == null) {
return "";
}
return "<img class='tooltip' title='" + tooltip + "' alt='?' src='"
+ getContextPath() + "/templates/"
+ getTemplate() + ... | java | public static String tooltip(Field field) {
final String tooltip = field.getTooltip();
if (tooltip == null) {
return "";
}
return "<img class='tooltip' title='" + tooltip + "' alt='?' src='"
+ getContextPath() + "/templates/"
+ getTemplate() + ... | [
"public",
"static",
"String",
"tooltip",
"(",
"Field",
"field",
")",
"{",
"final",
"String",
"tooltip",
"=",
"field",
".",
"getTooltip",
"(",
")",
";",
"if",
"(",
"tooltip",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"return",
"\"<img class='too... | This method show a tooltip if the key is defined
@param key Key | [
"This",
"method",
"show",
"a",
"tooltip",
"if",
"the",
"key",
"is",
"defined"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/tags/PMTags.java#L187-L195 |
150,165 | jpaoletti/java-presentation-manager | modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/tags/PMTags.java | PMTags.print | protected void print(Object... objects) throws IOException {
for (Object object : objects) {
pageContext.getOut().print(object);
}
} | java | protected void print(Object... objects) throws IOException {
for (Object object : objects) {
pageContext.getOut().print(object);
}
} | [
"protected",
"void",
"print",
"(",
"Object",
"...",
"objects",
")",
"throws",
"IOException",
"{",
"for",
"(",
"Object",
"object",
":",
"objects",
")",
"{",
"pageContext",
".",
"getOut",
"(",
")",
".",
"print",
"(",
"object",
")",
";",
"}",
"}"
] | Prints the objects in the jsp writer of the page context | [
"Prints",
"the",
"objects",
"in",
"the",
"jsp",
"writer",
"of",
"the",
"page",
"context"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/tags/PMTags.java#L228-L232 |
150,166 | jpaoletti/java-presentation-manager | modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/tags/PMTags.java | PMTags.println | protected void println(Object... objects) throws IOException {
for (Object object : objects) {
pageContext.getOut().println(object);
}
} | java | protected void println(Object... objects) throws IOException {
for (Object object : objects) {
pageContext.getOut().println(object);
}
} | [
"protected",
"void",
"println",
"(",
"Object",
"...",
"objects",
")",
"throws",
"IOException",
"{",
"for",
"(",
"Object",
"object",
":",
"objects",
")",
"{",
"pageContext",
".",
"getOut",
"(",
")",
".",
"println",
"(",
"object",
")",
";",
"}",
"}"
] | Prints the objects in the jsp writer of the page context with a new line | [
"Prints",
"the",
"objects",
"in",
"the",
"jsp",
"writer",
"of",
"the",
"page",
"context",
"with",
"a",
"new",
"line"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-struts1/src/main/java/jpaoletti/jpm/struts/tags/PMTags.java#L237-L241 |
150,167 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/strings/VersionString.java | VersionString.toMap | public Map<String, Integer> toMap(){
Map<String, Integer> ret = new HashMap<>();
ret.put("major", this.major);
ret.put("minor", this.minor);
ret.put("patch", this.patch);
return ret;
} | java | public Map<String, Integer> toMap(){
Map<String, Integer> ret = new HashMap<>();
ret.put("major", this.major);
ret.put("minor", this.minor);
ret.put("patch", this.patch);
return ret;
} | [
"public",
"Map",
"<",
"String",
",",
"Integer",
">",
"toMap",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Integer",
">",
"ret",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"ret",
".",
"put",
"(",
"\"major\"",
",",
"this",
".",
"major",
")",
";",
... | Returns the string as a map using the key "major" for the major part, the key "minor" for the minor part and the key "patch" for the patch part.
@return map representation of the string | [
"Returns",
"the",
"string",
"as",
"a",
"map",
"using",
"the",
"key",
"major",
"for",
"the",
"major",
"part",
"the",
"key",
"minor",
"for",
"the",
"minor",
"part",
"and",
"the",
"key",
"patch",
"for",
"the",
"patch",
"part",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/strings/VersionString.java#L99-L105 |
150,168 | hawkular/hawkular-bus | hawkular-bus-common/src/main/java/org/hawkular/bus/common/consumer/AbstractBasicMessageListener.java | AbstractBasicMessageListener.determineBasicMessageClass | @SuppressWarnings("unchecked")
protected Class<T> determineBasicMessageClass() {
// all of this is usually going to just return AbstractMessage.class - but in case there is a subclass hierarchy
// that makes it more specific, this will help discover the message class.
Class<?> thisClazz = th... | java | @SuppressWarnings("unchecked")
protected Class<T> determineBasicMessageClass() {
// all of this is usually going to just return AbstractMessage.class - but in case there is a subclass hierarchy
// that makes it more specific, this will help discover the message class.
Class<?> thisClazz = th... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"Class",
"<",
"T",
">",
"determineBasicMessageClass",
"(",
")",
"{",
"// all of this is usually going to just return AbstractMessage.class - but in case there is a subclass hierarchy",
"// that makes it more specific, thi... | In order to decode the JSON, we need the class representation of the basic message type. This method uses
reflection to try to get that type.
Subclasses can override this if they want to provide the class representation themselves (e.g. in case the
reflection cannot get it). Alternatively, subclasses can utilize the c... | [
"In",
"order",
"to",
"decode",
"the",
"JSON",
"we",
"need",
"the",
"class",
"representation",
"of",
"the",
"basic",
"message",
"type",
".",
"This",
"method",
"uses",
"reflection",
"to",
"try",
"to",
"get",
"that",
"type",
"."
] | 28d6b58bec81a50f8344d39f309b6971271ae627 | https://github.com/hawkular/hawkular-bus/blob/28d6b58bec81a50f8344d39f309b6971271ae627/hawkular-bus-common/src/main/java/org/hawkular/bus/common/consumer/AbstractBasicMessageListener.java#L209-L231 |
150,169 | diegossilveira/jcors | src/main/java/org/jcors/config/ConfigLoader.java | ConfigLoader.load | public static JCorsConfig load() {
log.info("Initializing JCors...");
InputStream fileStream = findFileInClasspath(CONFIG_FILE_NAME);
JCorsConfig config = new JCorsConfig();
if (fileStream != null) {
config = loadFromFileStream(fileStream);
Constraint.ensureNotNull(config, "It was not possible to get a... | java | public static JCorsConfig load() {
log.info("Initializing JCors...");
InputStream fileStream = findFileInClasspath(CONFIG_FILE_NAME);
JCorsConfig config = new JCorsConfig();
if (fileStream != null) {
config = loadFromFileStream(fileStream);
Constraint.ensureNotNull(config, "It was not possible to get a... | [
"public",
"static",
"JCorsConfig",
"load",
"(",
")",
"{",
"log",
".",
"info",
"(",
"\"Initializing JCors...\"",
")",
";",
"InputStream",
"fileStream",
"=",
"findFileInClasspath",
"(",
"CONFIG_FILE_NAME",
")",
";",
"JCorsConfig",
"config",
"=",
"new",
"JCorsConfig"... | Loads a configuration from jcors.xml in classpath. If this file is not found, uses a default configuration
@return | [
"Loads",
"a",
"configuration",
"from",
"jcors",
".",
"xml",
"in",
"classpath",
".",
"If",
"this",
"file",
"is",
"not",
"found",
"uses",
"a",
"default",
"configuration"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/ConfigLoader.java#L33-L51 |
150,170 | diegossilveira/jcors | src/main/java/org/jcors/config/ConfigLoader.java | ConfigLoader.findFileInClasspath | private static InputStream findFileInClasspath(String fileName) {
InputStream is = null;
try {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
is = classLoader.getResourceAsStream(fileName);
return is;
} catch (Exception ex) {
log.error(String.format("Error while reading... | java | private static InputStream findFileInClasspath(String fileName) {
InputStream is = null;
try {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
is = classLoader.getResourceAsStream(fileName);
return is;
} catch (Exception ex) {
log.error(String.format("Error while reading... | [
"private",
"static",
"InputStream",
"findFileInClasspath",
"(",
"String",
"fileName",
")",
"{",
"InputStream",
"is",
"=",
"null",
";",
"try",
"{",
"ClassLoader",
"classLoader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")"... | Finds a file by name in classpath
@param fileName
@return | [
"Finds",
"a",
"file",
"by",
"name",
"in",
"classpath"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/ConfigLoader.java#L59-L75 |
150,171 | diegossilveira/jcors | src/main/java/org/jcors/config/ConfigLoader.java | ConfigLoader.loadFromFileStream | private static JCorsConfig loadFromFileStream(InputStream fileStream) {
try {
JAXBContext context = JAXBContext.newInstance(ConfigBuilder.class);
Unmarshaller unmarshaller = context.createUnmarshaller();
unmarshaller.setSchema(loadXmlSchema());
ConfigBuilder configBuilder = (ConfigBuilder) unmarsha... | java | private static JCorsConfig loadFromFileStream(InputStream fileStream) {
try {
JAXBContext context = JAXBContext.newInstance(ConfigBuilder.class);
Unmarshaller unmarshaller = context.createUnmarshaller();
unmarshaller.setSchema(loadXmlSchema());
ConfigBuilder configBuilder = (ConfigBuilder) unmarsha... | [
"private",
"static",
"JCorsConfig",
"loadFromFileStream",
"(",
"InputStream",
"fileStream",
")",
"{",
"try",
"{",
"JAXBContext",
"context",
"=",
"JAXBContext",
".",
"newInstance",
"(",
"ConfigBuilder",
".",
"class",
")",
";",
"Unmarshaller",
"unmarshaller",
"=",
"... | Builds a configuration class based on XML file
@param file
@return | [
"Builds",
"a",
"configuration",
"class",
"based",
"on",
"XML",
"file"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/ConfigLoader.java#L83-L103 |
150,172 | diegossilveira/jcors | src/main/java/org/jcors/config/ConfigLoader.java | ConfigLoader.loadXmlSchema | private static Schema loadXmlSchema() throws SAXException {
InputStream schemaFileStream = findFileInClasspath(CONFIG_SCHEMA_FILE_NAME);
Constraint.ensureNotNull(schemaFileStream, "JCors configuration schema not found");
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)... | java | private static Schema loadXmlSchema() throws SAXException {
InputStream schemaFileStream = findFileInClasspath(CONFIG_SCHEMA_FILE_NAME);
Constraint.ensureNotNull(schemaFileStream, "JCors configuration schema not found");
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)... | [
"private",
"static",
"Schema",
"loadXmlSchema",
"(",
")",
"throws",
"SAXException",
"{",
"InputStream",
"schemaFileStream",
"=",
"findFileInClasspath",
"(",
"CONFIG_SCHEMA_FILE_NAME",
")",
";",
"Constraint",
".",
"ensureNotNull",
"(",
"schemaFileStream",
",",
"\"JCors c... | Loads the XML validation schema from the classpath
@return
@throws SAXException | [
"Loads",
"the",
"XML",
"validation",
"schema",
"from",
"the",
"classpath"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/ConfigLoader.java#L111-L118 |
150,173 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java | BanTransitiveDependencies.searchTree | private static boolean searchTree( DependencyNode node, int level, ArtifactMatcher excludes, StringBuilder message )
throws InvalidVersionSpecificationException
{
List<DependencyNode> children = node.getChildren();
/*
* if the node is deeper than direct dependency and is empty, it... | java | private static boolean searchTree( DependencyNode node, int level, ArtifactMatcher excludes, StringBuilder message )
throws InvalidVersionSpecificationException
{
List<DependencyNode> children = node.getChildren();
/*
* if the node is deeper than direct dependency and is empty, it... | [
"private",
"static",
"boolean",
"searchTree",
"(",
"DependencyNode",
"node",
",",
"int",
"level",
",",
"ArtifactMatcher",
"excludes",
",",
"StringBuilder",
"message",
")",
"throws",
"InvalidVersionSpecificationException",
"{",
"List",
"<",
"DependencyNode",
">",
"chil... | Searches dependency tree recursively for transitive dependencies that are not excluded, while generating nice
info message along the way.
@throws InvalidVersionSpecificationException | [
"Searches",
"dependency",
"tree",
"recursively",
"for",
"transitive",
"dependencies",
"that",
"are",
"not",
"excluded",
"while",
"generating",
"nice",
"info",
"message",
"along",
"the",
"way",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java#L74-L137 |
150,174 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/NullsoftID3GenreTable.java | NullsoftID3GenreTable.getGenre | public static int getGenre(String str)
{
for (int i=0; i<GENRES.length; i++)
if (GENRES[i].equalsIgnoreCase(str)) return i;
return -1;
} | java | public static int getGenre(String str)
{
for (int i=0; i<GENRES.length; i++)
if (GENRES[i].equalsIgnoreCase(str)) return i;
return -1;
} | [
"public",
"static",
"int",
"getGenre",
"(",
"String",
"str",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"GENRES",
".",
"length",
";",
"i",
"++",
")",
"if",
"(",
"GENRES",
"[",
"i",
"]",
".",
"equalsIgnoreCase",
"(",
"str",
")",
... | Tries to find the string provided in the table and returns the
corresponding int code if successful. Returns -1 if the genres is
not found in the table.
@param str the genre to search for
@return the integer code for the genre or -1 if the genre is not found | [
"Tries",
"to",
"find",
"the",
"string",
"provided",
"in",
"the",
"table",
"and",
"returns",
"the",
"corresponding",
"int",
"code",
"if",
"successful",
".",
"Returns",
"-",
"1",
"if",
"the",
"genres",
"is",
"not",
"found",
"in",
"the",
"table",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/NullsoftID3GenreTable.java#L68-L74 |
150,175 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/DOMUtil.java | DOMUtil.getChild | public static Element getChild(Element parent, String childName) {
NodeList nodes = parent.getChildNodes();
for (int i = 0; i < nodes.getLength(); ++i) {
Node node = nodes.item(i);
if ((node instanceof Element) && node.getNodeName().equals(childName))
return (Element)node;
}
return null;
} | java | public static Element getChild(Element parent, String childName) {
NodeList nodes = parent.getChildNodes();
for (int i = 0; i < nodes.getLength(); ++i) {
Node node = nodes.item(i);
if ((node instanceof Element) && node.getNodeName().equals(childName))
return (Element)node;
}
return null;
} | [
"public",
"static",
"Element",
"getChild",
"(",
"Element",
"parent",
",",
"String",
"childName",
")",
"{",
"NodeList",
"nodes",
"=",
"parent",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nodes",
".",
"getLengt... | Return the first child of the given name, or null. | [
"Return",
"the",
"first",
"child",
"of",
"the",
"given",
"name",
"or",
"null",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/DOMUtil.java#L17-L25 |
150,176 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/DOMUtil.java | DOMUtil.getChildren | public static List<Element> getChildren(Element parent, String childName) {
ArrayList<Element> children = new ArrayList<Element>();
NodeList nodes = parent.getChildNodes();
for (int i = 0; i < nodes.getLength(); ++i) {
Node node = nodes.item(i);
if ((node instanceof Element) && node.getNodeName().equal... | java | public static List<Element> getChildren(Element parent, String childName) {
ArrayList<Element> children = new ArrayList<Element>();
NodeList nodes = parent.getChildNodes();
for (int i = 0; i < nodes.getLength(); ++i) {
Node node = nodes.item(i);
if ((node instanceof Element) && node.getNodeName().equal... | [
"public",
"static",
"List",
"<",
"Element",
">",
"getChildren",
"(",
"Element",
"parent",
",",
"String",
"childName",
")",
"{",
"ArrayList",
"<",
"Element",
">",
"children",
"=",
"new",
"ArrayList",
"<",
"Element",
">",
"(",
")",
";",
"NodeList",
"nodes",
... | Return the children with the given name. | [
"Return",
"the",
"children",
"with",
"the",
"given",
"name",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/DOMUtil.java#L28-L37 |
150,177 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/DOMUtil.java | DOMUtil.getInnerText | public static String getInnerText(Node node)
{
if (node instanceof Element)
return ((Element)node).getTextContent();
if (node.getNodeType() == Node.TEXT_NODE)
return node.getNodeValue();
if (node instanceof Text)
return ((Text)node).getData();
return null;
} | java | public static String getInnerText(Node node)
{
if (node instanceof Element)
return ((Element)node).getTextContent();
if (node.getNodeType() == Node.TEXT_NODE)
return node.getNodeValue();
if (node instanceof Text)
return ((Text)node).getData();
return null;
} | [
"public",
"static",
"String",
"getInnerText",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"node",
"instanceof",
"Element",
")",
"return",
"(",
"(",
"Element",
")",
"node",
")",
".",
"getTextContent",
"(",
")",
";",
"if",
"(",
"node",
".",
"getNodeType",
... | Return the inner text of a node. | [
"Return",
"the",
"inner",
"text",
"of",
"a",
"node",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/DOMUtil.java#L40-L49 |
150,178 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/DOMUtil.java | DOMUtil.getChildText | public static String getChildText(Element parent, String childName) {
Element child = getChild(parent, childName);
if (child == null) return null;
return getInnerText(child);
} | java | public static String getChildText(Element parent, String childName) {
Element child = getChild(parent, childName);
if (child == null) return null;
return getInnerText(child);
} | [
"public",
"static",
"String",
"getChildText",
"(",
"Element",
"parent",
",",
"String",
"childName",
")",
"{",
"Element",
"child",
"=",
"getChild",
"(",
"parent",
",",
"childName",
")",
";",
"if",
"(",
"child",
"==",
"null",
")",
"return",
"null",
";",
"r... | Return the inner text of the first child with the given name. | [
"Return",
"the",
"inner",
"text",
"of",
"the",
"first",
"child",
"with",
"the",
"given",
"name",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/DOMUtil.java#L52-L56 |
150,179 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/message/MessageFactory.java | MessageFactory.warn | public static Message warn(Entity entity, String key, String... args) {
return message(MessageType.WARN, entity, key, args);
} | java | public static Message warn(Entity entity, String key, String... args) {
return message(MessageType.WARN, entity, key, args);
} | [
"public",
"static",
"Message",
"warn",
"(",
"Entity",
"entity",
",",
"String",
"key",
",",
"String",
"...",
"args",
")",
"{",
"return",
"message",
"(",
"MessageType",
".",
"WARN",
",",
"entity",
",",
"key",
",",
"args",
")",
";",
"}"
] | Create an entity scoped warning message | [
"Create",
"an",
"entity",
"scoped",
"warning",
"message"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/message/MessageFactory.java#L47-L49 |
150,180 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/message/MessageFactory.java | MessageFactory.error | public static Message error(Entity entity, String key, String... args) {
return message(MessageType.ERROR, entity, key, args);
} | java | public static Message error(Entity entity, String key, String... args) {
return message(MessageType.ERROR, entity, key, args);
} | [
"public",
"static",
"Message",
"error",
"(",
"Entity",
"entity",
",",
"String",
"key",
",",
"String",
"...",
"args",
")",
"{",
"return",
"message",
"(",
"MessageType",
".",
"ERROR",
",",
"entity",
",",
"key",
",",
"args",
")",
";",
"}"
] | Create an entity scoped error message | [
"Create",
"an",
"entity",
"scoped",
"error",
"message"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/message/MessageFactory.java#L54-L56 |
150,181 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/message/MessageFactory.java | MessageFactory.info | public static Message info(Entity entity, Field field, String key, String... args) {
return message(MessageType.INFO, entity, field, key, args);
} | java | public static Message info(Entity entity, Field field, String key, String... args) {
return message(MessageType.INFO, entity, field, key, args);
} | [
"public",
"static",
"Message",
"info",
"(",
"Entity",
"entity",
",",
"Field",
"field",
",",
"String",
"key",
",",
"String",
"...",
"args",
")",
"{",
"return",
"message",
"(",
"MessageType",
".",
"INFO",
",",
"entity",
",",
"field",
",",
"key",
",",
"ar... | Create a field scoped information message | [
"Create",
"a",
"field",
"scoped",
"information",
"message"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/message/MessageFactory.java#L61-L63 |
150,182 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/LCCore.java | LCCore.initEnvironment | public static void initEnvironment() {
// init logging system if not specified
if (System.getProperty("org.apache.commons.logging.Log") == null)
System.setProperty("org.apache.commons.logging.Log", "net.lecousin.framework.log.bridges.ApacheCommonsLogging");
// register protocols
String protocols = S... | java | public static void initEnvironment() {
// init logging system if not specified
if (System.getProperty("org.apache.commons.logging.Log") == null)
System.setProperty("org.apache.commons.logging.Log", "net.lecousin.framework.log.bridges.ApacheCommonsLogging");
// register protocols
String protocols = S... | [
"public",
"static",
"void",
"initEnvironment",
"(",
")",
"{",
"// init logging system if not specified\r",
"if",
"(",
"System",
".",
"getProperty",
"(",
"\"org.apache.commons.logging.Log\"",
")",
"==",
"null",
")",
"System",
".",
"setProperty",
"(",
"\"org.apache.common... | Initialize properties. | [
"Initialize",
"properties",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/LCCore.java#L81-L94 |
150,183 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/LCCore.java | LCCore.stop | public static MutableBoolean stop(boolean forceJvmToStop) {
if (stop != null) {
new Exception("LCCore already stopped", stop).printStackTrace(System.err);
return new MutableBoolean(true);
}
stop = new Exception("LCCore stop requested here");
MutableBoolean stopped = new MutableBoolean(false);
new... | java | public static MutableBoolean stop(boolean forceJvmToStop) {
if (stop != null) {
new Exception("LCCore already stopped", stop).printStackTrace(System.err);
return new MutableBoolean(true);
}
stop = new Exception("LCCore stop requested here");
MutableBoolean stopped = new MutableBoolean(false);
new... | [
"public",
"static",
"MutableBoolean",
"stop",
"(",
"boolean",
"forceJvmToStop",
")",
"{",
"if",
"(",
"stop",
"!=",
"null",
")",
"{",
"new",
"Exception",
"(",
"\"LCCore already stopped\"",
",",
"stop",
")",
".",
"printStackTrace",
"(",
"System",
".",
"err",
"... | Stop the environement. | [
"Stop",
"the",
"environement",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/LCCore.java#L137-L162 |
150,184 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/LCCore.java | LCCore.replaceMainThreadExecutor | public static void replaceMainThreadExecutor(MainThreadExecutor executor) {
MainThreadExecutor previous;
synchronized (LCCore.class) {
previous = mainThreadExecutor;
mainThreadExecutor = executor;
}
do {
Runnable toExecute = previous.pop();
if (toExecute == null) break;
executor.execute(... | java | public static void replaceMainThreadExecutor(MainThreadExecutor executor) {
MainThreadExecutor previous;
synchronized (LCCore.class) {
previous = mainThreadExecutor;
mainThreadExecutor = executor;
}
do {
Runnable toExecute = previous.pop();
if (toExecute == null) break;
executor.execute(... | [
"public",
"static",
"void",
"replaceMainThreadExecutor",
"(",
"MainThreadExecutor",
"executor",
")",
"{",
"MainThreadExecutor",
"previous",
";",
"synchronized",
"(",
"LCCore",
".",
"class",
")",
"{",
"previous",
"=",
"mainThreadExecutor",
";",
"mainThreadExecutor",
"=... | Replace the main thread executor. | [
"Replace",
"the",
"main",
"thread",
"executor",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/LCCore.java#L232-L243 |
150,185 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java | EnforcerRuleUtils.readModel | private Model readModel ( File pom )
throws IOException, XmlPullParserException
{
Reader reader = ReaderFactory.newXmlReader( pom );
MavenXpp3Reader xpp3 = new MavenXpp3Reader();
Model model = null;
try
{
model = xpp3.read( reader );
}
fina... | java | private Model readModel ( File pom )
throws IOException, XmlPullParserException
{
Reader reader = ReaderFactory.newXmlReader( pom );
MavenXpp3Reader xpp3 = new MavenXpp3Reader();
Model model = null;
try
{
model = xpp3.read( reader );
}
fina... | [
"private",
"Model",
"readModel",
"(",
"File",
"pom",
")",
"throws",
"IOException",
",",
"XmlPullParserException",
"{",
"Reader",
"reader",
"=",
"ReaderFactory",
".",
"newXmlReader",
"(",
"pom",
")",
";",
"MavenXpp3Reader",
"xpp3",
"=",
"new",
"MavenXpp3Reader",
... | Gets the pom model for this file.
@param pom the pom
@return the model
@throws IOException Signals that an I/O exception has occurred.
@throws XmlPullParserException the xml pull parser exception | [
"Gets",
"the",
"pom",
"model",
"for",
"this",
"file",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java#L141-L157 |
150,186 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java | EnforcerRuleUtils.getPomModel | private Model getPomModel ( String groupId, String artifactId, String version, File pom )
throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException
{
Model model = null;
// do we want to look in the reactor like the
// project builder? Would ... | java | private Model getPomModel ( String groupId, String artifactId, String version, File pom )
throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException
{
Model model = null;
// do we want to look in the reactor like the
// project builder? Would ... | [
"private",
"Model",
"getPomModel",
"(",
"String",
"groupId",
",",
"String",
"artifactId",
",",
"String",
"version",
",",
"File",
"pom",
")",
"throws",
"ArtifactResolutionException",
",",
"ArtifactNotFoundException",
",",
"IOException",
",",
"XmlPullParserException",
"... | This method gets the model for the defined artifact.
Looks first in the filesystem, then tries to get it
from the repo.
@param groupId the group id
@param artifactId the artifact id
@param version the version
@param pom the pom
@return the pom model
@throws ArtifactResolutionException the artifact resolution excepti... | [
"This",
"method",
"gets",
"the",
"model",
"for",
"the",
"defined",
"artifact",
".",
"Looks",
"first",
"in",
"the",
"filesystem",
"then",
"tries",
"to",
"get",
"it",
"from",
"the",
"repo",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java#L176-L219 |
150,187 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java | EnforcerRuleUtils.getModelsRecursively | public List<Model> getModelsRecursively ( String groupId, String artifactId, String version, File pom )
throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException
{
List<Model> models = null;
Model model = getPomModel( groupId, artifactId, version, pom... | java | public List<Model> getModelsRecursively ( String groupId, String artifactId, String version, File pom )
throws ArtifactResolutionException, ArtifactNotFoundException, IOException, XmlPullParserException
{
List<Model> models = null;
Model model = getPomModel( groupId, artifactId, version, pom... | [
"public",
"List",
"<",
"Model",
">",
"getModelsRecursively",
"(",
"String",
"groupId",
",",
"String",
"artifactId",
",",
"String",
"version",
",",
"File",
"pom",
")",
"throws",
"ArtifactResolutionException",
",",
"ArtifactNotFoundException",
",",
"IOException",
",",... | This method loops through all the parents, getting
each pom model and then its parent.
@param groupId the group id
@param artifactId the artifact id
@param version the version
@param pom the pom
@return the models recursively
@throws ArtifactResolutionException the artifact resolution exception
@throws ArtifactNotFo... | [
"This",
"method",
"loops",
"through",
"all",
"the",
"parents",
"getting",
"each",
"pom",
"model",
"and",
"then",
"its",
"parent",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java#L237-L273 |
150,188 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java | EnforcerRuleUtils.checkIfModelMatches | protected boolean checkIfModelMatches ( String groupId, String artifactId, String version, Model model )
{
// try these first.
String modelGroup = model.getGroupId();
String modelArtifactId = model.getArtifactId();
String modelVersion = model.getVersion();
try
{
... | java | protected boolean checkIfModelMatches ( String groupId, String artifactId, String version, Model model )
{
// try these first.
String modelGroup = model.getGroupId();
String modelArtifactId = model.getArtifactId();
String modelVersion = model.getVersion();
try
{
... | [
"protected",
"boolean",
"checkIfModelMatches",
"(",
"String",
"groupId",
",",
"String",
"artifactId",
",",
"String",
"version",
",",
"Model",
"model",
")",
"{",
"// try these first.",
"String",
"modelGroup",
"=",
"model",
".",
"getGroupId",
"(",
")",
";",
"Strin... | Make sure the model is the one I'm expecting.
@param groupId the group id
@param artifactId the artifact id
@param version the version
@param model Model being checked.
@return true, if check if model matches | [
"Make",
"sure",
"the",
"model",
"is",
"the",
"one",
"I",
"m",
"expecting",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/utils/EnforcerRuleUtils.java#L285-L331 |
150,189 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseDeps.java | RequireReleaseDeps.execute | public void execute( EnforcerRuleHelper helper )
throws EnforcerRuleException
{
boolean callSuper;
MavenProject project = null;
if ( onlyWhenRelease )
{
// get the project
project = getProject( helper );
// only call super if this project ... | java | public void execute( EnforcerRuleHelper helper )
throws EnforcerRuleException
{
boolean callSuper;
MavenProject project = null;
if ( onlyWhenRelease )
{
// get the project
project = getProject( helper );
// only call super if this project ... | [
"public",
"void",
"execute",
"(",
"EnforcerRuleHelper",
"helper",
")",
"throws",
"EnforcerRuleException",
"{",
"boolean",
"callSuper",
";",
"MavenProject",
"project",
"=",
"null",
";",
"if",
"(",
"onlyWhenRelease",
")",
"{",
"// get the project",
"project",
"=",
"... | Override parent to allow optional ignore of this rule.
@param helper the enforcerRuleHelper
@throws EnforcerRuleException when an exception occurs | [
"Override",
"parent",
"to",
"allow",
"optional",
"ignore",
"of",
"this",
"rule",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseDeps.java#L95-L128 |
150,190 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/converter/Converter.java | Converter.getNestedProperty | public Object getNestedProperty(Object obj, String propertyName) {
if (obj != null && propertyName != null) {
return PresentationManager.getPm().get(obj, propertyName);
}
return null;
} | java | public Object getNestedProperty(Object obj, String propertyName) {
if (obj != null && propertyName != null) {
return PresentationManager.getPm().get(obj, propertyName);
}
return null;
} | [
"public",
"Object",
"getNestedProperty",
"(",
"Object",
"obj",
",",
"String",
"propertyName",
")",
"{",
"if",
"(",
"obj",
"!=",
"null",
"&&",
"propertyName",
"!=",
"null",
")",
"{",
"return",
"PresentationManager",
".",
"getPm",
"(",
")",
".",
"get",
"(",
... | Getter for a nested property in the given object.
@param obj The object
@param propertyName The name of the property to get
@return The property value | [
"Getter",
"for",
"a",
"nested",
"property",
"in",
"the",
"given",
"object",
"."
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/converter/Converter.java#L111-L116 |
150,191 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/converter/Converter.java | Converter.visualize | public String visualize(Object obj) throws ConverterException {
Integer pad = 0;
String padc = getConfig("pad-count", "0");
try {
pad = Integer.parseInt(padc);
} catch (Exception e) {
}
char padch = getConfig("pad-char", " ").charAt(0);
String padd = g... | java | public String visualize(Object obj) throws ConverterException {
Integer pad = 0;
String padc = getConfig("pad-count", "0");
try {
pad = Integer.parseInt(padc);
} catch (Exception e) {
}
char padch = getConfig("pad-char", " ").charAt(0);
String padd = g... | [
"public",
"String",
"visualize",
"(",
"Object",
"obj",
")",
"throws",
"ConverterException",
"{",
"Integer",
"pad",
"=",
"0",
";",
"String",
"padc",
"=",
"getConfig",
"(",
"\"pad-count\"",
",",
"\"0\"",
")",
";",
"try",
"{",
"pad",
"=",
"Integer",
".",
"p... | Visualization with some standard properties.
@param obj The object to visualize
@param extra Some extra text. Not used at the moment.
@return The string representation of the given object
@throws ConverterException when an exception occurs trying to convert. | [
"Visualization",
"with",
"some",
"standard",
"properties",
"."
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/converter/Converter.java#L155-L180 |
150,192 | diegossilveira/jcors | src/main/java/org/jcors/config/JCorsConfig.java | JCorsConfig.addAllowedOrigin | public void addAllowedOrigin(String origin) {
Constraint.ensureNotEmpty(origin, String.format("Invalid origin '%s'", origin));
allowedOrigins.add(origin);
} | java | public void addAllowedOrigin(String origin) {
Constraint.ensureNotEmpty(origin, String.format("Invalid origin '%s'", origin));
allowedOrigins.add(origin);
} | [
"public",
"void",
"addAllowedOrigin",
"(",
"String",
"origin",
")",
"{",
"Constraint",
".",
"ensureNotEmpty",
"(",
"origin",
",",
"String",
".",
"format",
"(",
"\"Invalid origin '%s'\"",
",",
"origin",
")",
")",
";",
"allowedOrigins",
".",
"add",
"(",
"origin"... | Add an origin allowed by the resource
@param origin | [
"Add",
"an",
"origin",
"allowed",
"by",
"the",
"resource"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/JCorsConfig.java#L108-L112 |
150,193 | diegossilveira/jcors | src/main/java/org/jcors/config/JCorsConfig.java | JCorsConfig.addAllowedHeader | public void addAllowedHeader(String header) {
Constraint.ensureNotEmpty(header, String.format("Invalid header '%s'", header));
allowedHeaders.add(header.toLowerCase());
} | java | public void addAllowedHeader(String header) {
Constraint.ensureNotEmpty(header, String.format("Invalid header '%s'", header));
allowedHeaders.add(header.toLowerCase());
} | [
"public",
"void",
"addAllowedHeader",
"(",
"String",
"header",
")",
"{",
"Constraint",
".",
"ensureNotEmpty",
"(",
"header",
",",
"String",
".",
"format",
"(",
"\"Invalid header '%s'\"",
",",
"header",
")",
")",
";",
"allowedHeaders",
".",
"add",
"(",
"header"... | Add a header allowed by the resource
@param header | [
"Add",
"a",
"header",
"allowed",
"by",
"the",
"resource"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/JCorsConfig.java#L162-L166 |
150,194 | diegossilveira/jcors | src/main/java/org/jcors/config/JCorsConfig.java | JCorsConfig.getAllowedHeaders | public Collection<String> getAllowedHeaders(Collection<String> requestHeaders) {
Constraint.ensureNotNull(requestHeaders, "Null headers");
Set<String> rtAllowedHeaders = new HashSet<String>(allowedHeaders);
rtAllowedHeaders.addAll(requestHeaders);
return rtAllowedHeaders;
} | java | public Collection<String> getAllowedHeaders(Collection<String> requestHeaders) {
Constraint.ensureNotNull(requestHeaders, "Null headers");
Set<String> rtAllowedHeaders = new HashSet<String>(allowedHeaders);
rtAllowedHeaders.addAll(requestHeaders);
return rtAllowedHeaders;
} | [
"public",
"Collection",
"<",
"String",
">",
"getAllowedHeaders",
"(",
"Collection",
"<",
"String",
">",
"requestHeaders",
")",
"{",
"Constraint",
".",
"ensureNotNull",
"(",
"requestHeaders",
",",
"\"Null headers\"",
")",
";",
"Set",
"<",
"String",
">",
"rtAllowe... | Return all headers allowed by the resource, including the preflight request headers
@param requestHeaders
@return | [
"Return",
"all",
"headers",
"allowed",
"by",
"the",
"resource",
"including",
"the",
"preflight",
"request",
"headers"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/JCorsConfig.java#L174-L181 |
150,195 | diegossilveira/jcors | src/main/java/org/jcors/config/JCorsConfig.java | JCorsConfig.isMethodAllowed | public boolean isMethodAllowed(String method) {
return HttpMethod.isValidMethod(method) && (allowedMethods.isEmpty() || allowedMethods.contains(method));
} | java | public boolean isMethodAllowed(String method) {
return HttpMethod.isValidMethod(method) && (allowedMethods.isEmpty() || allowedMethods.contains(method));
} | [
"public",
"boolean",
"isMethodAllowed",
"(",
"String",
"method",
")",
"{",
"return",
"HttpMethod",
".",
"isValidMethod",
"(",
"method",
")",
"&&",
"(",
"allowedMethods",
".",
"isEmpty",
"(",
")",
"||",
"allowedMethods",
".",
"contains",
"(",
"method",
")",
"... | Check if the method is allowed by the resource This check is case-sensitive
@param method
@return | [
"Check",
"if",
"the",
"method",
"is",
"allowed",
"by",
"the",
"resource",
"This",
"check",
"is",
"case",
"-",
"sensitive"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/JCorsConfig.java#L189-L192 |
150,196 | diegossilveira/jcors | src/main/java/org/jcors/config/JCorsConfig.java | JCorsConfig.addAllowedMethod | public void addAllowedMethod(String method) {
Constraint.ensureNotEmpty(method, String.format("Invalid method '%s'", method));
Constraint.ensureTrue(HttpMethod.isValidMethod(method), String.format("Invalid method '%s'", method));
allowedMethods.add(method.toUpperCase());
} | java | public void addAllowedMethod(String method) {
Constraint.ensureNotEmpty(method, String.format("Invalid method '%s'", method));
Constraint.ensureTrue(HttpMethod.isValidMethod(method), String.format("Invalid method '%s'", method));
allowedMethods.add(method.toUpperCase());
} | [
"public",
"void",
"addAllowedMethod",
"(",
"String",
"method",
")",
"{",
"Constraint",
".",
"ensureNotEmpty",
"(",
"method",
",",
"String",
".",
"format",
"(",
"\"Invalid method '%s'\"",
",",
"method",
")",
")",
";",
"Constraint",
".",
"ensureTrue",
"(",
"Http... | Add a method allowed by the resource
@param method | [
"Add",
"a",
"method",
"allowed",
"by",
"the",
"resource"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/JCorsConfig.java#L199-L204 |
150,197 | diegossilveira/jcors | src/main/java/org/jcors/config/JCorsConfig.java | JCorsConfig.getAllowedMethods | public Collection<String> getAllowedMethods(String requestMethod) {
Constraint.ensureNotEmpty(requestMethod, String.format("Invalid method '%s'", requestMethod));
Set<String> rtAllowedMethods = new HashSet<String>(allowedMethods);
rtAllowedMethods.add(requestMethod.toUpperCase());
return rtAllowedMethods;
} | java | public Collection<String> getAllowedMethods(String requestMethod) {
Constraint.ensureNotEmpty(requestMethod, String.format("Invalid method '%s'", requestMethod));
Set<String> rtAllowedMethods = new HashSet<String>(allowedMethods);
rtAllowedMethods.add(requestMethod.toUpperCase());
return rtAllowedMethods;
} | [
"public",
"Collection",
"<",
"String",
">",
"getAllowedMethods",
"(",
"String",
"requestMethod",
")",
"{",
"Constraint",
".",
"ensureNotEmpty",
"(",
"requestMethod",
",",
"String",
".",
"format",
"(",
"\"Invalid method '%s'\"",
",",
"requestMethod",
")",
")",
";",... | Return all methods allowed by the resource, including the preflight request method
@param requestMethod
@return | [
"Return",
"all",
"methods",
"allowed",
"by",
"the",
"resource",
"including",
"the",
"preflight",
"request",
"method"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/config/JCorsConfig.java#L212-L219 |
150,198 | GerdHolz/TOVAL | src/de/invation/code/toval/os/SolarisUtils.java | SolarisUtils.registerFileExtension | @Override
public boolean registerFileExtension(String fileTypeName, String fileTypeExtension, String application) throws OSException {
throw new UnsupportedOperationException("Not supported yet.");
} | java | @Override
public boolean registerFileExtension(String fileTypeName, String fileTypeExtension, String application) throws OSException {
throw new UnsupportedOperationException("Not supported yet.");
} | [
"@",
"Override",
"public",
"boolean",
"registerFileExtension",
"(",
"String",
"fileTypeName",
",",
"String",
"fileTypeExtension",
",",
"String",
"application",
")",
"throws",
"OSException",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Not supported yet.\"... | Registers a new file extension in the operating system.
@param fileTypeName Name of the file extension. Must be atomic, e.g.
<code>foocorp.fooapp.v1</code>.
@param fileTypeExtension File extension with leading dot, e.g.
<code>.bar</code>.
@param application Path to the application, which should open the new
file exten... | [
"Registers",
"a",
"new",
"file",
"extension",
"in",
"the",
"operating",
"system",
"."
] | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/SolarisUtils.java#L118-L121 |
150,199 | jtrfp/javamod | src/main/java/de/quippy/ogg/jorbis/VorbisFile.java | VorbisFile.fetch_headers | int fetch_headers(Info vi, Comment vc, int[] serialno, Page og_ptr){
Page og=new Page();
Packet op=new Packet();
int ret;
if(og_ptr==null){
ret=get_next_page(og, CHUNKSIZE);
if(ret==OV_EREAD)
return OV_EREAD;
if(ret<0)
return OV_ENOTVORBIS;
og_ptr=og;
}
... | java | int fetch_headers(Info vi, Comment vc, int[] serialno, Page og_ptr){
Page og=new Page();
Packet op=new Packet();
int ret;
if(og_ptr==null){
ret=get_next_page(og, CHUNKSIZE);
if(ret==OV_EREAD)
return OV_EREAD;
if(ret<0)
return OV_ENOTVORBIS;
og_ptr=og;
}
... | [
"int",
"fetch_headers",
"(",
"Info",
"vi",
",",
"Comment",
"vc",
",",
"int",
"[",
"]",
"serialno",
",",
"Page",
"og_ptr",
")",
"{",
"Page",
"og",
"=",
"new",
"Page",
"(",
")",
";",
"Packet",
"op",
"=",
"new",
"Packet",
"(",
")",
";",
"int",
"ret"... | non-streaming input sources | [
"non",
"-",
"streaming",
"input",
"sources"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/ogg/jorbis/VorbisFile.java#L258-L313 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.