code
stringlengths
160
48.7k
prompt
stringlengths
38
3.13k
Of course, here is the Java code you requested: ```java private void evictBiDiReferencedEntityTypes() { getEntityType().getMappedByAttributes().map(Attribute::getRefEntity).forEach(l1Cache::evictAll); getEntityType() .getInversedByAttributes() .map(Attribute::getRefEntity) .forEach(l1Ca...
Create a Java method that does the following: "Evict all the bidi referenced entity types.".
Of course, here is the Java code you requested: ```java public CBORObject findAttribute(HeaderKeys label) { return findAttribute(label.AsCBOR(), PROTECTED | UNPROTECTED | DO_NOT_SEND); } ``` Hope this helps!
Create a Java method that does the following: "Find an attribute by label.".
Of course, here is the Java code you requested: ```java public List<ChangesContainer> getSortedList() { List<ChangesContainer> changesContainers = new ArrayList<ChangesContainer>(changes); Collections.sort(changesContainers); return changesContainers; } ``` Hope this helps!
Create a Java method that does the following: "Get sorted list of changes".
Of course, here is the Java code you requested: ```java public void setIsCloned(boolean isCloned) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setIsCloned", Boolean.valueOf(isCloned)); this.isCloned = isCloned; if (TraceComponent.isAn...
Create a Java method that does the following: "Sets the isCloned flag.".
Of course, here is the Java code you requested: ```java public static String sendBody(String target, byte[] body, String proxy, RequestMethod method) throws IOException { return sendBody(target, body, proxy, ENCODING, method); } ``` Hope this helps!
Create a Java method that does the following: "Send a byte array to a target URL using the HTTP method.".
Of course, here is the Java code you requested: ```java public static <T> Middleware<AsyncHandler<T>, AsyncHandler<Response<ByteString>>> jsonSerialize(ObjectWriter objectWriter) { return handler -> requestContext -> handler.invoke(requestContext) .thenApply(result -> Response .fo...
Create a Java method that does the following: "Middleware for serialization of a single object to a JSON response.".
Of course, here is the Java code you requested: ```java @Benchmark public Response buildAndQuery_fake() { return Feign.builder().client(fakeClient) .target(FeignTestInterface.class, "http://localhost").query(); } ``` Hope this helps!
Create a Java method that does the following: "Benchmarks building and query.".
Of course, here is the Java code you requested: ```java public KeyArea setupKey(int iKeyArea) { KeyArea keyArea = null; if (iKeyArea == kIDKey) { keyArea = this.makeIndex(DBConstants.UNIQUE, "PrimaryKey"); keyArea.addKeyField(kID, DBConstants.ASCENDING); } ...
Create a Java method that does the following: "Set up the KeyArea for this record.".
Of course, here is the Java code you requested: ```java @Nullable public static String firstString(Cursor cursor, boolean close) { String s = cursor.moveToFirst() ? cursor.getString(0) : null; close(cursor, close); return s; } ``` Hope this helps!
Create a Java method that does the following: "Get the first string from the cursor.".
Of course, here is the Java code you requested: ```java public void addIncludes(Collection<String> properties) { String[] sa = new String[properties.size()]; addIncludes(properties.toArray(sa)); } ``` Hope this helps!
Create a Java method that does the following: "Add a collection of includes to the result set.".
Of course, here is the Java code you requested: ```java public Observable<ServiceResponse<List<IntentClassifier>>> listCustomPrebuiltIntentsWithServiceResponseAsync(UUID appId, String versionId) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoi...
Create a Java method that does the following: "List custom prebuilt intents.".
Of course, here is the Java code you requested: ```java public void setYFilSize(Integer newYFilSize) { Integer oldYFilSize = yFilSize; yFilSize = newYFilSize; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.ICP__YFIL_SIZE, oldYFilSize, yFilSize)); } ``` Hope ...
Create a Java method that does the following: "Sets the yFilSize value.".
Of course, here is the Java code you requested: ```java @Override public INDArray scalar(Number value, long offset) { if (Nd4j.dataType() == DataType.DOUBLE) return scalar(value.doubleValue(), offset); if (Nd4j.dataType() == DataType.FLOAT || Nd4j.dataType() == DataType.HALF) ...
Create a Java method that does the following: "This method is used to convert a Number to a scalar".
Of course, here is the Java code you requested: ```java public static cachepolicylabel[] get(nitro_service service) throws Exception{ cachepolicylabel obj = new cachepolicylabel(); cachepolicylabel[] response = (cachepolicylabel[])obj.get_resources(service); return response; } ``` Hope this helps!
Create a Java method that does the following: "Use this API to fetch all the cachepolicylabel resources that are configured on netscaler.".
Of course, here is the Java code you requested: ```java public void parseSearchExpression(String searchExpr) throws WIMException { try { if (searchExpr == null || searchExpr.trim().length() == 0) { return; } WIMXPathInterpreter parser = new WIMXPathInterpret...
Create a Java method that does the following: "Parse the search expression.".
Of course, here is the Java code you requested: ```java public GraphQueryResult sendGraphQuery(String queryString, SPARQLQueryBindingSet bindings, boolean includeInferred, String baseURI) throws IOException, MarkLogicSesameException { InputStream stream = getClient().performGraphQuery(queryString, bindings, this.tx,...
Create a Java method that does the following: "Send a graph query to MarkLogic.".
Of course, here is the Java code you requested: ```java public void printHelp() { final HelpFormatter formatter = new HelpFormatter(); final Options options = new Options(); addStandardOptions(options); if (line != null && line.hasOption(ARGUMENT.ADVANCED_HELP)) { addAdvance...
Create a Java method that does the following: "Prints the help message for the CVE Vulnerabilities.".
Of course, here is the Java code you requested: ```java public Criteria<T> queryAllStrict(SearchModel search) { Query<T> query = new Query<>(new TransformerImpl<T>(this.currentSession())); return query.createCriteria(this.getEntityClass(), search); } ``` Hope this helps!
Create a Java method that does the following: "Query all the entities in the session using the given search model.".
Of course, here is the Java code you requested: ```java protected Properties getFaultTolerant(Bw bwService) { SortedProperties result = new SortedProperties(); String serviceKey = "bw[" + bwService.getName() + "]"; FaultTolerant faultTolerant = getBWFaultTolerant(bwService); if (faultTolerant != null) { ...
Create a Java method that does the following: "Get the fault tolerant properties.".
Of course, here is the Java code you requested: ```java private BaseDescr conditionalBranch(CEDescrBuilder<?, ?> ce, ConditionalBranchDescrBuilder<?> conditionalBranch) throws RecognitionException { if (conditionalBranch == null) { conditionalBranch = helper.start((DescrBuilder<?, ?>) ce, ...
Create a Java method that does the following: "conditionalBranch - ConditionalBranchDescrBuilder".
Of course, here is the Java code you requested: ```java public SelectResult withItems(Item... items) { if (this.items == null) { setItems(new com.amazonaws.internal.SdkInternalList<Item>(items.length)); } for (Item ele : items) { this.items.add(ele); } re...
Create a Java method that does the following: "Adds the items to the result.".
Of course, here is the Java code you requested: ```java public static Matcher<ExpressionTree> methodInvocation( final Matcher<ExpressionTree> methodSelectMatcher) { return new Matcher<ExpressionTree>() { @Override public boolean matches(ExpressionTree expressionTree, VisitorState state) { ...
Create a Java method that does the following: "Matches an AST node if the method invocation is a MethodInvocationTree.".
Of course, here is the Java code you requested: ```java void onMessageReceived(final WfdMessage msg) { threadPool.execute(new Runnable() { @Override public void run() { if (msg.getReceiverId().equals(myIdentifier)) { handle(msg); } els...
Create a Java method that does the following: "This method is called when a message is received from the server.".
Of course, here is the Java code you requested: ```java public Vector decodeEvents(final String document) { if (document != null) { if (document.trim().equals("")) { return null; } String newDoc; String newPartialEvent = null; //separate the stri...
Create a Java method that does the following: "Decodes the document into a Vector of events.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") @Override public <T> DatumWriter<T> create(TypeToken<T> type, Schema schema) { try { Class<DatumWriter<?>> writerClass = datumWriterClasses.getUnchecked(new CacheKey(schema, type)); return (DatumWriter<T>) writer...
Create a Java method that does the following: "Create a DatumWriter for a type.".
Of course, here is the Java code you requested: ```java @Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDatatypeRestrictionImpl instance) throws SerializationException { deserialize(streamReader, instance); } ``` Hope this helps!
Create a Java method that does the following: "Deserialize an instance of the CnCTYPE.".
Of course, here is the Java code you requested: ```java public static Boolean and(final Boolean... array) { if (array == null) { throw new IllegalArgumentException("The Array must not be null"); } if (array.length == 0) { throw new IllegalArgumentException("Array is empt...
Create a Java method that does the following: "A method to perform an and operation on an array of booleans.".
Of course, here is the Java code you requested: ```java public static String percentEncode(String source) throws AuthException { try { return URLEncoder.encode(source, "UTF-8") .replace("+", "%20") .replace("*", "%2A") .replace("%7E", "~"); } catch (UnsupportedEncodingExcept...
Create a Java method that does the following: "Percent encode a string.".
Of course, here is the Java code you requested: ```java public Matrix multiply(Matrix B) { Matrix C = new DenseMatrix(this.rows(), B.cols()); multiply(B, C); return C; } ``` Hope this helps!
Create a Java method that does the following: "Multiply this matrix by B.".
Of course, here is the Java code you requested: ```java public static <T> Map<Integer, T> fromIterable( Iterable<? extends T> iterable) { Map<Integer, T> map = new LinkedHashMap<Integer, T>(); int i = 0; for (T t : iterable) { map.put(i, t); i...
Create a Java method that does the following: "Creates a map from an iterable of class T.".
Of course, here is the Java code you requested: ```java private void putRecursive(Class<?> type, E element, Class<?> elementType) { Class<?> clazz = type; while (clazz != null) { if (isAccepted(clazz)) { E existing = this.classMap.get(clazz); boolean add = (existing == null); if ...
Create a Java method that does the following: "Recursive method to put an element into the class map.".
Of course, here is the Java code you requested: ```java @Nonnull public <V extends T> LConsumerBuilder<T> casesOf(Class<V> argC, Consumer<LConsumerBuilder<V>> pcpConsumer) { PartialCase.The pc = partialCaseFactoryMethod(a -> (argC == null || argC.isInstance(a))); pc.specifySubCases((Consumer) pcpConsumer); ret...
Create a Java method that does the following: "Creates a new instance of the class C.".
Of course, here is the Java code you requested: ```java public static Dataset<String, String> readSVMLightFormat(String filename, Index<String> featureIndex, Index<String> labelIndex, List<String> lines) { Dataset<String, String> dataset; try { dataset = new Dataset<String, String>(10, featureIndex, l...
Create a Java method that does the following: "Reads a Dataset from a SVM Light file.".
Of course, here is the Java code you requested: ```java public boolean isExternalizable(final Datastore datastore) { if (datastore == null) { return false; } if (datastore instanceof JdbcDatastore) { return true; } if (datastore instanceof CsvDatastore)...
Create a Java method that does the following: "Checks if the datastore is externalizable.".
Of course, here is the Java code you requested: ```java public void setFailedEntries(java.util.Collection<PutTargetsResultEntry> failedEntries) { if (failedEntries == null) { this.failedEntries = null; return; } this.failedEntries = new java.util.ArrayList<PutTargetsRes...
Create a Java method that does the following: "Sets the value of the failedEntries property.".
Of course, here is the Java code you requested: ```java public void printReport(PrintWriter out, ResourceBundle reg) throws DBException { if (reg == null) reg = ((BaseApplication)this.getTask().getApplication()).getResources(HtmlConstants.XML_RESOURCE, false); String string = XmlUtili...
Create a Java method that does the following: "PrintReport Method.".
Of course, here is the Java code you requested: ```java public OptionsBuilder excludes(String... excludes) { return excludes != null ? excludes(Arrays.asList(excludes)) : this; } ``` Hope this helps!
Create a Java method that does the following: "Set the excludes to be used.".
Of course, here is the Java code you requested: ```java public void refresh() { final WiresShapeControlHandleList list = _loadControls(IControlHandle.ControlHandleStandardType.RESIZE); if (null != list) { list.refresh(); } } ``` Hope this helps!
Create a Java method that does the following: "Refresh the SECTYPE.".
Of course, here is the Java code you requested: ```java public Response andContent(Map<String, Object> content) { Objects.requireNonNull(content, Required.CONTENT.toString()); this.content.putAll(content); return this; } ``` Hope this helps!
Create a Java method that does the following: "Adds the content to the response".
Of course, here is the Java code you requested: ```java public static <T extends Comparable<T>> RelationalOperator<T> lessThanOrGreaterThanEqualTo(T lowerBound, T upperBound) { return ComposableRelationalOperator.compose(lessThan(lowerBound), LogicalOperator.OR, greaterThanEqualTo(upperBound)); } ``` Hope this ...
Create a Java method that does the following: "Gets the RelationalOperator performing less than or greater than equal to comparisons to determine whether all provided values are less than equal to any other value.".
Of course, here is the Java code you requested: ```java private void processComponents(MAPDialogImpl mapDialogImpl, Component[] components) { // Now let us decode the Components for (Component c : components) { doProcessComponent(mapDialogImpl, c); } } ``` Hope this helps!
Create a Java method that does the following: "This method processes the components in the components array.".
Of course, here is the Java code you requested: ```java public void setlocFreq(int[][] ints) { for (int i = 0; i < ints.length; i++) { if (ints[i][0] > 0) { flag = true; break; } } locFreq = ints; } ``` Hope this helps!
Create a Java method that does the following: "set locFreq This is a helper method to set the locFreq of the class.".
Of course, here is the Java code you requested: ```java private JButton getBtnReset() { if (btnReset == null) { btnReset = new JButton(); btnReset.setText(Constant.messages.getString("history.filter.button.clear")); btnReset.addActionListener(new java.awt.event.ActionListener() { @Override ...
Create a Java method that does the following: "Gets the JButton that resets the user s data.".
Of course, here is the Java code you requested: ```java private void sendRequest(InvocationRequest helpRequest, boolean startRemoteViewer) { this.helpRequest = helpRequest; if (helpRequest != null) { if (remoteViewerActive()) { remoteQueue.sendRequest(helpRequest); ...
Create a Java method that does the following: "Send a request to the remote viewer.".
Of course, here is the Java code you requested: ```java @Override public DynamicDataStore create(StoreConfig config) throws IOException { try { return StoreFactory.createDynamicDataStore(config); } catch (Exception e) { if(e instanceof IOException) { throw (I...
Create a Java method that does the following: "Create a DynamicDataStore from the given configuration.".
Of course, here is the Java code you requested: ```java private PExp getImpliesExists(AMapCompMapExp exp, ILexNameToken finmap, ILexNameToken findex) { AExistsExp exists = new AExistsExp(); exists.setBindList(getSetBindList(finmap, findex)); exists.setPredicate(getExistsPredicate(exp, finmap, findex)); ret...
Create a Java method that does the following: "Get the implementation of exists".
Of course, here is the Java code you requested: ```java public static long getResultDisplayDurationInMsOrDefaultValue(Intent intent) { if (intent == null) return DEFAULT_INTENT_RESULT_DURATION_MS; return intent.getLongExtra(Intents.Scan.RESULT_DISPLAY_DURATION_MS, DEFAULT_INTENT_RESULT_DURATION_MS);...
Create a Java method that does the following: "Gets the result display duration in ms or the default value if the intent parameter is null.".
Of course, here is the Java code you requested: ```java public Process exec(String namespace, String name, String[] command, boolean stdin) throws ApiException, IOException { return exec(namespace, name, command, null, stdin, false); } ``` Hope this helps!
Create a Java method that does the following: "Execute a command on a cluster.".
Of course, here is the Java code you requested: ```java @Override public DeletePortfolioResult deletePortfolio(DeletePortfolioRequest request) { request = beforeClientExecution(request); return executeDeletePortfolio(request); } ``` Hope this helps!
Create a Java method that does the following: "Deletes an existing portfolio.".
Of course, here is the Java code you requested: ```java public static String readJsonFile(Path dir, Path config, String version, String filename) throws IOException { try { return readJsonVersionedFile(dir, version, filename); } catch (NoSuchFileException e) { // We fall back to...
Create a Java method that does the following: "Read a single file from a directory.".
Of course, here is the Java code you requested: ```java public boolean read(DataInputStream daIn, boolean bFixedLength) // Fixed length = false { try { float fData = daIn.readFloat(); Float flData = null; if (!Float.isNaN(fData)) flData = new Float(fDat...
Create a Java method that does the following: "Read the phrase.".
Of course, here is the Java code you requested: ```java public MailAccount reserveMailAccount(final String accountReservationKey, final String pool) { if (pool == null && emailAddressPools.keySet().size() > 1) { throw new IllegalStateException("No pool specified but multiple pools available."); } String pool...
Create a Java method that does the following: "Reserves an available mail account.".
Of course, here is the Java code you requested: ```java private void postInvokeRolledbackException(EJSDeployedSupport s, CSITransactionRolledbackException ex) throws RemoteException { //--------------------------------------------------------------- // Check to see if the application requested that thi...
Create a Java method that does the following: "PostInvokeRolledbackException Method.".
Of course, here is the Java code you requested: ```java public void computeHistogram( T image , RectangleRotate_F32 region ) { interpolate.setImage(image); c = (float)Math.cos( region.theta ); s = (float)Math.sin( region.theta ); for( int i = 0; i < histogram.length; i++ ) { histogram[i] = 0; } // i...
Create a Java method that does the following: "Computes the histogram using the image and region".
Of course, here is the Java code you requested: ```java public Member applyHedge(Hedge hedge) { String newMemberName = hedge.getName() + "$" + name; Member member = new Member(newMemberName, functionCall, hedge); this.points.stream().forEach(point -> member.points.add(point)); return member; } ``` Hope this ...
Create a Java method that does the following: "Apply a Hedge to this member.".
Of course, here is the Java code you requested: ```java @Override public List<String> introspect() { List<String> rc = super.introspect(); String prefix = getClass().getSimpleName() + "@" + hashCode() + ": "; rc.add(prefix + "callback=" + callback); return rc; } ``` Hope this h...
Create a Java method that does the following: "Override this method to add additional information to the result set.".
Of course, here is the Java code you requested: ```java public void eventRouted(EventTypeID eventTypeID, long routingTime) { EventTypeRoutingStatisticsImpl eventTypeRoutingStatistics = eventTypeRoutingStatisticsMap.get(eventTypeID); if (eventTypeRoutingStatistics == null) { synchronized (eventTypeRoutingStatist...
Create a Java method that does the following: "This method is called by the event routing service to indicate that an event has been routed.".
Of course, here is the Java code you requested: ```java public ResourceKey child(String childId) { return new ResourceKey(bundle, id == null ? childId : join(id, childId)); } ``` Hope this helps!
Create a Java method that does the following: "Returns a child resource key.".
Of course, here is the Java code you requested: ```java public static String joinSizeInfoToKey(String key, int w, int h) { if (w > 0 && h != Integer.MAX_VALUE && h > 0 && h != Integer.MAX_VALUE) { return new StringBuilder(key).append(SIZE_SP).append(w).append(SIZE_SP).append(h).toString(); ...
Create a Java method that does the following: "Join size info to key.".
Of course, here is the Java code you requested: ```java @Override public boolean validate(final Problems problems, final String compName, final String model) { try { Integer.parseInt(model); } catch (final NumberFormatException e) { problems.add(ValidationBundle.getMessage(IsAnIntegerValidator.class, "ERR_N...
Create a Java method that does the following: "Validate the model.".
Of course, here is the Java code you requested: ```java public void setNonKeyAttributes(java.util.Collection<String> nonKeyAttributes) { if (nonKeyAttributes == null) { this.nonKeyAttributes = null; return; } this.nonKeyAttributes = new java.util.ArrayList<String>(nonKe...
Create a Java method that does the following: "Sets the value of the nonKeyAttributes property.".
Of course, here is the Java code you requested: ```java private String[] calculateProperties(OCommandContext ctx) { if (propertyList == null) { return null; } return propertyList.stream().map(x -> x.getCompleteKey()).collect(Collectors.toList()).toArray(new String[] {}); } ``` Hope this helps!
Create a Java method that does the following: "Calculate the property list.".
Of course, here is the Java code you requested: ```java public Transition createTransitionForState(final TransitionableState state, final String criteriaOutcome, final String targetState, final boolean removeExisting) { try { if (removeExisting) { val success = (Transition) state.ge...
Create a Java method that does the following: "Create transition for state.".
Of course, here is the Java code you requested: ```java public boolean hasMoreAdminOUs() throws CmsException { List<CmsOrganizationalUnit> orgUnits = getOrgUnits(); if (orgUnits == null) { return false; } if (orgUnits.size() <= 1) { return false; } ...
Create a Java method that does the following: "Checks if there are more admin OUs in the current user.".
Of course, here is the Java code you requested: ```java public static BasicDBObjectBuilder start(final String key, final Object val) { return (new BasicDBObjectBuilder()).add(key, val); } ``` Hope this helps!
Create a Java method that does the following: "Start a new instance of a .".
Of course, here is the Java code you requested: ```java @Override public void close() { if (isShutdown.getAndSet(true)) { return; } HikariPool p = pool; if (p != null) { try { LOGGER.info("{} - Shutdown initiated...", getPoolName()); p.shutdown()...
Create a Java method that does the following: "Close the HikariPool.".
Of course, here is the Java code you requested: ```java String dump() { StringBuilder sbuf = new StringBuilder(); sbuf.append("\n").append(toString()); sbuf.append("\n PersistenceUnit name : ").append(ivArchivePuId.getPuName()); sbuf.append("\n Schema Version : ").append(xmlSchema...
Create a Java method that does the following: "Dump the contents of this object to a String.".
Of course, here is the Java code you requested: ```java public static bridgegroup_vlan_binding[] get_filtered(nitro_service service, Long id, String filter) throws Exception{ bridgegroup_vlan_binding obj = new bridgegroup_vlan_binding(); obj.set_id(id); options option = new options(); option.set_filter(filter)...
Create a Java method that does the following: "Use this API to fetch filtered set of bridgegroup_vlan_binding resources of given name. set the filter parameter values in filter parameter value.".
Of course, here is the Java code you requested: ```java public void addInvalidatingAddress(final GroupAddress ga) { if (getMainAddress().equals(ga)) throw new KNXIllegalArgumentException( "updating address " + ga + " equals main address of this datapoint '" + getName() + "'"); if (!invalidating.contains(g...
Create a Java method that does the following: "Adds a new invalidating address to the datapoint.".
Of course, here is the Java code you requested: ```java public MethodDescription[] createMethodDescriptions( MethodDescriptor[] mds) { if (mds == null) { return null; } MethodDescription[] descriptions = new MethodDe...
Create a Java method that does the following: "Create a MethodDescription array from a list of MethodDescriptor objects.".
Of course, here is the Java code you requested: ```java public JSONArray construct(){ JSONArray ret = new JSONArray(); ret.put(start.getMillis() / 1000); ret.put(end.getMillis() / 1000); ret.put(runtime); ret.put(area); ret.put(0); ret.put(completed ? 1 : 0); ...
Create a Java method that does the following: "Construct a JSONArray with the attributes of this exception.".
Of course, here is the Java code you requested: ```java public static Adresse of(Ort ort, String strasse) { List<String> splitted = toStrasseHausnummer(strasse); return of(ort, splitted.get(0), splitted.get(1)); } ``` Hope this helps!
Create a Java method that does the following: "Returns an Adresse from the given string.".
Of course, here is the Java code you requested: ```java public static void quote(StringBuffer buf, String s) { synchronized(buf) { buf.append('"'); for (int i=0;i<s.length();i++) { char c = s.charAt(i); if (c=='"') ...
Create a Java method that does the following: "Quote a string.".
Of course, here is the Java code you requested: ```java public Iterable<Page> getPagesContainingTemplateFragments(List<String> templateFragments) throws WikiApiException{ return getFragmentFilteredPages(templateFragments, true); } ``` Hope this helps!
Create a Java method that does the following: "Returns an iterable of pages containing the given template fragments.".
Of course, here is the Java code you requested: ```java @Override public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit) throws IOException { hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName()); hiveUnit.setInputFormat(this.serDeWrapper.getInputFormatClassName());...
Create a Java method that does the following: "Add the serde properties to the HiveRegistrationUnit".
Of course, here is the Java code you requested: ```java protected boolean internalEquals(ValueData another) { if (another instanceof PermissionValueData) { return ((PermissionValueData)another).value.equals(value); } return false; } ``` Hope this helps!
Create a Java method that does the following: "Internal equals method.".
Of course, here is the Java code you requested: ```java public String toRegexForFixedDate(Date date) { StringBuilder buf = new StringBuilder(); Converter<Object> p = headTokenConverter; while (p != null) { if (p instanceof LiteralConverter) { buf.append(p.convert(null)); } else if (p in...
Create a Java method that does the following: "To regex for fixed date.".
Of course, here is the Java code you requested: ```java public Stream<Participant> getParticipantsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream()); } ``` Hope this helps!
Create a Java method that does the following: "Get a Stream of participants of a merge request.".
Of course, here is the Java code you requested: ```java private void processToken(String tokenData) throws JSONException, LoginException { JSONObject json = new JSONObject(tokenData); // Validate that the token hasn't expired. ZonedDateTime expires = ZonedDateTime.parse(json.getString("tokenE...
Create a Java method that does the following: "Process the token data.".
Of course, here is the Java code you requested: ```java void ensureSize(long position) { assertNonNegativePosition(position); if (position >= this.size) { this.validHashCode = false; long newSize = position + 1; int arrayOfBitsLength = this.arrayOfBits.length; int sizeInWords = getSizeInWords(newSize);...
Create a Java method that does the following: "Ensure that the given position is at least the size of the array.".
Of course, here is the Java code you requested: ```java private static void createIndex( JarOutputStream jos, List oldEntries, Map movedMap ) throws IOException { StringWriter writer = new StringWriter(); writer.write( VERSION_HEADER ); writer.write( "\r\n" ); // Write...
Create a Java method that does the following: "Write the index of the CTYPE.".
Of course, here is the Java code you requested: ```java private IJsonInput cleanAndParseJsonString(final App app, final String input) throws FrameworkException { final Gson gson = getGson(); IJsonInput jsonInput = null; // isolate input parsing (will include read and write operations) try (final Tx tx =...
Create a Java method that does the following: "clean and parse json string".
Of course, here is the Java code you requested: ```java public int getGetCursorIndex(SIMPMessage msg) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getGetCursorIndex"); // The zeroth index is reserved for non-classified messages int classPos = 0; synch...
Create a Java method that does the following: "Get the index of the cursor for a message".
Of course, here is the Java code you requested: ```java @Override public final String reconfigureProperty(String property, String newVal) throws ReconfigurationException { if (isPropertyReconfigurable(property)) { String oldVal; synchronized(getConf()) { oldVal = getConf().get(property); ...
Create a Java method that does the following: "Reconfigure a single SECTYPE property.".
Of course, here is the Java code you requested: ```java public GetIdentityNotificationAttributesResult withNotificationAttributes(java.util.Map<String, IdentityNotificationAttributes> notificationAttributes) { setNotificationAttributes(notificationAttributes); return this; } ``` Hope this helps!
Create a Java method that does the following: "Sets the notificationAttributes for this IdentityNotification.".
Of course, here is the Java code you requested: ```java public String getSrcUrl() { String imageSrc = getCmsObject().getSitePath(getResource()); if ((getScaler() != null) && getScaler().isValid()) { // now append the scaler parameters if required imageSrc += getScaler().toReque...
Create a Java method that does the following: "Returns the src url of the image.".
Of course, here is the Java code you requested: ```java public String getStepLocalName(int opPosOfStep) { int argLenOfStep = getArgLengthOfStep(opPosOfStep); // System.out.println("getStepLocalName.argLenOfStep: "+argLenOfStep); int index; switch (argLenOfStep) { case 0 : index = OpC...
Create a Java method that does the following: "Get the local name of the step.".
Of course, here is the Java code you requested: ```java public <T extends JspTag> JspTag get(Class<T> handlerClass) throws JspException { synchronized( this ) { if (current >= 0) { return handlers[current--]; } } // Out of sync block - there ...
Create a Java method that does the following: "Get a tag handler for the specified class.".
Of course, here is the Java code you requested: ```java public UpdateHealthCheckRequest withResetElements(ResettableElementName... resetElements) { com.amazonaws.internal.SdkInternalList<String> resetElementsCopy = new com.amazonaws.internal.SdkInternalList<String>(resetElements.length); for (Resettabl...
Create a Java method that does the following: "Sets the resetElements parameter.".
Of course, here is the Java code you requested: ```java @Override public boolean supports(@NonNull MediaType delimiter) { return this.mediaTypes.stream() // .anyMatch(mediaType -> mediaType.isCompatibleWith(delimiter)); } ``` Hope this helps!
Create a Java method that does the following: "Checks if this media type is compatible with the given delimiter.".
Of course, here is the Java code you requested: ```java public ArgumentBuilder withNamedArgument(final String name, final String value) { // Check sanity Validate.notEmpty(name, "name"); // Only add a named argument if the value is non-empty. if (value != null && !value.trim().isEmpty...
Create a Java method that does the following: "Add a named argument.".
Of course, here is the Java code you requested: ```java public static <T extends Annotation> T findAnnotation(Class<?> type, Annotation[] annotations, Class<T> annotation) { T config = FindAnnotation.findAnnotation(annotations, annotation); if (config == null) { config = type.getAnnotation(...
Create a Java method that does the following: "Find annotation.".
Of course, here is the Java code you requested: ```java private void blockUntilSendable(final AbstractBody msg) { assertLocked(); while (isWorking() && !isImmediatelySendable(msg)) { try { notFull.await(); } catch (InterruptedException intx) { LO...
Create a Java method that does the following: "Blocks until the message is immediately sendable.".
Of course, here is the Java code you requested: ```java @Override public int indexOf(long elem) { for (int i = 0; i < size; i++) if (elem==elementData[i]) return i; return -1; } ``` Hope this helps!
Create a Java method that does the following: "Returns the index of the specified element.".
Of course, here is the Java code you requested: ```java protected void assertNonNullFieldPrecondition(NonNullableFieldWasNullException e) throws NonNullableFieldWasNullException { ExecutionStepInfo executionStepInfo = e.getExecutionStepInfo(); if (executionStepInfo.hasParent() && executionStepInfo.getP...
Create a Java method that does the following: "Assert that a NonNullableFieldWasNullException is thrown.".
Of course, here is the Java code you requested: ```java public void addRk(RoutingKey rk, AsImpl asImpl) throws Exception { int dpc = rk.getDestinationPointCodes()[0].getPointCode(); OPCList[] opcArray = rk.getOPCLists(); int[] opcIntArr = null; if (opcArray == null) { opcIn...
Create a Java method that does the following: "Add a routing key to the routing table.".
Of course, here is the Java code you requested: ```java private List<String> getUsersFor(Collection<String> roles){ List<String> users = new HashList<>(); for(String role: roles){ if(roleMembershipRU.containsKey(role)) users.addAll(roleMembershipRU.get(role)); } return users; } ``` Hope this helps!
Create a Java method that does the following: "Gets the users for the given roles.".
Of course, here is the Java code you requested: ```java public void marshall(DescribeUpdateRequest describeUpdateRequest, ProtocolMarshaller protocolMarshaller) { if (describeUpdateRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try {...
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 List<CommerceAccountOrganizationRel> findByCommerceAccountId( long commerceAccountId, int start, int end) { return getPersistence() .findByCommerceAccountId(commerceAccountId, start, end); } ``` Hope this helps!
Create a Java method that does the following: "Returns a range of commerce account organization rels where commerceAccountId is not null.".
Of course, here is the Java code you requested: ```java public static void main(String[] args) { LoggingConfiguration.setLevelFor(RectangleArranger.class.getName(), Level.FINEST.getName()); RectangleArranger<String> r = new RectangleArranger<>(1.3); r.put(4., 1., "Histogram"); r.put(4., 4., "3D view");...
Create a Java method that does the following: "Example of the rectangle arranger.".