code stringlengths 160 48.7k | prompt stringlengths 55 1.51k |
|---|---|
Of course, here is the Java code you requested:
```java
@Override
public void setName(JvmParameterizedTypeReference newName)
{
if (newName != name)
{
NotificationChain msgs = null;
if (name != null)
msgs = ((InternalEObject)name).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SarlPackage.SARL_BEHAVIOR_U... | Create a Java method that does the following: "Change the name of the SARL BEHAVIOR.". |
Of course, here is the Java code you requested:
```java
protected LocationCoordinates getLocationMessage(MessageEnvelope envelope) {
if (envelope != null
&& envelope.getMessage() != null
&& envelope.getMessage().getAttachments() != null
&& envelope.getMessage().getAttachments().get(0) != null
&& enve... | Create a Java method that does the following: "Get the location message from an envelope.". |
Of course, here is the Java code you requested:
```java
public InboundNatRuleInner get(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) {
return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName).toBlocking().single().body();
}
```
Hope this h... | Create a Java method that does the following: "Gets the specified inbound nat rule.". |
Of course, here is the Java code you requested:
```java
public static synchronized void persistInstallStatus(List<UpdateCenterJob> installingPlugins) {
File installingPluginsFile = getInstallingPluginsFile();
if(installingPlugins == null || installingPlugins.isEmpty()) {
installingPluginsFile.delete();
re... | Create a Java method that does the following: "Persist the installing plugins to the file system.". |
Of course, here is the Java code you requested:
```java
private Context getContext(ExecutionContext executionContext) {
// Get context id.
HttpServletRequest request = executionContext.getActionBeanContext().getRequest();
String parameter = request.getParameter(ID_PARAMETER);
/... | Create a Java method that does the following: "Get the context.". |
Of course, here is the Java code you requested:
```java
public void notifyTaskAction(String action, Integer previousStatus, Integer previousState)
throws ServiceException, DataAccessException {
CodeTimer timer = new CodeTimer("TaskManager.notifyStatusChange()", true);
try {
// new-styl... | Create a Java method that does the following: "Notification of a task action.". |
Of course, here is the Java code you requested:
```java
@Override
protected synchronized CollectionContext beginCollection(DateTime now) {
data_.startNewCycle(now, getDecoratorLookBack());
return new CollectionContext() {
final Map<GroupName, Alert> alerts = new HashMap<>();
... | Create a Java method that does the following: "Creates a new collection context.". |
Of course, here is the Java code you requested:
```java
@Override
public CreateNetworkAclResult createNetworkAcl(CreateNetworkAclRequest request) {
request = beforeClientExecution(request);
return executeCreateNetworkAcl(request);
}
```
Hope this helps! | Create a Java method that does the following: "Creates an ACL for an app.". |
Of course, here is the Java code you requested:
```java
@Override
public List<String> getPreloads() {
final String sourceMethod = "getPreloads"; //$NON-NLS-1$
if (isTraceLogging) {
log.entering(RequestedModuleNames.class.getName(), sourceMethod);
log.exiting(RequestedModuleNames.class.getName(), source... | Create a Java method that does the following: "Returns a list of the preloads for the requested module.". |
Of course, here is the Java code you requested:
```java
@Deprecated
public void fatal(Object message, Object[] params, Throwable t) {
doLog(Level.FATAL, FQCN, message, params, t);
}
```
Hope this helps! | Create a Java method that does the following: "Issue a log message with parameters and a throwable with a level of FATAL.". |
Of course, here is the Java code you requested:
```java
@Override
protected void _releaseBuffers()
throws IOException
{
super._releaseBuffers();
char[] buf = _inputBuffer;
if (buf != null) {
_inputBuffer = null;
_ioContext.releaseTokenBuffer(buf);
... | Create a Java method that does the following: "Release the input buffers.". |
Of course, here is the Java code you requested:
```java
public AddressResolver<T> getResolver(final EventExecutor executor) {
if (executor == null) {
throw new NullPointerException("executor");
}
if (executor.isShuttingDown()) {
throw new IllegalStateException("executor... | Create a Java method that does the following: "Get a new AddressResolver for the given executor.". |
Of course, here is the Java code you requested:
```java
private void preProcessAttributes(Collection<AttributeUpdate> attributeUpdates) throws BadAttributeUpdateException {
if (attributeUpdates == null) {
return;
}
for (AttributeUpdate u : attributeUpdates) {
AttributeU... | Create a Java method that does the following: "Pre - processes the attribute updates.". |
Of course, here is the Java code you requested:
```java
@Override
public Tensor forward() {
Tensor x = modInX.getOutput();
Tensor w = modInW.getOutput();
y = new Tensor(x); // copy
y.multiply(weightX);
Tensor tmp = new Tensor(w); // copy
tmp.multiply(weightW);
... | Create a Java method that does the following: "This method is used to forward the C ++ decomposition.". |
Of course, here is the Java code you requested:
```java
public Jashing bootstrap() {
if (bootstrapped.compareAndSet(false, true)) {
/* bootstrap event sources* */
ServiceManager eventSources = injector.getInstance(ServiceManager.class);
eventSources.startAsync();
... | Create a Java method that does the following: "Bootstrap the Jashing application.". |
Of course, here is the Java code you requested:
```java
byte[] createSignatureFor(String algorithm, PrivateKey privateKey, byte[] headerBytes, byte[] payloadBytes) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException {
final Signature s = Signature.getInstance(algorithm);
s.initSign... | Create a Java method that does the following: "Create a signature for the given algorithm private key and header bytes.". |
Of course, here is the Java code you requested:
```java
public void marshall(TelemetryMetadata telemetryMetadata, ProtocolMarshaller protocolMarshaller) {
if (telemetryMetadata == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | Create a Java method that does the following: "marshalls the given TelemetryMetadata object to the given protocolMarshaller.". |
Of course, here is the Java code you requested:
```java
public static Predicate<MailMessage> forSubjectAndHeaders(final Pattern subjectPattern, final String headerName,
final String headerValue) {
return new Predicate<MailMessage>() {
@Override
public boolean apply(final MailMessage input) {
boolean res... | Create a Java method that does the following: "Create a predicate that accepts a mail message by looking for subject and headers.". |
Of course, here is the Java code you requested:
```java
boolean wasProxyRequestSent()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "wasProxyRequestSent");
SibTr.exit(tc, "wasProxyRequestSent", new Boolean(iRequestSent));
}
return iRequestSent;
}
`... | Create a Java method that does the following: "Is the proxy request sent?". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
private <T> List<WatcherRegistration<T>> getWatcherRegistrations(Id<T> id) {
return (List<WatcherRegistration<T>>)((Container)watcherRegistry).getAll(id.type());
}
```
Hope this helps! | Create a Java method that does the following: "Get all watcher registrations for the given id.". |
Of course, here is the Java code you requested:
```java
public static void initFileSendHeader(HttpServletResponse res, String filename, String contentType) {
filename = getEncodingFileName(filename);
if (contentType != null) {
res.setContentType(contentType);
} else {
r... | Create a Java method that does the following: "initFileSendHeader This method sets the appropriate headers for the HTTP response.". |
Of course, here is the Java code you requested:
```java
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "extension", scope = AddObjectToFolderResponse.class)
public JAXBElement<CmisExtensionType> createAddObjectToFolderResponseExtension(
CmisExtensionType value) {
re... | Create a Java method that does the following: "Create an instance of CmisExtensionType in the given class.". |
Of course, here is the Java code you requested:
```java
protected void processReferenceContext(BeanMetaData bmd) throws InjectionException, EJBConfigurationException {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "ensureR... | Create a Java method that does the following: "Process the reference context.". |
Of course, here is the Java code you requested:
```java
@Override
public void setLocale(Locale locale) {
DatePickerSettings currentSettings = getSettings();
if (currentSettings != null) {
currentSettings.setLocale(locale);
}
super.setLocale(locale);
}
```
Hope this ... | Create a Java method that does the following: "Sets the locale for the calendar.". |
Of course, here is the Java code you requested:
```java
@Override
public EventRouterExecutor getExecutor(
ActivityContextHandle activityContextHandle) {
return executors[(activityContextHandle.hashCode() & Integer.MAX_VALUE)
% executors.length];
}
```
Hope this helps! | Create a Java method that does the following: "Get the executor for the given activity context handle.". |
Of course, here is the Java code you requested:
```java
private static void toggleDateOneButtonClicked() {
datePicker1.togglePopup();
String message = "The datePicker1 calendar popup is ";
message += (datePicker1.isPopupOpen()) ? "open!" : "closed!";
panel.messageTextArea.setText(messag... | Create a Java method that does the following: "toggleDateOneButtonClicked This method shows the calendar popup.". |
Of course, here is the Java code you requested:
```java
public Object put(Object name, Object value)
{
return super.put(name,LazyList.add(null,value));
}
```
Hope this helps! | Create a Java method that does the following: "Add a new value to the cache.". |
Of course, here is the Java code you requested:
```java
public double getBearing(LatLong end) {
if (this.equals(end)) {
return 0;
}
double lat1 = latToRadians();
double lon1 = longToRadians();
double lat2 = end.latToRadians();
double lon2 = end.longToRadians... | Create a Java method that does the following: "Gets the beingaring of this LatLong from the end LatLong.". |
Of course, here is the Java code you requested:
```java
@Override
public void registerResult(String requesterID, String conversationID, FunctionalityResultMessage resultMsg) throws ServiceExecutionException
{
BSDFLogger.getLogger().info(
"Registers a result for requester: " + requester... | Create a Java method that does the following: "Registers a result for a specific requester and conversation.". |
Of course, here is the Java code you requested:
```java
@Override
public Operation prepareReplicationOperation(PartitionReplicationEvent event) {
if (event.getReplicaIndex() > 1) {
return null;
}
List<XATransactionDTO> migrationData = new ArrayList<XATransactionDTO>();
... | Create a Java method that does the following: "Prepare replication operation.". |
Of course, here is the Java code you requested:
```java
public static String getStringForSign(ProductPayRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
// 必选参数
params.put(HwPayConstant.KEY_MERCHANTID, request.getMerchantId());
params.put(HwPayConsta... | Create a Java method that does the following: "Get the String for sign for a product pay request". |
Of course, here is the Java code you requested:
```java
@Override
public boolean hasSimilarMethod(Invocation candidate) {
String wantedMethodName = getMethod().getName();
String candidateMethodName = candidate.getMethod().getName();
if (!wantedMethodName.equals(candidateMethodName)) {
... | Create a Java method that does the following: "Check if the method is similar to the one given.". |
Of course, here is the Java code you requested:
```java
@Deprecated
public ProjectDefinition setProperties(Properties properties) {
for (Entry<Object, Object> entry : properties.entrySet()) {
this.properties.put(entry.getKey().toString(), entry.getValue().toString());
}
return this;
}
```
Hope t... | Create a Java method that does the following: "Sets the properties of the CRA.". |
Of course, here is the Java code you requested:
```java
public static synchronized boolean setRunAsSubject(Subject subj) {
Subject before = null;
try {
before = getRunAsSubject();
final Subject fsubj = subj;
AccessController.doPrivileged(
new Priv... | Create a Java method that does the following: "Set the runAsSubject property of the WSSubject object.". |
Of course, here is the Java code you requested:
```java
private void makeSpaceViewOrOthographic() {
double Lat0 = gds.getDouble(GridDefRecord.LAP); // sub-satellite point lat
double Lon0 = gds.getDouble(GridDefRecord.LOP); // sub-satellite point lon
double xp = gds.getDouble(GridDefRecord.XP); // sub-s... | Create a Java method that does the following: "Make space view or othographic.". |
Of course, here is the Java code you requested:
```java
public static final Token restore(java.io.DataInputStream dataInputStream,
ObjectManagerState objectManagerState)
throws ObjectManagerException
{
if (Tracing.isAnyTracingEnabled() && trace.isEn... | Create a Java method that does the following: "Restore a Token from a byte array of bytes.". |
Of course, here is the Java code you requested:
```java
@Override
public <R> R transactNew(final ObjectifyImpl parent, int limitTries, final Work<R> work) {
Preconditions.checkArgument(limitTries >= 1);
final int ORIGINAL_TRIES = limitTries;
while (true) {
try {
return transactOnce(parent, work);... | Create a Java method that does the following: "Transacts a new transaction.". |
Of course, here is the Java code you requested:
```java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_eula);
initUI();
parseExtras(savedInstanceState);
}
```
Hope this helps! | Create a Java method that does the following: "Override onCreate to initialize the content view and parse the extras.". |
Of course, here is the Java code you requested:
```java
public static Set<URL> getResourceOccurrenceCount(String resource,
ClassLoader classLoader) throws IOException {
// See LBCLASSIC-159
Set<URL> urlSet = new HashSet<URL>();
Enumeration<URL> urlEnum = ... | Create a Java method that does the following: "Get the resource occurrence count". |
Of course, here is the Java code you requested:
```java
void apply(UpdateableSegmentMetadata target) {
if (!this.isChanged) {
// No changes made.
return;
}
Preconditions.checkArgument(target.getId() == this.id,
"Target Segment Id mismatch. Expected %s, g... | Create a Java method that does the following: "Apply this SegmentMetadata to the target SegmentMetadata.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
public static Reference toReference(Vector<Object> xmlRpcParameters)
{
Reference reference = null;
if(!xmlRpcParameters.isEmpty())
{
Requirement requirement = toRequirement((Vector<Object>... | Create a Java method that does the following: "This method converts XML - RPC parameter to a Cadmium Reference object.". |
Of course, here is the Java code you requested:
```java
public void marshall(UpdateLifecyclePolicyRequest updateLifecyclePolicyRequest, ProtocolMarshaller protocolMarshaller) {
if (updateLifecyclePolicyRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
... | Create a Java method that does the following: "marshalls the given updateLifecyclePolicyRequest to the JSON object.". |
Of course, here is the Java code you requested:
```java
private List<CmsElementComparison> getElements(I_CmsXmlDocument xmlPage) {
List<CmsElementComparison> elements = new ArrayList<CmsElementComparison>();
Iterator<Locale> locales = xmlPage.getLocales().iterator();
while (locales.hasNext()) ... | Create a Java method that does the following: "Gets the elements from the XML page.". |
Of course, here is the Java code you requested:
```java
@Override
public void getSavedSearches() {
getDispatcher().invokeLater(new AsyncTask(SAVED_SEARCHES, listeners) {
@Override
public void invoke(List<TwitterListener> listeners) throws TwitterException {
ResponseL... | Create a Java method that does the following: "Gets the saved searches from the user.". |
Of course, here is the Java code you requested:
```java
private void initGraphics() {
// Set initial size
if (Double.compare(gauge.getPrefWidth(), 0.0) <= 0 || Double.compare(gauge.getPrefHeight(), 0.0) <= 0 ||
Double.compare(gauge.getWidth(), 0.0) <= 0 || Double.compare(gauge.getHeight(), ... | Create a Java method that does the following: "Initialize the graphics". |
Of course, here is the Java code you requested:
```java
public static Object takeNot(Object arg) throws NoSuchMethodException {
if (arg instanceof Boolean) {
return boxToBoolean(!((java.lang.Boolean) arg).booleanValue());
}
throw new NoSuchMethodException();
}
```
Hope this helps... | Create a Java method that does the following: "takeNot This is a utility method that takes a boolean or a boolean value.". |
Of course, here is the Java code you requested:
```java
public ArrayList<OvhBackup> project_serviceName_region_regionName_workflow_backup_GET(String serviceName, String regionName) throws IOException {
String qPath = "/cloud/project/{serviceName}/region/{regionName}/workflow/backup";
StringBuilder sb = path(qPath,... | Create a Java method that does the following: "List of backup resources in the specified region". |
Of course, here is the Java code you requested:
```java
protected void applyImageBannersToBand(JRDesignBand band, Collection imageBanners, JRDesignExpression printWhenExpression, boolean placeOnTop ) {
int maxHeight = 0;
if (placeOnTop){
for (Object imageBanner1 : imageBanners) {
ImageBanner imageBann... | Create a Java method that does the following: "Apply image banners to band". |
Of course, here is the Java code you requested:
```java
public static <C> Module configModuleWithOverrides(final Class<C> configInterface, OverrideConsumer<C> overrideConsumer)
{
checkNotNull(configInterface);
checkNotNull(overrideConsumer);
return configModuleWithOverrides(configInterface,... | Create a Java method that does the following: "Create a new module with overrides.". |
Of course, here is the Java code you requested:
```java
public static ns_vlan[] get_filtered(nitro_service service, String filter) throws Exception
{
ns_vlan obj = new ns_vlan();
options option = new options();
option.set_filter(filter);
ns_vlan[] response = (ns_vlan[]) obj.getfiltered(service, option);
... | Create a Java method that does the following: "Use this API to fetch filtered set of ns_vlan resources. set the filter parameter values in filter parameter value.". |
Of course, here is the Java code you requested:
```java
protected List<ProxyAspectData> matchMethodPointcuts(final MethodSignatureVisitor msign) {
List<ProxyAspectData> aspectList = null;
for (ProxyAspectData aspectData : wd.proxyAspects) {
if (aspectData.apply(msign)) {
if (aspectList == null) {
aspec... | Create a Java method that does the following: "Match method cuts.". |
Of course, here is the Java code you requested:
```java
private CompletableFuture<Void> work() {
long time = System.currentTimeMillis();
QueueElement element;
long delayInMillis = 0L;
synchronized (lock) {
element = workQueue.peek();
if (availableSlots > 0 && ele... | Create a Java method that does the following: "This method is called by the thread that will be executed by the thread.". |
Of course, here is the Java code you requested:
```java
public static <T> void forEach(Iterable<T> iterable, Procedure2<? super T, ? super Integer> procedure) {
IteratorExtensions.forEach(iterable.iterator(), procedure);
}
```
Hope this helps! | Create a Java method that does the following: "Iterates over the elements of the iterable and executes the given procedure for each element.". |
Of course, here is the Java code you requested:
```java
public Map relevantCycles() {
Map result = new HashMap();
//minimize();
for (SimpleCycleBasis subgraphBase : subgraphBases) {
SimpleCycleBasis cycleBasis = subgraphBase;
result.putAll(cycleBasis.relevantCycles());
... | Create a Java method that does the following: "Returns a Map of all relevant cycles in this set.". |
Of course, here is the Java code you requested:
```java
public Stopwatch timer(final Stat name) {
final Stopwatch watch = timers.computeIfAbsent(name, k -> Stopwatch.createUnstarted());
// if watch was performed before then new time will sum with current
watch.start();
return watch;
... | Create a Java method that does the following: "Get a timer by stat name.". |
Of course, here is the Java code you requested:
```java
public static long extractTimestampTinyAscii(String idTinyAscii) throws NumberFormatException {
return extractTimestampTiny(Long.parseLong(idTinyAscii, Character.MAX_RADIX));
}
```
Hope this helps! | Create a Java method that does the following: "Extract the timestamp from a TinyAscii string.". |
Of course, here is the Java code you requested:
```java
public StringBuilder mapping(boolean makeDest,MappingType mtd,MappingType mts){
StringBuilder sb = new StringBuilder();
if(isNullSetting(makeDest, mtd, mts, sb)) return sb;
if(makeDest)
sb.append(newInstance(destination, stringOfSetDestin... | Create a Java method that does the following: "Creates a StringBuilder for the mapping of this object.". |
Of course, here is the Java code you requested:
```java
public DescribeWorkspaceDirectoriesResult withDirectories(WorkspaceDirectory... directories) {
if (this.directories == null) {
setDirectories(new com.amazonaws.internal.SdkInternalList<WorkspaceDirectory>(directories.length));
}
... | Create a Java method that does the following: "Adds the directory listing to the result.". |
Of course, here is the Java code you requested:
```java
@Override
public DescribeReservedCacheNodesResult describeReservedCacheNodes(DescribeReservedCacheNodesRequest request) {
request = beforeClientExecution(request);
return executeDescribeReservedCacheNodes(request);
}
```
Hope this helps! | Create a Java method that does the following: "Returns a list of cache nodes that are reserved for a cache type.". |
Of course, here is the Java code you requested:
```java
protected SSLSocket createSSLSocket(
final String host, final int port, final int connectionTimeout,
final boolean trustAll, final boolean verifyHttpsHost) throws IOException {
final SocketFactory socketFactory = getSocketFactory(proxy, true, trustAll, con... | Create a Java method that does the following: "Creates a SSLSocket.". |
Of course, here is the Java code you requested:
```java
public Deferred<ArrayList<Boolean>> processTimeseriesMeta(final TSMeta meta,
final boolean is_testing) {
if (tree == null || tree.getTreeId() < 1) {
throw new IllegalArgumentException(
"The tree has not been set or is invalid");
}
... | Create a Java method that does the following: "Process the given TSMeta object.". |
Of course, here is the Java code you requested:
```java
private void addRevisionToRevHistory(final Node revHistory, final Node revision) {
if (revHistory.hasChildNodes()) {
revHistory.insertBefore(revision, revHistory.getFirstChild());
} else {
revHistory.appendChild(revision);
... | Create a Java method that does the following: "Add a revision to the revision history.". |
Of course, here is the Java code you requested:
```java
protected void insertBeforeEntry(T e, T insertPos) {
T oldPrev = insertPos.getPrev();
e.setNext(insertPos);
e.setPrev(oldPrev);
insertPos.setPrev(e);
if (oldPrev != null) {
oldPrev.setNext(e);
} else {
... | Create a Java method that does the following: "Insert an entry into the list.". |
Of course, here is the Java code you requested:
```java
private synchronized void returnTransport(Transport returning) {
long now = System.currentTimeMillis();
PooledTransport unwrapped;
// check if they're returning a leased transport
if (returning instanceof LeasedTransport) {
... | Create a Java method that does the following: "Return a Transport object to the pool.". |
Of course, here is the Java code you requested:
```java
public boolean isConnector(String name) throws Exception {
final Address address = Address.root().add(SUBSYSTEM, SUBSYSTEM_WEB, CONNECTOR, name);
return null != readResource(address);
}
```
Hope this helps! | Create a Java method that does the following: "Checks if a resource is a connector.". |
Of course, here is the Java code you requested:
```java
public void copyDefaultsFrom(final GrpcChannelProperties config) {
if (this == config) {
return;
}
if (this.address == null) {
this.address = config.address;
}
if (this.defaultLoadBalancingPolicy == ... | Create a Java method that does the following: "Copy the defaults from the specified channel properties.". |
Of course, here is the Java code you requested:
```java
@Nonnull
public EChange removeVariables (@Nullable final Iterable <String> aNames)
{
EChange eChange = EChange.UNCHANGED;
if (aNames != null)
for (final String sName : aNames)
eChange = eChange.or (removeVariable (sName));
return eCh... | Create a Java method that does the following: "Remove all variables at once.". |
Of course, here is the Java code you requested:
```java
public static String getUniqueId(String accessId) {
Matcher m = matcher(accessId);
if (m != null) {
return m.group(3);
}
return null;
}
```
Hope this helps! | Create a Java method that does the following: "Gets the uniqueId from an accessId.". |
Of course, here is the Java code you requested:
```java
@Override
public DMatrixRMaj getU(DMatrixRMaj U , boolean transpose , boolean compact ) {
U = handleU(U, transpose, compact,m,n,min);
CommonOps_DDRM.setIdentity(U);
for( int i = 0; i < m; i++ ) u[i] = 0;
for( int j = min-1; j... | Create a Java method that does the following: "Get the U matrix.". |
Of course, here is the Java code you requested:
```java
public int applicability(final Class<?>[] paramTypes, boolean varArgs) {
if (argTypes == null) {
return MATCH_WILDCARD;
}
int level = MATCH;
final int fixArgs = paramTypes.length - (varArgs ? 1 : 0);
if (fixArgs... | Create a Java method that does the following: "Returns the applicability of the class.". |
Of course, here is the Java code you requested:
```java
public MonthDay withChronologyRetainFields(Chronology newChronology) {
newChronology = DateTimeUtils.getChronology(newChronology);
newChronology = newChronology.withUTC();
if (newChronology == getChronology()) {
return this;
... | Create a Java method that does the following: "This method is used to return a copy of this object with a different chronology.". |
Of course, here is the Java code you requested:
```java
protected boolean isApplicable(AbstractElement<?, ?> result) {
ResultFilter filter = context.configuration.getResultFilter();
return filter == null || filter.isApplicable(result);
}
```
Hope this helps! | Create a Java method that does the following: "Checks if the result is applicable to the current context.". |
Of course, here is the Java code you requested:
```java
public Flow[] getFlows()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getFlows");
}
Flow[] flows = classifications.getFlows();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled(... | Create a Java method that does the following: "Get the list of flows from the classifications". |
Of course, here is the Java code you requested:
```java
public final void mEscapeSequence() throws RecognitionException {
try {
// BELStatement.g:291:24: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
int alt4=3;
int LA4_0 ... | Create a Java method that does the following: "Starts the escape sequence". |
Of course, here is the Java code you requested:
```java
public static base_responses update(nitro_service client, snmpuser resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
snmpuser updateresources[] = new snmpuser[resources.length];
for (int i=0;i... | Create a Java method that does the following: "Use this API to update snmpuser resources.". |
Of course, here is the Java code you requested:
```java
protected void showError(String error) {
if (null == error) {
m_errorLabel.setText("");
} else {
m_errorLabel.setText(error);
}
}
```
Hope this helps! | Create a Java method that does the following: "Show an error message.". |
Of course, here is the Java code you requested:
```java
private void delRef(final int root) {
if (root < 2)
return;
if (root >= this.nodesize)
throw new IllegalStateException("Cannot dereference a variable > varnum");
if (this.low(root) == -1)
throw new IllegalStateException("Cannot deref... | Create a Java method that does the following: "Delete a reference from a variable.". |
Of course, here is the Java code you requested:
```java
public StringBuffer format(Object qty, StringBuffer toAppendTo, FieldPosition pos,
int minDecimals, int... fractionGroups) {
return format(qty, toAppendTo, pos, minDecimals, boxAsList(fractionGroups));
}
```... | Create a Java method that does the following: "Format a sequence of numbers.". |
Of course, here is the Java code you requested:
```java
public LogsInner list(String resourceGroupName, String containerGroupName, String containerName) {
return listWithServiceResponseAsync(resourceGroupName, containerGroupName, containerName).toBlocking().single().body();
}
```
Hope this helps! | Create a Java method that does the following: "Gets a list of logs.". |
Of course, here is the Java code you requested:
```java
public static Geometry rotate(Geometry geom, double theta, double x0, double y0) {
if (geom != null) {
return AffineTransformation.rotationInstance(theta, x0, y0).transform(geom);
} else {
return null;
}
}
```
... | Create a Java method that does the following: "Rotate a geometry.". |
Of course, here is the Java code you requested:
```java
public String getProperty(String strProperty, String strParams)
{
String strValue = null;
strValue = this.parseArg(strProperty, strParams);
if (strValue == null)
strValue = this.getRecordOwner().getProperty(strProperty);
... | Create a Java method that does the following: "Get the property.". |
Of course, here is the Java code you requested:
```java
public final boolean isPrimitive() {
return this.equals(VOID) || this.equals(BOOLEAN) || this.equals(BYTE) || this.equals(CHAR)
|| this.equals(SHORT) || this.equals(INT) || this.equals(LONG)
|| this.equals(FLOAT) || this... | Create a Java method that does the following: "Returns true if this is a primitive type.". |
Of course, here is the Java code you requested:
```java
static HttpParams newDefaultHttpParams() {
HttpParams params = new BasicHttpParams();
// Turn off stale checking. Our connections break all the time anyway,
// and it's not worth it to pay the penalty of checking every time.
HttpConnectionParams.s... | Create a Java method that does the following: "Creates a new default HttpParams instance.". |
Of course, here is the Java code you requested:
```java
private void swapBuffers() throws IOException
{
byte[] data = ((ByteArrayOutputStream)out).toByteArray();
fileBuffer = PrivilegedFileHelper.createTempFile("decoderBuffer", ".tmp");
PrivilegedFileHelper.deleteOnExit(fileBuffer);
out = ne... | Create a Java method that does the following: "Swap the buffers in the output stream.". |
Of course, here is the Java code you requested:
```java
public static String appendPath(String... phs) {
String[] paths = Lang.without(phs, null);
if (null != paths && paths.length > 0) {
// zozoh: 嗯下面的逻辑木有必要了吧
// if (null == paths[0])
// paths[0] = "/";
... | Create a Java method that does the following: "Append path to a list of path strings.". |
Of course, here is the Java code you requested:
```java
public void setDomainStatusList(java.util.Collection<ElasticsearchDomainStatus> domainStatusList) {
if (domainStatusList == null) {
this.domainStatusList = null;
return;
}
this.domainStatusList = new java.util.Arra... | Create a Java method that does the following: "Sets the value domainStatusList property.". |
Of course, here is the Java code you requested:
```java
public static <S extends TBase<?, ?>> LzoThriftSource<S> at(List<Path> paths, Class<S> thriftClass) {
return new LzoThriftSource<S>(paths, EBTypes.thrifts(thriftClass));
}
```
Hope this helps! | Create a Java method that does the following: "Create a thrift source from a list of paths and thrift class.". |
Of course, here is the Java code you requested:
```java
private synchronized void changeInstances(String flowletId, int newInstanceCount, int oldInstanceCount)
throws Exception {
instanceUpdater.update(flowletId, newInstanceCount, oldInstanceCount);
}
```
Hope this helps! | Create a Java method that does the following: "Change instances of a sequence.". |
Of course, here is the Java code you requested:
```java
protected static Is24CsvRecord createWohnungMieteRecord() {
// create an example real estate
WohnungMiete obj = new WohnungMiete();
init(obj);
obj.setAnzahlBadezimmer(RandomUtils.nextInt(1, 5));
obj.setAnzahlGarageStellpla... | Create a Java method that does the following: "Creates a Wohnung Miete record.". |
Of course, here is the Java code you requested:
```java
@Override
public ResultScanner<FlatRow> readFlatRows(ReadRowsRequest request) {
if (shouldOverrideAppProfile(request.getAppProfileId())) {
request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build();
}
// Delegate all res... | Create a Java method that does the following: "A helper method to read the flat rows from the server.". |
Of course, here is the Java code you requested:
```java
static final boolean textNodesOnly(NodeList list) {
final int length = list.getLength();
for (int i = 0; i < length; i++)
if (list.item(i).getNodeType() != Node.TEXT_NODE)
return false;
return true;
}
```
... | Create a Java method that does the following: "Check if the NodeList is text nodes only.". |
Of course, here is the Java code you requested:
```java
private int binarySearch(int position) {
int[] minSeqIndex = getMinSequenceIndex();
int[] maxSeqIndex = getMaxSequenceIndex();
int low = 0;
int high = minSeqIndex.length - 1;
while (low <= high) {
//Go to the mid point in the array
int mid = (low... | Create a Java method that does the following: "Searches for the position in the Sequence.". |
Of course, here is the Java code you requested:
```java
@Override
public final Iterator<T> iterator()
{
return new Iterator<T>()
{
private Iterator<BinaryValue> i = values.iterator();
@Override
public boolean hasNext()
{
return i.... | Create a Java method that does the following: "Method iterator.". |
Of course, here is the Java code you requested:
```java
public void setFormatForDisplayTime(String patternString) {
DateTimeFormatter formatter
= PickerUtilities.createFormatterFromPatternString(patternString, locale);
setFormatForDisplayTime(formatter);
}
```
Hope this helps! | Create a Java method that does the following: "Sets the format for display time.". |
Of course, here is the Java code you requested:
```java
@TargetApi(Build.VERSION_CODES.FROYO)
public static boolean hasGpsLocationFeature(PackageManager manager) {
return manager.hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS);
}
```
Hope this helps! | Create a Java method that does the following: "Check if the package manager has the feature location. gps". |
Of course, here is the Java code you requested:
```java
private void doSet() throws PageException {
if (entry == null) throw new ApplicationException("attribute entry is required for tag registry, when action is [set]");
if (type == RegistryEntry.TYPE_ANY) type = RegistryEntry.TYPE_STRING;
if (value == null) {
... | Create a Java method that does the following: "set the value of the tag". |
Of course, here is the Java code you requested:
```java
public void registerWork(Work work, Xid xid, long timeout) throws WorkCompletedException
{
delegator.registerWork(work, xid, timeout);
}
```
Hope this helps! | Create a Java method that does the following: "Register a work with the transaction.". |
Of course, here is the Java code you requested:
```java
static synchronized void connectionClosedOnError(EnhancedDebugger debugger, Exception e) {
int index = getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane);
getInstance().tabbedPane.setToolTipTextAt(
index,
... | Create a Java method that does the following: "Called when a connection is closed due to an exception.". |
Of course, here is the Java code you requested:
```java
public void copy(LengthSet src)
{
top = src.top;
right = src.right;
bottom = src.bottom;
left = src.left;
}
```
Hope this helps! | Create a Java method that does the following: "Copy the contents of src into this one.". |
Of course, here is the Java code you requested:
```java
public EventCategoriesMap withEvents(EventInfoMap... events) {
if (this.events == null) {
setEvents(new com.amazonaws.internal.SdkInternalList<EventInfoMap>(events.length));
}
for (EventInfoMap ele : events) {
this.... | Create a Java method that does the following: "Adds the events value to the events array.". |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.