code
stringlengths
160
48.7k
prompt
stringlengths
55
1.51k
Of course, here is the Java code you requested: ```java protected void copyFields() { for(Field field: copied_fields) { Object value=Util.getField(field,main_channel); Util.setField(field, this, value); } } ``` Hope this helps!
Create a Java method that does the following: "Copy the fields from the main_channel to this object.".
Of course, here is the Java code you requested: ```java public void apply(HSSFCell cell, HSSFCellStyle cellStyle, Map<String, String> style) { int width = Math.round(CssUtils.getInt(style.get(WIDTH)) * 2048 / 8.43F); HSSFSheet sheet = cell.getSheet(); int colIndex = cell.getColumnIndex(); if (width...
Create a Java method that does the following: "Apply the style to the cell.".
Of course, here is the Java code you requested: ```java public long[] parseId(long id) { long[] arr = new long[5]; arr[4] = ((id & diode(unusedBits, timestampBits)) >> timestampShift); arr[0] = arr[4] + epoch; arr[1] = (id & diode(unusedBits + timestampBits, datacenterIdBits)) >> datacenterIdShift; arr[2] = ...
Create a Java method that does the following: "Parse a ID into an array of longs.".
Of course, here is the Java code you requested: ```java public void add(TimelineEvent event, TimelineUpdater timelineUpdater) { events.add(event); if (timelineUpdater != null) { // update UI timelineUpdater.add(event); } } ``` Hope this helps!
Create a Java method that does the following: "Add an event to the event set.".
Of course, here is the Java code you requested: ```java @Override public NoChangePhase buildPhase(int phaseIndex, HeuristicConfigPolicy solverConfigPolicy, BestSolutionRecaller bestSolutionRecaller, Termination solverTermination) { HeuristicConfigPolicy phaseConfigPolicy = solverConfigPolicy.cr...
Create a Java method that does the following: "Build a NoChangePhase object.".
Of course, here is the Java code you requested: ```java public void invalidateFuturesFrom(long entryIndex) { int count = 0; Iterator<Entry<Long, SimpleCompletableFuture>> iterator = futures.entrySet().iterator(); while (iterator.hasNext()) { Entry<Long, SimpleCompletableFuture> entr...
Create a Java method that does the following: "Invalidates all futures from the given index.".
Of course, here is the Java code you requested: ```java public void open() throws Exception { if (opened) { throw new IllegalStateException("DummyDevice is already opened!"); } opened = true; creationDate = new Date(); LOGGER.info("Initialized " + getName() + ".")...
Create a Java method that does the following: "Opens the dummy device.".
Of course, here is the Java code you requested: ```java public List<Condition> findConditions(final Column column) { List<Condition> result = new LinkedList<>(); for (AndCondition each : andConditions) { result.addAll(Collections2.filter(each.getConditions(), new Predicate<Condition>() { ...
Create a Java method that does the following: "Find conditions.".
Of course, here is the Java code you requested: ```java public void addSession(String id, Session session) { PoolInfo poolInfo = getPoolInfo(session); LOG.info("Session " + id + " added to pool info " + poolInfo + " (originally " + session.getInfo().getPoolInfoStrings() +") for " + type); getPoolSc...
Create a Java method that does the following: "Add a session to the pool".
Of course, here is the Java code you requested: ```java public VALUE get(KEY key) { CacheEntry<VALUE> entry; synchronized (this) { entry = values.get(key); } VALUE value; if (entry != null) { if (isExpiring) { long age = System.currentTime...
Create a Java method that does the following: "Gets the value for the specified key.".
Of course, here is the Java code you requested: ```java @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) public int getCompoundPaddingStart (){ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) return mInputView.getCompoundPaddingStart(); return mInputView.getCompoundPaddingLeft(); } ``` Hope th...
Create a Java method that does the following: "Returns the start padding of the view.".
Of course, here is the Java code you requested: ```java private static String cutOffValidationMatchersPrefix(String expression) { if (expression.startsWith(Citrus.VALIDATION_MATCHER_PREFIX) && expression.endsWith(Citrus.VALIDATION_MATCHER_SUFFIX)) { return expression.substring(Citrus.VALIDATION_MAT...
Create a Java method that does the following: "Cut off validation matchers prefix.".
Of course, here is the Java code you requested: ```java private static String lineExpand(String keyString, Map properties) { //System.out.println("DEBUG : expand(String, Properties), keyString: " + keyString); //if ("".equals(keyString)) //throw new Exception("empty key string"); if ...
Create a Java method that does the following: "line expansion for a single key string".
Of course, here is the Java code you requested: ```java @Override public void setBodyMap(Map<java.util.Locale, String> bodyMap, java.util.Locale defaultLocale) { _commerceNotificationTemplate.setBodyMap(bodyMap, defaultLocale); } ``` Hope this helps!
Create a Java method that does the following: "Sets the localized bodies of this commerce notification template from the map of locales and localized bodies and sets the default locale.".
Of course, here is the Java code you requested: ```java public static ConditionBuilder wrap(final Condition condition) { if (condition == null) return create(); if (condition instanceof ConditionBuilder) return (ConditionBuilder) condition; return new DefaultConditionBuilderInt...
Create a Java method that does the following: "Wrap a condition object.".
Of course, here is the Java code you requested: ```java public List<ComponentDto> selectAllComponentsFromProjectKey(DbSession session, String projectKey) { return mapper(session).selectComponentsFromProjectKeyAndScope(projectKey, null, false); } ``` Hope this helps!
Create a Java method that does the following: "Select all components from project key.".
Of course, here is the Java code you requested: ```java @Nullable public static ISessionWebScope getSessionWebScopeOfID (@Nullable final String sScopeID) { final ISessionScope aSessionScope = ScopeSessionManager.getInstance ().getSessionScopeOfID (sScopeID); if (aSessionScope == null) return null; ...
Create a Java method that does the following: "Get the session web scope of the passed scope ID.".
Of course, here is the Java code you requested: ```java public final boolean register(final SelectableChannel channel, final EventsHandler handler) { return register(channel, handler, IN | OUT | ERR); } ``` Hope this helps!
Create a Java method that does the following: "Register a new event handler with the given channel.".
Of course, here is the Java code you requested: ```java public Xml addContent(String text) { if(current == null) { throw new XmlModelException("Content can not be attached as root element: " + text); } Content content = new Content(text); content.setParent(current); ...
Create a Java method that does the following: "Add a content to the XML.".
Of course, here is the Java code you requested: ```java public List<java.lang.Object> getMonthOrDayOrSeason() { if (monthOrDayOrSeason == null) { monthOrDayOrSeason = new ArrayList<java.lang.Object>(); } return this.monthOrDayOrSeason; } ``` Hope this helps!
Create a Java method that does the following: "Gets the value of the monthOrDayOrSeason property.".
Of course, here is the Java code you requested: ```java public final void sendSentinel(long txnId, int partitionId) { final long initiatorHSId = m_cartographer.getHSIdForSinglePartitionMaster(partitionId); sendSentinel(txnId, initiatorHSId, -1, -1, true); } ``` Hope this helps!
Create a Java method that does the following: "Send a sentinel to the cluster.".
Of course, here is the Java code you requested: ```java public void put(String value) { if (value == null) { this.compiledStatement.bindNull(compiledStatementBindIndex++); } else { compiledStatement.bindString(compiledStatementBindIndex++, value); } } ``` Hope this helps!
Create a Java method that does the following: "Binds a string value to the compiled statement.".
Of course, here is the Java code you requested: ```java @Override public Map getOutboundConnectionProperties(Object ep) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getOutboundConnectionProperties", ep); Map properties = null; if...
Create a Java method that does the following: "This method is called by the Session to retrieve the properties of the outbound connection.".
Of course, here is the Java code you requested: ```java protected IModel<String> newContentResourceModel(final IModel<ResourceBundleKey> resourceKey) { return ResourceModelFactory.newResourceModel(resourceKey.getObject(), this); } ``` Hope this helps!
Create a Java method that does the following: "Create a new content resource model.".
Of course, here is the Java code you requested: ```java public static dospolicy[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ dospolicy obj = new dospolicy(); options option = new options(); option.set_filter(filter); dospolicy[] response = (dospolicy[]) obj.getfiltered(service,...
Create a Java method that does the following: "Use this API to fetch filtered set of dospolicy resources. set the filter parameter values in filtervalue object.".
Of course, here is the Java code you requested: ```java private void computePartialChunkCrc(long blkoff, int bytesPerChecksum, DataChecksum checksum) throws IOException { // find offset of the beginning of partial chunk. // int sizePartialChunk = (int) (blkoff % bytesPerChecksum); int checksumSi...
Create a Java method that does the following: "Compute the CRC of a partial chunk of the block.".
Of course, here is the Java code you requested: ```java @Override public long skip(long n) throws IOException { long toSkip = max >= 0 ? Math.min(n, max - pos) : n; long skippedBytes = in.skip(toSkip); pos += skippedBytes; return skippedBytes; } ``` Hope this helps!
Create a Java method that does the following: "Skips n bytes from the underlying stream.".
Of course, here is the Java code you requested: ```java public void applyScale( SceneStructureProjective structure , SceneObservations observations ) { if( structure.homogenous ) { applyScaleToPointsHomogenous(structure); } else { computePointStatistics(structure.points); applyScaleToPoints3D(struc...
Create a Java method that does the following: "Apply the scale to the given scene observations.".
Of course, here is the Java code you requested: ```java public boolean isMatchingCurrentSite(CmsObject cms, CmsSiteMatcher matcher) { return m_siteMatcherSites.get(matcher) == getCurrentSite(cms); } ``` Hope this helps!
Create a Java method that does the following: "Checks if the current site matches the given site matcher.".
Of course, here is the Java code you requested: ```java private static List<Link> sortLinks(List<Link> links) { List<Link> result = new ArrayList<Link>(); for (Link l : links) { int pos = 0; while (pos < result.size() && l.getPos().getStart() > result.get(pos).getPos() .getStart()) { po...
Create a Java method that does the following: "Sort a list of links.".
Of course, here is the Java code you requested: ```java public List<T> getList(String json) throws IOException, JsonFormatException { JsonPullParser parser = JsonPullParser.newParser(json); return getList(parser, null); } ``` Hope this helps!
Create a Java method that does the following: "Returns a list of objects from the given JSON string.".
Of course, here is the Java code you requested: ```java public void refresh() { if (credentialFile.lastModified() > credentialFileLastModified) { credentialFileLastModified = credentialFile.lastModified(); credentials = loadCredentials(credentialFile); } credentialP...
Create a Java method that does the following: "Refresh the credentials.".
Of course, here is the Java code you requested: ```java public void marshall(ProductionBranch productionBranch, ProtocolMarshaller protocolMarshaller) { if (productionBranch == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { pr...
Create a Java method that does the following: "marshalls the given production branch to the JSON object.".
Of course, here is the Java code you requested: ```java private void removeFromWebContainer() { if (!Thread.holdsLock(terminated)) { throw new IllegalStateException(); } synchronized (addRemoveLock) { //we'll either succeed or fail at the removal, but either ...
Create a Java method that does the following: "Remove the CRA from the web container.".
Of course, here is the Java code you requested: ```java @Override public void subscribe() { waitClientRunning(); if (!running) { return; } if (partition == null) { if (kafkaConsumer != null) { kafkaConsumer.subscribe(Collections.singletonList...
Create a Java method that does the following: "Subscribes to the topic.".
Of course, here is the Java code you requested: ```java @Override public void init(final Scope scope, final ParticipantConfig participantConfig) throws InitializationException, InterruptedException { internalInit(scope, participantConfig); } ``` Hope this helps!
Create a Java method that does the following: "Initialize the CID language.".
Of course, here is the Java code you requested: ```java public PathImpl createRoot(SchemeMap schemeMap) { FilesystemPath restriction = (FilesystemPath) copy(); restriction._schemeMap = schemeMap; restriction._root = this; restriction._pathname = "/"; restriction._userPath = "/"; return rest...
Create a Java method that does the following: "Create a new root path.".
Of course, here is the Java code you requested: ```java private void add(Range range) { Range rangeToAdd = range; for (int i = ranges.size() - 1; i >= 0; --i) { Range last = ranges.get(i); assert !last.isAfter(range); Range u = Range.union(last, rangeToAdd); if (u == null) { bre...
Create a Java method that does the following: "Add a range to the list of ranges.".
Of course, here is the Java code you requested: ```java public GeometryIndex addChildren(GeometryIndex index, GeometryIndexType type, int... values) { if (index == null) { return create(type, values); } if (getType(index) != GeometryIndexType.TYPE_GEOMETRY) { throw new IllegalArgumentException("Can only ad...
Create a Java method that does the following: "Adds children to an existing index.".
Of course, here is the Java code you requested: ```java public static Record findById(String tableName, Object idValue) { return MAIN.findById(tableName, idValue); } ``` Hope this helps!
Create a Java method that does the following: "Find a record by ID.".
Of course, here is the Java code you requested: ```java @JsCacheRemove(cls = OcelotServices.class, methodName = "getLocale", keys = {}, userScope = true) public void setLocale(@JsonUnmarshaller(LocaleMarshaller.class) Locale locale) { logger.debug("Receive setLocale call from client. {}", locale); ocelotContex...
Create a Java method that does the following: "Set the locale of the client.".
Of course, here is the Java code you requested: ```java public void setResult(T result) { lock.lock(); try { if(Objects.equals(expected_result, result)) super.setResult(result); } finally { lock.unlock(); } } ``` Hope this helps!
Create a Java method that does the following: "Sets the result of the test.".
Of course, here is the Java code you requested: ```java public void addCell(String content, Point location) throws BadElementException { addCell(new Phrase(content), location); } ``` Hope this helps!
Create a Java method that does the following: "Add a cell to the table.".
Of course, here is the Java code you requested: ```java private static String readLineFromReaderWithoutMark(Reader input) throws IOException { int c = input.read(); if (c == -1) return null; StringBuilder line = new StringBuilder(expectedLineLength); while (c !...
Create a Java method that does the following: "Read a line from the reader without marking the mark.".
Of course, here is the Java code you requested: ```java protected final boolean matchString(int state, char expected[]) throws Exception{ int length = expected.length; while(state<length && position<limit){ if(input[position]!=expected[state]) throw expected(codePoint(), ne...
Create a Java method that does the following: "matchString Method.".
Of course, here is the Java code you requested: ```java @Deprecated public static String getToolHome(Node node, ToolInstallation installation, TaskListener log) throws IOException, InterruptedException { String result = null; // node-specific configuration takes precedence ToolLocationNode...
Create a Java method that does the following: "Get the tool home.".
Of course, here is the Java code you requested: ```java public DocumentT findOneAndReplace(final Bson filter, final Bson replacement, final RemoteFindOneAndModifyOptions options) { return proxy.findOneAndReplace(filter, replacement, options)...
Create a Java method that does the following: "Find one and replace document.".
Of course, here is the Java code you requested: ```java public static base_response delete(nitro_service client, String monitorname) throws Exception { lbmonitor deleteresource = new lbmonitor(); deleteresource.monitorname = monitorname; return deleteresource.delete_resource(client); } ``` Hope this helps!
Create a Java method that does the following: "Use this API to delete lbmonitor of given name.".
Of course, here is the Java code you requested: ```java public ScaleLevel getLevelFor(Font font, FontRenderContext frc, boolean horizontal, double xy) { return getLevelFor(font, frc, DoubleTransform.identity(), horizontal, xy); } ``` Hope this helps!
Create a Java method that does the following: "Get the ScaleLevel for the specified font using the specified horizontal and vertical coordinates.".
Of course, here is the Java code you requested: ```java protected LinkedList<Diff> diff_bisect(String text1, String text2, long deadline) { // Cache the text lengths to prevent multiple calls. int text1_length = text1.length(); int text2_length = text2.length(); int max_d = ...
Create a Java method that does the following: "Diff_bisect method.".
Of course, here is the Java code you requested: ```java protected IntegerWithUoM eval(final Object... _values) { final IntegerWithUoM ret; if ((_values == null) || (_values.length < 2)) { ret = null; } else { final Integer value; if ((_values[0] instan...
Create a Java method that does the following: "Evaluate the value of the IntegerWithUoM property.".
Of course, here is the Java code you requested: ```java private void updateSize() { int newLineCount = ActionUtils.getLineCount(pane); if (newLineCount == lineCount) { return; } lineCount = newLineCount; int h = (int) pane.getPreferredSize().getHeight(); int ...
Create a Java method that does the following: "Update the size of the image.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public <T> DomainObjectMatch<T> createMatchFor(T domainObject) { DomainObjectMatch<T> ret; if (domainObject.getClass().equals(DomainObject.class)) { // generic model List<DomainObject> source = new ArrayList<DomainObject>();...
Create a Java method that does the following: "Create a domain object match for the given domain object".
Of course, here is the Java code you requested: ```java public static void pushClassType(CodeAttribute b, String classType) { if (classType.length() != 1) { if (classType.startsWith("L") && classType.endsWith(";")) { classType = classType.substring(1, classType.length() - 1); ...
Create a Java method that does the following: "Push a class type to the code attribute.".
Of course, here is the Java code you requested: ```java public static SQLTable get(final long _id) throws CacheReloadException { final Cache<Long, SQLTable> cache = InfinispanCache.get().<Long, SQLTable>getCache(SQLTable.IDCACHE); if (!cache.containsKey(_id)) { SQLTable.getSQLTa...
Create a Java method that does the following: "Get the SQL table from cache.".
Of course, here is the Java code you requested: ```java public static boolean isValid(final String hexString) { if (hexString == null) { throw new IllegalArgumentException(); } int len = hexString.length(); if (len != 24) { return false; } for (...
Create a Java method that does the following: "Check if the hex string is a valid hex string.".
Of course, here is the Java code you requested: ```java public static <T> T pickRandom (Iterator<T> iter, int count, T skip) { if (count < 2) { throw new IllegalArgumentException( "Must have at least two elements [count=" + count + "]"); } int index = getInt(cou...
Create a Java method that does the following: "Pick a random object from the iterator.".
Of course, here is the Java code you requested: ```java public static Point from(double lon, double lat, double alt) { return new Point(new SinglePosition(lon, lat, alt)); } ``` Hope this helps!
Create a Java method that does the following: "Create a Point from the given lon lat and alt.".
Of course, here is the Java code you requested: ```java public static Matrix4x4D frustumProjectionRH( final double x_min, final double x_max, final double y_min, final double y_max, final double z_near, final double z_far) { RangeCheck.checkGreaterEqualDouble( z_near, "Near Z"...
Create a Java method that does the following: "Projection the RH projection matrix for a single segment of a frustum.".
Of course, here is the Java code you requested: ```java public static RamDisk readGzipped(File f) throws FileNotFoundException, IOException { final FileInputStream is = new FileInputStream(f); try { return readGzipped(is); } finally { is.clo...
Create a Java method that does the following: "Read a GZIP file to a RamDisk object.".
Of course, here is the Java code you requested: ```java void evictCache(Path hdfsPath) throws IOException { CacheEntry c = cacheMap.remove(hdfsPath); if (c != null) { cacheSize.addAndGet(-c.entrySize); if (evictionIface != null) { evictionIface.evictCache(c.hdfsPath, c.localPath, c.entrySiz...
Create a Java method that does the following: "Evict a cache entry from the cache map.".
Of course, here is the Java code you requested: ```java private void genPreambleClassVariableDeclarations(String className) throws JasperException { if (isPoolingEnabled) { if (!tagHandlerPoolNames.isEmpty()) { for (String tagHandlerPoolName: tagHandlerPoolNames) { ...
Create a Java method that does the following: "Generate code to generate the class variable declarations for the class.".
Of course, here is the Java code you requested: ```java private OutputStream getSyslogOutputStream() { Field f; try { f = SyslogAppenderBase.class.getDeclaredField("sos"); f.setAccessible(true); return (OutputStream) f.get(this); } catch (ReflectiveOperationException e) { throw Thro...
Create a Java method that does the following: "Get the SyslogOutputStream.".
Of course, here is the Java code you requested: ```java @SuppressWarnings({ "unchecked", "rawtypes" }) public void remove() { super.remove(); for (VariableInstanceEntity variableInstance : variableStore.getVariables()) { invokeVariableLifecycleListenersDelete(variableInstance, this, Arrays.<...
Create a Java method that does the following: "Removes all the entities from the database.".
Of course, here is the Java code you requested: ```java static String getApplicationPath(final Set<ClassResult> classResults) { return classResults.stream().map(ClassResult::getApplicationPath).filter(Objects::nonNull) .map(PathNormalizer::normalize).findAny().orElse(""); } ``` Hope this h...
Create a Java method that does the following: "Get application path from set of class results.".
Of course, here is the Java code you requested: ```java public synchronized int chooseGetCursorIndex(int previous) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "chooseGetCursorIndex", new Object[] {Integer.valueOf(previous)}); // The zeroth index represents th...
Create a Java method that does the following: "This method is used to choose the index of the default cursor for the messages that have been processed by the application.".
Of course, here is the Java code you requested: ```java public boolean run(OutputStream stream) throws ReportRunnerException, NoDataFoundException, InterruptedException { if ((stream == null) && GRAPHIC_FORMAT.equals(format)) { throw new ReportRunnerException("OutputStream cannot be null!"); ...
Create a Java method that does the following: "Runs the report.".
Of course, here is the Java code you requested: ```java public static PrimitiveEvent event(EventType eventType, byte[] value) { return new PrimitiveEvent(EventType.canonical(eventType), value); } ``` Hope this helps!
Create a Java method that does the following: "Creates a new primitive event with the given event type and value.".
Of course, here is the Java code you requested: ```java public static boolean isMbeanExist(String objName, String callingClass, String callingMethod) { final String methodName = "isMbeanExist()"; final boolean trace = TraceComponent.isAnyTracingEnabled(); final MBeanServer mbs = ManagementFacto...
Create a Java method that does the following: "Check if an MBean exists in the platform MBean server.".
Of course, here is the Java code you requested: ```java protected String generateProjectDescription(CmsObject userCms) { CmsUser user = userCms.getRequestContext().getCurrentUser(); OpenCms.getLocaleManager(); Locale locale = CmsLocaleManager.getDefaultLocale(); long time = System...
Create a Java method that does the following: "Generates the description of the CTYPE page.".
Of course, here is the Java code you requested: ```java private String removeBlocks(String originalSql) { StringBuilder cleanedSql = new StringBuilder(originalSql.length()); Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(getRegexSkipBloc...
Create a Java method that does the following: "Remove the blocks from the original SQL.".
Of course, here is the Java code you requested: ```java public List<String> buildUrls() { if (exported) { List<ServerConfig> servers = providerConfig.getServer(); if (servers != null && !servers.isEmpty()) { List<String> urls = new ArrayList<String>(); fo...
Create a Java method that does the following: "Build the urls for the class.".
Of course, here is the Java code you requested: ```java public boolean hasCapacity(int priority) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "hasCapacity", ""+priority); boolean result; synchronized(queueMonitor) { result = priority >= l...
Create a Java method that does the following: "Check if the priority is in the queue.".
Of course, here is the Java code you requested: ```java public void setImageShapeLoadedHandler(final ImageShapeLoadedHandler<T> handler) { m_handler = handler; if ((null != m_handler) && (m_is_done)) { m_handler.onImageShapeLoaded(m_image); } } ``` Hope thi...
Create a Java method that does the following: "Set the ImageShapeLoadedHandler for this image.".
Of course, here is the Java code you requested: ```java public static <T> PVectorByteBufferedFloating4s64<T> createWithBase( final ByteBuffer b, final MutableLongType base, final int offset) { return new PVectorByteBufferedFloating4s64<>(b, base, offset); } ``` Hope this helps!
Create a Java method that does the following: "Create a new empty PVectorByteBufferedFloating4s64 object with a base and offset.".
Of course, here is the Java code you requested: ```java public java.util.List<NodeGroupConfiguration> getNodeGroupConfiguration() { if (nodeGroupConfiguration == null) { nodeGroupConfiguration = new com.amazonaws.internal.SdkInternalList<NodeGroupConfiguration>(); } return nodeGroup...
Create a Java method that does the following: "Gets the value of the nodeGroupConfiguration property.".
Of course, here is the Java code you requested: ```java public static PortLogger getLogger(Class<?> clazz, OutputCollector output) { return getLogger(clazz.getCanonicalName(), output); } ``` Hope this helps!
Create a Java method that does the following: "Get a port logger for the given class.".
Of course, here is the Java code you requested: ```java public static AuditEntryBean contractBrokenToApi(ContractBean bean, ISecurityContext securityContext) { AuditEntryBean entry = newEntry(bean.getApi().getApi().getOrganization().getId(), AuditEntityType.Api, securityContext); entry.setWhat(AuditEnt...
Create a Java method that does the following: "Creates an audit entry for the contract broken to an API.".
Of course, here is the Java code you requested: ```java public final <C extends Collection<? super E>> C copyInto(C collection) { checkNotNull(collection); if (iterable instanceof Collection) { collection.addAll(Collections2.cast(iterable)); } else { for (E item : iterable) { collection...
Create a Java method that does the following: "Copy the contents of this sequence into the specified collection.".
Of course, here is the Java code you requested: ```java protected void chunkString( final List<CharacterEvent> characterEvents, final CharSequence buffer, int patternIndex) { // Iterate over the chunking patterns for (; patternIndex < this.chunkingPatterns.length; pa...
Create a Java method that does the following: "Chunk a string into a list of CharacterEvents.".
Of course, here is the Java code you requested: ```java public List<V> getDescendantValues(List<P> path) { CmsPathTree<P, V> node = findNode(path); List<V> result = Lists.newArrayList(); if (node != null) { node.collectEntries(result); } return result; } ``` Ho...
Create a Java method that does the following: "Gets the descendant values of the given path.".
Of course, here is the Java code you requested: ```java private String encodeIllegalCharacters(String relativeURI) { try { return new URI(null, null, relativeURI, null).toString(); } catch (URISyntaxException e) { throw new LocationException(e); } } ``` Hope this he...
Create a Java method that does the following: "Encode illegal characters in the URI.".
Of course, here is the Java code you requested: ```java public static Archiver createArchiver(ArchiveFormat archiveFormat) { if (archiveFormat == ArchiveFormat.SEVEN_Z) { return new SevenZArchiver(); } else if (archiveFormat == ArchiveFormat.ZIP) { return new ZipFileArchiver(); ...
Create a Java method that does the following: "Create an instance of the class which is compatible with the CRA - 211.".
Of course, here is the Java code you requested: ```java public LocalXAResource createConnectableLocalXAResource(ConnectionManager cm, String productName, String productVersion, String jndiName, Connect...
Create a Java method that does the following: "Create a LocalXAResource object.".
Of course, here is the Java code you requested: ```java public void marshall(HyperParameterTuningJobWarmStartConfig hyperParameterTuningJobWarmStartConfig, ProtocolMarshaller protocolMarshaller) { if (hyperParameterTuningJobWarmStartConfig == null) { throw new SdkClientException("Invalid argument ...
Create a Java method that does the following: "marshalls the given hyperParameterTuningJobWarmStartConfig to the JSON object.".
Of course, here is the Java code you requested: ```java public ProcessStarter sysProp(String name, Object value) { this.systemProps.put(name, value.toString()); return this; } ``` Hope this helps!
Create a Java method that does the following: "Sets a system property.".
Of course, here is the Java code you requested: ```java protected void executeMethods() throws EFapsException { if (this.parent != null) { this.parent.executeMethods(); } for (final CacheMethod cacheMethod : this.cacheMethods) { cacheMethod.callMethod(); ...
Create a Java method that does the following: "Execute the cache methods.".
Of course, here is the Java code you requested: ```java public static Query createQueryForNodesWithFieldLessThan(String constraintValue, String fieldName, Function<String, String> caseOperation) { ...
Create a Java method that does the following: "Create a Query that returns a ResourceSet that returns a ResourceSet that contains Nodes that have a value greater than or equal to the given constraint value.".
Of course, here is the Java code you requested: ```java private int preemptOneSession(int maxToPreemt, long maxRunningTime) { Queue<PoolGroupSchedulable> poolGroupQueue = poolGroupManager.getPreemptQueue(); while (!poolGroupQueue.isEmpty()) { PoolGroupSchedulable poolGroup = poolGroupQueue.poll()...
Create a Java method that does the following: "Preempt one session.".
Of course, here is the Java code you requested: ```java @UiHandler("m_rewriteDeleteButton") protected void onClickDeleteRewrite(ClickEvent e) { List<CmsRewriteAliasTableRow> rowsToDelete = m_rewriteTable.getSelectedRows(); m_controller.deleteRewrites(rowsToDelete); } ``` Hope this helps!
Create a Java method that does the following: "Handle the delete rewrite button.".
Of course, here is the Java code you requested: ```java @Nonnull public static <R> LBoolFunction<R> boolFunctionFrom(Consumer<LBoolFunctionBuilder<R>> buildingFunction) { LBoolFunctionBuilder builder = new LBoolFunctionBuilder(); buildingFunction.accept(builder); return builder.build(); } ``` Hope this helps!
Create a Java method that does the following: "Create a bool function from a consumer.".
Of course, here is the Java code you requested: ```java private Array readDataFromPartition(PartitionCollectionImmutable.VariableIndexPartitioned vindexP, SectionIterable section) throws IOException { int rank = section.getRank(); SectionIterable sectionWanted = section.subSection(0, rank - 2); // all but x, ...
Create a Java method that does the following: "Read the data from a partition.".
Of course, here is the Java code you requested: ```java public static final Structure getAlignedStructure(Atom[] ca1, Atom[] ca2) throws StructureException{ /* Previous implementation commented Structure s = new StructureImpl(); List<Chain>model1 = getAlignedModel(ca1); List<Chain>model2 = getAlignedModel(...
Create a Java method that does the following: "Get the aligned structure of two chains.".
Of course, here is the Java code you requested: ```java public final void synpred36_DRL5Expressions_fragment() throws RecognitionException { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:9: ( DOT super_key ) // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:10: DOT super_k...
Create a Java method that does the following: "start synpred36_DRL5Expressions".
Of course, here is the Java code you requested: ```java public void marshall(CopyImageRequest copyImageRequest, ProtocolMarshaller protocolMarshaller) { if (copyImageRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { pr...
Create a Java method that does the following: "Creates the marshalling method for the CopyImageRequest object.".
Of course, here is the Java code you requested: ```java public void paint(Graphics g) { if (gridLines != null) { if (gridVisible) { for (int i = 0; i < gridLines.length; i++) { for (int j = 1; j < gridLines[i].length - 1; j++) { gridLines[...
Create a Java method that does the following: "Paint the image.".
Of course, here is the Java code you requested: ```java @VisibleForTesting public static Tagger getTagger(String implementation) { if (implementation.equals("impl")) { // We can return the global tracer here because if impl is linked the global tracer will be // the impl one. // TODO(bdrutu): M...
Create a Java method that does the following: "Get the Tagger object for the specified implementation.".
Of course, here is the Java code you requested: ```java public int getGroupSize() { if (groupSize > 0 || cpMemberCount == 0) { return groupSize; } int groupSize = cpMemberCount; if (groupSize % 2 == 0) { groupSize--; } return Math.min(groupSize,...
Create a Java method that does the following: "Get the group size.".
Of course, here is the Java code you requested: ```java void writeSnapshotData(DataOutputView out) throws IOException { out.writeUTF(pojoClass.getName()); writeOptionalMap(out, fieldSerializerSnapshots, PojoFieldUtils::writeField, TypeSerializerSnapshot::writeVersionedSnapshot); writeOptionalMap(out, registeredS...
Create a Java method that does the following: "Writes the snapshot data.".
Of course, here is the Java code you requested: ```java public String getStringValue() { int child = _firstch2(ROOTNODE); if (child == DTM.NULL) return EMPTY_STR; // optimization: only create StringBuffer if > 1 child if ((_exptype2(child) == DTM.TEXT_NODE) && (_nextsib2(child) == DTM.NULL)) { ...
Create a Java method that does the following: "Get the string value of the node.".