method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
long getStopTime() throws RemoteException;
long getStopTime() throws RemoteException;
/** * Returns the time when the last execution of this measurement stopped (as returned by {@link System#currentTimeMillis()}), or -1 if it did not yet stop or if unknown. * @return Last measurement stop time. * @throws RemoteException */
Returns the time when the last execution of this measurement stopped (as returned by <code>System#currentTimeMillis()</code>), or -1 if it did not yet stop or if unknown
getStopTime
{ "repo_name": "langmo/youscope", "path": "core/api/src/main/java/org/youscope/common/measurement/Measurement.java", "license": "gpl-2.0", "size": 13274 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
637,817
public synchronized Instant getSynchronizedProcessingOutputTime() { latestSynchronizedOutputWm = INSTANT_ORDERING.max( latestSynchronizedOutputWm, INSTANT_ORDERING.min(clock.now(), synchronizedProcessingOutputWatermark.get())); return latestSynchronizedOutputWm; }
synchronized Instant function() { latestSynchronizedOutputWm = INSTANT_ORDERING.max( latestSynchronizedOutputWm, INSTANT_ORDERING.min(clock.now(), synchronizedProcessingOutputWatermark.get())); return latestSynchronizedOutputWm; }
/** * Returns the synchronized processing output time of the {@link AppliedPTransform}. * * <p>The returned value is guaranteed to be monotonically increasing, and outside of the * presence of holds, will increase as the system time progresses. */
Returns the synchronized processing output time of the <code>AppliedPTransform</code>. The returned value is guaranteed to be monotonically increasing, and outside of the presence of holds, will increase as the system time progresses
getSynchronizedProcessingOutputTime
{ "repo_name": "tweise/beam", "path": "runners/direct-java/src/main/java/org/apache/beam/runners/direct/WatermarkManager.java", "license": "apache-2.0", "size": 55302 }
[ "org.joda.time.Instant" ]
import org.joda.time.Instant;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,283,706
private void fetchAssignedJobs(){ LOG.info("Started fetching jobs for worker " + my_id); jobs = sql2o.createQuery(jobs_sql).addParameter("my_id", my_id).executeAndFetch(Job.class); }
void function(){ LOG.info(STR + my_id); jobs = sql2o.createQuery(jobs_sql).addParameter("my_id", my_id).executeAndFetch(Job.class); }
/** * pulls from DB the assigned jobs for current worker */
pulls from DB the assigned jobs for current worker
fetchAssignedJobs
{ "repo_name": "Widar91/cloud-computing-project", "path": "src/main/java/nl/tudelft/cloud_computing_project/worker/RealWorker.java", "license": "gpl-2.0", "size": 7172 }
[ "nl.tudelft.cloud_computing_project.model.Job" ]
import nl.tudelft.cloud_computing_project.model.Job;
import nl.tudelft.cloud_computing_project.model.*;
[ "nl.tudelft.cloud_computing_project" ]
nl.tudelft.cloud_computing_project;
1,824,815
static List<BitOp> encodeOperators(final List<IntOp> operators, final Map<IntExp, Integer> map) throws UnexpectedExpressionException { // Normalize the operators BitEncoding.normalize(operators); final List<BitOp> ops = new ArrayList<>(operators.size()); for (IntOp op : ope...
static List<BitOp> encodeOperators(final List<IntOp> operators, final Map<IntExp, Integer> map) throws UnexpectedExpressionException { BitEncoding.normalize(operators); final List<BitOp> ops = new ArrayList<>(operators.size()); for (IntOp op : operators) { final int arity = op.getArity(); final BitOp bOp = new BitOp(op...
/** * Encode a list of specified operators into <code>BitSet</code> representation. The specified * map is used to speed-up the search by mapping the an expression to this index. * * @param operators the list of operators to encode. * @param map the map that associates to a specified expr...
Encode a list of specified operators into <code>BitSet</code> representation. The specified map is used to speed-up the search by mapping the an expression to this index
encodeOperators
{ "repo_name": "pellierd/pddl4j", "path": "src/main/java/fr/uga/pddl4j/encoding/BitEncoding.java", "license": "lgpl-3.0", "size": 18930 }
[ "fr.uga.pddl4j.exceptions.UnexpectedExpressionException", "fr.uga.pddl4j.parser.Connective", "fr.uga.pddl4j.util.BitOp", "fr.uga.pddl4j.util.CondBitExp", "fr.uga.pddl4j.util.IntExp", "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import fr.uga.pddl4j.exceptions.UnexpectedExpressionException; import fr.uga.pddl4j.parser.Connective; import fr.uga.pddl4j.util.BitOp; import fr.uga.pddl4j.util.CondBitExp; import fr.uga.pddl4j.util.IntExp; import java.util.ArrayList; import java.util.List; import java.util.Map;
import fr.uga.pddl4j.exceptions.*; import fr.uga.pddl4j.parser.*; import fr.uga.pddl4j.util.*; import java.util.*;
[ "fr.uga.pddl4j", "java.util" ]
fr.uga.pddl4j; java.util;
594,814
public static void handleException(Exception e, String whatIsHappening, String userName) { try { ExceptionHandler.handleException(e, whatIsHappening, userName); } catch (Exception e1) { // do nothing } // throw the local exception as a web application exception if (e instanceof Lo...
static void function(Exception e, String whatIsHappening, String userName) { try { ExceptionHandler.handleException(e, whatIsHappening, userName); } catch (Exception e1) { } if (e instanceof LocalException) { throw new WebApplicationException(Response.status(500) .entity(e.getMessage()).build()); } if (e instanceof Web...
/** * Handle exception. * * @param e the e * @param whatIsHappening the what is happening * @param userName the user name */
Handle exception
handleException
{ "repo_name": "WestCoastInformatics/SNOMED-Terminology-Server", "path": "rest/src/main/java/org/ihtsdo/otf/ts/rest/impl/RootServiceRestImpl.java", "license": "apache-2.0", "size": 3793 }
[ "javax.ws.rs.WebApplicationException", "javax.ws.rs.core.Response", "org.ihtsdo.otf.ts.helpers.LocalException", "org.ihtsdo.otf.ts.services.handlers.ExceptionHandler" ]
import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; import org.ihtsdo.otf.ts.helpers.LocalException; import org.ihtsdo.otf.ts.services.handlers.ExceptionHandler;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.ihtsdo.otf.ts.helpers.*; import org.ihtsdo.otf.ts.services.handlers.*;
[ "javax.ws", "org.ihtsdo.otf" ]
javax.ws; org.ihtsdo.otf;
969,873
private void addCompletedJob(Manifest manifest, AutoIngestJobNodeData nodeData) throws AutoIngestJobException, InterruptedException { Path caseDirectoryPath = nodeData.getCaseDirectoryPath(); if (!caseDirectoryPath.toFile().exists()) { sysLogger.log(Level.WARNING, String....
void function(Manifest manifest, AutoIngestJobNodeData nodeData) throws AutoIngestJobException, InterruptedException { Path caseDirectoryPath = nodeData.getCaseDirectoryPath(); if (!caseDirectoryPath.toFile().exists()) { sysLogger.log(Level.WARNING, String.format(STR, nodeData.getManifestFilePath(), caseDirectoryPath.t...
/** * Adds a job to process a manifest to the completed jobs list. * * @param manifest The manifest for the job. * @param nodeData The data stored in the manifest file lock * coordination service node for the job. * * @throws AutoIngestJobEx...
Adds a job to process a manifest to the completed jobs list
addCompletedJob
{ "repo_name": "rcordovano/autopsy", "path": "Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java", "license": "apache-2.0", "size": 166040 }
[ "java.nio.file.Path", "java.util.logging.Level", "org.sleuthkit.autopsy.coordinationservice.CoordinationService", "org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJob" ]
import java.nio.file.Path; import java.util.logging.Level; import org.sleuthkit.autopsy.coordinationservice.CoordinationService; import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJob;
import java.nio.file.*; import java.util.logging.*; import org.sleuthkit.autopsy.coordinationservice.*; import org.sleuthkit.autopsy.experimental.autoingest.*;
[ "java.nio", "java.util", "org.sleuthkit.autopsy" ]
java.nio; java.util; org.sleuthkit.autopsy;
1,863,060
public static void putSensorRecordFrequency(){ Map<String, String> submitMap = request.params.allSimple(); for (SensorType sensorType : SensorType.values()) { if(!sensorType.isVirtual()) { Integer value = getValidSensorRecordFrequency(submitMap.get(sensorType.toString())); logger.warn(sensorType+" ...
static void function(){ Map<String, String> submitMap = request.params.allSimple(); for (SensorType sensorType : SensorType.values()) { if(!sensorType.isVirtual()) { Integer value = getValidSensorRecordFrequency(submitMap.get(sensorType.toString())); logger.warn(sensorType+STR+value); SensorRecordFrequency recFreq = Se...
/** * Updates the data value for the given SensorType. There is no delete here. * @param sensorType * @param value */
Updates the data value for the given SensorType. There is no delete here
putSensorRecordFrequency
{ "repo_name": "leeclarke/TheGardenDroid", "path": "webapp/GardenDroidWeb/app/controllers/OptionsManager.java", "license": "gpl-3.0", "size": 7700 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
903,127
public void save() { long nanoTime = System.nanoTime(); int count = getResourceManager().executeSave() + getResourceManager().save(get()); LoggerUtils.info("Ranks data saved in " + TimeUnit.MILLISECONDS.convert((System.nanoTime() - nanoTime), TimeUnit.NANOSECONDS) / 1000.0 + "s (" + count + " ranks)"); nano...
void function() { long nanoTime = System.nanoTime(); int count = getResourceManager().executeSave() + getResourceManager().save(get()); LoggerUtils.info(STR + TimeUnit.MILLISECONDS.convert((System.nanoTime() - nanoTime), TimeUnit.NANOSECONDS) / 1000.0 + STR + count + STR); nanoTime = System.nanoTime(); count = getResou...
/** * Saves all ranks */
Saves all ranks
save
{ "repo_name": "MarcinWieczorek/NovaGuilds", "path": "src/main/java/co/marcin/novaguilds/manager/RankManager.java", "license": "gpl-3.0", "size": 7421 }
[ "co.marcin.novaguilds.util.LoggerUtils", "java.util.concurrent.TimeUnit" ]
import co.marcin.novaguilds.util.LoggerUtils; import java.util.concurrent.TimeUnit;
import co.marcin.novaguilds.util.*; import java.util.concurrent.*;
[ "co.marcin.novaguilds", "java.util" ]
co.marcin.novaguilds; java.util;
2,320,643
protected void setXblShadowTree(BindableElement elt, XBLOMShadowTreeElement newShadow) { XBLOMShadowTreeElement oldShadow = (XBLOMShadowTreeElement) getXblShadowTree(elt); if (oldShadow != null) { fireShadowTreeEvent(elt, XBL_UNBINDING_EVEN...
void function(BindableElement elt, XBLOMShadowTreeElement newShadow) { XBLOMShadowTreeElement oldShadow = (XBLOMShadowTreeElement) getXblShadowTree(elt); if (oldShadow != null) { fireShadowTreeEvent(elt, XBL_UNBINDING_EVENT_TYPE, oldShadow); ContentManager cm = getContentManager(oldShadow); if (cm != null) { cm.dispose...
/** * Sets the shadow tree for the given bindable element. */
Sets the shadow tree for the given bindable element
setXblShadowTree
{ "repo_name": "apache/batik", "path": "batik-bridge/src/main/java/org/apache/batik/bridge/svg12/DefaultXBLManager.java", "license": "apache-2.0", "size": 70234 }
[ "org.apache.batik.anim.dom.BindableElement", "org.apache.batik.anim.dom.XBLOMShadowTreeElement", "org.apache.batik.constants.XMLConstants", "org.apache.batik.dom.AbstractDocument", "org.apache.batik.dom.xbl.XBLManager", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.apache.batik.anim.dom.BindableElement; import org.apache.batik.anim.dom.XBLOMShadowTreeElement; import org.apache.batik.constants.XMLConstants; import org.apache.batik.dom.AbstractDocument; import org.apache.batik.dom.xbl.XBLManager; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.Nod...
import org.apache.batik.anim.dom.*; import org.apache.batik.constants.*; import org.apache.batik.dom.*; import org.apache.batik.dom.xbl.*; import org.w3c.dom.*;
[ "org.apache.batik", "org.w3c.dom" ]
org.apache.batik; org.w3c.dom;
365,575
public static synchronized String getLocalHostName(int timeoutMs) { if (sLocalHost != null) { return sLocalHost; } try { sLocalHost = InetAddress.getByName(getLocalIpAddress(timeoutMs)).getCanonicalHostName(); return sLocalHost; } catch (UnknownHostException e) { throw Throwab...
static synchronized String function(int timeoutMs) { if (sLocalHost != null) { return sLocalHost; } try { sLocalHost = InetAddress.getByName(getLocalIpAddress(timeoutMs)).getCanonicalHostName(); return sLocalHost; } catch (UnknownHostException e) { throw Throwables.propagate(e); } }
/** * Gets a local host name for the host this JVM is running on. * * @param timeoutMs Timeout in milliseconds to use for checking that a possible local host is * reachable * @return the local host name, which is not based on a loopback ip address */
Gets a local host name for the host this JVM is running on
getLocalHostName
{ "repo_name": "yuluo-ding/alluxio", "path": "core/common/src/main/java/alluxio/util/network/NetworkAddressUtils.java", "license": "apache-2.0", "size": 22106 }
[ "com.google.common.base.Throwables", "java.net.InetAddress", "java.net.UnknownHostException" ]
import com.google.common.base.Throwables; import java.net.InetAddress; import java.net.UnknownHostException;
import com.google.common.base.*; import java.net.*;
[ "com.google.common", "java.net" ]
com.google.common; java.net;
1,264,686
public String getExportListDefaultFilename() { Date today = new Date(); DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); return new StringBuffer("instruments_").append(dateFormat.format(today)).toString(); }
String function() { Date today = new Date(); DateFormat dateFormat = new SimpleDateFormat(STR); return new StringBuffer(STR).append(dateFormat.format(today)).toString(); }
/** * The default filename when exporting an instrument list. Instrument-specific subclasses * can override this to provide an instrument-specific filename; * * @return the default filename, not including a filename extension */
The default filename when exporting an instrument list. Instrument-specific subclasses can override this to provide an instrument-specific filename
getExportListDefaultFilename
{ "repo_name": "UCSFMemoryAndAging/lava", "path": "lava-crms/src/edu/ucsf/lava/crms/assessment/model/Instrument.java", "license": "bsd-2-clause", "size": 27770 }
[ "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Date" ]
import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,276,351
private String[] parseMessageArgument(String argument) throws Exception { String[] parsed = new String[2]; List<String> arguments = Stream.of(argument.split("\"")).collect(Collectors.toList()); if(!arguments.get(0).equals("")){ return parsed; } String username = arguments.get(1); username = username.r...
String[] function(String argument) throws Exception { String[] parsed = new String[2]; List<String> arguments = Stream.of(argument.split("\"STRSTR\STRSTR "); } parsed[0] = username.trim(); parsed[1] = message.toString().trim(); return parsed; }
/** * This method creates an array with the parsed arguments * The first entry is the username and the second is the message * @param argument * @return * @throws Exception */
This method creates an array with the parsed arguments The first entry is the username and the second is the message
parseMessageArgument
{ "repo_name": "leonwetzel/Hanze-TwoPlayerGameServer", "path": "src/nl/hanze/gameserver/server/command/MessageCommandHandler.java", "license": "mit", "size": 3636 }
[ "java.util.List", "java.util.stream.Stream" ]
import java.util.List; import java.util.stream.Stream;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
1,550,182
@CheckReturnValue public static Label explicitLabel(Label implicitType){ if(!implicitType.getValue().startsWith("key") && implicitType.getValue().startsWith("has")){ throw new IllegalArgumentException(INVALID_IMPLICIT_TYPE.getMessage(implicitType)); } ...
static Label function(Label implicitType){ if(!implicitType.getValue().startsWith("key") && implicitType.getValue().startsWith("has")){ throw new IllegalArgumentException(INVALID_IMPLICIT_TYPE.getMessage(implicitType)); } int endIndex = implicitType.getValue().length(); if(implicitType.getValue().endsWith(STR) implicit...
/** * Helper method which converts the implicit type label back into the original label from which is was built. * * @param implicitType the implicit type label * @return The original label which was used to build this type */
Helper method which converts the implicit type label back into the original label from which is was built
explicitLabel
{ "repo_name": "sheldonkhall/grakn", "path": "grakn-core/src/main/java/ai/grakn/util/Schema.java", "license": "gpl-3.0", "size": 8942 }
[ "ai.grakn.concept.Label" ]
import ai.grakn.concept.Label;
import ai.grakn.concept.*;
[ "ai.grakn.concept" ]
ai.grakn.concept;
2,842,769
public static String createLanguageHeader() { String header; // get the default accept-language header value List<Locale> defaultLocales = OpenCms.getLocaleManager().getDefaultLocales(); Iterator<Locale> i = defaultLocales.iterator(); header = ""; while (i.hasNext()...
static String function() { String header; List<Locale> defaultLocales = OpenCms.getLocaleManager().getDefaultLocales(); Iterator<Locale> i = defaultLocales.iterator(); header = STR, "; } header = header.substring(0, header.length() - 2); return header; }
/** * Creates a value string for the HTTP Accept-Language header based on the default localed.<p> * * @return value string for the HTTP Accept-Language */
Creates a value string for the HTTP Accept-Language header based on the default localed
createLanguageHeader
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/i18n/CmsAcceptLanguageHeaderParser.java", "license": "lgpl-2.1", "size": 10369 }
[ "java.util.Iterator", "java.util.List", "java.util.Locale", "org.opencms.main.OpenCms" ]
import java.util.Iterator; import java.util.List; import java.util.Locale; import org.opencms.main.OpenCms;
import java.util.*; import org.opencms.main.*;
[ "java.util", "org.opencms.main" ]
java.util; org.opencms.main;
2,857,666
public Response invalidate(boolean storeRespCookie) throws IOException, URISyntaxException { resetURI(); reqURIBuild.setParameter("cmd", QueryCommand.INVALIDATE.name()); reqURIBuild.setParameter("param", "null"); return doRequest(new HttpGet(reqURIBuild.build()), storeRespCookie); }
Response function(boolean storeRespCookie) throws IOException, URISyntaxException { resetURI(); reqURIBuild.setParameter("cmd", QueryCommand.INVALIDATE.name()); reqURIBuild.setParameter("param", "null"); return doRequest(new HttpGet(reqURIBuild.build()), storeRespCookie); }
/** * Invalidate this clients session on the server */
Invalidate this clients session on the server
invalidate
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-assembly/src/test/java/org/apache/geode/session/tests/Client.java", "license": "apache-2.0", "size": 9844 }
[ "java.io.IOException", "java.net.URISyntaxException", "org.apache.geode.modules.session.QueryCommand", "org.apache.http.client.methods.HttpGet" ]
import java.io.IOException; import java.net.URISyntaxException; import org.apache.geode.modules.session.QueryCommand; import org.apache.http.client.methods.HttpGet;
import java.io.*; import java.net.*; import org.apache.geode.modules.session.*; import org.apache.http.client.methods.*;
[ "java.io", "java.net", "org.apache.geode", "org.apache.http" ]
java.io; java.net; org.apache.geode; org.apache.http;
2,331,473
public void sendWakeOnLAN(String ipAddr, String macAddress) throws MagentaTVException { try { byte[] macBytes = getMacBytes(macAddress); byte[] bytes = new byte[6 + 16 * macBytes.length]; for (int i = 0; i < 6; i++) { bytes[i] = (byte) 0xff; } ...
void function(String ipAddr, String macAddress) throws MagentaTVException { try { byte[] macBytes = getMacBytes(macAddress); byte[] bytes = new byte[6 + 16 * macBytes.length]; for (int i = 0; i < 6; i++) { bytes[i] = (byte) 0xff; } for (int i = 6; i < bytes.length; i += macBytes.length) { System.arraycopy(macBytes, 0, ...
/** * Send a Wake-on-LAN packet * * @param ipAddr destination ip * @param macAddress destination MAC address * @throws MagentaTVException */
Send a Wake-on-LAN packet
sendWakeOnLAN
{ "repo_name": "openhab/openhab2", "path": "bundles/org.openhab.binding.magentatv/src/main/java/org/openhab/binding/magentatv/internal/network/MagentaTVNetwork.java", "license": "epl-1.0", "size": 6103 }
[ "java.io.IOException", "java.net.DatagramPacket", "java.net.DatagramSocket", "java.net.InetAddress", "org.openhab.binding.magentatv.internal.MagentaTVException" ]
import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import org.openhab.binding.magentatv.internal.MagentaTVException;
import java.io.*; import java.net.*; import org.openhab.binding.magentatv.internal.*;
[ "java.io", "java.net", "org.openhab.binding" ]
java.io; java.net; org.openhab.binding;
1,446,279
public void attach(final View attachedView) { mAttachedView = attachedView; if (mAttachedView != null) { ViewParent parent = mAttachedView.getParent(); if (parent instanceof ViewGroup) { ViewGroup parentGroup = (ViewGroup) parent; ...
void function(final View attachedView) { mAttachedView = attachedView; if (mAttachedView != null) { ViewParent parent = mAttachedView.getParent(); if (parent instanceof ViewGroup) { ViewGroup parentGroup = (ViewGroup) parent; int positionInGroup = parentGroup.indexOfChild(mAttachedView); FrameLayout container = new Fra...
/** * Attache the current view to the provided view. * * @param attachedView * the view to attach the current view to. */
Attache the current view to the provided view
attach
{ "repo_name": "elbaquero/magnifyingview", "path": "MagnifyingViewLib/src/fr/elbaquero/magnifyingview/MagnifyingView.java", "license": "apache-2.0", "size": 11245 }
[ "android.view.View", "android.view.ViewGroup", "android.view.ViewParent", "android.widget.FrameLayout" ]
import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import android.widget.FrameLayout;
import android.view.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
1,988,480
@Test public void testPOR1712() throws IOException { LinneanClassification cl = new NameUsageMatch(); cl.setClazz("Hexapoda"); cl.setFamily("Staphylinidae"); cl.setGenus("Quedius"); cl.setKingdom("Animalia"); cl.setPhylum("Arthropoda"); assertMatch("Quedius caseyi divergens", cl, 4290501...
void function() throws IOException { LinneanClassification cl = new NameUsageMatch(); cl.setClazz(STR); cl.setFamily(STR); cl.setGenus(STR); cl.setKingdom(STR); cl.setPhylum(STR); assertMatch(STR, cl, 4290501, new IntRange(90, 100)); }
/** * Non existing species should match genus Quedius * http://dev.gbif.org/issues/browse/POR-1712 */
Non existing species should match genus Quedius HREF
testPOR1712
{ "repo_name": "gbif/checklistbank", "path": "checklistbank-nub/src/test/java/org/gbif/nub/lookup/fuzzy/NubMatchingServiceImplIT.java", "license": "apache-2.0", "size": 32927 }
[ "java.io.IOException", "org.apache.commons.lang.math.IntRange", "org.gbif.api.model.checklistbank.NameUsageMatch", "org.gbif.api.model.common.LinneanClassification" ]
import java.io.IOException; import org.apache.commons.lang.math.IntRange; import org.gbif.api.model.checklistbank.NameUsageMatch; import org.gbif.api.model.common.LinneanClassification;
import java.io.*; import org.apache.commons.lang.math.*; import org.gbif.api.model.checklistbank.*; import org.gbif.api.model.common.*;
[ "java.io", "org.apache.commons", "org.gbif.api" ]
java.io; org.apache.commons; org.gbif.api;
10,040
public ServiceFuture<OperationStatusResponseInner> beginDeallocateAsync(String resourceGroupName, String vmName, final ServiceCallback<OperationStatusResponseInner> serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); ...
ServiceFuture<OperationStatusResponseInner> function(String resourceGroupName, String vmName, final ServiceCallback<OperationStatusResponseInner> serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param serviceCallback the async ...
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses
beginDeallocateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/compute/mgmt-v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java", "license": "mit", "size": 186385 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,307,572
void removeListDataListener(ListDataListener l);
void removeListDataListener(ListDataListener l);
/** * Removes a listener from the list that's notified each time a * change to the data model occurs. * @param l the <code>ListDataListener</code> to be removed */
Removes a listener from the list that's notified each time a change to the data model occurs
removeListDataListener
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/javax/swing/ListModel.java", "license": "mit", "size": 2480 }
[ "javax.swing.event.ListDataListener" ]
import javax.swing.event.ListDataListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
1,110,164
ItemTypeDefinition getItemTypeDefinition(String typeCode) throws UnknownTypeException;
ItemTypeDefinition getItemTypeDefinition(String typeCode) throws UnknownTypeException;
/** * Returns the item definition for the given type. * * @param typeCode a {@link java.lang.String} object. * @return a {@link io.spotnext.infrastructure.type.support.ItemTypeDefinition} object. * @throws io.spotnext.infrastructure.exception.UnknownTypeException if any. */
Returns the item definition for the given type
getItemTypeDefinition
{ "repo_name": "mojo2012/spot-framework", "path": "spot-core/src/main/java/io/spotnext/core/infrastructure/service/TypeService.java", "license": "apache-2.0", "size": 2352 }
[ "io.spotnext.core.infrastructure.exception.UnknownTypeException", "io.spotnext.infrastructure.type.ItemTypeDefinition" ]
import io.spotnext.core.infrastructure.exception.UnknownTypeException; import io.spotnext.infrastructure.type.ItemTypeDefinition;
import io.spotnext.core.infrastructure.exception.*; import io.spotnext.infrastructure.type.*;
[ "io.spotnext.core", "io.spotnext.infrastructure" ]
io.spotnext.core; io.spotnext.infrastructure;
2,013,588
public static void main(String[] args) { SpringApplication.run(ConsumerApplication.class, args); } }
static void function(String[] args) { SpringApplication.run(ConsumerApplication.class, args); } }
/** * A main method to start this application. */
A main method to start this application
main
{ "repo_name": "objectiser/camel", "path": "examples/camel-example-spring-cloud-servicecall/consumer/src/main/java/org/apache/camel/example/ConsumerApplication.java", "license": "apache-2.0", "size": 2448 }
[ "org.springframework.boot.SpringApplication" ]
import org.springframework.boot.SpringApplication;
import org.springframework.boot.*;
[ "org.springframework.boot" ]
org.springframework.boot;
2,214,008
private void processINodesUC(DataInputStream in, ImageVisitor v, boolean skipBlocks) throws IOException { int numINUC = in.readInt(); v.visitEnclosingElement(ImageElement.INODES_UNDER_CONSTRUCTION, ImageElement.NUM_INODES_UNDER_CONSTRUCTION, numINUC); for(int i = 0; i < ...
void function(DataInputStream in, ImageVisitor v, boolean skipBlocks) throws IOException { int numINUC = in.readInt(); v.visitEnclosingElement(ImageElement.INODES_UNDER_CONSTRUCTION, ImageElement.NUM_INODES_UNDER_CONSTRUCTION, numINUC); for(int i = 0; i < numINUC; i++) { v.visitEnclosingElement(ImageElement.INODE_UNDER...
/** * Process the INodes under construction section of the fsimage. * * @param in DataInputStream to process * @param v Visitor to walk over inodes * @param skipBlocks Walk over each block? */
Process the INodes under construction section of the fsimage
processINodesUC
{ "repo_name": "gabrielborgesmagalhaes/hadoop-hdfs", "path": "src/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java", "license": "apache-2.0", "size": 9946 }
[ "java.io.DataInputStream", "java.io.IOException", "org.apache.hadoop.hdfs.protocol.DatanodeInfo", "org.apache.hadoop.hdfs.server.namenode.FSImage", "org.apache.hadoop.hdfs.tools.offlineImageViewer.ImageVisitor", "org.apache.hadoop.io.WritableUtils" ]
import java.io.DataInputStream; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.server.namenode.FSImage; import org.apache.hadoop.hdfs.tools.offlineImageViewer.ImageVisitor; import org.apache.hadoop.io.WritableUtils;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.tools.*; import org.apache.hadoop.io.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,676,491
public void setSignupEventTrackingInfo(SignupEventTrackingInfo signupEventTrackingInfo) { this.signupEventTrackingInfo = signupEventTrackingInfo; }
void function(SignupEventTrackingInfo signupEventTrackingInfo) { this.signupEventTrackingInfo = signupEventTrackingInfo; }
/** * This is a setter method. * * @param signupEventTrackingInfo * a SignupEventTrackingInfo object. */
This is a setter method
setSignupEventTrackingInfo
{ "repo_name": "rodriguezdevera/sakai", "path": "signup/tool/src/java/org/sakaiproject/signup/tool/jsf/organizer/action/SignupAction.java", "license": "apache-2.0", "size": 10202 }
[ "org.sakaiproject.signup.logic.messages.SignupEventTrackingInfo" ]
import org.sakaiproject.signup.logic.messages.SignupEventTrackingInfo;
import org.sakaiproject.signup.logic.messages.*;
[ "org.sakaiproject.signup" ]
org.sakaiproject.signup;
744,227
public static void setPaddingRelative(View view, int start, int top, int end, int bottom) { IMPL.setPaddingRelative(view, start, top, end, bottom); }
static void function(View view, int start, int top, int end, int bottom) { IMPL.setPaddingRelative(view, start, top, end, bottom); }
/** * Sets the relative padding. The view may add on the space required to display * the scrollbars, depending on the style and visibility of the scrollbars. * So the values returned from {@link #getPaddingStart}, {@link View#getPaddingTop}, * {@link #getPaddingEnd} and {@link View#getPaddingBottom}...
Sets the relative padding. The view may add on the space required to display the scrollbars, depending on the style and visibility of the scrollbars. So the values returned from <code>#getPaddingStart</code>, <code>View#getPaddingTop</code>, <code>#getPaddingEnd</code> and <code>View#getPaddingBottom</code> may be diff...
setPaddingRelative
{ "repo_name": "rytina/dukecon_appsgenerator", "path": "org.applause.lang.generator.android/sdk/extras/android/support/v4/src/java/android/support/v4/view/ViewCompat.java", "license": "epl-1.0", "size": 120271 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,471,440
@Override public Adapter createMaxRowCountAdapter() { if (maxRowCountItemProvider == null) { maxRowCountItemProvider = new MaxRowCountItemProvider(this); } return maxRowCountItemProvider; } protected OperationItemProvider operationItemProvider;
Adapter function() { if (maxRowCountItemProvider == null) { maxRowCountItemProvider = new MaxRowCountItemProvider(this); } return maxRowCountItemProvider; } protected OperationItemProvider operationItemProvider;
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.ds.MaxRowCount}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.ds.MaxRowCount</code>.
createMaxRowCountAdapter
{ "repo_name": "knadikariwso2/developer-studio", "path": "data-services/org.wso2.developerstudio.eclipse.ds.edit/src/org/wso2/developerstudio/eclipse/ds/provider/DsItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 34608 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,737,494
private void setSecureVaultProperty(API api, String tenantDomain, Environment environment, String operation) throws APIManagementException { boolean isSecureVaultEnabled = Boolean.parseBoolean(ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService(). ...
void function(API api, String tenantDomain, Environment environment, String operation) throws APIManagementException { boolean isSecureVaultEnabled = Boolean.parseBoolean(ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService(). getAPIManagerConfiguration().getFirstProperty(APIConstants.API_SECUREVAULT_...
/** * Store the secured endpoint username password to registry * @param api * @param tenantDomain * @param environment * @param operation -add,delete,update operations for an API * @throws APIManagementException */
Store the secured endpoint username password to registry
setSecureVaultProperty
{ "repo_name": "Arshardh/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIGatewayManager.java", "license": "apache-2.0", "size": 38043 }
[ "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.dto.Environment", "org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder", "org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient" ]
import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.dto.Environment; import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder; import org.wso2.carbon.apimgt.impl.utils.APIGatewayAdminClient;
import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.dto.*; import org.wso2.carbon.apimgt.impl.internal.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,160,525
@Override public LabeledVector apply(K k, V v) { LabeledVector res = basePreprocessor.apply(k, v); assert res.size() == means.length; for (int i = 0; i < res.size(); i++) res.set(i, (res.get(i) - means[i]) / sigmas[i]); return res; }
@Override LabeledVector function(K k, V v) { LabeledVector res = basePreprocessor.apply(k, v); assert res.size() == means.length; for (int i = 0; i < res.size(); i++) res.set(i, (res.get(i) - means[i]) / sigmas[i]); return res; }
/** * Applies this preprocessor. * * @param k Key. * @param v Value. * @return Preprocessed row. */
Applies this preprocessor
apply
{ "repo_name": "ilantukh/ignite", "path": "modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/standardscaling/StandardScalerPreprocessor.java", "license": "apache-2.0", "size": 3103 }
[ "org.apache.ignite.ml.structures.LabeledVector" ]
import org.apache.ignite.ml.structures.LabeledVector;
import org.apache.ignite.ml.structures.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,309,996
public void focusLost(FocusEvent e) { Object src = e.getSource(); if (src == namePane) { String text = namePane.getText(); editNames(); if (CommonsLangUtils.isBlank(text)) { namePane.getDocument().removeDocumentListener(this); namePane.setText(modifiedName); namePane.getDocument().addDocume...
void function(FocusEvent e) { Object src = e.getSource(); if (src == namePane) { String text = namePane.getText(); editNames(); if (CommonsLangUtils.isBlank(text)) { namePane.getDocument().removeDocumentListener(this); namePane.setText(modifiedName); namePane.getDocument().addDocumentListener(this); firePropertyChange(...
/** * Resets the default text of the text fields if <code>null</code> or * length <code>0</code>. * @see FocusListener#focusLost(FocusEvent) */
Resets the default text of the text fields if <code>null</code> or length <code>0</code>
focusLost
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/PropertiesUI.java", "license": "gpl-2.0", "size": 54678 }
[ "java.awt.event.FocusEvent", "org.openmicroscopy.shoola.util.CommonsLangUtils" ]
import java.awt.event.FocusEvent; import org.openmicroscopy.shoola.util.CommonsLangUtils;
import java.awt.event.*; import org.openmicroscopy.shoola.util.*;
[ "java.awt", "org.openmicroscopy.shoola" ]
java.awt; org.openmicroscopy.shoola;
130,844
public void reportCompletion(String callerName, String procName, ClientResponse response);
void function(String callerName, String procName, ClientResponse response);
/** * Used to report that a request completion details. * * @param callerName a name identifying the request invoker * @param procName name of the procedure that is used in the transaction request. * @param response ClientResponse with response details */
Used to report that a request completion details
reportCompletion
{ "repo_name": "deerwalk/voltdb", "path": "src/frontend/org/voltdb/InternalConnectionStatsCollector.java", "license": "agpl-3.0", "size": 1340 }
[ "org.voltdb.client.ClientResponse" ]
import org.voltdb.client.ClientResponse;
import org.voltdb.client.*;
[ "org.voltdb.client" ]
org.voltdb.client;
1,068,880
public DateTime updated() { return this.getDateTime("updated"); }
DateTime function() { return this.getDateTime(STR); }
/** * Return the updated timestamp for this object * @return DateTime **/
Return the updated timestamp for this object
updated
{ "repo_name": "worldline-messaging/activitystreams", "path": "core/src/main/java/com/ibm/common/activitystreams/ASObject.java", "license": "apache-2.0", "size": 65559 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,266,838
boolean matches(long numberOfRows, ColumnMetadata<ColumnStatistics> allColumnStatistics);
boolean matches(long numberOfRows, ColumnMetadata<ColumnStatistics> allColumnStatistics);
/** * Should the ORC reader process a file section with the specified statistics. * * @param numberOfRows the number of rows in the segment; this can be used with * {@code ColumnStatistics} to determine if a column is only null * @param allColumnStatistics column statistics */
Should the ORC reader process a file section with the specified statistics
matches
{ "repo_name": "electrum/presto", "path": "lib/trino-orc/src/main/java/io/trino/orc/OrcPredicate.java", "license": "apache-2.0", "size": 1203 }
[ "io.trino.orc.metadata.ColumnMetadata", "io.trino.orc.metadata.statistics.ColumnStatistics" ]
import io.trino.orc.metadata.ColumnMetadata; import io.trino.orc.metadata.statistics.ColumnStatistics;
import io.trino.orc.metadata.*; import io.trino.orc.metadata.statistics.*;
[ "io.trino.orc" ]
io.trino.orc;
1,059,969
PagingResponseTO<TheaterTO> findTheatersByBookingWeekAndRegionForPresaleReport( PagingRequestTO pagingRequestTO );
PagingResponseTO<TheaterTO> findTheatersByBookingWeekAndRegionForPresaleReport( PagingRequestTO pagingRequestTO );
/** * Finds the bookings associated to the theaters given its region and week * * @param pagingRequestTO * @return */
Finds the bookings associated to the theaters given its region and week
findTheatersByBookingWeekAndRegionForPresaleReport
{ "repo_name": "sidlors/digital-booking", "path": "digital-booking-services/src/main/java/mx/com/cinepolis/digital/booking/service/book/BookingServiceEJB.java", "license": "epl-1.0", "size": 11708 }
[ "mx.com.cinepolis.digital.booking.commons.to.PagingRequestTO", "mx.com.cinepolis.digital.booking.commons.to.PagingResponseTO", "mx.com.cinepolis.digital.booking.commons.to.TheaterTO" ]
import mx.com.cinepolis.digital.booking.commons.to.PagingRequestTO; import mx.com.cinepolis.digital.booking.commons.to.PagingResponseTO; import mx.com.cinepolis.digital.booking.commons.to.TheaterTO;
import mx.com.cinepolis.digital.booking.commons.to.*;
[ "mx.com.cinepolis" ]
mx.com.cinepolis;
1,548,856
public void actionAccept() throws IOException { acceptAgreement(); // redirect to the originally requested resource getJsp().getResponse().sendRedirect(getJsp().link(getParamWpres())); }
void function() throws IOException { acceptAgreement(); getJsp().getResponse().sendRedirect(getJsp().link(getParamWpres())); }
/** * Performs the the user agreement accept action, will be called by the JSP page.<p> * * @throws IOException if problems while redirecting occur */
Performs the the user agreement accept action, will be called by the JSP page
actionAccept
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/workplace/CmsLoginUserAgreement.java", "license": "lgpl-2.1", "size": 20024 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,375,580
public void setThumbBitmap(int index, Bitmap bitmap) { mBitmaps.put(index, bitmap); ((ImageView) getChildAt(index)).setImageBitmap(bitmap); }
void function(int index, Bitmap bitmap) { mBitmaps.put(index, bitmap); ((ImageView) getChildAt(index)).setImageBitmap(bitmap); }
/** * Set thumb bitmap for a given index of child. */
Set thumb bitmap for a given index of child
setThumbBitmap
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "leanback/src/main/java/androidx/leanback/widget/ThumbsBar.java", "license": "apache-2.0", "size": 11092 }
[ "android.graphics.Bitmap", "android.widget.ImageView" ]
import android.graphics.Bitmap; import android.widget.ImageView;
import android.graphics.*; import android.widget.*;
[ "android.graphics", "android.widget" ]
android.graphics; android.widget;
1,009,695
public SQLException getSQLException(String message, String messageId, SQLException next, int severity, Throwable t, Object[] args) { return new EmbedSQLException(message, messageId, next, severity, t, args); }
SQLException function(String message, String messageId, SQLException next, int severity, Throwable t, Object[] args) { return new EmbedSQLException(message, messageId, next, severity, t, args); }
/** * method to construct SQLException * version specific drivers can overload this method to create * version specific exceptions */
method to construct SQLException version specific drivers can overload this method to create version specific exceptions
getSQLException
{ "repo_name": "kavin256/Derby", "path": "java/engine/org/apache/derby/impl/jdbc/SQLExceptionFactory.java", "license": "apache-2.0", "size": 2232 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,855,625
public CertPath getSignerCertPath() { return signerCertPath; }
CertPath function() { return signerCertPath; }
/** * Returns the certificate path associated with this {@code CodeSigner}. * * @return the certificate path associated with this {@code CodeSigner}. */
Returns the certificate path associated with this CodeSigner
getSignerCertPath
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/security/src/main/java/common/java/security/CodeSigner.java", "license": "gpl-2.0", "size": 5223 }
[ "java.security.cert.CertPath" ]
import java.security.cert.CertPath;
import java.security.cert.*;
[ "java.security" ]
java.security;
68,008
protected void cleanupRuntimeProgram() { JMLCUtils.cleanupRuntimeProgram(runtimeProgram, (script.getOutputVariables() == null) ? new String[0] : script .getOutputVariables().toArray(new String[0])); }
void function() { JMLCUtils.cleanupRuntimeProgram(runtimeProgram, (script.getOutputVariables() == null) ? new String[0] : script .getOutputVariables().toArray(new String[0])); }
/** * Remove rmvar instructions so as to maintain registered outputs after the * program terminates. */
Remove rmvar instructions so as to maintain registered outputs after the program terminates
cleanupRuntimeProgram
{ "repo_name": "asurve/arvind-sysml", "path": "src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java", "license": "apache-2.0", "size": 22312 }
[ "org.apache.sysml.api.jmlc.JMLCUtils" ]
import org.apache.sysml.api.jmlc.JMLCUtils;
import org.apache.sysml.api.jmlc.*;
[ "org.apache.sysml" ]
org.apache.sysml;
289,107
EClass getRule();
EClass getRule();
/** * Returns the meta object for class '{@link eu.aspire_fp7.adss.rulesLanguage.Rule <em>Rule</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Rule</em>'. * @see eu.aspire_fp7.adss.rulesLanguage.Rule * @generated */
Returns the meta object for class '<code>eu.aspire_fp7.adss.rulesLanguage.Rule Rule</code>'.
getRule
{ "repo_name": "SPDSS/adss", "path": "eu.aspire_fp7.adss.rules/src-gen/eu/aspire_fp7/adss/rulesLanguage/RulesLanguagePackage.java", "license": "epl-1.0", "size": 15556 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
359,628
public void setMax(float max) { rangeArray.set(startingIndex * 2 + 1, new COSFloat(max)); } /** * {@inheritDoc}
void function(float max) { rangeArray.set(startingIndex * 2 + 1, new COSFloat(max)); } /** * {@inheritDoc}
/** * This will set the maximum value for the range. * * @param max The new maximum for the range. */
This will set the maximum value for the range
setMax
{ "repo_name": "gavanx/pdflearn", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRange.java", "license": "apache-2.0", "size": 3607 }
[ "org.apache.pdfbox.cos.COSFloat" ]
import org.apache.pdfbox.cos.COSFloat;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,458,182
public void bind() { glBindTexture(GL_TEXTURE_2D, textureID); }
void function() { glBindTexture(GL_TEXTURE_2D, textureID); }
/** * Bind the specified GL context to a texture */
Bind the specified GL context to a texture
bind
{ "repo_name": "MiFF-Stockholm/szo", "path": "src/gfx/Texture.java", "license": "gpl-2.0", "size": 3145 }
[ "org.lwjgl.opengl.GL11" ]
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.*;
[ "org.lwjgl.opengl" ]
org.lwjgl.opengl;
1,240,228
public static <T> List<T> order(Collection<T> collection, String orderProp, Order.Direction direction) { Comparator<T> comparator = new BeanComparator<>(orderProp); // reverse it if order is descending if (direction == Order.Direction.DESC) { comparator = new ReverseComparator(co...
static <T> List<T> function(Collection<T> collection, String orderProp, Order.Direction direction) { Comparator<T> comparator = new BeanComparator<>(orderProp); if (direction == Order.Direction.DESC) { comparator = new ReverseComparator(comparator); } List<T> result = new ArrayList<>(collection); Collections.sort(resul...
/** * Orders the provided collection using the provided ordering information. * @param collection the collection to order * @param orderProp the name of the property to order on * @param direction the ordering direction * @param <T> the type of the collection to order * @return a new list ...
Orders the provided collection using the provided ordering information
order
{ "repo_name": "kmadej/motech", "path": "platform/mds/mds/src/main/java/org/motechproject/mds/query/InMemoryQueryFilter.java", "license": "bsd-3-clause", "size": 3814 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.Comparator", "java.util.List", "org.apache.commons.beanutils.BeanComparator", "org.apache.commons.collections.comparators.ReverseComparator", "org.motechproject.mds.util.Order" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import org.apache.commons.beanutils.BeanComparator; import org.apache.commons.collections.comparators.ReverseComparator; import org.motechproject.mds.util.Order;
import java.util.*; import org.apache.commons.beanutils.*; import org.apache.commons.collections.comparators.*; import org.motechproject.mds.util.*;
[ "java.util", "org.apache.commons", "org.motechproject.mds" ]
java.util; org.apache.commons; org.motechproject.mds;
2,137,431
EClass getAtelier();
EClass getAtelier();
/** * Returns the meta object for class '{@link exploitation.Atelier <em>Atelier</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Atelier</em>'. * @see exploitation.Atelier * @generated */
Returns the meta object for class '<code>exploitation.Atelier Atelier</code>'.
getAtelier
{ "repo_name": "JeanHany/farmingdsl2", "path": "fr.esir.lsi.langage/src/exploitation/ExploitationPackage.java", "license": "mit", "size": 30967 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,152,738
private QueryResult getDone(NoteItem master, TriageStatusQueryContext context) { QueryResult qr = new QueryResult(); // get the most recently occurred modification or occurrence NoteItem result = getDoneFromRecurringNote(master, context); ...
QueryResult function(NoteItem master, TriageStatusQueryContext context) { QueryResult qr = new QueryResult(); NoteItem result = getDoneFromRecurringNote(master, context); if(result!=null) { qr.getMasters().add(master); qr.getResults().add(result); } Set<NoteItem> mods = getModificationsByTriageStatus(master, TriageStat...
/** * DONE Query for a specific master NoteItem:<br/> * - the last occurring modification * with triage status DONE or the last occurrence, whichever occurred * most recently * @param master NoteItem * @param context TriageStatusQueryContext * @return QueryResult ...
DONE Query for a specific master NoteItem: - the last occurring modification with triage status DONE or the last occurrence, whichever occurred most recently
getDone
{ "repo_name": "1and1/cosmo", "path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/service/impl/StandardTriageStatusQueryProcessor.java", "license": "apache-2.0", "size": 31235 }
[ "java.util.Set", "org.unitedinternet.cosmo.model.NoteItem", "org.unitedinternet.cosmo.model.TriageStatus", "org.unitedinternet.cosmo.service.triage.TriageStatusQueryContext" ]
import java.util.Set; import org.unitedinternet.cosmo.model.NoteItem; import org.unitedinternet.cosmo.model.TriageStatus; import org.unitedinternet.cosmo.service.triage.TriageStatusQueryContext;
import java.util.*; import org.unitedinternet.cosmo.model.*; import org.unitedinternet.cosmo.service.triage.*;
[ "java.util", "org.unitedinternet.cosmo" ]
java.util; org.unitedinternet.cosmo;
857,311
private static AbstractFrame findFrame(AbstractFrame frame, DetailAST name, boolean lookForMethod) { final AbstractFrame result; if (frame == null) { result = null; } else { result = frame.getIfContains(name, lookForMethod); } retur...
static AbstractFrame function(AbstractFrame frame, DetailAST name, boolean lookForMethod) { final AbstractFrame result; if (frame == null) { result = null; } else { result = frame.getIfContains(name, lookForMethod); } return result; }
/** * Find frame containing declaration. * @param frame The parent frame to searching in. * @param name IDENT ast of the declaration to find. * @param lookForMethod whether we are looking for a method name. * @return AbstractFrame containing declaration or null. */
Find frame containing declaration
findFrame
{ "repo_name": "nikhilgupta23/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java", "license": "lgpl-2.1", "size": 50485 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
1,112,344
public ActionForward execute( final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response ) throws Exception { // Get shopping cart ShoppingCart cart = this.getShoppingCart(request); // Get form bea...
ActionForward function( final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response ) throws Exception { ShoppingCart cart = this.getShoppingCart(request); PlotParametersForm ppf = (PlotParametersForm) form; Long plotId = Long.parseLong(request.getParameter("...
/** * Execute action. * @param mapping Routing information for downstream actions * @param form Form data * @param request Servlet request object * @param response Servlet response object * @return Identification of downstream action as configured in the * struts-config.xml file ...
Execute action
execute
{ "repo_name": "NCIP/webgenome", "path": "tags/WEBGENOME_R3.2_6MAR2009_BUILD1/java/webui/src/org/rti/webgenome/webui/struts/cart/SetPlotParametersAction.java", "license": "bsd-3-clause", "size": 2254 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.rti.webgenome.domain.Plot", "org.rti.webgenome.domain.ShoppingCart", "org.rti.webgenome.ser...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.rti.webgenome.domain.Plot; import org.rti.webgenome.domain.ShoppingCart; impor...
import javax.servlet.http.*; import org.apache.struts.action.*; import org.rti.webgenome.domain.*; import org.rti.webgenome.service.plot.*; import org.rti.webgenome.webui.util.*;
[ "javax.servlet", "org.apache.struts", "org.rti.webgenome" ]
javax.servlet; org.apache.struts; org.rti.webgenome;
1,401,193
void updateAttachment( @Nullable WindowAndroid window, @Nullable TabDelegateFactory tabDelegateFactory);
void updateAttachment( @Nullable WindowAndroid window, @Nullable TabDelegateFactory tabDelegateFactory);
/** * Update the attachment state to Window(Activity). * @param window A new {@link WindowAndroid} to attach the tab to. If {@code null}, * the tab is being detached. See {@link ReparentingTask#detach()} for details. * @param tabDelegateFactory The new delegate factory this tab should be usin...
Update the attachment state to Window(Activity)
updateAttachment
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/Tab.java", "license": "bsd-3-clause", "size": 9466 }
[ "androidx.annotation.Nullable", "org.chromium.ui.base.WindowAndroid" ]
import androidx.annotation.Nullable; import org.chromium.ui.base.WindowAndroid;
import androidx.annotation.*; import org.chromium.ui.base.*;
[ "androidx.annotation", "org.chromium.ui" ]
androidx.annotation; org.chromium.ui;
1,657,554
private static Coder<?> inferCoderFromObjects( CoderRegistry registry, Iterable<?> elems) throws CannotProvideCoderException { Optional<Coder<?>> coder = Optional.absent(); for (Object elem : elems) { Coder<?> c = inferCoderFromObject(registry, elem); if (!coder.isPresent()) { coder ...
static Coder<?> function( CoderRegistry registry, Iterable<?> elems) throws CannotProvideCoderException { Optional<Coder<?>> coder = Optional.absent(); for (Object elem : elems) { Coder<?> c = inferCoderFromObject(registry, elem); if (!coder.isPresent()) { coder = (Optional) Optional.of(c); } else if (!Objects.equals(c...
/** * Attempts to infer the {@link Coder} of the elements ensuring that the returned coder is * equivalent for all elements. */
Attempts to infer the <code>Coder</code> of the elements ensuring that the returned coder is equivalent for all elements
inferCoderFromObjects
{ "repo_name": "jbonofre/beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Create.java", "license": "apache-2.0", "size": 29338 }
[ "com.google.common.base.Optional", "java.util.Objects", "org.apache.beam.sdk.coders.CannotProvideCoderException", "org.apache.beam.sdk.coders.Coder", "org.apache.beam.sdk.coders.CoderRegistry" ]
import com.google.common.base.Optional; import java.util.Objects; import org.apache.beam.sdk.coders.CannotProvideCoderException; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.CoderRegistry;
import com.google.common.base.*; import java.util.*; import org.apache.beam.sdk.coders.*;
[ "com.google.common", "java.util", "org.apache.beam" ]
com.google.common; java.util; org.apache.beam;
285,331
DataOutputStream dataOutputStream = null; ByteArrayOutputStream blockDataArray = null; int totalSize = 0; int recordSize = 0; try { recordSize = (measureCount * CarbonCommonConstants.DOUBLE_SIZE_IN_BYTE) + (dimensionCount * CarbonCommonConstants.INT_SIZE_IN_BYTE); totalSize = recor...
DataOutputStream dataOutputStream = null; ByteArrayOutputStream blockDataArray = null; int totalSize = 0; int recordSize = 0; try { recordSize = (measureCount * CarbonCommonConstants.DOUBLE_SIZE_IN_BYTE) + (dimensionCount * CarbonCommonConstants.INT_SIZE_IN_BYTE); totalSize = records.length * recordSize; blockDataArray...
/** * Below method will be used to write the sort temp file * * @param records */
Below method will be used to write the sort temp file
writeSortTempFile
{ "repo_name": "ashokblend/incubator-carbondata", "path": "processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/CompressedTempSortFileWriter.java", "license": "apache-2.0", "size": 3018 }
[ "java.io.ByteArrayOutputStream", "java.io.DataOutputStream", "java.io.IOException", "org.apache.carbondata.core.constants.CarbonCommonConstants", "org.apache.carbondata.core.datastorage.store.compression.CompressorFactory", "org.apache.carbondata.core.util.CarbonUtil", "org.apache.carbondata.processing....
import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.carbondata.core.constants.CarbonCommonConstants; import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory; import org.apache.carbondata.core.util.CarbonUtil; import org.apache.ca...
import java.io.*; import org.apache.carbondata.core.constants.*; import org.apache.carbondata.core.datastorage.store.compression.*; import org.apache.carbondata.core.util.*; import org.apache.carbondata.processing.sortandgroupby.exception.*;
[ "java.io", "org.apache.carbondata" ]
java.io; org.apache.carbondata;
316,078
public static synchronized void shutdown(String url, String password, boolean force, boolean all) throws SQLException { try { int port = Constants.DEFAULT_TCP_PORT; int idx = url.lastIndexOf(':'); if (idx >= 0) { String p = url.substring(idx + ...
static synchronized void function(String url, String password, boolean force, boolean all) throws SQLException { try { int port = Constants.DEFAULT_TCP_PORT; int idx = url.lastIndexOf(':'); if (idx >= 0) { String p = url.substring(idx + 1); if (StringUtils.isNumber(p)) { port = Integer.decode(p); } } String db = getMan...
/** * Stop the TCP server with the given URL. * * @param url the database URL * @param password the password * @param force if the server should be stopped immediately * @param all whether all TCP servers that are running in the JVM should be * stopped */
Stop the TCP server with the given URL
shutdown
{ "repo_name": "miloszpiglas/h2mod", "path": "src/main/org/h2/server/TcpServer.java", "license": "mpl-2.0", "size": 16231 }
[ "java.sql.Connection", "java.sql.DriverManager", "java.sql.PreparedStatement", "java.sql.SQLException", "org.h2.Driver", "org.h2.api.ErrorCode", "org.h2.engine.Constants", "org.h2.message.DbException", "org.h2.util.JdbcUtils", "org.h2.util.StringUtils" ]
import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import org.h2.Driver; import org.h2.api.ErrorCode; import org.h2.engine.Constants; import org.h2.message.DbException; import org.h2.util.JdbcUtils; import org.h2.util.StringUtils;
import java.sql.*; import org.h2.*; import org.h2.api.*; import org.h2.engine.*; import org.h2.message.*; import org.h2.util.*;
[ "java.sql", "org.h2", "org.h2.api", "org.h2.engine", "org.h2.message", "org.h2.util" ]
java.sql; org.h2; org.h2.api; org.h2.engine; org.h2.message; org.h2.util;
2,701,710
public void processAction(ActionEvent ae) throws AbortProcessingException { //log.info("StartRemoveItemsListener:"); QuestionPoolBean qpoolbean= (QuestionPoolBean) cu.lookupBean("questionpool"); if (!startRemoveItems(qpoolbean)) { throw new RuntimeException("failed to startRemoveItems."); ...
void function(ActionEvent ae) throws AbortProcessingException { QuestionPoolBean qpoolbean= (QuestionPoolBean) cu.lookupBean(STR); if (!startRemoveItems(qpoolbean)) { throw new RuntimeException(STR); } }
/** * Standard process action method. * @param ae ActionEvent * @throws AbortProcessingException */
Standard process action method
processAction
{ "repo_name": "clhedrick/sakai", "path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/questionpool/StartRemoveItemsListener.java", "license": "apache-2.0", "size": 3462 }
[ "javax.faces.event.AbortProcessingException", "javax.faces.event.ActionEvent", "org.sakaiproject.tool.assessment.ui.bean.questionpool.QuestionPoolBean" ]
import javax.faces.event.AbortProcessingException; import javax.faces.event.ActionEvent; import org.sakaiproject.tool.assessment.ui.bean.questionpool.QuestionPoolBean;
import javax.faces.event.*; import org.sakaiproject.tool.assessment.ui.bean.questionpool.*;
[ "javax.faces", "org.sakaiproject.tool" ]
javax.faces; org.sakaiproject.tool;
1,953,684
public void updateAlertDefinitions(StatAlertDefinition[] alertDefs, int actionCode) { //TODO: is the check for valid AdminResponse required sendAsync(UpdateAlertDefinitionMessage.create(alertDefs, actionCode)); }
void function(StatAlertDefinition[] alertDefs, int actionCode) { sendAsync(UpdateAlertDefinitionMessage.create(alertDefs, actionCode)); }
/** * This method would be used to set Sta Alert Definitions for the GemFireVM. * This method would mostly be called on each member after initial set up * whenever one or more Stat Alert Definitions get added/updated/removed. * * @param alertDefs an array of StaAlertDefinition objects * @param acti...
This method would be used to set Sta Alert Definitions for the GemFireVM. This method would mostly be called on each member after initial set up whenever one or more Stat Alert Definitions get added/updated/removed
updateAlertDefinitions
{ "repo_name": "papicella/snappy-store", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGemFireVM.java", "license": "apache-2.0", "size": 32334 }
[ "com.gemstone.gemfire.internal.admin.StatAlertDefinition" ]
import com.gemstone.gemfire.internal.admin.StatAlertDefinition;
import com.gemstone.gemfire.internal.admin.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
462,698
public static void write(final ScanContext context, final String device_name, final Object value, final double tolerance, final Duration timeout) throws Exception { write(context, device_name, value, false, true, device_name, tolerance, timeout); }
static void function(final ScanContext context, final String device_name, final Object value, final double tolerance, final Duration timeout) throws Exception { write(context, device_name, value, false, true, device_name, tolerance, timeout); }
/** Write to device with readback, waiting forever, logging if the context * was configured to auto-log * * @param device_name Name of device * @param value Value to write to the device * @param tolerance Numeric tolerance when checking value * @param timeout Timeout in seconds, <code...
Write to device with readback, waiting forever, logging if the context was configured to auto-log
write
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "applications/scan/scan-plugins/org.csstudio.scan.server/src/org/csstudio/scan/server/ScanCommandUtil.java", "license": "epl-1.0", "size": 2858 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
1,378,101
void updateRememberMeToken(String series, String tokenValue, Date lastUsed);
void updateRememberMeToken(String series, String tokenValue, Date lastUsed);
/** * Updates Remember Me token for {@code series}. * * @param series the series to update * @param tokenValue new token value * @param lastUsed resets the time the token was last used */
Updates Remember Me token for series
updateRememberMeToken
{ "repo_name": "lrimkus/Butter", "path": "src/main/java/com/miserablemind/butter/domain/model/user/user_persistent_logins/UserPersistentTokenDao.java", "license": "mit", "size": 1880 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
310,972
@Override public boolean isAutoIncrement(int column) throws SQLException { return false; }
boolean function(int column) throws SQLException { return false; }
/** * * Is the column an autoincrement (identity, counter) column? * @see java.sql.ResultSetMetaData#isAutoIncrement * @return false - tinySQL does not support autoincrement columns * */
Is the column an autoincrement (identity, counter) column
isAutoIncrement
{ "repo_name": "ryangoodrich/GT_CS4420_Spring_2013_TinySQL", "path": "com/sqlmagic/tinysql/tinySQLResultSetMetaData.java", "license": "lgpl-2.1", "size": 9810 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
933,582
@Test() public void testGeneral() throws Exception { AnyAttributesChangeSelectionCriteria c = new AnyAttributesChangeSelectionCriteria("givenName", "sn"); final ChangelogBatchChangeSelectionCriteria decodedCriteria = ChangelogBatchChangeSelectionCriteria.decode(c.encode()); ...
@Test() void function() throws Exception { AnyAttributesChangeSelectionCriteria c = new AnyAttributesChangeSelectionCriteria(STR, "sn"); final ChangelogBatchChangeSelectionCriteria decodedCriteria = ChangelogBatchChangeSelectionCriteria.decode(c.encode()); assertNotNull(decodedCriteria); assertTrue(decodedCriteria inst...
/** * Provides general test coverage for the any attributes change selection * criteria object type. * * @throws Exception If an unexpected problem occurs. */
Provides general test coverage for the any attributes change selection criteria object type
testGeneral
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/extensions/AnyAttributesChangeSelectionCriteriaTestCase.java", "license": "gpl-2.0", "size": 3211 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
361,846
@Deprecated List<File> getSourceFiles(Language... langs);
List<File> getSourceFiles(Language... langs);
/** * Source files, excluding unit tests and files matching project exclusion patterns. * * @param langs language filter. Check all files, whatever their language, if null or empty. * @deprecated since 2.6 use {@link #mainFiles(String...)} instead. * See http://jira.codehaus.org/browse/SONAR...
Source files, excluding unit tests and files matching project exclusion patterns
getSourceFiles
{ "repo_name": "jmecosta/sonar", "path": "sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectFileSystem.java", "license": "lgpl-3.0", "size": 5085 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,949,599
public void init() throws IdentityOAuth2Exception;
void function() throws IdentityOAuth2Exception;
/** * Initialize the OAuth 2.0 client authentication handler * * @throws org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception Error when initializing the OAuth 2.0 client authentication handler. */
Initialize the OAuth 2.0 client authentication handler
init
{ "repo_name": "wattale/carbon-identity", "path": "components/identity/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/clientauth/ClientAuthenticationHandler.java", "license": "apache-2.0", "size": 2049 }
[ "org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception" ]
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
260,626
public static String encodeBytes(byte[] source, int off, int len, int options) { // Isolate options int dontBreakLines = (options & DONT_BREAK_LINES); int gzip = (options & GZIP); // Compress? if (gzip == GZIP) { java.io.ByteArrayOutputStream baos = null; jav...
static String function(byte[] source, int off, int len, int options) { int dontBreakLines = (options & DONT_BREAK_LINES); int gzip = (options & GZIP); if (gzip == GZIP) { java.io.ByteArrayOutputStream baos = null; java.util.zip.GZIPOutputStream gzos = null; Base64.OutputStream b64os = null; try { baos = new java.io.Byt...
/** * Encodes a byte array into Base64 notation. * <p> * Valid options:<pre> * GZIP: gzip-compresses object before encoding it. * DONT_BREAK_LINES: don't break lines at 76 characters * <i>Note: Technically, this makes your encoding non-compliant.</i> * </pre> * <p> * Example:...
Encodes a byte array into Base64 notation. Valid options:<code> Note: Technically, this makes your encoding non-compliant. </code> Example: <code>encodeBytes( myData, Base64.GZIP )</code> or Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code>
encodeBytes
{ "repo_name": "jboss/jboss-common-core", "path": "src/main/java/org/jboss/util/Base64.java", "license": "apache-2.0", "size": 49206 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
144,758
private void preparePrism(ItemStack itemStack, Slope slope, int x, int y, int z) { int POINT_N = 0; int POINT_S = 1; int POINT_W = 2; int POINT_E = 3; List<Integer> pieceList = new ArrayList<Integer>(); if (slope.facings.contains(ForgeDirection.NORTH)) ...
void function(ItemStack itemStack, Slope slope, int x, int y, int z) { int POINT_N = 0; int POINT_S = 1; int POINT_W = 2; int POINT_E = 3; List<Integer> pieceList = new ArrayList<Integer>(); if (slope.facings.contains(ForgeDirection.NORTH)) { pieceList.add(POINT_N); } if (slope.facings.contains(ForgeDirection.SOUTH)) {...
/** * Will set lighting and render prism sloped faces. */
Will set lighting and render prism sloped faces
preparePrism
{ "repo_name": "Mineshopper/carpentersblocks", "path": "src/main/java/com/carpentersblocks/renderer/BlockHandlerCarpentersSlope.java", "license": "lgpl-2.1", "size": 69932 }
[ "com.carpentersblocks.data.Slope", "com.carpentersblocks.renderer.helper.VertexHelper", "java.util.ArrayList", "java.util.List", "net.minecraft.item.ItemStack", "net.minecraftforge.common.util.ForgeDirection" ]
import com.carpentersblocks.data.Slope; import com.carpentersblocks.renderer.helper.VertexHelper; import java.util.ArrayList; import java.util.List; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection;
import com.carpentersblocks.data.*; import com.carpentersblocks.renderer.helper.*; import java.util.*; import net.minecraft.item.*; import net.minecraftforge.common.util.*;
[ "com.carpentersblocks.data", "com.carpentersblocks.renderer", "java.util", "net.minecraft.item", "net.minecraftforge.common" ]
com.carpentersblocks.data; com.carpentersblocks.renderer; java.util; net.minecraft.item; net.minecraftforge.common;
1,273,776
protected int[] computeIndices(int no) throws FormatException, IOException { if (noStitch) return new int[] {0, no}; int sno = getCoreIndex(); ExternalSeries s = externals[getExternalSeries()]; int[] axes = s.getAxisGuesser().getAxisTypes(); int[] count = s.getFilePattern().getCount(); if (a...
int[] function(int no) throws FormatException, IOException { if (noStitch) return new int[] {0, no}; int sno = getCoreIndex(); ExternalSeries s = externals[getExternalSeries()]; int[] axes = s.getAxisGuesser().getAxisTypes(); int[] count = s.getFilePattern().getCount(); if (axes.length == 0) { axes = new int[] {AxisGue...
/** * Gets the file index, and image index into that file, * corresponding to the given global image index. * * @return An array of size 2, dimensioned {file index, image index}. */
Gets the file index, and image index into that file, corresponding to the given global image index
computeIndices
{ "repo_name": "dominikl/bioformats", "path": "components/formats-bsd/src/loci/formats/FileStitcher.java", "license": "gpl-2.0", "size": 40609 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
887,868
public static Set<String> findResourcePaths(String rootLocation, String nameFilter, Set<String> excludedPaths) { return scanForResourcePaths(rootLocation, nameFilter, excludedPaths); }
static Set<String> function(String rootLocation, String nameFilter, Set<String> excludedPaths) { return scanForResourcePaths(rootLocation, nameFilter, excludedPaths); }
/** * <p> * Finds the path of all resources that match the given conditions by * scanning the file systme under the given {@code rootLocation}. * </p> * * @param rootLocation * The location where to scan. * @param excludedPaths * List of paths which will be exclu...
Finds the path of all resources that match the given conditions by scanning the file systme under the given rootLocation.
findResourcePaths
{ "repo_name": "pioto/dandelion", "path": "dandelion-core/src/main/java/com/github/dandelion/core/util/scanner/FileSystemResourceScanner.java", "license": "bsd-3-clause", "size": 8176 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,022,901
private void putFirstResult(JpaQueryLayer<?> query) { ObjectUtils.nonNull(startPosition, query::setFirstResult); }
void function(JpaQueryLayer<?> query) { ObjectUtils.nonNull(startPosition, query::setFirstResult); }
/** * Sets first result flag to query * * @param query */
Sets first result flag to query
putFirstResult
{ "repo_name": "levants/lightmare", "path": "lightmare-criteria/src/main/java/org/lightmare/criteria/query/providers/jpa/AbstractJpaQueryWrapper.java", "license": "lgpl-2.1", "size": 4025 }
[ "org.lightmare.criteria.query.providers.jpa.layers.JpaQueryLayer", "org.lightmare.criteria.utils.ObjectUtils" ]
import org.lightmare.criteria.query.providers.jpa.layers.JpaQueryLayer; import org.lightmare.criteria.utils.ObjectUtils;
import org.lightmare.criteria.query.providers.jpa.layers.*; import org.lightmare.criteria.utils.*;
[ "org.lightmare.criteria" ]
org.lightmare.criteria;
416,820
@SuppressWarnings("unchecked") public static <T> T[] toArray(Iterable<? extends T> list, Class<T> c) { int size = -1; if(list instanceof Collection<?>){ @SuppressWarnings("rawtypes") Collection coll = (Collection)list; size = coll.size(); } ...
@SuppressWarnings(STR) static <T> T[] function(Iterable<? extends T> list, Class<T> c) { int size = -1; if(list instanceof Collection<?>){ @SuppressWarnings(STR) Collection coll = (Collection)list; size = coll.size(); } if(size < 0){ size = 0; for(@SuppressWarnings(STR) T element : list){ size++; } } T[] result = (T[])...
/** * Converts an iterable element collection to an array of elements. * The iteration order of the specified object will be used as the array element order. * @param list The iterable of objects which will be converted to an array. * @param c The type of the elements of the array. * @return An...
Converts an iterable element collection to an array of elements. The iteration order of the specified object will be used as the array element order
toArray
{ "repo_name": "TealCube/fanciful", "path": "src/main/java/net/amoebaman/util/ArrayWrapper.java", "license": "isc", "size": 3982 }
[ "java.lang.reflect.Array", "java.util.Collection" ]
import java.lang.reflect.Array; import java.util.Collection;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,572,300
private ArrayList<AccountListItem> getAccountListItems(ReceiveExternalFilesActivity activity) { Account[] accountList = activity.mAccountManager.getAccountsByType(MainApp.getAccountType()); ArrayList<AccountListItem> adapterAccountList = new ArrayList<>(accountList.length); f...
ArrayList<AccountListItem> function(ReceiveExternalFilesActivity activity) { Account[] accountList = activity.mAccountManager.getAccountsByType(MainApp.getAccountType()); ArrayList<AccountListItem> adapterAccountList = new ArrayList<>(accountList.length); for (Account account : accountList) { adapterAccountList.add(new...
/** * creates the account list items list including the add-account action in case multiaccount_support is enabled. * * @return list of account list items */
creates the account list items list including the add-account action in case multiaccount_support is enabled
getAccountListItems
{ "repo_name": "zmatsuo/android", "path": "src/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java", "license": "gpl-2.0", "size": 47920 }
[ "android.accounts.Account", "com.owncloud.android.MainApp", "com.owncloud.android.ui.adapter.AccountListItem", "java.util.ArrayList" ]
import android.accounts.Account; import com.owncloud.android.MainApp; import com.owncloud.android.ui.adapter.AccountListItem; import java.util.ArrayList;
import android.accounts.*; import com.owncloud.android.*; import com.owncloud.android.ui.adapter.*; import java.util.*;
[ "android.accounts", "com.owncloud.android", "java.util" ]
android.accounts; com.owncloud.android; java.util;
816,108
protected Object readResolve() throws ObjectStreamException { return prj.events(); }
Object function() throws ObjectStreamException { return prj.events(); }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */
Reconstructs object on unmarshalling
readResolve
{ "repo_name": "agoncharuk/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/IgniteEventsImpl.java", "license": "apache-2.0", "size": 8821 }
[ "java.io.ObjectStreamException" ]
import java.io.ObjectStreamException;
import java.io.*;
[ "java.io" ]
java.io;
2,073,074
protected KualiDecimal calculateSumTotal(List<SourceAccountingLine> accounts) { KualiDecimal total = KualiDecimal.ZERO; for (SourceAccountingLine accountingLine : accounts) { KualiDecimal amt = KualiDecimal.ZERO; if (ObjectUtils.isNotNull(accountingLine.getAmount())) { ...
KualiDecimal function(List<SourceAccountingLine> accounts) { KualiDecimal total = KualiDecimal.ZERO; for (SourceAccountingLine accountingLine : accounts) { KualiDecimal amt = KualiDecimal.ZERO; if (ObjectUtils.isNotNull(accountingLine.getAmount())) { amt = accountingLine.getAmount(); } total = total.add(amt); } return ...
/** * gets sum total of accounts * * @param accounts * @return */
gets sum total of accounts
calculateSumTotal
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/purap/service/impl/PurapAccountingServiceImpl.java", "license": "agpl-3.0", "size": 73381 }
[ "java.util.List", "org.kuali.kfs.sys.businessobject.SourceAccountingLine", "org.kuali.rice.core.api.util.type.KualiDecimal", "org.kuali.rice.krad.util.ObjectUtils" ]
import java.util.List; import org.kuali.kfs.sys.businessobject.SourceAccountingLine; import org.kuali.rice.core.api.util.type.KualiDecimal; import org.kuali.rice.krad.util.ObjectUtils;
import java.util.*; import org.kuali.kfs.sys.businessobject.*; import org.kuali.rice.core.api.util.type.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
1,213,320
Map<Long, Long> selectParentNodeId(List<Long> child_id) throws SaodException;
Map<Long, Long> selectParentNodeId(List<Long> child_id) throws SaodException;
/** * return parent node id of selected node * * @return Map<node_id, size> * @throws SaodException */
return parent node id of selected node
selectParentNodeId
{ "repo_name": "jeci-sarl/stats-alfresco-on-database", "path": "src/main/java/fr/jeci/alfresco/saod/sql/AlfrescoDao.java", "license": "apache-2.0", "size": 968 }
[ "fr.jeci.alfresco.saod.SaodException", "java.util.List", "java.util.Map" ]
import fr.jeci.alfresco.saod.SaodException; import java.util.List; import java.util.Map;
import fr.jeci.alfresco.saod.*; import java.util.*;
[ "fr.jeci.alfresco", "java.util" ]
fr.jeci.alfresco; java.util;
1,323,472
public void fillRandom(int numWidgets, boolean includeSetWidgets) { super.fillRandom(); PersistenceManager myPM = JDOHelper.getPersistenceManager(this); Iterator i = new ArrayList(normalSet).iterator(); while (i.hasNext()) { Object obj = i....
void function(int numWidgets, boolean includeSetWidgets) { super.fillRandom(); PersistenceManager myPM = JDOHelper.getPersistenceManager(this); Iterator i = new ArrayList(normalSet).iterator(); while (i.hasNext()) { Object obj = i.next(); Assert.assertTrue(STR, normalSet.remove(obj)); Assert.assertTrue(STR, !normalSet....
/** * Fills the collection fields with the given number of random Widget * objects. */
Fills the collection fields with the given number of random Widget objects
fillRandom
{ "repo_name": "datanucleus/tests", "path": "jdo/rdbms/src/java/org/datanucleus/samples/widget/HashSetWidget.java", "license": "apache-2.0", "size": 5555 }
[ "java.util.ArrayList", "java.util.Iterator", "javax.jdo.JDOHelper", "javax.jdo.PersistenceManager", "org.junit.Assert" ]
import java.util.ArrayList; import java.util.Iterator; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManager; import org.junit.Assert;
import java.util.*; import javax.jdo.*; import org.junit.*;
[ "java.util", "javax.jdo", "org.junit" ]
java.util; javax.jdo; org.junit;
1,602,169
@Auditable(parameters = {"userName", "nodeRef"}) boolean isFavourite(String userName, NodeRef nodeRef);
@Auditable(parameters = {STR, STR}) boolean isFavourite(String userName, NodeRef nodeRef);
/** * Is the entity identified by nodeRef a favourite document of user "userName". * * @param userName String * @param nodeRef NodeRef * @return boolean */
Is the entity identified by nodeRef a favourite document of user "userName"
isFavourite
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/service/cmr/favourites/FavouritesService.java", "license": "lgpl-3.0", "size": 4613 }
[ "org.alfresco.service.Auditable", "org.alfresco.service.cmr.repository.NodeRef" ]
import org.alfresco.service.Auditable; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.*; import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.service" ]
org.alfresco.service;
339,894
@Test public void testMoveOriginalWithWorkingCopy() { // Create a FolderA final NodeRef folderA = createFolder("MoveOriginalWithWorkingCopy_" + GUID.generate()); // Create a FolderB final NodeRef folderB = createFolder("MoveOriginalWithWorkingCopy_" + GUID.generate())...
void function() { final NodeRef folderA = createFolder(STR + GUID.generate()); final NodeRef folderB = createFolder(STR + GUID.generate()); NodeRef origAllowed = createContent(STR + GUID.generate(), folderA); NodeRef workingCopyAllowed = this.cociService.checkout(origAllowed); assertNotNull(workingCopyAllowed); final N...
/** * MNT-2641 * <p/> * Creating a document and working copy. Then try to move working copy to another place. Test is passed, if a working copy was moved to another place with original * document. Only the lock owner can move documents. */
MNT-2641 Creating a document and working copy. Then try to move working copy to another place. Test is passed, if a working copy was moved to another place with original document. Only the lock owner can move documents
testMoveOriginalWithWorkingCopy
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/test/java/org/alfresco/repo/coci/CheckOutCheckInServiceImplTest.java", "license": "lgpl-3.0", "size": 69634 }
[ "org.alfresco.service.cmr.lock.NodeLockedException", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.util.GUID", "org.junit.Assert" ]
import org.alfresco.service.cmr.lock.NodeLockedException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.util.GUID; import org.junit.Assert;
import org.alfresco.service.cmr.lock.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.util.*; import org.junit.*;
[ "org.alfresco.service", "org.alfresco.util", "org.junit" ]
org.alfresco.service; org.alfresco.util; org.junit;
978,978
protected boolean loadLogFile(URL url) { boolean ok = false; try { LogFileParser lfp = new LogFileParser(url.openStream()); lfp.parse(this); ok = true; } catch (IOException e) { LogFactor5ErrorDialog error = new LogFactor5ErrorDialog( getBaseFrame(), "Error reading URL:" ...
boolean function(URL url) { boolean ok = false; try { LogFileParser lfp = new LogFileParser(url.openStream()); lfp.parse(this); ok = true; } catch (IOException e) { LogFactor5ErrorDialog error = new LogFactor5ErrorDialog( getBaseFrame(), STR + url.getFile()); } return ok; } class LogBrokerMonitorWindowAdaptor extends W...
/** * Loads a parses a log file running on a server. */
Loads a parses a log file running on a server
loadLogFile
{ "repo_name": "Mark-Booth/daq-eclipse", "path": "uk.ac.diamond.org.apache.activemq/org/apache/log4j/lf5/viewer/LogBrokerMonitor.java", "license": "epl-1.0", "size": 48283 }
[ "java.awt.event.WindowAdapter", "java.io.IOException", "org.apache.log4j.lf5.util.LogFileParser" ]
import java.awt.event.WindowAdapter; import java.io.IOException; import org.apache.log4j.lf5.util.LogFileParser;
import java.awt.event.*; import java.io.*; import org.apache.log4j.lf5.util.*;
[ "java.awt", "java.io", "org.apache.log4j" ]
java.awt; java.io; org.apache.log4j;
2,100,607
public void verifyTTNotBlackListed(TTClient client, Configuration conf, MRCluster cluster) throws IOException { int interval = conf.getInt("mapred.healthChecker.interval",0); Assert.assertTrue("Interval cannot be zero.",interval != 0); UtilsForTests.waitFor(interval+2000); String default...
void function(TTClient client, Configuration conf, MRCluster cluster) throws IOException { int interval = conf.getInt(STR,0); Assert.assertTrue(STR,interval != 0); UtilsForTests.waitFor(interval+2000); String defaultHealthScript = conf.get(STR); Assert.assertTrue(STR, nodeHealthStatus(client, true) == true); TaskTracke...
/** * Will verify that given task tracker is not blacklisted * @param client tasktracker info * @param conf modified configuration object * @param cluster mrcluster instance * @throws IOException thrown if verification fails */
Will verify that given task tracker is not blacklisted
verifyTTNotBlackListed
{ "repo_name": "ulmon/hadoop1.2.1", "path": "src/test/system/java/org/apache/hadoop/mapred/HealthScriptHelper.java", "license": "apache-2.0", "size": 7151 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.mapred.TaskTrackerStatus", "org.apache.hadoop.mapred.UtilsForTests", "org.apache.hadoop.mapreduce.test.system.JTClient", "org.apache.hadoop.mapreduce.test.system.MRCluster", "org.apache.hadoop.mapreduce.test.system.TTClien...
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapred.TaskTrackerStatus; import org.apache.hadoop.mapred.UtilsForTests; import org.apache.hadoop.mapreduce.test.system.JTClient; import org.apache.hadoop.mapreduce.test.system.MRCluster; import org.apache.hadoop.mapreduce...
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.mapreduce.test.system.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
1,389,533
protected ComponentContainer createDefaultContent() { if (placeHolderComponent == null) { CssLayout layout = new CssLayout(); layout.setStyleName("fancypanel-default-layout"); layout.setSizeFull(); placeHolderComponent = layout; } return placeH...
ComponentContainer function() { if (placeHolderComponent == null) { CssLayout layout = new CssLayout(); layout.setStyleName(STR); layout.setSizeFull(); placeHolderComponent = layout; } return placeHolderComponent; }
/** * Build default content container * * @return Default content container */
Build default content container
createDefaultContent
{ "repo_name": "alump/FancyLayouts", "path": "fancylayouts-addon/src/main/java/org/vaadin/alump/fancylayouts/FancyPanel.java", "license": "apache-2.0", "size": 11175 }
[ "com.vaadin.ui.ComponentContainer", "com.vaadin.ui.CssLayout" ]
import com.vaadin.ui.ComponentContainer; import com.vaadin.ui.CssLayout;
import com.vaadin.ui.*;
[ "com.vaadin.ui" ]
com.vaadin.ui;
2,449,169
public static <T extends V, V> ScoredValue<V> just(double score, T value) { LettuceAssert.notNull(value, "Value must not be null"); return new ScoredValue<>(score, value); }
static <T extends V, V> ScoredValue<V> function(double score, T value) { LettuceAssert.notNull(value, STR); return new ScoredValue<>(score, value); }
/** * Creates a {@link ScoredValue} from a {@code key} and {@code value}. The resulting value contains the value. * * @param score the score. * @param value the value. Must not be {@code null}. * @return the {@link ScoredValue}. */
Creates a <code>ScoredValue</code> from a key and value. The resulting value contains the value
just
{ "repo_name": "lettuce-io/lettuce-core", "path": "src/main/java/io/lettuce/core/ScoredValue.java", "license": "apache-2.0", "size": 5455 }
[ "io.lettuce.core.internal.LettuceAssert" ]
import io.lettuce.core.internal.LettuceAssert;
import io.lettuce.core.internal.*;
[ "io.lettuce.core" ]
io.lettuce.core;
917,636
@Override public void prepareUpgradeFrom(ChannelHandlerContext ctx) { ((Encoder) outboundHandler()).upgraded = true; }
void function(ChannelHandlerContext ctx) { ((Encoder) outboundHandler()).upgraded = true; }
/** * Prepares to upgrade to another protocol from HTTP. Disables the {@link Encoder}. */
Prepares to upgrade to another protocol from HTTP. Disables the <code>Encoder</code>
prepareUpgradeFrom
{ "repo_name": "zer0se7en/netty", "path": "codec-http/src/main/java/io/netty/handler/codec/http/HttpClientCodec.java", "license": "apache-2.0", "size": 13905 }
[ "io.netty.channel.ChannelHandlerContext" ]
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
1,819,315
@Override public RepositoryDirectoryInterface getRepositoryDirectory() { return directory; }
RepositoryDirectoryInterface function() { return directory; }
/** * Gets the directory. * * @return Returns the directory. */
Gets the directory
getRepositoryDirectory
{ "repo_name": "Advent51/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/base/AbstractMeta.java", "license": "apache-2.0", "size": 54941 }
[ "org.pentaho.di.repository.RepositoryDirectoryInterface" ]
import org.pentaho.di.repository.RepositoryDirectoryInterface;
import org.pentaho.di.repository.*;
[ "org.pentaho.di" ]
org.pentaho.di;
81,772
public void accept(final MethodVisitor mv, boolean visible) { Label[] start = new Label[this.start.size()]; Label[] end = new Label[this.end.size()]; int[] index = new int[this.index.size()]; for (int i = 0; i < start.length; ++i) { start[i] = this.start.get(i).getLabel()...
void function(final MethodVisitor mv, boolean visible) { Label[] start = new Label[this.start.size()]; Label[] end = new Label[this.end.size()]; int[] index = new int[this.index.size()]; for (int i = 0; i < start.length; ++i) { start[i] = this.start.get(i).getLabel(); end[i] = this.end.get(i).getLabel(); index[i] = thi...
/** * Makes the given visitor visit this type annotation. * * @param mv * the visitor that must visit this annotation. * @param visible * <tt>true</tt> if the annotation is visible at runtime. */
Makes the given visitor visit this type annotation
accept
{ "repo_name": "Jezza/ExperiJ", "path": "src/main/java/com/experij/repackage/org/objectweb/asm/tree/LocalVariableAnnotationNode.java", "license": "lgpl-3.0", "size": 7090 }
[ "com.experij.repackage.org.objectweb.asm.Label", "com.experij.repackage.org.objectweb.asm.MethodVisitor" ]
import com.experij.repackage.org.objectweb.asm.Label; import com.experij.repackage.org.objectweb.asm.MethodVisitor;
import com.experij.repackage.org.objectweb.asm.*;
[ "com.experij.repackage" ]
com.experij.repackage;
1,606,666
public byte[][] convertToBytes(BigInteger[] bigIntegers) { byte[][] returnBytes = new byte[bigIntegers.length][]; for (int i = 0; i < bigIntegers.length; i++) { returnBytes[i] = convertToByte(bigIntegers[i]); } return returnBytes; }
byte[][] function(BigInteger[] bigIntegers) { byte[][] returnBytes = new byte[bigIntegers.length][]; for (int i = 0; i < bigIntegers.length; i++) { returnBytes[i] = convertToByte(bigIntegers[i]); } return returnBytes; }
/** * Returns an array of bytes corresponding to an array of BigIntegers * * @param bigIntegers numbers to convert * @return bytes corresponding to the bigIntegers */
Returns an array of bytes corresponding to an array of BigIntegers
convertToBytes
{ "repo_name": "Eshcar/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java", "license": "apache-2.0", "size": 49793 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
801,642
public void sendMission(List<msg_mission_item> missionItemMsgs) { if (mMissionItemMsgs == null) return; // Ensure that MissionManager is not doing anything else // if (mFsmState != MissionManagerStates.IDLE) // return; // Stop any previous activity befor...
void function(List<msg_mission_item> missionItemMsgs) { if (mMissionItemMsgs == null) return; setManagerIdle(); updateMissionItemSequenceNumber(missionItemMsgs); mMissionItemMsgs.clear(); mMissionItemMsgs.addAll(missionItemMsgs); startTimer(sDefaultTimoutInMs); mFsmState = MissionManagerStates.WRITE_REQUEST; MavLinkMis...
/** * Sends mission to the vehicle. * * @param missionItemMsgs mission items to be sent in format of MavLink messages */
Sends mission to the vehicle
sendMission
{ "repo_name": "bocekm/SkyControl", "path": "SkyControl/SkyControl/src/com/bocekm/skycontrol/mission/MissionManager.java", "license": "apache-2.0", "size": 19368 }
[ "com.bocekm.skycontrol.SkyControlUtils", "com.bocekm.skycontrol.mavlink.MavLinkMission", "java.util.List" ]
import com.bocekm.skycontrol.SkyControlUtils; import com.bocekm.skycontrol.mavlink.MavLinkMission; import java.util.List;
import com.bocekm.skycontrol.*; import com.bocekm.skycontrol.mavlink.*; import java.util.*;
[ "com.bocekm.skycontrol", "java.util" ]
com.bocekm.skycontrol; java.util;
195,854
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<RecommendationInner> listHistoryForHostingEnvironment( String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter, Context context);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<RecommendationInner> listHistoryForHostingEnvironment( String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter, Context context);
/** * Description for Get past recommendations for an app, optionally specified by the time range. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param hostingEnvironmentName Name of the hosting environment. * @param expiredOnly Specify &lt;code&gt;fal...
Description for Get past recommendations for an app, optionally specified by the time range
listHistoryForHostingEnvironment
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/RecommendationsClient.java", "license": "mit", "size": 56931 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.appservice.fluent.models.RecommendationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.RecommendationInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
436,651
public Parameter getParameterByName(String name) { Iterator<Parameter> i = this.parameters.iterator(); while (i.hasNext()) { Parameter pm = i.next(); if (pm.getName().equals(name)) { return pm; } } return null; }
Parameter function(String name) { Iterator<Parameter> i = this.parameters.iterator(); while (i.hasNext()) { Parameter pm = i.next(); if (pm.getName().equals(name)) { return pm; } } return null; }
/** * Get a parameter by its name. * @param name the name of the parameter. * @return a parameter by that name if it exists, null otherwise. */
Get a parameter by its name
getParameterByName
{ "repo_name": "moegyver/mJeliot", "path": "Model/src/org/mJeliot/model/predict/Method.java", "license": "mit", "size": 3064 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,208,889
@Override @Transactional public List<MacronutrientsDto> getAllMacros(long id) { return this.macronutrientsRepositoryDao.getAllMacronutrients(id) .stream() .map(Convert::macronutrientsDto) .collect(Collectors.toList()); }
List<MacronutrientsDto> function(long id) { return this.macronutrientsRepositoryDao.getAllMacronutrients(id) .stream() .map(Convert::macronutrientsDto) .collect(Collectors.toList()); }
/** * <h1>getAllMactos</h1> * <p>Obtiene una lista de elementos apartir del indetificador que los relaciona</p> * * @param id Indetificador que reprecenta la relacion de los objetos a buscar. * @return Retorna una lista de elemetos. */
getAllMactos Obtiene una lista de elementos apartir del indetificador que los relaciona
getAllMacros
{ "repo_name": "tomas-93/My-Macros", "path": "Services/src/main/java/com/mymacros/services/RecipeServicesImplementDao.java", "license": "apache-2.0", "size": 7848 }
[ "com.mymacros.dto.entity.MacronutrientsDto", "com.mymacros.services.util.Convert", "java.util.List", "java.util.stream.Collectors" ]
import com.mymacros.dto.entity.MacronutrientsDto; import com.mymacros.services.util.Convert; import java.util.List; import java.util.stream.Collectors;
import com.mymacros.dto.entity.*; import com.mymacros.services.util.*; import java.util.*; import java.util.stream.*;
[ "com.mymacros.dto", "com.mymacros.services", "java.util" ]
com.mymacros.dto; com.mymacros.services; java.util;
2,012,891
public boolean isActiveJob(String emplid, String positionNumber, Integer fiscalYear, SynchronizationCheckType synchronizationCheckType);
boolean function(String emplid, String positionNumber, Integer fiscalYear, SynchronizationCheckType synchronizationCheckType);
/** * determine whether there is an active job for the given emplid on the specified position * * @param emplid the given employee id * @param positionNumber the specified position number * @param fiscalYear the given fiscal year * @param synchronizationCheckType the sync check type...
determine whether there is an active job for the given emplid on the specified position
isActiveJob
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/bc/service/HumanResourcesPayrollService.java", "license": "agpl-3.0", "size": 3351 }
[ "org.kuali.kfs.module.bc.BCConstants" ]
import org.kuali.kfs.module.bc.BCConstants;
import org.kuali.kfs.module.bc.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,456,614
public java.util.List<fr.lip6.move.pnml.hlpn.booleans.hlapi.BoolHLAPI> getInput_booleans_BoolHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.booleans.hlapi.BoolHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.booleans.hlapi.BoolHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr....
java.util.List<fr.lip6.move.pnml.hlpn.booleans.hlapi.BoolHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.booleans.hlapi.BoolHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.booleans.hlapi.BoolHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.booleans.impl.BoolImp...
/** * This accessor return a list of encapsulated subelement, only of BoolHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of BoolHLAPI kind. WARNING : this method can creates a lot of new object in memory
getInput_booleans_BoolHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/finiteIntRanges/hlapi/LessThanOrEqualHLAPI.java", "license": "epl-1.0", "size": 108879 }
[ "fr.lip6.move.pnml.hlpn.terms.Sort", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
914,928
public List<JsonValue> values() { return Collections.unmodifiableList(values); }
List<JsonValue> function() { return Collections.unmodifiableList(values); }
/** * Returns a list of the values in this array in document order. The returned list is backed by * this array and will reflect subsequent changes. It cannot be used to modify this array. * Attempts to modify the returned list will result in an exception. * * @return a list of the values in th...
Returns a list of the values in this array in document order. The returned list is backed by this array and will reflect subsequent changes. It cannot be used to modify this array. Attempts to modify the returned list will result in an exception
values
{ "repo_name": "fabioz/Pydev", "path": "plugins/org.python.pydev.core/src_json/org/python/pydev/json/eclipsesource/JsonArray.java", "license": "epl-1.0", "size": 9160 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,178,575
public static DocIdAndVersion loadDocIdAndVersion(IndexReader reader, Term term, boolean loadSeqNo) throws IOException { PerThreadIDVersionAndSeqNoLookup[] lookups = getLookupState(reader, term.field()); List<LeafReaderContext> leaves = reader.leaves(); // iterate backwards to optimize for t...
static DocIdAndVersion function(IndexReader reader, Term term, boolean loadSeqNo) throws IOException { PerThreadIDVersionAndSeqNoLookup[] lookups = getLookupState(reader, term.field()); List<LeafReaderContext> leaves = reader.leaves(); for (int i = leaves.size() - 1; i >= 0; i--) { final LeafReaderContext leaf = leaves...
/** * Load the internal doc ID and version for the uid from the reader, returning<ul> * <li>null if the uid wasn't found, * <li>a doc ID and a version otherwise * </ul> */
Load the internal doc ID and version for the uid from the reader, returning null if the uid wasn't found, a doc ID and a version otherwise
loadDocIdAndVersion
{ "repo_name": "ern/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/lucene/uid/VersionsAndSeqNoResolver.java", "license": "apache-2.0", "size": 7556 }
[ "java.io.IOException", "java.util.List", "org.apache.lucene.index.IndexReader", "org.apache.lucene.index.LeafReaderContext", "org.apache.lucene.index.Term" ]
import java.io.IOException; import java.util.List; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.Term;
import java.io.*; import java.util.*; import org.apache.lucene.index.*;
[ "java.io", "java.util", "org.apache.lucene" ]
java.io; java.util; org.apache.lucene;
1,873,094
protected File configureGO( ServletContext context, IStoredSettings goSettings, File goBaseFolder, IStoredSettings runtimeSettings) { logger.debug("configuring Gitblit GO"); // merge the stored settings into the runtime settings // // if runtimeSettings is also a FileSettings w/o a specified ta...
File function( ServletContext context, IStoredSettings goSettings, File goBaseFolder, IStoredSettings runtimeSettings) { logger.debug(STR); runtimeSettings.merge(goSettings); File base = goBaseFolder; return base; }
/** * Configures Gitblit GO * * @param context * @param settings * @param baseFolder * @param runtimeSettings * @return the base folder */
Configures Gitblit GO
configureGO
{ "repo_name": "cesarmarinhorj/gitblit", "path": "src/main/java/com/gitblit/servlet/GitblitContext.java", "license": "apache-2.0", "size": 15521 }
[ "com.gitblit.IStoredSettings", "java.io.File", "javax.servlet.ServletContext" ]
import com.gitblit.IStoredSettings; import java.io.File; import javax.servlet.ServletContext;
import com.gitblit.*; import java.io.*; import javax.servlet.*;
[ "com.gitblit", "java.io", "javax.servlet" ]
com.gitblit; java.io; javax.servlet;
151,879
RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor);
RedisFuture<StreamScanCursor> scan(KeyStreamingChannel<K> channel, ScanCursor scanCursor);
/** * Incrementally iterate the keys space over the whole Cluster. * * @param channel streaming channel that receives a call for every key * @param scanCursor cursor to resume the scan. It's required to reuse the {@code scanCursor} instance from the previous * {@link #scan()} call. ...
Incrementally iterate the keys space over the whole Cluster
scan
{ "repo_name": "lettuce-io/lettuce-core", "path": "src/main/java/io/lettuce/core/cluster/api/async/RedisAdvancedClusterAsyncCommands.java", "license": "apache-2.0", "size": 16598 }
[ "io.lettuce.core.RedisFuture", "io.lettuce.core.ScanCursor", "io.lettuce.core.StreamScanCursor", "io.lettuce.core.output.KeyStreamingChannel" ]
import io.lettuce.core.RedisFuture; import io.lettuce.core.ScanCursor; import io.lettuce.core.StreamScanCursor; import io.lettuce.core.output.KeyStreamingChannel;
import io.lettuce.core.*; import io.lettuce.core.output.*;
[ "io.lettuce.core" ]
io.lettuce.core;
994,444
private static final String getHexString(Color c) { if (c==null) { return null; } StringBuilder sb = new StringBuilder("#"); int r = c.getRed(); if (r<16) { sb.append('0'); } sb.append(Integer.toHexString(r)); int g = c.getGreen(); if (g<16) { sb.append('0'); } sb.app...
static final String function(Color c) { if (c==null) { return null; } StringBuilder sb = new StringBuilder("#"); int r = c.getRed(); if (r<16) { sb.append('0'); } sb.append(Integer.toHexString(r)); int g = c.getGreen(); if (g<16) { sb.append('0'); } sb.append(Integer.toHexString(g)); int b = c.getBlue(); if (b<16) { sb...
/** * Returns a hex string for the specified color, suitable for HTML. * * @param c The color. * @return The string representation, in the form "<code>#rrggbb</code>", * or <code>null</code> if <code>c</code> is <code>null</code>. */
Returns a hex string for the specified color, suitable for HTML
getHexString
{ "repo_name": "GreatArcStudios/TXE-Java-text-editor--MASTER-Code", "path": "TXE Code/RSyntaxTextArea-master/src/org/fife/ui/rsyntaxtextarea/focusabletip/TipUtil.java", "license": "lgpl-3.0", "size": 6505 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
967,233
static CharSequence getOperator(final CompoundAssignmentTree node) { return OPERATOR_MAP.get(node.getKind()); }
static CharSequence getOperator(final CompoundAssignmentTree node) { return OPERATOR_MAP.get(node.getKind()); }
/** * Static helper method for retrieving the operator for a * {@link CompoundAssignmentTree} node. * @param node * @return */
Static helper method for retrieving the operator for a <code>CompoundAssignmentTree</code> node
getOperator
{ "repo_name": "FermioCloud/java-code-templates", "path": "java-code-templates-processor/src/main/java/com/fermio/jct/processor/Util.java", "license": "apache-2.0", "size": 23907 }
[ "com.sun.source.tree.CompoundAssignmentTree" ]
import com.sun.source.tree.CompoundAssignmentTree;
import com.sun.source.tree.*;
[ "com.sun.source" ]
com.sun.source;
2,675,670
public void addFragmentToStack(int containerID, Fragment fragment) { FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(containerID, fragment); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); ft.addToBackStack(null); ft.commit(); }
void function(int containerID, Fragment fragment) { FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(containerID, fragment); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); ft.addToBackStack(null); ft.commit(); }
/** * TODO can return * * @param containerID * @param fragment */
TODO can return
addFragmentToStack
{ "repo_name": "lenonwang/AndroidLibrary", "path": "AndroidProjectLibrary/src/BaseFragmentActivity/WLFragmentActivity.java", "license": "mit", "size": 1936 }
[ "android.support.v4.app.Fragment", "android.support.v4.app.FragmentTransaction" ]
import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.*;
[ "android.support" ]
android.support;
2,899,953
public void collect(List<VcsException> exceptions) { final VcsKey vcsKey = GitVcs.getKey(); try { // collect unmerged String root = myRoot.getPath(); GitSimpleHandler h = new GitSimpleHandler(myProject, myRoot, GitHandler.LS_FILES); h.setNoSSH(true); h.setSilent(true); h.ad...
void function(List<VcsException> exceptions) { final VcsKey vcsKey = GitVcs.getKey(); try { String root = myRoot.getPath(); GitSimpleHandler h = new GitSimpleHandler(myProject, myRoot, GitHandler.LS_FILES); h.setNoSSH(true); h.setSilent(true); h.addParameters(STR); for (StringScanner s = new StringScanner(h.run()); s.h...
/** * Collect changes * * @param exceptions a list of exceptions */
Collect changes
collect
{ "repo_name": "jexp/idea2", "path": "plugins/git4idea/src/git4idea/merge/MergeChangeCollector.java", "license": "apache-2.0", "size": 7273 }
[ "com.intellij.openapi.util.io.FileUtil", "com.intellij.openapi.vcs.VcsException", "com.intellij.openapi.vcs.VcsKey", "com.intellij.openapi.vcs.update.FileGroup", "java.io.File", "java.io.IOException", "java.util.List", "java.util.TreeSet" ]
import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vcs.VcsKey; import com.intellij.openapi.vcs.update.FileGroup; import java.io.File; import java.io.IOException; import java.util.List; import java.util.TreeSet;
import com.intellij.openapi.util.io.*; import com.intellij.openapi.vcs.*; import com.intellij.openapi.vcs.update.*; import java.io.*; import java.util.*;
[ "com.intellij.openapi", "java.io", "java.util" ]
com.intellij.openapi; java.io; java.util;
727,829
public Set<INamespaceDefinition> getNamespaceSetForSuper(ICompilerProject project, IDefinition superDef) { Set<INamespaceDefinition> nsSet = getNamespaceSet(project); return adjustNamespaceSetForSuper(superDef, nsSet); }
Set<INamespaceDefinition> function(ICompilerProject project, IDefinition superDef) { Set<INamespaceDefinition> nsSet = getNamespaceSet(project); return adjustNamespaceSetForSuper(superDef, nsSet); }
/** * Helper method to get the namespace set to use for a super reference. This * will replace the protected namespace for this class with the protected * namespace for the super class in the returned namespace set. * * @param project project used to resolve namespaces * @param superDef t...
Helper method to get the namespace set to use for a super reference. This will replace the protected namespace for this class with the protected namespace for the super class in the returned namespace set
getNamespaceSetForSuper
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/compiler/internal/scopes/ASScope.java", "license": "apache-2.0", "size": 75127 }
[ "java.util.Set", "org.apache.flex.compiler.definitions.IDefinition", "org.apache.flex.compiler.definitions.INamespaceDefinition", "org.apache.flex.compiler.projects.ICompilerProject" ]
import java.util.Set; import org.apache.flex.compiler.definitions.IDefinition; import org.apache.flex.compiler.definitions.INamespaceDefinition; import org.apache.flex.compiler.projects.ICompilerProject;
import java.util.*; import org.apache.flex.compiler.definitions.*; import org.apache.flex.compiler.projects.*;
[ "java.util", "org.apache.flex" ]
java.util; org.apache.flex;
141,301
CompletableFuture<SerializedInputSplit> requestNextInputSplit( final JobVertexID vertexID, final ExecutionAttemptID executionAttempt);
CompletableFuture<SerializedInputSplit> requestNextInputSplit( final JobVertexID vertexID, final ExecutionAttemptID executionAttempt);
/** * Requests the next input split for the {@link ExecutionJobVertex}. * The next input split is sent back to the sender as a * {@link SerializedInputSplit} message. * * @param vertexID The job vertex id * @param executionAttempt The execution attempt id * @return The future of the input split. I...
Requests the next input split for the <code>ExecutionJobVertex</code>. The next input split is sent back to the sender as a <code>SerializedInputSplit</code> message
requestNextInputSplit
{ "repo_name": "haohui/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMasterGateway.java", "license": "apache-2.0", "size": 10215 }
[ "java.util.concurrent.CompletableFuture", "org.apache.flink.runtime.executiongraph.ExecutionAttemptID", "org.apache.flink.runtime.jobgraph.JobVertexID" ]
import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.executiongraph.ExecutionAttemptID; import org.apache.flink.runtime.jobgraph.JobVertexID;
import java.util.concurrent.*; import org.apache.flink.runtime.executiongraph.*; import org.apache.flink.runtime.jobgraph.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,729,976
public HDInsightStreamingActivity setArguments(List<Object> arguments) { this.arguments = arguments; return this; }
HDInsightStreamingActivity function(List<Object> arguments) { this.arguments = arguments; return this; }
/** * Set the arguments property: User specified arguments to HDInsightActivity. * * @param arguments the arguments value to set. * @return the HDInsightStreamingActivity object itself. */
Set the arguments property: User specified arguments to HDInsightActivity
setArguments
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-analytics-synapse-artifacts/src/main/java/com/azure/analytics/synapse/artifacts/models/HDInsightStreamingActivity.java", "license": "mit", "size": 10357 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
700,189
private long getNonNegative(String key, int defaultValue) { int flushOffsetIntervalMillis = properties.getInt(key, defaultValue); if (flushOffsetIntervalMillis < 0) { throw new MetricsException("The " + key + " property must be " + "non-negative. Value was " + flushOffsetIntervalMillis); ...
long function(String key, int defaultValue) { int flushOffsetIntervalMillis = properties.getInt(key, defaultValue); if (flushOffsetIntervalMillis < 0) { throw new MetricsException(STR + key + STR + STR + flushOffsetIntervalMillis); } return flushOffsetIntervalMillis; }
/** * Return the property value if it's non-negative and throw an exception if * it's not. * * @param key the property key * @param defaultValue the default value */
Return the property value if it's non-negative and throw an exception if it's not
getNonNegative
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/sink/RollingFileSystemSink.java", "license": "apache-2.0", "size": 35626 }
[ "org.apache.hadoop.metrics2.MetricsException" ]
import org.apache.hadoop.metrics2.MetricsException;
import org.apache.hadoop.metrics2.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
799,669
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String snapshotName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); }
/** * Deletes a snapshot. * * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 c...
Deletes a snapshot
beginDeleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/compute/mgmt-v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java", "license": "mit", "size": 92419 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,706,989
@Test public void testNNsFromDifferentClusters() throws Exception { Mockito .doReturn(new NamespaceInfo(1, "fake foreign cluster", FAKE_BPID, 0)) .when(mockNN1).versionRequest(); BPOfferService bpos = setupBPOSForNNs(mockNN1, mockNN2); bpos.start(); try { waitForOneToF...
void function() throws Exception { Mockito .doReturn(new NamespaceInfo(1, STR, FAKE_BPID, 0)) .when(mockNN1).versionRequest(); BPOfferService bpos = setupBPOSForNNs(mockNN1, mockNN2); bpos.start(); try { waitForOneToFail(bpos); } finally { bpos.stop(); bpos.join(); } }
/** * Ensure that, if the two NNs configured for a block pool * have different block pool IDs, they will refuse to both * register. */
Ensure that, if the two NNs configured for a block pool have different block pool IDs, they will refuse to both register
testNNsFromDifferentClusters
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBPOfferService.java", "license": "gpl-3.0", "size": 30292 }
[ "org.apache.hadoop.hdfs.server.protocol.NamespaceInfo", "org.mockito.Mockito" ]
import org.apache.hadoop.hdfs.server.protocol.NamespaceInfo; import org.mockito.Mockito;
import org.apache.hadoop.hdfs.server.protocol.*; import org.mockito.*;
[ "org.apache.hadoop", "org.mockito" ]
org.apache.hadoop; org.mockito;
1,057,118
public String getNextAvailableESPort(String serverId, String bindAddr, String basePort) { String freePort = Config.getStringProperty(ServerPort.ES_TRANSPORT_TCP_PORT.getPropertyName(), ServerPort.ES_TRANSPORT_TCP_PORT.getDefaultValue()); try { if(UtilMethods.isSet(basePort)){ ...
String function(String serverId, String bindAddr, String basePort) { String freePort = Config.getStringProperty(ServerPort.ES_TRANSPORT_TCP_PORT.getPropertyName(), ServerPort.ES_TRANSPORT_TCP_PORT.getDefaultValue()); try { if(UtilMethods.isSet(basePort)){ freePort=basePort; }else{ Number port = ClusterFactory.getESPort...
/** * Validate if the base port is available in the specified bindAddress. * If not the it will try to get the next port available * @param serverId Server identification * @param bindAddr Address where the port should be running * @param basePort Initial port to check * @return port */
Validate if the base port is available in the specified bindAddress. If not the it will try to get the next port available
getNextAvailableESPort
{ "repo_name": "wisdom-garden/dotcms", "path": "src/com/dotcms/content/elasticsearch/util/ESClient.java", "license": "gpl-3.0", "size": 12351 }
[ "com.dotcms.cluster.bean.ServerPort", "com.dotcms.enterprise.cluster.ClusterFactory", "com.dotmarketing.exception.DotDataException", "com.dotmarketing.util.Config", "com.dotmarketing.util.Logger", "com.dotmarketing.util.UtilMethods" ]
import com.dotcms.cluster.bean.ServerPort; import com.dotcms.enterprise.cluster.ClusterFactory; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.util.Config; import com.dotmarketing.util.Logger; import com.dotmarketing.util.UtilMethods;
import com.dotcms.cluster.bean.*; import com.dotcms.enterprise.cluster.*; import com.dotmarketing.exception.*; import com.dotmarketing.util.*;
[ "com.dotcms.cluster", "com.dotcms.enterprise", "com.dotmarketing.exception", "com.dotmarketing.util" ]
com.dotcms.cluster; com.dotcms.enterprise; com.dotmarketing.exception; com.dotmarketing.util;
759,980