_id
stringlengths
2
7
title
stringlengths
3
140
partition
stringclasses
3 values
text
stringlengths
73
34.1k
language
stringclasses
1 value
meta_information
dict
q152600
JaxbToolsUtil.formatMessage
train
public static String formatMessage(String msgKey) { String msg; try { msg = JaxbToolsConstants.messages.getString(msgKey); } catch (Exception ex) { // no FFDC required return msgKey; } return msg; }
java
{ "resource": "" }
q152601
SibRaManagedConnection.destroy
train
public void destroy() throws ResourceException { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "destroy"); } // In the event of an error the connection manager may call destroy // without calling cleanup. We need to do the cl...
java
{ "resource": "" }
q152602
SibRaManagedConnection.cleanup
train
public void cleanup() throws ResourceException { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "cleanup"); } // Invalidate any currently associated connections for (Iterator iterator = _connections.iterator(); iterator.hasNex...
java
{ "resource": "" }
q152603
SibRaManagedConnection.associateConnection
train
public void associateConnection(final Object connection) throws ResourceAdapterInternalException { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "associateConnection", connection); } if (connection instanceof SibRaConnect...
java
{ "resource": "" }
q152604
SibRaManagedConnection.addConnectionEventListener
train
public void addConnectionEventListener( final ConnectionEventListener listener) { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "addConnectionEventListener", listener); } _eventListeners.add(listener); if (TraceC...
java
{ "resource": "" }
q152605
SibRaManagedConnection.getMetaData
train
public ManagedConnectionMetaData getMetaData() { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "getMetaData"); } if (_metaData == null) { _metaData = new SibRaMetaData(); } if (TraceComponent.isAnyTracin...
java
{ "resource": "" }
q152606
SibRaManagedConnection.dissociateConnections
train
public void dissociateConnections() { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "dissociateConnections"); } for (Iterator iterator = _connections.iterator(); iterator.hasNext();) { final SibRaConnection connection = ...
java
{ "resource": "" }
q152607
SibRaManagedConnection.getContainerTransaction
train
SITransaction getContainerTransaction( final ConnectionManager connectionManager) throws ResourceException { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "getContainerTransaction", connectionManager); } ...
java
{ "resource": "" }
q152608
SibRaManagedConnection.getCurrentTransaction
train
private SITransaction getCurrentTransaction() { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "getCurrentTransaction"); } SITransaction currentTransaction = null; // Is there a current local transaction? if (_localT...
java
{ "resource": "" }
q152609
SibRaManagedConnection.localTransactionStarted
train
void localTransactionStarted(final SibRaConnection connection) { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "localTransactionStarted", connection); } final ConnectionEvent event = new ConnectionEvent(this, Connecti...
java
{ "resource": "" }
q152610
SibRaManagedConnection.localTransactionRolledBack
train
void localTransactionRolledBack(final SibRaConnection connection) { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "localTransactionRolledBack", connection); } final ConnectionEvent event = new ConnectionEvent(this, Co...
java
{ "resource": "" }
q152611
SibRaManagedConnection.connectionClosed
train
void connectionClosed(final SibRaConnection connection) { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, "connectionClosed", connection); } final ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNEC...
java
{ "resource": "" }
q152612
SibRaManagedConnection.connectionErrorOccurred
train
final void connectionErrorOccurred(final Exception exception, boolean callJCAListener) { final String methodName = "connectionErrorOccurred"; if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, methodName, new Object[] {exception, Boolean.valueOf(c...
java
{ "resource": "" }
q152613
ModuleConfigParser.main
train
public static void main(String[] args) throws Exception { ModuleConfigParser mParser = new ModuleConfigParser(); mParser.parse("/com/ibm/websphere/pmi/custom/test/PmiServletModule1.xml", true); }
java
{ "resource": "" }
q152614
HttpServiceContainer.activate
train
protected void activate(ComponentContext context) throws Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(this, tc, "Activating"); } processConfig(context.getProperties()); SystemLogger.setLogService(logService); }
java
{ "resource": "" }
q152615
HttpServiceContainer.deactivate
train
protected void deactivate(ComponentContext context, int reason) throws Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(this, tc, "Deactivating, reason=" + reason); } this.registry.removeAll(); }
java
{ "resource": "" }
q152616
HttpServiceContainer.setVirtualHost
train
protected synchronized void setVirtualHost(VirtualHost virtualHost) { this.virtualHost = virtualHost; if (!activeContextRoots.isEmpty()) { for (String contextRoot : activeContextRoots) { virtualHost.addContextRoot(contextRoot, this); } } if (TraceC...
java
{ "resource": "" }
q152617
InfoVisitor.visitAnnotation
train
@Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { AnnotationInfoVisitor av = visitAnnotation(getInfo(), desc, visible); annotationInfos.add(av.getAnnotationInfo()); return av; }
java
{ "resource": "" }
q152618
SocketFactoryHelper.init
train
@FFDCIgnore({ UnknownEncoding.class, InvalidName.class }) @Override public void init(ORB orb, String configName) { this.orb = orb; try { this.codec = CodecFactoryHelper.narrow(orb.resolve_initial_references("CodecFactory")).create_codec(CDR_1_2_ENCODING); } catch (UnknownEnco...
java
{ "resource": "" }
q152619
HttpResponseImpl.init
train
public void init(HttpInboundServiceContext context) { this.isc = context; this.message = context.getResponse(); this.body = null; }
java
{ "resource": "" }
q152620
TokenManagerImpl.getTokenServiceForType
train
private TokenService getTokenServiceForType(String tokenType) { TokenService service = services.getService(tokenType); if (service != null) { return service; } else { Tr.error(tc, "TOKEN_SERVICE_CONFIG_ERROR_NO_SUCH_SERVICE_TYPE", tokenType); String formattedM...
java
{ "resource": "" }
q152621
BufferDump.formatLineId
train
static private StringBuilder formatLineId(StringBuilder buffer, int value) { char[] chars = new char[4]; for (int i = 3; i >= 0; i--) { chars[i] = (char) HEX_BYTES[(value % 16) & 0xF]; value >>= 4; } return buffer.append(chars); }
java
{ "resource": "" }
q152622
JFapChannelOutbound.update
train
public void update(ChannelData cc) // F177053 { if (tc.isEntryEnabled()) SibTr.entry(this, tc, "update", cc); // F177053 // TODO: decide what to do if we are notified our configuration has changed. if (tc.isEntryEnabled()) SibTr.exit(this, tc, "update"); // F177053 this.chfwConfig=cc; }
java
{ "resource": "" }
q152623
BufferedServletOutputStream.write
train
public void write(int b) throws IOException { //PK89810, If WCCustomProperties.FINISH_RESPONSE_ON_CLOSE is set and stream is already obtained and closed. // User will not be allowed to write more data if the above case is met, outputstreamClosed will be true and default is false. if (!(WCCustomProperties.FINISH...
java
{ "resource": "" }
q152624
BufferedServletOutputStream.write
train
public void write(byte[] b, int off, int len) throws IOException { //PK89810, If WCCustomProperties.FINISH_RESPONSE_ON_CLOSE is set and stream is already obtained and closed. // User will not be allowed to write more data if the above case is met, outputstreamClosed will be true and default is false. if (!(WCCu...
java
{ "resource": "" }
q152625
BufferedServletOutputStream.flushBytes
train
private void flushBytes() throws IOException { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"flushBytes", "flushBytes"); } if (!committed) { if (!_hasFlushed && obs != null) { _hasFlushed = true; ...
java
{ "resource": "" }
q152626
ExtendedJTATransactionFactory.getObjectInstance
train
@Override public Object getObjectInstance(Object refObj, Name name, Context nameCtx, Hashtable env) throws Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "getObjectInstance", "" + name); } ExtendedJTATransaction extJTATran = null; ...
java
{ "resource": "" }
q152627
ExtendedJTATransactionFactory.getExtendedJTATransaction
train
public static ExtendedJTATransaction getExtendedJTATransaction() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "getExtendedJTATransaction", instance); } return instance; }
java
{ "resource": "" }
q152628
IntArray.add
train
public void add(int anInt) { if (tc.isEntryEnabled()) SibTr.entry(tc, "add"); if (tc.isDebugEnabled()) SibTr.debug(tc, "Params: int", anInt); // Have we filled up the current array? if (currentCursor == arraySize) { // Stash it in the Vector ...
java
{ "resource": "" }
q152629
IntArray.get
train
public int get(int index) throws NoSuchElementException { if (tc.isEntryEnabled()) SibTr.entry(tc, "get"); int retValue = 0; // We need to work out which array this item will be in int arrayNumber = index / arraySize; // Bounds check if ((index + 1) > eleme...
java
{ "resource": "" }
q152630
IntArray.length
train
public int length() { if (tc.isEntryEnabled()) SibTr.entry(tc, "length"); if (tc.isDebugEnabled()) SibTr.debug(tc, "rc=", elements); if (tc.isEntryEnabled()) SibTr.exit(tc, "length"); return elements; }
java
{ "resource": "" }
q152631
CFEndPointImpl.determineChannelAccessor
train
private void determineChannelAccessor() throws ChannelFrameworkException, ChannelFactoryException { // Extract the factory class from the application side channel definition. OutboundChannelDefinition first = this.outboundChannelDefs.getFirst(); Class<?> factoryClass = first.getOutboundFactory()...
java
{ "resource": "" }
q152632
CFEndPointImpl.determineIsSSLEnabled
train
private void determineIsSSLEnabled() { // Loop through each channel in the outbound chain represented by this // endpoint int i = 0; for (OutboundChannelDefinition def : this.outboundChannelDefs) { // Look for the SSL channel factory. if (SSLChannelFactory.class.i...
java
{ "resource": "" }
q152633
CFEndPointImpl.determineIsLocal
train
private void determineIsLocal() { // Loop through each channel in the outbound chain represented by this // endpoint int i = 0; for (OutboundChannelDefinition def : this.outboundChannelDefs) { if (LocalChannelFactory.class.isAssignableFrom(def.getOutboundFactory())) { ...
java
{ "resource": "" }
q152634
CFEndPointImpl.assignAddress
train
private void assignAddress(String addressString) throws ChannelFrameworkException, UnknownHostException { if (addressString == null) { // No address found in properties. No CFEndPoint can be created. throw new ChannelFrameworkException("No address available in properties."); } ...
java
{ "resource": "" }
q152635
CounterKeyFactory.generateKey
train
@Override public Integer generateKey(FacesContext facesContext) { ExternalContext externalContext = facesContext.getExternalContext(); Object sessionObj = externalContext.getSession(true); Integer sequence = null; // synchronized to increase sequence if multiple requests ...
java
{ "resource": "" }
q152636
StatefulSessionActivationStrategy.cacheInsert
train
private void cacheInsert(MasterKey key, StatefulBeanO sfbean) { CacheElement cacheElement = cache.insert(key, sfbean); sfbean.ivCacheElement = cacheElement; sfbean.ivCacheKey = key; if (!sfbean.getHome().getBeanMetaData().isPassivationCapable()) { cache.markElementEvictionIn...
java
{ "resource": "" }
q152637
StatefulSessionActivationStrategy.atPassivate
train
@Override public void atPassivate(BeanId beanId) throws RemoteException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "atPassivate " + beanId); BeanO bean = null; MasterKey key = new MasterKey(bea...
java
{ "resource": "" }
q152638
DelegatingBatchArtifactFactoryImpl.setCDIBatchArtifactFactory
train
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) protected void setCDIBatchArtifactFactory(CDIBatchArtifactFactory preferredArtifactFactory) { this.cdiBatchArtifactFactory = preferredArtifactFactory; }
java
{ "resource": "" }
q152639
AnnotationInfoImpl.addAnnotationValue
train
public AnnotationValueImpl addAnnotationValue(String name, Object value) { AnnotationValueImpl annotationValue = new AnnotationValueImpl(value); addAnnotationValue(name, annotationValue); return annotationValue; }
java
{ "resource": "" }
q152640
AnnotationInfoImpl.addAnnotationValue
train
public AnnotationValueImpl addAnnotationValue(String name, String enumClassName, String enumName) { AnnotationValueImpl annotationValue = new AnnotationValueImpl(enumClassName, enumName); addAnnotationValue(name, annotationValue); return annotationValue; }
java
{ "resource": "" }
q152641
AnnotationInfoImpl.log
train
@Trivial public void log(TraceComponent logger) { Tr.debug(logger, MessageFormat.format("Annotation [ {0} ]", getAnnotationClassName())); // Only log the non-defaulted values. for (String valueName : this.values.keySet()) { AnnotationValueImpl nextValue = getValue(valueName); ...
java
{ "resource": "" }
q152642
WSJobRepositoryImpl.updateJobExecutionAndInstanceNotSetToServerYet
train
@Override public WSJobExecution updateJobExecutionAndInstanceNotSetToServerYet( long jobExecutionId, Date date) throws ExecutionAssignedToServerException { return updateJobExecutionAndInstanceOnStopBeforeServerAssigned(jobExecutionId, ...
java
{ "resource": "" }
q152643
ValidationConfigurator.setupData
train
private void setupData(ValidationConfig config, ClassLoader classLoader) { // A config object is always used to use a common code path, so the parsed // ValidationConfig may be null if a validation.xml wasn't found. if (config != null) { versionID = config.getVersionID(); ...
java
{ "resource": "" }
q152644
ValidationConfigurator.loadClass
train
protected Class<?> loadClass(String className) throws ClassNotFoundException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "loadClass", className); } Class<?> theClass = null; try { if (appClassloader != null) { ...
java
{ "resource": "" }
q152645
PoolManager.checkForConnectionInFreePool
train
private void checkForConnectionInFreePool(MCWrapper mcw) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(this, tc, "checkForConnectionInFreePool"); } int hashMapBucket = mcw.getHashMapBucket(); /* * Attempt to remove the mcw from the fr...
java
{ "resource": "" }
q152646
PoolManager.checkForActiveConnections
train
private boolean checkForActiveConnections(int value) { /* * Check for active connections in the SharedPool */ boolean activeConnections = false; /* * We have active connections or active pool requests if active requests * > 0 or the pool state is not = 1. In ...
java
{ "resource": "" }
q152647
PoolManager.startReclaimConnectionThread
train
protected void startReclaimConnectionThread() { if (tc.isEntryEnabled()) { Tr.entry(this, tc, "startReclaimConnectionThread"); } //long reapTime; synchronized (taskTimerLockObject) { if (!reaperThreadStarted) { if (reapTime > 0) { ...
java
{ "resource": "" }
q152648
PoolManager.needToReclaimConnections
train
private boolean needToReclaimConnections() { boolean removemcw = false; for (int j = 0; j < maxFreePoolHashSize; ++j) { synchronized (freePool[j].freeConnectionLockObject) { int localtotalConnectionCount = totalConnectionCount.get(); int mcwlSize = freePool[j]...
java
{ "resource": "" }
q152649
PoolManager.computeHashCode
train
protected final int computeHashCode(Subject subject, ConnectionRequestInfo cri) { final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled(); if (isTracingEnabled && tc.isEntryEnabled()) { Tr.entry(this, tc, "computeHashCode"); } if (isTracingEnabled && tc.isDeb...
java
{ "resource": "" }
q152650
PoolManager.getMCWFromMctoMCWMap
train
public Object getMCWFromMctoMCWMap(Object mc) { Object mcw = null; mcToMCWMapRead.lock(); try { mcw = mcToMCWMap.get(mc); } finally { mcToMCWMapRead.unlock(); } return mcw; }
java
{ "resource": "" }
q152651
PoolManager.putMcToMCWMap
train
public void putMcToMCWMap(ManagedConnection mc, MCWrapper mcw) { mcToMCWMapWrite.lock(); try { mcToMCWMap.put(mc, mcw); } finally { mcToMCWMapWrite.unlock(); } }
java
{ "resource": "" }
q152652
PoolManager.removeMcToMCWMap
train
public void removeMcToMCWMap(Object mc) { if (tc.isEntryEnabled()) { Tr.entry(this, tc, "removeMcToMCWMap"); } mcToMCWMapWrite.lock(); try { mcToMCWMap.remove(mc); } finally { mcToMCWMapWrite.unlock(); } if (tc.isDebugEnabled())...
java
{ "resource": "" }
q152653
PoolManager.run
train
@Override public void run() { final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled(); if (isTracingEnabled && tc.isEntryEnabled()) { Tr.entry(this, tc, "run", "alarm"); } if (isTracingEnabled && tc.isDebugEnabled()) { Tr.debug(this, tc, "run:...
java
{ "resource": "" }
q152654
PoolManager.createReaperAlarm
train
private void createReaperAlarm() { final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled(); if (pmQuiesced) { if (isTracingEnabled && tc.isDebugEnabled()) Tr.debug(tc, " PM has been Quiesced, so cancel old reaper alarm."); if (am != null) ...
java
{ "resource": "" }
q152655
TrConfigurator.setTraceSpec
train
synchronized static TraceSpecification setTraceSpec(String spec) { // If logger is used & configured by logger properties, // we're done as far as trace string processing is concerned if (WsLogManager.isConfiguredByLoggingProperties()) { return null; } // If the spe...
java
{ "resource": "" }
q152656
LinkedList.insert
train
protected Link insert(Token newToken, Link insertPoint, Transaction transaction) throws ObjectManagerException { final String methodName = "insert"; if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace....
java
{ "resource": "" }
q152657
LinkedList.undoAdd
train
void undoAdd(Link newLink) throws ObjectManagerException { final String methodName = "undoAdd"; if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, methodName, new Object[] { newLink }); // Detach this Link from the list. ...
java
{ "resource": "" }
q152658
LinkedList.unRemove
train
private synchronized void unRemove(Link link) throws StateErrorException, ObjectManagerException { // Make the link visible again. link.setState(Link.nextStateForRequestUnDelete); availableHead = head; skipToBeDeleted(); if (link.state == Link.stateAdded) { ...
java
{ "resource": "" }
q152659
LinkedList.nextLink
train
protected Link nextLink(Link start, Transaction transaction, long transactionUnlockPoint) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, ...
java
{ "resource": "" }
q152660
LinkedList.previousLink
train
protected Link previousLink(Link start, Transaction transaction, long transactionUnlockPoint) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass...
java
{ "resource": "" }
q152661
LinkedList.nextLink
train
protected Link nextLink(Link start) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, "nextLink", new Object[] { start }); Token nextToken = null; ...
java
{ "resource": "" }
q152662
LinkedList.previousLink
train
protected Link previousLink(Link start) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, "previousLink", new Object[] { start }); Token previousToke...
java
{ "resource": "" }
q152663
LinkedList.firstAvailableLink
train
protected Link firstAvailableLink() throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, "firstAvailableLink"); if (availableHead == null) { availableHead = head; ...
java
{ "resource": "" }
q152664
LinkedList.skipToBeDeleted
train
protected void skipToBeDeleted() throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, "skipToBeDeleted"); Token nextToken = availableHead; // Move forward past any link...
java
{ "resource": "" }
q152665
LinkedList.validate
train
public synchronized boolean validate(java.io.PrintStream printStream) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, "validate", new...
java
{ "resource": "" }
q152666
LinkedList.reserveSpaceInStore
train
void reserveSpaceInStore(ObjectManagerByteArrayOutputStream byteArrayOutputStream) throws ObjectManagerException { // During recovery we use the defeault mechanism because we have not pre-reserved the space, // store full exceptions are supressed during recovery. if (owningT...
java
{ "resource": "" }
q152667
ProductMatch.versionSatisfiesMinimum
train
public static boolean versionSatisfiesMinimum(int[] minimumVersion, int[] queryVersion) { if (minimumVersion.length == queryVersion.length) { for (int i = 0; i < minimumVersion.length; i++) { //Start at most significant digit if (queryVersion[i] < minimumVersion[i]) {...
java
{ "resource": "" }
q152668
ProtocolItemStream.getDestinationHandler
train
public BaseDestinationHandler getDestinationHandler() { if (tc.isEntryEnabled()) { SibTr.entry(tc, "getDestinationHandler"); SibTr.exit(tc, "getDestinationHandler", destinationHandler); } return destinationHandler; }
java
{ "resource": "" }
q152669
WebAppJaccAuthorizationHelper.authorize
train
@Override public boolean authorize(AuthenticationResult authResult, WebRequest webRequest, String uriName) { HttpServletRequest req = webRequest.getHttpServletRequest(); boolean isAuthorized = jaccServiceRef.getService().isAuthorized(getApplicationName(), getModuleName(), uriName, req.getMethod(), r...
java
{ "resource": "" }
q152670
RRSLocalTransactionWrapper.addSync
train
@Override public boolean addSync() throws ResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(this, tc, "addSync"); } UOWCoordinator uowCoord = mcWrapper.getUOWCoordinator(); if (uowCoord == null) { // No transac...
java
{ "resource": "" }
q152671
UIInput.shouldInterpretEmptyStringSubmittedValuesAsNullClearInput
train
private boolean shouldInterpretEmptyStringSubmittedValuesAsNullClearInput(FacesContext context) { ExternalContext ec = context.getExternalContext(); // parses the web.xml to get the // "org.apache.myfaces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL_CLEAR_INPUT" value String par...
java
{ "resource": "" }
q152672
UIInput.isValid
train
@JSFProperty(defaultValue = "true", tagExcluded = true) public boolean isValid() { Object value = getStateHelper().get(PropertyKeys.valid); if (value != null) { return (Boolean) value; } return true; }
java
{ "resource": "" }
q152673
UIInput._getDebugInfoMap
train
@SuppressWarnings("unchecked") private Map<String, List<Object[]>> _getDebugInfoMap() { Map<String, Object> requestMap = getFacesContext() .getExternalContext().getRequestMap(); Map<String, List<Object[]>> debugInfo = (Map<String, List<Object[]>>) requestMap.get(...
java
{ "resource": "" }
q152674
UIInput._getFieldDebugInfos
train
private List<Object[]> _getFieldDebugInfos(final String field) { Map<String, List<Object[]>> debugInfo = _getDebugInfoMap(); List<Object[]> fieldDebugInfo = debugInfo.get(field); if (fieldDebugInfo == null) { // no field debug-infos yet, create them and store it in the Ma...
java
{ "resource": "" }
q152675
UIInput._createFieldDebugInfo
train
private void _createFieldDebugInfo(FacesContext facesContext, final String field, Object oldValue, Object newValue, final int skipStackTaceElements) { if (oldValue == null && newValue == null) { // both values are null, not interesting and can // happ...
java
{ "resource": "" }
q152676
BundleArchive.getBundleEntry
train
@FFDCIgnore(IllegalStateException.class) public URL getBundleEntry(Bundle bundleToTest, String pathAndName) { try { URL bundleEntry = bundleToTest.getEntry(pathAndName); /* * Defect 54588 discovered that if a directory does not have a zip entry then calling getEntry wil...
java
{ "resource": "" }
q152677
PubSubMessageItemStream.isRemoteQueueHighLimit
train
public boolean isRemoteQueueHighLimit() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "isRemoteQueueHighLimit"); boolean limited = false; if (_destHighMsgs != -1) { limited = (getTotalMsgCount() >= _remoteQueueHighLimit);...
java
{ "resource": "" }
q152678
PubSubMessageItemStream.countAvailablePublications
train
public long countAvailablePublications() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "countAvailablePublications"); int subs = destinationHandler.getSubscriptionIndex().getTotalSubscriptions(); // Need to compensate for subscription refere...
java
{ "resource": "" }
q152679
PubSubMessageItemStream.removeAllItemsWithNoRefCount
train
public boolean removeAllItemsWithNoRefCount(Transaction tran) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removeAllItemsWithNoRefCount", tran); Item item = null; boolean deletedItems = false; try ...
java
{ "resource": "" }
q152680
DatabaseStoreImpl.createTables
train
private void createTables(PersistenceServiceUnit persistenceServiceUnit) throws Exception { // Run under a new transaction and commit right away LocalTransactionCurrent localTranCurrent = this.localTranCurrent; LocalTransactionCoordinator suspendedLTC = localTranCurrent.suspend(); Embedd...
java
{ "resource": "" }
q152681
DatabaseStoreImpl.getDatabaseProductName
train
private String getDatabaseProductName(WSDataSource dataSource) throws Exception { String dbProductName = dataSource.getDatabaseProductName(); if (dbProductName == null) { // Query the metadata under a new transaction and commit right away LocalTransactionCurrent localTranCurrent ...
java
{ "resource": "" }
q152682
DatabaseStoreImpl.setAuthData
train
@Reference(service = AuthData.class, cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.STATIC, target = "(id=unbound)", policyOption = ReferencePolicyOption.GREEDY) protected void setAuthData(ServiceReference<AuthData> ref) { au...
java
{ "resource": "" }
q152683
DatabaseStoreImpl.setNonJTADataSourceFactory
train
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.STATIC, policyOption = ReferencePolicyOption.GREEDY, target = "(id=unbound)") protected void setNonJTADataSourceFactory(ResourceFactory svc) { nonJTADataSourceFactory = svc; }
java
{ "resource": "" }
q152684
ContextManagerImpl.findConflictingProvider
train
private ThreadContextProvider findConflictingProvider(ThreadContextProvider provider, ClassLoader classloader) { String conflictingType = provider.getThreadContextType(); for (ThreadContextProvider p : ServiceLoader.load(ThreadContextProvider.class, classloader)) { if (conflictingType.equals...
java
{ "resource": "" }
q152685
ContextManagerImpl.getDefault
train
<T> T getDefault(String mpConfigPropName, T defaultValue) { MPConfigAccessor accessor = cmProvider.mpConfigAccessor; if (accessor != null) { Object mpConfig = mpConfigRef.get(); if (mpConfig == Boolean.FALSE) // not initialized yet if (!mpConfigRef.compareAndSet(B...
java
{ "resource": "" }
q152686
WARDeployedAppInfoFactoryImpl.getUpdatedStamp
train
private static Long getUpdatedStamp(String absPath, File file) { String methodName = "getUpdatedStamp"; boolean doDebug = tc.isDebugEnabled(); Long currentStamp = Long.valueOf( file.lastModified() ); Long newStamp; String newStampReason = null; synchronized ( expansion...
java
{ "resource": "" }
q152687
SafeTraceLevelIndexFactory.createPackageIndex
train
public static PackageIndex<Integer> createPackageIndex(String resourceName) { PackageIndex<Integer> packageIndex = new PackageIndex<Integer>(); BufferedReader br = null; try { br = getLibertyTraceListReader(resourceName); addFiltersAndValuesToIndex(br, packageIndex); ...
java
{ "resource": "" }
q152688
BinaryLogRecordSerializerImpl.writeFixedFields
train
private void writeFixedFields(long millis, Level level, int threadId, long seq, DataOutput writer) throws IOException { // Write time first for ease of time filtering. writer.writeLong(millis); // Write our own sequence number for merging purposes. long seqNumber; synchronized(BinaryLogRecordSerializerIm...
java
{ "resource": "" }
q152689
_DeltaStateHelper.saveState
train
public Object saveState(FacesContext context) { Map serializableMap = (isInitialStateMarked()) ? _deltas : _fullState; if (_initialState != null && _deltas != null && !_deltas.isEmpty() && isInitialStateMarked()) { // Before save the state, check if the property was ...
java
{ "resource": "" }
q152690
AbstractAsyncFuture.invokeCallback
train
protected void invokeCallback(ICompletionListener listener, AbstractAsyncFuture future, Object userState) { try { ExecutorService executorService = CHFWBundle.getExecutorService(); if (null == executorService) { if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnable...
java
{ "resource": "" }
q152691
AbstractAsyncFuture.waitForCompletion
train
public void waitForCompletion() throws InterruptedException { try { waitForCompletion(0L); } catch (AsyncTimeoutException ate) { // cannot happen since arg of 0L means wait forever if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.d...
java
{ "resource": "" }
q152692
AbstractAsyncFuture.waitForCompletion
train
public void waitForCompletion(long timeout) throws AsyncTimeoutException, InterruptedException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "waitForCompletion: " + timeout); } // First do a non-sync test, to see if we can return quickly i...
java
{ "resource": "" }
q152693
AbstractAsyncFuture.resetFuture
train
public void resetFuture() { // this must be done before "completed = false". Since reuseCount // is volatile, and we ONLY need it to be in sync with the thread // in AsyncSocketChannelHelper WHEN completed is detected as being // false, then we should not need further synchronization. ...
java
{ "resource": "" }
q152694
StringUtils.isFloatNoExponent
train
public static boolean isFloatNoExponent(String str) { int len = str.length(); if (len == 0) { return false; } // skip first char if sign char char c = str.charAt(0); int i = ((c == '-') || (c == '+')) ? 1 : 0; // is it only a sign? ...
java
{ "resource": "" }
q152695
StringUtils.splitLongString
train
public static String[] splitLongString(String str, char separator) { int len = (str == null) ? 0 : str.length(); if (str == null || len == 0) { return ArrayUtils.EMPTY_STRING_ARRAY; } int oldPos = 0; ArrayList list = new ArrayList(); int pos...
java
{ "resource": "" }
q152696
StringUtils.splitShortString
train
public static String[] splitShortString(String str, char separator) { int len = (str == null) ? 0 : str.length(); if (str == null || len == 0) { return org.apache.myfaces.shared.util.ArrayUtils.EMPTY_STRING_ARRAY; } int lastTokenIndex = 0; // Step 1: how...
java
{ "resource": "" }
q152697
StringUtils.minIndex
train
public static int minIndex(int a, int b) { return (a < 0) ? b : (b < 0) ? a : (a < b) ? a : b; }
java
{ "resource": "" }
q152698
FilterConfig.setDispatchMode
train
public void setDispatchMode(int[] dispatchModeInts) { //convert to DispatcherType dispatchMode = new DispatcherType [dispatchModeInts.length]; for (int i=0;i<dispatchModeInts.length;i++){ int dispatchModeCur=dispatchModeInts[i]; switch (dispatchModeCur) { case 0: dispatchMode[i]=DispatcherType.RE...
java
{ "resource": "" }
q152699
ConfigValidator.getAttributeDefinition
train
private ExtendedAttributeDefinition getAttributeDefinition(RegistryEntry registryEntry, String attributeName) { if (registryEntry == null) { return null; } ExtendedObjectClassDefinition definition = registryEntry.getObjectClassDefinition(); if (definition == null) { ...
java
{ "resource": "" }