_id stringlengths 2 7 | title stringlengths 3 140 | partition stringclasses 3
values | text stringlengths 73 34.1k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q179300 | FlowItemClient.sendFormToFlow | test | public FluidItem sendFormToFlow(
Form formToSendToFlowParam,
String flowParam) {
FluidItem itemToSend = new FluidItem();
itemToSend.setForm(formToSendToFlowParam);
itemToSend.setFlow(flowParam);
if (this.serviceTicket != null) {
itemToSend.setService... | java | {
"resource": ""
} |
q179301 | WebSocketClient.onClose | test | @OnClose
public void onClose(Session userSessionParam, CloseReason reasonParam) {
this.userSession = null;
if (this.messageHandlers != null) {
this.messageHandlers.values().forEach(handle ->{
handle.connectionClosed();
});
}
} | java | {
"resource": ""
} |
q179302 | WebSocketClient.onMessage | test | @OnMessage
public void onMessage(String messageParam) {
boolean handlerFoundForMsg = false;
for(IMessageResponseHandler handler : new ArrayList<>(this.messageHandlers.values())) {
Object qualifyObj = handler.doesHandlerQualifyForProcessing(messageParam);
if(qualifyObj instanceof Error) {
handler.handleM... | java | {
"resource": ""
} |
q179303 | WebSocketClient.sendMessage | test | public void sendMessage(ABaseFluidJSONObject aBaseFluidJSONObjectParam) {
if(aBaseFluidJSONObjectParam == null) {
throw new FluidClientException(
"No JSON Object to send.",
FluidClientException.ErrorCode.IO_ERROR);
} else {
this.sendMessage(aBaseFluidJSONObjectParam.toJsonObject().toString());
}
... | java | {
"resource": ""
} |
q179304 | WebSocketClient.sendMessage | test | public void sendMessage(String messageToSendParam) {
if(this.userSession == null) {
throw new FluidClientException(
"User Session is not set. Check if connection is open.",
FluidClientException.ErrorCode.IO_ERROR);
}
RemoteEndpoint.Async asyncRemote = null;
if((asyncRemote = this.userSession.getA... | java | {
"resource": ""
} |
q179305 | WebSocketClient.closeSession | test | public void closeSession() {
if(this.userSession == null) {
return;
}
try {
this.userSession.close();
} catch (IOException e) {
throw new FluidClientException(
"Unable to close session. "+e.getMessage(),
e,FluidClientException.ErrorCode.IO_ERROR);
}
} | java | {
"resource": ""
} |
q179306 | SQLUtilWebSocketExecuteNativeSQLClient.executeNativeSQLSynchronized | test | public List<SQLResultSet> executeNativeSQLSynchronized(
NativeSQLQuery nativeSQLQueryParam) {
if(nativeSQLQueryParam == null)
{
return null;
}
if(nativeSQLQueryParam.getDatasourceName() == null ||
nativeSQLQueryParam.getDatasourceName().isEmpty()... | java | {
"resource": ""
} |
q179307 | FluidLicenseClient.requestLicense | test | public String requestLicense(LicenseRequest licenseRequestParam) {
if(licenseRequestParam != null &&
this.serviceTicket != null)
{
licenseRequestParam.setServiceTicket(this.serviceTicket);
}
return this.executeTxtReceiveTxt(
HttpMethod.POST,
... | java | {
"resource": ""
} |
q179308 | FluidLicenseClient.applyLicense | test | public LicenseRequest applyLicense(String licenseToApplyParam)
{
LicenseRequest liceReq = new LicenseRequest();
liceReq.setLicenseCipherText(licenseToApplyParam);
if(this.serviceTicket != null)
{
liceReq.setServiceTicket(this.serviceTicket);
}
return new... | java | {
"resource": ""
} |
q179309 | RouteFieldClient.createFieldTextPlain | test | public Field createFieldTextPlain(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.Text);
routeFieldParam.setTypeMetaData(FieldMetaData.Text.... | java | {
"resource": ""
} |
q179310 | RouteFieldClient.createFieldParagraphTextPlain | test | public Field createFieldParagraphTextPlain(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.ParagraphText);
routeFieldParam.setTypeMetaData(F... | java | {
"resource": ""
} |
q179311 | RouteFieldClient.createFieldParagraphTextHTML | test | public Field createFieldParagraphTextHTML(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.ParagraphText);
routeFieldParam.setTypeMetaData(Fi... | java | {
"resource": ""
} |
q179312 | RouteFieldClient.createFieldMultiChoiceSelectMany | test | public Field createFieldMultiChoiceSelectMany(
Field routeFieldParam,
List<String> multiChoiceValuesParam
) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(multiChoiceValuesParam == null ||
multiChoiceValuesParam.isEmpty()) {
... | java | {
"resource": ""
} |
q179313 | RouteFieldClient.createFieldDateTimeDate | test | public Field createFieldDateTimeDate(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.DateTime);
routeFieldParam.setTypeMetaData(FieldMetaDat... | java | {
"resource": ""
} |
q179314 | RouteFieldClient.updateFieldTextPlain | test | public Field updateFieldTextPlain(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.Text);
routeFieldParam.setTypeMetaData(FieldMetaData.Text.... | java | {
"resource": ""
} |
q179315 | RouteFieldClient.updateFieldParagraphTextHTML | test | public Field updateFieldParagraphTextHTML(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.ParagraphText);
routeFieldParam.setTypeMetaData(Fi... | java | {
"resource": ""
} |
q179316 | RouteFieldClient.updateFieldDateTimeDateAndTime | test | public Field updateFieldDateTimeDateAndTime(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.DateTime);
routeFieldParam.setTypeMetaData(Field... | java | {
"resource": ""
} |
q179317 | RouteFieldClient.updateFieldDecimalPlain | test | public Field updateFieldDecimalPlain(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.Decimal);
routeFieldParam.setTypeMetaData(FieldMetaData... | java | {
"resource": ""
} |
q179318 | RouteFieldClient.updateFieldValue | test | public Field updateFieldValue(Field routeFieldValueParam) {
if(routeFieldValueParam != null && this.serviceTicket != null) {
routeFieldValueParam.setServiceTicket(this.serviceTicket);
}
return new Field(this.postJson(
routeFieldValueParam, Version1.routeFieldUpdateValue()));
} | java | {
"resource": ""
} |
q179319 | RouteFieldClient.createFieldValue | test | public Field createFieldValue(
Field routeFieldValueToCreateParam,
FluidItem fluidItemParam) {
if(routeFieldValueToCreateParam != null && this.serviceTicket != null) {
routeFieldValueToCreateParam.setServiceTicket(this.serviceTicket);
}
Long fluidItmId = (fluidItemParam == null) ? null : fluidItemParam.... | java | {
"resource": ""
} |
q179320 | ConfigurationClient.getConfigurationByKey | test | public Configuration getConfigurationByKey(String configurationKeyParam)
{
Configuration configuration = new Configuration();
configuration.setKey(configurationKeyParam);
if(this.serviceTicket != null)
{
configuration.setServiceTicket(this.serviceTicket);
}
... | java | {
"resource": ""
} |
q179321 | ConfigurationClient.getAllConfigurations | test | public ConfigurationListing getAllConfigurations()
{
Configuration configuration = new Configuration();
if(this.serviceTicket != null)
{
configuration.setServiceTicket(this.serviceTicket);
}
return new ConfigurationListing(this.postJson(
configur... | java | {
"resource": ""
} |
q179322 | AttachmentClient.createAttachment | test | public Attachment createAttachment(Attachment attachmentParam)
{
if(attachmentParam != null && this.serviceTicket != null)
{
attachmentParam.setServiceTicket(this.serviceTicket);
}
return new Attachment(this.putJson(
attachmentParam, WS.Path.Attachment.Ve... | java | {
"resource": ""
} |
q179323 | AttachmentClient.getAttachmentById | test | public Attachment getAttachmentById(
Long attachmentIdParam,
boolean includeAttachmentDataParam)
{
Attachment attachment = new Attachment(attachmentIdParam);
if(this.serviceTicket != null)
{
attachment.setServiceTicket(this.serviceTicket);
}
... | java | {
"resource": ""
} |
q179324 | AttachmentClient.deleteAttachment | test | public Attachment deleteAttachment(Attachment attachmentParam)
{
if(attachmentParam != null && this.serviceTicket != null)
{
attachmentParam.setServiceTicket(this.serviceTicket);
}
return new Attachment(this.postJson(
attachmentParam, WS.Path.Attachment.V... | java | {
"resource": ""
} |
q179325 | AttachmentClient.forceDeleteAttachment | test | public Attachment forceDeleteAttachment(Attachment attachmentParam)
{
if(attachmentParam != null && this.serviceTicket != null)
{
attachmentParam.setServiceTicket(this.serviceTicket);
}
return new Attachment(this.postJson(
attachmentParam,
... | java | {
"resource": ""
} |
q179326 | XsdParserJar.parseJarFile | test | private void parseJarFile(InputStream inputStream) {
//https://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
try {
Node schemaNode = getSchemaNode(inputStream);
if (isXsdSchema(schemaNode)){
XsdSchema.parse(this, schemaNode);
} else {
... | java | {
"resource": ""
} |
q179327 | XsdParserJar.setClassLoader | test | private void setClassLoader(String jarPath) {
if (!jarPath.endsWith(".jar")){
throw new ParsingException("The jarPath received doesn't represent a jar file.");
}
ClassLoader originalCl = Thread.currentThread().getContextClassLoader();
URL url = originalCl.getResource(jarPat... | java | {
"resource": ""
} |
q179328 | XsdGroup.rule2 | test | private void rule2() {
if (!(parent instanceof XsdSchema) && name != null){
throw new ParsingException(XSD_TAG + " element: The " + NAME_TAG + " should only be used when the parent of the " + XSD_TAG + " is the " + XsdSchema.XSD_TAG + " element." );
}
} | java | {
"resource": ""
} |
q179329 | XsdGroup.rule3 | test | private void rule3() {
if (parent instanceof XsdSchema && name == null){
throw new ParsingException(XSD_TAG + " element: The " + NAME_TAG + " should is required the parent of the " + XSD_TAG + " is the " + XsdSchema.XSD_TAG + " element." );
}
} | java | {
"resource": ""
} |
q179330 | XsdAttribute.rule3 | test | private void rule3() {
if (attributesMap.containsKey(REF_TAG) && (simpleType != null || form != null || type != null)){
throw new ParsingException(XSD_TAG + " element: If " + REF_TAG + " attribute is present, simpleType element, form attribute and type attribute cannot be present at the same time.")... | java | {
"resource": ""
} |
q179331 | XsdParser.getSchemaNode | test | private Node getSchemaNode(String filePath) throws IOException, SAXException, ParserConfigurationException {
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(filePath);
doc.getDocumentElement().normalize();
return doc.getFirstChild();
} | java | {
"resource": ""
} |
q179332 | XsdElement.rule7 | test | private void rule7() {
if (parent instanceof XsdSchema && attributesMap.containsKey(FORM_TAG)){
throw new ParsingException(XSD_TAG + " element: The " + FORM_TAG + " attribute can only be present when the parent of the " + xsdElementIsXsdSchema);
}
} | java | {
"resource": ""
} |
q179333 | XsdElement.rule3 | test | private void rule3() {
if (parent instanceof XsdSchema && attributesMap.containsKey(REF_TAG)){
throw new ParsingException(XSD_TAG + " element: The " + REF_TAG + " attribute cannot be present when the parent of the " + xsdElementIsXsdSchema);
}
} | java | {
"resource": ""
} |
q179334 | ConvertTypeOfObject.convert | test | @Override public T convert(final Object value) {
if (value == null) {
return null;
} else if (isIterable() && Iterable.class.isAssignableFrom(value.getClass())) {
return convertIterable(value);
} else if (reflectedKlass.assignableFromObject(value)) {
return (T... | java | {
"resource": ""
} |
q179335 | CliFactory.createCli | test | public static <O> Cli<O> createCli(final Class<O> klass) throws InvalidOptionSpecificationException
{
return new CliInterfaceImpl<O>(klass);
} | java | {
"resource": ""
} |
q179336 | CliFactory.createCliUsingInstance | test | public static <O> Cli<O> createCliUsingInstance(final O options) throws InvalidOptionSpecificationException
{
return new CliInstanceImpl<O>(options);
} | java | {
"resource": ""
} |
q179337 | CliFactory.parseArguments | test | public static <O> O parseArguments(final Class<O> klass, final String... arguments)
throws ArgumentValidationException, InvalidOptionSpecificationException
{
return createCli(klass).parseArguments(arguments);
} | java | {
"resource": ""
} |
q179338 | CliFactory.parseArgumentsUsingInstance | test | public static <O> O parseArgumentsUsingInstance(final O options, final String... arguments)
throws ArgumentValidationException, InvalidOptionSpecificationException
{
return createCliUsingInstance(options).parseArguments(arguments);
} | java | {
"resource": ""
} |
q179339 | DiscoveryApi.urlBuilder | test | Builder urlBuilder(String path) {
Builder builder =
baseUrlBuilder().addPathSegment(configuration.getApiPackage())
.addPathSegment(configuration.getApiVersion()).addPathSegment(path);
if (configuration.getPathModifier() != DiscoveryApiConfiguration.PathModifier.NONE) {
builder.addPath... | java | {
"resource": ""
} |
q179340 | HeaderGridView.removeFooterView | test | public boolean removeFooterView(View v) {
if (mFooterViewInfos.size() > 0) {
boolean result = false;
if (mAdapter != null && ((FooterViewGridAdapter) mAdapter).removeFooter(v)) {
notifiyChanged();
result = true;
}
removeFixedViewInfo(v, mFooterViewInfos);
return result;
}
return false;
} | java | {
"resource": ""
} |
q179341 | Line.getValue | test | public double getValue(double p) {
if (module == null) {
throw new NoModuleException();
}
double x = (x1 - x0) * p + x0;
double y = (y1 - y0) * p + y0;
double z = (z1 - z0) * p + z0;
double value = module.getValue(x, y, z);
if (attenuate) {
... | java | {
"resource": ""
} |
q179342 | Noise.gradientNoise3D | test | public static double gradientNoise3D(double fx, double fy, double fz, int ix, int iy, int iz, int seed) {
// Randomly generate a gradient vector given the integer coordinates of the
// input value. This implementation generates a random number and uses it
// as an index into a normalized-vector... | java | {
"resource": ""
} |
q179343 | Noise.intValueNoise3D | test | public static int intValueNoise3D(int x, int y, int z, int seed) {
// All constants are primes and must remain prime in order for this noise
// function to work correctly.
int n = (X_NOISE_GEN * x + Y_NOISE_GEN * y + Z_NOISE_GEN * z + SEED_NOISE_GEN * seed) & 0x7fffffff;
n = (n >> 13) ^ ... | java | {
"resource": ""
} |
q179344 | Noise.valueNoise3D | test | public static double valueNoise3D(int x, int y, int z, int seed) {
return intValueNoise3D(x, y, z, seed) / 2147483647.0;
} | java | {
"resource": ""
} |
q179345 | Utils.cubicInterp | test | public static double cubicInterp(double n0, double n1, double n2, double n3, double a) {
double p = (n3 - n2) - (n0 - n1);
double q = (n0 - n1) - p;
double r = n2 - n0;
return p * a * a * a + q * a * a + r * a + n1;
} | java | {
"resource": ""
} |
q179346 | Utils.sCurve5 | test | public static double sCurve5(double a) {
double a3 = a * a * a;
double a4 = a3 * a;
double a5 = a4 * a;
return (6.0 * a5) - (15.0 * a4) + (10.0 * a3);
} | java | {
"resource": ""
} |
q179347 | Range.setBounds | test | public void setBounds(double currentLower, double currentUpper, double newLower,
double newUpper) {
if (currentLower == currentUpper) {
throw new IllegalArgumentException("currentLower must not equal currentUpper. Both are " + currentUpper);
}
if (newLower == newUpper) {
throw new Illeg... | java | {
"resource": ""
} |
q179348 | PluginEventsProcessor.doProcess | test | protected void doProcess(final CloudTrailEvent event) {
for (final FullstopPlugin plugin : getPluginsForEvent(event)) {
doProcess(event, plugin);
}
} | java | {
"resource": ""
} |
q179349 | PluginEventsProcessor.doProcess | test | protected void doProcess(final CloudTrailEvent event, final FullstopPlugin plugin) {
try {
plugin.processEvent(event);
} catch (HystrixRuntimeException | HttpServerErrorException e) {
log.warn(e.getMessage(), e);
} catch (final Exception e) {
log.error(e.getMe... | java | {
"resource": ""
} |
q179350 | CloudTrailEventSupport.getAccountId | test | public static String getAccountId(final CloudTrailEvent event) {
final CloudTrailEventData eventData = getEventData(event);
final UserIdentity userIdentity = checkNotNull(eventData.getUserIdentity(), USER_IDENTITY_SHOULD_NEVER_BE_NULL);
final String value = ofNullable(userIdentity.getAccountId()... | java | {
"resource": ""
} |
q179351 | WhitelistRulesEvaluator.apply | test | @Override
public Boolean apply(final RuleEntity ruleEntity, final ViolationEntity violationEntity) {
final List<Predicate<ViolationEntity>> predicates = newArrayList();
trimOptional(ruleEntity.getAccountId())
.map(WhitelistRulesEvaluator::accountIsEqual)
.ifPresent(... | java | {
"resource": ""
} |
q179352 | FileEventReader.getEventSerializer | test | private EventSerializer getEventSerializer(final GZIPInputStream inputStream, final CloudTrailLog ctLog)
throws IOException {
final EventSerializer serializer;
if (isEnableRawEventInfo) {
final String logFileContent = new String(LibraryUtils.toByteArray(inputStream), StandardCha... | java | {
"resource": ""
} |
q179353 | TemporaryFolder.createFile | test | public File createFile(String fileName) throws IOException {
Path path = Paths.get(rootFolder.getPath(), fileName);
return Files.createFile(path).toFile();
} | java | {
"resource": ""
} |
q179354 | TemporaryFolder.createDirectory | test | public File createDirectory(String directoryName) {
Path path = Paths.get(rootFolder.getPath(), directoryName);
try {
return Files.createDirectory(path).toFile();
} catch (IOException ex) {
throw new TemporaryFolderException(
String.format("Failed to create directory: '%s'", path.toStr... | java | {
"resource": ""
} |
q179355 | RestoreContext.restore | test | public void restore() {
for (String propertyName : propertyNames) {
if (restoreProperties.containsKey(propertyName)) {
// reinstate the original value
System.setProperty(propertyName, restoreProperties.get(propertyName));
} else {
// remove the (previously unset) property
... | java | {
"resource": ""
} |
q179356 | LazyMap.createImplementation | test | private Map<K, V> createImplementation()
{
if (delegate instanceof HashMap == false)
return new HashMap<K, V>(delegate);
return delegate;
} | java | {
"resource": ""
} |
q179357 | CachedCollection.add | test | public boolean add(final Object obj) {
maintain();
SoftObject soft = SoftObject.create(obj, queue);
return collection.add(soft);
} | java | {
"resource": ""
} |
q179358 | Property.set | test | public static String set(String name, String value)
{
return PropertyManager.setProperty(name, value);
} | java | {
"resource": ""
} |
q179359 | Property.getArray | test | public static String[] getArray(String base, String[] defaultValues)
{
return PropertyManager.getArrayProperty(base, defaultValues);
} | java | {
"resource": ""
} |
q179360 | StateMachine.nextState | test | public State nextState(String actionName)
throws IllegalTransitionException
{
Transition t = currentState.getTransition(actionName);
if( t == null )
{
String msg = "No transition for action: '" + actionName
+ "' from state: '" + currentState.getName() + "'";
thro... | java | {
"resource": ""
} |
q179361 | SoftSet.processQueue | test | private void processQueue()
{
ComparableSoftReference cr;
while( (cr = (ComparableSoftReference) gcqueue.poll()) != null )
{
map.remove(cr.getKey());
}
} | java | {
"resource": ""
} |
q179362 | WeakTypeCache.get | test | @SuppressWarnings({"unchecked", "cast"})
public T get(Type type)
{
if (type == null)
throw new IllegalArgumentException("Null type");
if (type instanceof ParameterizedType)
return getParameterizedType((ParameterizedType) type);
else if (type instanceof Class)
return g... | java | {
"resource": ""
} |
q179363 | WeakTypeCache.getParameterizedType | test | protected T getParameterizedType(ParameterizedType type)
{
// First check if we already have it
T result = peek(type);
if (result != null)
return result;
// Instantiate
result = instantiate(type);
// Put the perlimanary result into the cache
put(type, result... | java | {
"resource": ""
} |
q179364 | WeakTypeCache.getTypeVariable | test | protected <D extends GenericDeclaration> T getTypeVariable(TypeVariable<D> type)
{
// TODO JBMICROCONT-131 improve this
return get(type.getBounds()[0]);
} | java | {
"resource": ""
} |
q179365 | NestedRuntimeException.printStackTrace | test | public void printStackTrace(final PrintStream stream) {
if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
super.printStackTrace(stream);
}
NestedThrowable.Util.print(nested, stream);
} | java | {
"resource": ""
} |
q179366 | NestedRuntimeException.printStackTrace | test | public void printStackTrace(final PrintWriter writer) {
if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
super.printStackTrace(writer);
}
NestedThrowable.Util.print(nested, writer);
} | java | {
"resource": ""
} |
q179367 | MarshalledValueOutputStream.replaceObject | test | protected Object replaceObject(Object obj) throws IOException
{
if( (obj instanceof Remote) && !(obj instanceof RemoteStub) )
{
Remote remote = (Remote) obj;
try
{
obj = RemoteObject.toStub(remote);
}
catch(IOException ignore)
{
... | java | {
"resource": ""
} |
q179368 | BasicTaskWrapper.run | test | public void run()
{
// Get the execution thread
this.runThread = Thread.currentThread();
// Check for a start timeout
long runTime = getElapsedTime();
if (startTimeout > 0l && runTime >= startTimeout)
{
taskRejected(new StartTimeoutException("Start Timeout exceeded for t... | java | {
"resource": ""
} |
q179369 | BasicTaskWrapper.setTask | test | protected void setTask(Task task)
{
if (task == null)
throw new IllegalArgumentException("Null task");
this.task = task;
this.taskString = task.toString();
this.startTime = System.currentTimeMillis();
this.waitType = task.getWaitType();
this.priority = task.getPriority();... | java | {
"resource": ""
} |
q179370 | BasicTaskWrapper.taskAccepted | test | protected boolean taskAccepted()
{
try
{
task.accepted(getElapsedTime());
return true;
}
catch (Throwable t)
{
log.warn("Unexpected error during 'accepted' for task: " + taskString, t);
return false;
}
} | java | {
"resource": ""
} |
q179371 | BasicTaskWrapper.taskRejected | test | protected boolean taskRejected(RuntimeException e)
{
try
{
task.rejected(getElapsedTime(), e);
return true;
}
catch (Throwable t)
{
log.warn("Unexpected error during 'rejected' for task: " + taskString, t);
if (e != null)
log.warn("Origina... | java | {
"resource": ""
} |
q179372 | BasicTaskWrapper.taskStarted | test | protected boolean taskStarted()
{
try
{
task.started(getElapsedTime());
return true;
}
catch (Throwable t)
{
log.warn("Unexpected error during 'started' for task: " + taskString, t);
return false;
}
} | java | {
"resource": ""
} |
q179373 | BasicTaskWrapper.taskCompleted | test | protected boolean taskCompleted(Throwable throwable)
{
try
{
task.completed(getElapsedTime(), throwable);
return true;
}
catch (Throwable t)
{
log.warn("Unexpected error during 'completed' for task: " + taskString, t);
if (throwable != null)
... | java | {
"resource": ""
} |
q179374 | BasicTaskWrapper.taskStop | test | protected boolean taskStop()
{
try
{
task.stop();
return true;
}
catch (Throwable t)
{
log.warn("Unexpected error during 'stop' for task: " + taskString, t);
return false;
}
} | java | {
"resource": ""
} |
q179375 | WorkerQueue.getJobImpl | test | protected Executable getJobImpl() throws InterruptedException
{
// While the queue is empty, wait();
// when notified take an event from the queue and return it.
while (m_currentJob == null) {wait();}
// This one is the job to return
JobItem item = m_currentJob;
// Go on to the ne... | java | {
"resource": ""
} |
q179376 | WorkerQueue.putJobImpl | test | protected void putJobImpl(Executable job)
{
JobItem posted = new JobItem(job);
if (m_currentJob == null)
{
// The queue is empty, set the current job to process and
// wake up the thread waiting in method getJob
m_currentJob = posted;
notifyAll();
}... | java | {
"resource": ""
} |
q179377 | BlockingMode.toBlockingMode | test | public static final BlockingMode toBlockingMode(String name)
{
BlockingMode mode = null;
if( name == null )
{
mode = null;
}
else if( name.equalsIgnoreCase("run") )
{
mode = RUN;
}
else if( name.equalsIgnoreCase("wait") )
{
mode = WAIT;... | java | {
"resource": ""
} |
q179378 | BlockingMode.readResolve | test | Object readResolve() throws ObjectStreamException
{
// Replace the marshalled instance type with the local instance
BlockingMode mode = ABORT;
switch( type )
{
case RUN_TYPE:
mode = RUN;
break;
case WAIT_TYPE:
mode = RUN;
break... | java | {
"resource": ""
} |
q179379 | Catalog.setupReaders | test | public void setupReaders() {
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(true);
spf.setValidating(false);
SAXCatalogReader saxReader = new SAXCatalogReader(spf);
saxReader.setCatalogParser(null, "XMLCatalog",
"org.apache.xml.resolver.readers.XCatalogReade... | java | {
"resource": ""
} |
q179380 | Catalog.addReader | test | public void addReader(String mimeType, CatalogReader reader) {
if (readerMap.containsKey(mimeType)) {
Integer pos = (Integer) readerMap.get(mimeType);
readerArr.set(pos.intValue(), reader);
} else {
readerArr.add(reader);
Integer pos = new Integer(readerArr.size()-1);
readerMap.put... | java | {
"resource": ""
} |
q179381 | Catalog.copyReaders | test | protected void copyReaders(Catalog newCatalog) {
// Have to copy the readers in the right order...convert hash to arr
Vector mapArr = new Vector(readerMap.size());
// Pad the mapArr out to the right length
for (int count = 0; count < readerMap.size(); count++) {
mapArr.add(null);
}
Enume... | java | {
"resource": ""
} |
q179382 | Catalog.newCatalog | test | protected Catalog newCatalog() {
String catalogClass = this.getClass().getName();
try {
Catalog c = (Catalog) (Class.forName(catalogClass).newInstance());
c.setCatalogManager(catalogManager);
copyReaders(c);
return c;
} catch (ClassNotFoundException cnfe) {
catalogManager.debu... | java | {
"resource": ""
} |
q179383 | Catalog.loadSystemCatalogs | test | public void loadSystemCatalogs()
throws MalformedURLException, IOException {
Vector catalogs = catalogManager.getCatalogFiles();
if (catalogs != null) {
for (int count = 0; count < catalogs.size(); count++) {
catalogFiles.addElement(catalogs.elementAt(count));
}
}
if (catalogFiles.siz... | java | {
"resource": ""
} |
q179384 | Catalog.parseCatalog | test | public synchronized void parseCatalog(URL aUrl) throws IOException {
catalogCwd = aUrl;
base = aUrl;
default_override = catalogManager.getPreferPublic();
catalogManager.debug.message(4, "Parse catalog: " + aUrl.toString());
DataInputStream inStream = null;
boolean parsed = false;
for (int... | java | {
"resource": ""
} |
q179385 | Catalog.parsePendingCatalogs | test | protected synchronized void parsePendingCatalogs()
throws MalformedURLException, IOException {
if (!localCatalogFiles.isEmpty()) {
// Move all the localCatalogFiles into the front of
// the catalogFiles queue
Vector newQueue = new Vector();
Enumeration q = localCatalogFiles.elements();
... | java | {
"resource": ""
} |
q179386 | Catalog.parseCatalogFile | test | protected synchronized void parseCatalogFile(String fileName)
throws MalformedURLException, IOException, CatalogException {
// The base-base is the cwd. If the catalog file is specified
// with a relative path, this assures that it gets resolved
// properly...
try {
// tack on a basename beca... | java | {
"resource": ""
} |
q179387 | Catalog.unknownEntry | test | public void unknownEntry(Vector strings) {
if (strings != null && strings.size() > 0) {
String keyword = (String) strings.elementAt(0);
catalogManager.debug.message(2, "Unrecognized token parsing catalog", keyword);
}
} | java | {
"resource": ""
} |
q179388 | Catalog.parseAllCatalogs | test | public void parseAllCatalogs()
throws MalformedURLException, IOException {
// Parse all the subordinate catalogs
for (int catPos = 0; catPos < catalogs.size(); catPos++) {
Catalog c = null;
try {
c = (Catalog) catalogs.elementAt(catPos);
} catch (ClassCastException e) {
String catfile ... | java | {
"resource": ""
} |
q179389 | Catalog.resolveDoctype | test | public String resolveDoctype(String entityName,
String publicId,
String systemId)
throws MalformedURLException, IOException {
String resolved = null;
catalogManager.debug.message(3, "resolveDoctype("
+entityName+","+publicId+","+systemId+")");
systemId = normalizeURI(systemId);... | java | {
"resource": ""
} |
q179390 | Catalog.resolveDocument | test | public String resolveDocument()
throws MalformedURLException, IOException {
// If there's a DOCUMENT entry, return it
catalogManager.debug.message(3, "resolveDocument");
Enumeration enumt = catalogEntries.elements();
while (enumt.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enumt.nex... | java | {
"resource": ""
} |
q179391 | Catalog.resolveSystem | test | public String resolveSystem(String systemId)
throws MalformedURLException, IOException {
catalogManager.debug.message(3, "resolveSystem("+systemId+")");
systemId = normalizeURI(systemId);
if (systemId != null && systemId.startsWith("urn:publicid:")) {
systemId = PublicId.decodeURN(systemId);
... | java | {
"resource": ""
} |
q179392 | Catalog.resolveLocalURI | test | protected String resolveLocalURI(String uri)
throws MalformedURLException, IOException {
Enumeration enumt = catalogEntries.elements();
while (enumt.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enumt.nextElement();
if (e.getEntryType() == URI
&& (e.getEntryArg(0).equals(uri))) {
retu... | java | {
"resource": ""
} |
q179393 | Catalog.resolveSubordinateCatalogs | test | protected synchronized String resolveSubordinateCatalogs(int entityType,
String entityName,
String publicId,
String systemId)
throws MalformedURLException, IOException {
for (int catPos = 0; catPos < catalogs.size(); catPos++) {
Catalog c = null;
try {
c = (Catalog) ... | java | {
"resource": ""
} |
q179394 | Catalog.makeAbsolute | test | protected String makeAbsolute(String sysid) {
URL local = null;
sysid = fixSlashes(sysid);
try {
local = new URL(base, sysid);
} catch (MalformedURLException e) {
catalogManager.debug.message(1, "Malformed URL on system identifier", sysid);
}
if (local != null) {
return loca... | java | {
"resource": ""
} |
q179395 | Catalog.normalizeURI | test | protected String normalizeURI(String uriref) {
String newRef = "";
byte[] bytes;
if (uriref == null) {
return null;
}
try {
bytes = uriref.getBytes("UTF-8");
} catch (UnsupportedEncodingException uee) {
// this can't happen
catalogManager.debug.message(1, "UTF-8 is an u... | java | {
"resource": ""
} |
q179396 | Catalog.encodedByte | test | protected String encodedByte (int b) {
String hex = Integer.toHexString(b).toUpperCase();
if (hex.length() < 2) {
return "%0" + hex;
} else {
return "%" + hex;
}
} | java | {
"resource": ""
} |
q179397 | Catalog.addDelegate | test | protected void addDelegate(CatalogEntry entry) {
int pos = 0;
String partial = entry.getEntryArg(0);
Enumeration local = localDelegate.elements();
while (local.hasMoreElements()) {
CatalogEntry dpe = (CatalogEntry) local.nextElement();
String dp = dpe.getEntryArg(0);
if (dp.equals(par... | java | {
"resource": ""
} |
q179398 | SoftValueRef.create | test | static <K, V> SoftValueRef<K, V> create(K key, V val, ReferenceQueue<V> q)
{
if (val == null)
return null;
else
return new SoftValueRef<K, V>(key, val, q);
} | java | {
"resource": ""
} |
q179399 | ThrowableHandler.fireOnThrowable | test | protected static void fireOnThrowable(int type, Throwable t) {
Object[] list = listeners.toArray();
for (int i=0; i<list.length; i++) {
((ThrowableListener)list[i]).onThrowable(type, t);
}
} | java | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.