code stringlengths 146 69.7k | prompt stringlengths 55 1.5k |
|---|---|
Of course, here is the Java code you requested:
```java
public Future<Date> getDateOfDataInCache(Class<?> clazz, final Object cacheKey) throws CacheCreationException {
return executeCommand(new GetDateOfDataInCacheCommand(this, clazz, cacheKey));
}
```
Hope this helps! | Create a Java method that does the following: "Get the date of the data in cache.". |
Of course, here is the Java code you requested:
```java
public void configure(LifecycleEnvironment environment, MetricRegistry registry) {
for (ReporterFactory reporter : reporters) {
try {
final ScheduledReporterManager manager =
new ScheduledReporterManager... | Create a Java method that does the following: "Configure the lifecycle environment.". |
Of course, here is the Java code you requested:
```java
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AfplibPackage.BEGIN_SEGMENT_COMMAND__LENGTH:
return LENGTH_EDEFAULT == null ? length != null : !LENGTH_EDEFAULT.equals(length);
case AfplibPackage.BEGIN_SEGMENT_COMMAND__NAME:... | Create a Java method that does the following: "Override the eIsSet method to check if the featureID is set in the header.". |
Of course, here is the Java code you requested:
```java
public static void keyStore(String pathToJks, String password) {
Validate.notEmpty(password, "Password cannot be empty");
applyKeyStore(pathToJks, password);
}
```
Hope this helps! | Create a Java method that does the following: "Apply a keystore to the classpath.". |
Of course, here is the Java code you requested:
```java
public static snmp_user delete(nitro_service client, snmp_user resource) throws Exception
{
resource.validate("delete");
return ((snmp_user[]) resource.delete_resource(client))[0];
}
```
Hope this helps! | Create a Java method that does the following: "Use this API to delete snmp_user.". |
Of course, here is the Java code you requested:
```java
private static ConditionWithApplicables methodWithUriAndAutoDiscovery(final Method m, String uri) {
try {
final URL resource = new SmartDiscoverer("restito").discoverResource(m, uri);
return new ConditionWithApplicables(composite(m... | Create a Java method that does the following: "Method with uri and auto - discover resource.". |
Of course, here is the Java code you requested:
```java
public void setShort(String fieldName, Short value) {
if (value == null) {
throw new IllegalArgumentException("参数值[" + fieldName + "]不能为NULL.");
}
fieldList.add(fieldName);
statementParameter.setShort(value);
}
```
Hope this helps! | Create a Java method that does the following: "Sets the value of the designated field in the target object.". |
Of course, here is the Java code you requested:
```java
static NativeType getDefaultConversion(Type t) {
if( t instanceof Class ) {
Class<?> c = (Class<?>)t;
NativeType r = defaultConversions.get(c);
if(r!=null) return r;
if(Com4jObject.class.isAssignableFrom(c)... | Create a Java method that does the following: "Get the default conversion for a type.". |
Of course, here is the Java code you requested:
```java
public void setDocumentURI(String arg0) {
// dynamic load to support jre 1.4 and 1.5
try {
Method m = doc.getClass().getMethod("setDocumentURI", new Class[] { arg0.getClass() });
m.invoke(doc, new Object[] { arg0 });
}
catch (Exception e) {
thr... | Create a Java method that does the following: "Sets the document URI.". |
Of course, here is the Java code you requested:
```java
private void registerDirectoryTree(Path path) {
try {
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
... | Create a Java method that does the following: "registerDirectoryTree This method walks the directory tree and registers all files in it.". |
Of course, here is the Java code you requested:
```java
protected void createTable(){
sqlManager.executeUpdate(
new StringSqlResource(String.format("CREATE TABLE %s (VERSION NUMERIC NOT NULL)", tableName)));
sqlManager.executeUpdate(
new StringSqlResource(String.fo... | Create a Java method that does the following: "Create the table.". |
Of course, here is the Java code you requested:
```java
public static INDArray eq(INDArray x, INDArray y, INDArray z, int... dimensions) {
if(dimensions == null) {
Preconditions.checkArgument(Arrays.equals(x.shape(),y.shape()),getFormattedShapeErrorMessageXy(x,y));
Preconditions.checkAr... | Create a Java method that does the following: "Compute the equality of two arrays". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("deprecation")
@Override
public <S extends T> Iterable<S> saveAll(final Iterable<S> entities) {
if (arangoOperations.getVersion().getVersion().compareTo("3.4.0") < 0) {
arangoOperations.upsert(entities, UpsertStrategy.UPDATE);
} else {
... | Create a Java method that does the following: "Saves all entities in the database.". |
Of course, here is the Java code you requested:
```java
private static GovernmentBodyAnnualSummary createGovernmentBodyAnnualSummaryFromRow(final int year, final Row row) {
return new GovernmentBodyAnnualSummary(year, defaultValueIfNull(row.getCell(NAME_CELL)), getInteger(defaultValueIfNull(row.getCell(CONSECUTIVE_N... | Create a Java method that does the following: "Create a GovernmentBodyAnnualSummary object from a Row object.". |
Of course, here is the Java code you requested:
```java
static Map<String, Object> minPayload(final Object min) {
if (min == null) {
return null;
}
Map<String, Object> payload = new LinkedHashMap<>();
payload.put("value", min);
payload.put("message", MSG_PREFIX + VALIDATORS.get(Min.class));
return paylo... | Create a Java method that does the following: "Create a payload map with the minimum value.". |
Of course, here is the Java code you requested:
```java
public CompletableFuture<Long> appendEntries() {
raft.checkThread();
// If there are no other active members in the cluster, simply complete the append operation.
if (raft.getCluster().getRemoteMemberStates().isEmpty()) {
return CompletableFutu... | Create a Java method that does the following: "Append entries to the cluster.". |
Of course, here is the Java code you requested:
```java
public static void writePropertyFile(CmsObject cms, String resourcename, byte[] content) throws CmsException {
Properties properties = new Properties();
try {
String props = CmsEncoder.createString(content, CmsEncoder.ENCODING_UTF_8);... | Create a Java method that does the following: "Write property file.". |
Of course, here is the Java code you requested:
```java
@Override
public void backward() {
// TODO: This is less numerically stable than the O(n^2) method of
// multiplying \prod_{j=1}^{i-1} x_j \prod_{j+1}^n x_j
Tensor x = modIn.getOutput();
Tensor xAdj = modIn.getOutputAdj();
... | Create a Java method that does the following: "This method is called in backward order.". |
Of course, here is the Java code you requested:
```java
@Override
public RegisterVolumeResult registerVolume(RegisterVolumeRequest request) {
request = beforeClientExecution(request);
return executeRegisterVolume(request);
}
```
Hope this helps! | Create a Java method that does the following: "Registers a CRS language specific volume.". |
Of course, here is the Java code you requested:
```java
byte[] transform(Class<?> classBeingRedefined, byte[] classfileBuffer) throws
IllegalClassFormatException {
if (classBeingRedefined == null
|| !mockedTypes.contains(classBeingRedefined)) {
return null;
} els... | Create a Java method that does the following: "Transform a class to a single class.". |
Of course, here is the Java code you requested:
```java
public Long getUnixTimeMillis() {
String time = tags.get("c");
if (time == null)
return null;
else
try {
return Long.parseLong(time) * 1000;
} catch (NumberFormatException e) {
... | Create a Java method that does the following: "Gets the unicode time in milliseconds.". |
Of course, here is the Java code you requested:
```java
final XML newXMLFromJs(Object inputObject) {
String frag;
if (inputObject == null || inputObject == Undefined.instance) {
frag = "";
} else if (inputObject instanceof XMLObjectImpl) {
// todo: faster way for XMLObj... | Create a Java method that does the following: "Create an XML object from a JavaScript object.". |
Of course, here is the Java code you requested:
```java
public Query rewrite(IndexReader reader) throws IOException
{
if (version.getVersion() >= IndexFormatVersion.V3.getVersion())
{
RangeQuery localNames = new RangeQuery(getLowerLocalNameTerm(), getUpperLocalNameTerm(), inclusive);
B... | Create a Java method that does the following: "Rewrite the index query.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
public EList<IfcConstraintAggregationRelationship> getIsAggregatedIn() {
return (EList<IfcConstraintAggregationRelationship>) eGet(
Ifc2x3tc1Package.Literals.IFC_CONSTRAINT__IS_AGGREGATED_IN, true);
}
```
Hope this help... | Create a Java method that does the following: "Gets the value of the IsAggregatedIn property.". |
Of course, here is the Java code you requested:
```java
public static boolean checkIfNoneMatchEtag(HttpServletRequest request,
HttpServletResponse response, String etag) {
String headerValue = request.getHeader(HttpHeaders.IF_NONE_MATCH);
if (headerValue !... | Create a Java method that does the following: "Check if the ifNoneMatch Etag header is present in the request.". |
Of course, here is the Java code you requested:
```java
public static void multiply(ComplexPolar_F64 a, ComplexPolar_F64 b, ComplexPolar_F64 result)
{
result.r = a.r*b.r;
result.theta = a.theta + b.theta;
}
```
Hope this helps! | Create a Java method that does the following: "Multiplies two complex coefficients.". |
Of course, here is the Java code you requested:
```java
@Override
public void service(NaviRpcRequest request, Callback<NaviRpcResponse> callback) {
Object result = null;
long traceId = 0L;
try {
RequestDTO requestDTO = request.getRequestDTO();
Preconditions.che... | Create a Java method that does the following: "Handle
service method.". |
Of course, here is the Java code you requested:
```java
public void applyFeatureCountThreshold(int k) {
float[] counts = getFeatureCounts();
Index<F> newFeatureIndex = new HashIndex<F>();
int[] featMap = new int[featureIndex.size()];
for (int i = 0; i < featMap.length; i++) {
F feat = feat... | Create a Java method that does the following: "Applies the feature count threshold to the data.". |
Of course, here is the Java code you requested:
```java
public <T> Observable<T> getAndObserve(final String key, final TypeToken<T> typeTokenOfT,
final T defaultValue) {
return observe(key, typeTokenOfT, defaultValue) // start observing
.mergeWith(
Observable.defer(new Callable<Observable... | Create a Java method that does the following: "Gets an observable from the cache and returns it.". |
Of course, here is the Java code you requested:
```java
public T insertWithOverflow(T element) {
if (size < maxSize) {
add(element);
return null;
} else if (size > 0 && !lessThan(element, heap[1])) {
T ret = heap[1];
heap[1] = element;
updateTop();
return ret;
} else {
... | Create a Java method that does the following: "Insert an element into the list.". |
Of course, here is the Java code you requested:
```java
@Override
public synchronized void destroyChain(ChainData chaindata) throws ChannelException, ChainException {
String chainName = (null != chaindata) ? chaindata.getName() : null;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()... | Create a Java method that does the following: "Destroy a chain.". |
Of course, here is the Java code you requested:
```java
protected void reallocateIndexes() {
indexes = new Integer[getFilteredModel().getSize()];
for (int i = 0; i < indexes.length; i++) {
indexes[i] = new Integer(i);
}
applyComparator();
}
```
Hope this helps! | Create a Java method that does the following: "Reallocate the indexes array.". |
Of course, here is the Java code you requested:
```java
@Override
public void visitMethod(Method obj) {
if (!obj.isAbstract())
return;
String methodName = obj.getName();
String methodSig = obj.getSignature();
outer: for (JavaClass cls : superClasses) {
Metho... | Create a Java method that does the following: "overrides the visitor to look for method objects that are private and abstract.". |
Of course, here is the Java code you requested:
```java
public void moveToRecordId(RecordId rid) {
moveTo(rid.block().number());
rp.moveToId(rid.id());
}
```
Hope this helps! | Create a Java method that does the following: "Moves the record to the next block.". |
Of course, here is the Java code you requested:
```java
public final boolean_factor_return boolean_factor() throws RecognitionException {
boolean_factor_return retval = new boolean_factor_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
Token NOT5=null;
predica... | Create a Java method that does the following: "Use this method to perform a boolean factor operation". |
Of course, here is the Java code you requested:
```java
private String generateOptionalSafeTagsArg(List<? extends TargetExpr> args) {
String optionalSafeTagsArg = "";
if (!args.isEmpty()) {
// TODO(msamuel): Instead of parsing generated JS, we should have a CheckArgumentsPass that
// allows directi... | Create a Java method that does the following: "Generate the optional Safe Tags argument.". |
Of course, here is the Java code you requested:
```java
public Set<NFAState<T>> epsilonClosure(Scope<DFAState<T>> scope)
{
Set<NFAState<T>> set = new HashSet<>();
set.add(this);
return epsilonClosure(scope, set);
}
```
Hope this helps! | Create a Java method that does the following: "Returns a set of NFAState objects that are not part of the DFA.". |
Of course, here is the Java code you requested:
```java
public void write(MessageBodyWriterContext context) throws IOException, WebApplicationException {
Object encoding = context.getHeaders().getFirst(HttpHeaders.CONTENT_ENCODING);
if (encoding != null && encoding.toString().equalsIgnoreCase("lzf")) ... | Create a Java method that does the following: "Write the message body to the output stream.". |
Of course, here is the Java code you requested:
```java
public void setupSFields()
{
this.getRecord(ProjectTask.PROJECT_TASK_FILE).getField(ProjectTask.NAME).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
}
``... | Create a Java method that does the following: "Set up the SFields method.". |
Of course, here is the Java code you requested:
```java
public static JedisPool newJedisPool(String hostAndPort, String password) {
return newJedisPool(defaultJedisPoolConfig(), hostAndPort, password);
}
```
Hope this helps! | Create a Java method that does the following: "Create a new JedisPool with the specified host and port and password.". |
Of course, here is the Java code you requested:
```java
public static <I, O> ListenableFuture<O> transform(ListenableFuture<I> input,
AsyncFunction<? super I, ? extends O> function,
Executor executor) {
checkNotNull(executor);
ChainingListenableFuture<I, O> output =
new ChainingListenableFu... | Create a Java method that does the following: "Transform a ListenableFuture to a ChainingListenableFuture.". |
Of course, here is the Java code you requested:
```java
public static AeronNDArrayResponder startSubscriber(Aeron aeron, String host, int port, NDArrayHolder callback,
int streamId) {
if (callback == null)
throw new IllegalArgumentException("NDArrayHolder must be specified");
... | Create a Java method that does the following: "Start a new NDArrayResponder instance". |
Of course, here is the Java code you requested:
```java
public final Connection getConnection() throws SQLException {
final Timer.Context ctx = acquisitions.time();
try {
Connection conn;
for(int i = 0; i < activeSegments; i++) {
conn = segments[i].open();
if(co... | Create a Java method that does the following: "Get a connection from the connection pool.". |
Of course, here is the Java code you requested:
```java
public void marshall(AttachObjectRequest attachObjectRequest, ProtocolMarshaller protocolMarshaller) {
if (attachObjectRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | Create a Java method that does the following: "marshalls the given AttachObjectRequest to the given protocolMarshaller.". |
Of course, here is the Java code you requested:
```java
public RequestToken retrieveAccessToken(RequestToken token, String verifier) {
OAuthConsumer consumer = new DefaultOAuthConsumer(info.key.key, info.key.secret);
consumer.setTokenWithSecret(token.token, token.secret);
try {
prov... | Create a Java method that does the following: "Retrieve an access token from the provider.". |
Of course, here is the Java code you requested:
```java
public RetResult<String> getMPOpenidByCode(String code) throws IOException {
if (code != null) code = code.replace("\"", "").replace("'", "");
String url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + appid + "&secret=" + appsecr... | Create a Java method that does the following: "Get the openid from a code". |
Of course, here is the Java code you requested:
```java
public void writeFloat(float value) throws UnsupportedEncodingException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeFloat", new Float(value));
getBodyList().add(new Float(value));
if (TraceComponent.i... | Create a Java method that does the following: "Method writeFloat.". |
Of course, here is the Java code you requested:
```java
public double optDouble(String key, double defaultValue) {
Number val = this.optNumber(key);
if (val == null) {
return defaultValue;
}
final double doubleValue = val.doubleValue();
// if (Double.isNaN(doubleValu... | Create a Java method that does the following: "Get a property as a double.". |
Of course, here is the Java code you requested:
```java
@Override
public Response createApplication( Application app ) {
this.logger.fine( "Request: create application " + app + "." );
Response result;
try {
String tplName = app.getTemplate() == null ? null : app.getTemplate().getName();
String tplQualif... | Create a Java method that does the following: "Create an application.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
<T> void processBean(@Observes ProcessBean<T> processBean) {
Bean<T> bean = processBean.getBean();
for (Type type : bean.getTypes()) {
if (!(type instanceof Class<?>)) {
continue;
... | Create a Java method that does the following: "Process a single bean.". |
Of course, here is the Java code you requested:
```java
public boolean isExcluded(String endpoint) {
for (int i = 0; i < exclusions.size(); i++) {
if (exclusions.get(i).test(endpoint)) {
return true;
}
}
return false;
}
```
Hope this helps! | Create a Java method that does the following: "Is the specified endpoint excluded from the source.". |
Of course, here is the Java code you requested:
```java
public <K> JavaPairRDD<K, Double> scoreExamplesMultiDataSet(JavaPairRDD<K, MultiDataSet> data,
boolean includeRegularizationTerms, int batchSize) {
return data.mapPartitionsToPair(new ScoreExamplesWithKeyFunction<K>(sc.broadcast(networ... | Create a Java method that does the following: "Score examples using MultiDataSet". |
Of course, here is the Java code you requested:
```java
@Override
public CreateNetworkInterfacePermissionResult createNetworkInterfacePermission(CreateNetworkInterfacePermissionRequest request) {
request = beforeClientExecution(request);
return executeCreateNetworkInterfacePermission(request);
... | Create a Java method that does the following: "Creates an interface control permission.". |
Of course, here is the Java code you requested:
```java
@Override
public void accept(Visitor<Operator<?>> visitor) {
if (visitor.preVisit(this)) {
this.input.accept(visitor);
for (Operator<?> c : this.broadcastInputs.values()) {
c.accept(visitor);
}
visitor.postVisit(this);
}
}
```
Hope this hel... | Create a Java method that does the following: "Visit this operator.". |
Of course, here is the Java code you requested:
```java
public List<String> getJavas(SlaveComputer computer, TaskListener listener, Connection connection) {
return getJavas(listener,connection);
}
```
Hope this helps! | Create a Java method that does the following: "Get the avas list.". |
Of course, here is the Java code you requested:
```java
public EmbedBuilder setThumbnail(BufferedImage thumbnail, String fileType) {
delegate.setThumbnail(thumbnail, fileType);
return this;
}
```
Hope this helps! | Create a Java method that does the following: "Sets the thumbnail of the embed.". |
Of course, here is the Java code you requested:
```java
public void setMetaDataSlotService(MetaDataSlotService slotService) {
JaxWsMetaDataManager.jaxwsApplicationSlot = slotService.reserveMetaDataSlot(ApplicationMetaData.class);
JaxWsMetaDataManager.jaxwsModuleSlot = slotService.reserveMetaDataSlot(Mo... | Create a Java method that does the following: "setMetaDataSlotService This method is called to set the MetaDataSlotService for the application and module metadata slots.". |
Of course, here is the Java code you requested:
```java
@Override
protected void beforePolling() throws IOException {
// Don't rotate if we are not running
if (isRunning &&
(writer.getLength() > maxFileSize ||
System.currentTimeMillis() > nextRotation)) {
... | Create a Java method that does the following: "This method is called before polling the file.". |
Of course, here is the Java code you requested:
```java
byte[][] rawKeys(K key, Collection<K> keys) {
final byte[][] rawKeys = new byte[keys.size() + (key != null ? 1 : 0)][];
int i = 0;
if (key != null) {
rawKeys[i++] = rawKey(key);
}
for (K k : keys) {
... | Create a Java method that does the following: "Get the raw keys.". |
Of course, here is the Java code you requested:
```java
public Observable<Void> rebootWorkerAsync(String resourceGroupName, String name, String workerName) {
return rebootWorkerWithServiceResponseAsync(resourceGroupName, name, workerName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
... | Create a Java method that does the following: "Reboot a worker. Reboots an existing CDN image.". |
Of course, here is the Java code you requested:
```java
@Override
public ODocument toStream() {
acquireExclusiveLock();
try {
document.setInternalStatus(ORecordElement.STATUS.UNMARSHALLING);
try {
final ORecordTrackedSet idxs = new ORecordTrackedSet(document);
for (fina... | Create a Java method that does the following: "Returns a new ODocument object containing the data of the records in this document.". |
Of course, here is the Java code you requested:
```java
public static <T extends MethodDescription> ElementMatcher.Junction<T> isConstructor() {
return new MethodSortMatcher<T>(MethodSortMatcher.Sort.CONSTRUCTOR);
}
```
Hope this helps! | Create a Java method that does the following: "Matches a constructor method.". |
Of course, here is the Java code you requested:
```java
public static void retrieveCloudmadeKey(final Context aContext) {
mAndroidId = Settings.Secure.getString(aContext.getContentResolver(), Settings.Secure.ANDROID_ID);
// get the key from the manifest
mKey = ManifestUtil.retrieveKey(aContext, CLOUDMADE_KEY);... | Create a Java method that does the following: "Retrieve the cloudmade key from the manifest.". |
Of course, here is the Java code you requested:
```java
public void onProfileUpdate() {
commentAdapter.notifyDataSetChanged();
if(commentEntrySlider != null) {
commentEntrySlider.updateContent();
}
if(notifyBox != null) {
try {
UserSettings user = userUtils.getUserSettings(getContext());
if(u... | Create a Java method that does the following: "Called when the profile is updated.". |
Of course, here is the Java code you requested:
```java
public WizardPage addForm(Form formPage) {
Assert.notNull(formPage, "The form page cannot be null");
WizardPage page = new FormBackedWizardPage(formPage, !autoConfigureChildPages);
addPage(page);
return page;
}
```
Hope this h... | Create a Java method that does the following: "Add a form to the page set.". |
Of course, here is the Java code you requested:
```java
static String getJndiName(final ModelNode modelNode, OperationContext context) throws OperationFailedException {
final String rawJndiName = MailSessionDefinition.JNDI_NAME.resolveModelAttribute(context, modelNode).asString();
return getJndiName(ra... | Create a Java method that does the following: "Get the name of the domain name.". |
Of course, here is the Java code you requested:
```java
public void setAcceptLanguage(Locale locale) {
checkCommitted();
AcceptLanguageHeader alh = SipFactoryImpl.headerFactory
.createAcceptLanguageHeader(locale);
this.message.setHeader(alh);
}
```
Hope this helps! | Create a Java method that does the following: "Sets the Accept - Language header for this message.". |
Of course, here is the Java code you requested:
```java
public static boolean isScOk(HttpResponse response) {
return response != null && response.getStatusLine()!= null &&
response.getStatusLine().getStatusCode() == HttpStatus.SC_OK;
}
```
Hope this helps! | Create a Java method that does the following: "Checks if the response is a HTTP 200 status code.". |
Of course, here is the Java code you requested:
```java
public int[] getNonZeroIndices() {
int[] nz = new int[negativeDimensions.length
+ positiveDimensions.length];
System.arraycopy(negativeDimensions, 0, nz,
0, negativeDimensions.length);
... | Create a Java method that does the following: "Get the non - zero indices of the image.". |
Of course, here is the Java code you requested:
```java
public CoinbasePrice getCoinbaseSellPrice(BigDecimal quantity, String currency)
throws IOException {
return coinbase.getSellPrice(quantity, currency);
}
```
Hope this helps! | Create a Java method that does the following: "Get the sell price of a single quantity.". |
Of course, here is the Java code you requested:
```java
public void trace(String msg) {
if (logger.isLoggable(Level.FINEST)) {
log(SELF, Level.FINEST, msg, null);
}
}
```
Hope this helps! | Create a Java method that does the following: "Log a message at the TRACE level.". |
Of course, here is the Java code you requested:
```java
public void setPreparedStatementParameterSetter(final PreparedStatementParameterSetter preparedStatementParameterSetter) {
if (entities.size() > 0) {
throw new IllegalStateException("The PreparedStatement parameter setter cannot be changed a... | Create a Java method that does the following: "Sets the PreparedStatementParameterSetter for the entity.". |
Of course, here is the Java code you requested:
```java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
br_configuresyslog_responses result = (br_configuresyslog_responses) service.get_payload_formatter().string_to_resource(br_configuresyslog_responses.... | 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
public void applyViewOptions() {
setMainToolbarVisible(options.getViewParam().isShowMainToolbar());
setWorkbenchLayout(WorkbenchPanel.Layout.getLayout(options.getViewParam().getDisplayOption()));
WorkbenchPanel.ResponsePanelPosition position = Workbe... | Create a Java method that does the following: "Apply the view options.". |
Of course, here is the Java code you requested:
```java
public ItemResponse withEventsItemResponse(java.util.Map<String, EventItemResponse> eventsItemResponse) {
setEventsItemResponse(eventsItemResponse);
return this;
}
```
Hope this helps! | Create a Java method that does the following: "Sets the eventsItemResponse for the item.". |
Of course, here is the Java code you requested:
```java
public void setAttribute(String domainName, String beanName, String attrName, Object value) throws Exception {
setAttribute(ObjectNameUtil.makeObjectName(domainName, beanName), attrName, value);
}
```
Hope this helps! | Create a Java method that does the following: "Sets the value of an attribute on the specified object.". |
Of course, here is the Java code you requested:
```java
private void processCallback(final Callback callback) {
try {
JsonNode result = handleCallback(callback);
this.getClient().completeCallback(callback, null, result);
} catch (JsiiException e) {
this.getClient().c... | Create a Java method that does the following: "Process a callback.". |
Of course, here is the Java code you requested:
```java
public Optional<Tree<T>> removeFromParent() {
Tree<T> theParent = this.parent;
if (parent != null) {
parent.remove(this);
}
return Optional.ofNullable(theParent);
}
```
Hope this helps! | Create a Java method that does the following: "Removes this node from its parent.". |
Of course, here is the Java code you requested:
```java
private void outputIndexEntry(final IndexTerm term, final XMLStreamWriter serializer) throws XMLStreamException {
final List<IndexTermTarget> targets = term.getTargetList();
boolean foundIndexTerm = false;
boolean foundIndexsee = false;
... | Create a Java method that does the following: "Output an index entry.". |
Of course, here is the Java code you requested:
```java
public DomainMappingBuilder<V> add(String hostname, V output) {
builder.add(hostname, output);
return this;
}
```
Hope this helps! | Create a Java method that does the following: "Add a new domain mapping to the domain mapping.". |
Of course, here is the Java code you requested:
```java
private JsonNode invokeCallbackMethod(final InvokeRequest req, final String cookie) {
Object obj = this.getObject(req.getObjref());
Method method = this.findCallbackMethod(obj.getClass(), cookie);
final Class<?>[] argTypes = method.getPar... | Create a Java method that does the following: "Invoke a callback method.". |
Of course, here is the Java code you requested:
```java
private static Set<String> findPossibleCatchSignatures(List<CatchInfo> infos, int pc) {
Set<String> catchTypes = new HashSet<>(6);
ListIterator<CatchInfo> it = infos.listIterator(infos.size());
while (it.hasPrevious()) {
CatchI... | Create a Java method that does the following: "Find possible catch signatures for a given pc.". |
Of course, here is the Java code you requested:
```java
public ParSeqRestClient build() {
if (_inboundRequestContextFinder == null) {
LOGGER.debug("InboundRequestContextFinder not specified, using default one");
}
InboundRequestContextFinder inboundRequestContextFinder = _inboundRequestContextFinder... | Create a Java method that does the following: "Build the REST client.". |
Of course, here is the Java code you requested:
```java
public void setCanvas(PdfContentByte canvas) {
this.canvas = canvas;
this.canvases = null;
if (compositeColumn != null)
compositeColumn.setCanvas(canvas);
}
```
Hope this helps! | Create a Java method that does the following: "Sets the canvas.". |
Of course, here is the Java code you requested:
```java
protected BufferedImage createPostsImage(final int WIDTH, BufferedImage image, final PostPosition... POSITIONS) {
if (WIDTH <= 0) {
return UTIL.createImage(1, 1, Transparency.TRANSLUCENT);
}
if (image == null) {
im... | Create a Java method that does the following: "Create the image for the posts.". |
Of course, here is the Java code you requested:
```java
@Override
public GetConferenceProviderResult getConferenceProvider(GetConferenceProviderRequest request) {
request = beforeClientExecution(request);
return executeGetConferenceProvider(request);
}
```
Hope this helps! | Create a Java method that does the following: "Returns information about a conference provider.". |
Of course, here is the Java code you requested:
```java
public final EObject ruleJvmFormalParameter() throws RecognitionException {
EObject current = null;
EObject lv_parameterType_0_0 = null;
AntlrDatatypeRuleToken lv_name_1_0 = null;
enterRule();
try {
// In... | Create a Java method that does the following: "Use to enter the grammarAccess before processing the rule.". |
Of course, here is the Java code you requested:
```java
public static String getEncAlgFromSigAlg(String signatureAlgorithm) {
signatureAlgorithm = signatureAlgorithm.toUpperCase(Locale.ENGLISH);
int with = signatureAlgorithm.indexOf("WITH");
String keyAlgorithm = null;
if (with > 0) {
... | Create a Java method that does the following: "Get the encAlg from the signature algorithm.". |
Of course, here is the Java code you requested:
```java
public void setUrl(final String url) {
String currUrl = getUrl();
if (!Objects.equals(url, currUrl)) {
getOrCreateComponentModel().url = url;
}
}
```
Hope this helps! | Create a Java method that does the following: "Sets the url of the page.". |
Of course, here is the Java code you requested:
```java
public static float outputScore(Model model, float[] modelFeatureValuesNormalized) {
final INDArray input = Nd4j.create(new float[][]{ modelFeatureValuesNormalized });
final INDArray output = NetworkUtils.output(model, input);
return output.getFloat(0... | Create a Java method that does the following: "Returns the output score of a model". |
Of course, here is the Java code you requested:
```java
public void setInitializer(/* @Nullable */ JvmField field, /* @Nullable */ StringConcatenationClient strategy) {
if (field == null || strategy == null)
return;
removeExistingBody(field);
setCompilationStrategy(field, strategy);
}
```
Hope this helps! | Create a Java method that does the following: "Set the initializer for the given field.". |
Of course, here is the Java code you requested:
```java
public OperationStatus deleteCustomEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) {
return deleteCustomEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).toBlocking().single().body();
}
```
Hope this helps! | Create a Java method that does the following: "Deletes an entity role from an App App.". |
Of course, here is the Java code you requested:
```java
public static String formatByteSize(double size) {
String unit = null;
if (size > 1.0e15) {
unit = "Pbytes";
size *= 1.0e-15;
} else if (size > 1.0e12) {
unit = "Tbytes";
size *= 1.0e-12;
} else if (size > 1.0e9) {
un... | Create a Java method that does the following: "Format a byte size.". |
Of course, here is the Java code you requested:
```java
public static <T> void isNotEquals( final T argument,
String argumentName,
final T object,
String objectName ) {
if (argument == null) ... | Create a Java method that does the following: "Check if two objects are not equals.". |
Of course, here is the Java code you requested:
```java
public ServiceRefType<MessageDrivenBeanType<T>> getOrCreateServiceRef()
{
List<Node> nodeList = childNode.get("service-ref");
if (nodeList != null && nodeList.size() > 0)
{
return new ServiceRefTypeImpl<MessageDrivenBeanType<T>>(thi... | Create a Java method that does the following: "Gets the service - ref.". |
Of course, here is the Java code you requested:
```java
private void sendAndReceiveImpl(HttpMessage message, HttpRequestConfig requestConfig) throws IOException {
if (log.isDebugEnabled()) {
log.debug("Sending " + message.getRequestHeader().getMethod() + " " + message.getRequestHeader().getURI())... | Create a Java method that does the following: "Sends and receive the HTTP message using the HTTP message and the request config.". |
Of course, here is the Java code you requested:
```java
private SpdLong getSpdLong() {
myValue.reset(false);
for (int i = 0; i < members.size(); i++) {
Object member = members.get(i);
if (member == null)
continue;
if (member instanceof SpdLong) {
... | Create a Java method that does the following: "get the value of the SpdLong". |
Of course, here is the Java code you requested:
```java
private BufferedImage to24Bit3ComponentRGB(int[][] decoded, int width, int height) {
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR);
byte[] imageBuffer = ((DataBufferByte) image.getRaster().getDataBuffer()).ge... | Create a Java method that does the following: "To 24 Bit 3 component RGB image.". |
Of course, here is the Java code you requested:
```java
public static MissingAuthorizationDto fromInfo(MissingAuthorization info) {
MissingAuthorizationDto dto = new MissingAuthorizationDto();
dto.setPermissionName(info.getViolatedPermissionName());
dto.setResourceId(info.getResourceId());
dto.setReso... | Create a Java method that does the following: "Creates a MissingAuthorizationDto from a MissingAuthorization object.". |
Of course, here is the Java code you requested:
```java
private static int discardWhitespace(byte[] data)
{
final int length = data.length;
int i = 0;
while (i < length)
{
byte c = data[i++];
if (c == (byte) ' ' || c == (byte) '\n' || c == (byte) '\r'
|| c == (byte) '\t')
{
int count = i - 1... | Create a Java method that does the following: "Discard whitespace.". |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.