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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
104,300 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java | Slf4jLogger.debug | public void debug( Marker marker, String msg )
{
if( m_delegate.isDebugEnabled() )
{
setMDCMarker( marker );
m_delegate.debug( msg, null );
resetMDCMarker();
}
} | java | public void debug( Marker marker, String msg )
{
if( m_delegate.isDebugEnabled() )
{
setMDCMarker( marker );
m_delegate.debug( msg, null );
resetMDCMarker();
}
} | [
"public",
"void",
"debug",
"(",
"Marker",
"marker",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"m_delegate",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"setMDCMarker",
"(",
"marker",
")",
";",
"m_delegate",
".",
"debug",
"(",
"msg",
",",
"null",
")",
... | Log a message with the specific Marker at the DEBUG level.
@param marker the marker data specific to this log statement
@param msg the message string to be logged | [
"Log",
"a",
"message",
"with",
"the",
"specific",
"Marker",
"at",
"the",
"DEBUG",
"level",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L368-L376 |
104,301 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java | Slf4jLogger.info | public void info( String format, Object arg1, Object arg2 )
{
if( m_delegate.isInfoEnabled() )
{
FormattingTuple tuple = MessageFormatter.format( format, arg1, arg2 );
m_delegate.inform( tuple.getMessage(), tuple.getThrowable() );
}
} | java | public void info( String format, Object arg1, Object arg2 )
{
if( m_delegate.isInfoEnabled() )
{
FormattingTuple tuple = MessageFormatter.format( format, arg1, arg2 );
m_delegate.inform( tuple.getMessage(), tuple.getThrowable() );
}
} | [
"public",
"void",
"info",
"(",
"String",
"format",
",",
"Object",
"arg1",
",",
"Object",
"arg2",
")",
"{",
"if",
"(",
"m_delegate",
".",
"isInfoEnabled",
"(",
")",
")",
"{",
"FormattingTuple",
"tuple",
"=",
"MessageFormatter",
".",
"format",
"(",
"format",... | Log a message at the INFO level according to the specified format
and arguments.
<p>This form avoids superfluous object creation when the logger
is disabled for the INFO level. </p>
@param format the format string
@param arg1 the first argument
@param arg2 the second argument | [
"Log",
"a",
"message",
"at",
"the",
"INFO",
"level",
"according",
"to",
"the",
"specified",
"format",
"and",
"arguments",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L510-L517 |
104,302 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java | Slf4jLogger.info | public void info( Marker marker, String msg )
{
if( m_delegate.isInfoEnabled() )
{
setMDCMarker( marker );
m_delegate.inform( msg, null );
resetMDCMarker();
}
} | java | public void info( Marker marker, String msg )
{
if( m_delegate.isInfoEnabled() )
{
setMDCMarker( marker );
m_delegate.inform( msg, null );
resetMDCMarker();
}
} | [
"public",
"void",
"info",
"(",
"Marker",
"marker",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"m_delegate",
".",
"isInfoEnabled",
"(",
")",
")",
"{",
"setMDCMarker",
"(",
"marker",
")",
";",
"m_delegate",
".",
"inform",
"(",
"msg",
",",
"null",
")",
... | Log a message with the specific Marker at the INFO level.
@param marker The marker specific to this log statement
@param msg the message string to be logged | [
"Log",
"a",
"message",
"with",
"the",
"specific",
"Marker",
"at",
"the",
"INFO",
"level",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L570-L578 |
104,303 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java | Slf4jLogger.warn | public void warn( Marker marker, String msg )
{
if( m_delegate.isWarnEnabled() )
{
setMDCMarker( marker );
m_delegate.warn( msg, null );
resetMDCMarker();
}
} | java | public void warn( Marker marker, String msg )
{
if( m_delegate.isWarnEnabled() )
{
setMDCMarker( marker );
m_delegate.warn( msg, null );
resetMDCMarker();
}
} | [
"public",
"void",
"warn",
"(",
"Marker",
"marker",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"m_delegate",
".",
"isWarnEnabled",
"(",
")",
")",
"{",
"setMDCMarker",
"(",
"marker",
")",
";",
"m_delegate",
".",
"warn",
"(",
"msg",
",",
"null",
")",
";... | Log a message with the specific Marker at the WARN level.
@param marker The marker specific to this log statement
@param msg the message string to be logged | [
"Log",
"a",
"message",
"with",
"the",
"specific",
"Marker",
"at",
"the",
"WARN",
"level",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L772-L780 |
104,304 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java | Slf4jLogger.error | public void error( String format, Object arg )
{
if( m_delegate.isErrorEnabled() )
{
FormattingTuple tuple = MessageFormatter.format( format, arg );
m_delegate.error( tuple.getMessage(), tuple.getThrowable() );
}
} | java | public void error( String format, Object arg )
{
if( m_delegate.isErrorEnabled() )
{
FormattingTuple tuple = MessageFormatter.format( format, arg );
m_delegate.error( tuple.getMessage(), tuple.getThrowable() );
}
} | [
"public",
"void",
"error",
"(",
"String",
"format",
",",
"Object",
"arg",
")",
"{",
"if",
"(",
"m_delegate",
".",
"isErrorEnabled",
"(",
")",
")",
"{",
"FormattingTuple",
"tuple",
"=",
"MessageFormatter",
".",
"format",
"(",
"format",
",",
"arg",
")",
";... | Log a message at the ERROR level according to the specified format
and argument.
<p>This form avoids superfluous object creation when the logger
is disabled for the ERROR level. </p>
@param format the format string
@param arg the argument | [
"Log",
"a",
"message",
"at",
"the",
"ERROR",
"level",
"according",
"to",
"the",
"specified",
"format",
"and",
"argument",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L894-L901 |
104,305 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java | Slf4jLogger.error | public void error( Marker marker, String msg )
{
if( m_delegate.isErrorEnabled() )
{
setMDCMarker( marker );
m_delegate.error( msg, null );
resetMDCMarker();
}
} | java | public void error( Marker marker, String msg )
{
if( m_delegate.isErrorEnabled() )
{
setMDCMarker( marker );
m_delegate.error( msg, null );
resetMDCMarker();
}
} | [
"public",
"void",
"error",
"(",
"Marker",
"marker",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"m_delegate",
".",
"isErrorEnabled",
"(",
")",
")",
"{",
"setMDCMarker",
"(",
"marker",
")",
";",
"m_delegate",
".",
"error",
"(",
"msg",
",",
"null",
")",
... | Log a message with the specific Marker at the ERROR level.
@param marker The marker specific to this log statement
@param msg the message string to be logged | [
"Log",
"a",
"message",
"with",
"the",
"specific",
"Marker",
"at",
"the",
"ERROR",
"level",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L974-L982 |
104,306 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java | Slf4jLogger.log | public void log(Marker marker, String fqcn, int level, String message, Object[] argArray, Throwable t)
{
setMDCMarker( marker );
switch(level)
{
case(TRACE_INT):
if( m_delegate.isTraceEnabled() )
{
FormattingTuple tuple = MessageFormat... | java | public void log(Marker marker, String fqcn, int level, String message, Object[] argArray, Throwable t)
{
setMDCMarker( marker );
switch(level)
{
case(TRACE_INT):
if( m_delegate.isTraceEnabled() )
{
FormattingTuple tuple = MessageFormat... | [
"public",
"void",
"log",
"(",
"Marker",
"marker",
",",
"String",
"fqcn",
",",
"int",
"level",
",",
"String",
"message",
",",
"Object",
"[",
"]",
"argArray",
",",
"Throwable",
"t",
")",
"{",
"setMDCMarker",
"(",
"marker",
")",
";",
"switch",
"(",
"level... | This method implements LocationAwareLogger.log
The caller passes in it's own Fully Qualified Class Name (fqcn).
@param marker
@param fqcn the fully qualified class name (FQCN) of the <b>caller</b>
@param level Integer representation of the log level as defined in LocationAwareLogger
@param message the message as a fo... | [
"This",
"method",
"implements",
"LocationAwareLogger",
".",
"log"
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L1075-L1119 |
104,307 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/rule/NotRule.java | NotRule.getRule | public static Rule getRule(final Stack stack) {
if (stack.size() < 1) {
throw new IllegalArgumentException(
"Invalid NOT rule - expected one rule but received "
+ stack.size());
}
Object o1 = stack.pop();
if (o1 instanceof Rule) {
Rul... | java | public static Rule getRule(final Stack stack) {
if (stack.size() < 1) {
throw new IllegalArgumentException(
"Invalid NOT rule - expected one rule but received "
+ stack.size());
}
Object o1 = stack.pop();
if (o1 instanceof Rule) {
Rul... | [
"public",
"static",
"Rule",
"getRule",
"(",
"final",
"Stack",
"stack",
")",
"{",
"if",
"(",
"stack",
".",
"size",
"(",
")",
"<",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid NOT rule - expected one rule but received \"",
"+",
"stack... | Create new instance from top element of stack.
@param stack stack
@return new rule. | [
"Create",
"new",
"instance",
"from",
"top",
"element",
"of",
"stack",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/rule/NotRule.java#L67-L80 |
104,308 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/log4j/Category.java | Category.fatal | public void fatal( final Object message )
{
if( m_delegate.isFatalEnabled() && message != null )
{
m_delegate.fatal( message.toString(), null );
}
} | java | public void fatal( final Object message )
{
if( m_delegate.isFatalEnabled() && message != null )
{
m_delegate.fatal( message.toString(), null );
}
} | [
"public",
"void",
"fatal",
"(",
"final",
"Object",
"message",
")",
"{",
"if",
"(",
"m_delegate",
".",
"isFatalEnabled",
"(",
")",
"&&",
"message",
"!=",
"null",
")",
"{",
"m_delegate",
".",
"fatal",
"(",
"message",
".",
"toString",
"(",
")",
",",
"null... | Log a message object with the FATAL Level.
<p>
This method first checks if this category is <code>FATAL</code> enabled
by comparing the level of this category with FATAL
Level. If the category is <code>FATAL</code> enabled, then it converts
the message object passed as parameter to a string by invoking the
appropriate... | [
"Log",
"a",
"message",
"object",
"with",
"the",
"FATAL",
"Level",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/log4j/Category.java#L287-L293 |
104,309 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java | LocalizedMessage.getFormattedMessage | @Override
public String getFormattedMessage() {
if (formattedMessage != null) {
return formattedMessage;
}
ResourceBundle bundle = this.resourceBundle;
if (bundle == null) {
if (baseName != null) {
bundle = getResourceBundle(baseName, locale, f... | java | @Override
public String getFormattedMessage() {
if (formattedMessage != null) {
return formattedMessage;
}
ResourceBundle bundle = this.resourceBundle;
if (bundle == null) {
if (baseName != null) {
bundle = getResourceBundle(baseName, locale, f... | [
"@",
"Override",
"public",
"String",
"getFormattedMessage",
"(",
")",
"{",
"if",
"(",
"formattedMessage",
"!=",
"null",
")",
"{",
"return",
"formattedMessage",
";",
"}",
"ResourceBundle",
"bundle",
"=",
"this",
".",
"resourceBundle",
";",
"if",
"(",
"bundle",
... | Returns the formatted message after looking up the format in the resource bundle.
@return The formatted message String. | [
"Returns",
"the",
"formatted",
"message",
"after",
"looking",
"up",
"the",
"format",
"in",
"the",
"resource",
"bundle",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java#L179-L199 |
104,310 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java | LocalizedMessage.getResourceBundle | protected ResourceBundle getResourceBundle(final String rbBaseName, final Locale resourceBundleLocale,
final boolean loop) {
ResourceBundle rb = null;
if (rbBaseName == null) {
return null;
}
try {
if (resourceBundleLocale != null) {
r... | java | protected ResourceBundle getResourceBundle(final String rbBaseName, final Locale resourceBundleLocale,
final boolean loop) {
ResourceBundle rb = null;
if (rbBaseName == null) {
return null;
}
try {
if (resourceBundleLocale != null) {
r... | [
"protected",
"ResourceBundle",
"getResourceBundle",
"(",
"final",
"String",
"rbBaseName",
",",
"final",
"Locale",
"resourceBundleLocale",
",",
"final",
"boolean",
"loop",
")",
"{",
"ResourceBundle",
"rb",
"=",
"null",
";",
"if",
"(",
"rbBaseName",
"==",
"null",
... | Override this to use a ResourceBundle.Control in Java 6
@param rbBaseName The base name of the resource bundle, a fully qualified class name.
@param resourceBundleLocale The locale to use when formatting the message.
@param loop If true the key will be treated as a package or class name and a resource bundle will be l... | [
"Override",
"this",
"to",
"use",
"a",
"ResourceBundle",
".",
"Control",
"in",
"Java",
"6"
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java#L228-L263 |
104,311 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java | MarkerManager.getMarker | public static Marker getMarker(final String name) {
Marker result = MARKERS.get(name);
if (result == null) {
MARKERS.putIfAbsent(name, new Log4jMarker(name));
result = MARKERS.get(name);
}
return result;
} | java | public static Marker getMarker(final String name) {
Marker result = MARKERS.get(name);
if (result == null) {
MARKERS.putIfAbsent(name, new Log4jMarker(name));
result = MARKERS.get(name);
}
return result;
} | [
"public",
"static",
"Marker",
"getMarker",
"(",
"final",
"String",
"name",
")",
"{",
"Marker",
"result",
"=",
"MARKERS",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"MARKERS",
".",
"putIfAbsent",
"(",
"name",
",",
... | Retrieves a Marker or create a Marker that has no parent.
@param name The name of the Marker.
@return The Marker with the specified name.
@throws IllegalArgumentException if the argument is {@code null} | [
"Retrieves",
"a",
"Marker",
"or",
"create",
"a",
"Marker",
"that",
"has",
"no",
"parent",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java#L62-L69 |
104,312 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java | MarkerManager.getMarker | @Deprecated
public static Marker getMarker(final String name, final String parent) {
final Marker parentMarker = MARKERS.get(parent);
if (parentMarker == null) {
throw new IllegalArgumentException("Parent Marker " + parent + " has not been defined");
}
return getMarker(na... | java | @Deprecated
public static Marker getMarker(final String name, final String parent) {
final Marker parentMarker = MARKERS.get(parent);
if (parentMarker == null) {
throw new IllegalArgumentException("Parent Marker " + parent + " has not been defined");
}
return getMarker(na... | [
"@",
"Deprecated",
"public",
"static",
"Marker",
"getMarker",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"parent",
")",
"{",
"final",
"Marker",
"parentMarker",
"=",
"MARKERS",
".",
"get",
"(",
"parent",
")",
";",
"if",
"(",
"parentMarker",
"==... | Retrieves or creates a Marker with the specified parent. The parent must have been previously created.
@param name The name of the Marker.
@param parent The name of the parent Marker.
@return The Marker with the specified name.
@throws IllegalArgumentException if the parent Marker does not exist.
@deprecated Use the M... | [
"Retrieves",
"or",
"creates",
"a",
"Marker",
"with",
"the",
"specified",
"parent",
".",
"The",
"parent",
"must",
"have",
"been",
"previously",
"created",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java#L80-L87 |
104,313 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java | MarkerManager.getMarker | @Deprecated
public static Marker getMarker(final String name, final Marker parent) {
return getMarker(name).addParents(parent);
} | java | @Deprecated
public static Marker getMarker(final String name, final Marker parent) {
return getMarker(name).addParents(parent);
} | [
"@",
"Deprecated",
"public",
"static",
"Marker",
"getMarker",
"(",
"final",
"String",
"name",
",",
"final",
"Marker",
"parent",
")",
"{",
"return",
"getMarker",
"(",
"name",
")",
".",
"addParents",
"(",
"parent",
")",
";",
"}"
] | Retrieves or creates a Marker with the specified parent.
@param name The name of the Marker.
@param parent The parent Marker.
@return The Marker with the specified name.
@throws IllegalArgumentException if any argument is {@code null}
@deprecated Use the Marker add or set methods to add parent Markers. Will be removed... | [
"Retrieves",
"or",
"creates",
"a",
"Marker",
"with",
"the",
"specified",
"parent",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java#L98-L101 |
104,314 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java | StackLocator.getCallerClass | @PerformanceSensitive
public Class<?> getCallerClass(final int depth) {
if (depth < 0) {
throw new IndexOutOfBoundsException(Integer.toString(depth));
}
// note that we need to add 1 to the depth value to compensate for this method, but not for the Method.invoke
// since ... | java | @PerformanceSensitive
public Class<?> getCallerClass(final int depth) {
if (depth < 0) {
throw new IndexOutOfBoundsException(Integer.toString(depth));
}
// note that we need to add 1 to the depth value to compensate for this method, but not for the Method.invoke
// since ... | [
"@",
"PerformanceSensitive",
"public",
"Class",
"<",
"?",
">",
"getCallerClass",
"(",
"final",
"int",
"depth",
")",
"{",
"if",
"(",
"depth",
"<",
"0",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"Integer",
".",
"toString",
"(",
"depth",
")"... | migrated from ReflectiveCallerClassUtility | [
"migrated",
"from",
"ReflectiveCallerClassUtility"
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java#L104-L118 |
104,315 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java | StackLocator.getCallerClass | @PerformanceSensitive
public Class<?> getCallerClass(final Class<?> anchor) {
boolean next = false;
Class<?> clazz;
for (int i = 2; null != (clazz = getCallerClass(i)); i++) {
if (anchor.equals(clazz)) {
next = true;
continue;
}
... | java | @PerformanceSensitive
public Class<?> getCallerClass(final Class<?> anchor) {
boolean next = false;
Class<?> clazz;
for (int i = 2; null != (clazz = getCallerClass(i)); i++) {
if (anchor.equals(clazz)) {
next = true;
continue;
}
... | [
"@",
"PerformanceSensitive",
"public",
"Class",
"<",
"?",
">",
"getCallerClass",
"(",
"final",
"Class",
"<",
"?",
">",
"anchor",
")",
"{",
"boolean",
"next",
"=",
"false",
";",
"Class",
"<",
"?",
">",
"clazz",
";",
"for",
"(",
"int",
"i",
"=",
"2",
... | added for use in LoggerAdapter implementations mainly | [
"added",
"for",
"use",
"in",
"LoggerAdapter",
"implementations",
"mainly"
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java#L139-L153 |
104,316 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java | StackLocator.getCurrentStackTrace | @PerformanceSensitive
public Stack<Class<?>> getCurrentStackTrace() {
// benchmarks show that using the SecurityManager is much faster than looping through getCallerClass(int)
if (getSecurityManager() != null) {
final Class<?>[] array = getSecurityManager().getClassContext();
... | java | @PerformanceSensitive
public Stack<Class<?>> getCurrentStackTrace() {
// benchmarks show that using the SecurityManager is much faster than looping through getCallerClass(int)
if (getSecurityManager() != null) {
final Class<?>[] array = getSecurityManager().getClassContext();
... | [
"@",
"PerformanceSensitive",
"public",
"Stack",
"<",
"Class",
"<",
"?",
">",
">",
"getCurrentStackTrace",
"(",
")",
"{",
"// benchmarks show that using the SecurityManager is much faster than looping through getCallerClass(int)",
"if",
"(",
"getSecurityManager",
"(",
")",
"!=... | migrated from ThrowableProxy | [
"migrated",
"from",
"ThrowableProxy"
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java#L156-L175 |
104,317 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java | FormattedMessage.getFormattedMessage | @Override
public String getFormattedMessage() {
if (formattedMessage == null) {
if (message == null) {
message = getMessage(messagePattern, argArray, throwable);
}
formattedMessage = message.getFormattedMessage();
}
return formattedMessage;... | java | @Override
public String getFormattedMessage() {
if (formattedMessage == null) {
if (message == null) {
message = getMessage(messagePattern, argArray, throwable);
}
formattedMessage = message.getFormattedMessage();
}
return formattedMessage;... | [
"@",
"Override",
"public",
"String",
"getFormattedMessage",
"(",
")",
"{",
"if",
"(",
"formattedMessage",
"==",
"null",
")",
"{",
"if",
"(",
"message",
"==",
"null",
")",
"{",
"message",
"=",
"getMessage",
"(",
"messagePattern",
",",
"argArray",
",",
"thro... | Gets the formatted message.
@return the formatted message. | [
"Gets",
"the",
"formatted",
"message",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java#L172-L181 |
104,318 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/receivers/xml/LogFileXMLReceiver.java | LogFileXMLReceiver.shutdown | public void shutdown() {
try {
if (reader != null) {
reader.close();
reader = null;
}
} catch (IOException ioe) {
ioe.printStackTrace();
}
} | java | public void shutdown() {
try {
if (reader != null) {
reader.close();
reader = null;
}
} catch (IOException ioe) {
ioe.printStackTrace();
}
} | [
"public",
"void",
"shutdown",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"reader",
"!=",
"null",
")",
"{",
"reader",
".",
"close",
"(",
")",
";",
"reader",
"=",
"null",
";",
"}",
"}",
"catch",
"(",
"IOException",
"ioe",
")",
"{",
"ioe",
".",
"printSta... | Close the receiver, release any resources that are accessing the file. | [
"Close",
"the",
"receiver",
"release",
"any",
"resources",
"that",
"are",
"accessing",
"the",
"file",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/receivers/xml/LogFileXMLReceiver.java#L167-L176 |
104,319 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/receivers/xml/LogFileXMLReceiver.java | LogFileXMLReceiver.activateOptions | public void activateOptions() {
Runnable runnable = new Runnable() {
public void run() {
try {
URL url = new URL(fileURL);
host = url.getHost();
if (host != null && host.equals("")) {
host = FI... | java | public void activateOptions() {
Runnable runnable = new Runnable() {
public void run() {
try {
URL url = new URL(fileURL);
host = url.getHost();
if (host != null && host.equals("")) {
host = FI... | [
"public",
"void",
"activateOptions",
"(",
")",
"{",
"Runnable",
"runnable",
"=",
"new",
"Runnable",
"(",
")",
"{",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"URL",
"url",
"=",
"new",
"URL",
"(",
"fileURL",
")",
";",
"host",
"=",
"url",
".... | Process the file | [
"Process",
"the",
"file"
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/receivers/xml/LogFileXMLReceiver.java#L181-L241 |
104,320 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/LoggerRepositoryExImpl.java | LoggerRepositoryExImpl.setName | public void setName(final String repoName) {
if (name == null) {
name = repoName;
} else if (!name.equals(repoName)) {
throw new IllegalStateException(
"Repository [" + name + "] cannot be renamed as [" + repoName + "].");
}
} | java | public void setName(final String repoName) {
if (name == null) {
name = repoName;
} else if (!name.equals(repoName)) {
throw new IllegalStateException(
"Repository [" + name + "] cannot be renamed as [" + repoName + "].");
}
} | [
"public",
"void",
"setName",
"(",
"final",
"String",
"repoName",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"name",
"=",
"repoName",
";",
"}",
"else",
"if",
"(",
"!",
"name",
".",
"equals",
"(",
"repoName",
")",
")",
"{",
"throw",
"new",
... | Set the name of this repository.
Note that once named, a repository cannot be rerenamed.
@param repoName name of hierarchy | [
"Set",
"the",
"name",
"of",
"this",
"repository",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/LoggerRepositoryExImpl.java#L253-L260 |
104,321 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/LoggerRepositoryExImpl.java | LoggerRepositoryExImpl.getScheduler | public Scheduler getScheduler() {
if (scheduler == null) {
scheduler = new Scheduler();
scheduler.setDaemon(true);
scheduler.start();
}
return scheduler;
} | java | public Scheduler getScheduler() {
if (scheduler == null) {
scheduler = new Scheduler();
scheduler.setDaemon(true);
scheduler.start();
}
return scheduler;
} | [
"public",
"Scheduler",
"getScheduler",
"(",
")",
"{",
"if",
"(",
"scheduler",
"==",
"null",
")",
"{",
"scheduler",
"=",
"new",
"Scheduler",
"(",
")",
";",
"scheduler",
".",
"setDaemon",
"(",
"true",
")",
";",
"scheduler",
".",
"start",
"(",
")",
";",
... | Return this repository's own scheduler.
The scheduler is lazily instantiated.
@return this repository's own scheduler. | [
"Return",
"this",
"repository",
"s",
"own",
"scheduler",
".",
"The",
"scheduler",
"is",
"lazily",
"instantiated",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/LoggerRepositoryExImpl.java#L539-L546 |
104,322 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/component/spi/SimpleULogger.java | SimpleULogger.parameterizedLog | private void parameterizedLog(final String level,
final Object parameterizedMsg,
final Object param1,
final Object param2) {
if (parameterizedMsg instanceof String) {
String msgStr = (String) parameterizedMsg;
... | java | private void parameterizedLog(final String level,
final Object parameterizedMsg,
final Object param1,
final Object param2) {
if (parameterizedMsg instanceof String) {
String msgStr = (String) parameterizedMsg;
... | [
"private",
"void",
"parameterizedLog",
"(",
"final",
"String",
"level",
",",
"final",
"Object",
"parameterizedMsg",
",",
"final",
"Object",
"param1",
",",
"final",
"Object",
"param2",
")",
"{",
"if",
"(",
"parameterizedMsg",
"instanceof",
"String",
")",
"{",
"... | For parameterized messages, first substitute parameters and then log.
@param level level
@param parameterizedMsg message pattern
@param param1 param1
@param param2 param2 | [
"For",
"parameterized",
"messages",
"first",
"substitute",
"parameters",
"and",
"then",
"log",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/component/spi/SimpleULogger.java#L177-L190 |
104,323 | ops4j/org.ops4j.pax.logging | pax-logging-samples/fragment/src/main/java/org/ops4j/pax/logging/extender/ZipRollingFileAppender.java | ZipRollingFileAppender.archiveFile | boolean archiveFile(File logFile) {
FileOutputStream fOut;
ZipOutputStream zOut;
// necessary because of possible IOException
try {
fOut = new FileOutputStream(logFile.getPath() + ".zip");
zOut = new ZipOutputStream(fOut);
FileInputStream fIn = new FileInputStream(logFile);
BufferedInputStream bI... | java | boolean archiveFile(File logFile) {
FileOutputStream fOut;
ZipOutputStream zOut;
// necessary because of possible IOException
try {
fOut = new FileOutputStream(logFile.getPath() + ".zip");
zOut = new ZipOutputStream(fOut);
FileInputStream fIn = new FileInputStream(logFile);
BufferedInputStream bI... | [
"boolean",
"archiveFile",
"(",
"File",
"logFile",
")",
"{",
"FileOutputStream",
"fOut",
";",
"ZipOutputStream",
"zOut",
";",
"// necessary because of possible IOException",
"try",
"{",
"fOut",
"=",
"new",
"FileOutputStream",
"(",
"logFile",
".",
"getPath",
"(",
")",... | archive log file | [
"archive",
"log",
"file"
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-samples/fragment/src/main/java/org/ops4j/pax/logging/extender/ZipRollingFileAppender.java#L86-L124 |
104,324 | ops4j/org.ops4j.pax.logging | pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java | ResolverUtil.getClassLoader | public ClassLoader getClassLoader() {
return classloader != null ? classloader : (classloader = Loader.getClassLoader(ResolverUtil.class, null));
} | java | public ClassLoader getClassLoader() {
return classloader != null ? classloader : (classloader = Loader.getClassLoader(ResolverUtil.class, null));
} | [
"public",
"ClassLoader",
"getClassLoader",
"(",
")",
"{",
"return",
"classloader",
"!=",
"null",
"?",
"classloader",
":",
"(",
"classloader",
"=",
"Loader",
".",
"getClassLoader",
"(",
"ResolverUtil",
".",
"class",
",",
"null",
")",
")",
";",
"}"
] | Returns the classloader that will be used for scanning for classes. If no explicit ClassLoader has been set by
the calling, the context class loader will be used.
@return the ClassLoader that will be used to scan for classes | [
"Returns",
"the",
"classloader",
"that",
"will",
"be",
"used",
"for",
"scanning",
"for",
"classes",
".",
"If",
"no",
"explicit",
"ClassLoader",
"has",
"been",
"set",
"by",
"the",
"calling",
"the",
"context",
"class",
"loader",
"will",
"be",
"used",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java#L127-L129 |
104,325 | ops4j/org.ops4j.pax.logging | pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java | ResolverUtil.addIfMatching | protected void addIfMatching(final Test test, final String fqn) {
try {
final ClassLoader loader = getClassLoader();
if (test.doesMatchClass()) {
final String externalName = fqn.substring(0, fqn.indexOf('.')).replace('/', '.');
if (LOGGER.isDebugEnabled())... | java | protected void addIfMatching(final Test test, final String fqn) {
try {
final ClassLoader loader = getClassLoader();
if (test.doesMatchClass()) {
final String externalName = fqn.substring(0, fqn.indexOf('.')).replace('/', '.');
if (LOGGER.isDebugEnabled())... | [
"protected",
"void",
"addIfMatching",
"(",
"final",
"Test",
"test",
",",
"final",
"String",
"fqn",
")",
"{",
"try",
"{",
"final",
"ClassLoader",
"loader",
"=",
"getClassLoader",
"(",
")",
";",
"if",
"(",
"test",
".",
"doesMatchClass",
"(",
")",
")",
"{",... | Add the class designated by the fully qualified class name provided to the set of resolved classes if and only if
it is approved by the Test supplied.
@param test
the test used to determine if the class matches
@param fqn
the fully qualified name of a class | [
"Add",
"the",
"class",
"designated",
"by",
"the",
"fully",
"qualified",
"class",
"name",
"provided",
"to",
"the",
"set",
"of",
"resolved",
"classes",
"if",
"and",
"only",
"if",
"it",
"is",
"approved",
"by",
"the",
"Test",
"supplied",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java#L378-L404 |
104,326 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/ConsoleAppender.java | ConsoleAppender.activateOptions | public void activateOptions() {
if (follow) {
if (target.equals(SYSTEM_ERR)) {
setWriter(createWriter(new SystemErrStream()));
} else {
setWriter(createWriter(new SystemOutStream()));
}
} else {
if (target.equals(SYSTEM_ERR)) ... | java | public void activateOptions() {
if (follow) {
if (target.equals(SYSTEM_ERR)) {
setWriter(createWriter(new SystemErrStream()));
} else {
setWriter(createWriter(new SystemOutStream()));
}
} else {
if (target.equals(SYSTEM_ERR)) ... | [
"public",
"void",
"activateOptions",
"(",
")",
"{",
"if",
"(",
"follow",
")",
"{",
"if",
"(",
"target",
".",
"equals",
"(",
"SYSTEM_ERR",
")",
")",
"{",
"setWriter",
"(",
"createWriter",
"(",
"new",
"SystemErrStream",
"(",
")",
")",
")",
";",
"}",
"e... | Prepares the appender for use. | [
"Prepares",
"the",
"appender",
"for",
"use",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/ConsoleAppender.java#L133-L149 |
104,327 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java | ProviderUtil.loadProvider | protected static void loadProvider(final URL url, final ClassLoader cl) {
try {
final Properties props = PropertiesUtil.loadClose(url.openStream(), url);
if (validVersion(props.getProperty(API_VERSION))) {
final Provider provider = new Provider(props, url, cl);
... | java | protected static void loadProvider(final URL url, final ClassLoader cl) {
try {
final Properties props = PropertiesUtil.loadClose(url.openStream(), url);
if (validVersion(props.getProperty(API_VERSION))) {
final Provider provider = new Provider(props, url, cl);
... | [
"protected",
"static",
"void",
"loadProvider",
"(",
"final",
"URL",
"url",
",",
"final",
"ClassLoader",
"cl",
")",
"{",
"try",
"{",
"final",
"Properties",
"props",
"=",
"PropertiesUtil",
".",
"loadClose",
"(",
"url",
".",
"openStream",
"(",
")",
",",
"url"... | Loads an individual Provider implementation. This method is really only useful for the OSGi bundle activator and
this class itself.
@param url the URL to the provider properties file
@param cl the ClassLoader to load the provider classes with | [
"Loads",
"an",
"individual",
"Provider",
"implementation",
".",
"This",
"method",
"is",
"really",
"only",
"useful",
"for",
"the",
"OSGi",
"bundle",
"activator",
"and",
"this",
"class",
"itself",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java#L84-L95 |
104,328 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java | ProviderUtil.lazyInit | protected static void lazyInit() {
// noinspection DoubleCheckedLocking
if (instance == null) {
try {
STARTUP_LOCK.lockInterruptibly();
try {
if (instance == null) {
instance = new ProviderUtil();
... | java | protected static void lazyInit() {
// noinspection DoubleCheckedLocking
if (instance == null) {
try {
STARTUP_LOCK.lockInterruptibly();
try {
if (instance == null) {
instance = new ProviderUtil();
... | [
"protected",
"static",
"void",
"lazyInit",
"(",
")",
"{",
"// noinspection DoubleCheckedLocking",
"if",
"(",
"instance",
"==",
"null",
")",
"{",
"try",
"{",
"STARTUP_LOCK",
".",
"lockInterruptibly",
"(",
")",
";",
"try",
"{",
"if",
"(",
"instance",
"==",
"nu... | Lazily initializes the ProviderUtil singleton.
@since 2.1 | [
"Lazily",
"initializes",
"the",
"ProviderUtil",
"singleton",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java#L133-L150 |
104,329 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/LambdaUtil.java | LambdaUtil.getAll | public static Object[] getAll(final Supplier<?>... suppliers) {
if (suppliers == null) {
return null;
}
final Object[] result = new Object[suppliers.length];
for (int i = 0; i < result.length; i++) {
result[i] = get(suppliers[i]);
}
return result;
... | java | public static Object[] getAll(final Supplier<?>... suppliers) {
if (suppliers == null) {
return null;
}
final Object[] result = new Object[suppliers.length];
for (int i = 0; i < result.length; i++) {
result[i] = get(suppliers[i]);
}
return result;
... | [
"public",
"static",
"Object",
"[",
"]",
"getAll",
"(",
"final",
"Supplier",
"<",
"?",
">",
"...",
"suppliers",
")",
"{",
"if",
"(",
"suppliers",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Object",
"[",
"]",
"result",
"=",
"new",
... | Converts an array of lambda expressions into an array of their evaluation results.
@param suppliers an array of lambda expressions or {@code null}
@return an array containing the results of evaluating the lambda expressions (or {@code null} if the suppliers
array was {@code null} | [
"Converts",
"an",
"array",
"of",
"lambda",
"expressions",
"into",
"an",
"array",
"of",
"their",
"evaluation",
"results",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/LambdaUtil.java#L41-L50 |
104,330 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/LambdaUtil.java | LambdaUtil.getMessage | public static Message getMessage(final Supplier<?> supplier, final MessageFactory messageFactory) {
if (supplier == null) {
return null;
}
final Object result = supplier.get();
return result instanceof Message ? (Message) result : messageFactory.newMessage(result);
} | java | public static Message getMessage(final Supplier<?> supplier, final MessageFactory messageFactory) {
if (supplier == null) {
return null;
}
final Object result = supplier.get();
return result instanceof Message ? (Message) result : messageFactory.newMessage(result);
} | [
"public",
"static",
"Message",
"getMessage",
"(",
"final",
"Supplier",
"<",
"?",
">",
"supplier",
",",
"final",
"MessageFactory",
"messageFactory",
")",
"{",
"if",
"(",
"supplier",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Object",
"res... | Returns a Message, either the value supplied by the specified function, or a new Message created by the specified
Factory.
@param supplier a lambda expression or {@code null}
@return the Message resulting from evaluating the lambda expression or the Message created by the factory for
supplied values that are not of typ... | [
"Returns",
"a",
"Message",
"either",
"the",
"value",
"supplied",
"by",
"the",
"specified",
"function",
"or",
"a",
"new",
"Message",
"created",
"by",
"the",
"specified",
"Factory",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/LambdaUtil.java#L87-L93 |
104,331 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.findAppenderByName | protected
Appender findAppenderByName(Document doc, String appenderName) {
Appender appender = (Appender) appenderBag.get(appenderName);
if(appender != null) {
return appender;
} else {
// Doesn't work on DOM Level 1 :
// Element element = doc.getElementById(appenderName);
... | java | protected
Appender findAppenderByName(Document doc, String appenderName) {
Appender appender = (Appender) appenderBag.get(appenderName);
if(appender != null) {
return appender;
} else {
// Doesn't work on DOM Level 1 :
// Element element = doc.getElementById(appenderName);
... | [
"protected",
"Appender",
"findAppenderByName",
"(",
"Document",
"doc",
",",
"String",
"appenderName",
")",
"{",
"Appender",
"appender",
"=",
"(",
"Appender",
")",
"appenderBag",
".",
"get",
"(",
"appenderName",
")",
";",
"if",
"(",
"appender",
"!=",
"null",
... | Used internally to parse appenders by IDREF name. | [
"Used",
"internally",
"to",
"parse",
"appenders",
"by",
"IDREF",
"name",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L125-L160 |
104,332 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.findAppenderByReference | protected
Appender findAppenderByReference(Element appenderRef) {
String appenderName = subst(appenderRef.getAttribute(REF_ATTR));
Document doc = appenderRef.getOwnerDocument();
return findAppenderByName(doc, appenderName);
} | java | protected
Appender findAppenderByReference(Element appenderRef) {
String appenderName = subst(appenderRef.getAttribute(REF_ATTR));
Document doc = appenderRef.getOwnerDocument();
return findAppenderByName(doc, appenderName);
} | [
"protected",
"Appender",
"findAppenderByReference",
"(",
"Element",
"appenderRef",
")",
"{",
"String",
"appenderName",
"=",
"subst",
"(",
"appenderRef",
".",
"getAttribute",
"(",
"REF_ATTR",
")",
")",
";",
"Document",
"doc",
"=",
"appenderRef",
".",
"getOwnerDocum... | Used internally to parse appenders by IDREF element. | [
"Used",
"internally",
"to",
"parse",
"appenders",
"by",
"IDREF",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L164-L169 |
104,333 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseUnrecognizedElement | private static void parseUnrecognizedElement(final Object instance,
final Element element,
final Properties props) throws Exception {
boolean recognized = false;
if (instance instanceof UnrecognizedElementHandler) {
re... | java | private static void parseUnrecognizedElement(final Object instance,
final Element element,
final Properties props) throws Exception {
boolean recognized = false;
if (instance instanceof UnrecognizedElementHandler) {
re... | [
"private",
"static",
"void",
"parseUnrecognizedElement",
"(",
"final",
"Object",
"instance",
",",
"final",
"Element",
"element",
",",
"final",
"Properties",
"props",
")",
"throws",
"Exception",
"{",
"boolean",
"recognized",
"=",
"false",
";",
"if",
"(",
"instanc... | Delegates unrecognized content to created instance if
it supports UnrecognizedElementParser.
@since 1.2.15
@param instance instance, may be null.
@param element element, may not be null.
@param props properties
@throws IOException thrown if configuration of owner object
should be abandoned. | [
"Delegates",
"unrecognized",
"content",
"to",
"created",
"instance",
"if",
"it",
"supports",
"UnrecognizedElementParser",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L181-L192 |
104,334 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.quietParseUnrecognizedElement | private static void quietParseUnrecognizedElement(final Object instance,
final Element element,
final Properties props) {
try {
parseUnrecognizedElement(instance, element, props);
} catch (Exception ex) {
... | java | private static void quietParseUnrecognizedElement(final Object instance,
final Element element,
final Properties props) {
try {
parseUnrecognizedElement(instance, element, props);
} catch (Exception ex) {
... | [
"private",
"static",
"void",
"quietParseUnrecognizedElement",
"(",
"final",
"Object",
"instance",
",",
"final",
"Element",
"element",
",",
"final",
"Properties",
"props",
")",
"{",
"try",
"{",
"parseUnrecognizedElement",
"(",
"instance",
",",
"element",
",",
"prop... | Delegates unrecognized content to created instance if
it supports UnrecognizedElementParser and catches and
logs any exception.
@since 1.2.15
@param instance instance, may be null.
@param element element, may not be null.
@param props properties | [
"Delegates",
"unrecognized",
"content",
"to",
"created",
"instance",
"if",
"it",
"supports",
"UnrecognizedElementParser",
"and",
"catches",
"and",
"logs",
"any",
"exception",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L203-L211 |
104,335 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseAppender | protected
Appender parseAppender (Element appenderElement) {
String className = subst(appenderElement.getAttribute(CLASS_ATTR));
LogLog.debug("Class name: [" + className+']');
try {
Object instance = Loader.loadClass(className).newInstance();
Appender appender = (Appender)instance;
... | java | protected
Appender parseAppender (Element appenderElement) {
String className = subst(appenderElement.getAttribute(CLASS_ATTR));
LogLog.debug("Class name: [" + className+']');
try {
Object instance = Loader.loadClass(className).newInstance();
Appender appender = (Appender)instance;
... | [
"protected",
"Appender",
"parseAppender",
"(",
"Element",
"appenderElement",
")",
"{",
"String",
"className",
"=",
"subst",
"(",
"appenderElement",
".",
"getAttribute",
"(",
"CLASS_ATTR",
")",
")",
";",
"LogLog",
".",
"debug",
"(",
"\"Class name: [\"",
"+",
"cla... | Used internally to parse an appender element. | [
"Used",
"internally",
"to",
"parse",
"an",
"appender",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L216-L279 |
104,336 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseFilters | protected
void parseFilters(Element element, Appender appender) {
String clazz = subst(element.getAttribute(CLASS_ATTR));
Filter filter = (Filter) OptionConverter.instantiateByClassName(clazz,
Filter.class, null);
if(filter != null) {
PropertySett... | java | protected
void parseFilters(Element element, Appender appender) {
String clazz = subst(element.getAttribute(CLASS_ATTR));
Filter filter = (Filter) OptionConverter.instantiateByClassName(clazz,
Filter.class, null);
if(filter != null) {
PropertySett... | [
"protected",
"void",
"parseFilters",
"(",
"Element",
"element",
",",
"Appender",
"appender",
")",
"{",
"String",
"clazz",
"=",
"subst",
"(",
"element",
".",
"getAttribute",
"(",
"CLASS_ATTR",
")",
")",
";",
"Filter",
"filter",
"=",
"(",
"Filter",
")",
"Opt... | Used internally to parse a filter element. | [
"Used",
"internally",
"to",
"parse",
"a",
"filter",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L328-L356 |
104,337 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseCategory | protected
void parseCategory (Element loggerElement) {
// Create a new org.apache.log4j.Category object from the <category> element.
String catName = subst(loggerElement.getAttribute(NAME_ATTR));
Logger cat;
String className = subst(loggerElement.getAttribute(CLASS_ATTR));
if(EMPTY_STR.equ... | java | protected
void parseCategory (Element loggerElement) {
// Create a new org.apache.log4j.Category object from the <category> element.
String catName = subst(loggerElement.getAttribute(NAME_ATTR));
Logger cat;
String className = subst(loggerElement.getAttribute(CLASS_ATTR));
if(EMPTY_STR.equ... | [
"protected",
"void",
"parseCategory",
"(",
"Element",
"loggerElement",
")",
"{",
"// Create a new org.apache.log4j.Category object from the <category> element.",
"String",
"catName",
"=",
"subst",
"(",
"loggerElement",
".",
"getAttribute",
"(",
"NAME_ATTR",
")",
")",
";",
... | Used internally to parse an category element. | [
"Used",
"internally",
"to",
"parse",
"an",
"category",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L361-L401 |
104,338 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseCategoryFactory | protected
void parseCategoryFactory(Element factoryElement) {
String className = subst(factoryElement.getAttribute(CLASS_ATTR));
if(EMPTY_STR.equals(className)) {
LogLog.error("Category Factory tag " + CLASS_ATTR + " attribute not found.");
LogLog.debug("No Category Factory configured.");
}
... | java | protected
void parseCategoryFactory(Element factoryElement) {
String className = subst(factoryElement.getAttribute(CLASS_ATTR));
if(EMPTY_STR.equals(className)) {
LogLog.error("Category Factory tag " + CLASS_ATTR + " attribute not found.");
LogLog.debug("No Category Factory configured.");
}
... | [
"protected",
"void",
"parseCategoryFactory",
"(",
"Element",
"factoryElement",
")",
"{",
"String",
"className",
"=",
"subst",
"(",
"factoryElement",
".",
"getAttribute",
"(",
"CLASS_ATTR",
")",
")",
";",
"if",
"(",
"EMPTY_STR",
".",
"equals",
"(",
"className",
... | Used internally to parse the category factory element. | [
"Used",
"internally",
"to",
"parse",
"the",
"category",
"factory",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L407-L444 |
104,339 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseRoot | protected
void parseRoot (Element rootElement) {
Logger root = repository.getRootLogger();
// category configuration needs to be atomic
synchronized(root) {
parseChildrenOfLoggerElement(rootElement, root, true);
}
} | java | protected
void parseRoot (Element rootElement) {
Logger root = repository.getRootLogger();
// category configuration needs to be atomic
synchronized(root) {
parseChildrenOfLoggerElement(rootElement, root, true);
}
} | [
"protected",
"void",
"parseRoot",
"(",
"Element",
"rootElement",
")",
"{",
"Logger",
"root",
"=",
"repository",
".",
"getRootLogger",
"(",
")",
";",
"// category configuration needs to be atomic",
"synchronized",
"(",
"root",
")",
"{",
"parseChildrenOfLoggerElement",
... | Used internally to parse the roor category element. | [
"Used",
"internally",
"to",
"parse",
"the",
"roor",
"category",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L450-L457 |
104,340 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseChildrenOfLoggerElement | protected
void parseChildrenOfLoggerElement(Element catElement,
Logger cat, boolean isRoot) {
PropertySetter propSetter = new PropertySetter(cat);
// Remove all existing appenders from cat. They will be
// reconstructed if need be.
cat.removeAllAppenders();
NodeList children ... | java | protected
void parseChildrenOfLoggerElement(Element catElement,
Logger cat, boolean isRoot) {
PropertySetter propSetter = new PropertySetter(cat);
// Remove all existing appenders from cat. They will be
// reconstructed if need be.
cat.removeAllAppenders();
NodeList children ... | [
"protected",
"void",
"parseChildrenOfLoggerElement",
"(",
"Element",
"catElement",
",",
"Logger",
"cat",
",",
"boolean",
"isRoot",
")",
"{",
"PropertySetter",
"propSetter",
"=",
"new",
"PropertySetter",
"(",
"cat",
")",
";",
"// Remove all existing appenders from cat. T... | Used internally to parse the children of a category element. | [
"Used",
"internally",
"to",
"parse",
"the",
"children",
"of",
"a",
"category",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L463-L508 |
104,341 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseLayout | protected
Layout parseLayout (Element layout_element) {
String className = subst(layout_element.getAttribute(CLASS_ATTR));
LogLog.debug("Parsing layout of class: \""+className+"\"");
try {
Object instance = Loader.loadClass(className).newInstance();
Layout layout = (Layout)instance;
... | java | protected
Layout parseLayout (Element layout_element) {
String className = subst(layout_element.getAttribute(CLASS_ATTR));
LogLog.debug("Parsing layout of class: \""+className+"\"");
try {
Object instance = Loader.loadClass(className).newInstance();
Layout layout = (Layout)instance;
... | [
"protected",
"Layout",
"parseLayout",
"(",
"Element",
"layout_element",
")",
"{",
"String",
"className",
"=",
"subst",
"(",
"layout_element",
".",
"getAttribute",
"(",
"CLASS_ATTR",
")",
")",
";",
"LogLog",
".",
"debug",
"(",
"\"Parsing layout of class: \\\"\"",
"... | Used internally to parse a layout element. | [
"Used",
"internally",
"to",
"parse",
"a",
"layout",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L513-L546 |
104,342 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseLevel | protected
void parseLevel(Element element, Logger logger, boolean isRoot) {
String catName = logger.getName();
if(isRoot) {
catName = "root";
}
String priStr = subst(element.getAttribute(VALUE_ATTR));
LogLog.debug("Level value for "+catName+" is ["+priStr+"].");
if(INHERITED.equal... | java | protected
void parseLevel(Element element, Logger logger, boolean isRoot) {
String catName = logger.getName();
if(isRoot) {
catName = "root";
}
String priStr = subst(element.getAttribute(VALUE_ATTR));
LogLog.debug("Level value for "+catName+" is ["+priStr+"].");
if(INHERITED.equal... | [
"protected",
"void",
"parseLevel",
"(",
"Element",
"element",
",",
"Logger",
"logger",
",",
"boolean",
"isRoot",
")",
"{",
"String",
"catName",
"=",
"logger",
".",
"getName",
"(",
")",
";",
"if",
"(",
"isRoot",
")",
"{",
"catName",
"=",
"\"root\"",
";",
... | Used internally to parse a level element. | [
"Used",
"internally",
"to",
"parse",
"a",
"level",
"element",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L561-L598 |
104,343 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.doConfigure | public
void doConfigure(final InputStream inputStream, LoggerRepository repository)
throws FactoryConfigurationError {
ParseAction action = new ParseAction() {
public Document parse(final DocumentBuilder parser) throws SAXException, IOException {
... | java | public
void doConfigure(final InputStream inputStream, LoggerRepository repository)
throws FactoryConfigurationError {
ParseAction action = new ParseAction() {
public Document parse(final DocumentBuilder parser) throws SAXException, IOException {
... | [
"public",
"void",
"doConfigure",
"(",
"final",
"InputStream",
"inputStream",
",",
"LoggerRepository",
"repository",
")",
"throws",
"FactoryConfigurationError",
"{",
"ParseAction",
"action",
"=",
"new",
"ParseAction",
"(",
")",
"{",
"public",
"Document",
"parse",
"("... | Configure log4j by reading in a log4j.dtd compliant XML
configuration file. | [
"Configure",
"log4j",
"by",
"reading",
"in",
"a",
"log4j",
".",
"dtd",
"compliant",
"XML",
"configuration",
"file",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L695-L709 |
104,344 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.subst | public static String subst(final String value, final Properties props) {
try {
return OptionConverter.substVars(value, props);
} catch (IllegalArgumentException e) {
LogLog.warn("Could not perform variable substitution.", e);
return value;
}
} | java | public static String subst(final String value, final Properties props) {
try {
return OptionConverter.substVars(value, props);
} catch (IllegalArgumentException e) {
LogLog.warn("Could not perform variable substitution.", e);
return value;
}
} | [
"public",
"static",
"String",
"subst",
"(",
"final",
"String",
"value",
",",
"final",
"Properties",
"props",
")",
"{",
"try",
"{",
"return",
"OptionConverter",
".",
"substVars",
"(",
"value",
",",
"props",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentExcepti... | Substitutes property value for any references in expression.
@param value value from configuration file, may contain
literal text, property references or both
@param props properties.
@return evaluated expression, may still contain expressions
if unable to expand.
@since 1.2.15 | [
"Substitutes",
"property",
"value",
"for",
"any",
"references",
"in",
"expression",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L937-L944 |
104,345 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.setParameter | public static void setParameter(final Element elem,
final PropertySetter propSetter,
final Properties props) {
String name = subst(elem.getAttribute("name"), props);
String value = (elem.getAttribute("value"));
value = subst... | java | public static void setParameter(final Element elem,
final PropertySetter propSetter,
final Properties props) {
String name = subst(elem.getAttribute("name"), props);
String value = (elem.getAttribute("value"));
value = subst... | [
"public",
"static",
"void",
"setParameter",
"(",
"final",
"Element",
"elem",
",",
"final",
"PropertySetter",
"propSetter",
",",
"final",
"Properties",
"props",
")",
"{",
"String",
"name",
"=",
"subst",
"(",
"elem",
".",
"getAttribute",
"(",
"\"name\"",
")",
... | Sets a parameter based from configuration file content.
@param elem param element, may not be null.
@param propSetter property setter, may not be null.
@param props properties
@since 1.2.15 | [
"Sets",
"a",
"parameter",
"based",
"from",
"configuration",
"file",
"content",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L955-L962 |
104,346 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java | DOMConfigurator.parseElement | public static OptionHandler parseElement(final Element element,
final Properties props,
final Class expectedClass) throws Exception {
String clazz = subst(element.getAttribute("class"), props);
Object instance = Op... | java | public static OptionHandler parseElement(final Element element,
final Properties props,
final Class expectedClass) throws Exception {
String clazz = subst(element.getAttribute("class"), props);
Object instance = Op... | [
"public",
"static",
"OptionHandler",
"parseElement",
"(",
"final",
"Element",
"element",
",",
"final",
"Properties",
"props",
",",
"final",
"Class",
"expectedClass",
")",
"throws",
"Exception",
"{",
"String",
"clazz",
"=",
"subst",
"(",
"element",
".",
"getAttri... | Creates an OptionHandler and processes any nested param elements
but does not call activateOptions. If the class also supports
UnrecognizedElementParser, the parseUnrecognizedElement method
will be call for any child elements other than param.
@param element element, may not be null.
@param props proper... | [
"Creates",
"an",
"OptionHandler",
"and",
"processes",
"any",
"nested",
"param",
"elements",
"but",
"does",
"not",
"call",
"activateOptions",
".",
"If",
"the",
"class",
"also",
"supports",
"UnrecognizedElementParser",
"the",
"parseUnrecognizedElement",
"method",
"will"... | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L979-L1007 |
104,347 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/status/StatusData.java | StatusData.getFormattedStatus | public String getFormattedStatus() {
final StringBuilder sb = new StringBuilder();
final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
sb.append(format.format(new Date(timestamp)));
sb.append(SPACE);
sb.append(getThreadName());
sb.append(SPACE... | java | public String getFormattedStatus() {
final StringBuilder sb = new StringBuilder();
final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
sb.append(format.format(new Date(timestamp)));
sb.append(SPACE);
sb.append(getThreadName());
sb.append(SPACE... | [
"public",
"String",
"getFormattedStatus",
"(",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"final",
"SimpleDateFormat",
"format",
"=",
"new",
"SimpleDateFormat",
"(",
"\"yyyy-MM-dd HH:mm:ss,SSS\"",
")",
";",
"sb",
".",
"... | Formats the StatusData for viewing.
@return The formatted status data as a String. | [
"Formats",
"the",
"StatusData",
"for",
"viewing",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/status/StatusData.java#L120-L144 |
104,348 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java | ThreadContext.putAll | public static void putAll(final Map<String, String> m) {
if (contextMap instanceof ThreadContextMap2) {
((ThreadContextMap2) contextMap).putAll(m);
} else if (contextMap instanceof DefaultThreadContextMap) {
((DefaultThreadContextMap) contextMap).putAll(m);
} else {
... | java | public static void putAll(final Map<String, String> m) {
if (contextMap instanceof ThreadContextMap2) {
((ThreadContextMap2) contextMap).putAll(m);
} else if (contextMap instanceof DefaultThreadContextMap) {
((DefaultThreadContextMap) contextMap).putAll(m);
} else {
... | [
"public",
"static",
"void",
"putAll",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"m",
")",
"{",
"if",
"(",
"contextMap",
"instanceof",
"ThreadContextMap2",
")",
"{",
"(",
"(",
"ThreadContextMap2",
")",
"contextMap",
")",
".",
"putAll",
"(",
... | Puts all given context map entries into the current thread's
context map.
<p>If the current thread does not have a context map it is
created as a side effect.</p>
@param m The map.
@since 2.7 | [
"Puts",
"all",
"given",
"context",
"map",
"entries",
"into",
"the",
"current",
"thread",
"s",
"context",
"map",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L248-L258 |
104,349 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java | ThreadContext.getImmutableContext | public static Map<String, String> getImmutableContext() {
final Map<String, String> map = contextMap.getImmutableMapOrNull();
return map == null ? EMPTY_MAP : map;
} | java | public static Map<String, String> getImmutableContext() {
final Map<String, String> map = contextMap.getImmutableMapOrNull();
return map == null ? EMPTY_MAP : map;
} | [
"public",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"getImmutableContext",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"map",
"=",
"contextMap",
".",
"getImmutableMapOrNull",
"(",
")",
";",
"return",
"map",
"==",
"null",
"... | Returns an immutable view of the current thread's context Map.
@return An immutable view of the ThreadContext Map. | [
"Returns",
"an",
"immutable",
"view",
"of",
"the",
"current",
"thread",
"s",
"context",
"Map",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L341-L344 |
104,350 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java | ThreadContext.getImmutableStack | public static ContextStack getImmutableStack() {
final ContextStack result = contextStack.getImmutableStackOrNull();
return result == null ? EMPTY_STACK : result;
} | java | public static ContextStack getImmutableStack() {
final ContextStack result = contextStack.getImmutableStackOrNull();
return result == null ? EMPTY_STACK : result;
} | [
"public",
"static",
"ContextStack",
"getImmutableStack",
"(",
")",
"{",
"final",
"ContextStack",
"result",
"=",
"contextStack",
".",
"getImmutableStackOrNull",
"(",
")",
";",
"return",
"result",
"==",
"null",
"?",
"EMPTY_STACK",
":",
"result",
";",
"}"
] | Gets an immutable copy of this current thread's context stack.
@return an immutable copy of the ThreadContext stack. | [
"Gets",
"an",
"immutable",
"copy",
"of",
"this",
"current",
"thread",
"s",
"context",
"stack",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L396-L399 |
104,351 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java | ThreadContext.setStack | public static void setStack(final Collection<String> stack) {
if (stack.isEmpty() || !useStack) {
return;
}
contextStack.clear();
contextStack.addAll(stack);
} | java | public static void setStack(final Collection<String> stack) {
if (stack.isEmpty() || !useStack) {
return;
}
contextStack.clear();
contextStack.addAll(stack);
} | [
"public",
"static",
"void",
"setStack",
"(",
"final",
"Collection",
"<",
"String",
">",
"stack",
")",
"{",
"if",
"(",
"stack",
".",
"isEmpty",
"(",
")",
"||",
"!",
"useStack",
")",
"{",
"return",
";",
"}",
"contextStack",
".",
"clear",
"(",
")",
";",... | Sets this thread's stack.
@param stack The stack to use. | [
"Sets",
"this",
"thread",
"s",
"stack",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L406-L412 |
104,352 | ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java | ThreadContext.push | public static void push(final String message, final Object... args) {
contextStack.push(ParameterizedMessage.format(message, args));
} | java | public static void push(final String message, final Object... args) {
contextStack.push(ParameterizedMessage.format(message, args));
} | [
"public",
"static",
"void",
"push",
"(",
"final",
"String",
"message",
",",
"final",
"Object",
"...",
"args",
")",
"{",
"contextStack",
".",
"push",
"(",
"ParameterizedMessage",
".",
"format",
"(",
"message",
",",
"args",
")",
")",
";",
"}"
] | Pushes new diagnostic context information for the current thread.
<p>
The contents of the <code>message</code> and args parameters are determined solely by the client. The message
will be treated as a format String and tokens will be replaced with the String value of the arguments in
accordance with ParameterizedMessa... | [
"Pushes",
"new",
"diagnostic",
"context",
"information",
"for",
"the",
"current",
"thread",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L478-L480 |
104,353 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingPolicyBase.java | RollingPolicyBase.parseFileNamePattern | protected final void parseFileNamePattern() {
List converters = new ArrayList();
List fields = new ArrayList();
ExtrasPatternParser.parse(
fileNamePatternStr, converters, fields, null,
ExtrasPatternParser.getFileNamePatternRules());
patternConverters = new PatternConverter[conve... | java | protected final void parseFileNamePattern() {
List converters = new ArrayList();
List fields = new ArrayList();
ExtrasPatternParser.parse(
fileNamePatternStr, converters, fields, null,
ExtrasPatternParser.getFileNamePatternRules());
patternConverters = new PatternConverter[conve... | [
"protected",
"final",
"void",
"parseFileNamePattern",
"(",
")",
"{",
"List",
"converters",
"=",
"new",
"ArrayList",
"(",
")",
";",
"List",
"fields",
"=",
"new",
"ArrayList",
"(",
")",
";",
"ExtrasPatternParser",
".",
"parse",
"(",
"fileNamePatternStr",
",",
... | Parse file name pattern. | [
"Parse",
"file",
"name",
"pattern",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingPolicyBase.java#L127-L139 |
104,354 | ops4j/org.ops4j.pax.logging | pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingPolicyBase.java | RollingPolicyBase.formatFileName | protected final void formatFileName(
final Object obj, final StringBuffer buf) {
for (int i = 0; i < patternConverters.length; i++) {
int fieldStart = buf.length();
patternConverters[i].format(obj, buf);
if (patternFields[i] != null) {
patternFields[i].format(fieldStart, buf);
}... | java | protected final void formatFileName(
final Object obj, final StringBuffer buf) {
for (int i = 0; i < patternConverters.length; i++) {
int fieldStart = buf.length();
patternConverters[i].format(obj, buf);
if (patternFields[i] != null) {
patternFields[i].format(fieldStart, buf);
}... | [
"protected",
"final",
"void",
"formatFileName",
"(",
"final",
"Object",
"obj",
",",
"final",
"StringBuffer",
"buf",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"patternConverters",
".",
"length",
";",
"i",
"++",
")",
"{",
"int",
"fieldSt... | Format file name.
@param obj object to be evaluted in formatting, may not be null.
@param buf string buffer to which formatted file name is appended, may not be null. | [
"Format",
"file",
"name",
"."
] | 493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingPolicyBase.java#L147-L157 |
104,355 | FilipPudak/ProgressPieView | library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java | ProgressPieView.animateProgressFill | public void animateProgressFill(int animateTo) {
mAnimationHandler.removeMessages(0);
if (animateTo > mMax || animateTo < 0) {
throw new IllegalArgumentException(
String.format("Animation progress (%d) is greater than the max progress (%d) or lower than 0 ", animateTo, mM... | java | public void animateProgressFill(int animateTo) {
mAnimationHandler.removeMessages(0);
if (animateTo > mMax || animateTo < 0) {
throw new IllegalArgumentException(
String.format("Animation progress (%d) is greater than the max progress (%d) or lower than 0 ", animateTo, mM... | [
"public",
"void",
"animateProgressFill",
"(",
"int",
"animateTo",
")",
"{",
"mAnimationHandler",
".",
"removeMessages",
"(",
"0",
")",
";",
"if",
"(",
"animateTo",
">",
"mMax",
"||",
"animateTo",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
... | Animates a progress fill of the view, using a Handler.
@param animateTo - the progress value the animation should stop at (0 - MAX) | [
"Animates",
"a",
"progress",
"fill",
"of",
"the",
"view",
"using",
"a",
"Handler",
"."
] | 3588947b0c68135f8cff22cf7aa9bceda9fb4c72 | https://github.com/FilipPudak/ProgressPieView/blob/3588947b0c68135f8cff22cf7aa9bceda9fb4c72/library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java#L274-L283 |
104,356 | FilipPudak/ProgressPieView | library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java | ProgressPieView.setTextSize | public void setTextSize(int sizeSp) {
mTextSize = sizeSp * mDisplayMetrics.scaledDensity;
mTextPaint.setTextSize(mTextSize);
invalidate();
} | java | public void setTextSize(int sizeSp) {
mTextSize = sizeSp * mDisplayMetrics.scaledDensity;
mTextPaint.setTextSize(mTextSize);
invalidate();
} | [
"public",
"void",
"setTextSize",
"(",
"int",
"sizeSp",
")",
"{",
"mTextSize",
"=",
"sizeSp",
"*",
"mDisplayMetrics",
".",
"scaledDensity",
";",
"mTextPaint",
".",
"setTextSize",
"(",
"mTextSize",
")",
";",
"invalidate",
"(",
")",
";",
"}"
] | Sets the text size.
@param sizeSp in sp for the text | [
"Sets",
"the",
"text",
"size",
"."
] | 3588947b0c68135f8cff22cf7aa9bceda9fb4c72 | https://github.com/FilipPudak/ProgressPieView/blob/3588947b0c68135f8cff22cf7aa9bceda9fb4c72/library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java#L424-L428 |
104,357 | FilipPudak/ProgressPieView | library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java | ProgressPieView.setStrokeWidth | public void setStrokeWidth(int widthDp) {
mStrokeWidth = widthDp * mDisplayMetrics.density;
mStrokePaint.setStrokeWidth(mStrokeWidth);
invalidate();
} | java | public void setStrokeWidth(int widthDp) {
mStrokeWidth = widthDp * mDisplayMetrics.density;
mStrokePaint.setStrokeWidth(mStrokeWidth);
invalidate();
} | [
"public",
"void",
"setStrokeWidth",
"(",
"int",
"widthDp",
")",
"{",
"mStrokeWidth",
"=",
"widthDp",
"*",
"mDisplayMetrics",
".",
"density",
";",
"mStrokePaint",
".",
"setStrokeWidth",
"(",
"mStrokeWidth",
")",
";",
"invalidate",
"(",
")",
";",
"}"
] | Set the stroke width.
@param widthDp in dp for the pie border | [
"Set",
"the",
"stroke",
"width",
"."
] | 3588947b0c68135f8cff22cf7aa9bceda9fb4c72 | https://github.com/FilipPudak/ProgressPieView/blob/3588947b0c68135f8cff22cf7aa9bceda9fb4c72/library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java#L506-L510 |
104,358 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/MusixMatch.java | MusixMatch.getLyrics | public Lyrics getLyrics(int trackID) throws MusixMatchException {
Lyrics lyrics = null;
LyricsGetMessage message = null;
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.TRACK_ID, new String("" + trackID));
String response = null;
r... | java | public Lyrics getLyrics(int trackID) throws MusixMatchException {
Lyrics lyrics = null;
LyricsGetMessage message = null;
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.TRACK_ID, new String("" + trackID));
String response = null;
r... | [
"public",
"Lyrics",
"getLyrics",
"(",
"int",
"trackID",
")",
"throws",
"MusixMatchException",
"{",
"Lyrics",
"lyrics",
"=",
"null",
";",
"LyricsGetMessage",
"message",
"=",
"null",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"new",
"HashMap... | Get Lyrics for the specific trackID.
@param trackID
@return
@throws MusixMatchException | [
"Get",
"Lyrics",
"for",
"the",
"specific",
"trackID",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L49-L73 |
104,359 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/MusixMatch.java | MusixMatch.getSnippet | public Snippet getSnippet(int trackID) throws MusixMatchException {
Snippet snippet = null;
SnippetGetMessage message = null;
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.TRACK_ID, new String("" + trackID... | java | public Snippet getSnippet(int trackID) throws MusixMatchException {
Snippet snippet = null;
SnippetGetMessage message = null;
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.TRACK_ID, new String("" + trackID... | [
"public",
"Snippet",
"getSnippet",
"(",
"int",
"trackID",
")",
"throws",
"MusixMatchException",
"{",
"Snippet",
"snippet",
"=",
"null",
";",
"SnippetGetMessage",
"message",
"=",
"null",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"new",
"Ha... | Get Snippet for the specified trackID.
@param trackID
@return
@throws MusixMatchException | [
"Get",
"Snippet",
"for",
"the",
"specified",
"trackID",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L82-L106 |
104,360 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/MusixMatch.java | MusixMatch.getSubtitle | public Subtitle getSubtitle(int trackID) throws MusixMatchException {
Subtitle subtitle = null;
SubtitleGetMessage message = null;
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.TRACK_ID, new String("" + tr... | java | public Subtitle getSubtitle(int trackID) throws MusixMatchException {
Subtitle subtitle = null;
SubtitleGetMessage message = null;
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.TRACK_ID, new String("" + tr... | [
"public",
"Subtitle",
"getSubtitle",
"(",
"int",
"trackID",
")",
"throws",
"MusixMatchException",
"{",
"Subtitle",
"subtitle",
"=",
"null",
";",
"SubtitleGetMessage",
"message",
"=",
"null",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"new",
... | Get Subtitle for the specific trackID.
@param trackID
@return
@throws MusixMatchException | [
"Get",
"Subtitle",
"for",
"the",
"specific",
"trackID",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L117-L142 |
104,361 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/MusixMatch.java | MusixMatch.searchTracks | public List<Track> searchTracks(String q, String q_artist, String q_track,
int page, int pageSize, boolean f_has_lyrics)
throws MusixMatchException {
List<Track> trackList = null;
TrackSeachMessage message = null;
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, a... | java | public List<Track> searchTracks(String q, String q_artist, String q_track,
int page, int pageSize, boolean f_has_lyrics)
throws MusixMatchException {
List<Track> trackList = null;
TrackSeachMessage message = null;
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, a... | [
"public",
"List",
"<",
"Track",
">",
"searchTracks",
"(",
"String",
"q",
",",
"String",
"q_artist",
",",
"String",
"q_track",
",",
"int",
"page",
",",
"int",
"pageSize",
",",
"boolean",
"f_has_lyrics",
")",
"throws",
"MusixMatchException",
"{",
"List",
"<",
... | Search tracks using the given criteria.
@param q
search into every available field
(track_name,artist_name,lyrics)
@param q_artist
search for text string among artist names
@param q_track
search for text string among track names
@param page
request specific result page
@param pageSize
specify number of items per resul... | [
"Search",
"tracks",
"using",
"the",
"given",
"criteria",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L164-L206 |
104,362 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/MusixMatch.java | MusixMatch.getTrack | public Track getTrack(int trackID) throws MusixMatchException {
Track track = new Track();
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.TRACK_ID, new String("" + trackID));
track = getTrackResponse(Methods.TRACK_GET, params);
retu... | java | public Track getTrack(int trackID) throws MusixMatchException {
Track track = new Track();
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.TRACK_ID, new String("" + trackID));
track = getTrackResponse(Methods.TRACK_GET, params);
retu... | [
"public",
"Track",
"getTrack",
"(",
"int",
"trackID",
")",
"throws",
"MusixMatchException",
"{",
"Track",
"track",
"=",
"new",
"Track",
"(",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object"... | Get the track details using the specified trackId.
@param trackID
track identifier in musiXmatch catalog
@return the track
@throws MusixMatchException | [
"Get",
"the",
"track",
"details",
"using",
"the",
"specified",
"trackId",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L216-L226 |
104,363 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/MusixMatch.java | MusixMatch.getMatchingTrack | public Track getMatchingTrack(String q_track, String q_artist)
throws MusixMatchException {
Track track = new Track();
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.QUERY_TRACK, q_track);
params.put(Constants.QUERY_ARTIST, q_artist)... | java | public Track getMatchingTrack(String q_track, String q_artist)
throws MusixMatchException {
Track track = new Track();
Map<String, Object> params = new HashMap<String, Object>();
params.put(Constants.API_KEY, apiKey);
params.put(Constants.QUERY_TRACK, q_track);
params.put(Constants.QUERY_ARTIST, q_artist)... | [
"public",
"Track",
"getMatchingTrack",
"(",
"String",
"q_track",
",",
"String",
"q_artist",
")",
"throws",
"MusixMatchException",
"{",
"Track",
"track",
"=",
"new",
"Track",
"(",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"new",
"Ha... | Get the most matching track which was retrieved using the search.
@param q_track
search for text string among track names
@param q_artist
search for text string among artist names
@return the track
@throws MusixMatchException | [
"Get",
"the",
"most",
"matching",
"track",
"which",
"was",
"retrieved",
"using",
"the",
"search",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L238-L250 |
104,364 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/MusixMatch.java | MusixMatch.getTrackResponse | private Track getTrackResponse(String methodName, Map<String, Object> params)
throws MusixMatchException {
Track track = new Track();
String response = null;
TrackGetMessage message = null;
response = MusixMatchRequest.sendRequest(Helper.getURLString(
methodName, params));
Gson gson = new Gson();
... | java | private Track getTrackResponse(String methodName, Map<String, Object> params)
throws MusixMatchException {
Track track = new Track();
String response = null;
TrackGetMessage message = null;
response = MusixMatchRequest.sendRequest(Helper.getURLString(
methodName, params));
Gson gson = new Gson();
... | [
"private",
"Track",
"getTrackResponse",
"(",
"String",
"methodName",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
")",
"throws",
"MusixMatchException",
"{",
"Track",
"track",
"=",
"new",
"Track",
"(",
")",
";",
"String",
"response",
"=",
"null",
... | Returns the track response which was returned through the query.
@param methodName
the name of the API method.
@param params
a map which contains the key-value pair
@return the track details.
@throws MusixMatchException
if any error occurs. | [
"Returns",
"the",
"track",
"response",
"which",
"was",
"returned",
"through",
"the",
"query",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L263-L285 |
104,365 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/MusixMatch.java | MusixMatch.handleErrorResponse | private void handleErrorResponse(String jsonResponse)
throws MusixMatchException {
StatusCode statusCode;
Gson gson = new Gson();
System.out.println(jsonResponse);
ErrorMessage errMessage = gson.fromJson(jsonResponse,
ErrorMessage.class);
int responseCode = errMessage.getMessageContainer().getHeader(... | java | private void handleErrorResponse(String jsonResponse)
throws MusixMatchException {
StatusCode statusCode;
Gson gson = new Gson();
System.out.println(jsonResponse);
ErrorMessage errMessage = gson.fromJson(jsonResponse,
ErrorMessage.class);
int responseCode = errMessage.getMessageContainer().getHeader(... | [
"private",
"void",
"handleErrorResponse",
"(",
"String",
"jsonResponse",
")",
"throws",
"MusixMatchException",
"{",
"StatusCode",
"statusCode",
";",
"Gson",
"gson",
"=",
"new",
"Gson",
"(",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"jsonResponse",
"... | Handle the error response.
@param jsonResponse
the jsonContent.
@throws MusixMatchException
if any error occurs | [
"Handle",
"the",
"error",
"response",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L295-L332 |
104,366 | sachin-handiekar/jMusixMatch | src/main/java/org/jmusixmatch/Helper.java | Helper.getURLString | public static String getURLString(String methodName,
Map<String, Object> params) throws MusixMatchException {
String paramString = new String();
paramString += methodName + "?";
for (Map.Entry<String, Object> entry : params.entrySet()) {
try {
paramString += entry.getKey()
+ "="
+ URLEncod... | java | public static String getURLString(String methodName,
Map<String, Object> params) throws MusixMatchException {
String paramString = new String();
paramString += methodName + "?";
for (Map.Entry<String, Object> entry : params.entrySet()) {
try {
paramString += entry.getKey()
+ "="
+ URLEncod... | [
"public",
"static",
"String",
"getURLString",
"(",
"String",
"methodName",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
")",
"throws",
"MusixMatchException",
"{",
"String",
"paramString",
"=",
"new",
"String",
"(",
")",
";",
"paramString",
"+=",
... | This method is used to get a parameter string from the Map.
@param params
key-value parameters
@return A String containing the url parameter.
@throws MusixMatchException | [
"This",
"method",
"is",
"used",
"to",
"get",
"a",
"parameter",
"string",
"from",
"the",
"Map",
"."
] | da909f7732053a801ea7282fe9a8bce385fa3763 | https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/Helper.java#L31-L54 |
104,367 | samtingleff/jchronic | src/main/java/com/mdimension/jchronic/Chronic.java | Chronic.baseTokenize | protected static List<Token> baseTokenize(String text) {
String[] words = text.split(" ");
List<Token> tokens = new LinkedList<Token>();
for (String word : words) {
tokens.add(new Token(word));
}
return tokens;
} | java | protected static List<Token> baseTokenize(String text) {
String[] words = text.split(" ");
List<Token> tokens = new LinkedList<Token>();
for (String word : words) {
tokens.add(new Token(word));
}
return tokens;
} | [
"protected",
"static",
"List",
"<",
"Token",
">",
"baseTokenize",
"(",
"String",
"text",
")",
"{",
"String",
"[",
"]",
"words",
"=",
"text",
".",
"split",
"(",
"\" \"",
")",
";",
"List",
"<",
"Token",
">",
"tokens",
"=",
"new",
"LinkedList",
"<",
"To... | Split the text on spaces and convert each word into
a Token | [
"Split",
"the",
"text",
"on",
"spaces",
"and",
"convert",
"each",
"word",
"into",
"a",
"Token"
] | b66bd2815eda3e79adefa2642f8ccf6b4b7586ce | https://github.com/samtingleff/jchronic/blob/b66bd2815eda3e79adefa2642f8ccf6b4b7586ce/src/main/java/com/mdimension/jchronic/Chronic.java#L176-L183 |
104,368 | samtingleff/jchronic | src/main/java/com/mdimension/jchronic/handlers/Handler.java | Handler.findWithin | public static Span findWithin(List<Repeater<?>> tags, Span span, Pointer.PointerType pointer, Options options) {
if (options.isDebug()) {
System.out.println("Chronic.findWithin: " + tags + " in " + span);
}
if (tags.isEmpty()) {
return span;
}
Repeater<?> head = tags.get(0);
List<Rep... | java | public static Span findWithin(List<Repeater<?>> tags, Span span, Pointer.PointerType pointer, Options options) {
if (options.isDebug()) {
System.out.println("Chronic.findWithin: " + tags + " in " + span);
}
if (tags.isEmpty()) {
return span;
}
Repeater<?> head = tags.get(0);
List<Rep... | [
"public",
"static",
"Span",
"findWithin",
"(",
"List",
"<",
"Repeater",
"<",
"?",
">",
">",
"tags",
",",
"Span",
"span",
",",
"Pointer",
".",
"PointerType",
"pointer",
",",
"Options",
"options",
")",
"{",
"if",
"(",
"options",
".",
"isDebug",
"(",
")",... | Recursively finds repeaters within other repeaters.
Returns a Span representing the innermost time span
or nil if no repeater union could be found | [
"Recursively",
"finds",
"repeaters",
"within",
"other",
"repeaters",
".",
"Returns",
"a",
"Span",
"representing",
"the",
"innermost",
"time",
"span",
"or",
"nil",
"if",
"no",
"repeater",
"union",
"could",
"be",
"found"
] | b66bd2815eda3e79adefa2642f8ccf6b4b7586ce | https://github.com/samtingleff/jchronic/blob/b66bd2815eda3e79adefa2642f8ccf6b4b7586ce/src/main/java/com/mdimension/jchronic/handlers/Handler.java#L346-L362 |
104,369 | samtingleff/jchronic | src/main/java/com/mdimension/jchronic/utils/Token.java | Token.untag | public void untag(Class<?> tagClass) {
Iterator<Tag<?>> tagIter = _tags.iterator();
while (tagIter.hasNext()) {
Tag<?> tag = tagIter.next();
if (tagClass.isInstance(tag)) {
tagIter.remove();
}
}
} | java | public void untag(Class<?> tagClass) {
Iterator<Tag<?>> tagIter = _tags.iterator();
while (tagIter.hasNext()) {
Tag<?> tag = tagIter.next();
if (tagClass.isInstance(tag)) {
tagIter.remove();
}
}
} | [
"public",
"void",
"untag",
"(",
"Class",
"<",
"?",
">",
"tagClass",
")",
"{",
"Iterator",
"<",
"Tag",
"<",
"?",
">",
">",
"tagIter",
"=",
"_tags",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"tagIter",
".",
"hasNext",
"(",
")",
")",
"{",
"Tag",... | Remove all tags of the given class | [
"Remove",
"all",
"tags",
"of",
"the",
"given",
"class"
] | b66bd2815eda3e79adefa2642f8ccf6b4b7586ce | https://github.com/samtingleff/jchronic/blob/b66bd2815eda3e79adefa2642f8ccf6b4b7586ce/src/main/java/com/mdimension/jchronic/utils/Token.java#L32-L40 |
104,370 | samtingleff/jchronic | src/main/java/com/mdimension/jchronic/repeaters/Repeater.java | Repeater.nextSpan | public Span nextSpan(Pointer.PointerType pointer) {
if (getNow() == null) {
throw new IllegalStateException("Start point must be set before calling #next");
}
return _nextSpan(pointer);
} | java | public Span nextSpan(Pointer.PointerType pointer) {
if (getNow() == null) {
throw new IllegalStateException("Start point must be set before calling #next");
}
return _nextSpan(pointer);
} | [
"public",
"Span",
"nextSpan",
"(",
"Pointer",
".",
"PointerType",
"pointer",
")",
"{",
"if",
"(",
"getNow",
"(",
")",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Start point must be set before calling #next\"",
")",
";",
"}",
"return... | returns the next occurance of this repeatable. | [
"returns",
"the",
"next",
"occurance",
"of",
"this",
"repeatable",
"."
] | b66bd2815eda3e79adefa2642f8ccf6b4b7586ce | https://github.com/samtingleff/jchronic/blob/b66bd2815eda3e79adefa2642f8ccf6b4b7586ce/src/main/java/com/mdimension/jchronic/repeaters/Repeater.java#L59-L64 |
104,371 | lodborg/interval-tree | src/main/java/com/lodborg/intervaltree/TreeNode.java | TreeNode.balanceOut | private TreeNode<T> balanceOut(){
int balance = height(left) - height(right);
if (balance < -1){
// The tree is right-heavy.
if (height(right.left) > height(right.right)){
this.right = this.right.rightRotate();
return leftRotate();
} else{
return leftRotate();
}
} else if (balance > 1){
... | java | private TreeNode<T> balanceOut(){
int balance = height(left) - height(right);
if (balance < -1){
// The tree is right-heavy.
if (height(right.left) > height(right.right)){
this.right = this.right.rightRotate();
return leftRotate();
} else{
return leftRotate();
}
} else if (balance > 1){
... | [
"private",
"TreeNode",
"<",
"T",
">",
"balanceOut",
"(",
")",
"{",
"int",
"balance",
"=",
"height",
"(",
"left",
")",
"-",
"height",
"(",
"right",
")",
";",
"if",
"(",
"balance",
"<",
"-",
"1",
")",
"{",
"// The tree is right-heavy.",
"if",
"(",
"hei... | Checks if the subtree rooted at the current node is balanced and balances it
if necessary.
@return The new root of the subtree, after the balancing operation has been
performed. It may return a {@code null} value, if the balancing has been
triggered by a {@link #removeInterval(IntervalTree, TreeNode, Interval)} operat... | [
"Checks",
"if",
"the",
"subtree",
"rooted",
"at",
"the",
"current",
"node",
"is",
"balanced",
"and",
"balances",
"it",
"if",
"necessary",
"."
] | 716b18fb0a5a53c9add9926176bc263f14c9bf90 | https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/TreeNode.java#L193-L214 |
104,372 | lodborg/interval-tree | src/main/java/com/lodborg/intervaltree/TreeNode.java | TreeNode.assimilateOverlappingIntervals | private TreeNode<T> assimilateOverlappingIntervals(TreeNode<T> from) {
ArrayList<Interval<T>> tmp = new ArrayList<>();
if (midpoint.compareTo(from.midpoint) < 0){
for (Interval<T> next: from.increasing){
if (next.isRightOf(midpoint))
break;
tmp.add(next);
}
} else {
for (Interval<T> next: f... | java | private TreeNode<T> assimilateOverlappingIntervals(TreeNode<T> from) {
ArrayList<Interval<T>> tmp = new ArrayList<>();
if (midpoint.compareTo(from.midpoint) < 0){
for (Interval<T> next: from.increasing){
if (next.isRightOf(midpoint))
break;
tmp.add(next);
}
} else {
for (Interval<T> next: f... | [
"private",
"TreeNode",
"<",
"T",
">",
"assimilateOverlappingIntervals",
"(",
"TreeNode",
"<",
"T",
">",
"from",
")",
"{",
"ArrayList",
"<",
"Interval",
"<",
"T",
">>",
"tmp",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"midpoint",
".",
"co... | Transfers all intervals from a target node to the current node, if they
intersect the middlepoint of the current node. After this operation, it
is possible that the target node remains empty. If so, it needs to be
deleted, possible causing the subtree to be rebalanced.
@param from The target node, from which intervals... | [
"Transfers",
"all",
"intervals",
"from",
"a",
"target",
"node",
"to",
"the",
"current",
"node",
"if",
"they",
"intersect",
"the",
"middlepoint",
"of",
"the",
"current",
"node",
".",
"After",
"this",
"operation",
"it",
"is",
"possible",
"that",
"the",
"target... | 716b18fb0a5a53c9add9926176bc263f14c9bf90 | https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/TreeNode.java#L261-L286 |
104,373 | lodborg/interval-tree | src/main/java/com/lodborg/intervaltree/TreeNode.java | TreeNode.deleteNode | private static <T extends Comparable<? super T>> TreeNode<T> deleteNode(TreeNode<T> root) {
if (root.left == null && root.right == null)
return null;
if (root.left == null){
// If the left child is empty, then the right subtree can consist of at most
// one node, otherwise it would have been unbalanced. S... | java | private static <T extends Comparable<? super T>> TreeNode<T> deleteNode(TreeNode<T> root) {
if (root.left == null && root.right == null)
return null;
if (root.left == null){
// If the left child is empty, then the right subtree can consist of at most
// one node, otherwise it would have been unbalanced. S... | [
"private",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"?",
"super",
"T",
">",
">",
"TreeNode",
"<",
"T",
">",
"deleteNode",
"(",
"TreeNode",
"<",
"T",
">",
"root",
")",
"{",
"if",
"(",
"root",
".",
"left",
"==",
"null",
"&&",
"root",
".",
... | Deletes a node from the tree. The caller of this method needs to check, if the
node is actually empty, because this method only performs the deletion.
@param root The node that needs to be deleted.
@param <T> The type of the start and end points of the intervals.
@return The new root of the subtree rooted at the node ... | [
"Deletes",
"a",
"node",
"from",
"the",
"tree",
".",
"The",
"caller",
"of",
"this",
"method",
"needs",
"to",
"check",
"if",
"the",
"node",
"is",
"actually",
"empty",
"because",
"this",
"method",
"only",
"performs",
"the",
"deletion",
"."
] | 716b18fb0a5a53c9add9926176bc263f14c9bf90 | https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/TreeNode.java#L367-L399 |
104,374 | lodborg/interval-tree | src/main/java/com/lodborg/intervaltree/TreeNode.java | TreeNode.rangeQueryLeft | static <T extends Comparable<? super T>> void rangeQueryLeft(TreeNode<T> node, Interval<T> query, Set<Interval<T>> result) {
while (node != null) {
if (query.contains(node.midpoint)) {
result.addAll(node.increasing);
if (node.right != null) {
for (Interval<T> next : node.right)
result.add(next);... | java | static <T extends Comparable<? super T>> void rangeQueryLeft(TreeNode<T> node, Interval<T> query, Set<Interval<T>> result) {
while (node != null) {
if (query.contains(node.midpoint)) {
result.addAll(node.increasing);
if (node.right != null) {
for (Interval<T> next : node.right)
result.add(next);... | [
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"?",
"super",
"T",
">",
">",
"void",
"rangeQueryLeft",
"(",
"TreeNode",
"<",
"T",
">",
"node",
",",
"Interval",
"<",
"T",
">",
"query",
",",
"Set",
"<",
"Interval",
"<",
"T",
">",
">",
"result",
")"... | A helper method for the range search used in the interval intersection query in the tree.
This corresponds to the left branch of the range search, once we find a node, whose
midpoint is contained in the query interval. All intervals in the left subtree of that node
are guaranteed to intersect with the query, if they ha... | [
"A",
"helper",
"method",
"for",
"the",
"range",
"search",
"used",
"in",
"the",
"interval",
"intersection",
"query",
"in",
"the",
"tree",
".",
"This",
"corresponds",
"to",
"the",
"left",
"branch",
"of",
"the",
"range",
"search",
"once",
"we",
"find",
"a",
... | 716b18fb0a5a53c9add9926176bc263f14c9bf90 | https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/TreeNode.java#L413-L431 |
104,375 | lodborg/interval-tree | src/main/java/com/lodborg/intervaltree/TreeNode.java | TreeNode.rangeQueryRight | static <T extends Comparable<? super T>> void rangeQueryRight(TreeNode<T> node, Interval<T> query, Set<Interval<T>> result) {
while (node != null) {
if (query.contains(node.midpoint)) {
result.addAll(node.increasing);
if (node.left != null) {
for (Interval<T> next : node.left)
result.add(next);
... | java | static <T extends Comparable<? super T>> void rangeQueryRight(TreeNode<T> node, Interval<T> query, Set<Interval<T>> result) {
while (node != null) {
if (query.contains(node.midpoint)) {
result.addAll(node.increasing);
if (node.left != null) {
for (Interval<T> next : node.left)
result.add(next);
... | [
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"?",
"super",
"T",
">",
">",
"void",
"rangeQueryRight",
"(",
"TreeNode",
"<",
"T",
">",
"node",
",",
"Interval",
"<",
"T",
">",
"query",
",",
"Set",
"<",
"Interval",
"<",
"T",
">",
">",
"result",
")... | A helper method for the range search used in the interval intersection query in the tree.
This corresponds to the right branch of the range search, once we find a node, whose
midpoint is contained in the query interval. All intervals in the right subtree of that node
are guaranteed to intersect with the query, if they ... | [
"A",
"helper",
"method",
"for",
"the",
"range",
"search",
"used",
"in",
"the",
"interval",
"intersection",
"query",
"in",
"the",
"tree",
".",
"This",
"corresponds",
"to",
"the",
"right",
"branch",
"of",
"the",
"range",
"search",
"once",
"we",
"find",
"a",
... | 716b18fb0a5a53c9add9926176bc263f14c9bf90 | https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/TreeNode.java#L445-L463 |
104,376 | lodborg/interval-tree | src/main/java/com/lodborg/intervaltree/Interval.java | Interval.isEmpty | public boolean isEmpty() {
if (start == null || end == null)
return false;
int compare = start.compareTo(end);
if (compare>0)
return true;
if (compare == 0 && (!isEndInclusive || !isStartInclusive))
return true;
return false;
} | java | public boolean isEmpty() {
if (start == null || end == null)
return false;
int compare = start.compareTo(end);
if (compare>0)
return true;
if (compare == 0 && (!isEndInclusive || !isStartInclusive))
return true;
return false;
} | [
"public",
"boolean",
"isEmpty",
"(",
")",
"{",
"if",
"(",
"start",
"==",
"null",
"||",
"end",
"==",
"null",
")",
"return",
"false",
";",
"int",
"compare",
"=",
"start",
".",
"compareTo",
"(",
"end",
")",
";",
"if",
"(",
"compare",
">",
"0",
")",
... | Checks if the current interval contains no points.
<p>In particular, if the end point is less than the start point, then the interval is
considered to be empty. There are, however other instances, in which an interval is empty.
For example, in the class {@link IntegerInterval}, an open interval, whose start and end
po... | [
"Checks",
"if",
"the",
"current",
"interval",
"contains",
"no",
"points",
"."
] | 716b18fb0a5a53c9add9926176bc263f14c9bf90 | https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/Interval.java#L172-L181 |
104,377 | lodborg/interval-tree | src/main/java/com/lodborg/intervaltree/Interval.java | Interval.isPoint | public boolean isPoint(){
if (start == null || end == null) {
return false;
}
return start.compareTo(end) == 0 && isStartInclusive && isEndInclusive;
} | java | public boolean isPoint(){
if (start == null || end == null) {
return false;
}
return start.compareTo(end) == 0 && isStartInclusive && isEndInclusive;
} | [
"public",
"boolean",
"isPoint",
"(",
")",
"{",
"if",
"(",
"start",
"==",
"null",
"||",
"end",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"start",
".",
"compareTo",
"(",
"end",
")",
"==",
"0",
"&&",
"isStartInclusive",
"&&",
"isEnd... | Determines if the current interval is a single point.
@return {@code true}, if the current interval represents a single point. | [
"Determines",
"if",
"the",
"current",
"interval",
"is",
"a",
"single",
"point",
"."
] | 716b18fb0a5a53c9add9926176bc263f14c9bf90 | https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/Interval.java#L251-L256 |
104,378 | lodborg/interval-tree | src/main/java/com/lodborg/intervaltree/Interval.java | Interval.contains | public boolean contains(T query){
if (isEmpty() || query == null) {
return false;
}
int startCompare = start == null ? 1 : query.compareTo(start);
int endCompare = end == null ? -1 : query.compareTo(end);
if (startCompare > 0 && endCompare < 0) {
return true;
}
return (startCompare == 0 && isStartI... | java | public boolean contains(T query){
if (isEmpty() || query == null) {
return false;
}
int startCompare = start == null ? 1 : query.compareTo(start);
int endCompare = end == null ? -1 : query.compareTo(end);
if (startCompare > 0 && endCompare < 0) {
return true;
}
return (startCompare == 0 && isStartI... | [
"public",
"boolean",
"contains",
"(",
"T",
"query",
")",
"{",
"if",
"(",
"isEmpty",
"(",
")",
"||",
"query",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"int",
"startCompare",
"=",
"start",
"==",
"null",
"?",
"1",
":",
"query",
".",
"compa... | Determines if the current interval contains a query point.
@param query The point.
@return {@code true}, if the current interval contains the {@code query} point or false otherwise. | [
"Determines",
"if",
"the",
"current",
"interval",
"contains",
"a",
"query",
"point",
"."
] | 716b18fb0a5a53c9add9926176bc263f14c9bf90 | https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/Interval.java#L264-L275 |
104,379 | in-the-keyhole/khs-sherpa | src/main/java/com/khs/sherpa/util/UrlUtil.java | UrlUtil.getRequestBody | public static String getRequestBody(HttpServletRequest request) {
if(request.getMethod().equals("GET") || request.getMethod().equals("DELETE")) {
return null;
}
StringBuilder stringBuilder = new StringBuilder();
BufferedReader bufferedReader = null;
try {
InputStream inputStream = request.getInputStr... | java | public static String getRequestBody(HttpServletRequest request) {
if(request.getMethod().equals("GET") || request.getMethod().equals("DELETE")) {
return null;
}
StringBuilder stringBuilder = new StringBuilder();
BufferedReader bufferedReader = null;
try {
InputStream inputStream = request.getInputStr... | [
"public",
"static",
"String",
"getRequestBody",
"(",
"HttpServletRequest",
"request",
")",
"{",
"if",
"(",
"request",
".",
"getMethod",
"(",
")",
".",
"equals",
"(",
"\"GET\"",
")",
"||",
"request",
".",
"getMethod",
"(",
")",
".",
"equals",
"(",
"\"DELETE... | not easily tested | [
"not",
"easily",
"tested"
] | c2d4a49abac04c859090f637bdb84eac926a394a | https://github.com/in-the-keyhole/khs-sherpa/blob/c2d4a49abac04c859090f637bdb84eac926a394a/src/main/java/com/khs/sherpa/util/UrlUtil.java#L41-L82 |
104,380 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/sync/SyncAdapter.java | SyncAdapter.updatePrograms | private void updatePrograms(final Uri channelUri, final List<Program> newPrograms) {
new Thread(new Runnable() {
@Override
public void run() {
final int fetchedProgramsCount = newPrograms.size();
if (fetchedProgramsCount == 0) {
return;... | java | private void updatePrograms(final Uri channelUri, final List<Program> newPrograms) {
new Thread(new Runnable() {
@Override
public void run() {
final int fetchedProgramsCount = newPrograms.size();
if (fetchedProgramsCount == 0) {
return;... | [
"private",
"void",
"updatePrograms",
"(",
"final",
"Uri",
"channelUri",
",",
"final",
"List",
"<",
"Program",
">",
"newPrograms",
")",
"{",
"new",
"Thread",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
... | Updates the system database, TvProvider, with the given programs.
<p>If there is any overlap between the given and existing programs, the existing ones
will be updated with the given ones if they have the same title or replaced.
@param channelUri The channel where the program info will be added.
@param newPrograms A ... | [
"Updates",
"the",
"system",
"database",
"TvProvider",
"with",
"the",
"given",
"programs",
"."
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/sync/SyncAdapter.java#L177-L262 |
104,381 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/fileio/FileParser.java | FileParser.parseGenericFileUri | public static void parseGenericFileUri(String uri, FileIdentifier identifier) {
if(uri.startsWith("file://"))
identifier.onLocalFile();
else if(uri.startsWith("http://"))
identifier.onHttpFile();
else if(uri.startsWith("android.resource://"))
identifier.onAsse... | java | public static void parseGenericFileUri(String uri, FileIdentifier identifier) {
if(uri.startsWith("file://"))
identifier.onLocalFile();
else if(uri.startsWith("http://"))
identifier.onHttpFile();
else if(uri.startsWith("android.resource://"))
identifier.onAsse... | [
"public",
"static",
"void",
"parseGenericFileUri",
"(",
"String",
"uri",
",",
"FileIdentifier",
"identifier",
")",
"{",
"if",
"(",
"uri",
".",
"startsWith",
"(",
"\"file://\"",
")",
")",
"identifier",
".",
"onLocalFile",
"(",
")",
";",
"else",
"if",
"(",
"... | In order to determine the correct file parser, you can provide the URI and this method
will find the appropriate parser to use
@param uri The Uri of the file you are parsing
@param identifier This interface can be generated in order to handle different actions
based on the source of the file | [
"In",
"order",
"to",
"determine",
"the",
"correct",
"file",
"parser",
"you",
"can",
"provide",
"the",
"URI",
"and",
"this",
"method",
"will",
"find",
"the",
"appropriate",
"parser",
"to",
"use"
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/fileio/FileParser.java#L15-L22 |
104,382 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/service/MultimediaInputProvider.java | MultimediaInputProvider.play | @Override
public void play(final String uri) {
Log.d(TAG, "Start playing "+uri);
notifyVideoUnavailable(REASON_BUFFERING);
isWeb = false;
TvInputPlayer.Callback callback = new TvInputPlayer.Callback() {
@Override
public void onPrepared() {
noti... | java | @Override
public void play(final String uri) {
Log.d(TAG, "Start playing "+uri);
notifyVideoUnavailable(REASON_BUFFERING);
isWeb = false;
TvInputPlayer.Callback callback = new TvInputPlayer.Callback() {
@Override
public void onPrepared() {
noti... | [
"@",
"Override",
"public",
"void",
"play",
"(",
"final",
"String",
"uri",
")",
"{",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"Start playing \"",
"+",
"uri",
")",
";",
"notifyVideoUnavailable",
"(",
"REASON_BUFFERING",
")",
";",
"isWeb",
"=",
"false",
";",
"Tv... | Tries to load a video file. If one cannot be played, it will be interpreted as a website
and begin to load it in a web browser
@param uri The URL for the file or website | [
"Tries",
"to",
"load",
"a",
"video",
"file",
".",
"If",
"one",
"cannot",
"be",
"played",
"it",
"will",
"be",
"interpreted",
"as",
"a",
"website",
"and",
"begin",
"to",
"load",
"it",
"in",
"a",
"web",
"browser"
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/service/MultimediaInputProvider.java#L92-L169 |
104,383 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/service/ExoPlayerInputProvider.java | ExoPlayerInputProvider.play | public void play(String uri) {
tvInputPlayer.setSurface(mSurface);
try {
Log.d(TAG, "Play "+uri+"; "+uri.indexOf("asset:///"));
if(uri.contains("asset:///")) {
Log.i(TAG, "Is a local file");
DataSource dataSource=new AssetDataSource(getApplicationC... | java | public void play(String uri) {
tvInputPlayer.setSurface(mSurface);
try {
Log.d(TAG, "Play "+uri+"; "+uri.indexOf("asset:///"));
if(uri.contains("asset:///")) {
Log.i(TAG, "Is a local file");
DataSource dataSource=new AssetDataSource(getApplicationC... | [
"public",
"void",
"play",
"(",
"String",
"uri",
")",
"{",
"tvInputPlayer",
".",
"setSurface",
"(",
"mSurface",
")",
";",
"try",
"{",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"Play \"",
"+",
"uri",
"+",
"\"; \"",
"+",
"uri",
".",
"indexOf",
"(",
"\"asset:/... | Will load and begin to play any RTMP, HLS, or MPEG2-DASH stream
Should also be able to play local videos and audio files
@param uri The URL where the file resides | [
"Will",
"load",
"and",
"begin",
"to",
"play",
"any",
"RTMP",
"HLS",
"or",
"MPEG2",
"-",
"DASH",
"stream",
"Should",
"also",
"be",
"able",
"to",
"play",
"local",
"videos",
"and",
"audio",
"files"
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/service/ExoPlayerInputProvider.java#L66-L84 |
104,384 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/sync/DummyAccountService.java | DummyAccountService.getAccount | public static Account getAccount(Context mContext) {
String ACCOUNT_NAME = mContext.getString(R.string.app_name);
return new Account(ACCOUNT_NAME, ACCOUNT_NAME);
} | java | public static Account getAccount(Context mContext) {
String ACCOUNT_NAME = mContext.getString(R.string.app_name);
return new Account(ACCOUNT_NAME, ACCOUNT_NAME);
} | [
"public",
"static",
"Account",
"getAccount",
"(",
"Context",
"mContext",
")",
"{",
"String",
"ACCOUNT_NAME",
"=",
"mContext",
".",
"getString",
"(",
"R",
".",
"string",
".",
"app_name",
")",
";",
"return",
"new",
"Account",
"(",
"ACCOUNT_NAME",
",",
"ACCOUNT... | public static final String ACCOUNT_NAME = ""; | [
"public",
"static",
"final",
"String",
"ACCOUNT_NAME",
"=",
";"
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/sync/DummyAccountService.java#L26-L29 |
104,385 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/service/TvInputProvider.java | TvInputProvider.getCurrentChannels | public List<Channel> getCurrentChannels(Context mContext) {
try {
ApplicationInfo app = getApplicationContext().getPackageManager().getApplicationInfo(getApplicationContext().getPackageName(), PackageManager.GET_META_DATA);
Bundle bundle = app.metaData;
final String service =... | java | public List<Channel> getCurrentChannels(Context mContext) {
try {
ApplicationInfo app = getApplicationContext().getPackageManager().getApplicationInfo(getApplicationContext().getPackageName(), PackageManager.GET_META_DATA);
Bundle bundle = app.metaData;
final String service =... | [
"public",
"List",
"<",
"Channel",
">",
"getCurrentChannels",
"(",
"Context",
"mContext",
")",
"{",
"try",
"{",
"ApplicationInfo",
"app",
"=",
"getApplicationContext",
"(",
")",
".",
"getPackageManager",
"(",
")",
".",
"getApplicationInfo",
"(",
"getApplicationCont... | Goes into the TV guide and obtains the channels currently registered
@return An ArrayList of channels | [
"Goes",
"into",
"the",
"TV",
"guide",
"and",
"obtains",
"the",
"channels",
"currently",
"registered"
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/service/TvInputProvider.java#L116-L151 |
104,386 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/service/TvInputProvider.java | TvInputProvider.getGenericProgram | public Program getGenericProgram(Channel channel) {
TvContentRating rating = RATING_PG;
return new Program.Builder()
.setTitle(channel.getName() + " Live")
.setProgramId(channel.getServiceId())
// .setEpisodeNumber(1)
// .setSeasonNumber(1)
/... | java | public Program getGenericProgram(Channel channel) {
TvContentRating rating = RATING_PG;
return new Program.Builder()
.setTitle(channel.getName() + " Live")
.setProgramId(channel.getServiceId())
// .setEpisodeNumber(1)
// .setSeasonNumber(1)
/... | [
"public",
"Program",
"getGenericProgram",
"(",
"Channel",
"channel",
")",
"{",
"TvContentRating",
"rating",
"=",
"RATING_PG",
";",
"return",
"new",
"Program",
".",
"Builder",
"(",
")",
".",
"setTitle",
"(",
"channel",
".",
"getName",
"(",
")",
"+",
"\" Live\... | If you don't have access to an EPG or don't want to supply programs, you can simply
add several instances of this generic program object.
Note you will have to set the start and end times manually.
@param channel The channel for which the program will be displayed
@return A very generic program object | [
"If",
"you",
"don",
"t",
"have",
"access",
"to",
"an",
"EPG",
"or",
"don",
"t",
"want",
"to",
"supply",
"programs",
"you",
"can",
"simply",
"add",
"several",
"instances",
"of",
"this",
"generic",
"program",
"object",
"."
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/service/TvInputProvider.java#L202-L220 |
104,387 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/service/TvInputProvider.java | TvInputProvider.getLocalVideoUri | public String getLocalVideoUri(String assetname) {
File f = new File(assetname);
Log.d(TAG, "Video path "+f.getAbsolutePath());
String uri = Uri.fromFile(f).toString();
Log.d(TAG, "Uri "+uri);
return uri;
// return "file:/"+assetname;
// return "asset:///"+assetname... | java | public String getLocalVideoUri(String assetname) {
File f = new File(assetname);
Log.d(TAG, "Video path "+f.getAbsolutePath());
String uri = Uri.fromFile(f).toString();
Log.d(TAG, "Uri "+uri);
return uri;
// return "file:/"+assetname;
// return "asset:///"+assetname... | [
"public",
"String",
"getLocalVideoUri",
"(",
"String",
"assetname",
")",
"{",
"File",
"f",
"=",
"new",
"File",
"(",
"assetname",
")",
";",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"Video path \"",
"+",
"f",
".",
"getAbsolutePath",
"(",
")",
")",
";",
"Strin... | Gets a valid Uri of a local video file
@param assetname The resource id of the video
@return A Uri as a string | [
"Gets",
"a",
"valid",
"Uri",
"of",
"a",
"local",
"video",
"file"
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/service/TvInputProvider.java#L356-L364 |
104,388 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/fileio/HttpFileParser.java | HttpFileParser.downloadUrl | private InputStream downloadUrl(String myurl) throws IOException {
InputStream is = null;
// Only display the first 500 characters of the retrieved
// web page content.
try {
URL url = new URL(myurl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection... | java | private InputStream downloadUrl(String myurl) throws IOException {
InputStream is = null;
// Only display the first 500 characters of the retrieved
// web page content.
try {
URL url = new URL(myurl);
HttpURLConnection conn = (HttpURLConnection) url.openConnection... | [
"private",
"InputStream",
"downloadUrl",
"(",
"String",
"myurl",
")",
"throws",
"IOException",
"{",
"InputStream",
"is",
"=",
"null",
";",
"// Only display the first 500 characters of the retrieved",
"// web page content.",
"try",
"{",
"URL",
"url",
"=",
"new",
"URL",
... | Given a URL, establishes an HttpUrlConnection and retrieves
the web page content as a InputStream, which it returns as
a string.
@param myurl The URL of the request
@return The inputstream of the request's return data
@throws IOException | [
"Given",
"a",
"URL",
"establishes",
"an",
"HttpUrlConnection",
"and",
"retrieves",
"the",
"web",
"page",
"content",
"as",
"a",
"InputStream",
"which",
"it",
"returns",
"as",
"a",
"string",
"."
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/fileio/HttpFileParser.java#L55-L76 |
104,389 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/players/TvInputPlayer.java | TvInputPlayer.getCurrentPosition | public long getCurrentPosition() {
try {
return mPlayer.getCurrentPosition();
} catch(Exception e) {
Log.e(TAG, e.getMessage());
return -1;
}
} | java | public long getCurrentPosition() {
try {
return mPlayer.getCurrentPosition();
} catch(Exception e) {
Log.e(TAG, e.getMessage());
return -1;
}
} | [
"public",
"long",
"getCurrentPosition",
"(",
")",
"{",
"try",
"{",
"return",
"mPlayer",
".",
"getCurrentPosition",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"Log",
".",
"e",
"(",
"TAG",
",",
"e",
".",
"getMessage",
"(",
")",
")",
... | Returns the current position of the media in milliseconds, if applicable
@return | [
"Returns",
"the",
"current",
"position",
"of",
"the",
"media",
"in",
"milliseconds",
"if",
"applicable"
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/players/TvInputPlayer.java#L536-L543 |
104,390 | Fleker/ChannelSurfer | library/src/main/java/com/felkertech/channelsurfer/utils/LiveChannelsUtils.java | LiveChannelsUtils.getTvInputProvider | public static TvInputProvider getTvInputProvider(Context mContext, final TvInputProviderCallback callback) {
ApplicationInfo app = null;
try {
Log.d(TAG, mContext.getPackageName()+" >");
app = mContext.getPackageManager().getApplicationInfo(mContext.getPackageName(), PackageManag... | java | public static TvInputProvider getTvInputProvider(Context mContext, final TvInputProviderCallback callback) {
ApplicationInfo app = null;
try {
Log.d(TAG, mContext.getPackageName()+" >");
app = mContext.getPackageManager().getApplicationInfo(mContext.getPackageName(), PackageManag... | [
"public",
"static",
"TvInputProvider",
"getTvInputProvider",
"(",
"Context",
"mContext",
",",
"final",
"TvInputProviderCallback",
"callback",
")",
"{",
"ApplicationInfo",
"app",
"=",
"null",
";",
"try",
"{",
"Log",
".",
"d",
"(",
"TAG",
",",
"mContext",
".",
"... | Returns the TvInputProvider that was defined by the project's manifest | [
"Returns",
"the",
"TvInputProvider",
"that",
"was",
"defined",
"by",
"the",
"project",
"s",
"manifest"
] | f677beae37112f463c0c4783967fdb8fa97eb633 | https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/utils/LiveChannelsUtils.java#L52-L87 |
104,391 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLNumericArray.java | MLNumericArray.setReal | public void setReal(T value, int m, int n)
{
setReal( value, getIndex(m,n) );
} | java | public void setReal(T value, int m, int n)
{
setReal( value, getIndex(m,n) );
} | [
"public",
"void",
"setReal",
"(",
"T",
"value",
",",
"int",
"m",
",",
"int",
"n",
")",
"{",
"setReal",
"(",
"value",
",",
"getIndex",
"(",
"m",
",",
"n",
")",
")",
";",
"}"
] | Sets single real array element.
@param value - element value
@param m - row index
@param n - column index | [
"Sets",
"single",
"real",
"array",
"element",
"."
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLNumericArray.java#L99-L102 |
104,392 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLNumericArray.java | MLNumericArray.setReal | public void setReal( T[] vector )
{
if ( vector.length != getSize() )
{
throw new IllegalArgumentException("Matrix dimensions do not match. " + getSize() + " not " + vector.length);
}
System.arraycopy(vector, 0, real, 0, vector.length);
} | java | public void setReal( T[] vector )
{
if ( vector.length != getSize() )
{
throw new IllegalArgumentException("Matrix dimensions do not match. " + getSize() + " not " + vector.length);
}
System.arraycopy(vector, 0, real, 0, vector.length);
} | [
"public",
"void",
"setReal",
"(",
"T",
"[",
"]",
"vector",
")",
"{",
"if",
"(",
"vector",
".",
"length",
"!=",
"getSize",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Matrix dimensions do not match. \"",
"+",
"getSize",
"(",
")",
... | Sets real part of matrix
@param vector - column-packed vector of elements | [
"Sets",
"real",
"part",
"of",
"matrix"
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLNumericArray.java#L118-L125 |
104,393 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLNumericArray.java | MLNumericArray.setImaginary | public void setImaginary(T value, int m, int n)
{
setImaginary( value, getIndex(m,n) );
} | java | public void setImaginary(T value, int m, int n)
{
setImaginary( value, getIndex(m,n) );
} | [
"public",
"void",
"setImaginary",
"(",
"T",
"value",
",",
"int",
"m",
",",
"int",
"n",
")",
"{",
"setImaginary",
"(",
"value",
",",
"getIndex",
"(",
"m",
",",
"n",
")",
")",
";",
"}"
] | Sets single imaginary array element.
@param value - element value
@param m - row index
@param n - column index | [
"Sets",
"single",
"imaginary",
"array",
"element",
"."
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLNumericArray.java#L133-L136 |
104,394 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLChar.java | MLChar.set | public void set(String value, int idx)
{
int rowOffset = getM();
for ( int i = 0; i < getN(); i++ )
{
if ( i < value.length())
{
setChar( value.charAt(i), idx + (rowOffset * i));
}
else
{
setChar(' ', idx + (rowOffset * i));... | java | public void set(String value, int idx)
{
int rowOffset = getM();
for ( int i = 0; i < getN(); i++ )
{
if ( i < value.length())
{
setChar( value.charAt(i), idx + (rowOffset * i));
}
else
{
setChar(' ', idx + (rowOffset * i));... | [
"public",
"void",
"set",
"(",
"String",
"value",
",",
"int",
"idx",
")",
"{",
"int",
"rowOffset",
"=",
"getM",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"getN",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"<",
... | Set one row, specifying the row.
@param value
@param idx | [
"Set",
"one",
"row",
"specifying",
"the",
"row",
"."
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLChar.java#L108-L123 |
104,395 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLSparse.java | MLSparse.getIR | public int[] getIR()
{
int[] ir = new int[nzmax];
int i = 0;
for ( IndexMN index : indexSet )
{
ir[i++] = index.m;
}
return ir;
} | java | public int[] getIR()
{
int[] ir = new int[nzmax];
int i = 0;
for ( IndexMN index : indexSet )
{
ir[i++] = index.m;
}
return ir;
} | [
"public",
"int",
"[",
"]",
"getIR",
"(",
")",
"{",
"int",
"[",
"]",
"ir",
"=",
"new",
"int",
"[",
"nzmax",
"]",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"IndexMN",
"index",
":",
"indexSet",
")",
"{",
"ir",
"[",
"i",
"++",
"]",
"=",
"inde... | Gets row indices
<tt>ir</tt> points to an integer array of length nzmax containing the row indices of
the corresponding elements in <tt>pr</tt> and <tt>pi</tt>. | [
"Gets",
"row",
"indices"
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLSparse.java#L53-L62 |
104,396 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLSparse.java | MLSparse.getIC | public int[] getIC()
{
int[] ic = new int[nzmax];
int i = 0;
for ( IndexMN index : indexSet )
{
ic[i++] = index.n;
}
return ic;
} | java | public int[] getIC()
{
int[] ic = new int[nzmax];
int i = 0;
for ( IndexMN index : indexSet )
{
ic[i++] = index.n;
}
return ic;
} | [
"public",
"int",
"[",
"]",
"getIC",
"(",
")",
"{",
"int",
"[",
"]",
"ic",
"=",
"new",
"int",
"[",
"nzmax",
"]",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"IndexMN",
"index",
":",
"indexSet",
")",
"{",
"ic",
"[",
"i",
"++",
"]",
"=",
"inde... | Gets column indices
<tt>ic</tt> points to an integer array of length nzmax containing the column indices of
the corresponding elements in <tt>pr</tt> and <tt>pi</tt>. | [
"Gets",
"column",
"indices"
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLSparse.java#L70-L79 |
104,397 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLSparse.java | MLSparse.getJC | public int[] getJC()
{
int[] jc = new int[getN()+1];
// jc[j] is the number of nonzero elements in all preceeding columns
for ( IndexMN index : indexSet )
{
for (int column = index.n + 1; column < jc.length; column++)
{
jc[column]++;
... | java | public int[] getJC()
{
int[] jc = new int[getN()+1];
// jc[j] is the number of nonzero elements in all preceeding columns
for ( IndexMN index : indexSet )
{
for (int column = index.n + 1; column < jc.length; column++)
{
jc[column]++;
... | [
"public",
"int",
"[",
"]",
"getJC",
"(",
")",
"{",
"int",
"[",
"]",
"jc",
"=",
"new",
"int",
"[",
"getN",
"(",
")",
"+",
"1",
"]",
";",
"// jc[j] is the number of nonzero elements in all preceeding columns",
"for",
"(",
"IndexMN",
"index",
":",
"indexSet",
... | Gets column indices.
<tt>jc</tt> points to an integer array of length N+1 that contains column index information.
For j, in the range <tt>0<=j<=N</tt>, <tt>jc[j]</tt> is the index in ir and <tt>pr</tt> (and <tt>pi</tt>
if it exists) of the first nonzero entry in the jth column and <tt>jc[j+1]�1</tt> index
of the... | [
"Gets",
"column",
"indices",
"."
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLSparse.java#L93-L105 |
104,398 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLStructure.java | MLStructure.setField | public void setField(String name, MLArray value, int index)
{
keys.add(name);
currentIndex = index;
if ( mlStructArray.isEmpty() || mlStructArray.size() <= index )
{
mlStructArray.add(index, new LinkedHashMap<String, MLArray>() );
}
mlStructArray.... | java | public void setField(String name, MLArray value, int index)
{
keys.add(name);
currentIndex = index;
if ( mlStructArray.isEmpty() || mlStructArray.size() <= index )
{
mlStructArray.add(index, new LinkedHashMap<String, MLArray>() );
}
mlStructArray.... | [
"public",
"void",
"setField",
"(",
"String",
"name",
",",
"MLArray",
"value",
",",
"int",
"index",
")",
"{",
"keys",
".",
"add",
"(",
"name",
")",
";",
"currentIndex",
"=",
"index",
";",
"if",
"(",
"mlStructArray",
".",
"isEmpty",
"(",
")",
"||",
"ml... | Sets filed for structure described by index in struct array
@param name - name of the field
@param value - <code>MLArray</code> field value
@param index | [
"Sets",
"filed",
"for",
"structure",
"described",
"by",
"index",
"in",
"struct",
"array"
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLStructure.java#L80-L90 |
104,399 | diffplug/JMatIO | src/main/java/ca/mjdsystems/jmatio/types/MLStructure.java | MLStructure.getMaxFieldLenth | public int getMaxFieldLenth()
{
//get max field name
int maxLen = 0;
for ( String s : keys )
{
maxLen = s.length() > maxLen ? s.length() : maxLen;
}
return maxLen+1;
} | java | public int getMaxFieldLenth()
{
//get max field name
int maxLen = 0;
for ( String s : keys )
{
maxLen = s.length() > maxLen ? s.length() : maxLen;
}
return maxLen+1;
} | [
"public",
"int",
"getMaxFieldLenth",
"(",
")",
"{",
"//get max field name",
"int",
"maxLen",
"=",
"0",
";",
"for",
"(",
"String",
"s",
":",
"keys",
")",
"{",
"maxLen",
"=",
"s",
".",
"length",
"(",
")",
">",
"maxLen",
"?",
"s",
".",
"length",
"(",
... | Gets the maximum length of field descriptor
@return | [
"Gets",
"the",
"maximum",
"length",
"of",
"field",
"descriptor"
] | dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6 | https://github.com/diffplug/JMatIO/blob/dab8a54fa21a8faeaa81537cdc45323c5c4e6ca6/src/main/java/ca/mjdsystems/jmatio/types/MLStructure.java#L97-L107 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.