code stringlengths 160 48.7k | prompt stringlengths 38 3.13k |
|---|---|
Of course, here is the Java code you requested:
```java
public void enable() {
updateState("up");
m_enabled = true;
// show the current file input field
if (m_fileInput != null) {
m_fileInput.getElement().getStyle().clearDisplay();
}
super.setTitle(m_title);... | Create a Java method that does the following: "Enable the audit log.". |
Of course, here is the Java code you requested:
```java
public <I, O> List<O> groupExecute(final Collection<ShardingExecuteGroup<I>> inputGroups, final ShardingGroupExecuteCallback<I, O> callback) throws SQLException {
return groupExecute(inputGroups, null, callback, false);
}
```
Hope this helps! | Create a Java method that does the following: "Execute the ShardingExecuteGroup operation.". |
Of course, here is the Java code you requested:
```java
private List<String> SN_CKUA() {
List<String> types = new ArrayList<>();
boolean above = false;
boolean done = false;
String partToCheck;
while (!done) {
// check for mandatory groups
for (int group = 0; group < belowGroups.... | Create a Java method that does the following: "Returns a list of all the valid CCKUA types.". |
Of course, here is the Java code you requested:
```java
@Override
public CreateFlowResult createFlow(CreateFlowRequest request) {
request = beforeClientExecution(request);
return executeCreateFlow(request);
}
```
Hope this helps! | Create a Java method that does the following: "Creates a CRS or CRS based on an existing CRS or CRS.". |
Of course, here is the Java code you requested:
```java
public static int substr_count(final String string, final String substring) {
if(substring.length()==1) {
return substr_count(string, substring.charAt(0));
}
int count = 0;
int idx = 0;
while ((idx = s... | Create a Java method that does the following: "Count the number of times substring appears in string.". |
Of course, here is the Java code you requested:
```java
public void addDataRow(final String from, final String to, int weight) {
final ArrayList<Object> valueData = new ArrayList<>();
valueData.add(from);
valueData.add(to);
valueData.add(weight);
values.add(valueData);
}
```
Hope this helps! | Create a Java method that does the following: "Add a data row to the data set.". |
Of course, here is the Java code you requested:
```java
public static InputStream read( String path, ClassLoader classLoader, boolean useTLCL ) {
if (useTLCL) {
InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
if (stream != null) {
... | Create a Java method that does the following: "Read a resource stream.". |
Of course, here is the Java code you requested:
```java
public static void showStructure(Structure structure)
throws ClassNotFoundException, NoSuchMethodException,
InvocationTargetException, IllegalAccessException, InstantiationException{
Class<?> structureAlignmentJmol = Class.forName(strucAligJmol);
Obje... | Create a Java method that does the following: "Show the structure in Jmol.". |
Of course, here is the Java code you requested:
```java
@Override
public void combine(Iterator<Record> records, Collector<Record> out) throws Exception {
// to be implemented, if the reducer should use a combiner. Note that the combining method
// is only used, if the stub class is further annotated with the anno... | Create a Java method that does the following: "Combine the records in the iterator.". |
Of course, here is the Java code you requested:
```java
public HttpServerExchange addRequestWrapper(final ConduitWrapper<StreamSourceConduit> wrapper) {
ConduitWrapper<StreamSourceConduit>[] wrappers = requestWrappers;
if (requestChannel != null) {
throw UndertowMessages.MESSAGES.requestCha... | Create a Java method that does the following: "Add a request wrapper.". |
Of course, here is the Java code you requested:
```java
public static long convertToLong (@Nullable final Object aSrcValue, final long nDefault)
{
final Long aValue = convert (aSrcValue, Long.class, null);
return aValue == null ? nDefault : aValue.longValue ();
}
```
Hope this helps! | Create a Java method that does the following: "Convert the passed value to a long.". |
Of course, here is the Java code you requested:
```java
public com.google.api.ads.adwords.axis.v201809.rm.DateRuleItem getDateRuleItem() {
return dateRuleItem;
}
```
Hope this helps! | Create a Java method that does the following: "Gets the dateRuleItem value for this CdnRuleItem.". |
Of course, here is the Java code you requested:
```java
public int binarySearch(int fromIndex, int toIndex, int value)
{
--toIndex;
while (toIndex >= fromIndex)
{
int mid = (fromIndex + toIndex) >>> 1;
int midVal = get(mid);
if (midVal > value)
... | Create a Java method that does the following: "Searches for the value in the array of tokens.". |
Of course, here is the Java code you requested:
```java
private Map<String, ChatConversationBase> makeMapFromSavedConversations(List<ChatConversationBase> list) {
Map<String, ChatConversationBase> map = new HashMap<>();
if (list != null && !list.isEmpty()) {
for (ChatConversationBase deta... | Create a Java method that does the following: "make map from saved conversations". |
Of course, here is the Java code you requested:
```java
protected <T> List<T> getResources(final ResourceType resourceType, final Class<T> type,
@Nullable final String locationUUID) throws FlexiantException {
SearchFilter sf = new SearchFilter();
if (locationUUID != null) {
Filter... | Create a Java method that does the following: "Gets the resources of the given type.". |
Of course, here is the Java code you requested:
```java
public static ConfigurationModule getOrCreateAzureBatchRuntimeConfiguration(
final boolean isWindows) {
if (AzureBatchRuntimeConfigurationCreator.conf == null) {
ConfigurationModuleBuilder builder = AzureBatchRuntimeConfigurationStatic.CONF;
... | Create a Java method that does the following: "Gets the Azure Batch Runtime Configuration module.". |
Of course, here is the Java code you requested:
```java
@Override
public UpdateAuthEventFeedbackResult updateAuthEventFeedback(UpdateAuthEventFeedbackRequest request) {
request = beforeClientExecution(request);
return executeUpdateAuthEventFeedback(request);
}
```
Hope this helps! | Create a Java method that does the following: "Updates the feedback of an authentication event.". |
Of course, here is the Java code you requested:
```java
@Override public void draw(Canvas canvas) {
if (!visible) return;
final float ratio = transformationValue <= 1 ? transformationValue : 2 - transformationValue;
if (rtlEnabled) {
canvas.save();
canvas.scale(-1, 1, ... | Create a Java method that does the following: "Draw the image.". |
Of course, here is the Java code you requested:
```java
public final void fail(@NullableDecl String format, Object /*@NullableDeclType*/... args) {
doFail(lenientFormat(format, args));
}
```
Hope this helps! | Create a Java method that does the following: "Fail the phrase.". |
Of course, here is the Java code you requested:
```java
@Override
public ListLogSubscriptionsResult listLogSubscriptions(ListLogSubscriptionsRequest request) {
request = beforeClientExecution(request);
return executeListLogSubscriptions(request);
}
```
Hope this helps! | Create a Java method that does the following: "Returns a list of subscriptions for a specific application.". |
Of course, here is the Java code you requested:
```java
public Config setReliableTopicConfigs(Map<String, ReliableTopicConfig> reliableTopicConfigs) {
this.reliableTopicConfigs.clear();
this.reliableTopicConfigs.putAll(reliableTopicConfigs);
for (Entry<String, ReliableTopicConfig> entry : relia... | Create a Java method that does the following: "Sets the map of reliable topic configurations mapped by config name.". |
Of course, here is the Java code you requested:
```java
private void runCommonStages(boolean pedantic, Document document) {
if (!stage2(document)) {
if (pedantic) {
bail(NAMESPACE_RESOLUTION_FAILURE);
}
}
if (!stage3(document)) {
if (pedantic... | Create a Java method that does the following: "Runs the common stages of the validation process.". |
Of course, here is the Java code you requested:
```java
private void verifyAndInit(ObjectStreamClass loadedStreamClass)
throws InvalidClassException {
Class<?> localClass = loadedStreamClass.forClass();
ObjectStreamClass localStreamClass = ObjectStreamClass
.lookupStreamCla... | Create a Java method that does the following: "Verify and init the object stream class.". |
Of course, here is the Java code you requested:
```java
public static Drawable getDrawable(@NonNull final Context context,
@AttrRes final int resourceId) {
return getDrawable(context, -1, resourceId);
}
```
Hope this helps! | Create a Java method that does the following: "Get a drawable from a resource id.". |
Of course, here is the Java code you requested:
```java
public static Se2_F64 toSe2( DMatrixRMaj H, Se2_F64 ret ) {
if( H.numCols != 3 || H.numRows != 3 )
throw new IllegalArgumentException( "The homogeneous matrix must be 3 by 3 by definition." );
if( ret == null )
ret = new Se2_F64();
ret.setTranslatio... | Create a Java method that does the following: "Converts a homogeneous matrix into a Se2_F64". |
Of course, here is the Java code you requested:
```java
public static String getEncoding(CmsObject cms, CmsResource file) {
CmsProperty encodingProperty = CmsProperty.getNullProperty();
try {
encodingProperty = cms.readPropertyObject(file, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, t... | Create a Java method that does the following: "Returns the encoding of the content of the resource.". |
Of course, here is the Java code you requested:
```java
private String getContentText(JsonNode node) throws UnsupportedDashletContentException {
if (node.hasNonNull("textContent")) {
return node.get("textContent").asText();
} else {
throw new UnsupportedDashletContentException("Text content missing");
}
}... | Create a Java method that does the following: "Get the text content of a dashlet node.". |
Of course, here is the Java code you requested:
```java
public SwitchBuilder addCase(Expression caseLabel, Statement body) {
clauses.add(new Switch.CaseClause(ImmutableList.of(caseLabel), body));
return this;
}
```
Hope this helps! | Create a Java method that does the following: "Adds a case clause to the switch.". |
Of course, here is the Java code you requested:
```java
public static List<Dashboard> findSharedDashboardsMeta(EntityManager em, PrincipalUser owner, Integer limit, String version) {
requireArgument(em != null, "Entity manager can not be null.");
try {
CriteriaBuilder cb = em.getCriteriaBuilde... | Create a Java method that does the following: "Find all the Dashboards that are shared by the given owner.". |
Of course, here is the Java code you requested:
```java
public static DoubleBinding nextAfter(final ObservableDoubleValue start, final ObservableDoubleValue direction) {
return createDoubleBinding(() -> Math.nextAfter(start.get(), direction.get()), start, direction);
}
```
Hope this helps! | Create a Java method that does the following: "Create a double binding that is the next value after the specified value.". |
Of course, here is the Java code you requested:
```java
private boolean scrollAndFocus(int direction, int top, int bottom) {
boolean handled = true;
int height = getHeight();
int containerTop = getScrollY();
int containerBottom = containerTop + height;
boolean up = direction == View.FOCUS_UP;
View newFoc... | Create a Java method that does the following: "Scroll and focus.". |
Of course, here is the Java code you requested:
```java
public static <T> Predicate<T> or(Predicate<? super T> first, Predicate<? super T> second) {
return new OrPredicate<T>(Predicates.<T>asList(checkNotNull(first), checkNotNull(second)));
}
```
Hope this helps! | Create a Java method that does the following: "Create an OrPredicate from the given predicates.". |
Of course, here is the Java code you requested:
```java
public static void copyRecursively(final Path source, final Path target, boolean overwrite) throws IOException {
final CopyOption[] options;
if (overwrite) {
options = new CopyOption[]{StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOp... | Create a Java method that does the following: "Copy all files in the source directory to the target directory.". |
Of course, here is the Java code you requested:
```java
public static PapayQuerycontractResult papayQuerycontract(PapayQuerycontract papayQuerycontract,String key){
Map<String,String> map = MapUtil.objectToMap(papayQuerycontract);
String sign = SignatureUtil.generateSign(map,papayQuerycontract.getSign_type(),key);... | Create a Java method that does the following: "Papay Query Contract". |
Of course, here is the Java code you requested:
```java
@Override
public void close(boolean compact, boolean cleanup) {
logger.debug("close");
super.close(compact, cleanup);
if (this.getDatabaseServer() == null) {
return;
}
try {
// shutdown
((HsqldbDatabaseServ... | Create a Java method that does the following: "Close the database server.". |
Of course, here is the Java code you requested:
```java
public static KNXAddress create(String address) throws KNXFormatException
{
if (address.indexOf('.') != -1)
return new IndividualAddress(address);
return new GroupAddress(address);
}
```
Hope this helps! | Create a Java method that does the following: "Creates an address object from a string representation of a KNX address.". |
Of course, here is the Java code you requested:
```java
public static MutableDoubleTuple standardDeviationFromMean(
Collection<? extends DoubleTuple> tuples, DoubleTuple mean,
MutableDoubleTuple result)
{
if (tuples.isEmpty())
{
return null;
}
res... | Create a Java method that does the following: "Returns the standard deviation of the given tuples from the mean and the standard deviation of the given tuples.". |
Of course, here is the Java code you requested:
```java
public static String getFileNamePrefix(ServiceModel serviceModel, CustomizationConfig customizationConfig) {
if (customizationConfig.isUseUidAsFilePrefix() && serviceModel.getMetadata().getUid() != null) {
return serviceModel.getMetadata().get... | Create a Java method that does the following: "Get the file name prefix.". |
Of course, here is the Java code you requested:
```java
public final void rulePredicatedRuleCall() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalXtext.g:883:2: ( ( ( rule__PredicatedRuleCall__Group__0 ) ) )
// InternalXtext.g:884:2:... | Create a Java method that does the following: "Use this method to perform the synpred 2 application code.". |
Of course, here is the Java code you requested:
```java
@Override
public R visitReturn(ReturnTree node, P p) {
return defaultAction(node, p);
}
```
Hope this helps! | Create a Java method that does the following: "Visit a ReturnTree.". |
Of course, here is the Java code you requested:
```java
public Suggestions getList(String photoId, JinxConstants.SuggestionStatus status) throws JinxException {
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.photos.suggestions.getList");
if (!JinxUtils.isNullOrEmpty(photoId)) {
... | Create a Java method that does the following: "Get a list of suggestions for a photo.". |
Of course, here is the Java code you requested:
```java
private static String prependSlash(final String path) {
if (path.length() == 0 || path.charAt(0) != '/') {
/* our path doesn't start with a slash, so we prepend it */
return "/" + path;
}
return path;
}
```
Hop... | Create a Java method that does the following: "Prepends a slash to the path if it doesn t start with a slash.". |
Of course, here is the Java code you requested:
```java
protected static String getAttribute(Node node, String name, boolean required) {
NamedNodeMap attributes = node.getAttributes();
Node idNode = attributes.getNamedItem(name);
if (idNode == null) {
if (required) {
... | Create a Java method that does the following: "Gets the attribute value from a node.". |
Of course, here is the Java code you requested:
```java
protected final String setRequiredValueAttribute(String attrValue, String attrName)
throws JspException
{
assert(attrValue != null) : "parameter '" + attrValue + "' must not be null";
assert(attrName != null) : "parameter '" + attr... | Create a Java method that does the following: "Method setRequiredValueAttribute.". |
Of course, here is the Java code you requested:
```java
@Override
public DeregisterWebhookWithThirdPartyResult deregisterWebhookWithThirdParty(DeregisterWebhookWithThirdPartyRequest request) {
request = beforeClientExecution(request);
return executeDeregisterWebhookWithThirdParty(request);
}
``... | Create a Java method that does the following: "Deregister a webhook from a third - party app.". |
Of course, here is the Java code you requested:
```java
@Override
public FSDataInputStream open(Path f, int bufferSize) throws IOException {
HarStatus hstatus = getFileHarStatus(f, null);
// we got it.. woo hooo!!!
if (hstatus.isDir()) {
throw new FileNotFoundException(f + " : not a file in " +
... | Create a Java method that does the following: "open a file in the HarFS". |
Of course, here is the Java code you requested:
```java
public void marshall(InputTemplate inputTemplate, ProtocolMarshaller protocolMarshaller) {
if (inputTemplate == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMar... | Create a Java method that does the following: "marshalls the given InputTemplate to the JSON object.". |
Of course, here is the Java code you requested:
```java
public RecoverableUnitSection lookupSection(int identity)
{
if (tc.isEntryEnabled()) Tr.entry(tc, "lookupSection",new java.lang.Object[]{this,new Integer(identity)});
SQLRecoverableUnitSectionImpl recoverableUnitSection = (SQLRecoverableUnitSectionImpl... | Create a Java method that does the following: "Lookup a RecoverableUnitSection object for the given identity.". |
Of course, here is the Java code you requested:
```java
public void closeAndClean() {
if(this.sqlUtilClient != null) {
this.sqlUtilClient.closeAndClean();
}
if(this.getAncestorClient != null) {
this.getAncestorClient.closeAndClean();
}
if(this.getDescendantsClient != null) {
this.getDescendantsCli... | Create a Java method that does the following: "Close all the resources.". |
Of course, here is the Java code you requested:
```java
private void parseConfiguration(List<String> functionsToInspect) {
for (String function : functionsToInspect) {
Config config = parseConfiguration(function);
functions.put(config.name, config);
String method = getMethodFromDeclarationName(c... | Create a Java method that does the following: "Parses the configuration of a list of functions.". |
Of course, here is the Java code you requested:
```java
public static <T extends ModifierReviewable.OfByteCodeElement> ElementMatcher.Junction<T> isStatic() {
return new ModifierMatcher<T>(ModifierMatcher.Mode.STATIC);
}
```
Hope this helps! | Create a Java method that does the following: "Create a matcher that matches static methods.". |
Of course, here is the Java code you requested:
```java
public static WsByteBuffer[] expandBufferArray(WsByteBuffer[] oldList, WsByteBuffer[] newBuffers) {
if (null == oldList && null == newBuffers) {
// if both are null then just exit
return null;
}
int oldLen = (null ... | Create a Java method that does the following: "Expands the old list and new buffers into a new list.". |
Of course, here is the Java code you requested:
```java
public void marshall(PointInTimeRecoverySpecification pointInTimeRecoverySpecification, ProtocolMarshaller protocolMarshaller) {
if (pointInTimeRecoverySpecification == null) {
throw new SdkClientException("Invalid argument passed to marshall... | Create a Java method that does the following: "marshalls the given PointInTimeRecoverySpecification to the given protocolMarshaller.". |
Of course, here is the Java code you requested:
```java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public static boolean hasHomeScreenFeature(PackageManager manager) {
return manager.hasSystemFeature(PackageManager.FEATURE_HOME_SCREEN);
}
```
Hope this helps! | Create a Java method that does the following: "Checks if the package manager has a home screen feature.". |
Of course, here is the Java code you requested:
```java
public void insert_ul(final int argIn) {
attributeValue_5.data_format = AttrDataFormat.FMT_UNKNOWN;
final int[] values = new int[1];
values[0] = argIn;
attributeValue_5.w_dim.dim_x = 1;
attributeValue_5.w_dim.dim_y = 0;
if (use_union) {
attribut... | Create a Java method that does the following: "Insert a UL value into the attribute value list.". |
Of course, here is the Java code you requested:
```java
public I_CmsXmlConfiguration getConfiguration(Class<?> clazz) {
for (int i = 0; i < m_configurations.size(); i++) {
I_CmsXmlConfiguration configuration = m_configurations.get(i);
if (clazz.equals(configuration.getClass())) {
... | Create a Java method that does the following: "Gets the configuration object for the given class.". |
Of course, here is the Java code you requested:
```java
protected void childStateChanged(PropertyChangeEvent evt) {
if (FormModel.DIRTY_PROPERTY.equals(evt.getPropertyName())) {
Object source = evt.getSource();
if (source instanceof FieldMetadata) {
FieldMetadata metadata = (FieldMetadata) source;
if ... | Create a Java method that does the following: "This method is called when the child state of the model is changed.". |
Of course, here is the Java code you requested:
```java
protected static void failIfNotNull(@Nullable String customErrorMessage, @Nullable Description description,
@Nullable Object o) {
if (o == null) {
return;
}
failWithMessage(customErrorMessage);
fail(desc... | Create a Java method that does the following: "Fails if the object is null.". |
Of course, here is the Java code you requested:
```java
protected Map<Namespace, List<String>> createNamespaceMap(List<NamespaceDefinition> namespaceDefs) throws XmlException {
ArrayList<Namespace> namespaces = new ArrayList<Namespace>();
// add all root namespaces
for(NamespaceDefinition name... | Create a Java method that does the following: "Create a namespace map from a list of NamespaceDefinitions.". |
Of course, here is the Java code you requested:
```java
protected Server getServer(final Settings settings, final String serverId) {
if (settings == null)
return null;
List<Server> servers = settings.getServers();
if (servers == null || servers.isEmpty())
return null;
for (Server server : servers)
if... | Create a Java method that does the following: "Gets the server.". |
Of course, here is the Java code you requested:
```java
public Observable<ServiceResponse<VirtualMachineExtensionImageInner>> getWithServiceResponseAsync(String location, String publisherName, String type, String version) {
if (location == null) {
throw new IllegalArgumentException("Parameter locat... | Create a Java method that does the following: "Gets a virtual machine extension image.". |
Of course, here is the Java code you requested:
```java
public int[] multiply(int[] p, int[] q) {
int len = p.length + q.length - 1;
int[] result = new int[len];
for (int i = 0; i < len; i++) {
result[i] = 0;
}
for (int i = 0; i < p.length; i++) {
for (int j = 0; j < q.length; j++) {
... | Create a Java method that does the following: "Multiplies two sets of integers.". |
Of course, here is the Java code you requested:
```java
public static void recycleNodes(Collection<AccessibilityNodeInfoCompat> nodes) {
if (nodes == null) {
return;
}
for (AccessibilityNodeInfoCompat node : nodes) {
if (node != null) {
node.recycle();
... | Create a Java method that does the following: "Recycle all the nodes in the collection.". |
Of course, here is the Java code you requested:
```java
@Override
public boolean isWrapperFor(@SuppressWarnings("rawtypes") Class wrappedType) {
if (!ServletRequest.class.isAssignableFrom(wrappedType)) {
throw new IllegalArgumentException("Given class " +
... | Create a Java method that does the following: "Check if the given ServletRequest is a wrapper for the given ServletRequest.". |
Of course, here is the Java code you requested:
```java
public static CipherUtil buildInstance(PrivateKey privateKey, PublicKey publicKey) {
return new AsymmetricCipher(new String(BASE_64.encrypt(privateKey.getEncoded())) + ":"
+ new String(BASE_64.encrypt(publicKey.getEncod... | Create a Java method that does the following: "Build a new instance of the class.". |
Of course, here is the Java code you requested:
```java
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception {
dns_stats[] resources = new dns_stats[1];
dns_response result = (dns_response) service.get_payload_formatter().string_to_resource(dns_response.class, respo... | Create a Java method that does the following: "Use this API to fetch resources of given name.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("resource")
public InputStream getInputStream(String filename)
{
InputStream streamIn = null;
if (filename.indexOf(':') == -1)
{
String filepath = ((BaseHttpTask)this.getTask()).getRealPath(this.getSer... | Create a Java method that does the following: "Get an InputStream for a file in the application.". |
Of course, here is the Java code you requested:
```java
@Override
public Table addColumns(final Column<?>... cols) {
for (final Column<?> c : cols) {
validateColumn(c);
columnList.add(c);
}
return this;
}
```
Hope this helps! | Create a Java method that does the following: "Add columns to the table.". |
Of course, here is the Java code you requested:
```java
@Override
public long executeCount(CommandContext commandContext) {
checkQueryOk();
DbReadOnlyIdentityServiceProvider identityProvider = getIdentityProvider(commandContext);
return identityProvider.findTenantCountByQueryCriteria(this);
}
```
Hope... | Create a Java method that does the following: "Execute count of the tenant". |
Of course, here is the Java code you requested:
```java
private WritCacheCountersHolder fetchWriteCacheCounters() {
//go through all threads and accumulate statistic only for live threads
//all dead threads will be removed and statistics from them will be
//later accumulated in #deadThreadsStatistic field,... | Create a Java method that does the following: "Fetch the WritCacheCountersHolder from the cache.". |
Of course, here is the Java code you requested:
```java
@Override
public GetConnectionsResult getConnections(GetConnectionsRequest request) {
request = beforeClientExecution(request);
return executeGetConnections(request);
}
```
Hope this helps! | Create a Java method that does the following: "Retrieves information about a CA authority.". |
Of course, here is the Java code you requested:
```java
protected Response getResponse(HttpServerExchange exchange) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, MangooTemplateEngineException, IOException {
//execute global request filter
Response response = Response.... | Create a Java method that does the following: "Gets the response.". |
Of course, here is the Java code you requested:
```java
@Deprecated
public GeographyValue add(GeographyPointValue offset) {
List<List<GeographyPointValue>> newLoops = new ArrayList<>();
for (List<XYZPoint> oneLoop : m_loops) {
List<GeographyPointValue> loop = new ArrayList<>();
... | Create a Java method that does the following: "Add a new offset to the SEGMENT.". |
Of course, here is the Java code you requested:
```java
private void setDefaults() {
if (xsdInput == null) {
setXsdInput(DEFAULT_INPUT_FOLDER_PATH);
}
if (output == null) {
setOutput(DEFAULT_OUTPUT_FOLDER_PATH);
}
if (avroNamespacePrefix == null) {
... | Create a Java method that does the following: "Set the default values for the xsd input and output folders.". |
Of course, here is the Java code you requested:
```java
final void resumeLocalTx(LocalTransactionCoordinator lCoord)
throws IllegalStateException
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEventEnabled()) {
if (lCoord != n... | Create a Java method that does the following: "Resume the LTC of the current Local Transaction.". |
Of course, here is the Java code you requested:
```java
private void removeSleeper(final long identifier) throws InvalidIdentifierException {
final ComplexCondition call = sleeperMap.remove(identifier);
if (null == call) {
throw new InvalidIdentifierException(identifier);
}
}
```
Hope this helps! | Create a Java method that does the following: "Remove a sleeper from the map.". |
Of course, here is the Java code you requested:
```java
private static void doCheck(String appId, String cpId, String privateKey, String publicKey, GameUserData userData, ICheckLoginSignHandler callback) {
// 创建body参数
byte[] body = getRequestBody(appId, cpId, privateKey, userData);
// 发送请求... | Create a Java method that does the following: "Check a single user.". |
Of course, here is the Java code you requested:
```java
public static final Function<Long,String> toPercentStr() {
return (Function<Long,String>)((Function)FnNumber.toPercentStr());
}
```
Hope this helps! | Create a Java method that does the following: "Returns a function that converts a number to a percentage function.". |
Of course, here is the Java code you requested:
```java
protected Properties initDefaultOptions() {
Properties defaultValues = new Properties();
defaultValues.putAll(defaults);
// See if there's an aggregator.properties in the class loader's root
ClassLoader cl = OptionsImpl.class.getClassLoader();
UR... | Create a Java method that does the following: "Initializes the default options.". |
Of course, here is the Java code you requested:
```java
public void init(Partition p) throws Exception {
Class.forName(jdbcDeepJobConfig.getDriverClass());
conn = DriverManager.getConnection(jdbcDeepJobConfig.getConnectionUrl(),
jdbcDeepJobConfig.getUsername(),
jdbcDeepJ... | Create a Java method that does the following: "Initialize the iterator.". |
Of course, here is the Java code you requested:
```java
public static String join(List<? extends PropertyInfo> properties) {
StringBuilder sb = new StringBuilder();
for (PropertyInfo info : properties)
sb.append(info.getName()).append('.');
return sb.toString();
}
```
Hope this helps! | Create a Java method that does the following: "Join a list of properties with a dot.". |
Of course, here is the Java code you requested:
```java
public static boolean transferQuery(AlipayFundTransOrderQueryModel model) throws AlipayApiException {
AlipayFundTransOrderQueryResponse response = transferQueryToResponse(model);
if (response.isSuccess()) {
return true;
}
return false;
}
```
Hope thi... | Create a Java method that does the following: "This method is used to transfer a Fund Trans Order Query to Alipay Fund Trans Order API.". |
Of course, here is the Java code you requested:
```java
void tick(long index, long timestamp) {
// Only create an iterator if there are actually tasks scheduled.
if (!scheduledTasks.isEmpty()) {
// Iterate through scheduled tasks until we reach a task that has not met its scheduled time.
// The ta... | Create a Java method that does the following: "Tick the context.". |
Of course, here is the Java code you requested:
```java
protected Object[] createWriteMethodArguments(Method method, Object value) throws IllegalAccessException {
try {
if (value != null) {
Class<?>[] types = method.getParameterTypes();
if (types != null && types.len... | Create a Java method that does the following: "Create the arguments for a method call.". |
Of course, here is the Java code you requested:
```java
public String getProperty(String key)
{
if (properties == null)
return null;
String value = properties.get(key);
if (value == null)
{
if (key.startsWith(PROPERTY_PREFIX))
value = properti... | Create a Java method that does the following: "Gets the value of the attribute a calendar has.". |
Of course, here is the Java code you requested:
```java
public static <T> PositionFactory<Object, T> optional(String propertyName) {
final boolean optional = true;
return new PositionFactory<>(propertyName, optional);
}
```
Hope this helps! | Create a Java method that does the following: "Create a position factory that creates a new instance of a class based on the property name and optional flag.". |
Of course, here is the Java code you requested:
```java
protected void fireMPDErrorEvent(String message) {
ErrorEvent ee = new ErrorEvent(this, message);
for (ErrorListener el : errorListeners) {
el.errorEventReceived(ee);
}
}
```
Hope this helps! | Create a Java method that does the following: "Fire an MPD Error Event". |
Of course, here is the Java code you requested:
```java
private void doStart() throws LifecycleException {
tomcat.getServer().addLifecycleListener(new TomcatLifecycleListener());
logger.info("Deploying application to [" + getConfig().getDeployUrl() + "]");
tomcat.start();
// Let's set ... | Create a Java method that does the following: "Start the application.". |
Of course, here is the Java code you requested:
```java
@javax.annotation.Nonnull
public java.util.Optional<java.util.List<String>> optionalIncludes() {
return java.util.Optional.ofNullable(mIncludes);
}
```
Hope this helps! | Create a Java method that does the following: "Gets the value of the includes property.". |
Of course, here is the Java code you requested:
```java
public MappedByteBuffer map() throws IOException {
long length = -1;
try {
if(mappedByteBuffer == null) {
/* Sample the file length just before we mmap() the
* file, as it may have changed size since ... | Create a Java method that does the following: "Map the file to a MappedByteBuffer.". |
Of course, here is the Java code you requested:
```java
protected C10NAnnotationBinder bindAnnotation(Class<? extends Annotation> annotationClass) {
Preconditions.assertNotNull(annotationClass, "annotationClass");
checkAnnotationInterface(annotationClass);
C10NAnnotationBinder binder = new C10N... | Create a Java method that does the following: "Binds an annotation to the class.". |
Of course, here is the Java code you requested:
```java
static void setAuthParams(String appKey, String desiredUid,
String[] alreadyAuthedUids, String webHost, String apiType) {
setAuthParams(appKey, desiredUid, alreadyAuthedUids, null, null, null);
}
```
Hope this helps! | Create a Java method that does the following: "Set the authentication parameters for the application.". |
Of course, here is the Java code you requested:
```java
public int intersectSphere(float x, float y, float z, float r) {
boolean inside = true;
float dist;
dist = nxX * x + nxY * y + nxZ * z + nxW;
if (dist >= -r) {
inside &= dist >= r;
dist = pxX * x + pxY * y +... | Create a Java method that does the following: "Intersects the sphere with the image.". |
Of course, here is the Java code you requested:
```java
private int findFirstPluralNumberArg(int msgStart, String argName) {
for(int i=msgStart+1;; ++i) {
Part part=msgPattern.getPart(i);
Part.Type type=part.getType();
if(type==Part.Type.MSG_LIMIT) {
return 0... | Create a Java method that does the following: "Find the first plural number argument.". |
Of course, here is the Java code you requested:
```java
public static void reduceDimension(final List<Tuple> trainingData) {
// FeatName - <feat possible vals, count of instances that has this val>
// Do NOT store index for featname, index might not be same among tuples for the same featname.
M... | Create a Java method that does the following: "Reduce the number of dimensions of the training data.". |
Of course, here is the Java code you requested:
```java
protected boolean isSourceFile(File file) {
String name = file.getName();
String extension = Files.getExtension(name).toLowerCase();
return sourceFileExtensions.contains(extension) || sourceFileNames.contains(name);
}
```
Hope this he... | Create a Java method that does the following: "Checks if the file is a source file.". |
Of course, here is the Java code you requested:
```java
public ResultSet getColumnPrivileges(String catalog, String schema, String table,
String columnNamePattern) throws SQLException {
if (table == null) {
throw new SQLException("'table' parameter must not be null");
}
String sql =
"S... | Create a Java method that does the following: "Get the column privileges for a given table.". |
Of course, here is the Java code you requested:
```java
protected boolean hasStereotype(Element element, List<String> stereotypes) {
if (element == null) {
return false;
}
if (stereotypes.contains(element.toString())) {
return true;
}
AnnotationMetadata a... | Create a Java method that does the following: "Check if the element has one of the specified stereotypes.". |
Of course, here is the Java code you requested:
```java
public void setPrefixLists(java.util.Collection<PrefixList> prefixLists) {
if (prefixLists == null) {
this.prefixLists = null;
return;
}
this.prefixLists = new com.amazonaws.internal.SdkInternalList<PrefixList>(pre... | Create a Java method that does the following: "Sets the value of the prefixLists property.". |
Of course, here is the Java code you requested:
```java
public void doProcess(InputStream in, PrintWriter out, Map<String, Object> properties)
throws RemoteException
{
String strCommand = this.getProperty(REMOTE_COMMAND, properties);
if (RECEIVE_REMOTE_MESSAGE.equals(strCommand))
{
... | Create a Java method that does the following: "Process the process method.". |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 11