code
stringlengths
146
48.7k
prompt
stringlengths
55
1.51k
Of course, here is the Java code you requested: ```java private static void parsePreserveAspectRatio(SVG.SvgPreserveAspectRatioContainer obj, String val) throws SVGParseException { obj.preserveAspectRatio = parsePreserveAspectRatio(val); } ``` Hope this helps!
Create a Java method that does the following: "Parse a preserve aspect ratio attribute value.".
Of course, here is the Java code you requested: ```java public void setStorageEncryptionStatus(int status) { switch (status) { case DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE: case DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE: case DevicePolicyManager.ENCRYPTION_STATUS_ACTIVATING: case ...
Create a Java method that does the following: "Sets the status of the encryption status of the device.".
Of course, here is the Java code you requested: ```java public @CheckForNull TypeQualifierAnnotation getEffectiveTypeQualifierAnnotation() { boolean firstPartialResult = true; TypeQualifierAnnotation effective = null; for (PartialResult partialResult : partialResultList) { if (...
Create a Java method that does the following: "Get the effective TypeQualifierAnnotation.".
Of course, here is the Java code you requested: ```java @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Completable doFinally(Action onFinally) { ObjectHelper.requireNonNull(onFinally, "onFinally is null"); return RxJavaPlugins.onAssembly(new CompletableDoFinally(this, o...
Create a Java method that does the following: "Completes the sequence of code generated by a CRA - 1668 application by invoking the specified action on the result.".
Of course, here is the Java code you requested: ```java @Override public void hide() { if (displayWindow != null) { displayWindow.setVisible(false); displayWindow.removeWindowFocusListener(this); displayWindow = null; } if (topWindow != null) { ...
Create a Java method that does the following: "hide This method is called to hide the calendar.".
Of course, here is the Java code you requested: ```java public static void insert( final UnsafeBuffer termBuffer, final int termOffset, final UnsafeBuffer packet, final int length) { if (0 == termBuffer.getInt(termOffset)) { termBuffer.putBytes(termOffset + HEADER_LENGTH, packet...
Create a Java method that does the following: "Inserts a single SEGMENT into the given buffer.".
Of course, here is the Java code you requested: ```java @Override public final Map<String, OperationEntry> getOperationDescriptions(final PathAddress address, boolean inherited) { if (parent != null) { RootInvocation ri = getRootInvocation(); return ri.root.getOperationDescriptions...
Create a Java method that does the following: "Get the operation descriptions for the specified address.".
Of course, here is the Java code you requested: ```java public static double regularizedGammaP(final double a, final double x) { // Special cases if(Double.isInfinite(a) || Double.isInfinite(x) || !(a > 0.0) || !(x >= 0.0)) { return Double.NaN; } if(x == 0.0) { return 0.0; } if(x >=...
Create a Java method that does the following: "Regularized gamma function.".
Of course, here is the Java code you requested: ```java private static void copyFile(File in, File out) throws IOException { try (FileInputStream inStream = new FileInputStream(in); FileOutputStream outStream = new FileOutputStream(out);) { FileChannel inChannel = inStream.getChanne...
Create a Java method that does the following: "Copy a file to a file in.".
Of course, here is the Java code you requested: ```java protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { backup_file_responses result = (backup_file_responses) service.get_payload_formatter().string_to_resource(backup_file_responses.class, response); ...
Create a Java method that does the following: "Use this API to fetch an array of backup_file_responses resources of given name.".
Of course, here is the Java code you requested: ```java private void getInertIndex(HashMap event) { int iDate; try { iDate = Integer.parseInt(getValueOr(event, "date", "")); } catch (Exception e) { next = events.size(); return; } for (int i = ...
Create a Java method that does the following: "getInertIndex This method returns the index of the first event in the event list.".
Of course, here is the Java code you requested: ```java public static void isTrue (@Nonnull final BooleanSupplier aValue, final String sMsg) { if (isEnabled ()) isTrue (aValue, () -> sMsg); } ``` Hope this helps!
Create a Java method that does the following: "Check if the passed value is true.".
Of course, here is the Java code you requested: ```java public String convertIfcCurtainWallTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } ``` Hope this helps!
Create a Java method that does the following: "This method is called to return the string value of a convertIfcCurtainWallTypeEnum in the Java language.".
Of course, here is the Java code you requested: ```java public static Geometry reverseMultiPoint(MultiPoint mp) { int nPoints = mp.getNumGeometries(); Point[] revPoints = new Point[nPoints]; for (int i = 0; i < nPoints; i++) { revPoints[nPoints - 1 - i] = (Point) mp.getGeometryN(i)....
Create a Java method that does the following: "Reverse a MultiPoint.".
Of course, here is the Java code you requested: ```java public void add(final Field _field) { this.fields.put(_field.getId(), _field); this.fieldName2Field.put(_field.getName(), _field); if (_field.getReference() != null && _field.getReference().length() > 0) { final String ref ...
Create a Java method that does the following: "Add a Field to the Collection.".
Of course, here is the Java code you requested: ```java public void setCategories(int i, String v) { if (GOMention_Type.featOkTst && ((GOMention_Type)jcasType).casFeat_categories == null) jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.GOMention"); jcasType.jcas.checkArrayBounds(jc...
Create a Java method that does the following: "indexed setter for categories - sets an indexed value -".
Of course, here is the Java code you requested: ```java public ServiceFuture<VirtualNetworkGatewayInner> resetAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback<VirtualNetworkGatewayInner> serviceCallback) { return ServiceFuture.fromResponse(resetWithServiceResponseAsync(re...
Create a Java method that does the following: "Resets an existing CDN image image.".
Of course, here is the Java code you requested: ```java public void unpublishActor(Actor act) { Long integer = publishedActorMappingReverse.get(act.getActorRef()); if ( integer != null ) { Log.Debug(this, ""+act.getClass().getSimpleName()+" unpublished"); publishedActorMap.remov...
Create a Java method that does the following: "Unpublish actor.".
Of course, here is the Java code you requested: ```java public static Slice wrappedBuffer(ByteBuffer buffer) { if (buffer.isDirect()) { long address = bufferAddress(buffer); return new Slice(null, address + buffer.position(), buffer.remaining(), buffer.capacity(), buffer); }...
Create a Java method that does the following: "Wrap a ByteBuffer in a Slice.".
Of course, here is the Java code you requested: ```java public static <T> T newInstance(Class<T> cls) { try { return cls.newInstance(); } catch (InstantiationException e) { throw new ReflectionUtilsException("InstantiationException whilst instantiatin...
Create a Java method that does the following: "Creates a new instance of the class.".
Of course, here is the Java code you requested: ```java public static LocalDateTime randomLocalDateTimeAfter(LocalDateTime after) { checkArgument(after != null, "After must be non-null"); Instant instant = randomInstantAfter(after.toInstant(UTC_OFFSET)); return LocalDateTime.ofInstant(instant, UTC); } ``...
Create a Java method that does the following: "Returns a random LocalDateTime in UTC after the specified LocalDateTime.".
Of course, here is the Java code you requested: ```java void scheduleHeronWorkers(Set<ContainerPlan> containers) throws ContainerAllocationException { for (ContainerPlan containerPlan : containers) { int id = containerPlan.getId(); if (containerPlans.containsKey(containerPlan.getId())) { throw ...
Create a Java method that does the following: "Schedule HeronWorkers for the given containers.".
Of course, here is the Java code you requested: ```java public static<A, B, Z> Function2<A, B, Z> lift(Func2<A, B, Z> f) { return bridge.lift(f); } ``` Hope this helps!
Create a Java method that does the following: "Lift a Java Func2 to a Java Function2".
Of course, here is the Java code you requested: ```java public void removeAllBusItineraries() { for (final BusItinerary itinerary : this.itineraries) { itinerary.setContainer(null); itinerary.setEventFirable(true); } this.itineraries.clear(); fireShapeChanged(new BusChangeEvent(this, BusChangeEventTy...
Create a Java method that does the following: "Removes all the bus itineraries from this bus.".
Of course, here is the Java code you requested: ```java @Override public List<CommerceDiscountRel> findByCD_CN(long commerceDiscountId, long classNameId) { return findByCD_CN(commerceDiscountId, classNameId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } ``` Hope this helps!
Create a Java method that does the following: "Returns all the commerce discount rels matching the CDN.".
Of course, here is the Java code you requested: ```java public void marshall(ModifyEventSubscriptionRequest modifyEventSubscriptionRequest, ProtocolMarshaller protocolMarshaller) { if (modifyEventSubscriptionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"...
Create a Java method that does the following: "Creates the given parameter object.".
Of course, here is the Java code you requested: ```java public static boolean hasTimestamp(final MessageOrBuilder messageOrBuilder) { try { final FieldDescriptor fieldDescriptor = ProtoBufFieldProcessor.getFieldDescriptor(messageOrBuilder, TIMESTAMP_FIELD_NAME); return messageOrBuilder....
Create a Java method that does the following: "Check if the given message contains a timestamp field.".
Of course, here is the Java code you requested: ```java @Override public Object parse(byte[] source) throws Exception { return parse(new String(source, StandardCharsets.UTF_8)); } ``` Hope this helps!
Create a Java method that does the following: "Parse a object from a byte array.".
Of course, here is the Java code you requested: ```java static String encode(ByteBufferRange range) { String start = Hex.encodeHexString(toArray(range.getStart())); String end = Hex.encodeHexString(toArray(range.getEnd())); int prefix = getCommonPrefixLength(start, end); return start.su...
Create a Java method that does the following: "Encode a ByteBufferRange to a Base64 string.".
Of course, here is the Java code you requested: ```java protected VariableMap getVariables(List<CallableElementParameter> params, VariableScope variableScope) { VariableMap result = Variables.createVariables(); for (CallableElementParameter param : params) { param.applyTo(variableScope, result); } ...
Create a Java method that does the following: "Get the variables for the given parameters.".
Of course, here is the Java code you requested: ```java private String getAuthMethod(final Deployment dep) { for (final Endpoint ejbEndpoint : dep.getService().getEndpoints()) { final String beanAuthMethod = ejb3SecurityAccessor.getAuthMethod(ejbEndpoint); final boolean hasBeanAuthMetho...
Create a Java method that does the following: "Gets the auth - method from the deployment.".
Of course, here is the Java code you requested: ```java @Override public void postEvent(org.osgi.service.event.Event event) { publishOsgiEvent(event, true); } ``` Hope this helps!
Create a Java method that does the following: "Publish an event to the application.".
Of course, here is the Java code you requested: ```java static StructrMethodDefinition deserialize(final StructrTypeDefinition parent, final String name, final Map<String, Object> source) { final StructrMethodDefinition newMethod = new StructrMethodDefinition(parent, name); newMethod.deserialize(source); retu...
Create a Java method that does the following: "Deserialize a method definition.".
Of course, here is the Java code you requested: ```java public String[] getContext(int i, Object[] toks, String[] preds, Map prevTags) { String po=NameFinderME.OTHER; String ppo=NameFinderME.OTHER; if (i > 1){ ppo = preds[i-2]; } if (i > 0) { po = preds[i-1]; } String cacheKey =...
Create a Java method that does the following: "Get the contexts for a given sentence.".
Of course, here is the Java code you requested: ```java private static void submitSQLQuery(QdsClient client) throws Exception { String sampleSqlQuery = "select * from default_qubole_airline_origin_destination limit 100"; SparkCommandBuilder sparkBuilder = client.command().spark(); ...
Create a Java method that does the following: "Submit SQL query to Spark".
Of course, here is the Java code you requested: ```java @Override protected void setProperty(final String _name, final String _value) throws CacheReloadException { if ("Level".equals(_name)) { this.level = Integer.parseInt(_value); } else { ...
Create a Java method that does the following: "Method setProperty.".
Of course, here is the Java code you requested: ```java protected void examineMultiStatusResponse(IResponse response) throws DAVException { // If it is not a multistatus we don't look at it. if (response.getStatusCode() != IResponse.SC_MULTI_STATUS) return; // It is declared a mult...
Create a Java method that does the following: "Examine the response for a multistatus.".
Of course, here is the Java code you requested: ```java public void start(Xid xid, int flags) throws XAException { long l1 = System.currentTimeMillis(); try { super.start(xid, flags); } finally { xastat.deltaStart(System.currentTimeMillis() - l1); } } `...
Create a Java method that does the following: "start a transaction.".
Of course, here is the Java code you requested: ```java public static Dimension dimensionsToFit(Dimension target, Dimension source) { // if target width/height is zero then we have no preference for that, so set it to the original value, // since it cannot be any larger int maxWidth; i...
Create a Java method that does the following: "Get the dimensions to fit.".
Of course, here is the Java code you requested: ```java @Override public CacheEntry updateCacheValues(final HttpResponse response) { transferFirstHeader("Date", response, this.response); transferFirstHeader("ETag", response, this.response); transferFirstHeader("Last-Modified", response, this.response); transf...
Create a Java method that does the following: "Update the cache values.".
Of course, here is the Java code you requested: ```java protected IQueueMessage<ID, DATA> takeFromRingBuffer() { LOCK_TAKE.lock(); try { long l = consumedSeq.get() + 1; if (l <= knownPublishedSeq) { try { Event<ID, DATA> eventHolder = ringBuff...
Create a Java method that does the following: "Takes a message from the ring buffer.".
Of course, here is the Java code you requested: ```java static void getLuma20UnsafeNoRound(byte[] pic, int picW, int picH, int[] blk, int blkOff, int blkStride, int x, int y, int blkW, int blkH) { int maxW = picW - 1; int maxH = picH - 1; for (int i = 0; i < blkW; i++) { ...
Create a Java method that does the following: "getLuma20UnsafeNoRound This is a version of getLuma20Unsafe except that it is not safe to use.".
Of course, here is the Java code you requested: ```java public final Mono<T> repeatWhenEmpty(int maxRepeat, Function<Flux<Long>, ? extends Publisher<?>> repeatFactory) { return Mono.defer(() -> { Flux<Long> iterations; if(maxRepeat == Integer.MAX_VALUE) { iterations = Flux.fromStream(LongStream.range(0, L...
Create a Java method that does the following: "Repeat when empty.".
Of course, here is the Java code you requested: ```java public static String getHashSHA1(String text) { byte[] bytes = text.getBytes(StandardCharsets.ISO_8859_1); return getHashSHA1(bytes); } ``` Hope this helps!
Create a Java method that does the following: "Get the SHA1 hash of a string.".
Of course, here is the Java code you requested: ```java public static String byte2FitMemoryString(final long byteNum) { if (byteNum < 0) { return "shouldn't be less than zero!"; } else if (byteNum < MemoryConst.KB) { return String.format("%d B", byteNum); } else if (byte...
Create a Java method that does the following: "byte2FitMemoryString This method converts a long into a string in the format required by the class.".
Of course, here is the Java code you requested: ```java private void createViewForAvg(Map<String, MapReduce> views) { if (views.get(CouchDBConstants.AVG) == null) { MapReduce mapr = new MapReduce(); mapr.setMap("function(doc){for(field in doc){var o = doc[field];if(typeof(o)...
Create a Java method that does the following: "Create view for avg.".
Of course, here is the Java code you requested: ```java @Override public IRxSessionData getAppSessionData(Class<? extends AppSession> clazz, String sessionId) { if (clazz.equals(ClientRxSession.class)) { ClientRxSessionDataReplicatedImpl data = new ClientRxSessionDataReplicatedImpl(sessionId, thi...
Create a Java method that does the following: "Override the method to create an instance of the appropriate class.".
Of course, here is the Java code you requested: ```java protected URL resolveHandlerChainFileName(String clzName, String fileName) { URL handlerFile = null; InputStream in = null; String handlerChainFileName = fileName; URL baseUrl = classLoader.getResource(getClassResourceName(clzName...
Create a Java method that does the following: "Resolves the handlerChainFileName.".
Of course, here is the Java code you requested: ```java public final EObject rulePredicatedGroup() throws RecognitionException { EObject current = null; Token lv_predicated_0_0=null; Token lv_firstSetPredicated_1_0=null; Token otherlv_2=null; Token otherlv_4=null; EObje...
Create a Java method that does the following: "Use this method to enter thePredicatedGroup method in the grammarAccess.".
Of course, here is the Java code you requested: ```java @Override public boolean isSecure() { if (_s == null || _sslSocketClass == null) return false; else return _sslSocketClass.isAssignableFrom(_s.getClass()); } ``` Hope this helps!
Create a Java method that does the following: "Returns true if the socket is secure.".
Of course, here is the Java code you requested: ```java public String getPrincipal() { Authentication authentication = SecurityContextHolder.getContext() .getAuthentication(); if (authentication == null) { log.warn("No Authentication object set in SecurityContext - returning empty String as Principal"); ...
Create a Java method that does the following: "Returns the principal of the current user.".
Of course, here is the Java code you requested: ```java public static void animate(Widget source, final Widget target) { animate(source.getElement(), target.getElement()); } ``` Hope this helps!
Create a Java method that does the following: "Animate source widget to target widget.".
Of course, here is the Java code you requested: ```java protected final void publishArtwork(@NonNull Artwork artwork) { artwork.setComponentName(new ComponentName(this, getClass())); mCurrentState.setCurrentArtwork(artwork); mServiceHandler.removeCallbacks(mPublishStateRunnable); mServi...
Create a Java method that does the following: "Publish an artwork.".
Of course, here is the Java code you requested: ```java public ClassHash computeHash(JavaClass javaClass) { this.className = javaClass.getClassName(); Method[] methodList = new Method[javaClass.getMethods().length]; // Sort methods System.arraycopy(javaClass.getMethods(), 0, methodLis...
Create a Java method that does the following: "Compute the hash of a class.".
Of course, here is the Java code you requested: ```java public ZuulFilter getFilter(String sCode, String sName) throws Exception { if (filterCheck.get(sName) == null) { filterCheck.putIfAbsent(sName, sName); if (!sCode.equals(filterClassCode.get(sName))) { LOG.info("rel...
Create a Java method that does the following: "Get a ZuulFilter instance from the code and name.".
Of course, here is the Java code you requested: ```java public Fraction pow(final int power) { if (power == 1) { return this; } else if (power == 0) { return ONE; } else if (power < 0) { if (power == Integer.MIN_VALUE) { // MIN_VALUE can't be negated. ...
Create a Java method that does the following: "Get the power of this fraction.".
Of course, here is the Java code you requested: ```java public static List<CommonSynonymDictionary.SynonymItem> convert(List<Term> sentence, boolean withUndefinedItem) { List<CommonSynonymDictionary.SynonymItem> synonymItemList = new ArrayList<CommonSynonymDictionary.SynonymItem>(sentence.size()); ...
Create a Java method that does the following: "Convert a list of terms to a list of CommonSynonymDictionary. SynonymItem objects.".
Of course, here is the Java code you requested: ```java protected int readSamples () throws IOException { int samples; while ((samples = _dsp.synthesis_pcmout(_pcm, _offsets)) <= 0) { if (samples == 0 && !readPacket()) { return 0; } if (_b...
Create a Java method that does the following: "Read samples from the stream.".
Of course, here is the Java code you requested: ```java public String[] reportDiff(String[] textOnLeft, String[] textOnRight) { List<String> _report = new LinkedList<String>(); int _currentLeft = 0; int _currentRight = 0; while (_currentLeft < textOnLeft.length || _currentRight < textOnRight.length) { i...
Create a Java method that does the following: "Report the difference between two lines.".
Of course, here is the Java code you requested: ```java private SectBCompensationDataType getSectBCompensationDataType(CompensationDto compensation) { SectBCompensationDataType sectBCompensation = SectBCompensationDataType.Factory.newInstance(); if (compensation != null) { if (compensation...
Create a Java method that does the following: "Method to get SectBCompensationDataType from CompensationInfo for SectB.".
Of course, here is the Java code you requested: ```java @Override public String serialize(final FedoraEvent evt) { try { return MAPPER.writeValueAsString(from(evt)); } catch (final JsonProcessingException ex) { LOGGER.error("Error processing JSON: {}", ex.getMessage()); ...
Create a Java method that does the following: "Serialize a FedoraEvent to a String.".
Of course, here is the Java code you requested: ```java public static cacheforwardproxy[] get_filtered(nitro_service service, String filter) throws Exception{ cacheforwardproxy obj = new cacheforwardproxy(); options option = new options(); option.set_filter(filter); cacheforwardproxy[] response = (cacheforward...
Create a Java method that does the following: "Use this API to fetch filtered set of cacheforwardproxy resources. set the filter parameter values in filter parameter value.".
Of course, here is the Java code you requested: ```java public static CalendarQuarter from(GregorianDate date) { PlainDate iso = PlainDate.from(date); // includes validation return CalendarQuarter.of(iso.getYear(), iso.get(PlainDate.QUARTER_OF_YEAR)); } ``` Hope this helps!
Create a Java method that does the following: "Get a CalendarQuarter from a GregorianDate.".
Of course, here is the Java code you requested: ```java protected String getKey(final String ref, final String filename, final String extension) { return prefix + ref + "/" + filename + "." + extension; } ``` Hope this helps!
Create a Java method that does the following: "Gets the key.".
Of course, here is the Java code you requested: ```java private void parseAliases(Element e, String indent) throws DASException { parseLevel++; String subIndent = indent + " "; if (_Debug) System.out.println(indent + "Parsing Aliases: "); if (_Debug) System.out...
Create a Java method that does the following: "Parses the aliases of a single element.".
Of course, here is the Java code you requested: ```java public Integer getIntObject(String attributeName) { String val = get(attributeName, null); if (val != null) { return Integer.valueOf(val); } return null; } ``` Hope this helps!
Create a Java method that does the following: "Gets an attribute as an Integer object.".
Of course, here is the Java code you requested: ```java public static void symmLowerToFull( DMatrixSparseCSC A , DMatrixSparseCSC B , @Nullable IGrowArray gw ) { if( A.numCols != A.numRows ) throw new IllegalArgumentException("Must be a lower triangular square matrix"); int N = A.numCo...
Create a Java method that does the following: "This method converts a symmetric matrix A into a full matrix A.".
Of course, here is the Java code you requested: ```java protected int checkResponse(TCPReadRequestContext rsc) { // Parse the proxy server response // WsByteBuffer[] buffers = rsc.getBuffers(); // check if the correct response was received if (null == buffers) { if ...
Create a Java method that does the following: "Check the response from the proxy server.".
Of course, here is the Java code you requested: ```java @Override protected String doRender(final RenderConfiguration config, final Node node) { // Do we have a non-empty NodeAttributes within the supplied Node? // Don't add the extra newline after the attributes - so call doRender directly. ...
Create a Java method that does the following: "Override this method to render a single node.".
Of course, here is the Java code you requested: ```java public static void main(String[] args) throws Exception { if(!parseParameters(args)) { return; } // set up execution environment final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); // read input data DataSet<Ed...
Create a Java method that does the following: "Main method to run the Crafter Example.".
Of course, here is the Java code you requested: ```java public void loopProcess() { for (Session session : sessions.values()) { long timeMillis = System.currentTimeMillis(); try { session.callbackOnLoop(timeMillis); } catch (Exception e) { ...
Create a Java method that does the following: "Loop process.".
Of course, here is the Java code you requested: ```java public boolean isTagPresent(String tagName) { boolean tagPresent = false; if (mReadMethod != null) { tagPresent = mReadMethod.isTagPresent(tagName); } if (!tagPresent && mWriteMethod != null) { tagPresent ...
Create a Java method that does the following: "Check if the tag is present in the class file.".
Of course, here is the Java code you requested: ```java public String getIssue() { if (Journal_Type.featOkTst && ((Journal_Type)jcasType).casFeat_issue == null) jcasType.jcas.throwFeatMissing("issue", "de.julielab.jules.types.Journal"); return jcasType.ll_cas.ll_getStringValue(addr, ((Journal_Type)jcasTy...
Create a Java method that does the following: "getter for issue - gets Issue of the journal.".
Of course, here is the Java code you requested: ```java @Override public void open(int taskNumber, int numTasks) { this.session = cluster.connect(); MappingManager mappingManager = new MappingManager(session); this.mapper = mappingManager.mapper(outputClass); if (mapperOptions != null) { Mapper.Option[] op...
Create a Java method that does the following: "Open the cluster and create a mapping manager.".
Of course, here is the Java code you requested: ```java private void rotatorPushRight( int m ) { double b11 = off[m]; double b21 = diag[m+1]; computeRotator(b21,-b11); // apply rotator on the right off[m] = 0; diag[m+1] = b21*c-b11*s; if( m+2 < N) { ...
Create a Java method that does the following: "Push the image on the right of the image.".
Of course, here is the Java code you requested: ```java public PutTelemetryRecordsRequest withTelemetryRecords(TelemetryRecord... telemetryRecords) { if (this.telemetryRecords == null) { setTelemetryRecords(new java.util.ArrayList<TelemetryRecord>(telemetryRecords.length)); } for (T...
Create a Java method that does the following: "A list of telemetry records.".
Of course, here is the Java code you requested: ```java @Cmd public Reporter registerReporter(final Reporter reporter) { injector.injectMembers(reporter); reporters.add(reporter); return reporter; } ``` Hope this helps!
Create a Java method that does the following: "Register a new report reporter.".
Of course, here is the Java code you requested: ```java @Override public void visitCode(Code obj) { forLoops = new HashSet<>(); super.visitCode(obj); forLoops = null; } ``` Hope this helps!
Create a Java method that does the following: "implements the visitor to create and clear the forLoops set".
Of course, here is the Java code you requested: ```java public void setApplication(IScope appScope) { log.debug("Application scope: {}", appScope); this.appScope = appScope; // add the name to the collection (no '/' prefix) activeRooms.add(appScope.getName()); } ``` Hope this helps...
Create a Java method that does the following: "Sets the application scope.".
Of course, here is the Java code you requested: ```java void insert(Suffix<I, S> suffix) { if (activePoint.isNode()) { Node<I, S> node = activePoint.getNode(); node.insert(suffix, activePoint); } else if (activePoint.isEdge()) { Edge<I, S> edge = activePoint.getEdge(...
Create a Java method that does the following: "Insert a suffix into the image.".
Of course, here is the Java code you requested: ```java @Override protected synchronized void purgeJob(KillJobAction action) throws IOException { JobID jobId = action.getJobID(); JobTrackerReporter reporter = jobTrackerReporters.remove(jobId); if (reporter != null) { reporter.shutdown(); } ...
Create a Java method that does the following: "This method is called by the KillJobAction to kill the job.".
Of course, here is the Java code you requested: ```java @Override public java.util.concurrent.Future<GetItemResult> getItemAsync(String tableName, java.util.Map<String, AttributeValue> key, com.amazonaws.handlers.AsyncHandler<GetItemRequest, GetItemResult> asyncHandler) { return getItemAsync(n...
Create a Java method that does the following: "Simplified method form for invoking the GetItem operation with an AsyncHandler.".
Of course, here is the Java code you requested: ```java public void marshall(UpdatePhoneNumberRequestItem updatePhoneNumberRequestItem, ProtocolMarshaller protocolMarshaller) { if (updatePhoneNumberRequestItem == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); ...
Create a Java method that does the following: "marshalls the given parameter object.".
Of course, here is the Java code you requested: ```java public static boolean isDirectory(URL resourceURL) throws URISyntaxException { final String protocol = resourceURL.getProtocol(); switch (protocol) { case "jar": try { final JarURLConnection jarConne...
Create a Java method that does the following: "Checks if the given URL is a directory.".
Of course, here is the Java code you requested: ```java private void preSave(User user, boolean isNew) throws Exception { for (UserEventListener listener : listeners) { listener.preSave(user, isNew); } } ``` Hope this helps!
Create a Java method that does the following: "Notifying listeners before user creation.".
Of course, here is the Java code you requested: ```java public static FilterPredicate areEqual(FilterableAttribute attribute, Object value) { FilterPredicate pred = new FilterPredicate(); pred.attribute = attribute; Class<?> requiredType = attribute.getType(); if (!requiredType.isInstan...
Create a Java method that does the following: "Create a filter predicate that returns true if the attribute and value are equal.".
Of course, here is the Java code you requested: ```java public ServiceFuture<Void> resumeAsync(String resourceGroupName, String automationAccountName, UUID jobId, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(resumeWithServiceResponseAsync(resourceGroupName, automationAccount...
Create a Java method that does the following: "Resume an App Service Environment. Resumes an App Service Environment.".
Of course, here is the Java code you requested: ```java @Nullable static ClientTransport getTransportFromPickResult(PickResult result, boolean isWaitForReady) { final ClientTransport transport; Subchannel subchannel = result.getSubchannel(); if (subchannel != null) { transport = ((AbstractSubchanne...
Create a Java method that does the following: "Get the transport from a PickResult.".
Of course, here is the Java code you requested: ```java @Export public Map createMap(String applicationId, String mapId, String elementId) { Map map = getMap(applicationId, mapId); if (map == null) { MapWidget mapWidget = new MapWidget(mapId, applicationId); map = new MapImpl(mapWidget); Element element ...
Create a Java method that does the following: "Create a map with the given id and element id.".
Of course, here is the Java code you requested: ```java public static int lastIndexOfIgnoreCase(String pString, int pChar, int pPos) { if ((pString == null)) { return -1; } // Get first char char lower = Character.toLowerCase((char) pChar); char upper = Chara...
Create a Java method that does the following: "Returns the index of the last occurence of the specified character in the specified string ignoring case.".
Of course, here is the Java code you requested: ```java public void billingAccount_line_serviceName_phone_phonebook_bookKey_PUT(String billingAccount, String serviceName, String bookKey, OvhPhonebook body) throws IOException { String qPath = "/telephony/{billingAccount}/line/{serviceName}/phone/phonebook/{bookKey}";...
Create a Java method that does the following: "Update the phonebook".
Of course, here is the Java code you requested: ```java @OnClick(R.id.navigateToModule1Service) public void onNavigationServiceCTAClick() { Intent intentService = HensonNavigator.gotoModule1Service(this) .stringExtra("foo") .build(); startService(intentService); } ``` Hope this helps!
Create a Java method that does the following: "On click on navigation service CTA".
Of course, here is the Java code you requested: ```java public Map<ClassInfo, ClassInfoList> getReverseClassDependencyMap() { final Map<ClassInfo, Set<ClassInfo>> revMapSet = new HashMap<>(); for (final ClassInfo ci : getAllClasses()) { for (final ClassInfo dep : ci.getClassDependencies()) ...
Create a Java method that does the following: "Get the reverse class dependency map.".
Of course, here is the Java code you requested: ```java private void checkVersionable( AbstractJcrNode node ) throws UnsupportedRepositoryOperationException, RepositoryException { if (!node.isNodeType(JcrMixLexicon.VERSIONABLE)) { throw new UnsupportedRepositoryOperationException(JcrI18n.requiresVe...
Create a Java method that does the following: "Check if the node is versionable.".
Of course, here is the Java code you requested: ```java public static Color getColor(String colorName) { if (StrUtil.isBlank(colorName)) { return null; } colorName = colorName.toUpperCase(); if ("BLACK".equals(colorName)) { return Color.BLACK; } else if ("WHITE".equals(colorName)) { return...
Create a Java method that does the following: "Gets the Color object for the specified color name.".
Of course, here is the Java code you requested: ```java public boolean hideOverflowMenu() { if (mPostedOpenRunnable != null && mMenuView != null) { ((View) mMenuView).removeCallbacks(mPostedOpenRunnable); mPostedOpenRunnable = null; return true; } MenuPopupH...
Create a Java method that does the following: "Hide the overflow menu.".
Of course, here is the Java code you requested: ```java private void setField(Row row, Table schemaTable, Object embeddedObject, Attribute embeddedAttrib) { Field field = (Field) embeddedAttrib.getJavaMember(); FieldDef fieldDef = schemaTable.getField(((AbstractAttribute) embeddedAttrib).getJPAColu...
Create a Java method that does the following: "Sets the field.".
Of course, here is the Java code you requested: ```java public ServiceFuture<Void> createAsync(String faceListId, CreateFaceListsOptionalParameter createOptionalParameter, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(faceListId, createOptionalP...
Create a Java method that does the following: "Creates a CDN image face list.".
Of course, here is the Java code you requested: ```java private Status update(Database _db, String docID, Body body, boolean deleting) { Status status = new Status(); if (docID != null && docID.isEmpty() == false) { // On PUT/DELETE, get revision ID from either ?rev= query or doc body: ...
Create a Java method that does the following: "Update a Revision.".
Of course, here is the Java code you requested: ```java public GetSlotTypeVersionsResult withSlotTypes(SlotTypeMetadata... slotTypes) { if (this.slotTypes == null) { setSlotTypes(new java.util.ArrayList<SlotTypeMetadata>(slotTypes.length)); } for (SlotTypeMetadata ele : slotTypes) {...
Create a Java method that does the following: "Gets the value of the slotTypes property.".