_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q153600 | HpelHelper.getBasicDateFormatter | train | static DateFormat getBasicDateFormatter() {
String pattern;
int patternLength;
int endOfSecsIndex;
// Retrieve a standard Java DateFormat object with desired format.
DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
if (formatter ... | java | {
"resource": ""
} |
q153601 | AdapterUtil.createXAException | train | public static XAException createXAException(String key, Object args, int xaErrorCode) {
XAException xaX = new XAException(
args == null ?
getNLSMessage(key) :
getNLSMessage(key, args));
xaX.errorCode... | java | {
"resource": ""
} |
q153602 | AdapterUtil.getConcurrencyModeString | train | public static String getConcurrencyModeString(int concurrency) {
switch (concurrency) {
case ResultSet.CONCUR_READ_ONLY:
return "CONCUR READ ONLY (" + concurrency + ')';
case ResultSet.CONCUR_UPDATABLE:
return "CONCUR UPDATABLE (" + concurrency + ')';
... | java | {
"resource": ""
} |
q153603 | AdapterUtil.getConnectionEventString | train | public static String getConnectionEventString(int eventID) {
switch (eventID) {
case ConnectionEvent.CONNECTION_CLOSED:
return "CONNECTION CLOSED (" + eventID + ')';
case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
return "LOCAL TRANSACTION STARTED (" ... | java | {
"resource": ""
} |
q153604 | AdapterUtil.getFetchDirectionString | train | public static String getFetchDirectionString(int direction) {
switch (direction) {
case ResultSet.FETCH_FORWARD:
return "FETCH FORWARD (" + direction + ')';
case ResultSet.FETCH_REVERSE:
return "FETCH REVERSE (" + direction + ')';
case Resu... | java | {
"resource": ""
} |
q153605 | AdapterUtil.getIsolationLevelString | train | public static String getIsolationLevelString(int level) {
switch (level) {
case Connection.TRANSACTION_NONE:
return "NONE (" + level + ')';
case Connection.TRANSACTION_READ_UNCOMMITTED:
return "READ UNCOMMITTED (" + level + ')';
case Connec... | java | {
"resource": ""
} |
q153606 | AdapterUtil.getNLSMessage | train | public static final String getNLSMessage(String key, Object... args) {
return Tr.formatMessage(tc, key, args);
} | java | {
"resource": ""
} |
q153607 | AdapterUtil.getResultSetTypeString | train | public static String getResultSetTypeString(int type) {
switch (type) {
case ResultSet.TYPE_FORWARD_ONLY:
return "TYPE FORWARD ONLY (" + type + ')';
case ResultSet.TYPE_SCROLL_INSENSITIVE:
return "TYPE SCROLL INSENSITIVE (" + type + ')';
ca... | java | {
"resource": ""
} |
q153608 | AdapterUtil.getSQLTypeString | train | public static String getSQLTypeString(int sqlType) {
switch (sqlType) {
case Types.ARRAY:
return "ARRAY (" + sqlType + ')';
case Types.BIGINT:
return "BIGINT (" + sqlType + ')';
case Types.BINARY:
return "BINARY (" + sqlType... | java | {
"resource": ""
} |
q153609 | AdapterUtil.getXAExceptionCodeString | train | public static String getXAExceptionCodeString(int code) {
// Note, two cases are commented out below. This is because in the implementation of
// XAException, they have defined two constants to be the same int (or so it would
// seem).
// This is because XA_RBBASE and XA_RBEND define ... | java | {
"resource": ""
} |
q153610 | AdapterUtil.getXAResourceEndFlagString | train | public static String getXAResourceEndFlagString(int flag) {
switch (flag) {
case XAResource.TMFAIL:
return "TMFAIL (" + flag + ')';
case XAResource.TMSUCCESS:
return "TMSUCCESS (" + flag + ')';
case XAResource.TMSUSPEND:
ret... | java | {
"resource": ""
} |
q153611 | AdapterUtil.getXAResourceRecoverFlagString | train | public static String getXAResourceRecoverFlagString(int flag) {
switch (flag) {
case XAResource.TMENDRSCAN:
return "TMENDRSCAN (" + flag + ')';
case XAResource.TMNOFLAGS:
return "TMNOFLAGS (" + flag + ')';
case XAResource.TMSTARTRSCAN:
... | java | {
"resource": ""
} |
q153612 | AdapterUtil.getXAResourceStartFlagString | train | public static String getXAResourceStartFlagString(int flag) {
switch (flag) {
case XAResource.TMJOIN:
return "TMJOIN (" + flag + ')';
case XAResource.TMNOFLAGS:
return "TMNOFLAGS (" + flag + ')';
case XAResource.TMRESUME:
re... | java | {
"resource": ""
} |
q153613 | AdapterUtil.getXAResourceVoteString | train | public static String getXAResourceVoteString(int vote) {
switch (vote) {
case XAResource.XA_OK:
return "XA_OK (" + vote + ')';
case XAResource.XA_RDONLY:
return "XA_RDONLY (" + vote + ')';
}
return "UNKNOWN XA RESOURCE VOTE (" + vote + ... | java | {
"resource": ""
} |
q153614 | AdapterUtil.notSupportedX | train | public static final SQLException notSupportedX(String operation, Throwable cause) {
SQLException sqlX = new SQLFeatureNotSupportedException(
getNLSMessage("FEATURE_NOT_IMPLEMENTED", operation));
if (cause != null)
sqlX.initCause(cause);
return sqlX;
} | java | {
"resource": ""
} |
q153615 | AdapterUtil.suppressBeginAndEndRequest | train | public static final void suppressBeginAndEndRequest() {
if (!warnedAboutBeginAndEndRequest) {
warnedAboutBeginAndEndRequest = true;
StringBuilder stack = new StringBuilder();
for (StackTraceElement frame : new Exception().getStackTrace())
stack.append(EOLN).a... | java | {
"resource": ""
} |
q153616 | AdapterUtil.translateSQLException | train | public static ResourceException translateSQLException(
SQLException se,
Object mapper,
boolean sendEvent,
... | java | {
"resource": ""
} |
q153617 | AdapterUtil.toSQLException | train | public static SQLException toSQLException(ResourceException resX)
{
if (tc.isEntryEnabled())
Tr.entry(tc, "toSQLException", resX);
SQLException sqlX = null;
for (Throwable linkedX = resX; linkedX != null; linkedX = getChainedException(linkedX)) {
if (linkedX instanc... | java | {
"resource": ""
} |
q153618 | AdapterUtil.toSQLException | train | public static SQLException toSQLException(Throwable ex) {
if (ex == null)
return null;
if (ex instanceof SQLException)
return (SQLException) ex;
if (ex instanceof ResourceException)
return toSQLException((ResourceException) ex);
// Link the origina... | java | {
"resource": ""
} |
q153619 | AdapterUtil.getStackTraceWithState | train | public static StringBuilder getStackTraceWithState(SQLException sqle) {
SQLException sqlX = sqle;
boolean isLinkedThrowable = false;
StringBuilder trace = new StringBuilder(EOLN);
SQLException tempSqlX;
do {
StringWriter s = new StringWriter();
PrintWri... | java | {
"resource": ""
} |
q153620 | AdapterUtil.getResultSetCloseString | train | public static String getResultSetCloseString(int value) {
switch (value) {
case Statement.CLOSE_ALL_RESULTS:
return "CLOSE ALL RESULTS (" + value + ')';
case Statement.CLOSE_CURRENT_RESULT:
return "CLOSE CURRENT RESULT (" + value + ')';
cas... | java | {
"resource": ""
} |
q153621 | AdapterUtil.getCursorHoldabilityString | train | public static String getCursorHoldabilityString(int value) {
switch (value) {
case ResultSet.CLOSE_CURSORS_AT_COMMIT:
return "CLOSE CURSORS AT COMMIT (" + value + ')';
case ResultSet.HOLD_CURSORS_OVER_COMMIT:
return "HOLD CURSORS OVER COMMIT (" + value +... | java | {
"resource": ""
} |
q153622 | AdapterUtil.getAutoGeneratedKeyString | train | public static String getAutoGeneratedKeyString(int autoGeneratedKey) {
switch (autoGeneratedKey) {
case Statement.NO_GENERATED_KEYS:
return "NO GENERATED KEYS (" + autoGeneratedKey + ')';
case Statement.RETURN_GENERATED_KEYS:
return "RETURN GENERATED KEY... | java | {
"resource": ""
} |
q153623 | AdapterUtil.mapSQLException | train | public static SQLException mapSQLException(SQLException se, Object mapper) {
return (SQLException) mapException(se, null, mapper, true);
} | java | {
"resource": ""
} |
q153624 | AdapterUtil.isUnsupportedException | train | public static boolean isUnsupportedException(SQLException sqle){
if(sqle instanceof SQLFeatureNotSupportedException)
return true;
String state = sqle.getSQLState() == null ? "" : sqle.getSQLState();
int code = sqle.getErrorCode();
return state.startsWith("0A") || 0x... | java | {
"resource": ""
} |
q153625 | RepositoryUtils.setLocale | train | public static void setLocale(Locale locale) {
if (RepositoryUtils.locale == null) {
RepositoryUtils.locale = locale;
} else {
if (RepositoryUtils.locale != locale) {
RepositoryUtils.locale = locale;
messages = null;
installMessages ... | java | {
"resource": ""
} |
q153626 | RepositoryUtils.getMessage | train | public static String getMessage(String key, Object... args) {
if (messages == null) {
if (locale == null)
locale = Locale.getDefault();
messages = ResourceBundle.getBundle("com.ibm.ws.install.internal.resources.Repository", locale);
}
String message = mess... | java | {
"resource": ""
} |
q153627 | RepositoryUtils.matchAppliesTo | train | public static boolean matchAppliesTo(String assetType, String assetName, String fileName, String appliesTo, String productId, String productVersion, String productInstallType,
String productLcenseType, String productEdition) {
if (appliesTo == null)
return tr... | java | {
"resource": ""
} |
q153628 | ConfigRESTHandler.getJSONValue | train | @Trivial // generates too much trace
private Object getJSONValue(Object value, Set<String> processed) throws IOException {
if (value instanceof String) {
String s = (String) value;
if (s.matches(".*_\\d+")) {
// If a value ends with _<numbers> assume it's a PID and tr... | java | {
"resource": ""
} |
q153629 | ConfigRESTHandler.getUID | train | @Trivial
private static final String getUID(String configDisplayId, String id) {
return id == null || configDisplayId.matches(".*/.*\\[.*\\].*") ? configDisplayId : id;
} | java | {
"resource": ""
} |
q153630 | JSPtoPRealization.reconstituteMQLink | train | private void reconstituteMQLink(int startMode) throws MessageStoreException, SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "reconstituteMQLink", new Object[] { Integer.valueOf(startMode), this });
int localisationCount = 0;
... | java | {
"resource": ""
} |
q153631 | JSPtoPRealization.reconstituteLocalQueuePoint | train | private void reconstituteLocalQueuePoint(int startMode,
boolean isSystem)
throws MessageStoreException, SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc,
... | java | {
"resource": ""
} |
q153632 | JSPtoPRealization.reconstituteRemoteQueuePoints | train | private void reconstituteRemoteQueuePoints(int startMode,
boolean isSystem)
throws SIDiscriminatorSyntaxException, MessageStoreException, SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibT... | java | {
"resource": ""
} |
q153633 | JSPtoPRealization.clearLocalisingUuidsSet | train | @Override
public void clearLocalisingUuidsSet()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "clearLocalisingUuidsSet", this);
_localisationManager.clearLocalisingUuidsSet();
_pToPLocalMsgsItemStream = null;
if (TraceComponent.... | java | {
"resource": ""
} |
q153634 | JSPtoPRealization.runtimeEventOccurred | train | @Override
public void runtimeEventOccurred(MPRuntimeEvent event)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "runtimeEventOccurred", new Object[] { event, this });
// A local q point, fire against the control adapter belonging to the
//... | java | {
"resource": ""
} |
q153635 | TickRange.isReallocationRequired | train | public boolean isReallocationRequired()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(this, tc, "isReallocationRequired");
SibTr.exit(tc, "isReallocationRequired", Boolean.valueOf(reallocateOnCommit));
}
return reallocateOnCommit;
} | java | {
"resource": ""
} |
q153636 | POP3Handler.println | train | public void println(final String str) throws IOException {
this.writer.print(str);
this.writer.print("\r\n");
this.writer.flush();
} | java | {
"resource": ""
} |
q153637 | POP3Handler.handleCommand | train | public void handleCommand() throws IOException {
this.currentLine = this.reader.readLine();
if (this.currentLine == null) {
LOGGER.severe("Current line is null!");
this.exit();
return;
}
final StringTokenizer st = new StringTokenizer(this.currentLine... | java | {
"resource": ""
} |
q153638 | POP3Handler.list | train | public void list() throws IOException {
this.writer.println("+OK");
this.writer.println("1 " + msg1.length());
this.writer.println("2 " + msg2.length());
this.println(".");
} | java | {
"resource": ""
} |
q153639 | POP3Handler.retr | train | public void retr(String arg) throws IOException {
String msg;
if (arg.equals("1"))
msg = msg1;
else
msg = msg2;
this.println("+OK " + msg.length() + " octets");
this.writer.write(msg);
this.println(".");
} | java | {
"resource": ""
} |
q153640 | POP3Handler.top | train | public void top(String arg) throws IOException {
String top;
if (arg.equals("1"))
top = top1;
else
top = top2;
this.println("+OK " + top.length() + " octets");
this.writer.write(top);
this.println(".");
} | java | {
"resource": ""
} |
q153641 | ParsedScheduleExpression.getFirstTimeout | train | public long getFirstTimeout()
{
long lastTimeout = Math.max(System.currentTimeMillis(), start); // d666295
// If we're already past the end date, then there is no timeout.
if (lastTimeout > end)
{
return -1;
}
return getTimeout(lastTimeout, false);
} | java | {
"resource": ""
} |
q153642 | ParsedScheduleExpression.createCalendar | train | private Calendar createCalendar(long time)
{
// The specification accounts for gregorian dates only.
Calendar cal = new GregorianCalendar(timeZone); // d639610
cal.setTimeInMillis(time);
return cal;
} | java | {
"resource": ""
} |
q153643 | ParsedScheduleExpression.advance | train | private static void advance(Calendar cal, int field, int nextField, long haystack, int needle)
{
long higher = higher(haystack, needle);
if (higher != 0)
{
cal.set(field, first(higher));
}
else
{
cal.set(field, first(haystack));
cal... | java | {
"resource": ""
} |
q153644 | ParsedScheduleExpression.advanceYear | train | private boolean advanceYear(Calendar cal, int year)
{
year = years.nextSetBit(year + 1 - ScheduleExpressionParser.MINIMUM_YEAR); // d665298
if (year >= 0)
{
cal.set(Calendar.YEAR, year + ScheduleExpressionParser.MINIMUM_YEAR); // d665298
return true;
}
... | java | {
"resource": ""
} |
q153645 | LumberjackClient.connect | train | public void connect(String hostName, int port) throws UnknownHostException, IOException {
if (!sslHelper.isSocketAvailable()) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
Tr.event(tc, "creating/recreating socket connection to " + hostName + ":" + port);
... | java | {
"resource": ""
} |
q153646 | LumberjackClient.isConnectionStale | train | public boolean isConnectionStale() {
if (lastUsedTime == 0)
return false;
long currentTime = System.currentTimeMillis();
long timeSinceLastUse = currentTime - lastUsedTime;
return (timeSinceLastUse > MAX_KEEPALIVE);
} | java | {
"resource": ""
} |
q153647 | LumberjackClient.writeWindowFrame | train | public void writeWindowFrame(int windowSize) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
output.write(PROTOCOL_VERSION.getBytes(UTF_8));//Protocol version
output.write(WINDOW_SIZE_FRAME_TYPE.getBytes(UTF_8)); //Frame type 'W'
output.write(ByteBuffer.... | java | {
"resource": ""
} |
q153648 | LumberjackClient.writeFrame | train | public void writeFrame(byte[] frame) throws IOException {
lastUsedTime = System.currentTimeMillis();
out.write(frame);
out.flush();
} | java | {
"resource": ""
} |
q153649 | LumberjackClient.readAckFrame | train | public void readAckFrame() throws IOException {
byte[] buffer = new byte[6];
int bytesReceived = 0;
while ((bytesReceived = bytesReceived + in.read(buffer, bytesReceived, buffer.length - bytesReceived)) != -1) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
... | java | {
"resource": ""
} |
q153650 | LumberjackClient.createDataFrames | train | public byte[] createDataFrames(List<Object> dataObjects) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
for (int i = 0; i < dataObjects.size(); i++) {
ByteArrayOutputStream dataObjectStream = new ByteArrayOutputStream();
@SuppressWarnings("unche... | java | {
"resource": ""
} |
q153651 | LumberjackClient.createCompressedFrame | train | public byte[] createCompressedFrame(byte[] dataFrames) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
output.write(dataFrames);
//Compress the bytes using zlib level 6
byte[] cBytes = new byte[output.size()];
deflater.setInput(output.toByteArray(... | java | {
"resource": ""
} |
q153652 | ValidationExtension.ensureFactoryValidator | train | private void ensureFactoryValidator(ClassLoader appCl) {
config.addProperty("bval.before.cdi", "true");
factory = BeanValidationExtensionHelper.validatorFactoryAccessorProxy(appCl);
if (appCl.toString().contains("com.ibm.ws.classloading.internal.AppClassLoader@")) {
instance().factor... | java | {
"resource": ""
} |
q153653 | ValidationExtension.inject | train | public static <T> Releasable<T> inject(final Class<T> clazz) {
try {
final BeanManager beanManager = CDI.current().getBeanManager();
if (beanManager == null) {
return null;
}
final AnnotatedType<T> annotatedType = beanManager.createAnnotatedType(cl... | java | {
"resource": ""
} |
q153654 | GenericKeys.getName | train | public String getName() {
if (null == this.name && null != this.byteArray) {
try {
this.name = new String(this.byteArray, HeaderStorage.ENGLISH_CHARSET);
} catch (UnsupportedEncodingException uee) {
// no FFDC required
// Invalid key name
... | java | {
"resource": ""
} |
q153655 | DB2iNativeHelper.isIsolationLevelSwitchingSupport | train | @Override
public boolean isIsolationLevelSwitchingSupport() {
// We assume that we are running on the local server so we can determine the os version
// Check that the OS is V5R3 or higher and set isolationLevelSwitchingSupported to true.
// Note: isolationLevelSwitchingSupport is defaulted... | java | {
"resource": ""
} |
q153656 | LogRepositorySpaceAlert.setRepositoryInfo | train | public synchronized void setRepositoryInfo(LogRepositoryManager manager, File repositoryLocation, long repositorySpaceNeeded) throws IllegalArgumentException {
if (manager == null) throw new IllegalArgumentException("Null manager passed to LogRepositorySpaceAlert.setRepositoryInfo") ;
if (repositoryLocation == nu... | java | {
"resource": ""
} |
q153657 | LogRepositorySpaceAlert.checkFileSystems | train | private synchronized void checkFileSystems() {
for(Entry<File, FileSystemInfo> fsEntry: fsInfo.entrySet()) {
if (fsEntry.getValue().processThisCycle()) {
long fsFreeSpace = AccessHelper.getFreeSpace(fsEntry.getKey()) ;
if (logger.isLoggable(Level.FINE)) {
logger.logp(Level.FINE, className, "checkFileS... | java | {
"resource": ""
} |
q153658 | ReflectionUtils.loadClassByName | train | public static Class<?> loadClassByName(String className) throws ClassNotFoundException {
try {
return Class.forName(className);
} catch (ClassNotFoundException e) {
return Thread.currentThread().getContextClassLoader().loadClass(className);
}
} | java | {
"resource": ""
} |
q153659 | ReflectionUtils.isOverriddenMethod | train | public static boolean isOverriddenMethod(Method methodToFind, Class<?> cls) {
Set<Class<?>> superClasses = new HashSet<>();
for (Class<?> class1 : cls.getInterfaces()) {
superClasses.add(class1);
}
if (cls.getSuperclass() != null) {
superClasses.add(cls.getSuperc... | java | {
"resource": ""
} |
q153660 | ReflectionUtils.getOverriddenMethod | train | public static Method getOverriddenMethod(Method method) {
Class<?> declaringClass = method.getDeclaringClass();
Class<?> superClass = declaringClass.getSuperclass();
Method result = null;
if (superClass != null && !(superClass.equals(Object.class))) {
result = findMethod(meth... | java | {
"resource": ""
} |
q153661 | ReflectionUtils.findMethod | train | public static Method findMethod(Method methodToFind, Class<?> cls) {
if (cls == null) {
return null;
}
String methodToSearch = methodToFind.getName();
Class<?>[] soughtForParameterType = methodToFind.getParameterTypes();
Type[] soughtForGenericParameterType = methodTo... | java | {
"resource": ""
} |
q153662 | ReflectionUtils.getAnnotation | train | public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationClass) {
A annotation = method.getAnnotation(annotationClass);
if (annotation == null) {
for (Annotation metaAnnotation : method.getAnnotations()) {
annotation = metaAnnotation.annotationTy... | java | {
"resource": ""
} |
q153663 | ReflectionUtils.getRepeatableAnnotations | train | public static <A extends Annotation> List<A> getRepeatableAnnotations(Method method, Class<A> annotationClass) {
A[] annotations = method.getAnnotationsByType(annotationClass);
if (annotations == null || annotations.length == 0) {
for (Annotation metaAnnotation : method.getAnnotations()) {
... | java | {
"resource": ""
} |
q153664 | ReflectionUtils.isVoid | train | public static boolean isVoid(Type type) {
final Class<?> cls = TypeFactory.defaultInstance().constructType(type).getRawClass();
return Void.class.isAssignableFrom(cls) || Void.TYPE.isAssignableFrom(cls);
} | java | {
"resource": ""
} |
q153665 | SSOAuthenticator.handleJwtSSO | train | private AuthenticationResult handleJwtSSO(HttpServletRequest req, HttpServletResponse res) {
String jwtCookieName = JwtSSOTokenHelper.getJwtCookieName();
if (jwtCookieName == null) { // jwtsso feature not active
return null;
}
String encodedjwtssotoken = ssoCookieHelper.getJ... | java | {
"resource": ""
} |
q153666 | SSOAuthenticator.isTokenLoggedOut | train | private boolean isTokenLoggedOut(String ltpaToken) {
boolean loggedOut = false;
Object entry = LoggedOutTokenCacheImpl.getInstance().getDistributedObjectLoggedOutToken(ltpaToken);
if (entry != null)
loggedOut = true;
return loggedOut;
} | java | {
"resource": ""
} |
q153667 | SSOAuthenticator.createAuthenticationData | train | private AuthenticationData createAuthenticationData(HttpServletRequest req, HttpServletResponse res, String token, String oid) {
AuthenticationData authenticationData = new WSAuthenticationData();
authenticationData.set(AuthenticationData.HTTP_SERVLET_REQUEST, req);
authenticationData.set(Authen... | java | {
"resource": ""
} |
q153668 | NativeMethodHelper.registerNatives | train | public static long registerNatives(Class<?> clazz, String nativeDescriptorName, Object[] extraInfo) {
if (!initialized) {
if (loadFailure != null) {
Error e = new UnsatisfiedLinkError();
e.initCause(loadFailure);
throw e;
} else {
... | java | {
"resource": ""
} |
q153669 | NativeMethodHelper.deregisterNatives | train | public static long deregisterNatives(long dllHandle, Class<?> clazz, String nativeDescriptorName, Object[] extraInfo) {
if (!initialized) {
if (loadFailure != null) {
Error e = new UnsatisfiedLinkError();
e.initCause(loadFailure);
throw e;
... | java | {
"resource": ""
} |
q153670 | HpelFormatter.getFormatter | train | public static HpelFormatter getFormatter(String formatStyle) {
if (formatStyle != null && !"".equals(formatStyle)) {
if (formatStyle.equalsIgnoreCase(FORMAT_BASIC)) {
return new HpelBasicFormatter();
} else if (formatStyle.equalsIgnoreCase(FORMAT_ADVANCED)) {
... | java | {
"resource": ""
} |
q153671 | HpelFormatter.addCustomLevel | train | public static void addCustomLevel(Level level, String id) {
if (level == null) {
throw new IllegalArgumentException("Parameter level can not be 'null' in this call");
}
if (id == null) {
id = level.getName().substring(0, 1);
}
customLevels.put(level, id);
... | java | {
"resource": ""
} |
q153672 | HpelFormatter.setCustomHeader | train | public void setCustomHeader(String[] header) {
if (header == null) {
throw new IllegalArgumentException("Custom header can't be null.");
}
customHeader = new CustomHeaderLine[header.length];
for (int i = 0; i < header.length; i++) {
customHeader[i] = new CustomHea... | java | {
"resource": ""
} |
q153673 | HpelFormatter.setTimeZoneID | train | public void setTimeZoneID(String timeZoneId) {
if (verifyTimeZoneID(timeZoneId)) {
this.timeZone = TimeZone.getTimeZone(timeZoneId);
} else {
throw new IllegalArgumentException(timeZoneId + " is not a valid time zone");
}
} | java | {
"resource": ""
} |
q153674 | HpelFormatter.formatUnlocalized | train | protected String formatUnlocalized(String traceString, Object[] parms) { // added for LIDB2667.13
//
// handle messages that require no localization (essentially trace)
//
// get ready to append parameters
Object[] newParms = convertParameters(parms); //D233515.1
if (ne... | java | {
"resource": ""
} |
q153675 | HpelFormatter.formatRecord | train | public String formatRecord(RepositoryLogRecord record) {
if (null == record) {
throw new IllegalArgumentException("Record cannot be null");
}
return formatRecord(record, (Locale) null);
} | java | {
"resource": ""
} |
q153676 | OSGiConfigUtils.getApplicationName | train | public static String getApplicationName(BundleContext bundleContext) {
String applicationName = null;
if (FrameworkState.isValid()) {
ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
if (cmd == null) {
/... | java | {
"resource": ""
} |
q153677 | OSGiConfigUtils.getBundleContext | train | public static BundleContext getBundleContext(Class<?> clazz) {
BundleContext context = null; //we'll return null if not running inside an OSGi framework (e.g. unit test)
if (FrameworkState.isValid()) {
Bundle bundle = FrameworkUtil.getBundle(clazz);
if (bundle != null) {
... | java | {
"resource": ""
} |
q153678 | OSGiConfigUtils.getService | train | public static <T> T getService(BundleContext bundleContext, Class<T> serviceClass) {
T service = null;
if (FrameworkState.isValid()) {
ServiceReference<T> ref = bundleContext.getServiceReference(serviceClass);
if (ref != null) {
service = bundleContext.getService... | java | {
"resource": ""
} |
q153679 | OSGiConfigUtils.getApplicationServiceRef | train | public static ServiceReference<Application> getApplicationServiceRef(BundleContext bundleContext, String applicationName) {
ServiceReference<Application> appRef = null;
if (FrameworkState.isValid()) {
Collection<ServiceReference<Application>> appRefs;
try {
appRe... | java | {
"resource": ""
} |
q153680 | OSGiConfigUtils.getApplicationPID | train | public static String getApplicationPID(BundleContext bundleContext, String applicationName) {
String applicationPID = null;
if (FrameworkState.isValid()) {
ServiceReference<?> appRef = getApplicationServiceRef(bundleContext, applicationName);
if (appRef != null) {
... | java | {
"resource": ""
} |
q153681 | OSGiConfigUtils.getCDIAppName | train | public static String getCDIAppName(BundleContext bundleContext) {
String appName = null;
if (FrameworkState.isValid()) {
// Get the CDIService
CDIService cdiService = getCDIService(bundleContext);
if (cdiService != null) {
appName = cdiService.getCurre... | java | {
"resource": ""
} |
q153682 | OSGiConfigUtils.isSystemKey | train | public static boolean isSystemKey(String key) {
for (String prefix : Config13Constants.SYSTEM_PREFIXES) {
if (key.startsWith(prefix)) {
return true;
}
}
return false;
} | java | {
"resource": ""
} |
q153683 | ChannelUtilsBase.traceChannels | train | protected final void traceChannels(Object logTool, ChannelFramework cfw, String message, String prefix) {
if (cfw == null) {
debugTrace(logTool, prefix + " - No cfw to trace channels");
return;
}
List<?> lchannel;
Iterator<?> ichannel;
ChannelData channe... | java | {
"resource": ""
} |
q153684 | Flow.getTransitionElements | train | @Generated(value = "com.ibm.jtc.jax.tools.xjc.Driver", date = "2014-06-11T05:49:00-04:00", comments = "JAXB RI v2.2.3-11/28/2011 06:21 AM(foreman)-")
public List<TransitionElement> getTransitionElements() {
if (transitionElements == null) {
transitionElements = new ArrayList<TransitionElement>()... | java | {
"resource": ""
} |
q153685 | DropinMonitor.refresh | train | public synchronized void refresh(ApplicationMonitorConfig config) {
if (config != null && config.isDropinsMonitored()) {
//ApplicationMonitorConfig prevConfig = _config.getAndSet(config);
_config.set(config);
// keep track of the old monitored directory to see if we need to ... | java | {
"resource": ""
} |
q153686 | DropinMonitor.stop | train | public synchronized void stop() {
_coreMonitor.unregister();
for (ServiceReg<FileMonitor> reg : _monitors.values()) {
reg.unregister();
}
_monitors.clear();
// Tidy up old location if we built it
tidyUpMonitoredDirectory(createdMonitoredDir.get(), monitore... | java | {
"resource": ""
} |
q153687 | DropinMonitor.stopApplication | train | private void stopApplication(File currentFile) {
if (_tc.isEventEnabled()) {
Tr.event(_tc, "Stopping dropin application '" + currentFile.getName() + "'");
}
String filePath = getAppLocation(currentFile);
try {
Configuration config = _configs.remove(filePath);
... | java | {
"resource": ""
} |
q153688 | DropinMonitor.getAppMessageHelper | train | private AppMessageHelper getAppMessageHelper(String type, String fileName) {
if (type == null && fileName != null) {
String[] parts = fileName.split("[\\\\/]");
if (parts.length > 0) {
String last = parts[parts.length - 1];
int dot = last.indexOf('.');
... | java | {
"resource": ""
} |
q153689 | DropinMonitor.startApplication | train | private void startApplication(File currentFile, String type) {
if (_tc.isEventEnabled()) {
Tr.event(_tc, "Starting dropin application '" + currentFile.getName() + "'");
}
String filePath = getAppLocation(currentFile);
try {
Configuration config = _configs.get(fil... | java | {
"resource": ""
} |
q153690 | InterceptorMetaDataHelper.populateInterceptorMethodMap | train | private static void
populateInterceptorMethodMap
(Class<?> c
, LinkedList<Class<?>> lifoClasses
, InterceptorMethodKind kind
, Class<?>[] parmTypes
, List<? extends InterceptorCallback> methodMeta... | java | {
"resource": ""
} |
q153691 | InterceptorMetaDataHelper.getLIFOMethodList | train | public static LinkedList<Method>
getLIFOMethodList(List<Method> methodList, LinkedList<Class<?>> lifoSuperClassesList)
{
// Create LinkedList to be returned.
LinkedList<Method> sortedList = new LinkedList<Method>();
// For each Class object in sorted list of super classe... | java | {
"resource": ""
} |
q153692 | InterceptorMetaDataHelper.findMethod | train | public static Method findMethod(final Class<?> c, String methodName, final Class<?>[] parmTypes)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
Tr.entry(tc, "findMethod", new Object[] { c, methodName, Arrays.toString(parmTypes) });
}
// Start with s... | java | {
"resource": ""
} |
q153693 | InterceptorMetaDataHelper.getLIFOSuperClassesList | train | public static LinkedList<Class<?>> getLIFOSuperClassesList(Class<?> interceptorClass)
{
LinkedList<Class<?>> supers = new LinkedList<Class<?>>();
supers.addFirst(interceptorClass);
Class<?> interceptorSuperClass = interceptorClass.getSuperclass();
while (interceptorSuperClass != null... | java | {
"resource": ""
} |
q153694 | InterceptorMetaDataHelper.validateAroundSignature | train | public static void validateAroundSignature(InterceptorMethodKind kind, Method m, J2EEName name)
throws EJBConfigurationException
{
// Get the modifers for the interceptor method and verify that the
// method is neither final nor static as required by EJB specification.
i... | java | {
"resource": ""
} |
q153695 | InterceptorMetaDataHelper.validateLifeCycleSignatureExceptParameters | train | static void validateLifeCycleSignatureExceptParameters(InterceptorMethodKind kind,
String lifeCycle, Method m,
boolean ejbClass,
J2EEName name,... | java | {
"resource": ""
} |
q153696 | InterceptorMetaDataHelper.isMethodOverridden | train | public static boolean isMethodOverridden(Method m, LinkedList<Class<?>> supers)
{
// Only check non-private methods for an override.
int methodModifier = m.getModifiers();
if (!Modifier.isPrivate(methodModifier))
{
// Not a private method, so we need to check if it is ove... | java | {
"resource": ""
} |
q153697 | SelfExtract.createExtractor | train | protected static ReturnCode createExtractor() {
if (!extractorCreated) {
createExtractor_rc = SelfExtractor.buildInstance();
extractor = SelfExtractor.getInstance();
extractorCreated = true;
}
return createExtractor_rc;
} | java | {
"resource": ""
} |
q153698 | UTF8Reader.expectedByte | train | private void expectedByte(int position, int count)
throws UTFDataFormatException {
String msg = JspCoreException.getMsg("jsp.error.xml.expectedByte", new Object[] {Integer.toString(position), Integer.toString(count)});
throw new UTFDataFormatException(msg);
} | java | {
"resource": ""
} |
q153699 | UTF8Reader.invalidByte | train | private void invalidByte(int position, int count, int c)
throws UTFDataFormatException {
String msg = JspCoreException.getMsg("jsp.error.xml.invalidByte", new Object[] {Integer.toString(position), Integer.toString(count)});
throw new UTFDataFormatException(msg);
} | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.