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
public static Bitmap getThumbnail(Context context, Uri uri, Point size) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { return DocumentsContract.getDocumentThumbnail(context.getContentResolver(), uri, size, null); } else { return null; } }
static Bitmap function(Context context, Uri uri, Point size) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { return DocumentsContract.getDocumentThumbnail(context.getContentResolver(), uri, size, null); } else { return null; } }
/** * Retrieve thumbnail of file, document api feature and thus KitKat only */
Retrieve thumbnail of file, document api feature and thus KitKat only
getThumbnail
{ "repo_name": "iseki-masaya/open-keychain", "path": "OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/FileHelper.java", "license": "gpl-3.0", "size": 11851 }
[ "android.content.Context", "android.graphics.Bitmap", "android.graphics.Point", "android.net.Uri", "android.os.Build", "android.provider.DocumentsContract" ]
import android.content.Context; import android.graphics.Bitmap; import android.graphics.Point; import android.net.Uri; import android.os.Build; import android.provider.DocumentsContract;
import android.content.*; import android.graphics.*; import android.net.*; import android.os.*; import android.provider.*;
[ "android.content", "android.graphics", "android.net", "android.os", "android.provider" ]
android.content; android.graphics; android.net; android.os; android.provider;
2,687,363
private void createSchema(String schema) throws IgniteCheckedException { executeStatement("INFORMATION_SCHEMA", "CREATE SCHEMA IF NOT EXISTS " + schema); if (log.isDebugEnabled()) log.debug("Created H2 schema for index database: " + schema); }
void function(String schema) throws IgniteCheckedException { executeStatement(STR, STR + schema); if (log.isDebugEnabled()) log.debug(STR + schema); }
/** * Creates DB schema if it has not been created yet. * * @param schema Schema name. * @throws IgniteCheckedException If failed to create db schema. */
Creates DB schema if it has not been created yet
createSchema
{ "repo_name": "tkpanther/ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java", "license": "apache-2.0", "size": 97528 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,024,578
public void setProposition(PropositionDefinition.Builder prop) { this.proposition = prop; this.setPropId(prop.getId()); }
void function(PropositionDefinition.Builder prop) { this.proposition = prop; this.setPropId(prop.getId()); }
/** * Sets the value of the proposition on this builder to the given value * @param prop the proposition value to set, must not be null */
Sets the value of the proposition on this builder to the given value
setProposition
{ "repo_name": "ricepanda/rice-git3", "path": "rice-middleware/krms/api/src/main/java/org/kuali/rice/krms/api/repository/rule/RuleDefinition.java", "license": "apache-2.0", "size": 17618 }
[ "org.kuali.rice.krms.api.repository.proposition.PropositionDefinition" ]
import org.kuali.rice.krms.api.repository.proposition.PropositionDefinition;
import org.kuali.rice.krms.api.repository.proposition.*;
[ "org.kuali.rice" ]
org.kuali.rice;
346,889
protected CmsListItem createResourceListItem( CmsResource resource, CmsHtmlList list, boolean showPermissions, boolean showDateLastMod, boolean showUserLastMod, boolean showDateCreate, boolean showUserCreate, boolean showDateRel, boolean showDa...
CmsListItem function( CmsResource resource, CmsHtmlList list, boolean showPermissions, boolean showDateLastMod, boolean showUserLastMod, boolean showDateCreate, boolean showUserCreate, boolean showDateRel, boolean showDateExp, boolean showState, boolean showLockedBy, boolean showSite) { CmsListItem item = list.newItem(...
/** * Returns a list item created from the resource information, differs between valid resources and invalid resources.<p> * * @param resource the resource to create the list item from * @param list the list * @param showPermissions if to show permissions * @param showDateLastMod if to sho...
Returns a list item created from the resource information, differs between valid resources and invalid resources
createResourceListItem
{ "repo_name": "ggiudetti/opencms-core", "path": "src-modules/org/opencms/workplace/tools/searchindex/sourcesearch/CmsSourceSearchFilesDialog.java", "license": "lgpl-2.1", "size": 14775 }
[ "java.util.Date", "org.opencms.file.CmsResource", "org.opencms.workplace.explorer.CmsResourceUtil", "org.opencms.workplace.list.CmsHtmlList", "org.opencms.workplace.list.CmsListItem" ]
import java.util.Date; import org.opencms.file.CmsResource; import org.opencms.workplace.explorer.CmsResourceUtil; import org.opencms.workplace.list.CmsHtmlList; import org.opencms.workplace.list.CmsListItem;
import java.util.*; import org.opencms.file.*; import org.opencms.workplace.explorer.*; import org.opencms.workplace.list.*;
[ "java.util", "org.opencms.file", "org.opencms.workplace" ]
java.util; org.opencms.file; org.opencms.workplace;
869,500
private static void setIconUrl(XmlPullParser parser, KmlStyle style) throws XmlPullParserException, IOException { int eventType = parser.getEventType(); while (!(eventType == END_TAG && parser.getName().equals(ICON_STYLE_URL))) { if (eventType == START_TAG && parser.getName()...
static void function(XmlPullParser parser, KmlStyle style) throws XmlPullParserException, IOException { int eventType = parser.getEventType(); while (!(eventType == END_TAG && parser.getName().equals(ICON_STYLE_URL))) { if (eventType == START_TAG && parser.getName().equals("href")) { style.setIconUrl(parser.nextText())...
/** * Sets the icon url for the style * * @param style Style to set the icon url to */
Sets the icon url for the style
setIconUrl
{ "repo_name": "josegury/AndroidMarkerClusteringMaps", "path": "MarkerClusteringMaps/app/src/main/java/joseangelpardo/markerclusteringmaps/libreryMaps/kml/KmlStyleParser.java", "license": "apache-2.0", "size": 9307 }
[ "java.io.IOException", "org.xmlpull.v1.XmlPullParser", "org.xmlpull.v1.XmlPullParserException" ]
import java.io.IOException; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException;
import java.io.*; import org.xmlpull.v1.*;
[ "java.io", "org.xmlpull.v1" ]
java.io; org.xmlpull.v1;
2,278,446
public LinkedList<AllocatableAction> getPredecessors() { return this.resourcePredecessors; }
LinkedList<AllocatableAction> function() { return this.resourcePredecessors; }
/** * Returns the list of resource predecessors. * * @return The list of resource predecessors. */
Returns the list of resource predecessors
getPredecessors
{ "repo_name": "mF2C/COMPSs", "path": "compss/runtime/scheduler/fullGraphScheduler/src/main/java/es/bsc/compss/scheduler/fullgraph/FullGraphSchedulingInformation.java", "license": "apache-2.0", "size": 10573 }
[ "es.bsc.compss.scheduler.types.AllocatableAction", "java.util.LinkedList" ]
import es.bsc.compss.scheduler.types.AllocatableAction; import java.util.LinkedList;
import es.bsc.compss.scheduler.types.*; import java.util.*;
[ "es.bsc.compss", "java.util" ]
es.bsc.compss; java.util;
970,214
public Boolean isValidPlaylistTrack(CurrentlyPlaying song, User user) { if (song.getContext() == null) { return false; } else { return song.getContext().getUri().contains(user.getId()); } }
Boolean function(CurrentlyPlaying song, User user) { if (song.getContext() == null) { return false; } else { return song.getContext().getUri().contains(user.getId()); } }
/** * determine if a given song is part of a user's playlist * @param song a given played song * @param user the user that played the song * @return if the song is played from one of the user's playlists */
determine if a given song is part of a user's playlist
isValidPlaylistTrack
{ "repo_name": "cmb9400/skip-assistant", "path": "src/main/java/com/github/cmb9400/skipassistant/service/SpotifyHelperService.java", "license": "gpl-3.0", "size": 5692 }
[ "com.wrapper.spotify.model_objects.miscellaneous.CurrentlyPlaying", "com.wrapper.spotify.model_objects.specification.User" ]
import com.wrapper.spotify.model_objects.miscellaneous.CurrentlyPlaying; import com.wrapper.spotify.model_objects.specification.User;
import com.wrapper.spotify.model_objects.miscellaneous.*; import com.wrapper.spotify.model_objects.specification.*;
[ "com.wrapper.spotify" ]
com.wrapper.spotify;
449,257
protected void createProcessErrorPump(final InputStream is, final OutputStream os) { errorThread = createPump(is, os); }
void function(final InputStream is, final OutputStream os) { errorThread = createPump(is, os); }
/** * Create the pump to handle error output. * * @param is * the <CODE>InputStream</CODE>. * @param os * the <CODE>OutputStream</CODE>. */
Create the pump to handle error output
createProcessErrorPump
{ "repo_name": "deim0s/XWBEx", "path": "src/org/apache/commons/exec/PumpStreamHandler.java", "license": "mit", "size": 8552 }
[ "java.io.InputStream", "java.io.OutputStream" ]
import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,211,765
public void setMultipliers(final List<Double> value) { nativeSetMultipliers(getHandle(), value); }
void function(final List<Double> value) { nativeSetMultipliers(getHandle(), value); }
/** * Set the multipliers. * <p> * Use [5, 2] for static automatic multi-axis tick alignment (more docs * needed) * </p> * @param value The new multipliers. */
Set the multipliers. Use [5, 2] for static automatic multi-axis tick alignment (more docs needed)
setMultipliers
{ "repo_name": "AndroidT/TRCharts", "path": "Charts/TRChartsJava/src/com/thomsonreuters/corptech/charts/AutomaticNumberTickCalculator.java", "license": "apache-2.0", "size": 4548 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,667,527
public void resolveChainedTargets() { final Map<TypeVariable, InferredValue> inferredTypes = new LinkedHashMap<>(this.size()); //TODO: we can probably make this a bit more efficient boolean grew = true; while (grew == true) { grew = false; for (final Entry<Ty...
void function() { final Map<TypeVariable, InferredValue> inferredTypes = new LinkedHashMap<>(this.size()); boolean grew = true; while (grew == true) { grew = false; for (final Entry<TypeVariable, InferredValue> inferred : this.entrySet()) { final TypeVariable target = inferred.getKey(); final InferredValue value = infe...
/** * If we had a set of inferred results, (e.g. T1 = T2, T2 = T3, T3 = String) propagate any * results we have (the above constraints become T1 = String, T2 = String, T3 = String) */
If we had a set of inferred results, (e.g. T1 = T2, T2 = T3, T3 = String) propagate any results we have (the above constraints become T1 = String, T2 = String, T3 = String)
resolveChainedTargets
{ "repo_name": "CharlesZ-Chen/checker-framework", "path": "framework/src/org/checkerframework/framework/util/typeinference/solver/InferenceResult.java", "license": "gpl-2.0", "size": 6729 }
[ "java.util.LinkedHashMap", "java.util.Map", "javax.lang.model.type.TypeVariable", "org.checkerframework.framework.type.AnnotatedTypeMirror", "org.checkerframework.framework.util.typeinference.solver.InferredValue" ]
import java.util.LinkedHashMap; import java.util.Map; import javax.lang.model.type.TypeVariable; import org.checkerframework.framework.type.AnnotatedTypeMirror; import org.checkerframework.framework.util.typeinference.solver.InferredValue;
import java.util.*; import javax.lang.model.type.*; import org.checkerframework.framework.type.*; import org.checkerframework.framework.util.typeinference.solver.*;
[ "java.util", "javax.lang", "org.checkerframework.framework" ]
java.util; javax.lang; org.checkerframework.framework;
1,205,593
public HandlerRegistration addDragStartHandler(DragStartEventHandler handler) { return addDragAndDropHandler(handler, DragStartEvent.TYPE); }
HandlerRegistration function(DragStartEventHandler handler) { return addDragAndDropHandler(handler, DragStartEvent.TYPE); }
/** * Add a handler object that will manage the {@link DragStartEvent} event. * This kind of event is fired when the drag operation starts. */
Add a handler object that will manage the <code>DragStartEvent</code> event. This kind of event is fired when the drag operation starts
addDragStartHandler
{ "repo_name": "ArcBees/gwtquery-droppable-plugin", "path": "plugin/src/main/java/gwtquery/plugins/droppable/client/gwt/DragAndDropCellTree.java", "license": "mit", "size": 9538 }
[ "com.google.gwt.event.shared.HandlerRegistration" ]
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.*;
[ "com.google.gwt" ]
com.google.gwt;
1,919,237
InternalDistributedMember getDistributionManagerId();
InternalDistributedMember getDistributionManagerId();
/** * Returns the id of this distribution manager. */
Returns the id of this distribution manager
getDistributionManagerId
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionManager.java", "license": "apache-2.0", "size": 15041 }
[ "org.apache.geode.distributed.internal.membership.InternalDistributedMember" ]
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.distributed.internal.membership.*;
[ "org.apache.geode" ]
org.apache.geode;
1,920,368
public static SecurityId of(StandardId standardId) { return new SecurityId(standardId); } /** * Parses an {@code StandardId} from a formatted scheme and value. * <p> * This parses the identifier from the form produced by {@code toString()}
static SecurityId function(StandardId standardId) { return new SecurityId(standardId); } /** * Parses an {@code StandardId} from a formatted scheme and value. * <p> * This parses the identifier from the form produced by {@code toString()}
/** * Creates an instance from a standard two-part identifier. * * @param standardId the underlying standard two-part identifier * @return the security identifier */
Creates an instance from a standard two-part identifier
of
{ "repo_name": "OpenGamma/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/SecurityId.java", "license": "apache-2.0", "size": 5062 }
[ "com.opengamma.strata.basics.StandardId" ]
import com.opengamma.strata.basics.StandardId;
import com.opengamma.strata.basics.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
193,750
public static JmsComponent jmsComponentClientAcknowledge(ConnectionFactory connectionFactory) { JmsConfiguration configuration = new JmsConfiguration(connectionFactory); configuration.setAcknowledgementMode(Session.CLIENT_ACKNOWLEDGE); return jmsComponent(configuration); }
static JmsComponent function(ConnectionFactory connectionFactory) { JmsConfiguration configuration = new JmsConfiguration(connectionFactory); configuration.setAcknowledgementMode(Session.CLIENT_ACKNOWLEDGE); return jmsComponent(configuration); }
/** * Static builder method */
Static builder method
jmsComponentClientAcknowledge
{ "repo_name": "ullgren/camel", "path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java", "license": "apache-2.0", "size": 44357 }
[ "javax.jms.ConnectionFactory", "javax.jms.Session" ]
import javax.jms.ConnectionFactory; import javax.jms.Session;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
1,932,173
public Collection<AbstractContact> getAbstractContacts() { return abstractContacts; }
Collection<AbstractContact> function() { return abstractContacts; }
/** * Gets list of contacts. * * @return */
Gets list of contacts
getAbstractContacts
{ "repo_name": "bigbugbb/iTracker", "path": "app/src/main/java/com/itracker/android/ui/adapter/GroupConfiguration.java", "license": "apache-2.0", "size": 4724 }
[ "com.itracker.android.data.roster.AbstractContact", "java.util.Collection" ]
import com.itracker.android.data.roster.AbstractContact; import java.util.Collection;
import com.itracker.android.data.roster.*; import java.util.*;
[ "com.itracker.android", "java.util" ]
com.itracker.android; java.util;
112,393
private void sendViaPost(MessageContext msgContext, URL url, String soapActionString) throws AxisFault { HttpClient httpClient = getHttpClient(msgContext); PostMethod postMethod = new PostMethod(); if (log.isTraceEnabled()) { log.trace(Thread.curr...
void function(MessageContext msgContext, URL url, String soapActionString) throws AxisFault { HttpClient httpClient = getHttpClient(msgContext); PostMethod postMethod = new PostMethod(); if (log.isTraceEnabled()) { log.trace(Thread.currentThread() + STR + postMethod + STR + httpClient); } MessageFormatter messageFormat...
/** * Used to send a request via HTTP Post Method * * @param msgContext - The MessageContext of the message * @param url - The target URL * @param soapActionString - The soapAction string of the request * @throws AxisFault - Thrown in case an exception occurs */
Used to send a request via HTTP Post Method
sendViaPost
{ "repo_name": "Nipuni/wso2-axis2", "path": "modules/transport/http/src/org/apache/axis2/transport/http/HTTPSender.java", "license": "apache-2.0", "size": 15271 }
[ "java.io.IOException", "org.apache.axis2.AxisFault", "org.apache.axis2.context.MessageContext", "org.apache.axis2.transport.MessageFormatter", "org.apache.commons.httpclient.HttpClient", "org.apache.commons.httpclient.methods.PostMethod" ]
import java.io.IOException; import org.apache.axis2.AxisFault; import org.apache.axis2.context.MessageContext; import org.apache.axis2.transport.MessageFormatter; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.PostMethod;
import java.io.*; import org.apache.axis2.*; import org.apache.axis2.context.*; import org.apache.axis2.transport.*; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.*;
[ "java.io", "org.apache.axis2", "org.apache.commons" ]
java.io; org.apache.axis2; org.apache.commons;
2,911,353
private static Tuple2<Class<?>[], Object[]> filterArguments( Class<?>[] parameterTypes, Annotation[][] parameterAnnotations, Object[] args) { Class<?>[] filteredParameterTypes; Object[] filteredArgs; if (args == null) { filteredParameterTypes = parameterTypes; filteredArgs = null; } ...
static Tuple2<Class<?>[], Object[]> function( Class<?>[] parameterTypes, Annotation[][] parameterAnnotations, Object[] args) { Class<?>[] filteredParameterTypes; Object[] filteredArgs; if (args == null) { filteredParameterTypes = parameterTypes; filteredArgs = null; } else { Preconditions.checkArgument(parameterTypes.l...
/** * Removes all {@link RpcTimeout} annotated parameters from the parameter type and argument * list. * * @param parameterTypes Array of parameter types * @param parameterAnnotations Array of parameter annotations * @param args Arary of arguments * @return Tuple of filtered p...
Removes all <code>RpcTimeout</code> annotated parameters from the parameter type and argument list
filterArguments
{ "repo_name": "mtunique/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/rpc/TestingSerialRpcService.java", "license": "apache-2.0", "size": 15252 }
[ "java.lang.annotation.Annotation", "java.util.BitSet", "org.apache.flink.api.java.tuple.Tuple2", "org.apache.flink.util.Preconditions" ]
import java.lang.annotation.Annotation; import java.util.BitSet; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.util.Preconditions;
import java.lang.annotation.*; import java.util.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.util.*;
[ "java.lang", "java.util", "org.apache.flink" ]
java.lang; java.util; org.apache.flink;
2,552,905
public static <E> List<E> compose(List<E> list, Callback callback) { return new CallbackList<E>(list, callback); }
static <E> List<E> function(List<E> list, Callback callback) { return new CallbackList<E>(list, callback); }
/** * Returns the composition of the given list and callback. * <p> * Note: Any changes to the original list will cause the returned * list to change and vice versa. But direct changes on the source * will not be propagated with the callback. * </p> * * @param <E> the gene...
Returns the composition of the given list and callback. Note: Any changes to the original list will cause the returned list to change and vice versa. But direct changes on the source will not be propagated with the callback.
compose
{ "repo_name": "cosmocode/cosmocode-commons", "path": "src/main/java/de/cosmocode/collections/callback/Callbacks.java", "license": "apache-2.0", "size": 5183 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,860,293
HistogramValues getHistogramValues() throws IOException;
HistogramValues getHistogramValues() throws IOException;
/** * Return Histogram values. */
Return Histogram values
getHistogramValues
{ "repo_name": "gingerwizard/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/fielddata/LeafHistogramFieldData.java", "license": "apache-2.0", "size": 1108 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,107,853
public String[] getStrings(String name) { String valueString = get(name); return StringUtils.getStrings(valueString); }
String[] function(String name) { String valueString = get(name); return StringUtils.getStrings(valueString); }
/** * Get the comma delimited values of the <code>name</code> property as * an array of <code>String</code>s. * If no such property is specified then <code>null</code> is returned. * * @param name property name. * @return property value as an array of <code>String</code>s, * or <code>...
Get the comma delimited values of the <code>name</code> property as an array of <code>String</code>s. If no such property is specified then <code>null</code> is returned
getStrings
{ "repo_name": "submergerock/avatar-hadoop", "path": "build/hadoop-0.20.1-dev/src/core/org/apache/hadoop/conf/Configuration.java", "license": "apache-2.0", "size": 42445 }
[ "org.apache.hadoop.util.StringUtils" ]
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,532,298
public void apply(WriteStream out, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (_sizefmt != null) request.setAttribute("caucho.ssi.sizefmt", _sizefmt); if (_errmsg != null) request.setAttribu...
void function(WriteStream out, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (_sizefmt != null) request.setAttribute(STR, _sizefmt); if (_errmsg != null) request.setAttribute(STR, _errmsg); if (_timefmt != null) request.setAttribute(STR, _timefmt); }
/** * Executes the SSI statement. * * @param out the output stream * @param request the servlet request * @param response the servlet response */
Executes the SSI statement
apply
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/servlets/ssi/ConfigStatement.java", "license": "gpl-2.0", "size": 2513 }
[ "com.caucho.vfs.WriteStream", "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import com.caucho.vfs.WriteStream; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import com.caucho.vfs.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "com.caucho.vfs", "java.io", "javax.servlet" ]
com.caucho.vfs; java.io; javax.servlet;
2,329,091
private List<Item> liveGetItems(Task t) { lock.lock(); try { List<Item> result = new ArrayList<>(); result.addAll(blockedProjects.getAll(t)); result.addAll(buildables.getAll(t)); // Do not include pendings—we have already finalized WorkUnitContext.acti...
List<Item> function(Task t) { lock.lock(); try { List<Item> result = new ArrayList<>(); result.addAll(blockedProjects.getAll(t)); result.addAll(buildables.getAll(t)); if (LOGGER.isLoggable(Level.FINE)) { List<BuildableItem> thePendings = pendings.getAll(t); if (!thePendings.isEmpty()) { LOGGER.log(Level.FINE, STR, theP...
/** * Gets the information about the queue item for the given project. * * @return null if the project is not in the queue. * @since 1.607 */
Gets the information about the queue item for the given project
liveGetItems
{ "repo_name": "stephenc/jenkins", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 116868 }
[ "java.util.ArrayList", "java.util.List", "java.util.logging.Level" ]
import java.util.ArrayList; import java.util.List; import java.util.logging.Level;
import java.util.*; import java.util.logging.*;
[ "java.util" ]
java.util;
974,070
public void logReport(Logger logger) { this.initialiseLog(); for (String reportElement : this.report) { logger.logError(reportElement); } }
void function(Logger logger) { this.initialiseLog(); for (String reportElement : this.report) { logger.logError(reportElement); } }
/** * Prints the log using the specified logger. * @param logger The logger to log with. */
Prints the log using the specified logger
logReport
{ "repo_name": "Niadel/NiadelCommons", "path": "src/co/uk/niadel/commons/crash/CrashReport.java", "license": "gpl-2.0", "size": 3090 }
[ "co.uk.niadel.commons.logging.Logger" ]
import co.uk.niadel.commons.logging.Logger;
import co.uk.niadel.commons.logging.*;
[ "co.uk.niadel" ]
co.uk.niadel;
398,043
Result<Trade> getTrade() { CalculationTarget target = getTarget(); if (target instanceof Trade) { return Result.success((Trade) target); } return Result.failure(FailureReason.INVALID, "Calculaton target is not a trade"); }
Result<Trade> getTrade() { CalculationTarget target = getTarget(); if (target instanceof Trade) { return Result.success((Trade) target); } return Result.failure(FailureReason.INVALID, STR); }
/** * Returns the trade from the row. * * @return the trade from the row */
Returns the trade from the row
getTrade
{ "repo_name": "OpenGamma/Strata", "path": "modules/report/src/main/java/com/opengamma/strata/report/framework/expression/ResultsRow.java", "license": "apache-2.0", "size": 6795 }
[ "com.opengamma.strata.basics.CalculationTarget", "com.opengamma.strata.collect.result.FailureReason", "com.opengamma.strata.collect.result.Result", "com.opengamma.strata.product.Trade" ]
import com.opengamma.strata.basics.CalculationTarget; import com.opengamma.strata.collect.result.FailureReason; import com.opengamma.strata.collect.result.Result; import com.opengamma.strata.product.Trade;
import com.opengamma.strata.basics.*; import com.opengamma.strata.collect.result.*; import com.opengamma.strata.product.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
1,346,875
protected void showTabs() { if (getPageCount() > 1) { setPageText(0, getString("_UI_SelectionPage_label")); if (getContainer() instanceof CTabFolder) { ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); Point point = getContainer().getSize(); getContainer().setSize(point.x, point.y - 6); ...
void function() { if (getPageCount() > 1) { setPageText(0, getString(STR)); if (getContainer() instanceof CTabFolder) { ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); Point point = getContainer().getSize(); getContainer().setSize(point.x, point.y - 6); } } }
/** * If there is more than one page in the multi-page editor part, * this shows the tabs at the bottom. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
If there is more than one page in the multi-page editor part, this shows the tabs at the bottom.
showTabs
{ "repo_name": "FraunhoferESK/ernest-eclipse-integration", "path": "de.fraunhofer.esk.ernest.core.analysismodel.editor/src/ernest/architecture/presentation/ArchitectureEditor.java", "license": "epl-1.0", "size": 57648 }
[ "org.eclipse.swt.custom.CTabFolder", "org.eclipse.swt.graphics.Point" ]
import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,419,328
public List<RunnerNode> getChildren() { return Collections.unmodifiableList(children); }
List<RunnerNode> function() { return Collections.unmodifiableList(children); }
/** Returns the children of this runner group. * @return The children of this runner group, as an unmodifiable list. */
Returns the children of this runner group
getChildren
{ "repo_name": "AludraTest/aludratest", "path": "src/main/java/org/aludratest/scheduler/node/RunnerGroup.java", "license": "apache-2.0", "size": 4650 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
229,198
public void controllerConnectionFailure(String message, IOException cause);
void function(String message, IOException cause);
/** * Receive an error notification that the controller connection has failed, which means any * further progress for any operation will not succeed. * @param message general information about the failure * @param cause the root cause */
Receive an error notification that the controller connection has failed, which means any further progress for any operation will not succeed
controllerConnectionFailure
{ "repo_name": "matteobertozzi/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/server/commit/distributed/controller/DistributedCommitControllerErrorListener.java", "license": "apache-2.0", "size": 1735 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
917,634
private boolean hasTipsAndTricks(AboutInfo[] infos) { for (int i = 0; i < infos.length; i++) { if (infos[i].getTipsAndTricksHref() != null) { return true; } } return false; }
boolean function(AboutInfo[] infos) { for (int i = 0; i < infos.length; i++) { if (infos[i].getTipsAndTricksHref() != null) { return true; } } return false; }
/** * Returns whether any of the given infos have tips and tricks. * * @param infos * the infos * @return <code>true</code> if tips and tricks were found, <code>false</code> if not */
Returns whether any of the given infos have tips and tricks
hasTipsAndTricks
{ "repo_name": "debrief/limpet", "path": "info.limpet.rcp/src/info/limpet/rcp/product/ApplicationActionBarAdvisor.java", "license": "epl-1.0", "size": 31323 }
[ "org.eclipse.ui.internal.ide.AboutInfo" ]
import org.eclipse.ui.internal.ide.AboutInfo;
import org.eclipse.ui.internal.ide.*;
[ "org.eclipse.ui" ]
org.eclipse.ui;
1,959,190
private void checkDbDeleted(String[] ids) throws JSONException { QuerySpec smartStoreQuery = QuerySpec.buildSmartQuerySpec("SELECT {accounts:_soup}, {accounts:Name} FROM {accounts} WHERE {accounts:Id} IN " + makeInClause(ids), ids.length); JSONArray accountsFromDb = smartStore.query(smartStoreQuery,...
void function(String[] ids) throws JSONException { QuerySpec smartStoreQuery = QuerySpec.buildSmartQuerySpec(STR + makeInClause(ids), ids.length); JSONArray accountsFromDb = smartStore.query(smartStoreQuery, 0); assertEquals(STR,0, accountsFromDb.length()); }
/** * Check that records were deleted from db * @param ids * @throws JSONException */
Check that records were deleted from db
checkDbDeleted
{ "repo_name": "huminzhi/SalesforceMobileSDK-Android", "path": "libs/test/SmartSyncTest/src/com/salesforce/androidsdk/smartsync/manager/SyncManagerTest.java", "license": "apache-2.0", "size": 57743 }
[ "com.salesforce.androidsdk.smartstore.store.QuerySpec", "org.json.JSONArray", "org.json.JSONException" ]
import com.salesforce.androidsdk.smartstore.store.QuerySpec; import org.json.JSONArray; import org.json.JSONException;
import com.salesforce.androidsdk.smartstore.store.*; import org.json.*;
[ "com.salesforce.androidsdk", "org.json" ]
com.salesforce.androidsdk; org.json;
2,502,213
public static void main(String[] args) { try { if (args.length == 0) { System.out.println("USAGE: java bytecodeAnnotations.EntryLogger classname"); } else { JavaClass clazz = Repository.lookupClass(args[0]); ClassGen classGen = new ClassGen(clazz); ...
static void function(String[] args) { try { if (args.length == 0) { System.out.println(STR); } else { JavaClass clazz = Repository.lookupClass(args[0]); ClassGen classGen = new ClassGen(clazz); EntryLogger entryLogger = new EntryLogger(classGen); entryLogger.convert(); String path = Repository.lookupClassFile(String.va...
/** * Adds entry logging code for given class. * * @param args the name of class file to patch */
Adds entry logging code for given class
main
{ "repo_name": "Token3/books-source-code", "path": "corejava9/src/main/java/v2ch10/bytecodeAnnotatons/EntryLogger.java", "license": "gpl-3.0", "size": 4356 }
[ "java.io.IOException", "org.apache.bcel.Repository", "org.apache.bcel.classfile.JavaClass", "org.apache.bcel.generic.ClassGen" ]
import java.io.IOException; import org.apache.bcel.Repository; import org.apache.bcel.classfile.JavaClass; import org.apache.bcel.generic.ClassGen;
import java.io.*; import org.apache.bcel.*; import org.apache.bcel.classfile.*; import org.apache.bcel.generic.*;
[ "java.io", "org.apache.bcel" ]
java.io; org.apache.bcel;
1,492,729
public void start(String originalText, TokenStream tokenStream);
void function(String originalText, TokenStream tokenStream);
/** * Initializes the Fragmenter. You can grab references to the Attributes you are * interested in from tokenStream and then access the values in {@link #isNewFragment()}. * * @param originalText the original source text * @param tokenStream the {@link TokenStream} to be fragmented */
Initializes the Fragmenter. You can grab references to the Attributes you are interested in from tokenStream and then access the values in <code>#isNewFragment()</code>
start
{ "repo_name": "smartan/lucene", "path": "src/main/java/org/apache/lucene/search/highlight/Fragmenter.java", "license": "apache-2.0", "size": 1795 }
[ "org.apache.lucene.analysis.TokenStream" ]
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,191,118
public static void info(final String message) { Logger logger = LoggerFactory.getLogger(getCallerClassName()); logger.info(message); }
static void function(final String message) { Logger logger = LoggerFactory.getLogger(getCallerClassName()); logger.info(message); }
/** * See {@link org.apache.log4j.Logger#info(Object)}. * * @param message * the message to log. */
See <code>org.apache.log4j.Logger#info(Object)</code>
info
{ "repo_name": "CloudBindle/youxia", "path": "youxia-common/src/main/java/io/cloudbindle/youxia/util/Log.java", "license": "gpl-3.0", "size": 8755 }
[ "org.slf4j.Logger", "org.slf4j.LoggerFactory" ]
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import org.slf4j.*;
[ "org.slf4j" ]
org.slf4j;
516,421
private boolean bridgeDiscovered(P1Telegram telegram) { ThingUID thingUID = new ThingUID(DSMRBindingConstants.THING_TYPE_DSMR_BRIDGE, Integer.toHexString(currentScannedPortName.hashCode())); // Construct the configuration for this meter Map<String, Object> properties = new H...
boolean function(P1Telegram telegram) { ThingUID thingUID = new ThingUID(DSMRBindingConstants.THING_TYPE_DSMR_BRIDGE, Integer.toHexString(currentScannedPortName.hashCode())); Map<String, Object> properties = new HashMap<>(); properties.put(STR, currentScannedPortName); DiscoveryResult discoveryResult = DiscoveryResultB...
/** * * Therefore this method will always return true * * @return true if bridge is accepted, false otherwise */
Therefore this method will always return true
bridgeDiscovered
{ "repo_name": "gerrieg/openhab2", "path": "addons/binding/org.openhab.binding.dsmr/src/main/java/org/openhab/binding/dsmr/internal/discovery/DSMRBridgeDiscoveryService.java", "license": "epl-1.0", "size": 8868 }
[ "java.util.HashMap", "java.util.Map", "org.eclipse.smarthome.config.discovery.DiscoveryResult", "org.eclipse.smarthome.config.discovery.DiscoveryResultBuilder", "org.eclipse.smarthome.core.thing.ThingUID", "org.openhab.binding.dsmr.internal.DSMRBindingConstants", "org.openhab.binding.dsmr.internal.devic...
import java.util.HashMap; import java.util.Map; import org.eclipse.smarthome.config.discovery.DiscoveryResult; import org.eclipse.smarthome.config.discovery.DiscoveryResultBuilder; import org.eclipse.smarthome.core.thing.ThingUID; import org.openhab.binding.dsmr.internal.DSMRBindingConstants; import org.openhab.binding...
import java.util.*; import org.eclipse.smarthome.config.discovery.*; import org.eclipse.smarthome.core.thing.*; import org.openhab.binding.dsmr.internal.*; import org.openhab.binding.dsmr.internal.device.p1telegram.*;
[ "java.util", "org.eclipse.smarthome", "org.openhab.binding" ]
java.util; org.eclipse.smarthome; org.openhab.binding;
1,364,743
public void deadlineButton(View v){ Date today = new Date(); new SlideDateTimePicker.Builder(getSupportFragmentManager()) .setListener(listener) .setInitialDate(new Date(today.getTime() + (1000 * 60 * 60 * 24))) //Tomorrow's date. .build() ...
void function(View v){ Date today = new Date(); new SlideDateTimePicker.Builder(getSupportFragmentManager()) .setListener(listener) .setInitialDate(new Date(today.getTime() + (1000 * 60 * 60 * 24))) .build() .show(); }
/** * Listener method for the deadline Button * * @param v - the view that will be operated on. */
Listener method for the deadline Button
deadlineButton
{ "repo_name": "luxnova/ToDoList", "path": "app/src/main/java/itrellis/com/todolist/activities/CreateToDoActivity.java", "license": "apache-2.0", "size": 7122 }
[ "android.view.View", "com.github.jjobes.slidedatetimepicker.SlideDateTimePicker", "java.util.Date" ]
import android.view.View; import com.github.jjobes.slidedatetimepicker.SlideDateTimePicker; import java.util.Date;
import android.view.*; import com.github.jjobes.slidedatetimepicker.*; import java.util.*;
[ "android.view", "com.github.jjobes", "java.util" ]
android.view; com.github.jjobes; java.util;
567,064
@ServiceMethod(returns = ReturnType.SINGLE) Mono<List<MicrosoftGraphExtensionPropertyInner>> getAvailableExtensionPropertiesAsync( DevicesGetAvailableExtensionPropertiesRequestBody body);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<List<MicrosoftGraphExtensionPropertyInner>> getAvailableExtensionPropertiesAsync( DevicesGetAvailableExtensionPropertiesRequestBody body);
/** * Invoke action getAvailableExtensionProperties. * * @param body Action parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.authorization.fluent.models.OdataErrorMainException thrown if the request is * reject...
Invoke action getAvailableExtensionProperties
getAvailableExtensionPropertiesAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DevicesClient.java", "license": "mit", "size": 81714 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.authorization.fluent.models.DevicesGetAvailableExtensionPropertiesRequestBody", "com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphExtensionPropertyInner", "java.util.List" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.authorization.fluent.models.DevicesGetAvailableExtensionPropertiesRequestBody; import com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphExtensionPropertyInner; import java.util...
import com.azure.core.annotation.*; import com.azure.resourcemanager.authorization.fluent.models.*; import java.util.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.util" ]
com.azure.core; com.azure.resourcemanager; java.util;
448,694
public Map.Entry<K, V> parseEntry(ByteString bytes, ExtensionRegistryLite extensionRegistry) throws IOException { return parseEntry(bytes.newCodedInput(), metadata, extensionRegistry); }
Map.Entry<K, V> function(ByteString bytes, ExtensionRegistryLite extensionRegistry) throws IOException { return parseEntry(bytes.newCodedInput(), metadata, extensionRegistry); }
/** * Parses an entry off of the input as a {@link Map.Entry}. This helper requires an allocation so * using {@link #parseInto} is preferred if possible. */
Parses an entry off of the input as a <code>Map.Entry</code>. This helper requires an allocation so using <code>#parseInto</code> is preferred if possible
parseEntry
{ "repo_name": "endlessm/chromium-browser", "path": "third_party/protobuf/java/core/src/main/java/com/google/protobuf/MapEntryLite.java", "license": "bsd-3-clause", "size": 8762 }
[ "java.io.IOException", "java.util.Map" ]
import java.io.IOException; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
703,164
private void returnReferences(Transaction tx, AMQSession session) throws Exception { if (session == null || session.isClosed()) { return; } RefsOperation oper = (RefsOperation) tx.getProperty(TransactionPropertyIndexes.REFS_OPERATION); if (oper != null) { ...
void function(Transaction tx, AMQSession session) throws Exception { if (session == null session.isClosed()) { return; } RefsOperation oper = (RefsOperation) tx.getProperty(TransactionPropertyIndexes.REFS_OPERATION); if (oper != null) { List<MessageReference> ackRefs = oper.getReferencesToAcknowledge(); for (ListIterat...
/** * Openwire will redeliver rolled back references. * We need to return those here. */
Openwire will redeliver rolled back references. We need to return those here
returnReferences
{ "repo_name": "clebertsuconic/activemq-artemis", "path": "artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java", "license": "apache-2.0", "size": 67055 }
[ "java.util.List", "java.util.ListIterator", "org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer", "org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession", "org.apache.activemq.artemis.core.server.MessageReference", "org.apache.activemq.artemis.core.server.ServerConsumer", "or...
import java.util.List; import java.util.ListIterator; import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer; import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession; import org.apache.activemq.artemis.core.server.MessageReference; import org.apache.activemq.artemis.core.server.Serve...
import java.util.*; import org.apache.activemq.artemis.core.protocol.openwire.amq.*; import org.apache.activemq.artemis.core.server.*; import org.apache.activemq.artemis.core.server.impl.*; import org.apache.activemq.artemis.core.transaction.*;
[ "java.util", "org.apache.activemq" ]
java.util; org.apache.activemq;
1,929,391
public void zkDelete(String path, boolean recursive, BackgroundCallback backgroundCallback) throws IOException { checkServiceLive(); String fullpath = createFullPath(path); try { if (LOG.isDebugEnabled()) { LOG.debug("Deleting {}", fullpath); } DeleteBuilder delete = ...
void function(String path, boolean recursive, BackgroundCallback backgroundCallback) throws IOException { checkServiceLive(); String fullpath = createFullPath(path); try { if (LOG.isDebugEnabled()) { LOG.debug(STR, fullpath); } DeleteBuilder delete = curator.delete(); if (recursive) { delete.deletingChildrenIfNeeded();...
/** * Delete a directory/directory tree. * It is not an error to delete a path that does not exist * @param path path of operation * @param recursive flag to trigger recursive deletion * @param backgroundCallback callback; this being set converts the operation * into an async/background operation. ...
Delete a directory/directory tree. It is not an error to delete a path that does not exist
zkDelete
{ "repo_name": "bruthe/hadoop-2.6.0r", "path": "src/yarn/registry/org/apache/hadoop/registry/client/impl/zk/CuratorService.java", "license": "apache-2.0", "size": 23994 }
[ "java.io.IOException", "org.apache.curator.framework.api.BackgroundCallback", "org.apache.curator.framework.api.DeleteBuilder", "org.apache.zookeeper.KeeperException" ]
import java.io.IOException; import org.apache.curator.framework.api.BackgroundCallback; import org.apache.curator.framework.api.DeleteBuilder; import org.apache.zookeeper.KeeperException;
import java.io.*; import org.apache.curator.framework.api.*; import org.apache.zookeeper.*;
[ "java.io", "org.apache.curator", "org.apache.zookeeper" ]
java.io; org.apache.curator; org.apache.zookeeper;
1,726,089
private void dispatchEvent(KeyEvent keyEvent) { // Gets the active text edition area AcideTextComponent textPane = AcideMainWindow.getInstance() .getFileEditorManager().getSelectedFileEditorPanel() .getActiveTextEditionArea(); // Gets the view port from the text pane parent JViewport viewpo...
void function(KeyEvent keyEvent) { AcideTextComponent textPane = AcideMainWindow.getInstance() .getFileEditorManager().getSelectedFileEditorPanel() .getActiveTextEditionArea(); JViewport viewport = (JViewport) textPane.getParent(); Rectangle rectangle = viewport.getViewRect(); Point point = rectangle.getLocation(); int...
/** * Dispatches the key event. * * @param keyEvent * key event. */
Dispatches the key event
dispatchEvent
{ "repo_name": "salcedonia/acide-0-8-release-2010-2011", "path": "acide/src/acide/gui/fileEditor/fileEditorPanel/fileEditorTextEditionArea/listeners/AcideFileEditorScrollPaneKeyListener.java", "license": "gpl-3.0", "size": 4273 }
[ "java.awt.Point", "java.awt.Rectangle", "java.awt.event.KeyEvent", "javax.swing.JViewport" ]
import java.awt.Point; import java.awt.Rectangle; import java.awt.event.KeyEvent; import javax.swing.JViewport;
import java.awt.*; import java.awt.event.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,675,328
protected boolean limitsMatch(List<AwardBudgetLimit> awardLimits, List<AwardBudgetLimit> budgetLimits) { if (awardLimits.size() < budgetLimits.size()) { getAuditWarnings().add(new AuditError("document.budget.awardBudgetLimits", KeyConstants.AUDIT_ERROR_COST_LIMITS_CHANGED, ...
boolean function(List<AwardBudgetLimit> awardLimits, List<AwardBudgetLimit> budgetLimits) { if (awardLimits.size() < budgetLimits.size()) { getAuditWarnings().add(new AuditError(STR, KeyConstants.AUDIT_ERROR_COST_LIMITS_CHANGED, Constants.BUDGET_PERIOD_PAGE + "." + STR)); return true; } for (AwardBudgetLimit limit : aw...
/** * * Compares the budget limit lists to make sure they match. * @param awardLimits * @param budgetLimits * @return */
Compares the budget limit lists to make sure they match
limitsMatch
{ "repo_name": "sanjupolus/kc-coeus-1508.3", "path": "coeus-impl/src/main/java/org/kuali/kra/award/budget/AwardBudgetCostLimitAuditRule.java", "license": "agpl-3.0", "size": 9297 }
[ "java.util.List", "org.kuali.kra.infrastructure.Constants", "org.kuali.kra.infrastructure.KeyConstants", "org.kuali.rice.krad.util.AuditError", "org.kuali.rice.krad.util.ObjectUtils" ]
import java.util.List; import org.kuali.kra.infrastructure.Constants; import org.kuali.kra.infrastructure.KeyConstants; import org.kuali.rice.krad.util.AuditError; import org.kuali.rice.krad.util.ObjectUtils;
import java.util.*; import org.kuali.kra.infrastructure.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.kuali.kra", "org.kuali.rice" ]
java.util; org.kuali.kra; org.kuali.rice;
2,637,363
@Test public void testLoadPropertiesOk() throws Exception { Properties props; props = new Properties(); props.setProperty("set1", TestModelRoot.class.getName() + ":intProperty,secondLevelModelProperty.int2Property " + ",thirdLevelModelProperty.string3Property " + ",s...
void function() throws Exception { Properties props; props = new Properties(); props.setProperty("set1", TestModelRoot.class.getName() + STR + STR + STR + STR); props.setProperty("set2", TestModelSecondLevel.class.getName() + STR); registry.loadFromProperties(props); Assert.assertFalse(registry.isEmpty()); Assert.asser...
/** * Test {@link SetRegistryDefaultImpl#loadFromResource(org.springframework.core.io.Resource)} without errors. */
Test <code>SetRegistryDefaultImpl#loadFromResource(org.springframework.core.io.Resource)</code> without errors
testLoadPropertiesOk
{ "repo_name": "albirar/framework", "path": "core/src/test/java/cat/albirar/framework/sets/registry/impl/SetRegistryDefaultImplTest.java", "license": "gpl-3.0", "size": 19918 }
[ "cat.albirar.framework.sets.impl.models.TestModelRoot", "cat.albirar.framework.sets.impl.models.TestModelSecondLevel", "java.util.Properties", "org.junit.Assert" ]
import cat.albirar.framework.sets.impl.models.TestModelRoot; import cat.albirar.framework.sets.impl.models.TestModelSecondLevel; import java.util.Properties; import org.junit.Assert;
import cat.albirar.framework.sets.impl.models.*; import java.util.*; import org.junit.*;
[ "cat.albirar.framework", "java.util", "org.junit" ]
cat.albirar.framework; java.util; org.junit;
1,738,578
public void renameStreamRecord(int dirId, int fid, int stid, String newName) throws DBException { // TODO Auto-generated method stub }
void function(int dirId, int fid, int stid, String newName) throws DBException { }
/** * Rename a file stream * * @param dirId int * @param fid int * @param stid int * @param newName * @exception DBException */
Rename a file stream
renameStreamRecord
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/server/filesys/db/mysql/MySQLDBInterface.java", "license": "lgpl-3.0", "size": 104504 }
[ "org.alfresco.jlan.server.filesys.db.DBException" ]
import org.alfresco.jlan.server.filesys.db.DBException;
import org.alfresco.jlan.server.filesys.db.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
530,360
public long estimateMemoryOverhead(SingleObjectSizer sizer) { long size = sizer.sizeof(this); if (isApplicationTableOrGlobalIndex()) { size += this.region.estimateMemoryOverhead(sizer); } else { assert isLocalIndex(); // nothing, use estimateEntryOverhead(...) on ConcurrentSkipList ...
long function(SingleObjectSizer sizer) { long size = sizer.sizeof(this); if (isApplicationTableOrGlobalIndex()) { size += this.region.estimateMemoryOverhead(sizer); } else { assert isLocalIndex(); } return size; } public static final class SerializableDelta extends GfxdDataSerializable implements Delta, Sizeable { priv...
/** * This returns memory overhead excluding individual entry sizes. Just additional * memory consumed by this data structure. * * @param sizer The sizer object that is to be used for estimating objects. * @return */
This returns memory overhead excluding individual entry sizes. Just additional memory consumed by this data structure
estimateMemoryOverhead
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/store/GemFireContainer.java", "license": "apache-2.0", "size": 239877 }
[ "com.gemstone.gemfire.internal.cache.delta.Delta", "com.gemstone.gemfire.internal.cache.lru.Sizeable", "com.gemstone.gemfire.internal.cache.versions.VersionTag", "com.gemstone.gemfire.internal.size.SingleObjectSizer", "com.pivotal.gemfirexd.internal.engine.GfxdDataSerializable", "com.pivotal.gemfirexd.int...
import com.gemstone.gemfire.internal.cache.delta.Delta; import com.gemstone.gemfire.internal.cache.lru.Sizeable; import com.gemstone.gemfire.internal.cache.versions.VersionTag; import com.gemstone.gemfire.internal.size.SingleObjectSizer; import com.pivotal.gemfirexd.internal.engine.GfxdDataSerializable; import com.pivo...
import com.gemstone.gemfire.internal.cache.delta.*; import com.gemstone.gemfire.internal.cache.lru.*; import com.gemstone.gemfire.internal.cache.versions.*; import com.gemstone.gemfire.internal.size.*; import com.pivotal.gemfirexd.internal.engine.*; import com.pivotal.gemfirexd.internal.iapi.services.io.*; import com.p...
[ "com.gemstone.gemfire", "com.pivotal.gemfirexd" ]
com.gemstone.gemfire; com.pivotal.gemfirexd;
24,448
public static SelectorText.Builder builder(Text text, Selector selector) { return new SelectorText.Builder(text, selector); }
static SelectorText.Builder function(Text text, Selector selector) { return new SelectorText.Builder(text, selector); }
/** * Creates a new {@link SelectorText.Builder} with the formatting and * actions of the specified {@link Text} and the given selector. * * @param text The text to apply the properties from * @param selector The selector for the builder * @return The created text builder * @see Selec...
Creates a new <code>SelectorText.Builder</code> with the formatting and actions of the specified <code>Text</code> and the given selector
builder
{ "repo_name": "JBYoshi/SpongeAPI", "path": "src/main/java/org/spongepowered/api/text/Text.java", "license": "mit", "size": 42927 }
[ "org.spongepowered.api.text.selector.Selector" ]
import org.spongepowered.api.text.selector.Selector;
import org.spongepowered.api.text.selector.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
2,159,658
private IAnswerData preloadDate(String preloadParams) { Date d = null; if (preloadParams.equals("today")) { d = new Date(); } else if (preloadParams.substring(0, 11).equals("prevperiod-")) { List<String> v = DateUtils.split(preloadParams.substring(11), "-", false); String[] params = new St...
IAnswerData function(String preloadParams) { Date d = null; if (preloadParams.equals("today")) { d = new Date(); } else if (preloadParams.substring(0, 11).equals(STR)) { List<String> v = DateUtils.split(preloadParams.substring(11), "-", false); String[] params = new String[v.size()]; for (int i = 0; i < params.length; ...
/** * Preloads a DateData object for the preload type 'date' * * @param preloadParams The parameters determining the date * @return A preload date value if the parameters can be parsed, * null otherwise */
Preloads a DateData object for the preload type 'date'
preloadDate
{ "repo_name": "medic/javarosa", "path": "core/src/org/javarosa/core/model/utils/QuestionPreloader.java", "license": "apache-2.0", "size": 8271 }
[ "java.util.Date", "java.util.List", "org.javarosa.core.model.data.DateData", "org.javarosa.core.model.data.IAnswerData" ]
import java.util.Date; import java.util.List; import org.javarosa.core.model.data.DateData; import org.javarosa.core.model.data.IAnswerData;
import java.util.*; import org.javarosa.core.model.data.*;
[ "java.util", "org.javarosa.core" ]
java.util; org.javarosa.core;
1,774,689
public boolean hasListener(EventListener listener) { return listenerList.contains(listener); }
boolean function(EventListener listener) { return listenerList.contains(listener); }
/** * Returns <code>true</code> if the specified object is registered with * the dataset as a listener. Most applications won't need to call this * method, it exists mainly for use by unit testing code. * * @param listener the listener. * * @return A boolean. */
Returns <code>true</code> if the specified object is registered with the dataset as a listener. Most applications won't need to call this method, it exists mainly for use by unit testing code
hasListener
{ "repo_name": "djun100/afreechart", "path": "src/org/afree/chart/axis/Axis.java", "license": "lgpl-3.0", "size": 47554 }
[ "java.util.EventListener" ]
import java.util.EventListener;
import java.util.*;
[ "java.util" ]
java.util;
552,673
public DiagnosticContractInner withBackend(PipelineDiagnosticSettings backend) { if (this.innerProperties() == null) { this.innerProperties = new DiagnosticContractProperties(); } this.innerProperties().withBackend(backend); return this; }
DiagnosticContractInner function(PipelineDiagnosticSettings backend) { if (this.innerProperties() == null) { this.innerProperties = new DiagnosticContractProperties(); } this.innerProperties().withBackend(backend); return this; }
/** * Set the backend property: Diagnostic settings for incoming/outgoing HTTP messages to the Backend. * * @param backend the backend value to set. * @return the DiagnosticContractInner object itself. */
Set the backend property: Diagnostic settings for incoming/outgoing HTTP messages to the Backend
withBackend
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/models/DiagnosticContractInner.java", "license": "mit", "size": 9339 }
[ "com.azure.resourcemanager.apimanagement.models.PipelineDiagnosticSettings" ]
import com.azure.resourcemanager.apimanagement.models.PipelineDiagnosticSettings;
import com.azure.resourcemanager.apimanagement.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,005,438
public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.language.v1.ClassifyTextResponse> classifyText( com.google.cloud.language.v1.ClassifyTextRequest request) { return futureUnaryCall( getChannel().newCall(getClassifyTextMethodHelper(), getCallOptions()), request); ...
com.google.common.util.concurrent.ListenableFuture<com.google.cloud.language.v1.ClassifyTextResponse> function( com.google.cloud.language.v1.ClassifyTextRequest request) { return futureUnaryCall( getChannel().newCall(getClassifyTextMethodHelper(), getCallOptions()), request); }
/** * <pre> * Classifies a document into categories. * </pre> */
<code> Classifies a document into categories. </code>
classifyText
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/grpc-google-cloud-language-v1/src/main/java/com/google/cloud/language/v1/LanguageServiceGrpc.java", "license": "bsd-3-clause", "size": 38611 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
1,519,698
public AzureEnvironment getEnvironment() { return this.environment == null ? DEFAULT_ENVIRONMENT : parseEnvironment(this.environment); }
AzureEnvironment function() { return this.environment == null ? DEFAULT_ENVIRONMENT : parseEnvironment(this.environment); }
/** * The particular Azure environment (see {@link AzureEnvironment}) to * authenticate against. One of: {@code AZURE}, {@code AZURE_CHINA}, * {@code AZURE_US_GOVERNMENT}, {@code AZURE_GERMANY}. * * @return */
The particular Azure environment (see <code>AzureEnvironment</code>) to authenticate against. One of: AZURE, AZURE_CHINA, AZURE_US_GOVERNMENT, AZURE_GERMANY
getEnvironment
{ "repo_name": "elastisys/scale.cloudpool", "path": "azure/src/main/java/com/elastisys/scale/cloudpool/azure/driver/config/AzureAuth.java", "license": "apache-2.0", "size": 6618 }
[ "com.microsoft.azure.AzureEnvironment" ]
import com.microsoft.azure.AzureEnvironment;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,712,110
@Test void testGetImplementationUnknown() { assertCause(() -> configurer.getImplementation(Object.class, "unknown"), ClassNotFoundException.class); }
void testGetImplementationUnknown() { assertCause(() -> configurer.getImplementation(Object.class, STR), ClassNotFoundException.class); }
/** * Test the get implementation using unknown class. */
Test the get implementation using unknown class
testGetImplementationUnknown
{ "repo_name": "b3dgs/lionengine", "path": "lionengine-game/src/test/java/com/b3dgs/lionengine/game/ConfigurerTest.java", "license": "gpl-3.0", "size": 13471 }
[ "com.b3dgs.lionengine.UtilAssert" ]
import com.b3dgs.lionengine.UtilAssert;
import com.b3dgs.lionengine.*;
[ "com.b3dgs.lionengine" ]
com.b3dgs.lionengine;
2,776,151
public void setGroups(Map<String, Group> groups) { this.groups = groups; }
void function(Map<String, Group> groups) { this.groups = groups; }
/** * Set the user's groups */
Set the user's groups
setGroups
{ "repo_name": "Wundero/Ray", "path": "src/main/java/me/Wundero/Ray/framework/player/RayPlayer.java", "license": "mit", "size": 12192 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,219,952
public ArrayList<String> getGeneList() { return geneList; }
ArrayList<String> function() { return geneList; }
/** * Gets the Gene List. * * @return ArrayList of Gene Symbols. */
Gets the Gene List
getGeneList
{ "repo_name": "bihealth/cbioportal", "path": "core/src/main/java/org/mskcc/cbio/portal/model/DownloadLink.java", "license": "agpl-3.0", "size": 2964 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,554,697
public WriteFiles<UserT, DestinationT, OutputT> withNumShards( ValueProvider<Integer> numShardsProvider) { return toBuilder().setNumShardsProvider(numShardsProvider).build(); }
WriteFiles<UserT, DestinationT, OutputT> function( ValueProvider<Integer> numShardsProvider) { return toBuilder().setNumShardsProvider(numShardsProvider).build(); }
/** * Returns a new {@link WriteFiles} that will write to the current {@link FileBasedSink} using the * {@link ValueProvider} specified number of shards. * * <p>This option should be used sparingly as it can hurt performance. See {@link WriteFiles} for * more information. */
Returns a new <code>WriteFiles</code> that will write to the current <code>FileBasedSink</code> using the <code>ValueProvider</code> specified number of shards. This option should be used sparingly as it can hurt performance. See <code>WriteFiles</code> for more information
withNumShards
{ "repo_name": "lukecwik/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java", "license": "apache-2.0", "size": 46885 }
[ "org.apache.beam.sdk.options.ValueProvider" ]
import org.apache.beam.sdk.options.ValueProvider;
import org.apache.beam.sdk.options.*;
[ "org.apache.beam" ]
org.apache.beam;
1,543,959
@SideOnly(Side.CLIENT) public boolean isInRangeToRenderDist(double distance) { double d0 = this.getEntityBoundingBox().getAverageEdgeLength() * 4.0D; if (Double.isNaN(d0)) { d0 = 4.0D; } d0 = d0 * 64.0D; return distance < d0 * d0; } publ...
@SideOnly(Side.CLIENT) boolean function(double distance) { double d0 = this.getEntityBoundingBox().getAverageEdgeLength() * 4.0D; if (Double.isNaN(d0)) { d0 = 4.0D; } d0 = d0 * 64.0D; return distance < d0 * d0; } public EntityFireball(World worldIn, double x, double y, double z, double accelX, double accelY, double acc...
/** * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge * length * 64 * renderDistanceWeight Args: distance */
Checks if the entity is in range to render by using the past in distance and comparing it to its average edge length * 64 * renderDistanceWeight Args: distance
isInRangeToRenderDist
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/projectile/EntityFireball.java", "license": "gpl-3.0", "size": 10501 }
[ "net.minecraft.entity.EntityLivingBase", "net.minecraft.util.math.MathHelper", "net.minecraft.world.World", "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.entity.*; import net.minecraft.util.math.*; import net.minecraft.world.*; import net.minecraftforge.fml.relauncher.*;
[ "net.minecraft.entity", "net.minecraft.util", "net.minecraft.world", "net.minecraftforge.fml" ]
net.minecraft.entity; net.minecraft.util; net.minecraft.world; net.minecraftforge.fml;
1,612,709
public void loadPluginRegistry() throws KettlePluginException { }
void function() throws KettlePluginException { }
/** * Loads the plugin registry. * * @throws KettlePluginException if any errors are encountered while loading the plugin registry. */
Loads the plugin registry
loadPluginRegistry
{ "repo_name": "nicoben/pentaho-kettle", "path": "engine/src/org/pentaho/di/core/KettleEnvironment.java", "license": "apache-2.0", "size": 8775 }
[ "org.pentaho.di.core.exception.KettlePluginException" ]
import org.pentaho.di.core.exception.KettlePluginException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,099,572
public static String getLabel(ComponentJob job, boolean includeDescriptorName, boolean includeInputColumnNames, boolean includeRequirements) { final String jobName = job.getName(); final StringBuilder label = new StringBuilder(); if (Strings.isNullOrEmpty(jobName)) { ...
static String function(ComponentJob job, boolean includeDescriptorName, boolean includeInputColumnNames, boolean includeRequirements) { final String jobName = job.getName(); final StringBuilder label = new StringBuilder(); if (Strings.isNullOrEmpty(jobName)) { ComponentDescriptor<?> descriptor = job.getDescriptor(); St...
/** * Gets the label of a components job * * @param job * @param includeDescriptorName * @param includeInputColumnNames * @param includeRequirements * * @return */
Gets the label of a components job
getLabel
{ "repo_name": "anandswarupv/DataCleaner", "path": "engine/core/src/main/java/org/datacleaner/util/LabelUtils.java", "license": "lgpl-3.0", "size": 8106 }
[ "com.google.common.base.Strings", "org.datacleaner.api.HasLabelAdvice", "org.datacleaner.api.InputColumn", "org.datacleaner.configuration.DataCleanerConfiguration", "org.datacleaner.descriptors.ComponentDescriptor", "org.datacleaner.job.AnalysisJob", "org.datacleaner.job.AnalyzerJob", "org.datacleaner...
import com.google.common.base.Strings; import org.datacleaner.api.HasLabelAdvice; import org.datacleaner.api.InputColumn; import org.datacleaner.configuration.DataCleanerConfiguration; import org.datacleaner.descriptors.ComponentDescriptor; import org.datacleaner.job.AnalysisJob; import org.datacleaner.job.AnalyzerJob;...
import com.google.common.base.*; import org.datacleaner.api.*; import org.datacleaner.configuration.*; import org.datacleaner.descriptors.*; import org.datacleaner.job.*; import org.datacleaner.lifecycle.*;
[ "com.google.common", "org.datacleaner.api", "org.datacleaner.configuration", "org.datacleaner.descriptors", "org.datacleaner.job", "org.datacleaner.lifecycle" ]
com.google.common; org.datacleaner.api; org.datacleaner.configuration; org.datacleaner.descriptors; org.datacleaner.job; org.datacleaner.lifecycle;
831,411
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": "strapdata/elassandra", "path": "server/src/main/java/org/elasticsearch/common/lucene/uid/VersionsAndSeqNoResolver.java", "license": "apache-2.0", "size": 8085 }
[ "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,843,674
void handleNotificationError(IBinder key, StatusBarNotification n, String message) { removeNotification(key); try { mBarService.onNotificationError(n.pkg, n.tag, n.id, n.uid, n.initialPid, message); } catch (RemoteException ex) { // The end is nigh. } }
void handleNotificationError(IBinder key, StatusBarNotification n, String message) { removeNotification(key); try { mBarService.onNotificationError(n.pkg, n.tag, n.id, n.uid, n.initialPid, message); } catch (RemoteException ex) { } }
/** * Cancel this notification and tell the StatusBarManagerService / NotificationManagerService * about the failure. * * WARNING: this will call back into us. Don't hold any locks. */
Cancel this notification and tell the StatusBarManagerService / NotificationManagerService about the failure
handleNotificationError
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java", "license": "gpl-2.0", "size": 50130 }
[ "android.os.IBinder", "android.os.RemoteException", "com.android.internal.statusbar.StatusBarNotification" ]
import android.os.IBinder; import android.os.RemoteException; import com.android.internal.statusbar.StatusBarNotification;
import android.os.*; import com.android.internal.statusbar.*;
[ "android.os", "com.android.internal" ]
android.os; com.android.internal;
150,229
void sendMessage(Message message) throws IOException;
void sendMessage(Message message) throws IOException;
/** * Attempts to send the message to the server. * Note: The message will not be sent if an exception occurs. * * @param message The message to be sent * @throws IOException Exception which may occur during the sending of the message. */
Attempts to send the message to the server. Note: The message will not be sent if an exception occurs
sendMessage
{ "repo_name": "aaruff/LabManager", "path": "src/main/java/edu/nyu/cess/remote/common/message/MessageSocket.java", "license": "gpl-3.0", "size": 1448 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,147,927
public void addTopologySerializer(String[] extensions, TopologySerializer topologySerializer) { for(String ext : extensions) addTopologySerializer(".*\\."+ext+"$", topologySerializer); } private static class SupportedSerializer { String rege...
void function(String[] extensions, TopologySerializer topologySerializer) { for(String ext : extensions) addTopologySerializer(".*\\."+ext+"$", topologySerializer); } private static class SupportedSerializer { String regex; TopologySerializer topologySerializer; public SupportedSerializer(String regex, TopologySerializ...
/** * Records and links the provided {@link TopologySerializer} to a given array. * of filename extensions. * * @param extensions an array if filename extensions (without the . character) * @param topologySerializer the {@link TopologySerializer} to be recorded */
Records and links the provided <code>TopologySerializer</code> to a given array. of filename extensions
addTopologySerializer
{ "repo_name": "acasteigts/JBotSim", "path": "lib/jbotsim-serialization-common/src/main/java/io/jbotsim/io/format/TopologySerializerFilenameMatcher.java", "license": "lgpl-3.0", "size": 3076 }
[ "io.jbotsim.io.TopologySerializer" ]
import io.jbotsim.io.TopologySerializer;
import io.jbotsim.io.*;
[ "io.jbotsim.io" ]
io.jbotsim.io;
2,891,546
private RefreshListeners buildRefreshListeners() { return new RefreshListeners( indexSettings::getMaxRefreshListeners, () -> refresh("too_many_listeners"), threadPool.executor(ThreadPool.Names.LISTENER)::execute, logger, threadPool.getThreadContext()); } ...
RefreshListeners function() { return new RefreshListeners( indexSettings::getMaxRefreshListeners, () -> refresh(STR), threadPool.executor(ThreadPool.Names.LISTENER)::execute, logger, threadPool.getThreadContext()); } public static final class ShardFailure { public final ShardRouting routing; public final String reason;...
/** * Build {@linkplain RefreshListeners} for this shard. */
Build RefreshListeners for this shard
buildRefreshListeners
{ "repo_name": "jprante/elasticsearch-server", "path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 126001 }
[ "org.elasticsearch.cluster.routing.ShardRouting", "org.elasticsearch.common.Nullable", "org.elasticsearch.threadpool.ThreadPool" ]
import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.common.Nullable; import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.*; import org.elasticsearch.threadpool.*;
[ "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.threadpool" ]
org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.threadpool;
1,121,871
if (catalogServices == null) { catalogServices = new ArrayList<CatalogServiceRestRep>(); } return catalogServices; }
if (catalogServices == null) { catalogServices = new ArrayList<CatalogServiceRestRep>(); } return catalogServices; }
/** * List of catalog services * * @return catalog services list */
List of catalog services
getCatalogServices
{ "repo_name": "emcvipr/controller-client-java", "path": "models/src/main/java/com/emc/vipr/model/catalog/CatalogServiceBulkRep.java", "license": "apache-2.0", "size": 1134 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
868,719
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException;
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, Resource resource, User user, Member member) throws MemberResourceMismatchException;
/** * Get memner, user, member-resource, user-facility attributes which are required by the service. * * * @param sess * @param service * @param facility * @param resource * @param user * @param member * @return * * @throws InternalErrorException * @throws MemberResourceMismatchException */
Get memner, user, member-resource, user-facility attributes which are required by the service
getRequiredAttributes
{ "repo_name": "zlamalp/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java", "license": "bsd-2-clause", "size": 244560 }
[ "cz.metacentrum.perun.core.api.Attribute", "cz.metacentrum.perun.core.api.Facility", "cz.metacentrum.perun.core.api.Member", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.Resource", "cz.metacentrum.perun.core.api.Service", "cz.metacentrum.perun.core.api.User", "cz.metace...
import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Resource; import cz.metacentrum.perun.core.api.Service; import cz.metacentrum.perun.core.api...
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,814,056
private Map<String, Integer> calculateFrequencyOfAttributeValues( List<String[]> instances, int indexAttribute) { // A map to calculate the frequency of each value: // Key: a string indicating a value // Value: the frequency Map<String, Integer> targetValuesFrequency = new HashMap<String, Integer>(); ...
Map<String, Integer> function( List<String[]> instances, int indexAttribute) { Map<String, Integer> targetValuesFrequency = new HashMap<String, Integer>(); for (String[] instance : instances) { String targetValue = instance[indexAttribute]; if (targetValuesFrequency.get(targetValue) == null) { targetValuesFrequency.put...
/** * This method calculates the frequency of each value for an attribute in a * given set of instances * * @param instances * A set of instances * @param indexAttribute * The attribute. * @return A map where the keys are attributes and values are the number of * times t...
This method calculates the frequency of each value for an attribute in a given set of instances
calculateFrequencyOfAttributeValues
{ "repo_name": "ArneBinder/LanguageAnalyzer", "path": "src/main/java/ca/pfv/spmf/algorithms/classifiers/decisiontree/id3/AlgoID3.java", "license": "gpl-3.0", "size": 13484 }
[ "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,863,901
public Map<String, String> getHeaders() { return headers; }
Map<String, String> function() { return headers; }
/** * Obtains a {@link Map} containing the HTTP Response Headers * * @return headers */
Obtains a <code>Map</code> containing the HTTP Response Headers
getHeaders
{ "repo_name": "scribejava/scribejava", "path": "scribejava-core/src/main/java/com/github/scribejava/core/model/Response.java", "license": "mit", "size": 4137 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
434,256
@Before public void createBlankRepo() throws IOException { helper.createEmptyRepository(); }
void function() throws IOException { helper.createEmptyRepository(); }
/** * Every test in this class gets a blank github repository created for them. * * @throws IOException */
Every test in this class gets a blank github repository created for them
createBlankRepo
{ "repo_name": "jenkinsci/blueocean-plugin", "path": "acceptance-tests/src/test/java/io/blueocean/ath/live/GithubCreationTest.java", "license": "mit", "size": 5487 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,663,670
@Override public void paintComponent(Graphics g) { if (stop || deleteIt) { // System.out.println("stop="+stop+" deleteIt="+deleteIt); try { if (ais != null) { // System.out.println("closing "+ais); ais.close(); ...
void function(Graphics g) { if (stop deleteIt) { try { if (ais != null) { ais.close(); ais = null; System.gc(); } if (deleteIt) { deleteIt = false; if (getCurrentFile() != null && getCurrentFile().isFile()) { boolean deleted = getCurrentFile().delete(); if (deleted) { log.info(STR + getCurrentFile()); chooser.rescanCur...
/** * Paints the file preview using {@link ChipCanvas#paintFrame() }. * * @param g the graphics context */
Paints the file preview using <code>ChipCanvas#paintFrame() </code>
paintComponent
{ "repo_name": "viktorbahr/jaer", "path": "src/net/sf/jaer/graphics/ChipDataFilePreview.java", "license": "lgpl-2.1", "size": 13265 }
[ "java.awt.Color", "java.awt.Graphics", "java.awt.Graphics2D", "java.io.EOFException", "java.io.IOException", "java.util.ArrayList", "net.sf.jaer.util.EngineeringFormat" ]
import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.io.EOFException; import java.io.IOException; import java.util.ArrayList; import net.sf.jaer.util.EngineeringFormat;
import java.awt.*; import java.io.*; import java.util.*; import net.sf.jaer.util.*;
[ "java.awt", "java.io", "java.util", "net.sf.jaer" ]
java.awt; java.io; java.util; net.sf.jaer;
1,834,788
AsyncStage<T> readThrough(Stat storingStatIn);
AsyncStage<T> readThrough(Stat storingStatIn);
/** * Same as {@link #read(org.apache.zookeeper.data.Stat)} except that if the cache does not have a value * for this path a direct query is made. * * @param storingStatIn the stat for the new ZNode is stored here * @return AsyncStage * @see org.apache.curator.x.async.AsyncStage */
Same as <code>#read(org.apache.zookeeper.data.Stat)</code> except that if the cache does not have a value for this path a direct query is made
readThrough
{ "repo_name": "mosoft521/curator", "path": "curator-x-async/src/main/java/org/apache/curator/x/async/modeled/cached/CachedModeledFramework.java", "license": "apache-2.0", "size": 3362 }
[ "org.apache.curator.x.async.AsyncStage", "org.apache.zookeeper.data.Stat" ]
import org.apache.curator.x.async.AsyncStage; import org.apache.zookeeper.data.Stat;
import org.apache.curator.x.async.*; import org.apache.zookeeper.data.*;
[ "org.apache.curator", "org.apache.zookeeper" ]
org.apache.curator; org.apache.zookeeper;
1,639,486
public Set getPropertiesForPattern( String pattern ) { RE regex = new RE( pattern ); Set result = new HashSet(); Iterator it = super.keySet().iterator(); while ( it.hasNext() ) { String key = (String) it.next(); if ( regex.match( key ) ) result.add( getProperty( key ) ); } return result; }
Set function( String pattern ) { RE regex = new RE( pattern ); Set result = new HashSet(); Iterator it = super.keySet().iterator(); while ( it.hasNext() ) { String key = (String) it.next(); if ( regex.match( key ) ) result.add( getProperty( key ) ); } return result; }
/** * Returns property values for keys matching regular expression pattern. * * @param pattern interpreted as regular expression * @return Set contains String objects */
Returns property values for keys matching regular expression pattern
getPropertiesForPattern
{ "repo_name": "nezbo/neat4speed2", "path": "src/com/anji/util/Properties.java", "license": "gpl-2.0", "size": 22220 }
[ "java.util.HashSet", "java.util.Iterator", "java.util.Set" ]
import java.util.HashSet; import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
577,699
@Override protected String getSqlQueryString() { StringBuilder query = new StringBuilder() .append("SELECT * FROM ") .append(getTableName()) .append(" WHERE "); // constrain query based on the last ID read if (getMarkMethod() == Ma...
String function() { StringBuilder query = new StringBuilder() .append(STR) .append(getTableName()) .append(STR); if (getMarkMethod() == MarkMethod.LAST_ID) { if (getKeyColumns().size() > 1) throw new SessionInternalError(STR); query.append(getKeyColumns().get(0)).append(STR).append(getLastId()).append(' '); } String wh...
/** * Returns a SQL query that reads all records present regardless of previous reads. * * @return SQL query string */
Returns a SQL query that reads all records present regardless of previous reads
getSqlQueryString
{ "repo_name": "liquidJbilling/LT-Jbilling-MsgQ-3.1", "path": "src/java/com/sapienter/jbilling/server/mediation/task/StatelessJDBCReader.java", "license": "agpl-3.0", "size": 4212 }
[ "com.sapienter.jbilling.common.SessionInternalError", "java.util.Iterator" ]
import com.sapienter.jbilling.common.SessionInternalError; import java.util.Iterator;
import com.sapienter.jbilling.common.*; import java.util.*;
[ "com.sapienter.jbilling", "java.util" ]
com.sapienter.jbilling; java.util;
1,608,898
@Override public Automaton clone() { try { Automaton a = (Automaton)super.clone(); if (!isSingleton()) { HashMap<State, State> m = new HashMap<State, State>(); Set<State> states = getStates(); for (State s : states) m.put(s, new State()); for (State s : states) { State p = m.get(s)...
Automaton function() { try { Automaton a = (Automaton)super.clone(); if (!isSingleton()) { HashMap<State, State> m = new HashMap<State, State>(); Set<State> states = getStates(); for (State s : states) m.put(s, new State()); for (State s : states) { State p = m.get(s); p.accept = s.accept; if (s == initial) a.initial =...
/** * Returns a clone of this automaton. */
Returns a clone of this automaton
clone
{ "repo_name": "zhouzusheng/automation", "path": "src/dk/brics/automaton/Automaton.java", "license": "apache-2.0", "size": 31084 }
[ "java.util.HashMap", "java.util.Set" ]
import java.util.HashMap; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
639,290
public VenueLocation getUserLocation() { return mUserLocation; }
VenueLocation function() { return mUserLocation; }
/** * Get user location on the map * @return */
Get user location on the map
getUserLocation
{ "repo_name": "geolys/geolys-android-sdk-vtm", "path": "src/com/tevolys/geolys/sdk/map/VenueMap.java", "license": "gpl-3.0", "size": 14979 }
[ "com.tevolys.geolys.sdk.model.VenueLocation" ]
import com.tevolys.geolys.sdk.model.VenueLocation;
import com.tevolys.geolys.sdk.model.*;
[ "com.tevolys.geolys" ]
com.tevolys.geolys;
1,529,261
@Test public void retainServedDateFormat() throws Exception { // Serve a response with a non-standard date format that OkHttp supports. Date lastModifiedDate = new Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-1)); Date servedDate = new Date(System.currentTimeMillis() + TimeUnit.HOURS.toMilli...
@Test void function() throws Exception { Date lastModifiedDate = new Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-1)); Date servedDate = new Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-2)); DateFormat dateFormat = new SimpleDateFormat(STR, Locale.US); dateFormat.setTimeZone(TimeZone.getTime...
/** * For Last-Modified and Date headers, we should echo the date back in the exact format we were * served. */
For Last-Modified and Date headers, we should echo the date back in the exact format we were served
retainServedDateFormat
{ "repo_name": "germanattanasio/okhttp", "path": "okhttp-android-support/src/test/java/okhttp3/internal/huc/ResponseCacheTest.java", "license": "apache-2.0", "size": 89121 }
[ "java.net.HttpURLConnection", "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Date", "java.util.Locale", "java.util.TimeZone", "java.util.concurrent.TimeUnit", "org.junit.Assert", "org.junit.Test" ]
import java.net.HttpURLConnection; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import java.util.concurrent.TimeUnit; import org.junit.Assert; import org.junit.Test;
import java.net.*; import java.text.*; import java.util.*; import java.util.concurrent.*; import org.junit.*;
[ "java.net", "java.text", "java.util", "org.junit" ]
java.net; java.text; java.util; org.junit;
1,671,239
@Override public Value evalAssignValue(Env env, Value value) { Value array = _expr.evalVar(env); array = array.toAutoArray(); array.put(value); return value; }
Value function(Env env, Value value) { Value array = _expr.evalVar(env); array = array.toAutoArray(); array.put(value); return value; }
/** * Evaluates the expression. * * @param env the calling environment. * * @return the expression value. */
Evaluates the expression
evalAssignValue
{ "repo_name": "CleverCloud/Quercus", "path": "quercus/src/main/java/com/caucho/quercus/expr/ArrayTailExpr.java", "license": "gpl-2.0", "size": 4259 }
[ "com.caucho.quercus.env.Env", "com.caucho.quercus.env.Value" ]
import com.caucho.quercus.env.Env; import com.caucho.quercus.env.Value;
import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
576,192
public final Collection<GrantedAuthority> getGrantedAuthorities( DirContextOperations user, String username) { String userDn = user.getNameInNamespace(); if (logger.isDebugEnabled()) { logger.debug("Getting authorities for user " + userDn); } Set<GrantedAuthority> roles = getGroupMembershipRoles(user...
final Collection<GrantedAuthority> function( DirContextOperations user, String username) { String userDn = user.getNameInNamespace(); if (logger.isDebugEnabled()) { logger.debug(STR + userDn); } Set<GrantedAuthority> roles = getGroupMembershipRoles(userDn, username); Set<GrantedAuthority> extraRoles = getAdditionalRole...
/** * Obtains the authorities for the user who's directory entry is represented by the * supplied LdapUserDetails object. * * @param user the user who's authorities are required * @return the set of roles granted to the user. */
Obtains the authorities for the user who's directory entry is represented by the supplied LdapUserDetails object
getGrantedAuthorities
{ "repo_name": "jmnarloch/spring-security", "path": "ldap/src/main/java/org/springframework/security/ldap/userdetails/DefaultLdapAuthoritiesPopulator.java", "license": "apache-2.0", "size": 13370 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "java.util.Set", "org.springframework.ldap.core.DirContextOperations", "org.springframework.security.core.GrantedAuthority" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; import org.springframework.ldap.core.DirContextOperations; import org.springframework.security.core.GrantedAuthority;
import java.util.*; import org.springframework.ldap.core.*; import org.springframework.security.core.*;
[ "java.util", "org.springframework.ldap", "org.springframework.security" ]
java.util; org.springframework.ldap; org.springframework.security;
1,870,248
protected Node exitImplicit(Token node) throws ParseException { return node; }
Node function(Token node) throws ParseException { return node; }
/** * Called when exiting a parse tree node. * * @param node the node being exited * * @return the node to add to the parse tree, or * null if no parse tree should be created * * @throws ParseException if the node analysis discovered errors */
Called when exiting a parse tree node
exitImplicit
{ "repo_name": "richb-hanover/mibble-2.9.2", "path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java", "license": "gpl-2.0", "size": 275483 }
[ "net.percederberg.grammatica.parser.Node", "net.percederberg.grammatica.parser.ParseException", "net.percederberg.grammatica.parser.Token" ]
import net.percederberg.grammatica.parser.Node; import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Token;
import net.percederberg.grammatica.parser.*;
[ "net.percederberg.grammatica" ]
net.percederberg.grammatica;
447,338
private void assureReturnObjFlagSet(SearchControls controls) { Validate.notNull(controls); if (!controls.getReturningObjFlag()) { log.debug("The returnObjFlag of supplied SearchControls is not set" + " but a ContextMapper is used - setting flag to true"); controls.setReturningObjFlag(true); } ...
void function(SearchControls controls) { Validate.notNull(controls); if (!controls.getReturningObjFlag()) { log.debug(STR + STR); controls.setReturningObjFlag(true); } }
/** * Make sure the returnObjFlag is set in the supplied SearchControls. Set it * and log if it's not set. * * @param controls the SearchControls to check. */
Make sure the returnObjFlag is set in the supplied SearchControls. Set it and log if it's not set
assureReturnObjFlagSet
{ "repo_name": "pbzdyl/spring-ldap", "path": "core/src/main/java/org/springframework/ldap/core/LdapTemplate.java", "license": "apache-2.0", "size": 51777 }
[ "javax.naming.directory.SearchControls", "org.apache.commons.lang.Validate" ]
import javax.naming.directory.SearchControls; import org.apache.commons.lang.Validate;
import javax.naming.directory.*; import org.apache.commons.lang.*;
[ "javax.naming", "org.apache.commons" ]
javax.naming; org.apache.commons;
673,993
private static XYDataset createDataset() { TimeSeries s1 = new TimeSeries("L&G European Index Trust"); s1.add(new Month(2, 2001), 181.8); s1.add(new Month(3, 2001), 167.3); s1.add(new Month(4, 2001), 153.8); s1.add(new Month(5, 2001), 167.6); s1.add(new Month(6, 2001...
static XYDataset function() { TimeSeries s1 = new TimeSeries(STR); s1.add(new Month(2, 2001), 181.8); s1.add(new Month(3, 2001), 167.3); s1.add(new Month(4, 2001), 153.8); s1.add(new Month(5, 2001), 167.6); s1.add(new Month(6, 2001), 158.8); s1.add(new Month(7, 2001), 148.3); s1.add(new Month(8, 2001), 153.9); s1.add(n...
/** * Creates a dataset, consisting of two series of monthly data. * * @return The dataset. */
Creates a dataset, consisting of two series of monthly data
createDataset
{ "repo_name": "aaronc/jfreechart", "path": "source/org/jfree/chart/demo/TimeSeriesChartDemo1.java", "license": "lgpl-2.1", "size": 8025 }
[ "org.jfree.data.time.Month", "org.jfree.data.time.TimeSeries", "org.jfree.data.time.TimeSeriesCollection", "org.jfree.data.xy.XYDataset" ]
import org.jfree.data.time.Month; import org.jfree.data.time.TimeSeries; import org.jfree.data.time.TimeSeriesCollection; import org.jfree.data.xy.XYDataset;
import org.jfree.data.time.*; import org.jfree.data.xy.*;
[ "org.jfree.data" ]
org.jfree.data;
2,091,815
// Read some value from the Preferences to ensure it's in memory. getStoredOrigins(); } public TrustedWebActivityPermissionStore() { // On some versions of Android, creating the Preferences object involves a disk read (to // check if the Preferences directory exists, not even to re...
getStoredOrigins(); } public TrustedWebActivityPermissionStore() { try (StrictModeContext ignored = StrictModeContext.allowDiskReads()) { mPreferences = ContextUtils.getApplicationContext().getSharedPreferences( SHARED_PREFS_FILE, Context.MODE_PRIVATE); } }
/** * Reads the underlying storage into memory, should be called initially on a background thread. */
Reads the underlying storage into memory, should be called initially on a background thread
initStorage
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/browserservices/permissiondelegation/TrustedWebActivityPermissionStore.java", "license": "bsd-3-clause", "size": 10943 }
[ "android.content.Context", "org.chromium.base.ContextUtils", "org.chromium.base.StrictModeContext" ]
import android.content.Context; import org.chromium.base.ContextUtils; import org.chromium.base.StrictModeContext;
import android.content.*; import org.chromium.base.*;
[ "android.content", "org.chromium.base" ]
android.content; org.chromium.base;
337,945
public void testReceive_NonBlockNoServerBufNotEmpty() throws Exception { this.channel1.configureBlocking(false); connectWithoutServer(); ByteBuffer dst = allocateNonEmptyBuf(); assertNull(this.channel1.receive(dst)); }
void function() throws Exception { this.channel1.configureBlocking(false); connectWithoutServer(); ByteBuffer dst = allocateNonEmptyBuf(); assertNull(this.channel1.receive(dst)); }
/** * Test method for 'DatagramChannelImpl.receive(ByteBuffer)' * * @throws Exception */
Test method for 'DatagramChannelImpl.receive(ByteBuffer)'
testReceive_NonBlockNoServerBufNotEmpty
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java", "license": "gpl-2.0", "size": 95313 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
205,071
public final Id<Address> getBillingAddressId() { return billingAddressId; }
final Id<Address> function() { return billingAddressId; }
/** * Gets the billing address id. * * @return the billing address id */
Gets the billing address id
getBillingAddressId
{ "repo_name": "OptimalPayments/Java_SDK", "path": "NetBanxSDK/src/main/java/com/optimalpayments/customervault/ACHBankAccounts.java", "license": "mit", "size": 11062 }
[ "com.optimalpayments.common.Id" ]
import com.optimalpayments.common.Id;
import com.optimalpayments.common.*;
[ "com.optimalpayments.common" ]
com.optimalpayments.common;
1,859,688
public Future<List<generated.classic.jdbc.regular.vertx.tables.pojos.Something>> findManyBySomeregularnumber(Collection<Integer> values) { return findManyByCondition(Something.SOMETHING.SOMEREGULARNUMBER.in(values)); }
Future<List<generated.classic.jdbc.regular.vertx.tables.pojos.Something>> function(Collection<Integer> values) { return findManyByCondition(Something.SOMETHING.SOMEREGULARNUMBER.in(values)); }
/** * Find records that have <code>SOMEREGULARNUMBER IN (values)</code> * asynchronously */
Find records that have <code>SOMEREGULARNUMBER IN (values)</code> asynchronously
findManyBySomeregularnumber
{ "repo_name": "jklingsporn/vertx-jooq", "path": "vertx-jooq-generate/src/test/java/generated/classic/jdbc/regular/vertx/tables/daos/SomethingDao.java", "license": "mit", "size": 9803 }
[ "io.vertx.core.Future", "java.util.Collection", "java.util.List" ]
import io.vertx.core.Future; import java.util.Collection; import java.util.List;
import io.vertx.core.*; import java.util.*;
[ "io.vertx.core", "java.util" ]
io.vertx.core; java.util;
1,188,454
@Test public void defaultLocale() { Locale locale = Configuration.getLocale(); assertThat(locale).isEqualTo(Locale.ROOT); }
void function() { Locale locale = Configuration.getLocale(); assertThat(locale).isEqualTo(Locale.ROOT); }
/** * Verifies that {@link Locale#ROOT} will be used, if there is no defined locale. */
Verifies that <code>Locale#ROOT</code> will be used, if there is no defined locale
defaultLocale
{ "repo_name": "pmwmedia/tinylog", "path": "tinylog-api/src/test/java/org/tinylog/configuration/ConfigurationTest.java", "license": "apache-2.0", "size": 20283 }
[ "java.util.Locale", "org.assertj.core.api.Assertions" ]
import java.util.Locale; import org.assertj.core.api.Assertions;
import java.util.*; import org.assertj.core.api.*;
[ "java.util", "org.assertj.core" ]
java.util; org.assertj.core;
1,523,584
private CalendarDay findAccessibilityFocus() { final int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { final View child = getChildAt(i); if (child instanceof MonthView) { final CalendarDay focus = ((MonthView) child).getAccessibilityFocu...
CalendarDay function() { final int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { final View child = getChildAt(i); if (child instanceof MonthView) { final CalendarDay focus = ((MonthView) child).getAccessibilityFocus(); if (focus != null) { if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_B...
/** * Attempts to return the date that has accessibility focus. * * @return The date that has accessibility focus, or {@code null} if no date * has focus. */
Attempts to return the date that has accessibility focus
findAccessibilityFocus
{ "repo_name": "seklum/NewHeart", "path": "app/src/main/java/com/android/datetimepicker/date/DayPickerView.java", "license": "gpl-3.0", "size": 18230 }
[ "android.os.Build", "android.view.View", "com.android.datetimepicker.date.MonthAdapter" ]
import android.os.Build; import android.view.View; import com.android.datetimepicker.date.MonthAdapter;
import android.os.*; import android.view.*; import com.android.datetimepicker.date.*;
[ "android.os", "android.view", "com.android.datetimepicker" ]
android.os; android.view; com.android.datetimepicker;
896,948
@Test public void testLabelAssigningWithoutObjectType() { AuditActivity activity = new AuditActivity(); command.assignLabel(activity, null); Assert.assertNull(activity.getObjectTypeLabel()); activity.setObjectType(""); command.assignLabel(activity, null); Assert.assertNull(activity.getObjectTypeLabel...
void function() { AuditActivity activity = new AuditActivity(); command.assignLabel(activity, null); Assert.assertNull(activity.getObjectTypeLabel()); activity.setObjectType(""); command.assignLabel(activity, null); Assert.assertNull(activity.getObjectTypeLabel()); }
/** * Tests the logic in {@link AuditObjectTypeCommand#assignLabel(AuditActivity, AuditContext)} when the provided * activity has no object type or it's empty. */
Tests the logic in <code>AuditObjectTypeCommand#assignLabel(AuditActivity, AuditContext)</code> when the provided activity has no object type or it's empty
testLabelAssigningWithoutObjectType
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/platform/seip-audit/seip-audit-impl/src/test/java/com/sirma/itt/emf/audit/command/AuditObjectTypeCommandTest.java", "license": "lgpl-3.0", "size": 3073 }
[ "com.sirma.itt.emf.audit.activity.AuditActivity", "org.junit.Assert" ]
import com.sirma.itt.emf.audit.activity.AuditActivity; import org.junit.Assert;
import com.sirma.itt.emf.audit.activity.*; import org.junit.*;
[ "com.sirma.itt", "org.junit" ]
com.sirma.itt; org.junit;
2,797,972
public synchronized void waitForScan() throws Exception { // wait for 2 scans for stable files CountDownLatch latch = new CountDownLatch(2); _scanningListener.setScanningLatch(latch); _scanner.scan(); latch.await(); }
synchronized void function() throws Exception { CountDownLatch latch = new CountDownLatch(2); _scanningListener.setScanningLatch(latch); _scanner.scan(); latch.await(); }
/** * initiates a scan and blocks until it has been completed * * @throws Exception */
initiates a scan and blocks until it has been completed
waitForScan
{ "repo_name": "whiteley/jetty8", "path": "jetty-policy/src/main/java/org/eclipse/jetty/policy/PolicyMonitor.java", "license": "apache-2.0", "size": 8695 }
[ "java.util.concurrent.CountDownLatch" ]
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,774,778
public Color getColor() { Color c = Color.blue; switch (this.freqMain) { case 200: { switch (this.freqFrac) { case 24: c = Color.decode("0x33CC33"); break; case 48: c = Color.decode("0x009933"); break; case 72: c = Color.decode("0x669900"); break; default: c = Color.yellow; } bre...
Color function() { Color c = Color.blue; switch (this.freqMain) { case 200: { switch (this.freqFrac) { case 24: c = Color.decode(STR); break; case 48: c = Color.decode(STR); break; case 72: c = Color.decode(STR); break; default: c = Color.yellow; } break; } case 201: { switch (this.freqFrac) { case 24: c = Color.decode...
/** * Returns a color based on frequency * * @return */
Returns a color based on frequency
getColor
{ "repo_name": "goodsky65/ehud", "path": "ehud/src/ehud/Radio.java", "license": "gpl-3.0", "size": 6860 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
241,022
public Object getGroupById(String id) { String name = elementToName.get(id); if (name != null) { return idToGroup.get(Dom.disAssembleId(id, name)); } else { return null; } }
Object function(String id) { String name = elementToName.get(id); if (name != null) { return idToGroup.get(Dom.disAssembleId(id, name)); } else { return null; } }
/** * Return the (enclosing) group for the specified element id. * * @param id * element id * @return the group object */
Return the (enclosing) group for the specified element id
getGroupById
{ "repo_name": "geomajas/geomajas-project-client-gwt", "path": "client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java", "license": "agpl-3.0", "size": 35524 }
[ "org.geomajas.gwt.client.util.Dom" ]
import org.geomajas.gwt.client.util.Dom;
import org.geomajas.gwt.client.util.*;
[ "org.geomajas.gwt" ]
org.geomajas.gwt;
585,404
public void setPlayerWeather(WeatherType type);
void function(WeatherType type);
/** * Sets the type of weather the player will see. When used, the weather * status of the player is locked until {@link #resetPlayerWeather()} is * used. * * @param type The WeatherType enum type the player should experience */
Sets the type of weather the player will see. When used, the weather status of the player is locked until <code>#resetPlayerWeather()</code> is used
setPlayerWeather
{ "repo_name": "AlmuraDev/Almura-API", "path": "src/main/java/org/bukkit/entity/Player.java", "license": "gpl-3.0", "size": 25356 }
[ "org.bukkit.WeatherType" ]
import org.bukkit.WeatherType;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
2,289,307
public DeleteEntity withProjectId(String projectId) { checkNotNull(projectId, "projectId"); return new DeleteEntity(projectId, null); }
DeleteEntity function(String projectId) { checkNotNull(projectId, STR); return new DeleteEntity(projectId, null); }
/** * Returns a new {@link DeleteEntity} that deletes entities from the Cloud Datastore for the * specified project. */
Returns a new <code>DeleteEntity</code> that deletes entities from the Cloud Datastore for the specified project
withProjectId
{ "repo_name": "jasonkuster/incubator-beam", "path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1.java", "license": "apache-2.0", "size": 42948 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,405,773
protected void sequence_RelationInstanceCreate(EObject context, RelationInstanceCreate semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, MMDSLPackage.eINSTANCE.getRelationInstanceCreate_Name()) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.cre...
void function(EObject context, RelationInstanceCreate semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, MMDSLPackage.eINSTANCE.getRelationInstanceCreate_Name()) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MMDSLP...
/** * Constraint: * ( * name=ValidID * nameofrelation=[Relation|QualifiedName] * classinstancefrom=[ClassInstanceCreate|QualifiedName] * classinstanceto=[ClassInstanceCreate|QualifiedName] * ) */
Constraint: ( name=ValidID nameofrelation=[Relation|QualifiedName] classinstancefrom=[ClassInstanceCreate|QualifiedName] classinstanceto=[ClassInstanceCreate|QualifiedName] )
sequence_RelationInstanceCreate
{ "repo_name": "niksavis/mm-dsl", "path": "org.xtext.nv.dsl/src-gen/org/xtext/nv/dsl/serializer/MMDSLSemanticSequencer.java", "license": "epl-1.0", "size": 190481 }
[ "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.serializer.acceptor.SequenceFeeder", "org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider", "org.eclipse.xtext.serializer.sequencer.ITransientValueService", "org.xtext.nv.dsl.mMDSL.MMDSLPackage", "org.xtext.nv.dsl.mMDSL.RelationInstanceCreate" ]
import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; import org.xtext.nv.dsl.mMDSL.MMDSLPackage; import org.xtext.nv.dsl.mMDSL.Relation...
import org.eclipse.emf.ecore.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; import org.xtext.nv.dsl.*;
[ "org.eclipse.emf", "org.eclipse.xtext", "org.xtext.nv" ]
org.eclipse.emf; org.eclipse.xtext; org.xtext.nv;
1,125,912
private static void processExpressionPlan(LOForEach foreach, LogicalPlan lp, LogicalExpressionPlan plan, ArrayList<Operator> inputs ) throws FrontendException { Iterator<Operator> it = plan.getO...
static void function(LOForEach foreach, LogicalPlan lp, LogicalExpressionPlan plan, ArrayList<Operator> inputs ) throws FrontendException { Iterator<Operator> it = plan.getOperators(); while( it.hasNext() ) { Operator sink = it.next(); if( sink instanceof ProjectExpression ) { ProjectExpression projExpr = (ProjectExpre...
/** * Process expression plans of LOGenerate and set inputs relation * for the ProjectExpression * @param foreach * @param lp Logical plan in which the LOGenerate is in * @param plan One of the output expression of the LOGenerate * @param inputs inputs of the LOGenerate * @throws Fro...
Process expression plans of LOGenerate and set inputs relation for the ProjectExpression
processExpressionPlan
{ "repo_name": "kexianda/pig", "path": "src/org/apache/pig/parser/LogicalPlanBuilder.java", "license": "apache-2.0", "size": 76727 }
[ "java.util.ArrayList", "java.util.Iterator", "org.apache.pig.impl.logicalLayer.FrontendException", "org.apache.pig.newplan.Operator", "org.apache.pig.newplan.logical.expression.LogicalExpressionPlan", "org.apache.pig.newplan.logical.expression.ProjectExpression", "org.apache.pig.newplan.logical.relation...
import java.util.ArrayList; import java.util.Iterator; import org.apache.pig.impl.logicalLayer.FrontendException; import org.apache.pig.newplan.Operator; import org.apache.pig.newplan.logical.expression.LogicalExpressionPlan; import org.apache.pig.newplan.logical.expression.ProjectExpression; import org.apache.pig.newp...
import java.util.*; import org.apache.pig.impl.*; import org.apache.pig.newplan.*; import org.apache.pig.newplan.logical.expression.*; import org.apache.pig.newplan.logical.relational.*;
[ "java.util", "org.apache.pig" ]
java.util; org.apache.pig;
22,620
public ScanQuery<K, V> setFilter(@Nullable IgniteBiPredicate<K, V> filter) { this.filter = filter; return this; }
ScanQuery<K, V> function(@Nullable IgniteBiPredicate<K, V> filter) { this.filter = filter; return this; }
/** * Sets filter. * * @param filter Filter. If {@code null} then all entries will be returned. * @return {@code this} for chaining. */
Sets filter
setFilter
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java", "license": "apache-2.0", "size": 3991 }
[ "org.apache.ignite.lang.IgniteBiPredicate", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.lang.IgniteBiPredicate; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.lang.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
1,975,424
public static void main(String... args) throws ExecutionException, InterruptedException, FileNotFoundException { try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) { File mdlRsrc = IgniteUtils.resolveIgnitePath(TEST_MODEL_RES); if (mdlRsrc == null) ...
static void function(String... args) throws ExecutionException, InterruptedException, FileNotFoundException { try (Ignite ignite = Ignition.start(STR)) { File mdlRsrc = IgniteUtils.resolveIgnitePath(TEST_MODEL_RES); if (mdlRsrc == null) throw new IllegalArgumentException(STR + TEST_MODEL_RES + "]"); ModelReader reader ...
/** * Run example. */
Run example
main
{ "repo_name": "samaitra/ignite", "path": "examples/src/main/java/org/apache/ignite/examples/ml/inference/xgboost/XGBoostModelParserExample.java", "license": "apache-2.0", "size": 4693 }
[ "java.io.File", "java.io.FileNotFoundException", "java.util.HashMap", "java.util.Scanner", "java.util.concurrent.ExecutionException", "java.util.concurrent.Future", "org.apache.ignite.Ignite", "org.apache.ignite.Ignition", "org.apache.ignite.internal.util.IgniteUtils", "org.apache.ignite.ml.infere...
import java.io.File; import java.io.FileNotFoundException; import java.util.HashMap; import java.util.Scanner; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import org.apache.ignite.Ignite; import org.apache.ignite.Ignition; import org.apache.ignite.internal.util.IgniteUtils; impor...
import java.io.*; import java.util.*; import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.ml.inference.*; import org.apache.ignite.ml.inference.builder.*; import org.apache.ignite.ml.inference.reader.*; import org.apache.ignite.ml.math.primitives...
[ "java.io", "java.util", "org.apache.ignite" ]
java.io; java.util; org.apache.ignite;
515,724
public void set(final IGetLocationWithLook from, final IGetLocationWithLook to) { setPositions(from, to); resetBase(); // TODO: this.from/this.to setExtraProperties ? }
void function(final IGetLocationWithLook from, final IGetLocationWithLook to) { setPositions(from, to); resetBase(); }
/** * Set some basic data and reset all other properties properly. Does not set * extra properties for locations. * * @param from * @param to */
Set some basic data and reset all other properties properly. Does not set extra properties for locations
set
{ "repo_name": "NoCheatPlus/NoCheatPlus", "path": "NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/model/MoveData.java", "license": "gpl-3.0", "size": 7565 }
[ "fr.neatmonster.nocheatplus.components.location.IGetLocationWithLook" ]
import fr.neatmonster.nocheatplus.components.location.IGetLocationWithLook;
import fr.neatmonster.nocheatplus.components.location.*;
[ "fr.neatmonster.nocheatplus" ]
fr.neatmonster.nocheatplus;
2,162,771
private void parsePatternParameters() throws IgniteCheckedException { assert pat != null; String regEx = "(\\{(\\*|\\d+),\\s*(\\*|\\d+)\\})?(.*)"; Matcher matcher = Pattern.compile(regEx).matcher(pat.trim()); if (matcher.matches()) { String delayStr = matcher.group(2);...
void function() throws IgniteCheckedException { assert pat != null; String regEx = STR; Matcher matcher = Pattern.compile(regEx).matcher(pat.trim()); if (matcher.matches()) { String delayStr = matcher.group(2); if (delayStr != null) if ("*".equals(delayStr)) delay = 0; else try { delay = Integer.valueOf(delayStr); } ca...
/** * Parse delay, number of task calls and mere cron expression from extended pattern * that looks like "{n1,n2} * * * * *". * @throws IgniteCheckedException Thrown if pattern is invalid. */
Parse delay, number of task calls and mere cron expression from extended pattern that looks like "{n1,n2} * * * * *"
parsePatternParameters
{ "repo_name": "irudyak/ignite", "path": "modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/ScheduleFutureImpl.java", "license": "apache-2.0", "size": 26455 }
[ "it.sauronsoftware.cron4j.SchedulingPattern", "java.util.regex.Matcher", "java.util.regex.Pattern", "org.apache.ignite.IgniteCheckedException" ]
import it.sauronsoftware.cron4j.SchedulingPattern; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.ignite.IgniteCheckedException;
import it.sauronsoftware.cron4j.*; import java.util.regex.*; import org.apache.ignite.*;
[ "it.sauronsoftware.cron4j", "java.util", "org.apache.ignite" ]
it.sauronsoftware.cron4j; java.util; org.apache.ignite;
2,443,171
public ConnectionResult getSignInError() { return mSignInError ? mConnectionResult : null; }
ConnectionResult function() { return mSignInError ? mConnectionResult : null; }
/** * Returns the error that happened during the sign-in process, null if no * error occurred. */
Returns the error that happened during the sign-in process, null if no error occurred
getSignInError
{ "repo_name": "aogilvie/phonegap-plugin-googleGameServices", "path": "platforms/android/src/com/google/example/games/basegameutils/GameHelper.java", "license": "mit", "size": 28133 }
[ "com.google.android.gms.common.ConnectionResult" ]
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.*;
[ "com.google.android" ]
com.google.android;
1,411,399
public static void reverse(Version matchVersion, final char[] buffer, final int start, final int len) { if (!matchVersion.onOrAfter(Version.LUCENE_31)) { reverseUnicode3(buffer, start, len); return; } if (len < 2) return; int end = (start + len) - 1; char fron...
static void function(Version matchVersion, final char[] buffer, final int start, final int len) { if (!matchVersion.onOrAfter(Version.LUCENE_31)) { reverseUnicode3(buffer, start, len); return; } if (len < 2) return; int end = (start + len) - 1; char frontHigh = buffer[start]; char endLow = buffer[end]; boolean allowFro...
/** * Partially reverses the given input buffer in-place from the given offset * up to the given length. * @param matchVersion See <a href="#version">above</a> * @param buffer the input char array to reverse * @param start the offset from where to reverse the buffer * @param len the length in th...
Partially reverses the given input buffer in-place from the given offset up to the given length
reverse
{ "repo_name": "terrancesnyder/solr-analytics", "path": "lucene/analysis/common/src/java/org/apache/lucene/analysis/reverse/ReverseStringFilter.java", "license": "apache-2.0", "size": 8235 }
[ "org.apache.lucene.util.Version" ]
import org.apache.lucene.util.Version;
import org.apache.lucene.util.*;
[ "org.apache.lucene" ]
org.apache.lucene;
601,852
@Test public void actionClassTest() { RangeExtension rangeExtension = new RangeExtension(); Assert.assertEquals(RangeExtension.RangeTag.class, rangeExtension.getTagActionClass()); }
void function() { RangeExtension rangeExtension = new RangeExtension(); Assert.assertEquals(RangeExtension.RangeTag.class, rangeExtension.getTagActionClass()); }
/** * RangeExtension has an inner class called RangeTag used in model parsing */
RangeExtension has an inner class called RangeTag used in model parsing
actionClassTest
{ "repo_name": "wnilkamal/DataGenerator", "path": "dg-core/src/test/java/org/finra/datagenerator/engine/scxml/tags/RangeExtensionTest.java", "license": "apache-2.0", "size": 10826 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,996,038
public void setSortHLAPI( SortHLAPI elem){ if(elem!=null) item.setSort((Sort)elem.getContainedItem()); }
void function( SortHLAPI elem){ if(elem!=null) item.setSort((Sort)elem.getContainedItem()); }
/** * set Sort */
set Sort
setSortHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/finiteIntRanges/hlapi/GreaterThanHLAPI.java", "license": "epl-1.0", "size": 108747 }
[ "fr.lip6.move.pnml.hlpn.terms.Sort", "fr.lip6.move.pnml.hlpn.terms.hlapi.SortHLAPI" ]
import fr.lip6.move.pnml.hlpn.terms.Sort; import fr.lip6.move.pnml.hlpn.terms.hlapi.SortHLAPI;
import fr.lip6.move.pnml.hlpn.terms.*; import fr.lip6.move.pnml.hlpn.terms.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,531,759