code stringlengths 146 69.7k | prompt stringlengths 55 1.5k |
|---|---|
Of course, here is the Java code you requested:
```java
private RaConnector mergeConnectors(RaConnector rxConnector, RaConnector annoConnector) {
final boolean trace = TraceComponent.isAnyTracingEnabled();
RaResourceAdapter rxRa = rxConnector.getResourceAdapter();
boolean useRxOra = false;
... | Create a Java method that does the following: "Merge the connectors.". |
Of course, here is the Java code you requested:
```java
public static Object getFieldValue(Object bean, String fieldName)
throws IllegalAccessException {
Assert.notNull(bean, "Bean cannot be null");
Assert.hasText(fieldName, "Field name required");
String[] nestedFields = StringUtils.tokenizeToStringArray(fie... | Create a Java method that does the following: "Gets the value of the specified field from the specified bean.". |
Of course, here is the Java code you requested:
```java
public static void runExample(
AdManagerServices adManagerServices,
AdManagerSession session,
long numberCustomFieldId,
long customFieldOptionId,
long lineItemId)
throws RemoteException {
// Get the CustomFieldService.
... | Create a Java method that does the following: "Example of creating a CID .". |
Of course, here is the Java code you requested:
```java
public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException {
if (!authenticator.authenticate(request)) {
response.setHeader("WWW-Authenticate",HttpServletRequest.BASIC_AUTH + " realm=\""+realm+"\... | Create a Java method that does the following: "Handle the security request.". |
Of course, here is the Java code you requested:
```java
private final int load_exponent(StringBuilder sb) throws IOException
{
int c = read_char();
if (c == '-' || c == '+') {
sb.append((char)c);
c = read_char();
}
c = load_digits(sb, c);
if (c == '.... | Create a Java method that does the following: "Load an exception message from the stream.". |
Of course, here is the Java code you requested:
```java
private IndexSearchDescriptor buildIndexSearchDescriptorForFulltext(OCommandContext ctx, OIndex<?> index, OAndBlock block, OClass clazz) {
List<String> indexFields = index.getDefinition().getFields();
OBinaryCondition keyCondition = new OBinaryCondition(-... | Create a Java method that does the following: "Build the index search descriptor for fulltext.". |
Of course, here is the Java code you requested:
```java
public static FileChannel open(FileDescriptor fd, String path,
boolean readable, boolean writable,
Object parent)
{
return new FileChannelImpl(fd, path, readable, writable, false, p... | Create a Java method that does the following: "Create a new FileChannel object.". |
Of course, here is the Java code you requested:
```java
public JcString stringProperty(String name) {
JcString ret = new JcString(name, this, OPERATOR.PropertyContainer.PROPERTY_ACCESS);
QueryRecorder.recordInvocationConditional(this, "stringProperty", ret, QueryRecorder.literal(name));
return ret;
}
```
Hope ... | Create a Java method that does the following: "Create a new string property". |
Of course, here is the Java code you requested:
```java
public PagedList<JobStepInner> listByVersion(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName, final int jobVersion) {
ServiceResponse<Page<JobStepInner>> response = listByVersionSinglePageAsync(reso... | Create a Java method that does the following: "List all the job steps in a job version.". |
Of course, here is the Java code you requested:
```java
@Override
public Long lrem(final byte[] key, final long count, final byte[] value) {
checkIsInMultiOrPipeline();
client.lrem(key, count, value);
return client.getIntegerReply();
}
```
Hope this helps! | Create a Java method that does the following: "Remove count elements from a key.". |
Of course, here is the Java code you requested:
```java
private boolean loadPage() {
Collection<T> list;
if( pages.size() <= pageIndex ) {
return false;
}
list = pages.get(pageIndex);
currentPage = list.iterator();
return true;
}
```
Hope this helps! | Create a Java method that does the following: "Load the page.". |
Of course, here is the Java code you requested:
```java
@Override
public void writeAttribute(String localName, String value)
throws XMLStreamException
{
// No need to set mAnyOutput, nor close the element
if (!mStartElementOpen && mCheckStructure) {
reportNwfStructure(ErrorC... | Create a Java method that does the following: "Write an attribute.". |
Of course, here is the Java code you requested:
```java
public java.util.List<String> getSnapshotArns() {
if (snapshotArns == null) {
snapshotArns = new com.amazonaws.internal.SdkInternalList<String>();
}
return snapshotArns;
}
```
Hope this helps! | Create a Java method that does the following: "Gets the value of the snapshotArns property.". |
Of course, here is the Java code you requested:
```java
public static <I extends ScoreIter> XYCurve materializeROC(Predicate<? super I> predicate, I iter) {
int poscnt = 0, negcnt = 0;
XYCurve curve = new XYCurve("False Positive Rate", "True Positive Rate");
// start in bottom left
curve.add(0.0, 0.0)... | Create a Java method that does the following: "Materialize the ROC curve.". |
Of course, here is the Java code you requested:
```java
public void write(DataOutput out) throws IOException {
out.writeBoolean(corrupt);
out.writeLong(offset);
b.write(out);
out.writeInt(locs.length);
for (int i = 0; i < locs.length; i++) {
locs[i].write(out);
}
}
```
Hope this helps! | Create a Java method that does the following: "Write the sequence of data to the output stream.". |
Of course, here is the Java code you requested:
```java
public static IndexedTriangleMesh toIndexed(TriangleMesh mesh) {
if (mesh instanceof IndexedTriangleMesh) return (IndexedTriangleMesh)mesh;
if (mesh instanceof PointList) return new TriangleSetImpl((PointList)mesh);
TriangleListIterator iterator = mesh.iter... | Create a Java method that does the following: "Convert a TriangleMesh to an indexed triangle mesh.". |
Of course, here is the Java code you requested:
```java
public double getValue(double x)
{
synchronized(interpolatingRationalFunctionsLazyInitLock) {
if(interpolatingRationalFunctions == null) {
doCreateRationalFunctions();
}
}
// Get interpolating rational function for the given point x
int pointI... | Create a Java method that does the following: "Gets the value of the curve using the specified x - coordinate.". |
Of course, here is the Java code you requested:
```java
@Override
public void negate(T t1) {
this.x = -t1.ix();
this.y = -t1.iy();
this.z = -t1.iz();
}
```
Hope this helps! | Create a Java method that does the following: "Negate the components of the specified element.". |
Of course, here is the Java code you requested:
```java
public Container pack(List<BoxItem> boxes, List<Container> containers, long deadline) {
return pack(boxes, containers, deadLinePredicate(deadline));
}
```
Hope this helps! | Create a Java method that does the following: "Packs a list of boxes into a container.". |
Of course, here is the Java code you requested:
```java
public CreateProjectRequest withSecondarySources(ProjectSource... secondarySources) {
if (this.secondarySources == null) {
setSecondarySources(new java.util.ArrayList<ProjectSource>(secondarySources.length));
}
for (ProjectSour... | Create a Java method that does the following: "A list of project sources to be created.". |
Of course, here is the Java code you requested:
```java
public static int ntz(int val) {
// This implementation does a single binary search at the top level only.
// In addition, the case of a non-zero first byte is checked for first
// because it is the most common in dense bit arrays.
int lowByte = ... | Create a Java method that does the following: "Returns the NTZ value of the given value.". |
Of course, here is the Java code you requested:
```java
@Override
public Date getConvertedValue() {
String dateStr = this.getFirstValue();
if (dateStr != null && !dateStr.trim().isEmpty()) {
dateStr = dateStr.trim();
try {
return dateFormat.parse(date... | Create a Java method that does the following: "Returns the converted value of the
field.". |
Of course, here is the Java code you requested:
```java
public void restartable(int restartableId, Func0<Subscription> factory) {
restartables.put(restartableId, factory);
if (requested.contains(restartableId))
start(restartableId);
}
```
Hope this helps! | Create a Java method that does the following: "Restart a single topic.". |
Of course, here is the Java code you requested:
```java
private String mergeConfigValue(String key, Set<String> corpora,
CorpusConfigMap corpusConfigurations)
{
Set<String> values = new TreeSet<>();
for(String corpus : corpora)
{
CorpusConfig config = corpusConfigurations.get(corpus);
if(... | Create a Java method that does the following: "Merge the config value for a single key". |
Of course, here is the Java code you requested:
```java
@Override
public boolean isFeatureOrTileTable(String table) {
boolean isType = false;
Contents contents = getTableContents(table);
if (contents != null) {
ContentsDataType dataType = contents.getDataType();
isType = dataType != null
&& (dataType... | Create a Java method that does the following: "Returns true if the table is a feature or tile table.". |
Of course, here is the Java code you requested:
```java
private double convertMaturity(int maturityInMonths) {
Schedule schedule = fixMetaSchedule.generateSchedule(referenceDate, maturityInMonths, 12);
return schedule.getFixing(0);
}
```
Hope this helps! | Create a Java method that does the following: "Convert maturity in months to fixing". |
Of course, here is the Java code you requested:
```java
@Override
public void resolve(final ValueStack values) throws Exception
{
if (values.size() < 3)
throw new Exception("missing operands for " + toString());
final Object op3 = values.popWhatever();
final Object op2 = va... | Create a Java method that does the following: "Resolves the result of a
operation.". |
Of course, here is the Java code you requested:
```java
private static String prepareWindowsCommand(List<String> cmd, Map<String, String> childEnv) {
StringBuilder cmdline = new StringBuilder();
for (Map.Entry<String, String> e : childEnv.entrySet()) {
cmdline.append(String.format("set %s=%s", e.getKey()... | Create a Java method that does the following: "Prepare Windows command line for batch script execution.". |
Of course, here is the Java code you requested:
```java
public void setSIZE2(Integer newSIZE2) {
Integer oldSIZE2 = size2;
size2 = newSIZE2;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.IDE_STRUCTURE__SIZE2, oldSIZE2, size2));
}
```
Hope this helps! | Create a Java method that does the following: "Sets the size2 value.". |
Of course, here is the Java code you requested:
```java
@UsedByApp
public void bindDialogs(JsDisplayListCallback<JsDialog> callback) {
if (callback == null) {
return;
}
messenger.getSharedDialogList().subscribe(callback, false);
}
```
Hope this helps! | Create a Java method that does the following: "Bind dialogs to the shared dialog list.". |
Of course, here is the Java code you requested:
```java
public final void synpred25_InternalXbase_fragment() throws RecognitionException {
// InternalXbase.g:2195:2: ( ( ( rule__OpOther__Group_6_1_0__0 ) ) )
// InternalXbase.g:2195:2: ( ( rule__OpOther__Group_6_1_0__0 ) )
{
// Intern... | Create a Java method that does the following: "start synpred25_InternalXbase". |
Of course, here is the Java code you requested:
```java
public float getFloat(String key) {
if (containsKey(key)) {
return Float.parseFloat(get(key));
} else {
throw new IllegalArgumentException("Missing key " + key + ".");
}
}
```
Hope this helps! | Create a Java method that does the following: "Get the float value for the specified key.". |
Of course, here is the Java code you requested:
```java
public static boolean canInteract(User issuer, Emote emote, MessageChannel channel, boolean botOverride)
{
Checks.notNull(issuer, "Issuer Member");
Checks.notNull(emote, "Target Emote");
Checks.notNull(channel, "Target Channel");
... | Create a Java method that does the following: "Checks if the user can interact with the specified message channel.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
@FFDCIgnore(Exception.class)
public static Collection<String> parseStringCollection(String propertyKey, Object obj, Collection<String> defaultValue) {
if (obj != null) {
try {
if (obj inst... | Create a Java method that does the following: "Parse a Collection of Strings from a object.". |
Of course, here is the Java code you requested:
```java
public static X509Certificate[] loadCertificates(String file)
throws IOException, GeneralSecurityException {
if (file == null) {
throw new IllegalArgumentException("Certificate file is null");
//i18n
// ... | Create a Java method that does the following: "Load certificates from a file.". |
Of course, here is the Java code you requested:
```java
public void start() {
Thread thread = new Thread(new LogCatCommandExecutor());
thread.setName(getClass().getSimpleName() + " logcat for " + device.getSerialNumber());
thread.start();
try {
sleep(500); // ignore old out... | Create a Java method that does the following: "Start the logcat command shell". |
Of course, here is the Java code you requested:
```java
public static base_response add(nitro_service client, dnszone resource) throws Exception {
dnszone addresource = new dnszone();
addresource.zonename = resource.zonename;
addresource.proxymode = resource.proxymode;
addresource.dnssecoffload = resource.dnss... | Create a Java method that does the following: "Use this API to add dnszone.". |
Of course, here is the Java code you requested:
```java
public boolean nextKey() throws IOException
{
// first element (or empty)
if (this.current == null) {
if (this.done) {
this.valuesIterator = null;
return false;
}
this.current = this.serializer.createInstance();
if ((this.current = this.i... | Create a Java method that does the following: "Returns true if there is a key in the input stream.". |
Of course, here is the Java code you requested:
```java
public String newId() {
String res = getEntity(invokeGet("utils/newid", null), String.class);
return res != null ? res : "";
}
```
Hope this helps! | Create a Java method that does the following: "Returns a new ID for the current user.". |
Of course, here is the Java code you requested:
```java
private int _countConsecutiveChars (final char ch)
{
int nCount = 0;
for (int i = 0; i < m_sValue.length (); i++)
{
final char c = m_sValue.charAt (i);
if (c != ' ')
{
if (c != ch)
return 0;
nCount++;
... | Create a Java method that does the following: "Count consecutive chars.". |
Of course, here is the Java code you requested:
```java
@Override
public boolean checkSessionStillValid(ISession s, long accessedTime) {
final String methodName = "checkSessionStillValid";
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.F... | Create a Java method that does the following: "checkSessionStillValid This method checks if the session is still valid". |
Of course, here is the Java code you requested:
```java
public final static String getDefaultType() {
String cpvtype =
AccessController.doPrivileged(new PrivilegedAction<String>() {
public String run() {
return Security.getProperty(CPV_TYPE);
}
... | Create a Java method that does the following: "Get the default type of the class.". |
Of course, here is the Java code you requested:
```java
@Override
public CreateSkillGroupResult createSkillGroup(CreateSkillGroupRequest request) {
request = beforeClientExecution(request);
return executeCreateSkillGroup(request);
}
```
Hope this helps! | Create a Java method that does the following: "Creates a skill group.". |
Of course, here is the Java code you requested:
```java
public ActionDefinition addBehavior(ActionDefinitionBehaviorComponent t) { //3
if (t == null)
return this;
if (this.behavior == null)
this.behavior = new ArrayList<ActionDefinitionBehaviorComponent>();
this.behavior.add(t);
... | Create a Java method that does the following: "Add a behavior to the action definition.". |
Of course, here is the Java code you requested:
```java
public boolean isProcessingRegionRelated() {
if (guiHints != null) {
if (guiHints.contains(HMConstants.PROCESS_NORTH_UI_HINT) || //
guiHints.contains(HMConstants.PROCESS_SOUTH_UI_HINT) || //
guiHints.con... | Create a Java method that does the following: "Checks if processing region related.". |
Of course, here is the Java code you requested:
```java
protected static int getIntSetting(Map<String, Object> settings, String key, int defaultVal) throws IllegalArgumentException {
if (settings.containsKey(key)) {
final Object objectValue = settings.get(key);
if (objectValue == null) {
throw new IllegalA... | Create a Java method that does the following: "Get an integer value from a map of settings.". |
Of course, here is the Java code you requested:
```java
public Reference addSlot() { //3
Reference t = new Reference();
if (this.slot == null)
this.slot = new ArrayList<Reference>();
this.slot.add(t);
return t;
}
```
Hope this helps! | Create a Java method that does the following: "Add this reference to the slot list.". |
Of course, here is the Java code you requested:
```java
@Deprecated
public static void monitor(MeterRegistry registry, EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, String... tags) {
monitor(registry, entityManagerFactory, entityManagerFactoryName, Tags.of(tags));
}
```
H... | Create a Java method that does the following: "Monitor a managed entity factory using the specified tags.". |
Of course, here is the Java code you requested:
```java
public static Properties loadProperties(InputStream inputStream) {
Properties prop = new Properties();
try {
prop.load(inputStream);
} catch (IOException e) {
throw E.ioException(e);
} finally {
... | Create a Java method that does the following: "Load a Properties from an input stream.". |
Of course, here is the Java code you requested:
```java
public static List<Character> parserCharacterList(JsonPullParser parser) throws IOException,
JsonFormatException {
State eventType = parser.getEventType();
if (eventType == State.VALUE_NULL) {
return null;
}
if (eventType != State.START_ARRAY) {
... | Create a Java method that does the following: "Parses the current token as a list of characters.". |
Of course, here is the Java code you requested:
```java
static Intent createIntent(Context context, int jobId, boolean exact, @Nullable Bundle transientExtras) {
Intent intent = new Intent(context, PlatformAlarmReceiver.class).putExtra(EXTRA_JOB_ID, jobId).putExtra(EXTRA_JOB_EXACT, exact);
if (transien... | Create a Java method that does the following: "Create an intent to launch the platform alarm.". |
Of course, here is the Java code you requested:
```java
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AfplibPackage.CPIRG__GCGID:
return GCGID_EDEFAULT == null ? gcgid != null : !GCGID_EDEFAULT.equals(gcgid);
case AfplibPackage.CPIRG__PRT_FLAGS:
return PRT_FLAGS_EDEFAULT =... | Create a Java method that does the following: "Override the eIsSet method to check if the feature is set". |
Of course, here is the Java code you requested:
```java
public static Object invokeMethod(
Object object,
String methodName,
Object[] args)
throws
NoSuchMethodException,
IllegalAccessException,
InvocationTargetException {
... | Create a Java method that does the following: "This method is a convenience method for invoking a method with a number of arguments.". |
Of course, here is the Java code you requested:
```java
public boolean isSameRM(XAResource resource) throws XAException
{
if (overrideRmValue != null)
{
if (log.isTraceEnabled())
{
log.trace("Executing isSameRM with override value" + overrideRmValue + " for XAResourceWrappe... | Create a Java method that does the following: "Method isSameRM.". |
Of course, here is the Java code you requested:
```java
public void setValueDefinitionMatchOperator(
ValueDefinitionMatchOperator valueDefinitionMatchOperator) {
if (valueDefinitionMatchOperator == null) {
this.valueDefinitionMatchOperator =
ValueDefinitionMatchOpera... | Create a Java method that does the following: "Sets the valueDefinitionMatchOperator property.". |
Of course, here is the Java code you requested:
```java
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "removeACEs", scope = CreateRelationship.class)
public JAXBElement<CmisAccessControlListType> createCreateRelationshipRemoveACEs(
CmisAccessControlListType value) {
... | Create a Java method that does the following: "Create an instance of the JAXBElement required to remove the ACEs of the Create Relationship.". |
Of course, here is the Java code you requested:
```java
public String generate(int total, final int bad) {
if (total < 0) {
if (log.isDebugEnabled()) {
log.debug("Character string cannot have a negative length!");
}
total = 0;
}
Range[] ranges = getRanges();
int[] lengths = new int[ranges.... | Create a Java method that does the following: "Generates a random string of the specified length using the specified number of characters.". |
Of course, here is the Java code you requested:
```java
public boolean isLeap(long instant) {
int thisYear = iChronology.getYear(instant);
if (iChronology.isLeapYear(thisYear)) {
return (iChronology.getMonthOfYear(instant, thisYear) == iLeapMonth);
}
return false;
}
```
... | Create a Java method that does the following: "Is the specified time instant a leap calendar.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
private static void copyParamsToServerConfig() {
ServerConfig.createInstance();
for (String moduleName : INSTANCE.m_params.keySet()) {
Object moduleParams = INSTANCE.m_params.get(moduleName);
... | Create a Java method that does the following: "Copy params to server config.". |
Of course, here is the Java code you requested:
```java
private void init() throws IOException {
if (initialized.compareAndSet(false, true)) {
log.debug("Init: {}", mode);
// if the path is null, the consumer has been uninitialized
if (path != null) {
if... | Create a Java method that does the following: "Initializes the data stream.". |
Of course, here is the Java code you requested:
```java
@Override
public com.liferay.commerce.product.model.CPOptionCategory updateCPOptionCategory(
com.liferay.commerce.product.model.CPOptionCategory cpOptionCategory) {
return _cpOptionCategoryLocalService.updateCPOptionCategory(cpOptionCategory);
}
```
Hope t... | Create a Java method that does the following: "Updates the cp option category in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.". |
Of course, here is the Java code you requested:
```java
public static Single<Long> remove(String cacheKey, Object value) {
return remove(CacheService.CACHE_CONFIG_BEAN, cacheKey, value);
}
```
Hope this helps! | Create a Java method that does the following: "Remove the cache entry from cache.". |
Of course, here is the Java code you requested:
```java
public final String getSequenceCodec() {
String seqCodec = null;
if ("BIO".equals(this.sequenceCodec)) {
seqCodec = BioCodec.class.getName();
} else if ("BILOU".equals(this.sequenceCodec)) {
seqCodec = BilouCodec.class.getName();
}
... | Create a Java method that does the following: "Gets the sequence codec.". |
Of course, here is the Java code you requested:
```java
private Raster asByteRaster(final Raster raster, ColorModel colorModel) {
switch (raster.getTransferType()) {
case DataBuffer.TYPE_BYTE:
return raster;
case DataBuffer.TYPE_USHORT:
return raster; // ... | Create a Java method that does the following: "Converts a raster to a byte raster.". |
Of course, here is the Java code you requested:
```java
public void init() {
pocessorMap.clear();
//標準のフィールドプロセッサを登録する。
registerProcessor(XlsSheetName.class, new SheetNameProcessor());
registerProcessor(XlsCell.class, new CellProcessor());
registerProces... | Create a Java method that does the following: "Initialize the related processors.". |
Of course, here is the Java code you requested:
```java
public void start() throws Exception
{
Preconditions.checkState(state.compareAndSet(State.LATENT, State.STARTED), "Cannot be started more than once");
client.createContainers(queuePath);
getInitialQueues();
leaderLatch.start(... | Create a Java method that does the following: "Start the sequence of services.". |
Of course, here is the Java code you requested:
```java
public void prepareForTransition(@NonNull ViewGroup container, @Nullable View from, @Nullable View to, @NonNull Transition transition, boolean isPush, @NonNull OnTransitionPreparedListener onTransitionPreparedListener) {
onTransitionPreparedListener.onPre... | Create a Java method that does the following: "Prepare for transition.". |
Of course, here is the Java code you requested:
```java
public static boolean isAnnotationPresent(final Method method, final Class<? extends Annotation> annotationType) {
return method != null && method.isAnnotationPresent(annotationType);
}
```
Hope this helps! | Create a Java method that does the following: "Check if a method is annotated with the given annotation type.". |
Of course, here is the Java code you requested:
```java
private static void copyAllJars(String outputDir) throws IOException
{
File out = new File(outputDir);
String targetPath = out.getAbsolutePath() + File.separatorChar + "lib";
File current = new File(".");
String path = current.getCanon... | Create a Java method that does the following: "Copy all jars to the output directory". |
Of course, here is the Java code you requested:
```java
@Override
public DescribeRiskConfigurationResult describeRiskConfiguration(DescribeRiskConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDescribeRiskConfiguration(request);
}
```
Hope this helps! | Create a Java method that does the following: "Retrieves the description of an existing risk configuration.". |
Of course, here is the Java code you requested:
```java
private static void makeEnvelopes(Statement st, double tolerance, boolean isH2, int srid) throws SQLException {
st.execute("DROP TABLE IF EXISTS"+ PTS_TABLE + ";");
if (tolerance > 0) {
LOGGER.info("Calculating envelopes around coordin... | Create a Java method that does the following: "Create the envelopes table.". |
Of course, here is the Java code you requested:
```java
public final int getJdbcType(String type, int precision, int scale) throws DialectException {
// TODO ?!
// SQLite returns "null" for type if we use rsmd.getColumnTypeName
if ((type == null) || "null".equals(type)) {
return Types.OTHER;
... | Create a Java method that does the following: "Returns the jdbc type for the given type precision and scale.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.LND__LND_FLGS:
setLNDFlgs((Integer)newValue);
return;
case AfplibPackage.LND__IPOS:
setIPos((Integer)newValue... | Create a Java method that does the following: "Sets the value of the feature identified by the featureID attribute of the object.". |
Of course, here is the Java code you requested:
```java
public List<String> readProjectResources(CmsProject project) throws CmsException {
return m_securityManager.readProjectResources(m_context, project);
}
```
Hope this helps! | Create a Java method that does the following: "Reads the resources of a project.". |
Of course, here is the Java code you requested:
```java
public static RansacMultiView<Homography2D_F64,AssociatedPair>
homographyCalibratedRansac( @Nonnull ConfigRansac ransac )
{
ModelManager<Homography2D_F64> manager = new ModelManagerHomography2D_F64();
GenerateHomographyLinear modelFitter = new GenerateHomog... | Create a Java method that does the following: "Creates a homography calibration implementation using the default parameters.". |
Of course, here is the Java code you requested:
```java
public MusicElement getElementByReference(MusicElementReference ref) {
if (voiceExists(ref.getVoice())) {
for (Object o : getVoice(ref.getVoice())) {
MusicElement element = (MusicElement) o;
if (element.getReferen... | Create a Java method that does the following: "Gets the MusicElement object that corresponds to the specified reference.". |
Of course, here is the Java code you requested:
```java
public static int width(int ucs) {
/* test for 8-bit control characters */
if (ucs == 0)
return 0;
if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
return -1;
/* binary search in table of non-spacing characters... | Create a Java method that does the following: "Returns the width of a unicode code point.". |
Of course, here is the Java code you requested:
```java
@Override
public boolean onTouchEvent(MotionEvent ev) {
try {
if (ev == null || getAdapter() == null || getAdapter().getCount() == 0) {
return false;
}
return super.onTouchEvent(ev);
} catch ... | Create a Java method that does the following: "Override onTouchEvent to check if the touch event is in a page view.". |
Of course, here is the Java code you requested:
```java
public void marshall(GetContainerPolicyRequest getContainerPolicyRequest, ProtocolMarshaller protocolMarshaller) {
if (getContainerPolicyRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
... | Create a Java method that does the following: "Converts the given getContainerPolicyRequest to the JSON - compatible parameter object.". |
Of course, here is the Java code you requested:
```java
@NotNull
public LongStream filterIndexed(int from, int step,
@NotNull IndexedLongPredicate predicate) {
return new LongStream(params, new LongFilterIndexed(
new PrimitiveIndexedIterator.OfLong(from, ... | Create a Java method that does the following: "Returns a stream consisting of the elements of a CID license that are indexed by the given predicate.". |
Of course, here is the Java code you requested:
```java
protected void successfulAuthentication(HttpServletRequest request,
HttpServletResponse response, FilterChain chain, Authentication authResult)
throws IOException, ServletException {
if (logger.isDebugEnabled()) {
logger.debug("Authentication success.... | Create a Java method that does the following: "Called when the user has successfully authenticated.". |
Of course, here is the Java code you requested:
```java
public void marshall(DescribeCertificateRequest describeCertificateRequest, ProtocolMarshaller protocolMarshaller) {
if (describeCertificateRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}... | Create a Java method that does the following: "marshalls the given DescribeCertificateRequest to the JSON - compatible parameter object.". |
Of course, here is the Java code you requested:
```java
public static void renderTo(String template, Writer writer, Map<String, Object> paras)
{
Template t = gt.getTemplate(template);
t.binding(paras);
t.renderTo(writer);
}
```
Hope this helps! | Create a Java method that does the following: "Renders a
template to a Writer.". |
Of course, here is the Java code you requested:
```java
public <U> U foldRight(U seed, BiFunction<? super T, U, U> accumulator) {
return toListAndThen(list -> {
U result = seed;
for (int i = list.size() - 1; i >= 0; i--)
result = accumulator.apply(list.get(i), result);
... | Create a Java method that does the following: "Folds the list of resources into a single value using the supplied seed and accumulation function.". |
Of course, here is the Java code you requested:
```java
public void value(AjaxRequestTarget ajaxRequestTarget, int value)
{
ajaxRequestTarget.appendJavaScript(this.value(value).render().toString());
}
```
Hope this helps! | Create a Java method that does the following: "Method to set the value of the button in the ajax request.". |
Of course, here is the Java code you requested:
```java
public static TextureCallback wrapCallback(
ResourceCache<GVRImage> cache, TextureCallback callback) {
return new TextureCallbackWrapper(cache, callback);
}
```
Hope this helps! | Create a Java method that does the following: "Wrap a texture callback.". |
Of course, here is the Java code you requested:
```java
public Hit withFields(java.util.Map<String, java.util.List<String>> fields) {
setFields(fields);
return this;
}
```
Hope this helps! | Create a Java method that does the following: "Sets the fields for the CID language.". |
Of course, here is the Java code you requested:
```java
public static AbstractFile getFileByAbsolutePath(final SecurityContext securityContext, final String absolutePath) {
try {
return StructrApp.getInstance(securityContext).nodeQuery(AbstractFile.class).and(StructrApp.key(AbstractFile.class, "path"), absolute... | Create a Java method that does the following: "Get a file by absolute path.". |
Of course, here is the Java code you requested:
```java
public static byte[] md5(File file) throws IOException {
try (InputStream in = new FileInputStream(file)) {
return md5(in);
}
}
```
Hope this helps! | Create a Java method that does the following: "Returns the MD5 checksum of the given file.". |
Of course, here is the Java code you requested:
```java
protected boolean validateEditorInputState() {
ITextEditor editor= this.editor;
if (editor instanceof ITextEditorExtension2)
return ((ITextEditorExtension2) editor).validateEditorInputState();
else if (editor instanceof ITextEditorExtension)
return !(... | Create a Java method that does the following: "Validate the editor input state.". |
Of course, here is the Java code you requested:
```java
public static void isNotZeroLength( String argument,
String name ) {
isNotNull(argument, name);
if (argument.length() <= 0) {
throw new IllegalArgumentException(CommonI18n.argumentMayNotBeNullOrZ... | Create a Java method that does the following: "isNotZeroLength This method checks if the string is not null or zero length.". |
Of course, here is the Java code you requested:
```java
@Override
public String draw() {
return Util.combine(new String(new char[]{AbstractTabularComponent.BORDER}), Util.pad(title, enclosing, getTable().getTotalWidth() - 2, orientation), new String(new char[]{AbstractTabularComponent.BORDER}), NEWLINE);
... | Create a Java method that does the following: "Draw the CRS page.". |
Of course, here is the Java code you requested:
```java
public TldExtensionType<WebJsptaglibraryDescriptor> getOrCreateTaglibExtension()
{
List<Node> nodeList = model.get("taglib-extension");
if (nodeList != null && nodeList.size() > 0)
{
return new TldExtensionTypeImpl<WebJsptaglibraryD... | Create a Java method that does the following: "Get or create a taglib - extension.". |
Of course, here is the Java code you requested:
```java
public CreateVpcResponse createVpc(CreateVpcRequest request)
throws BceClientException {
checkNotNull(request, "request should not be null.");
if (Strings.isNullOrEmpty(request.getClientToken())) {
request.setClientToken(th... | Create a Java method that does the following: "Create a new vpc in BMR.". |
Of course, here is the Java code you requested:
```java
public <T> T read(final String s, final DataTypeDescriptor<T> descriptor)
throws Exception {
if (descriptor == null) throw new NullPointerException("descriptor");
if (s == null) return null;
JsonParser parser = factory.createParser(s);
return read(par... | Create a Java method that does the following: "Read a single data type from a JSON string.". |
Of course, here is the Java code you requested:
```java
@Override
public synchronized void close()
throws java.io.IOException
{
if(closed) return;
closed = true; // avoid circular calls
dsp = null;
// nodemap = null; unused?
}
```
Hope this helps! | Create a Java method that does the following: "Close the underlying file.". |
Of course, here is the Java code you requested:
```java
public <T> void putCustom(String key, T value) {
custom.put(key, value);
}
```
Hope this helps! | Create a Java method that does the following: "Add a custom value to the context.". |
Of course, here is the Java code you requested:
```java
void setBuilder(final QueryBuilder builder) {
super.setBuilder(builder);
for (WhereItem item : items) {
item.setBuilder(builder);
}
}
```
Hope this helps! | Create a Java method that does the following: "Sets the builder for this where clause.". |
Of course, here is the Java code you requested:
```java
@PUT
public void updateObject(ExternalType modifiedObject) throws GuacamoleException {
// Validate that data was provided
if (modifiedObject == null)
throw new GuacamoleClientException("Data must be submitted when updating objects... | Create a Java method that does the following: "Updates the contents of an object in the Identity namespace.". |
Of course, here is the Java code you requested:
```java
public MessagelistenerType<MessageadapterType<T>> getOrCreateMessagelistener()
{
List<Node> nodeList = childNode.get("messagelistener");
if (nodeList != null && nodeList.size() > 0)
{
return new MessagelistenerTypeImpl<Messageadapte... | Create a Java method that does the following: "Get or create a Messagelistener type.". |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.