code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public static void addToHeader(final String scriptname) {
if (!CssResources.isInHeader(scriptname)) {
final LinkElement styleLinkElement = Browser.getDocument().createLinkElement();
styleLinkElement.setRel(CssResources.REL_TYPE);
styleLinkElement.setType(CssResources.SCRIPT_TYPE);
styleLinkE... | java |
public boolean isValid(final CharSequence value, final ConstraintValidatorContext context) {
if (value == null) {
return true;
}
final String valueAsString = value.toString();
String digitsAsString;
char checkDigit;
try {
digitsAsString = this.extractVerificationString(valueAsString... | java |
public void clearErrors() {
errorLabel.setText(StringUtils.EMPTY);
errorLabel.getElement().getStyle().setDisplay(Display.NONE);
if (contents.getWidget() != null) {
contents.getWidget().removeStyleName(decoratorStyle.errorInputStyle());
contents.getWidget().removeStyleName(decoratorStyle.validInp... | java |
public final String get(final String pkey) {
try {
// Replace "." with "_" in the key to match what ConstantsImplCreator does.
return pkey == null ? null : messages.getString(pkey.replace(".", "_"));
} catch (final MissingResourceException e) {
return null;
}
} | java |
@SuppressWarnings("unchecked")
public static <T> List<T> getInstanceList(Class<T> type) {
if (type == null) {
throw new IllegalArgumentException("Type should not be empty");
}
List<T> loader = (List<T>) EXTENSION_LOCATOR.get(type);
if (loader == null) {
try {
lock.lock();
List<T> insta... | java |
protected void initialize(DDFManager manager, Object data, Class<?>[] typeSpecs, String name, Schema schema)
throws DDFException {
this.validateSchema(schema);
this.setManager(manager); // this must be done first in case later stuff needs a manager
if (typeSpecs != null) {
this.getRepresentatio... | java |
private void validateName(String name) throws DDFException {
Boolean isNameExisted;
try {
this.getManager().getDDFByName(name);
isNameExisted = true;
} catch (DDFException e) {
isNameExisted = false;
}
if(isNameExisted) {
throw new DDFException(String.format("DDF with name %s... | java |
public final void init(final ConfigurationState configState) {
final ConstraintValidatorFactory configConstraintValidatorFactory =
configState.getConstraintValidatorFactory();
constraintValidatorFactory = configConstraintValidatorFactory == null
? GWT.<ConstraintValidatorFactory>create(Constrain... | java |
public static SafeHtml messagesToList(final Set<String> messages) {
final SafeHtmlBuilder sbList = new SafeHtmlBuilder();
sbList.appendHtmlConstant("<ul>");
for (final String message : messages) {
sbList.appendHtmlConstant("<li>");
sbList.appendEscaped(message);
sbList.appendHtmlConstant("... | java |
public static String messagesToString(final Set<String> messages) {
final SafeHtmlBuilder sb = new SafeHtmlBuilder();
for (final String message : messages) {
sb.appendEscaped(message);
sb.appendEscaped("\n");
}
return sb.toSafeHtml().asString();
} | java |
public JClassType getAssociationType(final PropertyDescriptor ppropertyDescriptor,
final boolean puseField) {
final JType type = getElementType(ppropertyDescriptor, puseField);
if (type == null) {
return null;
}
final JArrayType jarray = type.isArray();
if (jarray != null) {
return... | java |
public void checkDefaultGroupSequenceIsExpandable(final List<Class<?>> defaultGroupSequence)
throws GroupDefinitionException {
for (final Map.Entry<Class<?>, List<Group>> entry : sequenceMap.entrySet()) {
final Class<?> sequence = entry.getKey();
final List<Group> groups = entry.getValue();
... | java |
public static ConstraintViolationImpl<Object> instantiate(
final SerializationStreamReader streamReader) throws SerializationException {
final String messageTemplate = null;
final String interpolatedMessage = streamReader.readString();
final Class<Object> rootBeanClass = null;
final Object rootBe... | java |
public static void checkOffsetAndCount(final byte[] buffer, final int byteOffset,
final int byteCount) {
// Ensure we throw a NullPointerException instead of a JavascriptException in case the
// given buffer is null.
if (buffer == null) {
throw new NullPointerException();
}
checkOffsetAn... | java |
public static void checkOffsetAndCount(final char[] buffer, final int charOffset,
final int charCount) {
// Ensure we throw a NullPointerException instead of a JavascriptException in case the
// given buffer is null.
if (buffer == null) {
throw new NullPointerException();
}
checkOffsetAn... | java |
private static void checkOffsetAndCount(final int length, final int offset, final int count) {
if (offset < 0 || count < 0 || offset + count > length) {
throw new IndexOutOfBoundsException();
}
} | java |
public static void doesNotContain(@Nullable final String textToSearch, final String substring,
final Supplier<String> messageSupplier) {
if (StringUtils.hasLength(textToSearch) && StringUtils.hasLength(substring)
&& textToSearch.contains(substring)) {
throw new IllegalArgumentException(Assert.nu... | java |
protected static Resources getDefaultResources() { // NOPMD it's thread save!
if (SelectBoxWithIconInputWidget.defaultResource == null) {
synchronized (Resources.class) {
if (SelectBoxWithIconInputWidget.defaultResource == null) {
SelectBoxWithIconInputWidget.defaultResource = GWT.create(Res... | java |
public void fillEntries(final List<IdAndNamePlusIconBean<T>> pentries) {
this.entries.clear();
this.radioButtons.clear();
this.entries.addAll(pentries);
boolean selected = false;
for (final IdAndNamePlusIconBean<T> entry : this.entries) {
final FlowPanel option = new FlowPanel();
option.... | java |
public RocMetric addIn(RocMetric other) {
// Sum tpr, fpr for each threshold
int i = 0;
// start from 1, 0-index is for threshold value
int j = 1;
while (i < this.pred.length) {
if (this.pred[i] != null) {
if (other.pred[i] != null) {
j = 1;
// P = P + P
/... | java |
public void addSourceActiveParticipant(String userId, String altUserId, String userName, String networkId, boolean isRequestor)
{
addActiveParticipant(
userId,
altUserId,
userName,
isRequestor,
Collections.singletonList(new DICOMActiveParticipantRoleIdCodes.Source()),
networkId);
} | java |
public void addDestinationActiveParticipant(String userId, String altUserId, String userName, String networkId, boolean isRequestor)
{
addActiveParticipant(
userId,
altUserId,
userName,
isRequestor,
Collections.singletonList(new DICOMActiveParticipantRoleIdCodes.Destination()),
networkId)... | java |
public void addSubmissionSetParticipantObject(String submissionSetUniqueId)
{
addParticipantObjectIdentification(
new IHETransactionParticipantObjectIDTypeCodes.SubmissionSet(),
null,
null,
null,
submissionSetUniqueId,
RFC3881ParticipantObjectTypeCodes.SYSTEM,
RFC3881ParticipantObje... | java |
public void addDocumentUriParticipantObject(String documentRetrieveUri, String documentUniqueId)
{
List<TypeValuePairType> tvp = new LinkedList<>();
if (documentUniqueId != null) {
tvp.add(getTypeValuePair("XDSDocumentEntry.uniqueId", documentUniqueId.getBytes()));
}
addParticipantObjectIdentification(
... | java |
public void addDocumentParticipantObject(String documentUniqueId, String repositoryUniqueId, String homeCommunityId)
{
List<TypeValuePairType> tvp = new LinkedList<>();
//SEK - 10/19/2011 - added check for empty or null, RE: Issue Tracker artifact artf2295 (was Issue 135)
if (!EventUtils.isEmptyOrNull(rep... | java |
public void addValueSetParticipantObject(String valueSetUniqueId, String valueSetName, String valueSetVersion)
{
if (valueSetName == null){
valueSetName = "";
}
if (valueSetVersion == null){
valueSetVersion = "";
}
List<TypeValuePairType> tvp = new LinkedList<>();
tvp.add(getTypeValuePair("Value Set ... | java |
public static XCARespondingGatewayAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (XCARespondingGatewayAuditor)ctx.getAuditor(XCARespondingGatewayAuditor.class);
} | java |
public void auditCrossGatewayQueryEvent(
RFC3881EventOutcomeCodes eventOutcome,
String initiatingGatewayUserId, String initiatingGatewayUserName, String initiatingGatewayIpAddress,
String respondingGatewayEndpointUri,
String storedQueryUUID, String adhocQueryRequestPayload, String homeCommunityId,
Strin... | java |
public void auditCrossGatewayRetrieveEvent(
RFC3881EventOutcomeCodes eventOutcome,
String initiatingGatewayUserId, String initiatingGatewayIpAddress,
String respondingGatewayEndpointUri,
String initiatingGatewayUserName,
String[] documentUniqueIds, String[] repositoryUniqueIds, String homeCommun... | java |
public void auditRetrieveDocumentSetEvent(RFC3881EventOutcomeCodes eventOutcome,
String repositoryEndpointUri,
String userName,
String[] documentUniqueIds, String[] repositoryUniqueIds, String homeCommunityIds[],
List<CodedValueType> purposesOfUse, List<CodedValueType> userRoles)
{
if ... | java |
public void auditRegistryStoredQueryEvent(
RFC3881EventOutcomeCodes eventOutcome,
String registryEndpointUri,
String consumerUserName,
String storedQueryUUID, String adhocQueryRequestPayload, String homeCommunityId,
String patientId,
List<CodedValueType> purposesOfUse,
List<CodedV... | java |
@Override
public void write(DataWriter writer) throws IOException {
writer.writeInt(pos); /* array position */
writer.writeInt(val); /* data value */
writer.writeLong(scn); /* SCN value */
} | java |
public synchronized byte[] getBuf(int len) {
for (int i = 0; i < mBuffersBySize.size(); i++) {
byte[] buf = mBuffersBySize.get(i);
if (buf.length >= len) {
mCurrentSize -= buf.length;
mBuffersBySize.remove(i);
mBuffersByLastUse.remove(buf);... | java |
public synchronized void returnBuf(byte[] buf) {
if (buf == null || buf.length > mSizeLimit) {
return;
}
mBuffersByLastUse.add(buf);
int pos = Collections.binarySearch(mBuffersBySize, buf, BUF_COMPARATOR);
if (pos < 0) {
pos = -pos - 1;
}
m... | java |
protected byte[] ensure128BitMD5(byte[] digest) {
if(digest.length == MD5_LENGTH) {
return digest;
} else if(digest.length > MD5_LENGTH) {
byte[] b = new byte[MD5_LENGTH];
System.arraycopy(digest, 0, b, 0, MD5_LENGTH);
return b;
} else {
... | java |
protected void ensureCapacity() {
if(_buffer.remaining() < 8) {
ByteBuffer b = ByteBuffer.allocate(_buffer.capacity() << 1);
_buffer.flip();
b.put(_buffer);
_buffer = b;
}
} | java |
@Override
public Position get(Position pos, List<Event<T>> list) {
EventBatch<T> b;
// Return null if the position is out of retention or in the indexed form.
if(pos.getOffset() < getOrigin() || pos.isIndexed()) {
return null;
}
// Get events fro... | java |
protected boolean mergeEventsToLastBatch() throws IOException {
// Checks if we can merge _batch into _lastBatch
if(_lastBatch != null && _eventBatchSize >= (_lastBatch.getSize() + _batch.getSize())) {
_batch.setCompletionTime(System.currentTimeMillis());
if(_flushLi... | java |
static Schema createPersonSchema() {
List<Field> fields = new ArrayList<Field>();
fields.add(new Field("id", Schema.create(Type.INT), null, null));
fields.add(new Field("age", Schema.create(Type.INT), null, null));
fields.add(new Field("fname", Schema.create(Type.STRING), null, null));
... | java |
@org.openjdk.jmh.annotations.Benchmark
public CountDownLatch get(States.GenericState state) throws Exception {
//JusLog.ResponseLog.on();
//JusLog.MarkerLog.on();
CountDownLatch latch = new CountDownLatch(state.targetBacklog);
if(state.pipeline==Pipeline.JusDef) {
Request... | java |
public void remap() throws IOException {
if (_mmapArray == null) {
open();
return;
}
long length = _raf.length();
long mappedLength = getMappedLength();
if (length != mappedLength) {
// Allocate mapped buffer array
... | java |
public final long getMappedLength() {
MappedByteBuffer[] mmapArray = _mmapArray;
long length = 0;
if (mmapArray != null) {
for (MappedByteBuffer mmap : mmapArray) {
length += mmap.capacity();
}
}
return length;
} | java |
public static <T> Response<T> success(T result, Cache.Entry cacheEntry) {
return new Response<T>(result, cacheEntry);
} | java |
public synchronized void setOption(String key, String value)
{
if (key == null || value == null) {
return;
}
config.put(key, value);
} | java |
protected void auditQueryEvent(
boolean systemIsSource, // System Type
IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, // Event
String auditSourceId, String auditSourceEnterpriseSiteId, // Audit Source
String sourceUserId, String sourceAltUserId, String sourceUserName, Strin... | java |
static Set<String> parsePathParameters(String path) {
Matcher m = PARAM_URL_REGEX.matcher(path);
Set<String> patterns = new LinkedHashSet<>();
while (m.find()) {
patterns.add(m.group(1));
}
return patterns;
} | java |
@Deprecated
public byte[] getPostBody() throws AuthFailureError {
// Note: For compatibility with legacy clients of volley, this implementation must remain
// here instead of simply calling the getBody() function because this function must
// call getPostParams() and getPostParamsEncoding() ... | java |
public byte[] getBody() throws AuthFailureError {
Map<String, String> params = getParams();
if (params != null && params.size() > 0) {
return encodeParameters(params, getParamsEncoding());
}
return null;
} | java |
protected DataStore<byte[], byte[]> createDataStore(File homeDir, int initialCapacity) throws Exception {
StoreConfig config = new StoreConfig(homeDir, initialCapacity);
config.setBatchSize(10000);
config.setNumSyncBatches(100);
// Configure store segments
confi... | java |
public void populate() throws Exception {
for (int i = 0; i < _initialCapacity; i++) {
String str = "key." + i;
byte[] key = str.getBytes();
byte[] value = createDataForKey(str);
_store.put(key, value);
}
_store.sync();
} | java |
public void doRandomReads(int readCnt) {
Random rand = new Random();
for (int i = 0; i < readCnt; i++) {
int keyId = rand.nextInt(_initialCapacity);
String str = "key." + keyId;
byte[] key = str.getBytes();
byte[] value = _store.get(key);
Syste... | java |
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
this.expiresMinutes = readLong(config.getInitParameter(INIT_PARAM_EXPIRES_MINUTES), this.expiresMinutes);
this.cacheControl = config.getInitParameter(INIT_PARAM_CACHE_CONTROL) != null ? config.getI... | java |
public void addApplicationParticipant(String userId, String altUserId, String userName, String networkId)
{
addActiveParticipant(
userId,
altUserId,
userName,
false,
Collections.singletonList(new DICOMActiveParticipantRoleIdCodes.Application()),
networkId);
} | java |
public void addApplicationStarterParticipant(String userId, String altUserId, String userName, String networkId)
{
addActiveParticipant(
userId,
altUserId,
userName,
true,
Collections.singletonList(new DICOMActiveParticipantRoleIdCodes.ApplicationLauncher()),
networkId);
} | java |
@Override
public synchronized void invalidate(String key, boolean fullExpire) {
Entry entry = get(key);
if (entry != null) {
entry.softTtl = 0;
if (fullExpire) {
entry.ttl = 0;
}
put(key, entry);
}
} | java |
private String getFilenameForKey(String key) {
int firstHalfLength = key.length() / 2;
String localFilename = String.valueOf(key.substring(0, firstHalfLength).hashCode());
localFilename += String.valueOf(key.substring(firstHalfLength).hashCode());
return localFilename;
} | java |
private void removeEntry(String key) {
CacheHeader entry = mEntries.get(key);
if (entry != null) {
mTotalSize -= entry.size;
mEntries.remove(key);
}
} | java |
public synchronized void wrap(List<Segment> segments) throws IOException {
int newWorkingGeneration = (_workingGeneration + 1) % Integer.MAX_VALUE;
int newWorkingSectionOffset = (_workingSectionOffset + _bytesPerSection) % _bytesPerSegment;
int cnt = segments.size();
int pos = _segmentDa... | java |
public static Document createDomDocument() throws Exception
{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
return builder.newDocument();
} | java |
public FormEncodingBuilder add(String name, String value) {
if (content.size() > 0) {
content.writeByte('&');
}
HttpUrl.canonicalize(content, name, 0, name.length(),
HttpUrl.FORM_ENCODE_SET, false, false, true, true);
content.writeByte('=');
HttpUrl.ca... | java |
public static String toPackageName(String nsUri) {
if (nsUri == null || nsUri.length() == 0) {
return null;
}
// remove scheme and :, if present
// spec only requires us to remove 'http' and 'urn'...
int idx = nsUri.indexOf(':');
String scheme = "";
... | java |
public static String toNamespace(String packageName) {
if (packageName == null || packageName.length() == 0) {
return null;
}
List < String > tokens = reverse(tokenize(packageName, "."));
StringBuilder buf = new StringBuilder("http://");
for (int i = 1; i < ... | java |
public static XCAInitiatingGatewayAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (XCAInitiatingGatewayAuditor)ctx.getAuditor(XCAInitiatingGatewayAuditor.class);
} | java |
public void auditRetrieveDocumentSetEvent(
RFC3881EventOutcomeCodes eventOutcome,
String consumerUserId, String consumerUserName, String consumerIpAddress,
String repositoryEndpointUri,
String[] documentUniqueIds, String[] repositoryUniqueIds, String[] homeCommunityIds,
List<CodedValueType> purposesOfUse... | java |
public Position get(Position pos, Map<K, Event<V>> map) {
ArrayList<Event<K>> list = new ArrayList<Event<K>>(1000);
Position nextPos = get(pos, list);
for(Event<K> evt : list) {
K key = evt.getValue();
if(key != null) {
try {
V... | java |
public boolean isValid(CobolContext cobolContext, byte[] hostData, int start) {
return isValid(javaClass, cobolContext, hostData, start);
} | java |
public FromHostPrimitiveResult < T > fromHost(CobolContext cobolContext,
byte[] hostData, int start) {
return fromHost(javaClass, cobolContext, hostData, start);
} | java |
protected static String formatMessage(String message, byte[] hostData,
int start, int curPos, int bytesLen) {
StringBuilder sb = new StringBuilder();
sb.append(message);
if (hostData != null && hostData.length > 0 && curPos < hostData.length
&& curPos >= start && byt... | java |
public static IHEAuditor getAuditor(Class<? extends IHEAuditor> clazz, AuditorModuleConfig configToUse, AuditorModuleContext contextToUse)
{
IHEAuditor auditor = AuditorFactory.getAuditorForClass(clazz);
if (auditor != null) {
auditor.setConfig(configToUse);
auditor.setContext(contextToUse);
}
re... | java |
public static IHEAuditor getAuditor(Class<? extends IHEAuditor> clazz, AuditorModuleConfig config, boolean useGlobalContext)
{
AuditorModuleContext context;
if (!useGlobalContext) {
context = (AuditorModuleContext)ContextInitializer.initialize(config);
} else {
context = AuditorModuleContext.getContext();
... | java |
public static IHEAuditor getAuditor(String className, AuditorModuleConfig config, AuditorModuleContext context)
{
Class<? extends IHEAuditor> clazz = AuditorFactory.getAuditorClassForClassName(className);
return getAuditor(clazz, config, context);
} | java |
public static IHEAuditor getAuditor(String className, AuditorModuleConfig config, boolean useGlobalContext)
{
Class<? extends IHEAuditor> clazz = AuditorFactory.getAuditorClassForClassName(className);
return getAuditor(clazz, config, useGlobalContext);
} | java |
@SuppressWarnings("unchecked")
public static Class<? extends IHEAuditor> getAuditorClassForClassName(String className)
{
try {
Class<?> clazz = Class.forName(className);
return (Class<? extends IHEAuditor>)clazz;
} catch (ClassCastException e) {
LOGGER.error("The requested class "+ className +" is not a ... | java |
private static IHEAuditor getAuditorForClass(Class<? extends IHEAuditor> clazz)
{
if (null == clazz) {
LOGGER.error("Error - Cannot specify a null auditor class");
} else {
try {
return clazz.newInstance();
} catch (ClassCastException e) {
LOGGER.error("The requested class "+ clazz.getName() +" is... | java |
public String encodedUsername() {
if (username.isEmpty()) return "";
int usernameStart = scheme.length() + 3; // "://".length() == 3.
int usernameEnd = delimiterOffset(url, usernameStart, url.length(), ":@");
return url.substring(usernameStart, usernameEnd);
} | java |
public String encodedPassword() {
if (password.isEmpty()) return "";
int passwordStart = url.indexOf(':', scheme.length() + 3) + 1;
int passwordEnd = url.indexOf('@');
return url.substring(passwordStart, passwordEnd);
} | java |
public synchronized Bitmap getBitmap(BitmapFactory.Options options) {
Bitmap bitmap = null;
synchronized (bitmapsBySize) {
final Iterator<Bitmap> iterator = bitmapsBySize.iterator();
Bitmap item;
while (iterator.hasNext()) {
item = iterator.next();
... | java |
public synchronized void returnBitmap(Bitmap bitmap) {
if (bitmap == null || bitmapsBySize.contains(bitmap) ) {
return;
} else if(getBitmapSize(bitmap) > sizeLimit || !canBePooled(bitmap)) {
return;
}
bitmapsByLastUse.add(bitmap);
int pos = Collections.bin... | java |
protected static int getBytesPerPixel(Bitmap.Config config) {
if (config == Bitmap.Config.ARGB_8888) {
return 4;
} else if (config == Bitmap.Config.RGB_565) {
return 2;
} else if (config == Bitmap.Config.ARGB_4444) {
return 2;
} else if (config == Bitm... | java |
public static String parseCharset(Map<String, String> headers, String defaultCharset) {
String contentType = headers.get(HTTP.CONTENT_TYPE);
if (contentType != null) {
String[] params = contentType.split(";");
for (int i = 1; i < params.length; i++) {
String[] pai... | java |
public void stopWhenDone() {
Thread t = new Thread(new Runnable() {
@Override
public void run() {
while (getCurrentRequests() > 0) {
try {
Thread.sleep(33);
} catch (InterruptedException e) {
... | java |
public <R extends RequestQueue> R addQueueMarkerListener(
RequestListener.MarkerListener markerListener) {
if (markerListener != null) {
synchronized (markerListeners) {
this.markerListeners.add(markerListener);
}
}
return (R) this;
} | java |
public <R extends RequestQueue> R removeQueueMarkerListener(RequestListener.MarkerListener
markerListener) {
synchronized (markerListeners) {
this.markerListeners.remove(markerListener);
}
return (R) this;
} | java |
public void cancelAll(final Object tag) {
if (tag == null) {
throw new IllegalArgumentException("Cannot cancelAll with a null tag");
}
cancelAll(new RequestFilter() {
@Override
public boolean apply(Request<?> request) {
return request.getTag() ... | java |
public static Clock parseClock(String str) {
if(str == null || str.length() == 0) {
return Clock.ZERO;
}
String[] parts = str.split(":");
long[] values = new long[parts.length];
for(int i = 0; i < values.length; i++) {
values[i] = Long.parseLong(p... | java |
public static Clock parseClock(byte[] raw) {
if(raw == null || raw.length < 8) {
return Clock.ZERO;
}
int cnt = raw.length >> 3;
long[] values = new long[cnt];
ByteBuffer bb = ByteBuffer.wrap(raw);
for(int i = 0; i < values.length; i++) {
... | java |
public Occurred compareTo(Clock c) {
if(this == c) return Occurred.EQUICONCURRENTLY;
if(ZERO == c) return Occurred.AFTER;
if(this == ZERO) return Occurred.BEFORE;
int neg = 0, pos = 0, eq = 0;
try {
final long[] dst = c.values();
final int len = d... | java |
public static String resolveFigurative(
final String value,
final int length,
final boolean quoteIsQuote) {
if (value == null || value.length() == 0) {
return value;
}
String ucValue = value.toUpperCase(Locale.getDefault());
if (ucValue.m... | java |
public static String fill(
final String prefix,
final String charSequence,
final int times) {
if (times < 1) {
return "";
}
StringBuilder sb = new StringBuilder();
if (prefix != null) {
sb.append(prefix);
}
for (... | java |
public static String stripDelimiters(final String value) {
if (value != null && value.length() > 1) {
if (value.charAt(0) == value.charAt(value.length() - 1)
&& (value.charAt(0) == '\'')) {
return value.substring(1, value.length() - 1);
}
i... | java |
private boolean isPresent(CobolOptionalType optionalType) {
if (optionalType.getDependingOn() != null) {
return getOdoValue(optionalType.getDependingOn()) > 0;
}
return true;
} | java |
public boolean isCustomVariable(CobolPrimitiveType < ? > type, String name) {
if (type.isCustomVariable()) {
return true;
}
if (customVariables != null && customVariables.contains(name)) {
return true;
}
if (customChoiceStrategy != null
&& ... | java |
public String getAuditRepositoryTransport()
{
String transport = getOption(AUDITOR_AUDIT_REPOSITORY_TRANSPORT_KEY);
return (transport != null) ? transport : AUDITOR_AUDIT_REPOSITORY_DEFAULT_TRANSPORT;
} | java |
public void setAuditRepositoryUri(URI uri)
{
setAuditRepositoryHost(uri.getHost());
setAuditRepositoryPort(uri.getPort());
setAuditRepositoryTransport(uri.getScheme());
} | java |
public static PIXSourceAuditor getAuditor()
{
AuditorModuleContext ctx = AuditorModuleContext.getContext();
return (PIXSourceAuditor)ctx.getAuditor(PIXSourceAuditor.class);
} | java |
public void auditCreatePatientRecordV3Event(RFC3881EventOutcomeCodes eventOutcome,
String pixManagerUri, String receivingFacility, String receivingApp,
String sendingFacility, String sendingApp,
String hl7MessageId,
String patientId,
List<CodedValueType> purposesOfUse,
List<CodedValueType>... | java |
public void auditDeletePatientRecordEvent(RFC3881EventOutcomeCodes eventOutcome,
String pixManagerUri, String receivingFacility, String receivingApp,
String sendingFacility, String sendingApp,
String hl7MessageControlId,
String patientId)
{
if (!isAuditorEnabled()) {
return;
}
auditPatientReco... | java |
public static NodeAuthModuleContext getContext()
{
SecurityContext securityContext = SecurityContextFactory.getSecurityContext();
if (!securityContext.isInitialized()) {
securityContext.initialize();
}
AbstractModuleContext moduleContext = securityContext.getModuleContext(CONTEXT_ID);
if (!(moduleCo... | java |
protected AddressArray createAddressArray(File homeDir,
int batchSize,
int numSyncBatches,
boolean indexesCached) throws Exception {
AddressArrayFactory factory = new Address... | java |
protected boolean canSplitOnCapacity() {
if(0 < _split) {
// The splitTo must NOT overflow the current capacity
int splitTo = _levelCapacity + _split;
if (capacity() > splitTo && splitTo >= _levelCapacity) {
return true;
}
}
... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.