method2testcases stringlengths 118 6.63k |
|---|
### Question:
LobbyActivity extends AppCompatActivity implements LobbyView { @Override protected void onDestroy() { presenter.onViewDestroyed(); super.onDestroy(); } @OnClick(R.id.generate_report) void onGenerateReportButtonClicked(); @Override void displayReportData(CharSequence report); @Override void hideReportData... |
### Question:
LobbyActivity extends AppCompatActivity implements LobbyView { @OnClick(R.id.generate_report) public void onGenerateReportButtonClicked() { presenter.generateReport(); } @OnClick(R.id.generate_report) void onGenerateReportButtonClicked(); @Override void displayReportData(CharSequence report); @Override v... |
### Question:
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("the specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "the specified topic[%s] contai... |
### Question:
ConsumerOffsetManager extends ConfigManager { public void commitOffset(final String clientHost, final String group, final String topic, final int queueId, final long offset) { String key = topic + TOPIC_GROUP_SEPARATOR + group; this.commitOffset(clientHost, key, queueId, offset); } ConsumerOffsetManager()... |
### Question:
FilterAPI { public static SubscriptionData buildSubscriptionData(final String consumerGroup, String topic, String subString) throws Exception { SubscriptionData subscriptionData = new SubscriptionData(); subscriptionData.setTopic(topic); subscriptionData.setSubString(subString); if (null == subString || s... |
### Question:
UtilAll { public static String currentStackTrace() { StringBuilder sb = new StringBuilder(); StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); for (StackTraceElement ste : stackTrace) { sb.append("\n\t"); sb.append(ste.toString()); } return sb.toString(); } static int getPid(); sta... |
### Question:
UtilAll { public static String timeMillisToHumanString() { return timeMillisToHumanString(System.currentTimeMillis()); } static int getPid(); static String currentStackTrace(); static String offset2FileName(final long offset); static long computeEclipseTimeMilliseconds(final long beginTime); static boole... |
### Question:
UtilAll { public static int getPid() { RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean(); String name = runtime.getName(); try { return Integer.parseInt(name.substring(0, name.indexOf('@'))); } catch (Exception e) { return -1; } } static int getPid(); static String currentStackTrace(); static ... |
### Question:
UtilAll { public static boolean isBlank(String str) { int strLen; if (str == null || (strLen = str.length()) == 0) { return true; } for (int i = 0; i < strLen; i++) { if ((Character.isWhitespace(str.charAt(i)) == false)) { return false; } } return true; } static int getPid(); static String currentStackTr... |
### Question:
MixAll { public static List<String> getLocalInetAddress() { List<String> inetAddressList = new ArrayList<String>(); try { Enumeration<NetworkInterface> enumeration = NetworkInterface.getNetworkInterfaces(); while (enumeration.hasMoreElements()) { NetworkInterface networkInterface = enumeration.nextElement... |
### Question:
ModelUtils { @NonNull static <T extends ModelObject> T deserializeModel(@NonNull JSONObject jsonObject, @NonNull Class<T> modelClass) { final ModelObject.Serializer<T> serializer = (ModelObject.Serializer<T>) ModelUtils.readModelSerializer(modelClass); return serializer.deserialize(jsonObject); } private ... |
### Question:
JsonUtils { @Nullable public static List<String> parseOptStringList(@Nullable JSONArray jsonArray) { if (jsonArray == null) { return null; } final List<String> list = new ArrayList<>(); for (int i = 0; i < jsonArray.length(); i++) { final String item = jsonArray.optString(i, null); if (item != null) { lis... |
### Question:
BaseHttpUrlConnectionFactory { @NonNull HttpURLConnection createHttpUrlConnection(@NonNull String url) throws IOException { final HttpURLConnection urlConnection = (HttpURLConnection) new URL(url).openConnection(); if (urlConnection instanceof HttpsURLConnection) { ((HttpsURLConnection) urlConnection).set... |
### Question:
ModelUtils { @Nullable public static <T extends ModelObject> T deserializeOpt(@Nullable JSONObject jsonObject, @NonNull ModelObject.Serializer<T> serializer) { return jsonObject == null ? null : serializer.deserialize(jsonObject); } private ModelUtils(); @Nullable static T deserializeOpt(@Nullable JSONOb... |
### Question:
ModelUtils { @Nullable public static <T extends ModelObject> List<T> deserializeOptList(@Nullable JSONArray jsonArray, @NonNull ModelObject.Serializer<T> serializer) { if (jsonArray == null) { return null; } final List<T> list = new ArrayList<>(); for (int i = 0; i < jsonArray.length(); i++) { final JSONO... |
### Question:
ModelUtils { @Nullable public static <T extends ModelObject> JSONObject serializeOpt(@Nullable T modelObject, @NonNull ModelObject.Serializer<T> serializer) { return modelObject == null ? null : serializer.serialize(modelObject); } private ModelUtils(); @Nullable static T deserializeOpt(@Nullable JSONObj... |
### Question:
ModelUtils { @Nullable public static <T extends ModelObject> JSONArray serializeOptList(@Nullable List<T> modelList, @NonNull ModelObject.Serializer<T> serializer) { if (modelList == null || modelList.isEmpty()) { return null; } final JSONArray jsonArray = new JSONArray(); for (T model : modelList) { json... |
### Question:
XmlUtils { public static List<String> determineArrays(InputStream in) throws XMLStreamException { Set<String> arrayKeys = new HashSet<>(); XMLStreamReader sr = null; try { XMLInputFactory f = XMLInputFactory.newFactory(); sr = f.createXMLStreamReader(in); getObjectElements(null, sr, new LongAdder(), array... |
### Question:
CustomPatternFileFilter implements FileFilter { @Override public boolean accept(File file) { String fileNameInLowerCase = file.getName().toLowerCase(); FileTypeEnum fileType = FileTypeEnum.parseByFileName(fileNameInLowerCase); return (null != fileType) && fileNameInLowerCase.matches(pattern); } CustomPatt... |
### Question:
ApplicationUtils { public static final String getVersion() { String version = getVersionFromManifest(); if (null == version || version.isEmpty()) { version = UNNOWN_VERSION; } return version; } private ApplicationUtils(); static final String getVersion(); static final String UNNOWN_VERSION; }### Answer:
... |
### Question:
HostServicesProvider { public HostServices getHostServices() { if (hostServices == null) { throw new IllegalStateException("Host services not initialized"); } return hostServices; } void init(HostServices hostServices); HostServices getHostServices(); static final HostServicesProvider INSTANCE; }### Answ... |
### Question:
PropertiesLoader { public Properties load() throws IOException { Properties properties = new Properties(); LOGGER.debug("Loading properties from {}", propertiesFile.getAbsolutePath()); if (propertiesFile.exists()) { try (InputStream in = new FileInputStream(propertiesFile)) { properties.load(in); LOGGER.d... |
### Question:
ApplicationProperties { public void setPropertiesLoader(PropertiesLoader loader) { if (loader == null) { throw new IllegalArgumentException("Properties loader cannot be null"); } this.loader = loader; } ApplicationProperties(PropertiesLoader loader); String getLastOpenedPath(); void saveLastOpenedPath(Fil... |
### Question:
ApplicationProperties { public String getLastOpenedPath() { if (!isInitialized) { loadProperties(); } String path = properties.getProperty(Config.LAST_DIRECTORY); if (null == path || path.trim().isEmpty()) { return null; } else { File f = new File(path); if (!f.exists()) { return null; } } return path; } ... |
### Question:
ApplicationCommandLine { public static ApplicationCommandLine parse(String[] args) throws java.text.ParseException, FileNotFoundException { CommandLineParser parser = new DefaultParser(); ApplicationCommandLine cmd = null; try { cmd = new ApplicationCommandLine(parser.parse(OPTIONS, args, true)); cmd.chec... |
### Question:
ApplicationCommandLine { public static void printHelp() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp(HELP_WINDOW_SIZE, "\n java -jar xml2json.jar " + PARAM_SIGN + Config.PAR_NO_GUI + " " + PARAM_SIGN + Config.PAR_SOURCE_FOLDER + "=[path_to_source_folder] " + PARAM_SIGN + Config.PAR... |
### Question:
JsonXMLArrayProvider extends AbstractJsonXMLProvider { @Override protected boolean isReadWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { if (!isSupported(mediaType)) { return false; } Class<?> componentType = getComponentType(type, genericType); return component... |
### Question:
JsonXMLArrayProvider extends AbstractJsonXMLProvider { @Override public void write( Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, Writer stream, Object entry) throws IOException, WebApplicationException { Class<?> componentType ... |
### Question:
AbstractJsonXMLProvider extends JsonXMLBinder implements MessageBodyReader<Object>, MessageBodyWriter<Object> { protected static <A extends Annotation> A getAnnotation(Annotation[] annotations, Class<A> annotationType) { for (Annotation annotation : annotations) { if (annotation.annotationType() == annota... |
### Question:
AbstractJsonXMLProvider extends JsonXMLBinder implements MessageBodyReader<Object>, MessageBodyWriter<Object> { protected String getCharset(MediaType mediaType) { Map<String, String> parameters = mediaType.getParameters(); return parameters.containsKey("charset") ? parameters.get("charset") : "UTF-8"; } A... |
### Question:
ConverterUtils { public static File getConvertedFile(File sourceFile, File destinationFolder) { FileTypeEnum fileType = FileTypeEnum.parseByFileName(sourceFile.getName()); String convertedFileName = ""; String fileNameWithoutExtension = sourceFile.getName().substring(0, sourceFile.getName().lastIndexOf('.... |
### Question:
AbstractJsonXMLProvider extends JsonXMLBinder implements MessageBodyReader<Object>, MessageBodyWriter<Object> { protected JsonXML getJsonXML(Class<?> type, Annotation[] resourceAnnotations) { JsonXML result = getAnnotation(resourceAnnotations, JsonXML.class); if (result == null) { result = type.getAnnotat... |
### Question:
AbstractJsonXMLProvider extends JsonXMLBinder implements MessageBodyReader<Object>, MessageBodyWriter<Object> { @Override public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { return -1; } AbstractJsonXMLProvider(Providers providers); @Override boo... |
### Question:
AbstractJsonXMLProvider extends JsonXMLBinder implements MessageBodyReader<Object>, MessageBodyWriter<Object> { protected boolean isSupported(MediaType mediaType) { return "json".equalsIgnoreCase(mediaType.getSubtype()) || mediaType.getSubtype().endsWith("+json"); } AbstractJsonXMLProvider(Providers provi... |
### Question:
JsonXMLObjectProvider extends AbstractJsonXMLProvider { @Override protected boolean isReadWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { return isSupported(mediaType) && getJsonXML(type, annotations) != null && isBindable(type); } JsonXMLObjectProvider(@Context... |
### Question:
JsonXMLObjectProvider extends AbstractJsonXMLProvider { @Override public Object read( Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, Reader stream) throws IOException, WebApplicationException { JsonXML config = getJsonXML(type, a... |
### Question:
JsonXMLObjectProvider extends AbstractJsonXMLProvider { @Override public void write( Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, Writer stream, Object value) throws IOException, WebApplicationException { JsonXML config = getJs... |
### Question:
WebhookAPI { @GET @Produces(MediaType.APPLICATION_JSON) public static Response get() { return Responses.ok(Webhooks.instance().hooks()); } @GET @Produces(MediaType.APPLICATION_JSON) static Response get(); @GET @Path("/{id}") @Produces(MediaType.APPLICATION_JSON) static Response get(@PathParam("id") long ... |
### Question:
WebhookAPI { @DELETE @Path("/{id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public static Response delete(@PathParam("id") long id) throws NotFound { boolean removed = Webhooks.instance().remove(id); if (removed) { return Responses.noContent(); } else { return Responses... |
### Question:
Notifier implements ServletContextListener { public static URL getDtoChangesUri(TransactionId.W tx, DateTime time) throws IOException { NotifierConfig conf = NotifierConfig.instance(); String urlStr = new Formatter().format( "http: conf.naefAddr(), conf.naefRestApiPort(), conf.naefRestApiVersion()) .toStr... |
### Question:
NameUtilities { public static String getFullName(Class c) { if (c == null) { throw new IllegalArgumentException("class cannot be null"); } StringBuilder name = new StringBuilder(); name.append(c.getPackage().getName()).append("."); Class klaus = c; List<Class> enclosingClasses = new ArrayList<Class>(); wh... |
### Question:
SparqlQcReader { public static List<Resource> loadTasks(String baseFile) throws IOException { List<Resource> testSuites = loadTestSuites(baseFile); List<Resource> testCases = extractTasks(testSuites); return testCases; } static List<Resource> loadTestSuitesSqcf(String baseFile); static List<Resource> ext... |
### Question:
SparqlStmtUtils { public static SparqlStmt optimizePrefixes(SparqlStmt stmt) { optimizePrefixes(stmt, null); return stmt; } static Map<String, Boolean> mentionedEnvVars(SparqlStmt stmt); static List<Var> getUnionProjectVars(Collection<? extends SparqlStmt> stmts); static SparqlStmt optimizePrefixes(Sparq... |
### Question:
UriUtils { public static String replaceNamespace(String base, String replacement) { Matcher m = replaceNamespacePattern.matcher(base); String result = m.replaceAll(replacement); return result; } static Map<String, String> createMapFromUriQueryString(URI uri); static String getNameSpace(String s); static ... |
### Question:
QueryUtils { public static PrefixMapping usedPrefixes(Query query, PrefixMapping global) { PrefixMapping local = query.getPrefixMapping(); PrefixMapping pm = global == null ? local : new PrefixMapping2(global, local); PrefixMapping result = usedReferencePrefixes(query, pm); return result; } static Query ... |
### Question:
JSONReader { public Attributes readDataset(Attributes attrs) { boolean wrappedInArray = next() == Event.START_ARRAY; if (wrappedInArray) next(); expect(Event.START_OBJECT); if (attrs == null) { attrs = new Attributes(); } fmi = null; next(); doReadDataset(attrs); if (wrappedInArray) next(); return attrs; ... |
### Question:
ByteUtils { public static byte[] floatToBytesBE(float f, byte[] bytes, int off) { return intToBytesBE(Float.floatToIntBits(f), bytes, off); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off);... |
### Question:
ByteUtils { public static byte[] floatToBytesLE(float f, byte[] bytes, int off) { return intToBytesLE(Float.floatToIntBits(f), bytes, off); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off);... |
### Question:
ByteUtils { public static byte[] doubleToBytesBE(double d, byte[] bytes, int off) { return longToBytesBE(Double.doubleToLongBits(d), bytes, off); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int... |
### Question:
ByteUtils { public static byte[] doubleToBytesLE(double d, byte[] bytes, int off) { return longToBytesLE(Double.doubleToLongBits(d), bytes, off); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int... |
### Question:
DicomInputStream extends FilterInputStream implements DicomInputHandler, BulkDataCreator { public Attributes readDataset(int len, int stopTag) throws IOException { handler.startDataset(this); readFileMetaInformation(); Attributes attrs = new Attributes(bigEndian, 64); readAttributes(attrs, len, stopTag); ... |
### Question:
DicomOutputStream extends FilterOutputStream { public void writeCommand(Attributes cmd) throws IOException { if (explicitVR || bigEndian) throw new IllegalStateException("explicitVR=" + explicitVR + ", bigEndian=" + bigEndian); cmd.writeGroupTo(this, Tag.CommandGroupLength); } DicomOutputStream(OutputStre... |
### Question:
AttributeSelector implements Serializable { public boolean matches(List<ItemPointer> itemPointers, String privateCreator, int tag) { int level; if (tag != this.tag || !Objects.equals(privateCreator, this.privateCreator) || (itemPointers.size() != (level = level()))) { return false; } for (int i = 0; i < l... |
### Question:
DicomOutputStream extends FilterOutputStream { public void writeDataset(Attributes fmi, Attributes dataset) throws IOException { if (fmi != null) { writeFileMetaInformation(fmi); switchTransferSyntax(fmi.getString(Tag.TransferSyntaxUID, null)); } if (dataset.bigEndian() != bigEndian || encOpts.groupLength... |
### Question:
DicomOutputStream extends FilterOutputStream { public final void setEncodingOptions(DicomEncodingOptions encOpts) { if (encOpts == null) throw new NullPointerException(); this.encOpts = encOpts; } DicomOutputStream(OutputStream out, String tsuid); DicomOutputStream(File file); final void setPreamble(byte... |
### Question:
DicomOutputStream extends FilterOutputStream { public void close() throws IOException { try { finish(); } catch (IOException ignored) { } super.close(); } DicomOutputStream(OutputStream out, String tsuid); DicomOutputStream(File file); final void setPreamble(byte[] preamble); final boolean isExplicitVR()... |
### Question:
DicomOutputStream extends FilterOutputStream { public void writeFileMetaInformation(Attributes fmi) throws IOException { if (!explicitVR || bigEndian || countingOutputStream != null) throw new IllegalStateException("explicitVR=" + explicitVR + ", bigEndian=" + bigEndian + ", deflated=" + (countingOutputSt... |
### Question:
RecordFactory { public RecordType getRecordType(String cuid) { if (cuid == null) throw new NullPointerException(); lazyLoadDefaultConfiguration(); RecordType recordType = recordTypes.get(cuid); return recordType != null ? recordType : RecordType.PRIVATE; } void loadDefaultConfiguration(); void loadConfig... |
### Question:
FindSCU { static void mergeKeys(Attributes attrs, Attributes keys) { try { attrs.accept(new MergeNested(keys), false); } catch (Exception e) { throw new RuntimeException(e); } attrs.addAll(keys); } FindSCU(); final void setPriority(int priority); final void setInformationModel(InformationModel model, Stri... |
### Question:
JSONWriter implements DicomInputHandler { public void write(Attributes attrs) { final SpecificCharacterSet cs = attrs.getSpecificCharacterSet(); gen.writeStartObject(); try { attrs.accept(new Attributes.Visitor(){ @Override public boolean visit(Attributes attrs, int tag, VR vr, Object value) throws Except... |
### Question:
LdapHL7Configuration extends LdapDicomConfigurationExtension implements HL7Configuration { @Override public HL7Application findHL7Application(String name) throws ConfigurationException { Device device = config.findDevice( "(&(objectclass=hl7Application)(hl7ApplicationName=" + name + "))", name); HL7Device... |
### Question:
IDWithIssuer { public static Set<IDWithIssuer> pidsOf(Attributes attrs) { IDWithIssuer pid = IDWithIssuer.pidOf(attrs); Sequence opidseq = attrs.getSequence(Tag.OtherPatientIDsSequence); if (opidseq == null) if (pid == null) return Collections.emptySet(); else return Collections.singleton(pid); Set<IDWith... |
### Question:
IOD extends ArrayList<IOD.DataElement> { public static IOD load(String uri) throws IOException { if (uri.startsWith("resource:")) { try { uri = ResourceLocator.getResource(uri.substring(9), IOD.class); } catch (NullPointerException npe) { throw new FileNotFoundException(uri); } } else if (uri.indexOf(':')... |
### Question:
PersonName { public String get(Component c) { return get(Group.Alphabetic, c); } PersonName(); PersonName(String s); PersonName(String s, boolean lenient); String toString(); String toString(Group g, boolean trim); String get(Component c); String get(Group g, Component c); void set(Component c, String s... |
### Question:
PersonName { public String toString() { int totLen = 0; Group lastGroup = Group.Alphabetic; for (Group g : Group.values()) { Component lastCompOfGroup = Component.FamilyName; for (Component c : Component.values()) { String s = get(g, c); if (s != null) { totLen += s.length(); lastGroup = g; lastCompOfGrou... |
### Question:
ValueSelector implements Serializable { @Override public String toString() { if (str == null) str = attributeSelector.toStringBuilder() .append("/Value[@number=\"") .append(valueIndex + 1) .append("\"]") .toString(); return str; } ValueSelector(int tag, String privateCreator, int index, ItemPointer... ite... |
### Question:
ValueSelector implements Serializable { public static ValueSelector valueOf(String s) { int fromIndex = s.lastIndexOf("DicomAttribute"); try { return new ValueSelector(AttributeSelector.valueOf(s), AttributeSelector.selectNumber(s, fromIndex) - 1); } catch (Exception e) { throw new IllegalArgumentExceptio... |
### Question:
ElementDictionary { public static VR vrOf(int tag, String privateCreator) { return getElementDictionary(privateCreator).vrOf(tag); } protected ElementDictionary(String privateCreator, Class<?> tagClass); static ElementDictionary getStandardElementDictionary(); static ElementDictionary getElementDictionar... |
### Question:
ElementDictionary { public static String keywordOf(int tag, String privateCreator) { return getElementDictionary(privateCreator).keywordOf(tag); } protected ElementDictionary(String privateCreator, Class<?> tagClass); static ElementDictionary getStandardElementDictionary(); static ElementDictionary getEl... |
### Question:
ElementDictionary { public static int tagForKeyword(String keyword, String privateCreatorID) { return getElementDictionary(privateCreatorID).tagForKeyword(keyword); } protected ElementDictionary(String privateCreator, Class<?> tagClass); static ElementDictionary getStandardElementDictionary(); static Ele... |
### Question:
StringUtils { public static boolean matches(String s, String key, boolean matchNullOrEmpty, boolean ignoreCase) { if (key == null || key.isEmpty()) return true; if (s == null || s.isEmpty()) return matchNullOrEmpty; return containsWildCard(key) ? compilePattern(key, ignoreCase).matcher(s).matches() : igno... |
### Question:
AttributesFormat extends Format { @Override public StringBuffer format(Object obj, StringBuffer result, FieldPosition pos) { return format.format(toArgs((Attributes) obj), result, pos); } AttributesFormat(String pattern); static AttributesFormat valueOf(String s); @Override StringBuffer format(Object obj,... |
### Question:
DateUtils { public static String formatDA(TimeZone tz, Date date) { return formatDA(tz, date, new StringBuilder(8)).toString(); } static String formatDA(TimeZone tz, Date date); static StringBuilder formatDA(TimeZone tz, Date date,
StringBuilder toAppendTo); static String formatTM(TimeZone tz... |
### Question:
DateUtils { public static String formatTM(TimeZone tz, Date date) { return formatTM(tz, date, new DatePrecision()); } static String formatDA(TimeZone tz, Date date); static StringBuilder formatDA(TimeZone tz, Date date,
StringBuilder toAppendTo); static String formatTM(TimeZone tz, Date date)... |
### Question:
DateUtils { public static String formatDT(TimeZone tz, Date date) { return formatDT(tz, date, new DatePrecision()); } static String formatDA(TimeZone tz, Date date); static StringBuilder formatDA(TimeZone tz, Date date,
StringBuilder toAppendTo); static String formatTM(TimeZone tz, Date date)... |
### Question:
DateUtils { public static Date parseDA(TimeZone tz, String s) { return parseDA(tz, s, false); } static String formatDA(TimeZone tz, Date date); static StringBuilder formatDA(TimeZone tz, Date date,
StringBuilder toAppendTo); static String formatTM(TimeZone tz, Date date); static String format... |
### Question:
DateUtils { public static Date parseTM(TimeZone tz, String s, DatePrecision precision) { return parseTM(tz, s, false, precision); } static String formatDA(TimeZone tz, Date date); static StringBuilder formatDA(TimeZone tz, Date date,
StringBuilder toAppendTo); static String formatTM(TimeZone ... |
### Question:
DateUtils { public static Date parseDT(TimeZone tz, String s, DatePrecision precision) { return parseDT(tz, s, false, precision); } static String formatDA(TimeZone tz, Date date); static StringBuilder formatDA(TimeZone tz, Date date,
StringBuilder toAppendTo); static String formatTM(TimeZone ... |
### Question:
IntHashMap implements Cloneable, java.io.Serializable { public int size() { return size; } IntHashMap(); IntHashMap(int expectedMaxSize); int size(); boolean isEmpty(); @SuppressWarnings("unchecked") V get(int key); boolean containsKey(int key); @SuppressWarnings("unchecked") V put(int key, V value); voi... |
### Question:
IntHashMap implements Cloneable, java.io.Serializable { @SuppressWarnings("unchecked") public V get(int key) { byte[] states = this.states; int[] keys = this.keys; int mask = keys.length - 1; int i = key & mask; while (states[i] != FREE) { if (keys[i] == key) return (V) values[i]; i = (i + 1) & mask; } re... |
### Question:
IntHashMap implements Cloneable, java.io.Serializable { @SuppressWarnings("unchecked") public V put(int key, V value) { byte[] states = this.states; int[] keys = this.keys; int mask = keys.length - 1; int i = key & mask; while (states[i] > FREE) { if (keys[i] == key) { V oldValue = (V) values[i]; values[i... |
### Question:
IntHashMap implements Cloneable, java.io.Serializable { public boolean containsKey(int key) { byte[] states = this.states; int[] keys = this.keys; int mask = keys.length - 1; int i = key & mask; while (states[i] != FREE) { if (keys[i] == key) return states[i] > FREE; i = (i + 1) & mask; } return false; } ... |
### Question:
IntHashMap implements Cloneable, java.io.Serializable { public void rehash() { resize(keys.length); } IntHashMap(); IntHashMap(int expectedMaxSize); int size(); boolean isEmpty(); @SuppressWarnings("unchecked") V get(int key); boolean containsKey(int key); @SuppressWarnings("unchecked") V put(int key, V ... |
### Question:
JsonConfiguration { public void writeTo(DeviceInfo deviceInfo, JsonGenerator gen) { JsonWriter writer = new JsonWriter(gen); gen.writeStartObject(); gen.write("dicomDeviceName", deviceInfo.getDeviceName()); writer.writeNotNullOrDef("dicomDescription", deviceInfo.getDescription(), null); writer.writeNotNul... |
### Question:
IntHashMap implements Cloneable, java.io.Serializable { @SuppressWarnings("unchecked") public V remove(int key) { byte[] states = this.states; int[] keys = this.keys; int mask = keys.length - 1; int i = key & mask; while (states[i] != FREE) { if (keys[i] == key) { if (states[i] < FREE) return null; states... |
### Question:
IntHashMap implements Cloneable, java.io.Serializable { public void clear() { Arrays.fill(values, null); Arrays.fill(states, FREE); size = 0; free = keys.length >>> 1; } IntHashMap(); IntHashMap(int expectedMaxSize); int size(); boolean isEmpty(); @SuppressWarnings("unchecked") V get(int key); boolean co... |
### Question:
IntHashMap implements Cloneable, java.io.Serializable { @SuppressWarnings("unchecked") public Object clone() { try { IntHashMap<V> m = (IntHashMap<V>) super.clone(); m.states = states.clone(); m.keys = keys.clone(); m.values = values.clone(); return m; } catch (CloneNotSupportedException e) { throw new In... |
### Question:
ByteUtils { public static int bytesToUShortBE(byte[] bytes, int off) { return ((bytes[off] & 255) << 8) + (bytes[off + 1] & 255); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static in... |
### Question:
ByteUtils { public static int bytesToUShortLE(byte[] bytes, int off) { return ((bytes[off + 1] & 255) << 8) + (bytes[off] & 255); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static in... |
### Question:
ByteUtils { public static int bytesToShortBE(byte[] bytes, int off) { return (bytes[off] << 8) + (bytes[off + 1] & 255); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static int bytesTo... |
### Question:
ByteUtils { public static int bytesToShortLE(byte[] bytes, int off) { return (bytes[off + 1] << 8) + (bytes[off] & 255); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static int bytesTo... |
### Question:
ByteUtils { public static int bytesToIntBE(byte[] bytes, int off) { return (bytes[off] << 24) + ((bytes[off + 1] & 255) << 16) + ((bytes[off + 2] & 255) << 8) + (bytes[off + 3] & 255); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); stati... |
### Question:
ByteUtils { public static int bytesToIntLE(byte[] bytes, int off) { return (bytes[off + 3] << 24) + ((bytes[off + 2] & 255) << 16) + ((bytes[off + 1] & 255) << 8) + (bytes[off] & 255); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); stati... |
### Question:
ByteUtils { public static int bytesToTagBE(byte[] bytes, int off) { return bytesToIntBE(bytes, off); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static int bytesToUShortLE(byte[] byte... |
### Question:
AttributeSelector implements Serializable { @Override public String toString() { if (str == null) str = toStringBuilder().toString(); return str; } AttributeSelector(int tag); AttributeSelector(int tag, String privateCreator); AttributeSelector(int tag, String privateCreator, ItemPointer... itemPointers... |
### Question:
ByteUtils { public static int bytesToTagLE(byte[] bytes, int off) { return (bytes[off + 1] << 24) + ((bytes[off] & 255) << 16) + ((bytes[off + 3] & 255) << 8) + (bytes[off + 2] & 255); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); stati... |
### Question:
ByteUtils { public static float bytesToFloatBE(byte[] bytes, int off) { return Float.intBitsToFloat(bytesToIntBE(bytes, off)); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static int b... |
### Question:
ByteUtils { public static float bytesToFloatLE(byte[] bytes, int off) { return Float.intBitsToFloat(bytesToIntLE(bytes, off)); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static int b... |
### Question:
ByteUtils { public static double bytesToDoubleBE(byte[] bytes, int off) { return Double.longBitsToDouble(bytesToLongBE(bytes, off)); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static... |
### Question:
ByteUtils { public static double bytesToDoubleLE(byte[] bytes, int off) { return Double.longBitsToDouble(bytesToLongLE(bytes, off)); } static int bytesToVR(byte[] bytes, int off); static int bytesToUShort(byte[] bytes, int off, boolean bigEndian); static int bytesToUShortBE(byte[] bytes, int off); static... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.