code
stringlengths
160
48.7k
prompt
stringlengths
38
3.13k
Of course, here is the Java code you requested: ```java public String getScreenURL() { String strURL = super.getScreenURL(); if (this.getClass().getName().equals(Screen.class.getName())) { strURL = this.addURLParam(strURL, DBParams.RECORD, this.getMainRecord().getClass().getName...
Create a Java method that does the following: "Get the screen URL.".
Of course, here is the Java code you requested: ```java public void async() { final Request request = data.build(); final CallbackHandler handler = request.handler != null ? request.handler : singleton.handler; final boolean safe = request.safe != null ? request.safe : singleton.safe; // Ignore current reques...
Create a Java method that does the following: "Asynchronously loads the request asynchronously.".
Of course, here is the Java code you requested: ```java protected void ensurePrefixAndSchemaFitToegether(String prefix, String schema) { if (schema == null) { return; } else if (prefix == null || (prefix != null && !prefix.startsWith(schema + "."))) { throw new ProcessEngineException("When setting ...
Create a Java method that does the following: "Ensure that the prefix and schema are fit to a single schema.".
Of course, here is the Java code you requested: ```java public static synchronized IClient<?, ?> registerClientFromProperties(String restClientName, IClientConfig clientConfig) throws ClientException { IClient<?, ?> client = null; ILoadBalancer loadBalancer = null; if (simpleClientMap.get(restClientNam...
Create a Java method that does the following: "Registers a new Rest Client with the given name and configuration properties.".
Of course, here is the Java code you requested: ```java protected <L extends Listener, E extends Event<?, L>> void notifySingle( L listener, E event, BiConsumer<L, E> bc, ExceptionCallback ec) { createInvocation(listener, event, bc, ec).notifyListener(); } ``` Hope this helps!
Create a Java method that does the following: "Notify a single exception.".
Of course, here is the Java code you requested: ```java private boolean isLoadTimeValid(final String loadTimeParam) { return !StringUtils.isEmpty(loadTimeParam) && isLong(loadTimeParam) && Long.valueOf(loadTimeParam) > 0; } ``` Hope this helps!
Create a Java method that does the following: "Checks if the load time is valid.".
Of course, here is the Java code you requested: ```java public WyalFile.Stmt.Block buildVerificationCondition(WyilFile.Decl declaration, GlobalEnvironment environment, VerificationCondition vc) { WyalFile.Stmt antecedent = flatten(vc.antecedent); Expr consequent = vc.consequent; HashSet<WyalFile.VariableDecla...
Create a Java method that does the following: "Build a verification condition.".
Of course, here is the Java code you requested: ```java public void store(Object obj, Identity oid, ClassDescriptor cld, boolean insert, boolean ignoreReferences) { if(obj == null || nowStoring.contains(obj)) { return; } /* if the object has been deleted during...
Create a Java method that does the following: "Store an object in the database.".
Of course, here is the Java code you requested: ```java public Class<T> getProxyClass() { String suffix = "_$$_Weld" + getProxyNameSuffix(); String proxyClassName = getBaseProxyName(); if (!proxyClassName.endsWith(suffix)) { proxyClassName = proxyClassName + suffix; } ...
Create a Java method that does the following: "Get the proxy class for this bean.".
Of course, here is the Java code you requested: ```java protected List<EnhanceEntity> onAssociationUsingLucene(EntityMetadata m, Client client, List<EnhanceEntity> ls) { Set<String> rSet = fetchDataFromLucene(m.getEntityClazz(), client); List resultList = client.findAll(m.getEntityClazz(), null, rS...
Create a Java method that does the following: "On association using lucene.".
Of course, here is the Java code you requested: ```java public static Reflections collect(final String packagePrefix, final Predicate<String> resourceNameFilter, @Nullable Serializer... optionalSerializer) { Serializer serializer = optionalSerializer != null && optionalSerializer.length == 1 ? optionalSerializ...
Create a Java method that does the following: "Collect all reflections from a collection of files.".
Of course, here is the Java code you requested: ```java @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) public static ViewTreeObserver.OnGlobalLayoutListener attach(final Activity activity, IPanelHeightTarget target, ...
Create a Java method that does the following: "Attaches a KeyboardStatusListener to a ViewTreeObserver.".
Of course, here is the Java code you requested: ```java public static QuerySnapshot withChanges( final Query query, Timestamp readTime, final DocumentSet documentSet, final List<DocumentChange> documentChanges) { return new QuerySnapshot(query, readTime) { volatile List<QueryDocumentS...
Create a Java method that does the following: "Create a new QuerySnapshot with the specified document changes.".
Of course, here is the Java code you requested: ```java public com.google.api.ads.admanager.axis.v201811.DateRangeType getDateRangeType() { return dateRangeType; } ``` Hope this helps!
Create a Java method that does the following: "Gets the dateRangeType value for this BaseCalendar.".
Of course, here is the Java code you requested: ```java public ValueMap withNumberSet(String key, BigDecimal ... val) { super.put(key, new LinkedHashSet<BigDecimal>(Arrays.asList(val))); return this; } ``` Hope this helps!
Create a Java method that does the following: "Add a set of BigDecimal values to the value map.".
Of course, here is the Java code you requested: ```java public ItemRequest<Team> addUser(String team) { String path = String.format("/teams/%s/addUser", team); return new ItemRequest<Team>(this, Team.class, path, "POST"); } ``` Hope this helps!
Create a Java method that does the following: "Add a user to a user.".
Of course, here is the Java code you requested: ```java public ImmutabilityPolicyInner getImmutabilityPolicy(String resourceGroupName, String accountName, String containerName, String ifMatch) { return getImmutabilityPolicyWithServiceResponseAsync(resourceGroupName, accountName, containerName, ifMatch).toBlock...
Create a Java method that does the following: "Gets an immutability policy.".
Of course, here is the Java code you requested: ```java public static @Nonnull Collection<User> getAll() { final IdStrategy strategy = idStrategy(); ArrayList<User> users = new ArrayList<>(AllUsers.values()); users.sort((o1, o2) -> strategy.compare(o1.getId(), o2.getId())); return u...
Create a Java method that does the following: "Get all users.".
Of course, here is the Java code you requested: ```java public MapBuilder<K, V> putAll(Map<K, V> otherMap) { map.putAll(otherMap); return this; } ``` Hope this helps!
Create a Java method that does the following: "Add all entries from otherMap to this map.".
Of course, here is the Java code you requested: ```java public static void skipElement(final XMLStreamReader reader) throws XMLStreamException, IOException { if (reader.getEventType() != XMLStreamConstants.START_ELEMENT) { return; } final String namespace = reader.getNamespaceURI();...
Create a Java method that does the following: "Skips the XML element.".
Of course, here is the Java code you requested: ```java public boolean updateJob(EncodedImage encodedImage, @Consumer.Status int status) { if (!shouldProcess(encodedImage, status)) { return false; } EncodedImage oldEncodedImage; synchronized (this) { oldEncodedImage = mEncodedImage; m...
Create a Java method that does the following: "Update the job.".
Of course, here is the Java code you requested: ```java public LabelParameterVersionResult withInvalidLabels(String... invalidLabels) { if (this.invalidLabels == null) { setInvalidLabels(new com.amazonaws.internal.SdkInternalList<String>(invalidLabels.length)); } for (String ele : i...
Create a Java method that does the following: "Sets the value of the invalidLabels property.".
Of course, here is the Java code you requested: ```java public void purge() throws VictimsException { try { File cache = new File(location); if (cache.exists()) { FileUtils.deleteDirectory(cache); } create(cache); } catch (IOException e) {...
Create a Java method that does the following: "Purge the cache.".
Of course, here is the Java code you requested: ```java public double tune(AbstractStochasticCachingDiffUpdateFunction function, double[] initial, int sampleSize, double seta) { Timing timer = new Timing(); int[] sample = function.getSample(sampleSize); double sobj = getObjective(function, initial, 1...
Create a Java method that does the following: "Tune the given initial object with the given sample size with the given set of initial objects.".
Of course, here is the Java code you requested: ```java public void setMainGUI( final Component gui ) { postAlgorithmEvents = true; this.gui = gui; SwingUtilities.invokeLater(new Runnable() { public void run() { add(gui,BorderLayout.CENTER); }}); } ``` Hope this helps!
Create a Java method that does the following: "Set the main GUI.".
Of course, here is the Java code you requested: ```java public GetDocumentResponse getDocument(GetDocumentRequest request) { checkNotNull(request, "request should not be null."); checkNotNull(request.getDocumentId(), "documentId should not be null."); InternalRequest internalRequest = this.crea...
Create a Java method that does the following: "Get the detail information of a specific document.".
Of course, here is the Java code you requested: ```java public void delete( Key job_key, float dummy ) { if( _key != null ) { Log.debug(Log.Tag.Sys.LOCKS,"lock-then-delete "+_key+" by job "+job_key); new PriorWriteLock(job_key).invoke(_key); } Futures fs = new Futures(); delete_impl(fs); ...
Create a Java method that does the following: "Delete the object.".
Of course, here is the Java code you requested: ```java public HttpResponseWriter getResponseWriter(Class returnType, RouteDefinition definition, InjectionProvider provider, RoutingCon...
Create a Java method that does the following: "Gets the response writer.".
Of course, here is the Java code you requested: ```java public static String getString(ValueData valueData) throws RepositoryException { if (valueData instanceof TransientValueData) { return getString(((TransientValueData)valueData).delegate); } return ((AbstractValueData)valueData...
Create a Java method that does the following: "Get the string value of the value data.".
Of course, here is the Java code you requested: ```java public static void removeFindBugsNature(IProject project, IProgressMonitor monitor) throws CoreException { if (!hasFindBugsNature(project)) { return; } IProjectDescription description = project.getDescription(); String[...
Create a Java method that does the following: "Remove FindBugs nature from the project.".
Of course, here is the Java code you requested: ```java public void setCollectionIds(java.util.Collection<String> collectionIds) { if (collectionIds == null) { this.collectionIds = null; return; } this.collectionIds = new java.util.ArrayList<String>(collectionIds); ...
Create a Java method that does the following: "Sets the value of the collectionIds property.".
Of course, here is the Java code you requested: ```java @Override public DBParameterGroup createDBParameterGroup(CreateDBParameterGroupRequest request) { request = beforeClientExecution(request); return executeCreateDBParameterGroup(request); } ``` Hope this helps!
Create a Java method that does the following: "Creates a DB parameter group.".
Of course, here is the Java code you requested: ```java public static InstantType parseV3(String theV3String) { InstantType retVal = new InstantType(); retVal.setValueAsV3String(theV3String); return retVal; } ``` Hope this helps!
Create a Java method that does the following: "Parse an InstantType from a V3 formatted string".
Of course, here is the Java code you requested: ```java public static void synchronizeViewers(Collection<ImageViewer> viewers) { Iterator<ImageViewer> iterator = viewers.iterator(); if (!iterator.hasNext()) return; Synchronizer mainSynchronizer=iterator.next().getSynchronizer(); while (iterator.hasNext()) {...
Create a Java method that does the following: "Synchronize the viewers.".
Of course, here is the Java code you requested: ```java private Object serializationClone(Object source) { ObjectOutputStream oos = null; ObjectInputStream ois = null; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(bos); oos.writeObject(source); oos.flush(...
Create a Java method that does the following: "This method is used to clone an object.".
Of course, here is the Java code you requested: ```java static boolean isRelativePath(String candidatePath) { // java.io.File considers Windows paths to be absolute _only_ if they start with a drive letter. That is, // a Windows path '\foo\bar\baz' is _not_ considered absolute by File#isAbsolute. Th...
Create a Java method that does the following: "Checks if the path is a relative path.".
Of course, here is the Java code you requested: ```java protected void collectGroups(Group group, Set<String> groupSet) { Enumeration<? extends Principal> members = group.members(); while (members.hasMoreElements()) { Principal member = members.nextElement(); String name = member.getName(); ...
Create a Java method that does the following: "Collect groups from a group.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public static Set<Reference> toReferencesList(Vector<Object> referencesParams) throws GreenPepperServerException { Set<Reference> references = new TreeSet<Reference>(); for(Object referenceParams : references...
Create a Java method that does the following: "Converts a Vector of objects to a Set of Reference objects.".
Of course, here is the Java code you requested: ```java @Override protected void resize() { width = clock.getWidth() - clock.getInsets().getLeft() - clock.getInsets().getRight(); height = clock.getHeight() - clock.getInsets().getTop() - clock.getInsets().getBottom(); if (aspectRatio * width >...
Create a Java method that does the following: "Resize the calendar.".
Of course, here is the Java code you requested: ```java public static InvalidKBException validationErrors(List<String> errors){ StringBuilder message = new StringBuilder(); message.append(ErrorMessage.VALIDATION.getMessage(errors.size())); for (String s : errors) { message.append(s)...
Create a Java method that does the following: "Create an InvalidKBException with the given validation errors.".
Of course, here is the Java code you requested: ```java public DeviceAttribute[] read_attribute(TacoTangoDevice tacoDevice, String[] attrnames) throws DevFailed { Except.throw_exception("Api_TacoFailed", "Taco protocol not supported", "TacoTangoDeviceDAODefaultImpl.command_inout...
Create a Java method that does the following: "Read an attribute from a Taco device".
Of course, here is the Java code you requested: ```java public CompletableFuture<E> nextEvent() { E event = events.poll(); if (event != null) { return CompletableFuture.completedFuture(event); } else { CompletableFuture<E> future = new CompletableFuture<>(); futures.add(future); ret...
Create a Java method that does the following: "Gets the next event from the queue.".
Of course, here is the Java code you requested: ```java public static ClientBehaviorContext createClientBehaviorContext(FacesContext context, UIComponent component, String eventName, ...
Create a Java method that does the following: "Create a ClientBehaviorContext instance.".
Of course, here is the Java code you requested: ```java public DroolsLineBreakpoint getDroolsBreakpoint(String source) { if ( source == null ) { return null; } Iterator<IBreakpoint> iterator = getBreakpoints().iterator(); while ( iterator.hasNext() ) { IJavaBre...
Create a Java method that does the following: "Get the DroolsLineBreakpoint object for the given source.".
Of course, here is the Java code you requested: ```java public long getLong(final long min, final long max) { return min(min, max) + getLong(abs(max - min)); } ``` Hope this helps!
Create a Java method that does the following: "Gets the long value.".
Of course, here is the Java code you requested: ```java public Integer getInt(int index) { Number n = (Number) content.get(index); if (n == null) { return null; } else if (n instanceof Integer) { return (Integer) n; } else { return n.intValue(); //aut...
Create a Java method that does the following: "Gets the value of the a CRA s ACSCTYPE attribute.".
Of course, here is the Java code you requested: ```java protected static void validateExpression(FacesContext context, UIComponent source, String expression, char separatorChar) { if (context.isProjectStage(ProjectStage.Development)) { // checks the whole expression doesn't start with...
Create a Java method that does the following: "Validate the expression.".
Of course, here is the Java code you requested: ```java public EClass getBLN() { if (blnEClass == null) { blnEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(324); } return blnEClass; } ``` Hope this helps!
Create a Java method that does the following: "Get the BlnEClass.".
Of course, here is the Java code you requested: ```java public List<EntityBareJid> getJoinedRooms(EntityFullJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // Send the disco packet to the user DiscoverItems result = serviceDisc...
Create a Java method that does the following: "Get the joined rooms for a user.".
Of course, here is the Java code you requested: ```java public static ApiBodyMetadata mapTypeToPojo(JCodeModel pojoCodeModel, RamlRoot document, TypeDeclaration type) { RamlInterpretationResult interpret = RamlInterpreterFactory.getInterpreterForType(type).interpret(document, type, pojoCodeModel, false); // h...
Create a Java method that does the following: "Maps a type declaration to a POJO.".
Of course, here is the Java code you requested: ```java public static Statement assign(Expression lhs, Expression rhs) { return Assignment.create(lhs, rhs, null); } ``` Hope this helps!
Create a Java method that does the following: "Create an assignment statement.".
Of course, here is the Java code you requested: ```java private void processDynamicPrivileged(ComponentNameSpaceConfiguration compNSConfig) throws InjectionException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "process...
Create a Java method that does the following: "Process the dynamic privileged injection classes.".
Of course, here is the Java code you requested: ```java public boolean isValid(K key, UUID ticket) { if (timeouts.containsKey(key)) { Timeout<K> timeout = timeouts.get(key); return timeout.getTicket().equals(ticket); } else { return false; } } ``` Hope this helps!
Create a Java method that does the following: "Checks if the ticket is valid for the given key.".
Of course, here is the Java code you requested: ```java public static MozuUrl deleteConfigurationUrl(String carrierId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/shipping/admin/carriers/{carrierId}"); formatter.formatUrl("carrierId", carrierId); return new MozuUrl(formatter.getResourceUrl(),...
Create a Java method that does the following: "Get Resource Url for DeleteConfiguration".
Of course, here is the Java code you requested: ```java private static Properties loadPropsFromResource(String resourceName, boolean failOnResourceNotFoundOrNotLoaded) { Properties props = new Properties(); InputStream resource = PropertyLoaderFromResource.class.getResourceAsStream(resourceName); boolean resourc...
Create a Java method that does the following: "Load properties from a resource.".
Of course, here is the Java code you requested: ```java private static OptionParser getParser() { OptionParser parser = new OptionParser(); parser.accepts("help", "print help information"); parser.accepts("src-url", "[REQUIRED] bootstrap URL of source cluster") .withRequiredArg() ...
Create a Java method that does the following: "Returns a OptionParser for the IDE command line.".
Of course, here is the Java code you requested: ```java public void retrieveReferences(Object newObj, ClassDescriptor cld, boolean forced) throws PersistenceBrokerException { Iterator i = cld.getObjectReferenceDescriptors().iterator(); // turn off auto prefetching for related proxies ...
Create a Java method that does the following: "Retrieve references from the object with the ClassDescriptor cld.".
Of course, here is the Java code you requested: ```java @Override public void sawOpcode(int seen) { String message = null; try { stack.precomputation(this); if ((seen == Const.TABLESWITCH) || (seen == Const.LOOKUPSWITCH)) { int pc = getPC(); ...
Create a Java method that does the following: "overrides the visitor to look for try blocks and catch blocks.".
Of course, here is the Java code you requested: ```java public static Schedule createScheduleFromConventions( Date referenceDate, Date startDate, Date maturityDate, String frequency, String daycountConvention, String shortPeriodConvention, String dateRollConvention, BusinessdayCalendar business...
Create a Java method that does the following: "Creates a Schedule object from the specified CFDate objects.".
Of course, here is the Java code you requested: ```java private static void clearOneAndTwoButtonClicked(ActionEvent e) { // Clear the date pickers. datePicker1.clear(); datePicker2.clear(); // Display message. String message = "The datePicker1 and datePicker2 dates were cleared!...
Create a Java method that does the following: "clearOneAndTwoButtonClicked This method clears the date pickers and the date pickers.".
Of course, here is the Java code you requested: ```java @POST @Consumes("application/x.json-create-api-key") public Response createApiKey(CreateEmoApiKeyRequest request, @QueryParam("key") String key, @Authenticated Subject subject) { if (key != null) { requ...
Create a Java method that does the following: "Creates a new API key.".
Of course, here is the Java code you requested: ```java private boolean isNoMeasureAvailable(HLAMeasure measure, IProject project) { return !project.getMeasures().contains(measure) || project.getMeasureValue(measure, false) == Project.VALUE_NOT_AVAILABLE; } ``` Hope this helps!
Create a Java method that does the following: "Checks if a measure is available in the project.".
Of course, here is the Java code you requested: ```java public Any insert(long data) throws DevFailed { Any out_any = alloc_any(); out_any.insert_longlong(data); return out_any; } ``` Hope this helps!
Create a Java method that does the following: "Create a CORBA Any object and insert a long data in it.".
Of course, here is the Java code you requested: ```java public static final Optional<RangeArgs> createFromNode(ForNode node) { if (node.getExpr().getRoot() instanceof FunctionNode) { FunctionNode fn = (FunctionNode) node.getExpr().getRoot(); if (fn.getSoyFunction() instanceof RangeFunction) { r...
Create a Java method that does the following: "Create a RangeArgs object from a node.".
Of course, here is the Java code you requested: ```java public <S, T> Binding<S, T> findBinding(Class<S> source, Class<T> target) { return BINDING.findBinding(source, target); } ``` Hope this helps!
Create a Java method that does the following: "Find a binding for the given source and target class.".
Of course, here is the Java code you requested: ```java public static syslog_snmp delete(nitro_service client, syslog_snmp resource) throws Exception { resource.validate("delete"); return ((syslog_snmp[]) resource.delete_resource(client))[0]; } ``` Hope this helps!
Create a Java method that does the following: "Use this API to delete syslog_snmp.".
Of course, here is the Java code you requested: ```java public boolean isAllParametersHaveNoModifier() { for (List<List<IQueryParameterType>> nextParamName : values()) { for (List<IQueryParameterType> nextAnd : nextParamName) { for (IQueryParameterType nextOr : nextAnd) { if (isNotBlank(nextOr.getQueryPa...
Create a Java method that does the following: "Returns true if all parameters have no modifier.".
Of course, here is the Java code you requested: ```java public double similarityToLabel(List<VocabWord> document, String label) { if (document.isEmpty()) throw new IllegalStateException("Document has no words inside"); /* INDArray arr = Nd4j.create(document.size(), this.layerSize);...
Create a Java method that does the following: "Compute the similarity of a vocabulary to a label".
Of course, here is the Java code you requested: ```java public Observable<PublishSettings> getPublishSettingsAsync(UUID appId) { return getPublishSettingsWithServiceResponseAsync(appId).map(new Func1<ServiceResponse<PublishSettings>, PublishSettings>() { @Override public PublishSettings...
Create a Java method that does the following: "Gets the publish settings for an App ID.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public M limit(final int limit) { Checks.check(maxLimit == 0 || limit <= maxLimit, "Limit must not exceed %d!", maxLimit); Checks.check(minLimit == 0 || limit >= minLimit, "Limit must be greater or equal to %...
Create a Java method that does the following: "Sets the limit of the result of a single segment of a single segment.".
Of course, here is the Java code you requested: ```java public static SQLTable get(final String _name) throws CacheReloadException { final Cache<String, SQLTable> cache = InfinispanCache.get().<String, SQLTable>getCache(SQLTable.NAMECACHE); if (!cache.containsKey(_name)) { SQLTa...
Create a Java method that does the following: "Gets the SQL table with the given name.".
Of course, here is the Java code you requested: ```java static Accessor accessorFor(Class<?> type, String accessorName, InheritingConfiguration configuration) { PropertyInfoKey key = new PropertyInfoKey(type, accessorName, configuration); if (!ACCESSOR_CACHE.containsKey(key) || !FIELD_CACHE.containsKey(key))...
Create a Java method that does the following: "Returns an Accessor for the given type and accessorName.".
Of course, here is the Java code you requested: ```java private void addPostParams(final Request request) { if (uniqueName != null) { request.addPostParam("UniqueName", uniqueName); } if (domainSuffix != null) { request.addPostParam("DomainSuffix", domainSuffix); ...
Create a Java method that does the following: "Add the post parameters to the request.".
Of course, here is the Java code you requested: ```java protected void addOption(String option, String comment, String argument, boolean mandatory, String formatRegexp) { // Check if usage text has been set in which case this option is expecting arguments. boolean expectsArgs = (!((argument == null...
Create a Java method that does the following: "Add an option to the command line.".
Of course, here is the Java code you requested: ```java private String formatTime(Date value) { return (value == null ? null : m_formats.getTimeFormat().format(value)); } ``` Hope this helps!
Create a Java method that does the following: "This method is called to format a time value.".
Of course, here is the Java code you requested: ```java public static void closeQuietly(Closeable closeable) { try { closeable.close(); } catch (IOException e) { LOGGER.error("Could not close closable", e); } } ``` Hope this helps!
Create a Java method that does the following: "Close the given Closeable object.".
Of course, here is the Java code you requested: ```java private ElasticSearchSetup.Connection legacyConfiguration(Configuration config) { Node node; Client client; if (config.get(LOCAL_MODE)) { log.debug("Configuring ES for JVM local transport"); boolean clientOnly = ...
Create a Java method that does the following: "Creates a connection to the legacy configuration.".
Of course, here is the Java code you requested: ```java private float addImage(Image i, float left, float right, float extraHeight, int alignment) { Image image = Image.getInstance(i); if (image.getScaledWidth() > right - left) { image.scaleToFit(right - left, Float.MAX_VALUE); } ...
Create a Java method that does the following: "Add image to the line.".
Of course, here is the Java code you requested: ```java public boolean pushAll(V firstValue, V... moreValues) { check(); context.getValueStack().pushAll(firstValue, moreValues); return true; } ``` Hope this helps!
Create a Java method that does the following: "Push all values to the value stack.".
Of course, here is the Java code you requested: ```java @CanIgnoreReturnValue public Ordered containsAtLeastEntriesIn(Map<?, ?> expectedMap) { if (expectedMap.isEmpty()) { return IN_ORDER; } boolean containsAnyOrder = containsEntriesInAnyOrder(expectedMap, "contains at least", /* allowUnexp...
Create a Java method that does the following: "Checks if the map contains at least one entry in the expected map.".
Of course, here is the Java code you requested: ```java public synchronized CloneableBootstrapContext createBootstrapContext(String id, String name) { if (id == null || id.trim().equals("")) throw new IllegalArgumentException("The id of BootstrapContext is invalid: " + id); // Check for an act...
Create a Java method that does the following: "Create a BootstrapContext object.".
Of course, here is the Java code you requested: ```java public static String getPatternFromFile(BufferedReader reader) throws IOException { StringBuilder matchString = new StringBuilder(); for (String thisLine; (thisLine = reader.readLine()) != null; ) { if (matchString.length() > 0 && emptyLinePatter...
Create a Java method that does the following: "Gets the pattern from a buffered reader.".
Of course, here is the Java code you requested: ```java public float similarity(K what, K with) { Vector vectorWhat = storage.get(what); if (vectorWhat == null) { return -1f; } Vector vectorWith = storage.get(with); if (vectorWith == null) { ...
Create a Java method that does the following: "Gets the similarity of two terms of a set of terms.".
Of course, here is the Java code you requested: ```java public void override(HiveRunnerConfig hiveRunnerConfig) { config.putAll(hiveRunnerConfig.config); hiveConfSystemOverride.putAll(hiveRunnerConfig.hiveConfSystemOverride); } ``` Hope this helps!
Create a Java method that does the following: "Override the configuration of this class.".
Of course, here is the Java code you requested: ```java protected static ImmutableList<VariableOrGroundTerm> extractArguments(DataAtom atom, ImmutableList<Integer> positions) { ImmutableList.Builder<VariableOrGroundTerm> listBuilder = Im...
Create a Java method that does the following: "Extract the arguments from the given positions.".
Of course, here is the Java code you requested: ```java public void setPaths(@Nonnull List<Path> paths) { ArgumentUtils.requireNonNull("paths", paths); this.paths = paths; } ``` Hope this helps!
Create a Java method that does the following: "Sets the paths of the generated code.".
Of course, here is the Java code you requested: ```java public AuthorizedList addResources(String... theResources) { Validate.notNull(theResources, "theResources must not be null"); for (String next : theResources) { addResource(next); } return this; } ``` Hope this helps!
Create a Java method that does the following: "Add a list of resources to the list".
Of course, here is the Java code you requested: ```java private boolean canProcessRequest(TimeRestrictedAccessConfig config, String destination) { if (destination == null || destination.trim().length() == 0) { destination = "/"; //$NON-NLS-1$ } List<TimeRestrictedAccess> rulesEn...
Create a Java method that does the following: "Checks if a request can be processed by a user.".
Of course, here is the Java code you requested: ```java public Date getDateTimeHelper(int dateDataSet, int timeDataSet) throws SerializationException { DataSet dateDS = null; DataSet timeDS = null; for (Iterator<DataSet> i = dataSets.iterator(); (dateDS == null || timeDS == null) && i.hasNext();) { DataSe...
Create a Java method that does the following: "Gets the date data set from the data set list.".
Of course, here is the Java code you requested: ```java private Object calculate(String expression) { Stack<String> postfixStack = new Stack<String>(); Stack<Object> resultStack = new Stack<Object>(); prepare(expression,postfixStack); Collections.reverse(postfixStack);// 将后缀式栈反转 wh...
Create a Java method that does the following: "Calculate the result of a CID".
Of course, here is the Java code you requested: ```java public static LocalizationContext getLocalizationContext(PageContext pc, String basename) { LocalizationContext locCtxt = null; ResourceBundle bundle = null; if ((basename == null) || basename.equals("")) { return new L...
Create a Java method that does the following: "Gets the localization context for the specified basename.".
Of course, here is the Java code you requested: ```java private VariableHandler.URLStruction _getVTPLTemplateStructionStopCache(ESInfo dslinfo, String dsl) { String ikey = dsl; String okey = dslinfo.getTemplateName(); MissingStaticCache<String,VariableHandler.URLStruction> sqlstructionMap = this.parserVTPLTem...
Create a Java method that does the following: "This method is called to get the template from the cache.".
Of course, here is the Java code you requested: ```java private boolean isMatchingUserGroupKey(final JsonNode node) { return node.get(aadAuthenticationProperties.getUserGroup().getKey()).asText() .equals(aadAuthenticationProperties.getUserGroup().getValue()); } ``` Hope this helps!
Create a Java method that does the following: "Is the key of the user group name matching the value of the aad authentication properties.".
Of course, here is the Java code you requested: ```java @BetaApi public final Operation moveDiskProject( ProjectName project, DiskMoveRequest diskMoveRequestResource) { MoveDiskProjectHttpRequest request = MoveDiskProjectHttpRequest.newBuilder() .setProject(project == null ? null : pro...
Create a Java method that does the following: "Moves the specified drive to the specified disk.".
Of course, here is the Java code you requested: ```java public void addSummaryLabel(Content memberTree) { Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, contents.annotateTypeRequiredMemberSummaryLabel); memberTree.addContent(label); } ``` Hope this helps!
Create a Java method that does the following: "Add the summary label for the class page.".
Of course, here is the Java code you requested: ```java private static void init() { if (alFirstConsonants == null) { alFirstConsonants = new ArrayList(); alLastConsonants = new ArrayList(); alMainVowels = new ArrayList(); alSecondaryVowels = new ArrayList(); initArrayList(alFirstConsonants, vnFirstC...
Create a Java method that does the following: "Initializes the internal structures.".
Of course, here is the Java code you requested: ```java public static String formatMessage(TraceComponent tc, Locale locale, String msgKey, Object... objs) { return formatMessage(tc, (locale == null) ? null : Collections.singletonList(locale), msgKey, objs); } ``` Hope this helps!
Create a Java method that does the following: "Format a message for the given locale.".
Of course, here is the Java code you requested: ```java public long getDbId() throws IOException { FileTxnIterator itr = new FileTxnIterator(logDir, 0); FileHeader fh=readHeader(itr.logFile); itr.close(); if(fh==null) throw new IOException("Unsupported Format."); ret...
Create a Java method that does the following: "Get the database id of the transaction.".
Of course, here is the Java code you requested: ```java public static boolean isCipherSuiteAvailable(String cipherSuite) { String converted = CipherSuiteConverter.toOpenSsl(cipherSuite, IS_BORINGSSL); if (converted != null) { cipherSuite = converted; } return AVAILABLE_OPENS...
Create a Java method that does the following: "Check if the specified cipher suite is available in the OpenSSL library.".
Of course, here is the Java code you requested: ```java public final URL getResourceURL(String name) { URL url = loadResourceURL(name); if (url == null && subLoaders != null) for (AbstractClassLoader sub : subLoaders) { url = sub.getResourceURL(name); if (url != null) break; } return url; ...
Create a Java method that does the following: "Returns the URL of the named resource.".