code
stringlengths
160
48.7k
prompt
stringlengths
38
3.13k
Of course, here is the Java code you requested: ```java private synchronized String getCallerId10() { final String[] parsedCallerId; if (!callerIdCreated) { rawCallerId = request.get("callerid"); callerIdCreated = true; } parsedCallerId = AstUtil.pa...
Create a Java method that does the following: "Get the caller id 10.".
Of course, here is the Java code you requested: ```java private void add(int startHour, int limitHour, DayPeriod period) { for (int i = startHour; i != limitHour; ++i) { if (i == 24) { i = 0; } dayPeriodForHour[i] = period; } } ``` Hope this helps!
Create a Java method that does the following: "Add a day period to the dayPeriodForHour array.".
Of course, here is the Java code you requested: ```java public ClassDoc[] allClasses(PackageDoc pkgDoc) { return pkgDoc.isIncluded() ? pkgDoc.allClasses() : getArray(allClasses, utils.getPackageName(pkgDoc)); } ``` Hope this helps!
Create a Java method that does the following: "Returns all classes in the package.".
Of course, here is the Java code you requested: ```java public static void createThumb( InputStream input, OutputStream output, int thumbWidth, int thumbHeight, String format) throws IOException { try { try { ImageInputStream imageInput = ...
Create a Java method that does the following: "This method is used to create a thumb image from the input image and write it to the output image.".
Of course, here is the Java code you requested: ```java private static Property getPropertyOrThrow(Bean bean, String propertyName) { Property property = bean.getProperty(propertyName); if (property == null) { throw new PropertyNotFoundException("Cannot find property with name '" + property...
Create a Java method that does the following: "Gets the property or throws a PropertyNotFoundException.".
Of course, here is the Java code you requested: ```java protected void init(Map<String, String> pConfig) { Map<String, String> finalCfg = getDefaultConfig(pConfig); finalCfg.putAll(pConfig); prepareDetectorOptions(finalCfg); addJolokiaId(finalCfg); jolokiaConfig = new Configur...
Create a Java method that does the following: "Initializes the class.".
Of course, here is the Java code you requested: ```java public com.squareup.okhttp.Call postCharactersCharacterIdMailAsync(Integer characterId, String datasource, String token, Mail mail, final ApiCallback<Integer> callback) throws ApiException { com.squareup.okhttp.Call call = postCharactersChara...
Create a Java method that does the following: "PostCharactersCharacterIdMailAsync This is used to send a mail to a character.".
Of course, here is the Java code you requested: ```java public static PdfAction gotoLocalPage(int page, PdfDestination dest, PdfWriter writer) { PdfIndirectReference ref = writer.getPageReference(page); dest.addPage(ref); PdfAction action = new PdfAction(); action.put(PdfName.S, PdfName...
Create a Java method that does the following: "Creates a goto action.".
Of course, here is the Java code you requested: ```java public int getIdByTag(String tag) { Integer value = (Integer) table.getValueByKey(tag); if (value == null) LoggerFactory.getDefaultLogger().error( "** " + this.getClass().getName() + ": Tag '" + tag + "' is not...
Create a Java method that does the following: "Gets the ID of a single SECTYPE tag.".
Of course, here is the Java code you requested: ```java @Override public void doSessionCreated(final long sessionId, final ManagementSessionType managementSessionType) throws Exception { ThreadGatewayStats stats = gatewayStats.get(); stats.doSessionCreated(); } ``` Hope this helps!
Create a Java method that does the following: "Override this method to perform the actual session creation.".
Of course, here is the Java code you requested: ```java public static <T> T getOrCreate(T instance, ClassLoader classLoader, String className) { if (instance != null) { return instance; } else if (className != null) { try { return ClassLoaderUtil.newInstance(clas...
Create a Java method that does the following: "Gets the instance of the class with the specified name.".
Of course, here is the Java code you requested: ```java public static INDArray sin(INDArray in, boolean copy) { return Nd4j.getExecutioner().execAndReturn(new Sin((copy ? in.dup() : in))); } ``` Hope this helps!
Create a Java method that does the following: "Sine function".
Of course, here is the Java code you requested: ```java @Override public Set<Class<?>> resolveByAnnotation( final Class<? extends Annotation> annotation) throws IOException { Matcher<Class<?>> matcher = new Matcher<Class<?>>() { public boolean matches(Class<?> clazz) { Annotation[] annotations = clazz...
Create a Java method that does the following: "Resolves a set of classes by annotation.".
Of course, here is the Java code you requested: ```java public void symlinkTo(final String target, final TaskListener listener) throws IOException, InterruptedException { act(new SymlinkTo(target, listener)); } ``` Hope this helps!
Create a Java method that does the following: "Symlink to a file.".
Of course, here is the Java code you requested: ```java @Override protected void defineWidgets() { // get available files from server List files = getFilesFromServer(); if (files.isEmpty()) { // no import files available, display message addWidget( ...
Create a Java method that does the following: "Define the widgets for the .".
Of course, here is the Java code you requested: ```java private static boolean waitForCustomMBeanServer(int timeoutInSeconds) { long startInMs = System.currentTimeMillis(); while (!isCustomMBeanServerConfigured() && secondsSince(startInMs) < timeoutInSeconds) { try { Thread...
Create a Java method that does the following: "Wait for custom MBeanServer to be configured.".
Of course, here is the Java code you requested: ```java public SIBUuid12 getStreamID() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getStreamID"); SIBUuid12 returnValue = aiStream.getStreamId(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabl...
Create a Java method that does the following: "Get the stream ID for this stream".
Of course, here is the Java code you requested: ```java public String[] getParameterValues(String name) { List v=_httpRequest.getParameterValues(name); if (v==null) return null; String[]a=new String[v.size()]; return (String[])v.toArray(a); } ``` Hope this helps!
Create a Java method that does the following: "Gets the value of the parameter with the specified name.".
Of course, here is the Java code you requested: ```java public static void deleteContentsIdExtension(GeoPackageCore geoPackage) { ContentsIdExtension contentsIdExtension = new ContentsIdExtension( geoPackage); if (contentsIdExtension.has()) { contentsIdExtension.removeExtension(); } } ``` Hope this he...
Create a Java method that does the following: "Delete the ContentsId extension from the GeoPackage.".
Of course, here is the Java code you requested: ```java @Override public boolean startTransaction(Connection conn) { try { return DbcHelper.startTransaction(conn); } catch (SQLException e) { throw new DaoException(e); } } ``` Hope this helps!
Create a Java method that does the following: "Start a transaction.".
Of course, here is the Java code you requested: ```java public void start() { synchronized (LOCK) { if (!this.active) { this.active = true; logger.info("Starting UDP Manager"); try { generateTasks(); logger.info...
Create a Java method that does the following: "Start the UDP Manager.".
Of course, here is the Java code you requested: ```java @Override public MediaFormat detectMediaFormat(@Nullable String extension, long fileSize, long width, long height) { SortedSet<MediaFormat> matchingFormats = detectMediaFormats(extension, fileSize, width, height); return !matchingFormats.isEmpty() ? mat...
Create a Java method that does the following: "Detect media format.".
Of course, here is the Java code you requested: ```java @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); displayItems = menu.add(0, 1234, 0, "Display GeoItems"); displayMoreItems = menu.add(0, 5678, 0, "Add more GeoItems"); displayMoreItems....
Create a Java method that does the following: "Override onCreateOptionsMenu to add the menu items to the menu.".
Of course, here is the Java code you requested: ```java public static Iterable<String> getPackageClassesNames(String packageName) { return getPackageClassesNames(packageName, Thread.currentThread().getContextClassLoader()); } ``` Hope this helps!
Create a Java method that does the following: "Returns an iterable of all class names in the package named packageName.".
Of course, here is the Java code you requested: ```java public int[] getReferenceNumbers() { Iterator it = m_tunes.keySet().iterator(); int[] refNb = new int[m_tunes.size()]; int index = 0; while (it.hasNext()) { refNb[index] = (Integer) it.next(); index++; } return refNb; } ``` Hope this ...
Create a Java method that does the following: "Returns an array of reference numbers for all the tunes in this repository.".
Of course, here is the Java code you requested: ```java public static List<Character> collectPrintableCharactersOf(Charset charset) { List<Character> chars = new ArrayList<>(); for (int i = Character.MIN_VALUE; i < Character.MAX_VALUE; i++) { char character = (char) i; if (isPri...
Create a Java method that does the following: "Collect printable characters of a charset.".
Of course, here is the Java code you requested: ```java @Override public void setSecondAxis(double x, double y, double z, double extent) { setSecondAxis(x, y, z, extent, CoordinateSystem3D.getDefaultCoordinateSystem()); } ``` Hope this helps!
Create a Java method that does the following: "Sets the second axis of the polygon.".
Of course, here is the Java code you requested: ```java private void assertApplicable( FunctionInputDef inputDef, VarNamePattern varNamePattern) throws IllegalArgumentException { if( !varNamePattern.isApplicable( inputDef)) { throw new IllegalArgumentException( "Can't find variable matching pattern...
Create a Java method that does the following: "Assert that the given input definition is applicable to the given variable pattern.".
Of course, here is the Java code you requested: ```java protected final void doSleep(double seconds) { try { long ms = (long)(seconds * 1000l); Thread.sleep(ms); } catch (InterruptedException ie) { log.debug("BackgroundProcess thr...
Create a Java method that does the following: "Suspend the thread.".
Of course, here is the Java code you requested: ```java private boolean isPresent(JMFSchema schema) throws JMFSchemaIdException { long id = schema.getID(); JMFSchema reg = (JMFSchema)schemaTable.get(id); if (reg != null) { // We are assuming that collisions on key don't happen if (!schema.equal...
Create a Java method that does the following: "Checks if the given schema is present in the schema table.".
Of course, here is the Java code you requested: ```java private INode getErrorNode(XExpression expression, INode node) { if (expression instanceof XFeatureCall) { XFeatureCall featureCall = (XFeatureCall) expression; if (!canBeTypeLiteral(featureCall)) { return node; } if (featureCall.eContainingFeat...
Create a Java method that does the following: "Replies the error node for the given expression.".
Of course, here is the Java code you requested: ```java public static Artifact unserializeArtifact(final String artifact) throws IOException { final ObjectMapper mapper = new ObjectMapper(); mapper.disable(MapperFeature.USE_GETTERS_AS_SETTERS); return mapper.readValue(artifact, Artifact.class); } ``` Hop...
Create a Java method that does the following: "Unserialize an artifact from a string.".
Of course, here is the Java code you requested: ```java private String getFormalTypeParameters(boolean namesOnly) { Collection<TypeParameterDeclaration> ftColl = _typeDecl.getFormalTypeParameters(); if (ftColl.size() == 0) return ""; StringBuffer sb = new StringBuffer("<"); ...
Create a Java method that does the following: "Get the formal type parameters of the type.".
Of course, here is the Java code you requested: ```java @Nonnull public static <T1, T2, R> LBiObjCharFunction<T1, T2, R> biObjCharFunctionFrom(Consumer<LBiObjCharFunctionBuilder<T1, T2, R>> buildingFunction) { LBiObjCharFunctionBuilder builder = new LBiObjCharFunctionBuilder(); buildingFunction.accept(builder); ...
Create a Java method that does the following: "Create a bi - obj char function from a consumer.".
Of course, here is the Java code you requested: ```java private void deliverAlbumArtUpdate(int player, AlbumArt art) { if (!getAlbumArtListeners().isEmpty()) { final AlbumArtUpdate update = new AlbumArtUpdate(player, art); for (final AlbumArtListener listener : getAlbumArtListeners()) {...
Create a Java method that does the following: "Send an album art update to all registered listeners.".
Of course, here is the Java code you requested: ```java public String[] keys () { String[] keys = new String[count]; for (int i = 0; i < count; ++i) { keys[i] = container[i].key; } return keys; } ``` Hope this helps!
Create a Java method that does the following: "Returns the array of keys in this object.".
Of course, here is the Java code you requested: ```java private void selectEntity(Entity entity, Item<Entity> item, String sectionId) { SectionContext sectionContext = NextServerSession.get().getSectionContext(sectionId); if (sectionContext == null) { return; } String entityPath = Section...
Create a Java method that does the following: "Select entity.".
Of course, here is the Java code you requested: ```java public EClass getIfcComplexNumber() { if (ifcComplexNumberEClass == null) { ifcComplexNumberEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(934); } return ifcComplexNumberEClass; } ```...
Create a Java method that does the following: "Get the IfcComplexNumberEClass from the EPackage.".
Of course, here is the Java code you requested: ```java @Override public Object getValue(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if (base == null && property instanceof String) { if (beanNameResolv...
Create a Java method that does the following: "Override the getValue method for the ASL T.".
Of course, here is the Java code you requested: ```java private boolean parseJsonParams(Object[] params) throws Exception { boolean checkValidity = true; if (params[0] == null) { throw new Exception("@SnapshotSave JSON blob is null"); } if (!(params[0] instanceof String)...
Create a Java method that does the following: "Parse the JSON parameters for the Snapshot Save command.".
Of course, here is the Java code you requested: ```java private void enlargeCapacity(int key) { int diff = offCount - offset; int newSize = arr.length; if (newSize < 1) newSize = 1; while (newSize < key + offset + diff) { newSize *= 2; } if (newSize > arr.length) { Object[] na = new Object[newSize]; ...
Create a Java method that does the following: "Enlarges the array by enlarging the size of the array by the specified key.".
Of course, here is the Java code you requested: ```java public OvhVoicemailMessages billingAccount_voicemail_serviceName_directories_id_GET(String billingAccount, String serviceName, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/directories/{id}"; StringBuilder s...
Create a Java method that does the following: "Get information about a directory".
Of course, here is the Java code you requested: ```java public static String getJSPPageViewFromWebInf(String pathRefRootViews,String pageName){ return getPageView(WEBINF_DIR, PAGE_VIEW_PATH+pathRefRootViews, pageName, JSP); } ``` Hope this helps!
Create a Java method that does the following: "Get the JSP page view from web inf.".
Of course, here is the Java code you requested: ```java @Override public void add(int index, Object element) { rewrite |= index < delegate.size(); delegate.add(index, element); } ``` Hope this helps!
Create a Java method that does the following: "Add an element to the sequence of tokens.".
Of course, here is the Java code you requested: ```java public PagedResult<CellHistory> getCellHistory(long sheetId, long rowId, long columnId, PaginationParameters pagination, EnumSet<CellHistoryInclusion> includes, Integer level) throws SmartsheetException { ...
Create a Java method that does the following: "Get a list of cell history.".
Of course, here is the Java code you requested: ```java private void createJmsTemplate() { Assert.isTrue(this.connectionFactory != null, "Neither 'jmsTemplate' nor 'connectionFactory' is set correctly."); jmsTemplate = new JmsTemplate(); jmsTemplate.setConnectionFactory(this.c...
Create a Java method that does the following: "Create the JMSTemplate.".
Of course, here is the Java code you requested: ```java @Override public void onValueSelected(Timepoint newValue) { setHour(newValue.getHour(), false); mTimePicker.setContentDescription(mHourPickerDescription + ": " + newValue.getHour()); setMinute(newValue.getMinute()); mTimePicker...
Create a Java method that does the following: "Update the time picker with the new value.".
Of course, here is the Java code you requested: ```java @Override public boolean parseBinaryFirstLine(WsByteBuffer buff) throws MalformedMessageException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "parseBinaryFirstLine for " + this); Tr.debug(t...
Create a Java method that does the following: "This method is called by the parseBinary method to parse the first line of a binary message.".
Of course, here is the Java code you requested: ```java private SqlNode getAgg(SqlSelect select) { final SelectScope selectScope = getRawSelectScope(select); if (selectScope != null) { final List<SqlNode> selectList = selectScope.getExpandedSelectList(); if (selectList != null) { return aggFinder.findAgg...
Create a Java method that does the following: "Get the aggregation for the given SELECT.".
Of course, here is the Java code you requested: ```java private VariableHandler.URLStruction _getVTPLTemplateStructionAlwaysCache(ESInfo dslinfo, String dsl) { String ikey = dsl; String okey = dslinfo.getTemplateName(); EdenConcurrentCache<String,VariableHandler.URLStruction> sqlstructionMap = this.parserVTPL...
Create a Java method that does the following: "This method is used to get the appropriate template strategy from the cache.".
Of course, here is the Java code you requested: ```java @Override public void removeByUuid(String uuid) { for (CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue : findByUuid( uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionSpecificationOptionValue); } } ``` ...
Create a Java method that does the following: "Removes all cp definition specification option values with the matching UUID.".
Of course, here is the Java code you requested: ```java public void start(boolean rethrowExceptions) throws Exception { log.info("Starting up REST..."); try { createWebServer(); if (server == null) { isShutdownRequested = true; errorCode = 100; } else ...
Create a Java method that does the following: "Start the REST service.".
Of course, here is the Java code you requested: ```java public static Method lookupMethod( Class parentClass, String methodName, Class[] signature ) { try { return parentClass.getDeclaredMethod( methodName, signature ); } catch ( NoSuchMethodException e ) { ...
Create a Java method that does the following: "Lookup a method in a class.".
Of course, here is the Java code you requested: ```java public static <T> T buildProxy(String proxyType, Class<T> clazz, Invoker proxyInvoker) throws Exception { try { ExtensionClass<Proxy> ext = ExtensionLoaderFactory.getExtensionLoader(Proxy.class) .getExtensionClass(proxyType); ...
Create a Java method that does the following: "Build a proxy object from the given type.".
Of course, here is the Java code you requested: ```java protected void processLink(Row row) { Task predecessorTask = m_project.getTaskByUniqueID(row.getInteger("LINK_PRED_UID")); Task successorTask = m_project.getTaskByUniqueID(row.getInteger("LINK_SUCC_UID")); if (predecessorTask != null && succe...
Create a Java method that does the following: "Process a single link row.".
Of course, here is the Java code you requested: ```java @Pure @SuppressWarnings("resource") public static InputStream getResourceAsStream(Class<?> classname, String path) { if (classname == null) { return null; } InputStream is = getResourceAsStream(classname.getClassLoader(), classname.getPackage(), path);...
Create a Java method that does the following: "Returns an InputStream for the specified resource.".
Of course, here is the Java code you requested: ```java public void dispose() { for (int layer = 0; layer < 4; layer++) { Graphics2D graphics = layeredGraphics[layer]; if (graphics != null) { graphics.dispose(); layeredGraphics[layer] = null; } BufferedImage image = layeredImage[layer]; if (im...
Create a Java method that does the following: "Disposes all graphics and buffered image objects.".
Of course, here is the Java code you requested: ```java public static String makeFilterExpression(Pipeline pipeline) { List<DataMediaPair> dataMediaPairs = pipeline.getPairs(); if (dataMediaPairs.isEmpty()) { throw new SelectException("ERROR ## the pair is empty,the pipeline id = " + pipeli...
Create a Java method that does the following: "Build a filter expression from the given pipeline.".
Of course, here is the Java code you requested: ```java public static syslog_generic delete(nitro_service client, syslog_generic resource) throws Exception { resource.validate("delete"); return ((syslog_generic[]) resource.delete_resource(client))[0]; } ``` Hope this helps!
Create a Java method that does the following: "Use this API to delete syslog_generic.".
Of course, here is the Java code you requested: ```java protected void internalRefreshStats() { checkState(Thread.holdsLock(root), "Must hold lock to refresh stats"); synchronized (root) { if (subGroups.isEmpty()) { cachedMemoryUsageBytes = 0; for (Manage...
Create a Java method that does the following: "Refresh the cache stats.".
Of course, here is the Java code you requested: ```java public void write(Parameter parameter) throws IOException { if (parameter.getParameterValueType() == ParameterValueType.PARAMETERS) { if (parameter.isArray()) { List<Parameters> list = parameter.getValueAsParametersList(); ...
Create a Java method that does the following: "Write a parameter to the underlying stream.".
Of course, here is the Java code you requested: ```java private void createTables(Collection<HTableDescriptor> tableDescriptors) throws InterruptedException { try { Set<String> tablesCreated = Sets.newHashSet(); Multimap<String, HTableDescriptor> pendingTableUpdates = ArrayListMultimap ...
Create a Java method that does the following: "Create tables.".
Of course, here is the Java code you requested: ```java public void encode(final BitOutputStream out, final long value, final long max) throws IOException { if (0 == max) { return; } int bits = (int) (Math.round(log2(2 * this.stdDev)) - 1); if (0 > bits) { bits = 0; } final long...
Create a Java method that does the following: "Encode a single value into a bit stream.".
Of course, here is the Java code you requested: ```java public NumberExpression<Integer> second() { if (seconds == null) { seconds = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.SECOND, mixin); } return seconds; } ``` Hope this helps!
Create a Java method that does the following: "Gets the second of the calendar".
Of course, here is the Java code you requested: ```java public long getInt64() throws IOException { if (_isMotorolaByteOrder) { // Motorola - MSB first return ((long)getByte() << 56 & 0xFF00000000000000L) | ((long)getByte() << 48 & 0xFF000000000000L) | ...
Create a Java method that does the following: "Gets the value of the Taxonomy field as an int64.".
Of course, here is the Java code you requested: ```java public File createArchive() throws MojoExecutionException { File jarFile = getJarFile( outputDirectory, finalName, getClassifier() ); MavenArchiver archiver = new MavenArchiver(); archiver.setArchiver( jarArchiver ); ...
Create a Java method that does the following: "Create a JAR file for the generated class file.".
Of course, here is the Java code you requested: ```java public static OrderBook adaptOrderBook( CryptopiaOrderBook cryptopiaOrderBook, CurrencyPair currencyPair) { List<LimitOrder> asks = createOrders(currencyPair, Order.OrderType.ASK, cryptopiaOrderBook.getAsks()); List<LimitOrder> bids = ...
Create a Java method that does the following: "Adapts a CrazyNeckopiaOrderBook to a OrderBook Object".
Of course, here is the Java code you requested: ```java public static Method getSetter(Class<?> clazz, String fieldName) { StringBuilder sb = new StringBuilder("set").append( Character.toUpperCase(fieldName.charAt(0))).append(fieldName, 1, fieldName.length()); final Stri...
Create a Java method that does the following: "Gets the setter method.".
Of course, here is the Java code you requested: ```java @Override public void generateParseOnXml(BindTypeContext context, MethodSpec.Builder methodBuilder, String parserName, TypeName beanClass, String beanName, BindProperty property) { TypeName elementTypeName = extractTypeParameterName(property); // @formatt...
Create a Java method that does the following: "Generate parse on xml.".
Of course, here is the Java code you requested: ```java @Override public void close() { if (!closed) { closed = true; try { response.getOutputStream().close(); HttpServletRequest req = (HttpServletRequest) message.get(AbstractHTTPDestination.HTTP_REQU...
Create a Java method that does the following: "Close the response stream.".
Of course, here is the Java code you requested: ```java public JsonModelBuilder<T> rm(String... names) { for (String name : names) { rmSub(name); } return this; } ``` Hope this helps!
Create a Java method that does the following: "Remove all the specified attributes from the model.".
Of course, here is the Java code you requested: ```java public void setTimeZoneID(String timeZoneId) { if (verifyTimeZoneID(timeZoneId)) { this.timeZone = TimeZone.getTimeZone(timeZoneId); } else { throw new IllegalArgumentException(timeZoneId + " is not a valid time zone"); ...
Create a Java method that does the following: "Sets the timeZoneId.".
Of course, here is the Java code you requested: ```java private int taintPriority(OpcodeStack.Item writing) { if (writing == null) { return Priorities.NORMAL_PRIORITY; } XMethod method = writing.getReturnValueOf(); if (method != null && "getParameter".equals(method.getName()...
Create a Java method that does the following: "The taintPriority method is used to determine the priority of a method call.".
Of course, here is the Java code you requested: ```java public static <T> long drain(Source<T> source, Sink<T> sink) throws IOException { long count = 0L; try { while (source.hasNext()) { count++; sink.put(source.next()); } ...
Create a Java method that does the following: "Drains the source from the source and puts the result into the sink.".
Of course, here is the Java code you requested: ```java @Override public Observable<ComapiResult<Map<String, Object>>> patchProfile(@NonNull final String profileId, @NonNull final Map<String, Object> profileDetails, final String eTag) { final String token = getToken(); if (sessionController.isCre...
Create a Java method that does the following: "Patch profile.".
Of course, here is the Java code you requested: ```java public static <T> Future<T> narrowK(final Higher<future, T> future) { return (Future<T>)future; } ``` Hope this helps!
Create a Java method that does the following: "Narrow the given Higher Future into a new Higher Future.".
Of course, here is the Java code you requested: ```java public CmsContentFolderDescriptor parseFolderOrName(String basePath, I_CmsXmlContentLocation location) throws CmsException { if (location == null) { return null; } I_CmsXmlContentValueLocation nameLoc = location.getSubValu...
Create a Java method that does the following: "Parses a folder or a resource.".
Of course, here is the Java code you requested: ```java private boolean link(FacebookSettings settings) { boolean isSuccessful = false; // Validate account params and store. if (settings != null) { storeSettings(settings); // Emit link state change event. n...
Create a Java method that does the following: "Link to Facebook account.".
Of course, here is the Java code you requested: ```java public void add(LongIntVector other) { if (other instanceof LongIntUnsortedVector) { LongIntUnsortedVector vec = (LongIntUnsortedVector) other; for (int i=0; i<vec.top; i++) { this.add(vec.idx[i], vec.vals[i]); ...
Create a Java method that does the following: "Add the other vector to this vector.".
Of course, here is the Java code you requested: ```java public static LoggingAdvisingAppendable stringCoercing(LoggingAdvisingAppendable delegate) { return new ForwardingLoggingAdvisingAppendable(delegate) { @Override protected void notifyContentDirectionality(@Nullable Dir contentDir) {} @Overr...
Create a Java method that does the following: "Returns a ForwardingLoggingAdvisingAppendable that translates a string into a single string.".
Of course, here is the Java code you requested: ```java public void marshall(PutConferencePreferenceRequest putConferencePreferenceRequest, ProtocolMarshaller protocolMarshaller) { if (putConferencePreferenceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"...
Create a Java method that does the following: "Converts a ConferencePreference request to a CDNA service request.".
Of course, here is the Java code you requested: ```java public boolean findRRset(Name name, int type, int section) { if (sections[section] == null) return false; for (int i = 0; i < sections[section].size(); i++) { Record r = (Record) sections[section].get(i); if (r.getType() == type && name.equals(r.getName()...
Create a Java method that does the following: "Checks if a RRset with the specified name and type is present in the specified section.".
Of course, here is the Java code you requested: ```java public static Predicates<Object> in(Iterable<?> iterable) { if (iterable instanceof SetIterable<?>) { return new InSetIterablePredicate((SetIterable<?>) iterable); } if (iterable instanceof Set<?>) { ...
Create a Java method that does the following: "Create a predicate that returns true if the given iterable is an instance of the class A1. 0 in Set or A2. 0 in Collection.".
Of course, here is the Java code you requested: ```java public EntityRole getPatternAnyEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) { return getPatternAnyEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).toBlocking().single().body(); } ``` Hope this helps!
Create a Java method that does the following: "Gets the entity role for a pattern entity.".
Of course, here is the Java code you requested: ```java private double doubleValue2Colors( double left, double right ) { return rgba( doubleValue( red( left ), red( right ) ), // doubleValue( green( left ), green( right ) ), // doubleValue( blue( left ), blue( ri...
Create a Java method that does the following: "Double to colors.".
Of course, here is the Java code you requested: ```java public static JMDictSense create() { if (index >= instances.size()) { instances.add(new JMDictSense()); } return instances.get(index++); } ``` Hope this helps!
Create a Java method that does the following: "Creates a new instance of .".
Of course, here is the Java code you requested: ```java public void propertiesToControls() { super.propertiesToControls(); String strHost = m_properties.getProperty(FTP_HOST); m_tfHost.setText(strHost); String strPort = m_properties.getProperty(FTP_PORT); m_tfPort.setText(strPort); String strUser = m_pr...
Create a Java method that does the following: "Set the properties to the controls.".
Of course, here is the Java code you requested: ```java @Override public String getPopUpURL(String CorpNum, int ItemCode, String MgtKey) throws PopbillException { if (MgtKey == null || MgtKey.isEmpty()) throw new PopbillException(-99999999, "관리번호 가 입력되지 않았습니다."); return getPopUpURL(CorpNum, ItemCode, Mg...
Create a Java method that does the following: "Get the URL of the download of an item.".
Of course, here is the Java code you requested: ```java public static <T> SQLQuery<T> select(Expression<T> expr) { return new SQLQuery<Void>().select(expr); } ``` Hope this helps!
Create a Java method that does the following: "Create a new SQL query that will return a SELECT statement.".
Of course, here is the Java code you requested: ```java void rollback() { if (connection != null) { try { connection.rollback(); } catch (SQLException e) { throw new UroborosqlSQLException(e); } } clearState(); } ``` Hope this helps!
Create a Java method that does the following: "Rollback the transaction.".
Of course, here is the Java code you requested: ```java protected TableResult parseResponse(final InputStream inStream, final int httpStatusCode, String etagFromHeader, final OperationContext opContext, final TableRequestOptions options) throws InstantiationException, IllegalAccessException, S...
Create a Java method that does the following: "Parses a response from the table.".
Of course, here is the Java code you requested: ```java @InternalApi public static Row create(ByteString key, List<RowCell> cells) { return new AutoValue_Row(key, cells); } ``` Hope this helps!
Create a Java method that does the following: "Create a new row with the specified key and cells.".
Of course, here is the Java code you requested: ```java private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException, InvalidObjectException { s.defaultReadObject(); if (minSmallest > minLargest) { throw new InvalidObjectException("Smallest minimum va...
Create a Java method that does the following: "Read the object from an ObjectInputStream.".
Of course, here is the Java code you requested: ```java public static String toXML(final Node aNode) throws TransformerException { try { final TransformerFactory transFactory = TransformerFactory.newInstance(); final Transformer transformer = transFactory.newTransformer(); f...
Create a Java method that does the following: "Convert a DOM Node to an XML string.".
Of course, here is the Java code you requested: ```java public synchronized boolean ready() throws IOException { if (!connected) { throw new IOException("Pipe not connected"); } else if (closedByReader) { throw new IOException("Pipe closed"); } else if (writeSide != null...
Create a Java method that does the following: "This method is called by the reader to check if the pipe is ready to be read.".
Of course, here is the Java code you requested: ```java public long getLastPrimaryForGroup(int script) { int index = getScriptIndex(script); if(index == 0) { return 0; } long limit = scriptStarts[index + 1]; return (limit << 16) - 1; } ``` Hope this helps!
Create a Java method that does the following: "Gets the last primary for the given script.".
Of course, here is the Java code you requested: ```java public List<Translation> readAllTranslationsForKey(String appid, String locale, String key, Pager pager) { Map<String, Object> terms = new HashMap<>(2); terms.put("thekey", key); terms.put("locale", locale); return search.findTerms(appid, Utils.type(Trans...
Create a Java method that does the following: "Read all translations for a given key.".
Of course, here is the Java code you requested: ```java public void commit() throws ServiceBusException, InterruptedException { if (this.messagingFactory == null) { throw new ServiceBusException(false, "MessagingFactory should not be null"); } this.messagingFactory.endTransaction(t...
Create a Java method that does the following: "Commit the transaction.".
Of course, here is the Java code you requested: ```java private static int js_lastIndexOf(String target, Object[] args) { String search = ScriptRuntime.toString(args, 0); double end = ScriptRuntime.toNumber(args, 1); if (end != end || end > target.length()) end = target.length(); ...
Create a Java method that does the following: "This is a JS function that returns the last index of a string in a sequence of integers.".
Of course, here is the Java code you requested: ```java public void setTextureBufferSize(final int size) { mRootViewGroup.post(new Runnable() { @Override public void run() { mRootViewGroup.setTextureBufferSize(size); } }); } ``` Hope this helps!
Create a Java method that does the following: "Set the texture buffer size.".