code stringlengths 146 69.7k | prompt stringlengths 55 1.5k |
|---|---|
Of course, here is the Java code you requested:
```java
public void openFirstLevel() {
if (!m_categories.isEmpty()) {
for (int i = 0; i < m_scrollList.getWidgetCount(); i++) {
CmsTreeItem item = (CmsTreeItem)m_scrollList.getItem(i);
item.setOpen(true);
}... | Create a Java method that does the following: "Open the first level of the tree.". |
Of course, here is the Java code you requested:
```java
public void attemptLogin() {
// Reset errors.
mEmail.setError(null);
mPassword.setError(null);
// Check for a valid email address.
if (TextUtils.isEmpty(mEmail.getText())) {
mEmail.setError(getString(R.string.... | Create a Java method that does the following: "Attempt to login.". |
Of course, here is the Java code you requested:
```java
@Pure
@XtextOperator("-")
@SuppressWarnings("unchecked")
public static <M extends Matrix2d> M operator_minus(double left, M right) {
assert right != null : AssertMessages.notNullParameter(1);
final M result = (M) right.clone();
... | Create a Java method that does the following: "Subtracts two matrix.". |
Of course, here is the Java code you requested:
```java
public String[] getStringArrayConfigAttribute(Map<String, Object> props, String key) {
return trim((String[]) props.get(key));
}
```
Hope this helps! | Create a Java method that does the following: "Get a string array config attribute.". |
Of course, here is the Java code you requested:
```java
public static final String showControlCharacters(String str) {
int len = str.length();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < len; i += 1) {
char c = str.charAt(i);
switch (c) {
case '\b':
sb.append("\\b");
break;
c... | Create a Java method that does the following: "Show control characters in a String.". |
Of course, here is the Java code you requested:
```java
public WorkspaceStorageConnection openConnection(boolean readOnly) throws RepositoryException
{
try
{
if (this.containerConfig.dbStructureType.isMultiDatabase())
{
return new H2MultiDbJDBCConnection(getJdbcConnection(... | Create a Java method that does the following: "Open a connection to the database.". |
Of course, here is the Java code you requested:
```java
public InputStream getRepositoryArchive(Object projectIdOrPath, String sha, String format) throws GitLabApiException {
ArchiveFormat archiveFormat = ArchiveFormat.forValue(format);
return (getRepositoryArchive(projectIdOrPath, sha, archiveFormat))... | Create a Java method that does the following: "Get an InputStream containing the content of a repository archive of the specified sha.". |
Of course, here is the Java code you requested:
```java
private void applyDialogPaddingRight(@NonNull final Area area, @NonNull final View view) {
int padding = area != Area.HEADER && area != Area.BUTTON_BAR && area != Area.CONTENT ?
dialogPadding[2] : 0;
view.setPadding(view.getPadding... | Create a Java method that does the following: "Applies the dialog padding right to the view.". |
Of course, here is the Java code you requested:
```java
public void run()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "run");
UniqueKeyGenerator generator = null;
while (_running)
{
synchronized (_asyncQ)
{
... | Create a Java method that does the following: "This method is called by the application to run the main thread of the UniqueKeyRangeManager.". |
Of course, here is the Java code you requested:
```java
public AbstractJobVertex[] getAllReachableJobVertices() {
final Vector<AbstractJobVertex> collector = new Vector<AbstractJobVertex>();
collectVertices(null, collector);
return collector.toArray(new AbstractJobVertex[0]);
}
```
Hope this helps! | Create a Java method that does the following: "Get all reachable job vertices.". |
Of course, here is the Java code you requested:
```java
private static List<Method> findStaticMethods(Class<?> type) {
return filter(asList(type.getDeclaredMethods()), STATIC_METHOD_PREDICATE);
}
```
Hope this helps! | Create a Java method that does the following: "Find static methods.". |
Of course, here is the Java code you requested:
```java
public AutoscalePolicyFilter where(Predicate<AutoscalePolicyMetadata> predicate) {
checkNotNull(predicate, "Predicate must be not a null");
this.predicate = this.predicate.and(predicate);
return this;
}
```
Hope this helps! | Create a Java method that does the following: "Method allow to filter by autoscale policy metadata". |
Of course, here is the Java code you requested:
```java
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
String path = request.getRequestURI().substring(request.getContextPath().length() + urlPrefix.length());
ActionContext action... | Create a Java method that does the following: "Process a request for the
action.". |
Of course, here is the Java code you requested:
```java
@GuardedBy("lock")
private void beginWaitingFor(Guard guard) {
int waiters = guard.waiterCount++;
if (waiters == 0) {
// push guard onto activeGuards
guard.next = activeGuards;
activeGuards = guard;
}
}
```
Hope this helps! | Create a Java method that does the following: "Begin waiting for a guard.". |
Of course, here is the Java code you requested:
```java
private static String buildConnectionString(final String connectionString,
final Config config) {
if(config == null) {
return connectionString;
}
StringBuilder buf = new StringBuilder();
... | Create a Java method that does the following: "Build connection string.". |
Of course, here is the Java code you requested:
```java
public void setIsRestrictedProfile(boolean isRestrictedProfile) {
UserInfo userInfo = getUserInfo(UserHandle.myUserId());
if (isRestrictedProfile) {
userInfo.flags |= UserInfo.FLAG_RESTRICTED;
} else {
userInfo.flags &= ~UserInfo.FLAG_REST... | Create a Java method that does the following: "Set the isRestrictedProfile flag.". |
Of course, here is the Java code you requested:
```java
protected Response streamResponse(String type, InputStream inputStream, int contentLength) {
return Response.ok(new StreamingOutputImpl(inputStream), type)
.header("Content-Length", contentLength)
.build();
}
```
Hope this helps! | Create a Java method that does the following: "streamResponse Method.". |
Of course, here is the Java code you requested:
```java
public PhotoList<Photo> getContactsPhotos(int count, boolean justFriends, boolean singlePhoto, boolean includeSelf) throws FlickrException {
PhotoList<Photo> photos = new PhotoList<Photo>();
Map<String, Object> parameters = new HashMap<String,... | Create a Java method that does the following: "Get a list of photos from the user s contacts.". |
Of course, here is the Java code you requested:
```java
public static <T> TypeAdapter<T> nullSafeClone(@NonNull final TypeAdapter<T> delegate) {
return new TypeAdapter<T>() {
@Nullable @Override public T readFromParcel(@NonNull Parcel source) {
return readNullable(source, delegate);
}
@O... | Create a Java method that does the following: "Returns a clone of the given type adapter that is null - safe.". |
Of course, here is the Java code you requested:
```java
public FNCFNMRGLen createFNCFNMRGLenFromString(EDataType eDataType, String initialValue) {
FNCFNMRGLen result = FNCFNMRGLen.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator o... | Create a Java method that does the following: "Create a FNCFNMRGLen value from a String.". |
Of course, here is the Java code you requested:
```java
public void setPendingMaintenanceActions(java.util.Collection<PendingMaintenanceAction> pendingMaintenanceActions) {
if (pendingMaintenanceActions == null) {
this.pendingMaintenanceActions = null;
return;
}
this.pe... | Create a Java method that does the following: "Sets the value of the pendingMaintenanceActions property.". |
Of course, here is the Java code you requested:
```java
public Set<Integer> getAllDevices() {
Set<Integer> all = new HashSet<>();
all.addAll(activeDevices);
all.addAll(inactiveDevices);
return all;
}
```
Hope this helps! | Create a Java method that does the following: "Get all the devices in the system.". |
Of course, here is the Java code you requested:
```java
@NotNull
public static File backup(@NotNull final BackupBean backupBean) throws Exception {
backupBean.setBackupStartTicks(System.currentTimeMillis());
return backup(backupBean,
new File(backupBean.getBackupPath()), backupBean.... | Create a Java method that does the following: "Backup a single file.". |
Of course, here is the Java code you requested:
```java
public static URL codeLocationFromPath(String filePath) {
try {
return new File(filePath).toURI().toURL();
} catch (Exception e) {
throw new InvalidCodeLocation(filePath);
}
}
```
Hope this helps! | Create a Java method that does the following: "Gets the code location from a file path.". |
Of course, here is the Java code you requested:
```java
public static void flushAll(long now) {
if (MetricsManager.instance != null) {
MetricsManager.instance.metricsLoggers.values().forEach(MetricsManager::flushMetricsLogger);
flushToServer(now);
}
}
```
Hope this helps! | Create a Java method that does the following: "Flush all metrics to server.". |
Of course, here is the Java code you requested:
```java
@Override
public void removeByG_C_C_M(long groupId, long classNameId, long classPK,
boolean main) {
for (CPFriendlyURLEntry cpFriendlyURLEntry : findByG_C_C_M(groupId,
classNameId, classPK, main, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null)) {
remo... | Create a Java method that does the following: "Removes all the cp friendly url entries from the database. Also notifies the appropriate model listeners.". |
Of course, here is the Java code you requested:
```java
@Override
public void getChannel(
GetChannelRequest request, StreamObserver<GetChannelResponse> responseObserver) {
InternalInstrumented<ChannelStats> s = channelz.getRootChannel(request.getChannelId());
if (s == null) {
responseObserver.onE... | Create a Java method that does the following: "Override the getChannel method to get a single channel from the channelz service.". |
Of course, here is the Java code you requested:
```java
public InputStream openInputStream(VirtualFile mountPoint, VirtualFile target) throws IOException {
return new FileInputStream(getFile(mountPoint, target));
}
```
Hope this helps! | Create a Java method that does the following: "Open an input stream for the given virtual file.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("static-method")
protected boolean isOOActiveAnnotation(XAnnotation annotation) {
final String name = annotation.getAnnotationType().getQualifiedName();
return Strings.equal(Accessors.class.getName(), name)
|| Strings.equal(Data.class.g... | Create a Java method that does the following: "Checks if an annotation is an active OO annotation.". |
Of course, here is the Java code you requested:
```java
public boolean isPrivate() {
// refer to RFC 1918
// 10/8 prefix
// 172.16/12 prefix (172.16.0.0 – 172.31.255.255)
// 192.168/16 prefix
IPv4AddressSegment seg0 = getSegment(0);
IPv4AddressSegment seg1 = getSegment(1);
return seg0.m... | Create a Java method that does the following: "Returns true if this address is private.". |
Of course, here is the Java code you requested:
```java
@com.fasterxml.jackson.annotation.JsonProperty("CancellationReasons")
public void setCancellationReasons(java.util.Collection<CancellationReason> cancellationReasons) {
if (cancellationReasons == null) {
this.cancellationReasons = null;
... | Create a Java method that does the following: "Sets the value of the cancellationReasons property.". |
Of course, here is the Java code you requested:
```java
public JsonObject getJsonObject(String name) throws JsonException {
JsonElement el = get(name);
if (!el.isJsonObject()) {
throw Util.typeMismatch(name, el, "JsonObject");
}
return el.asJsonObject();
}
```
Hope this... | Create a Java method that does the following: "Get the attribute as a JsonObject.". |
Of course, here is the Java code you requested:
```java
public ClockSkewAdjustment getAdjustment(AdjustmentRequest adjustmentRequest) {
ValidationUtils.assertNotNull(adjustmentRequest, "adjustmentRequest");
ValidationUtils.assertNotNull(adjustmentRequest.exception, "adjustmentRequest.exception");
... | Create a Java method that does the following: "Gets the clock skew adjustment.". |
Of course, here is the Java code you requested:
```java
protected boolean hasIndexProperty(final BeanProperty bp) {
if (bp.bean == null) {
return false;
}
String indexString = extractIndex(bp);
if (indexString == null) {
return hasSimpleProperty(bp);
}
Object resultBean = getSimpleProperty(bp);
... | Create a Java method that does the following: "Checks if the given BeanProperty has an index property.". |
Of course, here is the Java code you requested:
```java
private <T> T injectSetters(T r, JSONObject j, Collection<String> exclusions) {
// try to assign rest of the properties
OUTER:
for (String key : (Set<String>)j.keySet()) {
if (!exclusions.contains(key)) {
try {
... | Create a Java method that does the following: "Inject setters from a JSONObject". |
Of course, here is the Java code you requested:
```java
public synchronized void configure(String folder) {
Assert.notNull(folder, "'folder' must not be null");
if (!staticResourcesSet) {
if (staticResourceHandlers == null) {
staticResourceHandlers = new ArrayList<>();
... | Create a Java method that does the following: "Configure the static resources.". |
Of course, here is the Java code you requested:
```java
public boolean renameHttpSession(String oldName, String newName) {
// Check new name validity
if (newName == null || newName.isEmpty()) {
log.warn("Trying to rename session from " + oldName + " illegal name: " + newName);
return false;
}
// Check e... | Create a Java method that does the following: "Rename the http session with the given name.". |
Of course, here is the Java code you requested:
```java
public Se3_F64 getWorldToCurr3D() {
// 2D to 3D coordinates
worldToCurr3D.getT().set(-worldToCurr2D.T.y,0,worldToCurr2D.T.x);
DMatrixRMaj R = worldToCurr3D.getR();
// set rotation around Y axis.
// Transpose the 2D transform since the rotation are poin... | Create a Java method that does the following: "Converts the camera to 3D coordinates". |
Of course, here is the Java code you requested:
```java
public void disableAllForWebApp(String resourceGroupName, String siteName) {
disableAllForWebAppWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().body();
}
```
Hope this helps! | Create a Java method that does the following: "Disables all the CA files for an App Service Environment.". |
Of course, here is the Java code you requested:
```java
public static LocalAlluxioMaster create(String workDirectory, boolean includeSecondary)
throws IOException {
if (!Files.isDirectory(Paths.get(workDirectory))) {
Files.createDirectory(Paths.get(workDirectory));
}
return new LocalAlluxioMast... | Create a Java method that does the following: "Create a new LocalAlluxioMaster.". |
Of course, here is the Java code you requested:
```java
public final <R> Flux<R> concatMapIterable(Function<? super T, ? extends Iterable<? extends R>> mapper,
int prefetch) {
return onAssembly(new FluxFlattenIterable<>(this, mapper, prefetch,
Queues.get(prefetch)));
}
```
Hope this helps! | Create a Java method that does the following: "Concatenates the contents of this Flux using the provided Function to produce a single value.". |
Of course, here is the Java code you requested:
```java
public static void writeStart(String name, PrintWriter writer) {
StringBuilder sb = new StringBuilder();
sb.append("<graph xmlns='http://www.cs.rpi.edu/XGMML' ")
.append("xmlns:ns2='http://www.w3.org/1999/xlink' ")
... | Create a Java method that does the following: "Write a CRS record to a writer.". |
Of course, here is the Java code you requested:
```java
private boolean addManifestClassPath(List<String> scannedJars,
List<String> newJars,
JarURLConnection jconn){
Manifest manifest;
try {
manifest = jconn.... | Create a Java method that does the following: "Add the Class - Path from the Manifest file URL to the list of jars to be scanned.". |
Of course, here is the Java code you requested:
```java
@Nonnull
public static <T> LTieBoolConsumer<T> tieBoolConsumerFrom(Consumer<LTieBoolConsumerBuilder<T>> buildingFunction) {
LTieBoolConsumerBuilder builder = new LTieBoolConsumerBuilder();
buildingFunction.accept(builder);
return builder.build();
}
```
H... | Create a Java method that does the following: "Create a LTieBoolConsumer from a Consumer.". |
Of course, here is the Java code you requested:
```java
private void faceObjectToCamera()
{
GVRSceneObject ownerObject = getOwnerObject();
GVRTransform ownerTrans = ownerObject.getTransform();
float camX = mMainCameraRig.getTransform().getPositionX();
float camY = mMainCameraRig.get... | Create a Java method that does the following: "This method converts the owner object s transform to the camera s transform.". |
Of course, here is the Java code you requested:
```java
public OneLoginResponse<OneLoginApp> getOneLoginAppsBatch(int batchSize) throws OAuthSystemException, OAuthProblemException, URISyntaxException {
return getOneLoginAppsBatch(batchSize, null);
}
```
Hope this helps! | Create a Java method that does the following: "Get a batch of One Login Apps". |
Of course, here is the Java code you requested:
```java
@Override
public void clear() {
final String sourceMethod = "clear"; //$NON-NLS-1$
SignalUtil.lock(cloneLock.readLock(), sourceClass, sourceMethod);
try {
cacheMap.clear();
layerBuildMap.clear();
} finally {
cloneLock.readLock().unlock()... | Create a Java method that does the following: "Clears the cache and layer build map.". |
Of course, here is the Java code you requested:
```java
public void marshall(KinesisFirehoseOutputDescription kinesisFirehoseOutputDescription, ProtocolMarshaller protocolMarshaller) {
if (kinesisFirehoseOutputDescription == null) {
throw new SdkClientException("Invalid argument passed to marshall... | Create a Java method that does the following: "marshalls the given KinesisFirehoseOutputDescription to the JSON object.". |
Of course, here is the Java code you requested:
```java
@Override
public CommerceAccountUserRel findByCommerceAccountId_First(
long commerceAccountId,
OrderByComparator<CommerceAccountUserRel> orderByComparator)
throws NoSuchAccountUserRelException {
CommerceAccountUserRel commerceAccountUserRel = fetchByComm... | Create a Java method that does the following: "Returns the commerce account user rel in the ordered set where commerceAccountId = ? ;.". |
Of course, here is the Java code you requested:
```java
private Boolean readOptionalBoolean(JSONObject json, String key) {
try {
return Boolean.valueOf(json.getBoolean(key));
} catch (JSONException e) {
LOG.debug("Reading optional JSON boolean failed. Default to provided defaul... | Create a Java method that does the following: "Read an optional boolean value from a JSON object.". |
Of course, here is the Java code you requested:
```java
public static String leafName(final String path) {
final int bangIdx = path.indexOf('!');
final int endIdx = bangIdx >= 0 ? bangIdx : path.length();
int leafStartIdx = 1 + (File.separatorChar == '/' ? path.lastIndexOf('/', endIdx)
... | Create a Java method that does the following: "Get the name of the leaf file.". |
Of course, here is the Java code you requested:
```java
private void updateNotArrivedH(double extrp)
{
if (fh < fhDest)
{
fh += velocity * extrp;
if (fh > fhDest - sensibility)
{
fh = fhDest;
arrivedH = true;
}
... | Create a Java method that does the following: "Update not arrived H.". |
Of course, here is the Java code you requested:
```java
public void deleteNote(Serializable projectId, Integer issueId, GitlabNote noteToDelete) throws IOException {
String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId)
+ GitlabIssue.URL + "/" + issueId + GitlabNote.URL
... | Create a Java method that does the following: "Delete a specific note from an issue". |
Of course, here is the Java code you requested:
```java
public EList<JvmGenericType> getLocalClasses()
{
if (localClasses == null)
{
localClasses = new EObjectContainmentEList<JvmGenericType>(JvmGenericType.class, this, TypesPackage.JVM_FEATURE__LOCAL_CLASSES);
}
return localClasses;
}
```
Hope this help... | Create a Java method that does the following: "Replies the types of the local classes.". |
Of course, here is the Java code you requested:
```java
public Document parse(InputSource inputsource) throws SAXException, IOException
{
return verify(_WrappedBuilder.parse(inputsource));
}
```
Hope this helps! | Create a Java method that does the following: "Parse the input source and return a Document object.". |
Of course, here is the Java code you requested:
```java
Version readVersion() throws FormatException {
if (parsedVersion != null) {
return parsedVersion;
}
int dimension = bitMatrix.getHeight();
int provisionalVersion = (dimension - 17) / 4;
if (provisionalVersion <= 6) {
return Vers... | Create a Java method that does the following: "Read the version information from the bit matrix.". |
Of course, here is the Java code you requested:
```java
protected String cleanForPublican(final BuildData buildData, final SpecTopic specTopic, final String translationString) {
if (translationString == null) return null;
try {
final Document doc = TopicUtilities.convertXMLStringToDocument... | Create a Java method that does the following: "Clean up the translation string for publican.". |
Of course, here is the Java code you requested:
```java
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DroolsPackage.DOCUMENT_ROOT__MIXED:
return mixed != null && !mixed.isEmpty();
case DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
return xMLNSPrefixMap != null && !xMLNSPr... | Create a Java method that does the following: "Override eIsSet to check if the feature is set.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("squid:S2077")
@Override
public int update(final SqlStatement sql, final List<SqlVisitor> sqlVisitors) throws DatabaseException {
if (sql instanceof CallableSqlStatement) {
throw new DatabaseException("Direct update u... | Create a Java method that does the following: "Update the database using the specified SQL statement and list of SQL visitors.". |
Of course, here is the Java code you requested:
```java
void remove(int row, int column) {
SparseArrayCompat<TObj> array = mData.get(row);
if (array != null) {
array.remove(column);
}
}
```
Hope this helps! | Create a Java method that does the following: "Removes the entry from the cache.". |
Of course, here is the Java code you requested:
```java
public void setCPName(String newCPName) {
String oldCPName = cpName;
cpName = newCPName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.MCF1RG__CP_NAME, oldCPName, cpName));
}
```
Hope this helps! | Create a Java method that does the following: "Sets the cpName of this MCF1RG object.". |
Of course, here is the Java code you requested:
```java
public static double getLongitudeDistance(BoundingBox boundingBox) {
return getLongitudeDistance(boundingBox.getMinLongitude(),
boundingBox.getMaxLongitude(),
(boundingBox.getMinLatitude() + boundingBox.getMaxLatitude()) / ... | Create a Java method that does the following: "Get the longitude distance of the bounding box". |
Of course, here is the Java code you requested:
```java
public ArrayList<OvhVoIPHardware> packName_voipLine_options_hardwares_GET(String packName) throws IOException {
String qPath = "/pack/xdsl/{packName}/voipLine/options/hardwares";
StringBuilder sb = path(qPath, packName);
String resp = exec(qPath, "GET", sb.... | Create a Java method that does the following: "Get available hardwares". |
Of course, here is the Java code you requested:
```java
public static ClassFile buildClassFile(String className,
Class<?>[] classes,
String[] prefixes) {
return buildClassFile(className, classes, prefixes, null, OBSERVER_DIS... | Create a Java method that does the following: "Build a ClassFile from a class name and a list of classes.". |
Of course, here is the Java code you requested:
```java
protected Resolution interceptEventHandling(ExecutionContext executionContext)
throws Exception
{
// Before handling the event, check if access is allowed.
// If not explicitly allowed, access is denied.
Resolution resolution;
if (Boolean.TRUE.equal... | Create a Java method that does the following: "Intercept the event handling.". |
Of course, here is the Java code you requested:
```java
private static int findFirstQuotable(byte[] data, int offset, int end) {
while (offset < end) {
switch (data[offset]) {
case '<':
case '>':
case '&':
return offset;
default:
offset += 1;
}
}
return o... | Create a Java method that does the following: "Find the first quotable entry in the byte array.". |
Of course, here is the Java code you requested:
```java
public void setPhoneNumberOrders(java.util.Collection<PhoneNumberOrder> phoneNumberOrders) {
if (phoneNumberOrders == null) {
this.phoneNumberOrders = null;
return;
}
this.phoneNumberOrders = new java.util.ArrayLis... | Create a Java method that does the following: "Sets the value of the phoneNumberOrders property.". |
Of course, here is the Java code you requested:
```java
public LongStreamEx mapFirst(LongUnaryOperator mapper) {
return delegate(new PairSpliterator.PSOfLong((a, b) -> b, mapper, spliterator(),
PairSpliterator.MODE_MAP_FIRST));
}
```
Hope this helps! | Create a Java method that does the following: "Creates a stream consisting of the elements of this stream by applying the provided function to the first element of this stream.". |
Of course, here is the Java code you requested:
```java
public static String getVersion(String groupId, String artifactId) throws IOException {
String path = "META-INF/maven/" + groupId + "/" + artifactId + "/pom.properties";
InputStream in = MavenUtil.class.getClassLoader().getResourceAsStream(path);
... | Create a Java method that does the following: "Get the version of the Maven project.". |
Of course, here is the Java code you requested:
```java
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE)
protected Map<String, Object> setConfiguration(ServiceReference<SecurityConfiguration> ref) {
String id = (String) ref.getProperty(KEY_ID);
if (id != nul... | Create a Java method that does the following: "Method setConfiguration.". |
Of course, here is the Java code you requested:
```java
@Nullable
public static IJson readFromPath (@Nonnull final Path aPath,
@Nonnull final Charset aFallbackCharset,
@Nullable final IJsonParseExceptionCallback aCustomExceptionHandler)
{
... | Create a Java method that does the following: "Read a node from a file.". |
Of course, here is the Java code you requested:
```java
public boolean pasteTopicsFromClipboard() {
boolean result = false;
if (this.lockIfNotDisposed()) {
try {
final Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
if (Utils.isDataFlavorAvailable(clipboard, MMDTo... | Create a Java method that does the following: "Paste topics from clipboard.". |
Of course, here is the Java code you requested:
```java
protected final int getMaxOrLimit(RowSelection selection) {
final int firstRow = convertToFirstRowValue(LimitHelper.getFirstRow(selection));
final int lastRow = selection.getMaxRows();
return useMaxForLimit() ? lastRow + firstRow : lastRow;
}
```
Hope thi... | Create a Java method that does the following: "Get the maximum value for the given row selection.". |
Of course, here is the Java code you requested:
```java
@Nullable
public byte[] getSegment(byte segmentType, int occurrence)
{
final List<byte[]> segmentList = getSegmentList(segmentType);
return segmentList != null && segmentList.size() > occurrence
? segmentList.get(occurrenc... | Create a Java method that does the following: "Gets the segment of the specified type and occurrence.". |
Of course, here is the Java code you requested:
```java
@Override
public CreateOrganizationResult createOrganization(CreateOrganizationRequest request) {
request = beforeClientExecution(request);
return executeCreateOrganization(request);
}
```
Hope this helps! | Create a Java method that does the following: "Creates an organization.". |
Of course, here is the Java code you requested:
```java
public void notationDecl(String a, String b, String c) throws SAXException
{
if(null!=clientDTDHandler)
clientDTDHandler.notationDecl(a,b,c);
}
```
Hope this helps! | Create a Java method that does the following: "Method notationDecl.". |
Of course, here is the Java code you requested:
```java
public long getDuration( TimeUnit unit ) {
if (unit == null) throw new IllegalArgumentException();
return unit.convert(durationInNanos, TimeUnit.NANOSECONDS);
}
```
Hope this helps! | Create a Java method that does the following: "Gets the duration in the specified unit.". |
Of course, here is the Java code you requested:
```java
public String convertIfcSurfaceSideToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
}
```
Hope this helps! | Create a Java method that does the following: "This method is called to convert an object to a string.". |
Of course, here is the Java code you requested:
```java
public static void store(DataNode node, OutputStream out, boolean addChecksum, ProgressListener progressListener,
AbstractDataMarshaller<?>... marshallers) throws IOException {
store(node, out, addChecksum, false, progressListener, marshallers... | Create a Java method that does the following: "Store a data node into an output stream.". |
Of course, here is the Java code you requested:
```java
public ServletLimiterBuilder partitionByParameter(String name) {
return partitionResolver(request -> Optional.ofNullable(request.getParameter(name)).orElse(null));
}
```
Hope this helps! | Create a Java method that does the following: "Partition by parameter.". |
Of course, here is the Java code you requested:
```java
@Override
public synchronized void accept(final double value) {
super.accept(value);
final double squareValue = value * value;
simpleSumOfSquare += squareValue;
sumOfSquareWithCompensation(squareValue);
}
```
Hope this helps! | Create a Java method that does the following: "Override accept method to add a value to the CRA.". |
Of course, here is the Java code you requested:
```java
public static byte[] encode(byte[] input, int offset, int len, int flags) {
Encoder encoder = new Encoder(flags, null);
// Compute the exact length of the array we will produce.
int output_len = len / 3 * 4;
// Account for the tail of the data a... | Create a Java method that does the following: "Encode the given byte array.". |
Of course, here is the Java code you requested:
```java
protected int interpretRun(LineParser lp, MessageMgr mm){
String fileName = this.getFileName(lp);
String content = this.getContent(fileName, mm);
if(content==null){
return 1;
}
mm.report(MessageMgr.createInfoMessage(""));
mm.report(MessageMgr.crea... | Create a Java method that does the following: "Interprets a run of a skb shell.". |
Of course, here is the Java code you requested:
```java
public void setPluginList(Path src) {
if (pluginList == null) {
pluginList = src;
} else {
pluginList.append(src);
}
}
```
Hope this helps! | Create a Java method that does the following: "Set the plugin list.". |
Of course, here is the Java code you requested:
```java
protected void prepareForwardedResponseHeaders(ResponseData response) {
HttpHeaders headers = response.getHeaders();
headers.remove(TRANSFER_ENCODING);
headers.remove(CONNECTION);
headers.remove("Public-Key-Pins");
headers.... | Create a Java method that does the following: "Remove forwarded response headers.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
public static Optional<AlexaIntentHandler> createHandler(final AlexaInput input) {
try {
final Class factoryImpl = Class.forName(FACTORY_PACKAGE + "." + FACTORY_CLASS_NAME);
final Method method = ... | Create a Java method that does the following: "Create an intent handler from the generated intent handler factory.". |
Of course, here is the Java code you requested:
```java
public static final ClassLoader getContextLoader() {
return CClassLoader.contextLoader.get() != null ? (CClassLoader) ((WeakReference) CClassLoader.contextLoader
.get()).get()
: null;
}
```
Hope this helps! | Create a Java method that does the following: "Get the context loader.". |
Of course, here is the Java code you requested:
```java
@Override
public Object find(Class entityClass, Object rowId)
{
EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClass);
List<String> relationNames = entityMetadata.getRelationNames();
... | Create a Java method that does the following: "Gets an entity from HBase.". |
Of course, here is the Java code you requested:
```java
public void addLayer(ClientLayerInfo layerInfo) {
addLayerWithoutFireEvent(layerInfo);
mapInfo.getLayers().add(layerInfo);
handlerManager.fireEvent(new MapModelChangedEvent(this));
}
```
Hope this helps! | Create a Java method that does the following: "Add a layer to the map.". |
Of course, here is the Java code you requested:
```java
public void resetOutputBuffer()
{
int shrunkenSize = shrinkBufferSize();
if (outputBuffer.writerIndex() < shrunkenSize) {
// Less than the shrunken size of the buffer was actually used, so increment
// the under-use co... | Create a Java method that does the following: "Reset the output buffer.". |
Of course, here is the Java code you requested:
```java
private void validateWindowedSyntax() {
// Check that the aggregate is one of the supported ones, and
// that the number of aggregate parameters is right.
switch (opType) {
case OpTypes.WINDOWED_RANK:
case OpTypes.WINDOWED_... | Create a Java method that does the following: "Validate that the windowed syntax is valid.". |
Of course, here is the Java code you requested:
```java
public void usage(PrintWriter writer, Help.ColorScheme colorScheme) {
writer.print(usage(new StringBuilder(), getHelpFactory().create(getCommandSpec(), colorScheme)));
writer.flush();
}
```
Hope this helps! | Create a Java method that does the following: "Print the usage of the command.". |
Of course, here is the Java code you requested:
```java
public Observable<ServiceResponse<Page<SiteInner>>> beginChangeVnetSinglePageAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("... | Create a Java method that does the following: "Changes a virtual network. Change virtual network.". |
Of course, here is the Java code you requested:
```java
public static WritableRaster netNumbering( GridCoverage2D flowGC, GridCoverage2D netGC, GridCoverage2D tcaGC,
int tcaThreshold, SimpleFeatureCollection pointsFC, IHMProgressMonitor pm ) throws Exception {
RegionMap regionMap = CoverageUtilitie... | Create a Java method that does the following: "Create a WritableRaster of the net numbering of the specified coverage.". |
Of course, here is the Java code you requested:
```java
public void marshall(ListIndicesRequest listIndicesRequest, ProtocolMarshaller protocolMarshaller) {
if (listIndicesRequest == 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
@Override
public void configure(RedisConnection connection) {
String notifyOptions = getNotifyOptions(connection);
String customizedNotifyOptions = notifyOptions;
if (!customizedNotifyOptions.contains("E")) {
customizedNotifyOptions += "E";
}
boolea... | Create a Java method that does the following: "Configure the connection with the notify options.". |
Of course, here is the Java code you requested:
```java
public boolean contains(Object o) {
if (o != null) {
for (Node<E> p = first(); p != null; p = succ(p)) {
final E item;
if ((item = p.item) != null && o.equals(item))
return true;
... | Create a Java method that does the following: "Check if the node contains the object o.". |
Of course, here is the Java code you requested:
```java
public void setHSV(int hue, int sat, int val) throws Exception {
if ((hue < 0) || (hue > 360)) {
throw new Exception();
}
if ((sat < 0) || (sat > 100)) {
throw new Exception();
}
if ((val < ... | Create a Java method that does the following: "Sets the HSV value of the NCR tag.". |
Of course, here is the Java code you requested:
```java
public void add(CharRange cond)
{
if (set.isEmpty())
{
set.add(cond);
}
else
{
List<CharRange> remlist = new ArrayList<CharRange>();
List<CharRange> addlist = new ArrayList<C... | Create a Java method that does the following: "Adds the specified subset of CharRanges to the
.". |
Of course, here is the Java code you requested:
```java
private OtherPersonnel getOtherPersonnel(BudgetPeriodDto periodInfo) {
OtherPersonnel otherPersonnel = OtherPersonnel.Factory.newInstance();
int OtherpersonalCount = 0;
List<OtherPersonnelDataType> otherPersonnelList = new ArrayList<>();
OtherPersonnelDat... | Create a Java method that does the following: "This method gets OtherPersonnel details in BudgetPeriodDto based on BudgetPeriodInfo for the RRBudget.". |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.