_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q154200 | ChannelUtils.checkMissingConfig | train | public static synchronized void checkMissingConfig() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Checking for missing config");
}
if (delayedConfig.isEmpty()) {
return;
}
delayCheckSignaled = false;
final Chan... | java | {
"resource": ""
} |
q154201 | AmbiguousEJBRefObjectFactory.getObjectInstance | train | public Object getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?, ?> environment)
throws Exception
{
AmbiguousEJBReferenceException ambiguousEx;
if (Tra... | java | {
"resource": ""
} |
q154202 | TwoTierObjectPool.getThreadLocalObjectPool | train | private LocalThreadObjectPool getThreadLocalObjectPool() {
if (threadPoolSize <= 0) {
// no local thread pool needed.
return null;
}
LocalThreadObjectPool localPool = null;
if (threadLocals != null) {
localPool = threadLocals.get();
if (loc... | java | {
"resource": ""
} |
q154203 | TwoTierObjectPool.removeFromInUse | train | public void removeFromInUse(Object o) {
if (null == o) {
throw new NullPointerException();
}
if (inUseTracking) {
inUseTable.remove(o);
}
} | java | {
"resource": ""
} |
q154204 | TwoTierObjectPool.purgeThreadLocal | train | public void purgeThreadLocal() {
// if thread local pools exist, check to see if we have one created and
// therefore need to tell it to purge
if (null != threadLocals) {
LocalThreadObjectPool pool = threadLocals.get();
if (null != pool) {
Object[] data = ... | java | {
"resource": ""
} |
q154205 | NullRemoteServices.batchUpdate | train | public void batchUpdate(HashMap invalidateIdEvents, HashMap invalidateTemplateEvents, ArrayList pushEntryEvents, ArrayList aliasEntryEvents) {
notificationService.batchUpdate(invalidateIdEvents, invalidateTemplateEvents, pushEntryEvents, aliasEntryEvents, cacheUnit);
} | java | {
"resource": ""
} |
q154206 | AppTrackerImpl.isOsgiApp | train | private boolean isOsgiApp(IServletContext isc) {
Object bundleCtxAttr = isc.getAttribute(BUNDLE_CONTEXT_KEY);
Tr.debug(tc, "Servet context attr for key = " + BUNDLE_CONTEXT_KEY + ", = " + bundleCtxAttr);
if (bundleCtxAttr != null) {
return true;
} else {
return fa... | java | {
"resource": ""
} |
q154207 | ResAutoLinkReferenceFactoryImpl.getBindingName | train | private String getBindingName(ResourceInfo resourceInfo) {
String destBindingName = null;
String link = resourceInfo.getLink();
if (link == null) {
destBindingName = getBindingName(resourceInfo.getName());
} else {
destBindingName = InjectionEngineAccessor.getMes... | java | {
"resource": ""
} |
q154208 | ResAutoLinkReferenceFactoryImpl.getBindingName | train | public static String getBindingName(String name) {
// For "java:" names, come up with a reasonable binding name by removing
// "java:" and if possible, the scope (e.g., "global") and "env".
if (name.startsWith("java:")) {
int begin = "java:".length();
int index = name.in... | java | {
"resource": ""
} |
q154209 | HashtableEntry.reset | train | public void reset() {
this.location = 0;
this.first_created = 0;
this.expiration = -1;
this.validatorExpiration = -1; // LI4537-24
this.tableid = 0;
this.key = null;
this.value = null;
this.next = 0;
this.previous = 0;
this.valuelen = -1;
this.hash = 0;
this.index = 0;
this.size = -1;
... | java | {
"resource": ""
} |
q154210 | StaticCATTransaction.rcvCreateUCTransaction | train | static void rcvCreateUCTransaction(CommsByteBuffer request, Conversation conversation,
int requestNumber, boolean allocatedFromBufferPool,
boolean partOfExchange)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr... | java | {
"resource": ""
} |
q154211 | StaticCATTransaction.rcvCommitTransaction | train | static void rcvCommitTransaction(CommsByteBuffer request, Conversation conversation,
int requestNumber, boolean allocatedFromBufferPool,
boolean partOfExchange)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry... | java | {
"resource": ""
} |
q154212 | StaticCATTransaction.rcvRollbackTransaction | train | static void rcvRollbackTransaction(CommsByteBuffer request, Conversation conversation,
int requestNumber, boolean allocatedFromBufferPool,
boolean partOfExchange)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr... | java | {
"resource": ""
} |
q154213 | DataSlice.toPayloadString | train | public String toPayloadString()
{
String digits = "0123456789ABCDEF";
StringBuilder retval = new StringBuilder("DataSlice@");
retval.append(hashCode());
retval.append("[");
for (int i=_offset; i<(_offset+_length); i++)
{
retval.append(digits.charAt((_byt... | java | {
"resource": ""
} |
q154214 | HtmlJavaScriptUtils.getClearHiddenCommandFormParamsFunctionName | train | public static String getClearHiddenCommandFormParamsFunctionName(
String formName)
{
final char separatorChar = FacesContext.getCurrentInstance().getNamingContainerSeparatorChar();
if (formName == null)
{
return "'" + HtmlRendererUtils.CLEAR_HIDDEN_FIELD_FN_NAME
... | java | {
"resource": ""
} |
q154215 | SchemaStoreItem.eventPostCommitRemove | train | public void eventPostCommitRemove(Transaction tran) throws SevereMessageStoreException {
super.eventPostCommitRemove(tran);
if (stream != null)
stream.removeFromIndex(this);
} | java | {
"resource": ""
} |
q154216 | SchemaStoreItem.getPersistentData | train | public List<DataSlice> getPersistentData() {
List<DataSlice> slices = new ArrayList<DataSlice>(1);
slices.add(new DataSlice(schema.toByteArray()));
return slices;
} | java | {
"resource": ""
} |
q154217 | SchemaStoreItem.restore | train | public void restore(List<DataSlice> slices) {
schema = JMFRegistry.instance.createJMFSchema(slices.get(0).getBytes());
} | java | {
"resource": ""
} |
q154218 | SibRaStaticDestinationEndpointActivation.addMessagingEngine | train | synchronized protected void addMessagingEngine(
final JsMessagingEngine messagingEngine) throws ResourceException {
final String methodName = "addMessagingEngine";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, messagin... | java | {
"resource": ""
} |
q154219 | SibRaStaticDestinationEndpointActivation.isListenerRequired | train | private boolean isListenerRequired(final JsMessagingEngine messagingEngine)
throws ResourceException {
final String methodName = "isListenerRequired";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, messagingEngine);
... | java | {
"resource": ""
} |
q154220 | SibRaStaticDestinationEndpointActivation.validateDestination | train | private static String validateDestination(
final JsMessagingEngine messagingEngine, final String busName,
final String destinationName, final DestinationType destinationType)
throws NotSupportedException, ResourceAdapterInternalException {
final String methodName = "validate... | java | {
"resource": ""
} |
q154221 | SibRaStaticDestinationEndpointActivation.getRequiredMessagingEngines | train | private Set getRequiredMessagingEngines(
final JsMessagingEngine messagingEngine)
throws NotSupportedException, ResourceAdapterInternalException {
final String methodName = "getRequiredMessagingEngines";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
... | java | {
"resource": ""
} |
q154222 | SibRaStaticDestinationEndpointActivation.createListener | train | private void createListener(final JsMessagingEngine messagingEngine)
throws ResourceException {
final String methodName = "createListener";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, messagingEngine);
}
... | java | {
"resource": ""
} |
q154223 | SibRaStaticDestinationEndpointActivation.messagingEngineStopping | train | public synchronized void messagingEngineStopping(
final JsMessagingEngine messagingEngine, final int mode) {
final String methodName = "messagingEngineStopping";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, new Object... | java | {
"resource": ""
} |
q154224 | SibRaStaticDestinationEndpointActivation.messagingEngineInitializing | train | public synchronized void messagingEngineInitializing(
final JsMessagingEngine messagingEngine) {
final String methodName = "messagingEngineInitializing";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, messagingEngine);
... | java | {
"resource": ""
} |
q154225 | SibRaStaticDestinationEndpointActivation.messagingEngineDestroyed | train | public void messagingEngineDestroyed(final JsMessagingEngine messagingEngine) {
final String methodName = "messagingEngineDestroyed";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, messagingEngine);
}
/*
*... | java | {
"resource": ""
} |
q154226 | SibRaStaticDestinationEndpointActivation.messagingEngineTerminated | train | synchronized void messagingEngineTerminated(
final SibRaMessagingEngineConnection connection) {
final String methodName = "messagingEngineTerminated";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, connection);
... | java | {
"resource": ""
} |
q154227 | SibRaStaticDestinationEndpointActivation.scheduleCreateRemoteListener | train | private void scheduleCreateRemoteListener() {
final String methodName = "scheduleCreateRemoteListener";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName);
}
_timer.schedule(new TimerTask() {
public void r... | java | {
"resource": ""
} |
q154228 | JmsSessionImpl.createMessageProxy | train | private Message createMessageProxy(Message msgObject) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "createMessageProxy", msgObject);
Message retObj;
try {
retObj = (Message) Proxy.newProxyInstance(msgObject.getClass().getClas... | java | {
"resource": ""
} |
q154229 | JmsSessionImpl.checkNotClosed | train | void checkNotClosed() throws JMSException {
int currentState;
synchronized (stateLock) {
currentState = state;
}
if (currentState == CLOSED) {
throw (javax.jms.IllegalStateException) JmsErrorUtils.newThrowable(javax.jms.IllegalStateException.class,
... | java | {
"resource": ""
} |
q154230 | JmsSessionImpl.getPassThruProps | train | Map getPassThruProps() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "getPassThruProps");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, tc, "getPassThruProps", passThruProps);
return passThruPr... | java | {
"resource": ""
} |
q154231 | JmsSessionImpl.getAsyncDeliveryLock | train | Object getAsyncDeliveryLock() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "getAsyncDeliveryLock");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, tc, "getAsyncDeliveryLock", asyncDeliveryLock);
... | java | {
"resource": ""
} |
q154232 | JmsSessionImpl.getConnection | train | Connection getConnection() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "getConnection");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, tc, "getConnection", connection);
return connection;
... | java | {
"resource": ""
} |
q154233 | JmsSessionImpl.getCoreConnection | train | SICoreConnection getCoreConnection() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "getCoreConnection");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, tc, "getCoreConnection", coreConnection);
... | java | {
"resource": ""
} |
q154234 | JmsSessionImpl.instantiateProducer | train | JmsMsgProducer instantiateProducer(Destination jmsDestination) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "instantiateProducer", jmsDestination);
JmsMsgProducer messageProducer = new JmsMsgProducerImpl(jmsDestination, coreConn... | java | {
"resource": ""
} |
q154235 | JmsSessionImpl.instantiateConsumer | train | JmsMsgConsumer instantiateConsumer(ConsumerProperties consumerProperties) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "instantiateConsumer", consumerProperties);
JmsMsgConsumer messageConsumer = new JmsMsgConsumerImpl(coreConne... | java | {
"resource": ""
} |
q154236 | JmsSessionImpl.getProducerCount | train | public int getProducerCount() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "getProducerCount");
int producerCount = producers.size();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, tc, "getProd... | java | {
"resource": ""
} |
q154237 | JmsSessionImpl.getConsumerCount | train | public int getConsumerCount() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "getConsumerCount");
int consumerCount = syncConsumers.size();
consumerCount += asyncConsumers.size();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntry... | java | {
"resource": ""
} |
q154238 | JmsSessionImpl.removeProducer | train | void removeProducer(JmsMsgProducerImpl producer) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "removeProducer", producer);
producers.remove(producer);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(t... | java | {
"resource": ""
} |
q154239 | JmsSessionImpl.removeConsumer | train | void removeConsumer(JmsMsgConsumerImpl consumer) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "removeConsumer", consumer);
// if DUPS_OK_ACKNOWLEDGE is in use, commit any messages delivered in the
// last incomplete bat... | java | {
"resource": ""
} |
q154240 | JmsSessionImpl.removeBrowser | train | void removeBrowser(JmsQueueBrowserImpl browser) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "removeBrowser", browser);
browsers.remove(browser);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, ... | java | {
"resource": ""
} |
q154241 | JmsSessionImpl.notifyMessagePreConsume | train | void notifyMessagePreConsume(SITransaction transaction) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "notifyMessagePreConsume", transaction);
if (!(transaction instanceof SIXAResource)) {
// We wish to increment thi... | java | {
"resource": ""
} |
q154242 | JmsSessionImpl.notifyMessagePostConsume | train | void notifyMessagePostConsume() throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "notifyMessagePostConsume");
if ((acknowledgeMode == Session.DUPS_OK_ACKNOWLEDGE) && (uncommittedReceiveCount >= dupsCommitThreshold)) {
co... | java | {
"resource": ""
} |
q154243 | JmsSessionImpl.getAndResetCommitCount | train | int getAndResetCommitCount() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "getAndResetCommitCount");
int currentUncommittedReceiveCount = uncommittedReceiveCount;
uncommittedReceiveCount = 0;
if (TraceComponent.isAnyTracingEnabled()... | java | {
"resource": ""
} |
q154244 | JmsSessionImpl.createTemporaryDestination | train | private SIDestinationAddress createTemporaryDestination(Distribution destType, String prefix) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "createTemporaryDestination", new Object[] { destType, prefix });
SIDestinationAddress da... | java | {
"resource": ""
} |
q154245 | JmsSessionImpl.deleteTemporaryDestination | train | protected void deleteTemporaryDestination(SIDestinationAddress dest) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "deleteTemporaryDestination", dest);
try {
getCoreConnection().deleteTemporaryDestination(dest);
... | java | {
"resource": ""
} |
q154246 | JmsSessionImpl.isAsync | train | boolean isAsync() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "isAsync");
boolean isAsync = !asyncConsumers.isEmpty() && getState() == STARTED;
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(this, t... | java | {
"resource": ""
} |
q154247 | JmsSessionImpl.checkSynchronousUsage | train | void checkSynchronousUsage(String methodName) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "checkSynchronousUsage", methodName);
// Generate an exception if the session is in async mode, and the call
// has not originate... | java | {
"resource": ""
} |
q154248 | JmsSessionImpl.validateStopCloseForMessageListener | train | void validateStopCloseForMessageListener(String functionCall) throws IllegalStateException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "validateStopForMessageListener");
//Before triggering onMessage .. SIB pushes "owning session object" to Threa... | java | {
"resource": ""
} |
q154249 | JmsSessionImpl.addtoAsysncSendQueue | train | void addtoAsysncSendQueue(JmsMsgProducerImpl msgProducer, CompletionListener cListner, Message msg, int sendMethodType, Object[] params) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "addtoAsysncSendQueue", new Object[] { msgProducer, cListner, cListner, se... | java | {
"resource": ""
} |
q154250 | ObjectClassDefinitionSpecification.getADs | train | private AttributeDefinitionSpecification[] getADs(boolean isRequired) {
AttributeDefinitionSpecification[] retVal = null;
Vector<AttributeDefinitionSpecification> vector = new Vector<AttributeDefinitionSpecification>();
for (Map.Entry<String, AttributeDefinitionSpecification> entry : attributes.... | java | {
"resource": ""
} |
q154251 | SibRaNonTransactionalDispatcher.cleanup | train | protected void cleanup() {
final String methodName = "cleanup";
if (TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName);
}
if (_unsuccessfulMessages.size() > 0) {
try {
// 250710: Fix to workaround the problem where failed messages a... | java | {
"resource": ""
} |
q154252 | ViewHandlerImpl.calculateLocale | train | @Override
public Locale calculateLocale(FacesContext facesContext)
{
Application application = facesContext.getApplication();
for (Iterator<Locale> requestLocales = facesContext.getExternalContext().getRequestLocales(); requestLocales
.hasNext();)
{
Locale req... | java | {
"resource": ""
} |
q154253 | ValidatorRESTHandler.toJSONObjectForThrowable | train | @SuppressWarnings("unchecked")
@Trivial
private JSONObject toJSONObjectForThrowable(Map<String, ?> errorInfo, Throwable error) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "toJSONObjectForThrowable", errorInfo, error);
LinkedHashMap<String, L... | java | {
"resource": ""
} |
q154254 | ScriptableTable.getScriptEngine | train | private ScriptEngine getScriptEngine(String value) {
String engineName = value.substring(0, value.indexOf(":"));
if (engines.containsKey(engineName)) {
return engines.get(engineName);
} else {
ScriptEngine engine = manager.getEngineByName(engineName);
if (engi... | java | {
"resource": ""
} |
q154255 | ScriptableTable.getScriptResult | train | private Object getScriptResult(String script, ScriptEngine engine) throws ScriptException {
String scriptToExecute = script.substring(script.indexOf(":") + 1);
return engine.eval(scriptToExecute);
} | java | {
"resource": ""
} |
q154256 | DataSetProcessor.createConnection | train | private Connection createConnection() {
try {
EntityTransaction tx = this.em.getTransaction();
if (isHibernatePresentOnClasspath() && em.getDelegate() instanceof Session) {
connection = ((SessionImpl) em.unwrap(Session.class)).connection();
} else {
... | java | {
"resource": ""
} |
q154257 | DataSetAssert.compareData | train | @Override
protected void compareData(ITable expectedTable, ITable actualTable, ComparisonColumn[] comparisonCols, FailureHandler failureHandler) throws DataSetException {
logger.debug("compareData(expectedTable={}, actualTable={}, "
+ "comparisonCols={}, failureHandler={}) - start",
... | java | {
"resource": ""
} |
q154258 | EntityManagerProvider.instance | train | public static synchronized EntityManagerProvider instance(String unitName, Map<String,String> overridingPersistenceProps) {
overridingProperties = overridingPersistenceProps;
return instance(unitName);
} | java | {
"resource": ""
} |
q154259 | ViterbiAlgorithm.startWithInitialStateProbabilities | train | public void startWithInitialStateProbabilities(Collection<S> initialStates,
Map<S, Double> initialLogProbabilities) {
initializeStateProbabilities(null, initialStates, initialLogProbabilities);
} | java | {
"resource": ""
} |
q154260 | ViterbiAlgorithm.startWithInitialObservation | train | public void startWithInitialObservation(O observation, Collection<S> candidates,
Map<S, Double> emissionLogProbabilities) {
initializeStateProbabilities(observation, candidates, emissionLogProbabilities);
} | java | {
"resource": ""
} |
q154261 | ViterbiAlgorithm.nextStep | train | public void nextStep(O observation, Collection<S> candidates,
Map<S, Double> emissionLogProbabilities,
Map<Transition<S>, Double> transitionLogProbabilities,
Map<Transition<S>, D> transitionDescriptors) {
if (message == null) {
throw new IllegalStateException(
... | java | {
"resource": ""
} |
q154262 | ViterbiAlgorithm.hmmBreak | train | private boolean hmmBreak(Map<S, Double> message) {
for (double logProbability : message.values()) {
if (logProbability != Double.NEGATIVE_INFINITY) {
return false;
}
}
return true;
} | java | {
"resource": ""
} |
q154263 | ViterbiAlgorithm.forwardStep | train | private ForwardStepResult<S, O, D> forwardStep(O observation, Collection<S> prevCandidates,
Collection<S> curCandidates, Map<S, Double> message,
Map<S, Double> emissionLogProbabilities,
Map<Transition<S>, Double> transitionLogProbabilities,
Map<Transition<S>,D> transition... | java | {
"resource": ""
} |
q154264 | ViterbiAlgorithm.mostLikelyState | train | private S mostLikelyState() {
// Otherwise an HMM break would have occurred and message would be null.
assert !message.isEmpty();
S result = null;
double maxLogProbability = Double.NEGATIVE_INFINITY;
for (Map.Entry<S, Double> entry : message.entrySet()) {
if (entry.g... | java | {
"resource": ""
} |
q154265 | ViterbiAlgorithm.retrieveMostLikelySequence | train | private List<SequenceState<S, O, D>> retrieveMostLikelySequence() {
// Otherwise an HMM break would have occurred and message would be null.
assert !message.isEmpty();
final S lastState = mostLikelyState();
// Retrieve most likely state sequence in reverse order
final List<Sequ... | java | {
"resource": ""
} |
q154266 | MapMatching.computeViterbiSequence | train | private List<SequenceState<State, Observation, Path>> computeViterbiSequence(
List<TimeStep<State, Observation, Path>> timeSteps, int originalGpxEntriesCount,
QueryGraph queryGraph) {
final HmmProbabilities probabilities
= new HmmProbabilities(measurementErrorSigma, trans... | java | {
"resource": ""
} |
q154267 | MapMatching.createVirtualEdgesMap | train | private Map<String, EdgeIteratorState> createVirtualEdgesMap(
List<Collection<QueryResult>> queriesPerEntry, EdgeExplorer explorer) {
// TODO For map key, use the traversal key instead of string!
Map<String, EdgeIteratorState> virtualEdgesMap = new HashMap<>();
for (Collection<QueryR... | java | {
"resource": ""
} |
q154268 | HmmProbabilities.transitionLogProbability | train | public double transitionLogProbability(double routeLength, double linearDistance) {
// Transition metric taken from Newson & Krumm.
Double transitionMetric = Math.abs(linearDistance - routeLength);
return Distributions.logExponentialDistribution(beta, transitionMetric);
} | java | {
"resource": ""
} |
q154269 | AbstractWatchService.register | train | public Key register(Watchable watchable, Iterable<? extends WatchEvent.Kind<?>> eventTypes)
throws IOException {
checkOpen();
return new Key(this, watchable, eventTypes);
} | java | {
"resource": ""
} |
q154270 | FileTree.lookUp | train | public DirectoryEntry lookUp(
File workingDirectory, JimfsPath path, Set<? super LinkOption> options) throws IOException {
checkNotNull(path);
checkNotNull(options);
DirectoryEntry result = lookUp(workingDirectory, path, options, 0);
if (result == null) {
// an intermediate file in the path... | java | {
"resource": ""
} |
q154271 | FileTree.lookUp | train | @Nullable
private DirectoryEntry lookUp(
File dir, Iterable<Name> names, Set<? super LinkOption> options, int linkDepth)
throws IOException {
Iterator<Name> nameIterator = names.iterator();
Name name = nameIterator.next();
while (nameIterator.hasNext()) {
Directory directory = toDirector... | java | {
"resource": ""
} |
q154272 | FileTree.followSymbolicLink | train | @Nullable
private DirectoryEntry followSymbolicLink(File dir, SymbolicLink link, int linkDepth)
throws IOException {
if (linkDepth >= MAX_SYMBOLIC_LINK_DEPTH) {
throw new IOException("too many levels of symbolic links");
}
return lookUp(dir, link.target(), Options.FOLLOW_LINKS, linkDepth + 1)... | java | {
"resource": ""
} |
q154273 | SystemJimfsFileSystemProvider.isValidFileSystemUri | train | private static boolean isValidFileSystemUri(URI uri) {
// would like to just check null, but fragment appears to be the empty string when not present
return isNullOrEmpty(uri.getPath())
&& isNullOrEmpty(uri.getQuery())
&& isNullOrEmpty(uri.getFragment());
} | java | {
"resource": ""
} |
q154274 | SystemJimfsFileSystemProvider.toFileSystemUri | train | private static URI toFileSystemUri(URI uri) {
try {
return new URI(
uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(), null, null, null);
} catch (URISyntaxException e) {
throw new AssertionError(e);
}
} | java | {
"resource": ""
} |
q154275 | SystemJimfsFileSystemProvider.removeFileSystemRunnable | train | @SuppressWarnings("unused") // called via reflection
public static Runnable removeFileSystemRunnable(final URI uri) {
return new Runnable() {
@Override
public void run() {
fileSystems.remove(uri);
}
};
} | java | {
"resource": ""
} |
q154276 | JimfsFileSystems.newFileSystem | train | public static JimfsFileSystem newFileSystem(
JimfsFileSystemProvider provider, URI uri, Configuration config) throws IOException {
PathService pathService = new PathService(config);
FileSystemState state = new FileSystemState(removeFileSystemRunnable(uri));
JimfsFileStore fileStore = createFileStore(... | java | {
"resource": ""
} |
q154277 | JimfsFileSystems.createFileStore | train | private static JimfsFileStore createFileStore(
Configuration config, PathService pathService, FileSystemState state) {
AttributeService attributeService = new AttributeService(config);
// TODO(cgdecker): Make disk values configurable
HeapDisk disk = new HeapDisk(config);
FileFactory fileFactory =... | java | {
"resource": ""
} |
q154278 | JimfsFileSystems.createDefaultView | train | private static FileSystemView createDefaultView(
Configuration config, JimfsFileStore fileStore, PathService pathService) throws IOException {
JimfsPath workingDirPath = pathService.parsePath(config.workingDirectory);
Directory dir = fileStore.getRoot(workingDirPath.root());
if (dir == null) {
... | java | {
"resource": ""
} |
q154279 | HeapDisk.allocate | train | public synchronized void allocate(RegularFile file, int count) throws IOException {
int newAllocatedBlockCount = allocatedBlockCount + count;
if (newAllocatedBlockCount > maxBlockCount) {
throw new IOException("out of disk space");
}
int newBlocksNeeded = Math.max(count - blockCache.blockCount(),... | java | {
"resource": ""
} |
q154280 | Options.getOptionsForChannel | train | public static ImmutableSet<OpenOption> getOptionsForChannel(Set<? extends OpenOption> options) {
if (options.isEmpty()) {
return DEFAULT_READ;
}
boolean append = options.contains(APPEND);
boolean write = append || options.contains(WRITE);
boolean read = !write || options.contains(READ);
... | java | {
"resource": ""
} |
q154281 | Options.getOptionsForInputStream | train | @SuppressWarnings("unchecked") // safe covariant cast
public static ImmutableSet<OpenOption> getOptionsForInputStream(OpenOption... options) {
boolean nofollowLinks = false;
for (OpenOption option : options) {
if (checkNotNull(option) != READ) {
if (option == LinkOption.NOFOLLOW_LINKS) {
... | java | {
"resource": ""
} |
q154282 | Options.getOptionsForOutputStream | train | public static ImmutableSet<OpenOption> getOptionsForOutputStream(OpenOption... options) {
if (options.length == 0) {
return DEFAULT_WRITE;
}
ImmutableSet<OpenOption> result = addWrite(Arrays.asList(options));
if (result.contains(READ)) {
throw new UnsupportedOperationException("'READ' not a... | java | {
"resource": ""
} |
q154283 | Options.getMoveOptions | train | public static ImmutableSet<CopyOption> getMoveOptions(CopyOption... options) {
return ImmutableSet.copyOf(Lists.asList(LinkOption.NOFOLLOW_LINKS, options));
} | java | {
"resource": ""
} |
q154284 | Options.getCopyOptions | train | public static ImmutableSet<CopyOption> getCopyOptions(CopyOption... options) {
ImmutableSet<CopyOption> result = ImmutableSet.copyOf(options);
if (result.contains(ATOMIC_MOVE)) {
throw new UnsupportedOperationException("'ATOMIC_MOVE' not allowed");
}
return result;
} | java | {
"resource": ""
} |
q154285 | GlobToRegex.appendNormal | train | private void appendNormal(char c) {
if (REGEX_RESERVED.matches(c)) {
builder.append('\\');
}
builder.append(c);
} | java | {
"resource": ""
} |
q154286 | GlobToRegex.appendSeparator | train | private void appendSeparator() {
if (separators.length() == 1) {
appendNormal(separators.charAt(0));
} else {
builder.append('[');
for (int i = 0; i < separators.length(); i++) {
appendInBracket(separators.charAt(i));
}
builder.append("]");
}
} | java | {
"resource": ""
} |
q154287 | GlobToRegex.appendNonSeparator | train | private void appendNonSeparator() {
builder.append("[^");
for (int i = 0; i < separators.length(); i++) {
appendInBracket(separators.charAt(i));
}
builder.append(']');
} | java | {
"resource": ""
} |
q154288 | PathType.toUri | train | public final URI toUri(
URI fileSystemUri, String root, Iterable<String> names, boolean directory) {
String path = toUriPath(root, names, directory);
try {
// it should not suck this much to create a new URI that's the same except with a path set =(
// need to do it this way for automatic path... | java | {
"resource": ""
} |
q154289 | JimfsFileSystem.toUri | train | public URI toUri(JimfsPath path) {
fileStore.state().checkOpen();
return pathService.toUri(uri, path.toAbsolutePath());
} | java | {
"resource": ""
} |
q154290 | JimfsFileSystem.toPath | train | public JimfsPath toPath(URI uri) {
fileStore.state().checkOpen();
return pathService.fromUri(uri);
} | java | {
"resource": ""
} |
q154291 | PathMatchers.getPathMatcher | train | public static PathMatcher getPathMatcher(
String syntaxAndPattern, String separators, ImmutableSet<PathNormalization> normalizations) {
int syntaxSeparator = syntaxAndPattern.indexOf(':');
checkArgument(
syntaxSeparator > 0, "Must be of the form 'syntax:pattern': %s", syntaxAndPattern);
Strin... | java | {
"resource": ""
} |
q154292 | JimfsPath.startsWith | train | private static boolean startsWith(List<?> list, List<?> other) {
return list.size() >= other.size() && list.subList(0, other.size()).equals(other);
} | java | {
"resource": ""
} |
q154293 | JimfsPath.isNormal | train | private boolean isNormal() {
if (getNameCount() == 0 || (getNameCount() == 1 && !isAbsolute())) {
return true;
}
boolean foundNonParentName = isAbsolute(); // if there's a root, the path doesn't start with ..
boolean normal = true;
for (Name name : names) {
if (name.equals(Name.PARENT))... | java | {
"resource": ""
} |
q154294 | JimfsPath.resolve | train | JimfsPath resolve(Name name) {
if (name.toString().isEmpty()) {
return this;
}
return pathService.createPathInternal(
root, ImmutableList.<Name>builder().addAll(names).add(name).build());
} | java | {
"resource": ""
} |
q154295 | PathService.emptyPath | train | public JimfsPath emptyPath() {
JimfsPath result = emptyPath;
if (result == null) {
// use createPathInternal to avoid recursive call from createPath()
result = createPathInternal(null, ImmutableList.of(Name.EMPTY));
emptyPath = result;
return result;
}
return result;
} | java | {
"resource": ""
} |
q154296 | PathService.createRoot | train | public JimfsPath createRoot(Name root) {
return createPath(checkNotNull(root), ImmutableList.<Name>of());
} | java | {
"resource": ""
} |
q154297 | PathService.createRelativePath | train | public JimfsPath createRelativePath(Iterable<Name> names) {
return createPath(null, ImmutableList.copyOf(names));
} | java | {
"resource": ""
} |
q154298 | PathService.parsePath | train | public JimfsPath parsePath(String first, String... more) {
String joined = type.joiner().join(Iterables.filter(Lists.asList(first, more), NOT_EMPTY));
return toPath(type.parsePath(joined));
} | java | {
"resource": ""
} |
q154299 | PathService.hash | train | public int hash(JimfsPath path) {
int hash = 31;
hash = 31 * hash + getFileSystem().hashCode();
final Name root = path.root();
final ImmutableList<Name> names = path.names();
if (equalityUsesCanonicalForm) {
// use hash codes of names themselves, which are based on the canonical form
h... | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.