code stringlengths 146 48.7k | prompt stringlengths 55 1.51k |
|---|---|
Of course, here is the Java code you requested:
```java
static void parseHeader(final String header, Map<Token, String> response) {
if (response.size() == Token.values().length) {
//already parsed everything
return;
}
char[] headerChars = header.toCharArray();
S... | Create a Java method that does the following: "Parse the header.". |
Of course, here is the Java code you requested:
```java
@Override
public Reliability getMaxReliability()
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "getMaxReliability");
Reliability rel = _definition.getMaxReliability();
if (tc.isEntryEnabled())
SibTr.exit(tc, ... | Create a Java method that does the following: "Returns the maximumReliability value for this message.". |
Of course, here is the Java code you requested:
```java
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment... | Create a Java method that does the following: "Add the modules needed to create the CRAs containing the CRAs". |
Of course, here is the Java code you requested:
```java
public EClass getIfcAxis2Placement() {
if (ifcAxis2PlacementEClass == null) {
ifcAxis2PlacementEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(938);
}
return ifcAxis2PlacementEClass;
}... | Create a Java method that does the following: "Get the Ifc Axis 2 Placement feature.". |
Of course, here is the Java code you requested:
```java
private void getSymmetryAxes(List<Axis> symmAxes, Matrix4d prior, int level, int firstRepeat) {
if(level >= getNumLevels() ) {
return;
}
Axis elem = axes.get(level);
Matrix4d elemOp = elem.getOperator();
// Current axis:
// elementary maps B -> A... | Create a Java method that does the following: "Get the symmetry axes for a given level.". |
Of course, here is the Java code you requested:
```java
public static boolean isMethodOverridden(Method m, LinkedList<Class<?>> supers)
{
// Only check non-private methods for an override.
int methodModifier = m.getModifiers();
if (!Modifier.isPrivate(methodModifier))
{
... | Create a Java method that does the following: "Check if a method is overridden by a subclass of a class.". |
Of course, here is the Java code you requested:
```java
public static <T> T newInstance(Constructor<T> constructor, Object... args) {
try {
return constructor.newInstance(args);
} catch (Exception e) {
throw new ClientException(e);
}
}
```
Hope this helps! | Create a Java method that does the following: "Create a new instance of the class with the specified constructor and arguments.". |
Of course, here is the Java code you requested:
```java
public final EObject entryRuleAssertExpression() throws RecognitionException {
EObject current = null;
EObject iv_ruleAssertExpression = null;
try {
// InternalSARL.g:7509:57: (iv_ruleAssertExpression= ruleAssertExpression E... | Create a Java method that does the following: "Use this method to look for a ruleAssertExpression in the language.". |
Of course, here is the Java code you requested:
```java
public static <O> O deserialise(InputStream input,
Type type) throws IOException {
Gson gson = getBuilder().create();
try (Reader reader = DebugReader.newInstance(input)) {
return gson.fromJson(read... | Create a Java method that does the following: "Deserialise a XML document from an input stream.". |
Of course, here is the Java code you requested:
```java
private boolean shouldEmitDeprecationWarning(NodeTraversal t, PropertyReference propRef) {
// In the global scope, there are only two kinds of accesses that should
// be flagged for warnings:
// 1) Calls of deprecated functions and methods.
// 2) ... | Create a Java method that does the following: "Returns true if the warning should be emitted for a property reference.". |
Of course, here is the Java code you requested:
```java
private void fillBytesBuffer() throws IOException
{
// if last encoding result is underflow takes care to fill characters buffer
if(!endOfInput && (lastEncoderResult == null || lastEncoderResult.isUnderflow())) {
charactersBuffer.compact();
... | Create a Java method that does the following: "Fills bytes buffer with bytes from the reader buffer.". |
Of course, here is the Java code you requested:
```java
public void marshall(DeleteProjectRequest deleteProjectRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteProjectRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | Create a Java method that does the following: "Creates the given parameter object.". |
Of course, here is the Java code you requested:
```java
public static void startScheduler(int threadPoolSize, String annotatedJobsPackageName)
throws SundialSchedulerException {
try {
createScheduler(threadPoolSize, annotatedJobsPackageName);
getScheduler().start();
} catch (SchedulerE... | Create a Java method that does the following: "Start the SUNDIAL SCHEDULER". |
Of course, here is the Java code you requested:
```java
public static String getMajorName(String path) {
int len = path.length();
int l = 0;
int r = len;
for (int i = r - 1; i > 0; i--) {
if (r == len)
if (path.charAt(i) == '.') {
r... | Create a Java method that does the following: "Gets the major name from a path.". |
Of course, here is the Java code you requested:
```java
private static List<ModuleRef> findModuleRefs(final LinkedHashSet<Object> layers, final ScanSpec scanSpec,
final LogNode log) {
if (layers.isEmpty()) {
return Collections.emptyList();
}
// Traverse the layer DAG to... | Create a Java method that does the following: "Find the module references in the layers.". |
Of course, here is the Java code you requested:
```java
private static int ceilingLog2(int n)
{
int oa;
int i;
int b;
oa = n;
b = 32 / 2;
i = 0;
while (b != 0)
{
i = (i << 1);
if (n >= (1 << b))
{
... | Create a Java method that does the following: "ceilingLog2 returns the number of log2 entries in n.". |
Of course, here is the Java code you requested:
```java
public final void setPlaceholderTextSize(int unit,
int size) {
if (size < 0) {
throw new IllegalArgumentException("Text size cannot be less than zero.");
}
int scaledSize = (int) Ty... | Create a Java method that does the following: "Sets the placeholder text size.". |
Of course, here is the Java code you requested:
```java
public void messageReceived(IoSession session, Object message)
throws Exception {
SingleSessionIoHandler handler = (SingleSessionIoHandler) session
.getAttribute(HANDLER);
handler.messageReceived(message);
}
```
Ho... | Create a Java method that does the following: "Called by the application to notify the application that a message has been received.". |
Of course, here is the Java code you requested:
```java
private Region findRegion(int size, Packing packing) {
validate(!VALIDATING || Integer.bitCount(size) == 1);
Node<Region> currentNode = getRoot();
Region currentRegion = currentNode.getPayload();
if (currentRegion == null || (currentRegion.availa... | Create a Java method that does the following: "Find a region in the given size.". |
Of course, here is the Java code you requested:
```java
public static Server getServer(final Object instance, final String bindAddress, final int port, Configuration conf)
throws IOException {
return getServer(instance, bindAddress, port, 1, false, conf);
}
```
Hope this helps! | Create a Java method that does the following: "Get a server instance.". |
Of course, here is the Java code you requested:
```java
private VectorServerLayer searchLayer(MapPresenter mapPresenter, String layerId) {
if (layerId != null) {
for (int i = 0; i < mapPresenter.getLayersModel().getLayerCount(); i++) {
Layer layer = mapPresenter.getLayersModel().getLayer(i);
if (layer ins... | Create a Java method that does the following: "Search layer.". |
Of course, here is the Java code you requested:
```java
public static DoubleStreamEx iterate(final double seed, final DoubleUnaryOperator f) {
return iterate(seed, x -> true, f);
}
```
Hope this helps! | Create a Java method that does the following: "Iterate over the data stream.". |
Of course, here is the Java code you requested:
```java
public static <E> E send(Object o, String methodName, Integer arg) {
return send(o, methodName, (Object) arg);
}
```
Hope this helps! | Create a Java method that does the following: "Send method with Integer argument". |
Of course, here is the Java code you requested:
```java
private static void initWebClientConfig(WebClientConfiguration wconf) {
if (CONFIG == null) {
logger.warn("Web client config was null; cannot configure web client for {}", ServerUtility.class);
logger.info("FEDORA_HOME is used to c... | Create a Java method that does the following: "Initialize web client configuration.". |
Of course, here is the Java code you requested:
```java
public void loadKeyStores(Map<String, WSKeyStore> config) {
// now process each keystore in the provided config
for (Entry<String, WSKeyStore> current : config.entrySet()) {
try {
String name = current.getKey();
... | Create a Java method that does the following: "Load the keystore from the provided configuration map.". |
Of course, here is the Java code you requested:
```java
public AdapterDelegatesManager<T> addDelegate(int viewType, boolean allowReplacingDelegate,
@NonNull AdapterDelegate<T> delegate) {
if (delegate == null) {
throw new NullPointerException("Adap... | Create a Java method that does the following: "Add a new AdapterDelegate to the manager.". |
Of course, here is the Java code you requested:
```java
public final static int readUntil(final StringBuilder out, final String in, final int start, final char... end)
{
int pos = start;
while (pos < in.length())
{
final char ch = in.charAt(pos);
if (ch == '\\' && po... | Create a Java method that does the following: "Read until the specified number of characters is found in the specified string.". |
Of course, here is the Java code you requested:
```java
private double logLikelihood(int[] contingencyTable) {
// Rename for short-hand convenience
int[] t = contingencyTable;
int col1sum = t[0] + t[2];
int col2sum = t[1] + t[3];
int row1sum = t[0] + t[1];
int row2sum = ... | Create a Java method that does the following: "logLikelihood This is the log likelihood of the contingencyTable.". |
Of course, here is the Java code you requested:
```java
@Override
public int read(final byte[] buffer, final int bufPos, final int length)
throws IOException {
int i = super.read(buffer, bufPos, length);
if ((i == length) || (i == -1))
return i;
int j = super.r... | Create a Java method that does the following: "Reads a sequence of bytes from the specified buffer starting at the specified offset.". |
Of course, here is the Java code you requested:
```java
public void setResSNum(Integer newResSNum) {
Integer oldResSNum = resSNum;
resSNum = newResSNum;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.RESOURCE_SECTION_NUMBER__RES_SNUM, oldResSNum, resSNum));
}... | Create a Java method that does the following: "Sets the resource number of the section in the resource table.". |
Of course, here is the Java code you requested:
```java
public void marshall(CreateProjectRequest createProjectRequest, ProtocolMarshaller protocolMarshaller) {
if (createProjectRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | Create a Java method that does the following: "marshalls the given request to the JSON object.". |
Of course, here is the Java code you requested:
```java
@Override
public ListT<W,T> distinct() {
return (ListT<W,T>) FoldableTransformerSeq.super.distinct();
}
```
Hope this helps! | Create a Java method that does the following: "Returns a list of distinct tuples.". |
Of course, here is the Java code you requested:
```java
public <E extends LogEntry> void writeTrace(LogTrace<E> logTrace) throws PerspectiveException, IOException{
if(logPerspective == LogPerspective.ACTIVITY_PERSPECTIVE)
throw new PerspectiveException(PerspectiveError.WRITE_TRACE_IN_ACTIVITY_PERSPECTIVE);
p... | Create a Java method that does the following: "Write a log trace to the output stream.". |
Of course, here is the Java code you requested:
```java
public static <T> Iterator<T> iterator(Queue<T> queue)
{
return new XIteratorImpl<>(()->!queue.isEmpty(), queue::remove);
}
```
Hope this helps! | Create a Java method that does the following: "Returns an iterator over the elements in the queue.". |
Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
@PublicEvolving
public static <IN, OUT> TypeInformation<OUT> getUnaryOperatorReturnType(
Function function,
Class<?> baseClass,
int inputTypeArgumentIndex,
int outputTypeArgumentIndex,
int[] lambdaOutputTypeArgumentIndic... | Create a Java method that does the following: "Gets the unary operator return type.". |
Of course, here is the Java code you requested:
```java
public Object getEditValue(final TargetMode _mode)
throws EFapsException
{
this.display = Display.EDITABLE;
this.targetMode = _mode;
if (this.editValue == null) {
Object obj = executeEvents(EventType.UI_FIELD_VALUE,... | Create a Java method that does the following: "Method to get the value of the entity.". |
Of course, here is the Java code you requested:
```java
ContainerStateChangeReport awaitContainerStateChangeReport(long timeout, TimeUnit timeUnit) throws InterruptedException, TimeoutException {
if (monitor.awaitStability(timeout, timeUnit, failed, problems)) {
return createContainerStateChangeRep... | Create a Java method that does the following: "Await container state change report.". |
Of course, here is the Java code you requested:
```java
public void finish() throws IOException, SymmetricKeyException {
if (outStream != null) {
if (encryptor != null)
outStream.write(encryptor.encrypt(null));
// FileOutputStream is also closed cascadingly
... | Create a Java method that does the following: "Finishes the session.". |
Of course, here is the Java code you requested:
```java
public OvhFederationAccessNetwork serviceName_federation_activeDirectory_activeDirectoryId_GET(String serviceName, Long activeDirectoryId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/federation/activeDirectory/{activeDirectoryId}";
Stri... | Create a Java method that does the following: "Get the active directory access network". |
Of course, here is the Java code you requested:
```java
Object insertByLeftShift(
int ix,
Object new1)
{
Object old1 = leftMostKey();
leftShift(ix);
_nodeKey[ix] = new1;
if (midPoint() > rightMostIndex())
_nodeKey[midPoint()] = rightMostKey();
return old1;
... | Create a Java method that does the following: "Insert by left shift.". |
Of course, here is the Java code you requested:
```java
void writeSimple(Class<?> declaredType, Object value) throws IOException {
// simple types have no need to write a type object
Class<?> realType = value.getClass();
if (realType == Integer.class) {
output.writeInt(((Integer) va... | Create a Java method that does the following: "Write a simple value to the output stream.". |
Of course, here is the Java code you requested:
```java
public <X1, X2, X3> F3<X1, X2, X3, R>
compose(final Func3<? super X1, ? super X2, ? super X3, ? extends P1> before) {
final F1<P1, R> me = this;
return new F3<X1, X2, X3, R>() {
@Override
public R ap... | Create a Java method that does the following: "Compose a F1 with a Func3". |
Of course, here is the Java code you requested:
```java
public static String normalizeSlashes(final String path) {
// prepare
final StringBuilder builder = new StringBuilder(path);
boolean modified = false;
// remove all trailing '/'s except the first one
while (builder.length(... | Create a Java method that does the following: "Normalize the path to remove trailing slashes and add a slash at the beginning if it isn t present.". |
Of course, here is the Java code you requested:
```java
public void setTreeSite(String type, String value) {
if (value == null) {
return;
}
m_treeSite.put(type, value);
}
```
Hope this helps! | Create a Java method that does the following: "Sets the value of the tree site property.". |
Of course, here is the Java code you requested:
```java
@Override
public void declareOutputFields(OutputFieldsDeclarer declarer) {
List<String> names = new ArrayList<>();
for (String f : getOutputFields()) names.add(f);
for (String f : passThroughFields) names.add(f);
String streamId = getOutputStreamId();
... | Create a Java method that does the following: "Declare output fields for this stream.". |
Of course, here is the Java code you requested:
```java
protected void handleBindException(String userDn, String username, Throwable cause) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to bind as " + userDn + ": " + cause);
}
}
```
Hope this helps! | Create a Java method that does the following: "Handle bind exception.". |
Of course, here is the Java code you requested:
```java
private void obtainSummaryOn(@NonNull final TypedArray typedArray) {
setSummaryOn(typedArray.getText(R.styleable.AbstractTwoStatePreference_android_summaryOn));
}
```
Hope this helps! | Create a Java method that does the following: "Obtains the summary on which is shown when the application is being used as a wizard from a specific typed array.". |
Of course, here is the Java code you requested:
```java
synchronized void setChannelFactory(ChannelFactory factory) throws ChannelFactoryException {
if (factory != null && cf != null) {
throw new ChannelFactoryException("ChannelFactory already exists");
}
this.cf = factory;
}
``... | Create a Java method that does the following: "Sets the ChannelFactory.". |
Of course, here is the Java code you requested:
```java
void setPrincipal(int type, String principalName) {
m_rpc.setPrincipal(type, principalName);
// forcing the RPC to be executed immediately
getConnection().getHeartbeat().send();
}
```
Hope this helps! | Create a Java method that does the following: "Set the principal of a single type.". |
Of course, here is the Java code you requested:
```java
public JBBPOut Bool(final boolean value, final JBBPBitOrder bitOrder) throws IOException {
assertNotEnded();
if (this.processCommands) {
this.outStream.write(value ? bitOrder == JBBPBitOrder.MSB0 ? 0x80 : 1 : 0);
}
return this;
}
```
Hope... | Create a Java method that does the following: "Write a boolean value into the output stream.". |
Of course, here is the Java code you requested:
```java
public T gone(boolean b) {
if (b)
return visibility(View.GONE);
else
return visibility(View.VISIBLE);
}
```
Hope this helps! | Create a Java method that does the following: "Method to set the visibility of the class.". |
Of course, here is the Java code you requested:
```java
public DescribeDirectoriesRequest withDirectoryIds(String... directoryIds) {
if (this.directoryIds == null) {
setDirectoryIds(new com.amazonaws.internal.SdkInternalList<String>(directoryIds.length));
}
for (String ele : directo... | Create a Java method that does the following: "Sets the directoryIds value for this request.". |
Of course, here is the Java code you requested:
```java
@Override
public void processConnect(WebSocketChannel channel, WSURI location, String[] protocols) {
nextHandler.processConnect(channel, location, protocols);
}
```
Hope this helps! | Create a Java method that does the following: "Override this method to handle connect requests.". |
Of course, here is the Java code you requested:
```java
@Override
public DataTransferRequestResult dataTransfer(ChargingStationId id, DataTransferMessage dataTransferMessage) {
LOG.debug("Data transfer to {}", id);
ChargePointService chargePointService = this.createChargingStationService(id);
... | Create a Java method that does the following: "Data transfer to a charging station.". |
Of course, here is the Java code you requested:
```java
public TileSet getTileSet (String setName)
throws NoSuchTileSetException, PersistenceException
{
waitForBundles();
Integer tsid = _namemap.get(setName);
if (tsid != null) {
return getTileSet(tsid.intValue());
... | Create a Java method that does the following: "Gets the tile set with the specified name.". |
Of course, here is the Java code you requested:
```java
@Override
public JvmType getType() {
if (type == null) {
JvmGenericType objectType = TypesFactory.eINSTANCE.createJvmGenericType();
String objectClassName = Object.class.getName();
((InternalEObject) objectType).eSetProxyURI(URIHelperConstants.OBJECTS... | Create a Java method that does the following: "Replies the type of the object.". |
Of course, here is the Java code you requested:
```java
public static <T> List<T> collect(Iterator<T> iterator) {
List<T> list = new ArrayList<T>();
while (iterator.hasNext()) {
list.add(iterator.next());
}
return list;
}
```
Hope this helps! | Create a Java method that does the following: "Collect a list of all the class objects from the given iterator.". |
Of course, here is the Java code you requested:
```java
public PagedList<ServiceEndpointPolicyDefinitionInner> listByResourceGroup(final String resourceGroupName, final String serviceEndpointPolicyName) {
ServiceResponse<Page<ServiceEndpointPolicyDefinitionInner>> response = listByResourceGroupSinglePageAsync(... | Create a Java method that does the following: "Gets a list of service endpoint policy definitions.". |
Of course, here is the Java code you requested:
```java
public static ns_ssl_certkey_policy do_poll(nitro_service client, ns_ssl_certkey_policy resource) throws Exception
{
return ((ns_ssl_certkey_policy[]) resource.perform_operation(client, "do_poll"))[0];
}
```
Hope this helps! | Create a Java method that does the following: "Use this operation to poll NetScaler SSL certificates.". |
Of course, here is the Java code you requested:
```java
public static GPX read(final InputStream input) throws IOException {
return reader(Version.V11, Mode.STRICT).read(input);
}
```
Hope this helps! | Create a Java method that does the following: "Read GPX from the given input stream.". |
Of course, here is the Java code you requested:
```java
@SafeVarargs
public static @Nonnull JsonObject object(Entry<String,JsonElement>...fields) {
JsonObject object = new JsonObject();
object.add(fields);
return object;
}
```
Hope this helps! | Create a Java method that does the following: "Creates a JsonObject object with the specified fields.". |
Of course, here is the Java code you requested:
```java
public static void assertStringNotNullAndNotTrimmedEmpty(String variableName, String value) {
assertObjectNotNull("variableName", variableName);
assertObjectNotNull("value", value);
if (value.trim().length() == 0) {
String msg ... | Create a Java method that does the following: "Assert that a string is not null and not trimmed empty.". |
Of course, here is the Java code you requested:
```java
private void resolveConflicts(Lr0State stateNo, Set<GTerminal> symbolList, MapList<GTerminal, Item> action)
{
conflictList = new ArrayList<>();
for (Shift sh : stateNo.getShiftList())
{
GTerminal symbol = sh.getSymbol(... | Create a Java method that does the following: "Resolves conflicts in the stateNo.". |
Of course, here is the Java code you requested:
```java
private void addSpecialMethods(ClassFile cf) throws SupportException {
// Generate safe names for special methods.
{
mCopyToMasterPkMethodName =
generateSafeMethodName(mMasterStorableInfo, COPY_TO_MASTER_PK_PREFIX);... | Create a Java method that does the following: "Add special methods which are used to add the appropriate methods to the class file.". |
Of course, here is the Java code you requested:
```java
public void getOHLC(KiteConnect kiteConnect) throws KiteException, IOException {
String[] instruments = {"256265","BSE:INFY", "NSE:INFY", "NSE:NIFTY 50"};
System.out.println(kiteConnect.getOHLC(instruments).get("256265").lastPrice);
System... | Create a Java method that does the following: "Get the OHLC information from the Kite Connect.". |
Of course, here is the Java code you requested:
```java
public final boolean execute() throws Exception {
boolean finished = false;
mainThread.start();
mainThread.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void uncaughtException(final Thread arg0, final Throwable arg1) {
... | Create a Java method that does the following: "Execute the test.". |
Of course, here is the Java code you requested:
```java
private Class<?> getDefaultLocalView(Class<?> beanClass) {
Class<?>[] interfaces = beanClass.getInterfaces();
if (interfaces.length == 0) {
return null;
}
List<Class<?>> implementedInterfaces = new ArrayList<Class<?>>(A... | Create a Java method that does the following: "Get the default local view for the given class.". |
Of course, here is the Java code you requested:
```java
private static Iterable<String> head(final Response origin,
final int status, final CharSequence reason) throws IOException {
// @checkstyle MagicNumber (1 line)
if (status < 100 || status > 999) {
throw new IllegalArgumentExce... | Create a Java method that does the following: "Gets the HTTP head of a response.". |
Of course, here is the Java code you requested:
```java
public void serviceName_burst_PUT(String serviceName, OvhServerBurst body) throws IOException {
String qPath = "/dedicated/server/{serviceName}/burst";
StringBuilder sb = path(qPath, serviceName);
exec(qPath, "PUT", sb.toString(), body);
}
```
Hope this h... | Create a Java method that does the following: "Update the server burst". |
Of course, here is the Java code you requested:
```java
private State nextState(State currentState, int i) {
switch (currentState) {
case FREE_TEXT:
return jumpFromFreeText(str, i);
case PARAM_START:
return jumpFromParamStart(str, i);
case PAR... | Create a Java method that does the following: "This method is called to determine the next state of a template.". |
Of course, here is the Java code you requested:
```java
public void setLocale(Locale locale) throws CmsException {
CmsUserSettings settings = getSettings();
if (settings != null) {
settings.setLocale(locale);
settings.save(m_cms);
m_messages = Messages.get().getBund... | Create a Java method that does the following: "Sets the locale.". |
Of course, here is the Java code you requested:
```java
public static Property newFrom(String name, String base, String prefix, Enum<?> enumee)
{
return new Property(name, base, prefix, enumee);
}
```
Hope this helps! | Create a Java method that does the following: "Creates a new property from the given name base prefix and enumeration.". |
Of course, here is the Java code you requested:
```java
public org.talend.services.reservation.types.RESStatusType submitCarReservation(
org.talend.services.reservation.types.ReservationType reservation) {
//
logData("submitCarReservation", "request", reservation);
// Load customer data
RESStatusType status... | Create a Java method that does the following: "Submit a car reservation.". |
Of course, here is the Java code you requested:
```java
public static IntegerBinding getExponent(final ObservableDoubleValue d) {
return createIntegerBinding(() -> Math.getExponent(d.get()), d);
}
```
Hope this helps! | Create a Java method that does the following: "Gets the exponent.". |
Of course, here is the Java code you requested:
```java
public final void cancel(CancelException reason) {
if (cancelling != null)
return;
if (reason == null) reason = new CancelException("No reason given");
cancelling = reason;
if (TaskScheduler.cancel(this)) {
status = Task.STATUS_DONE;
resul... | Create a Java method that does the following: "Cancels this task.". |
Of course, here is the Java code you requested:
```java
void markAsProcessed(final CtClass ctClass) {
final ClassFile classFile = ctClass.getClassFile();
for (final Object attributeObject : classFile.getAttributes()) {
if (attributeObject instanceof AnnotationsAttribute) {
f... | Create a Java method that does the following: "Mark as processed.". |
Of course, here is the Java code you requested:
```java
static public byte[] expandByteArray(byte[] src, byte[] dst, int srcPos, int srcLength, int dstPos, int dstLength) {
byte[] rc = null;
int totalLen = 0;
if (null != src) {
totalLen += srcLength;
}
if (null != ds... | Create a Java method that does the following: "This method is used to expand a byte array of bytes.". |
Of course, here is the Java code you requested:
```java
public static <T> Flow.Publisher<T> publisherToFlowPublisher(final Publisher<T>
publisher) {
return new PublisherAsFlowPublisher<>(publisher);
}
```
Hope this helps! | Create a Java method that does the following: "Publisher to flow publisher.". |
Of course, here is the Java code you requested:
```java
@Override
public void sendProbe(Probe probe) throws TransportException {
LOGGER.info("Sending probe [" + probe.getProbeID() + "] on network inteface [" + networkInterface.getName() + "] at port [" + multicastAddress + ":" + multicastPort + "]");
LOGGER... | Create a Java method that does the following: "Send a probe to the network interface.". |
Of course, here is the Java code you requested:
```java
private void getYearlyDates(Calendar calendar, List<Date> dates)
{
if (m_relative)
{
getYearlyRelativeDates(calendar, dates);
}
else
{
getYearlyAbsoluteDates(calendar, dates);
}
}
```
Hope this helps! | Create a Java method that does the following: "Get the yearly dates.". |
Of course, here is the Java code you requested:
```java
@Override
public final Iterable<NoteDocument> findAll(final String filename) {
final Query searchQuery =
new Query(Criteria.where("filename").is(filename));
final List<NoteDocumentMongo> noteDocumentsMongo =
mon... | Create a Java method that does the following: "Find all notes in a file.". |
Of course, here is the Java code you requested:
```java
public <T> DataSet<T> groupReduceOnEdges(EdgesFunction<K, EV, T> edgesFunction,
EdgeDirection direction, TypeInformation<T> typeInfo) throws IllegalArgumentException {
switch (direction) {
case IN:
return edges.map(new ProjectVertexIdMap<>(1)).name("... | Create a Java method that does the following: "Group reduce on edges DataSet.". |
Of course, here is the Java code you requested:
```java
public static SuggestedFix replaceIncludingComments(
TreePath path, String replacement, VisitorState state) {
Tree tree = path.getLeaf();
Tree parent = path.getParentPath().getLeaf();
if (!(parent instanceof ClassTree)) {
return SuggestedF... | Create a Java method that does the following: "Replaces the given tree in the source code with the given replacement.". |
Of course, here is the Java code you requested:
```java
@Override
public CommercePriceListUserSegmentEntryRel removeByUUID_G(String uuid,
long groupId) throws NoSuchPriceListUserSegmentEntryRelException {
CommercePriceListUserSegmentEntryRel commercePriceListUserSegmentEntryRel =
findByUUID_G(uuid, groupId);
... | Create a Java method that does the following: "Removes the commerce price list user segment entry rel with the UUID and group. Also notifies the appropriate model listeners.". |
Of course, here is the Java code you requested:
```java
public static <E> Iterable<E> wrapEnumeration(Enumeration<E> enumeration) {
return new IterableEnumeration<E>(enumeration);
}
```
Hope this helps! | Create a Java method that does the following: "Wraps an enumeration in an Iterable.". |
Of course, here is the Java code you requested:
```java
protected void pushReturnType(InvokeInstruction ins) {
ConstantPoolGen cpg = getCPG();
Type type = ins.getType(cpg);
if (type.getType() != Const.T_VOID) {
pushValue(type);
}
}
```
Hope this helps! | Create a Java method that does the following: "Push the return type of the method.". |
Of course, here is the Java code you requested:
```java
protected Corpus onComplete(Corpus corpus, ProcessorContext context, Counter<String> counts) {
return corpus;
}
```
Hope this helps! | Create a Java method that does the following: "Called when the complete process is complete.". |
Of course, here is the Java code you requested:
```java
protected void writeXml(MListTable<?> table, OutputStream outputStream) throws IOException {
final List<?> list = table.getList();
TransportFormatAdapter.writeXml((Serializable) list, outputStream);
}
```
Hope this helps! | Create a Java method that does the following: "Write a managed list table to an output stream.". |
Of course, here is the Java code you requested:
```java
@Nonnull
@ReturnsMutableCopy
public float [] copyValues1D ()
{
final float v[] = new float [m_nCols];
for (int c = 0; c < m_nCols; ++c)
v[c] = m_aValues[0][c];
return v;
}
```
Hope this helps! | Create a Java method that does the following: "Copy the values of this node into a single array.". |
Of course, here is the Java code you requested:
```java
public static int estimatecompress(int[] in, int currentPos, int inlength) {
int tmpoutpos = 0;
int finalpos = currentPos + inlength;
outer: while (currentPos < finalpos) {
mainloop: for (int selector = 0; selector < 8; selector++) {
int compressedN... | Create a Java method that does the following: "Estimate the number of compressed bits in the input array.". |
Of course, here is the Java code you requested:
```java
BitMatrix buildFunctionPattern() {
int dimension = getDimensionForVersion();
BitMatrix bitMatrix = new BitMatrix(dimension);
// Top left finder pattern + separator + format
bitMatrix.setRegion(0, 0, 9, 9);
// Top right finder pattern + separa... | Create a Java method that does the following: "Build the function pattern.". |
Of course, here is the Java code you requested:
```java
protected List<Dependency> createFlattenedDependencies( Model effectiveModel )
{
List<Dependency> flattenedDependencies = new ArrayList<Dependency>();
// resolve all direct and inherited dependencies...
createFlattenedDependencies( ef... | Create a Java method that does the following: "Create the flattened POM dependencies for the given Model.". |
Of course, here is the Java code you requested:
```java
private List<String> getEmbeddedCollectionColumns() {
List<String> embeddedCollections = new ArrayList<String>();
for ( String property : getPropertyNames() ) {
Type propertyType = getPropertyType( property );
if ( propertyType.isAssociationType() ) {... | Create a Java method that does the following: "Get the columns of the embedded collections.". |
Of course, here is the Java code you requested:
```java
@Override
public void updateWeight(final Entry e) {
if (!isWeigherPresent()) {
return;
}
Entry[] _evictionChunk = null;
synchronized (lock) {
updateWeightInLock(e);
_evictionChunk = fillEvictionChunk();
}
evictChunk(_ev... | Create a Java method that does the following: "Update the weight of a single entry.". |
Of course, here is the Java code you requested:
```java
Rectangle getBoxSize(String boxName) {
PdfRectangle r = (PdfRectangle)thisBoxSize.get(boxName);
if (r != null) return r.getRectangle();
return null;
}
```
Hope this helps! | Create a Java method that does the following: "Get the box size". |
Of course, here is the Java code you requested:
```java
public final <K, V> Mono<Map<K, Collection<V>>> collectMultimap(Function<? super T, ? extends K> keyExtractor,
Function<? super T, ? extends V> valueExtractor) {
return collectMultimap(keyExtractor, valueExtractor, () -> new HashMap<>());
}
```
Hope this h... | Create a Java method that does the following: "Returns a Mono of Maps containing the results of applying the provided function to each element of this stream as a Multimap.". |
Of course, here is the Java code you requested:
```java
@Deprecated
public static void clear() {
if (ExtensionList.lookup(AllUsers.class).isEmpty()) {
return;
}
UserIdMapper.getInstance().clear();
AllUsers.clear();
}
```
Hope this helps! | Create a Java method that does the following: "Clear all the users.". |
Of course, here is the Java code you requested:
```java
public void post_init(final ORBInitInfo info) {
try {
info.add_server_request_interceptor(ServerRequestInterceptor.getInstance());
} catch (final Exception e) {
logger.error("error registering server interceptor", e);
}
}
```
Hope this helps! | Create a Java method that does the following: "Add server request interceptor to ORBInitInfo". |
Of course, here is the Java code you requested:
```java
private void displayValue() {
if (m_resultList == null) {
if (!m_loadingCategoryTree) {
m_loadingCategoryTree = true;
// generate a list of all configured categories.
final String category = m_c... | Create a Java method that does the following: "Display the value of the category tree.". |
Of course, here is the Java code you requested:
```java
public AuditLogPaginationAction user(User user)
{
return user(user == null ? null : user.getId());
}
```
Hope this helps! | Create a Java method that does the following: "A AuditLogPaginationAction implementation that will return the user information of the page.". |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.