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 Room updateChatRoom(
final RoomData roomUpdate,
final int roomId) {
final UUID locationId = UUID.fromString("3d0e7ee0-a6c9-497e-9a2c-23b687e860e2"); //$NON-NLS-1$
final ApiResourceVersion apiVersion = new ApiResourceVersion("3.1-preview.1"); //$NON-NLS-1$
final Map... | Room function( final RoomData roomUpdate, final int roomId) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, roomId); final VssRestRequest httpRequest = super.cre... | /**
* [Preview API 3.1-preview.1] Update information on a single chat room
*
* @param roomUpdate
* Room information
* @param roomId
* Id of the room to update
* @return Room
*/ | [Preview API 3.1-preview.1] Update information on a single chat room | updateChatRoom | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/chat/webapi/ChatHttpClientBase.java",
"license": "mit",
"size": 18876
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.teamfoundation.chat.webapi.Room",
"com.microsoft.alm.teamfoundation.chat.webapi.RoomData",
"com.microsoft.alm.visualstudio.services.webapi.ApiResourceVersion",
"... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.teamfoundation.chat.webapi.Room; import com.microsoft.alm.teamfoundation.chat.webapi.RoomData; import com.microsoft.alm.visualstudio.services.webapi.ApiReso... | import com.microsoft.alm.client.*; import com.microsoft.alm.teamfoundation.chat.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 2,835,693 |
public void toggleExpansionState(Annotation annotation) {
if (annotation instanceof ProjectionAnnotation) {
ProjectionAnnotation projection= (ProjectionAnnotation) annotation;
if (projection.isCollapsed())
projection.markExpanded();
else
projection.markCollapsed();
modifyAnnotation(projection... | void function(Annotation annotation) { if (annotation instanceof ProjectionAnnotation) { ProjectionAnnotation projection= (ProjectionAnnotation) annotation; if (projection.isCollapsed()) projection.markExpanded(); else projection.markCollapsed(); modifyAnnotation(projection, true); } } | /**
* Toggles the expansion state of the given annotation. An appropriate
* annotation model change event is sent out.
*
* @param annotation the annotation
*/ | Toggles the expansion state of the given annotation. An appropriate annotation model change event is sent out | toggleExpansionState | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jface.text/src/org/eclipse/jface/text/source/projection/ProjectionAnnotationModel.java",
"license": "epl-1.0",
"size": 5754
} | [
"org.eclipse.jface.text.source.Annotation"
] | import org.eclipse.jface.text.source.Annotation; | import org.eclipse.jface.text.source.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,336,494 |
private BinaryObjectException wrapFieldException(String fieldName, Exception e) {
if (S.includeSensitive())
return new BinaryObjectException("Failed to read field: " + fieldName, e);
else
return new BinaryObjectException("Failed to read field.", e);
} | BinaryObjectException function(String fieldName, Exception e) { if (S.includeSensitive()) return new BinaryObjectException(STR + fieldName, e); else return new BinaryObjectException(STR, e); } | /**
* Wraps an exception by adding the fieldName
*
* @param fieldName the name of the field, causes failure
* @param e the cause of the deserialization failure
* @return wrapping exception
*/ | Wraps an exception by adding the fieldName | wrapFieldException | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java",
"license": "apache-2.0",
"size": 72843
} | [
"org.apache.ignite.binary.BinaryObjectException",
"org.apache.ignite.internal.util.typedef.internal.S"
] | import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.internal.util.typedef.internal.S; | import org.apache.ignite.binary.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,130,383 |
SubscriptionCollection getSubscriptions(ListSubscriptionsRequest request); | SubscriptionCollection getSubscriptions(ListSubscriptionsRequest request); | /**
* Retrieves the Subscriptions collection referenced by this resource.
*/ | Retrieves the Subscriptions collection referenced by this resource | getSubscriptions | {
"repo_name": "smartpcr/aws-sdk-java-resources",
"path": "aws-resources-sns/src/main/java/com/amazonaws/resources/sns/SNS.java",
"license": "apache-2.0",
"size": 5301
} | [
"com.amazonaws.services.sns.model.ListSubscriptionsRequest"
] | import com.amazonaws.services.sns.model.ListSubscriptionsRequest; | import com.amazonaws.services.sns.model.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 2,632,430 |
public FileObject getFileAppenderFile() throws IOException
{
return fileAppender.getFile();
}
| FileObject function() throws IOException { return fileAppender.getFile(); } | /**
* This is not thread safe: please try to get the file appender yourself using the static constructor and work from there
*/ | This is not thread safe: please try to get the file appender yourself using the static constructor and work from there | getFileAppenderFile | {
"repo_name": "icholy/geokettle-2.0",
"path": "src-core/org/pentaho/di/core/logging/LogWriter.java",
"license": "lgpl-2.1",
"size": 17012
} | [
"java.io.IOException",
"org.apache.commons.vfs.FileObject"
] | import java.io.IOException; import org.apache.commons.vfs.FileObject; | import java.io.*; import org.apache.commons.vfs.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 2,785,453 |
public Scan setFilter(Filter filter) {
this.filter = filter;
return this;
} | Scan function(Filter filter) { this.filter = filter; return this; } | /**
* Apply the specified server-side filter when performing the Scan.
* @param filter filter to run on the server
* @return this
*/ | Apply the specified server-side filter when performing the Scan | setFilter | {
"repo_name": "lichongxin/hbase-snapshot",
"path": "src/main/java/org/apache/hadoop/hbase/client/Scan.java",
"license": "apache-2.0",
"size": 19621
} | [
"org.apache.hadoop.hbase.filter.Filter"
] | import org.apache.hadoop.hbase.filter.Filter; | import org.apache.hadoop.hbase.filter.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 695,005 |
@Nonnull
public java.util.concurrent.CompletableFuture<OrganizationalBranding> patchAsync(@Nonnull final OrganizationalBranding sourceOrganizationalBranding) {
return sendAsync(HttpMethod.PATCH, sourceOrganizationalBranding);
} | java.util.concurrent.CompletableFuture<OrganizationalBranding> function(@Nonnull final OrganizationalBranding sourceOrganizationalBranding) { return sendAsync(HttpMethod.PATCH, sourceOrganizationalBranding); } | /**
* Patches this OrganizationalBranding with a source
*
* @param sourceOrganizationalBranding the source object with updates
* @return a future with the result
*/ | Patches this OrganizationalBranding with a source | patchAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/OrganizationalBrandingRequest.java",
"license": "mit",
"size": 6504
} | [
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.OrganizationalBranding",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.OrganizationalBranding; import javax.annotation.Nonnull; | import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 568,667 |
public OpenMapRealVector append(OpenMapRealVector v) {
OpenMapRealVector res = new OpenMapRealVector(this, v.getDimension());
Iterator iter = v.entries.iterator();
while (iter.hasNext()) {
iter.advance();
res.setEntry(iter.key() + virtualSize, iter.value());
... | OpenMapRealVector function(OpenMapRealVector v) { OpenMapRealVector res = new OpenMapRealVector(this, v.getDimension()); Iterator iter = v.entries.iterator(); while (iter.hasNext()) { iter.advance(); res.setEntry(iter.key() + virtualSize, iter.value()); } return res; } | /**
* Optimized method to append a OpenMapRealVector.
* @param v vector to append
* @return The result of appending <code>v</code> to self
*/ | Optimized method to append a OpenMapRealVector | append | {
"repo_name": "SpoonLabs/astor",
"path": "examples/Math-issue-288/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java",
"license": "gpl-2.0",
"size": 41127
} | [
"org.apache.commons.math.util.OpenIntToDoubleHashMap"
] | import org.apache.commons.math.util.OpenIntToDoubleHashMap; | import org.apache.commons.math.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 855,679 |
public static void extract(ZipFile zip, String entry, File dest) throws IOException {
extract(zip, entry, dest, false);
} | static void function(ZipFile zip, String entry, File dest) throws IOException { extract(zip, entry, dest, false); } | /**
* Extracts the entry by the given name from this extractor's ZipFile.
* @param zip the ZIP archive to extract from
* @param entry the name of the entry to extract
* @param dest the file to extract to
* @throws IOException if the entry is not found or an error occurs while extracting to disk
*/ | Extracts the entry by the given name from this extractor's ZipFile | extract | {
"repo_name": "caseif/Quartz",
"path": "src/main/java/net/caseif/quartz/util/Extractor.java",
"license": "mit",
"size": 7535
} | [
"java.io.File",
"java.io.IOException",
"java.util.zip.ZipFile"
] | import java.io.File; import java.io.IOException; import java.util.zip.ZipFile; | import java.io.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 132,460 |
Object importObject(Class clazz,
Type genericType,
Annotation[] annotations,
InputStream inputStream,
Map<Object, List<Object>> headers)
throws IOException; | Object importObject(Class clazz, Type genericType, Annotation[] annotations, InputStream inputStream, Map<Object, List<Object>> headers) throws IOException; | /**
* Import the object quantified by clazz and genericType and qualified by
* the annotaitons from the inpuStream and use the headers to retrieve meta
* informations regarding the object.
* @param clazz The class of the object
* @param genericType The generic used with the object.
* @para... | Import the object quantified by clazz and genericType and qualified by the annotaitons from the inpuStream and use the headers to retrieve meta informations regarding the object | importObject | {
"repo_name": "imyousuf/smart-dao",
"path": "smart-exim/smart-exim-api/src/main/java/com/smartitengineering/exim/Importer.java",
"license": "lgpl-3.0",
"size": 3339
} | [
"java.io.IOException",
"java.io.InputStream",
"java.lang.annotation.Annotation",
"java.lang.reflect.Type",
"java.util.List",
"java.util.Map"
] | import java.io.IOException; import java.io.InputStream; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.List; import java.util.Map; | import java.io.*; import java.lang.annotation.*; import java.lang.reflect.*; import java.util.*; | [
"java.io",
"java.lang",
"java.util"
] | java.io; java.lang; java.util; | 1,461,603 |
public void use(GL3 gl) throws UninitializedException {
if (getPointer() != 0 && initialized) {
gl.glUseProgram(getPointer());
for (Entry<String, FloatBuffer> var : uniformFloatMatrices.entrySet()) {
passUniformMat(gl, var.getKey(), var.getValue());
... | void function(GL3 gl) throws UninitializedException { if (getPointer() != 0 && initialized) { gl.glUseProgram(getPointer()); for (Entry<String, FloatBuffer> var : uniformFloatMatrices.entrySet()) { passUniformMat(gl, var.getKey(), var.getValue()); } for (Entry<String, FloatBuffer> var : uniformFloatVectors.entrySet()) ... | /**
* use method for this shader. sets this shader as the current rendering
* shader and loads all staged uniform variables. Also checks for the
* presence of all uniforms and checks for additional opengl errors.
*
* @param gl
* The opengl instance.
* @throws Uninit... | use method for this shader. sets this shader as the current rendering shader and loads all staged uniform variables. Also checks for the presence of all uniforms and checks for additional opengl errors | use | {
"repo_name": "NLeSC/Neon",
"path": "src/nl/esciencecenter/neon/shaders/ShaderProgram.java",
"license": "apache-2.0",
"size": 29467
} | [
"java.nio.FloatBuffer",
"java.util.Map",
"nl.esciencecenter.neon.exceptions.UninitializedException"
] | import java.nio.FloatBuffer; import java.util.Map; import nl.esciencecenter.neon.exceptions.UninitializedException; | import java.nio.*; import java.util.*; import nl.esciencecenter.neon.exceptions.*; | [
"java.nio",
"java.util",
"nl.esciencecenter.neon"
] | java.nio; java.util; nl.esciencecenter.neon; | 2,589,273 |
private static boolean isSimplePreferences(Context context) {
return ALWAYS_SIMPLE_PREFS
|| Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB
|| !isXLargeTablet(context);
}
/**
* {@inheritDoc} | static boolean function(Context context) { return ALWAYS_SIMPLE_PREFS Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB !isXLargeTablet(context); } /** * {@inheritDoc} | /**
* Determines whether the simplified settings UI should be shown. This is
* true if this is forced via {@link #ALWAYS_SIMPLE_PREFS}, or the device
* doesn't have newer APIs like {@link PreferenceFragment}, or the device
* doesn't have an extra-large screen. In these cases, a single-pane
* "s... | Determines whether the simplified settings UI should be shown. This is true if this is forced via <code>#ALWAYS_SIMPLE_PREFS</code>, or the device doesn't have newer APIs like <code>PreferenceFragment</code>, or the device doesn't have an extra-large screen. In these cases, a single-pane "simplified" settings UI should... | isSimplePreferences | {
"repo_name": "JGarrido/who-me",
"path": "app/src/main/java/net/kodefi/who_me/SettingsActivity.java",
"license": "apache-2.0",
"size": 14254
} | [
"android.content.Context",
"android.os.Build"
] | import android.content.Context; import android.os.Build; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 2,818,449 |
public void doInit()
throws StartupException
{
Iterator<InitializationTask> i = processingQueue.iterator();
//Tell all listeners that we're about to start.
notifyStart();
//Execute all pending tasks.
while (i.hasNext()) {
currentTask = i.next();
notifyExecute(); //Tell listeners we're abou... | void function() throws StartupException { Iterator<InitializationTask> i = processingQueue.iterator(); notifyStart(); while (i.hasNext()) { currentTask = i.next(); notifyExecute(); currentTask.execute(); doneTasks.push(currentTask); } } | /**
* Performs the initialization procedure.
*
* @throws StartupException If an error occurs while executing an
* initialization task.
*/ | Performs the initialization procedure | doInit | {
"repo_name": "knabar/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/init/Initializer.java",
"license": "gpl-2.0",
"size": 11164
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 338,070 |
private void writeRSLSETRM(DRDAStatement stmt) throws DRDAProtocolException,SQLException
{
int numResults = stmt.getNumResultSets();
writer.createDssReply();
writer.startDdm(CodePoint.RSLSETRM);
writer.writeScalar2Bytes(CodePoint.SVRCOD, 0);
writer.startDdm(CodePoint.PKGSNLST);
for (int i = 0; i < nu... | void function(DRDAStatement stmt) throws DRDAProtocolException,SQLException { int numResults = stmt.getNumResultSets(); writer.createDssReply(); writer.startDdm(CodePoint.RSLSETRM); writer.writeScalar2Bytes(CodePoint.SVRCOD, 0); writer.startDdm(CodePoint.PKGSNLST); for (int i = 0; i < numResults; i++) writePKGNAMCSN(st... | /**
* Write RSLSETRM
* Instance variables
* SVRCOD - Severity code - Information only - required
* PKGSNLST - list of PKGNAMCSN -required
* SRVDGN - Server Diagnostic Information -optional
*
* @throws DRDAProtocolException
* @throws SQLException
*/ | Write RSLSETRM Instance variables SVRCOD - Severity code - Information only - required PKGSNLST - list of PKGNAMCSN -required SRVDGN - Server Diagnostic Information -optional | writeRSLSETRM | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfirexd/core/src/drda/java/com/pivotal/gemfirexd/internal/impl/drda/DRDAConnThread.java",
"license": "apache-2.0",
"size": 357866
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,617,879 |
public static String getDataTypeNameFromClass(Class<?> c, boolean highlightNameSpaces) {
SkylarkModule module = SkylarkInterfaceUtils.getSkylarkModule(c);
if (module != null) {
return module.name()
+ ((module.namespace() && highlightNameSpaces) ? " (a language module)" : "");
} else if (c.... | static String function(Class<?> c, boolean highlightNameSpaces) { SkylarkModule module = SkylarkInterfaceUtils.getSkylarkModule(c); if (module != null) { return module.name() + ((module.namespace() && highlightNameSpaces) ? STR : STRunknownSTRstringSTRintSTRboolSTRListSTRMapSTRfunctionSTRselect"; } else { if (c.getSimp... | /**
* Returns a pretty name for the datatype equivalent of class 'c' in the Build language.
* @param highlightNameSpaces Determines whether the result should also contain a special comment
* when the given class identifies a Skylark name space.
*/ | Returns a pretty name for the datatype equivalent of class 'c' in the Build language | getDataTypeNameFromClass | {
"repo_name": "aehlig/bazel",
"path": "src/main/java/com/google/devtools/build/lib/syntax/EvalUtils.java",
"license": "apache-2.0",
"size": 45162
} | [
"com.google.devtools.build.lib.skylarkinterface.SkylarkInterfaceUtils",
"com.google.devtools.build.lib.skylarkinterface.SkylarkModule"
] | import com.google.devtools.build.lib.skylarkinterface.SkylarkInterfaceUtils; import com.google.devtools.build.lib.skylarkinterface.SkylarkModule; | import com.google.devtools.build.lib.skylarkinterface.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,816,007 |
private synchronized boolean equalsTopology(Set<OfMockLink> topo) {
if (topo.size() != getEdgeCount()) {
return false;
}
for (OfMockLink link: getEdges()) {
if (!topo.contains(link)) {
return false;
}
}
return true;
} | synchronized boolean function(Set<OfMockLink> topo) { if (topo.size() != getEdgeCount()) { return false; } for (OfMockLink link: getEdges()) { if (!topo.contains(link)) { return false; } } return true; } | /**
* Determine whether the current network topology is equal to the given
* topology or not.
*
* @param topo A set of {@link OfMockLink} instances which indicates the
* expected topology.
* @return {@code true} only if the given topology is equal to the current
* ... | Determine whether the current network topology is equal to the given topology or not | equalsTopology | {
"repo_name": "opendaylight/vtn",
"path": "manager/it/ofmock/src/main/java/org/opendaylight/vtn/manager/it/ofmock/impl/RoutingTable.java",
"license": "epl-1.0",
"size": 16843
} | [
"java.util.Set",
"org.opendaylight.vtn.manager.it.ofmock.OfMockLink"
] | import java.util.Set; import org.opendaylight.vtn.manager.it.ofmock.OfMockLink; | import java.util.*; import org.opendaylight.vtn.manager.it.ofmock.*; | [
"java.util",
"org.opendaylight.vtn"
] | java.util; org.opendaylight.vtn; | 2,568,109 |
@SuppressWarnings("unchecked")
private <T> T convertFlag(final String[] values, final Class<T> clazz) {
final String joined = StringUtils.join(values, ' ');
if (String[].class.isAssignableFrom(clazz)) {
return (T) values;
} else if (String.class.isAssi... | @SuppressWarnings(STR) <T> T function(final String[] values, final Class<T> clazz) { final String joined = StringUtils.join(values, ' '); if (String[].class.isAssignableFrom(clazz)) { return (T) values; } else if (String.class.isAssignableFrom(clazz)) { return (T) joined; } else if (Integer.class.isAssignableFrom(clazz... | /**
* Attempts to convert the given values to the given class.
*
* @param values Values to convert (will be joined if necessary)
* @param clazz Class to convert to
* @param <T> Type to return (will cast)
* @return Converted value
*/ | Attempts to convert the given values to the given class | convertFlag | {
"repo_name": "RoyalDev/RoyalCommands",
"path": "modules/RoyalCommands/src/main/java/org/royaldev/royalcommands/rcommands/BaseCommand.java",
"license": "mpl-2.0",
"size": 25215
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 622,674 |
static HystrixCommandProperties asMock(final Setter builder) {
return new HystrixCommandProperties(TestKey.TEST) { | static HystrixCommandProperties asMock(final Setter builder) { return new HystrixCommandProperties(TestKey.TEST) { | /**
* Return a static representation of the properties with values from the Builder so that UnitTests can create properties that are not affected by the actual implementations which pick up their
* values dynamically.
*
* @param builder command properties builder
* @return HystrixCommandProper... | Return a static representation of the properties with values from the Builder so that UnitTests can create properties that are not affected by the actual implementations which pick up their values dynamically | asMock | {
"repo_name": "fluxcapacitor/pipeline",
"path": "predict/dashboard/hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandPropertiesTest.java",
"license": "apache-2.0",
"size": 18385
} | [
"com.netflix.hystrix.HystrixCommandProperties"
] | import com.netflix.hystrix.HystrixCommandProperties; | import com.netflix.hystrix.*; | [
"com.netflix.hystrix"
] | com.netflix.hystrix; | 927,405 |
@Override
public AuthRequest authenticate(AuthRequest who) throws AccountException {
if (Strings.isNullOrEmpty(who.getPassword()) &&
!Strings.isNullOrEmpty(who.getEmailAddress())) {
return who;
}
if (Strings.isNullOrEmpty(who.getAuthPlugin())
|| Strings.isNullOrEmpty(who.getAuthPr... | AuthRequest function(AuthRequest who) throws AccountException { if (Strings.isNullOrEmpty(who.getPassword()) && !Strings.isNullOrEmpty(who.getEmailAddress())) { return who; } if (Strings.isNullOrEmpty(who.getAuthPlugin()) Strings.isNullOrEmpty(who.getAuthProvider())) { throw new AccountException(STR); } OAuthLoginProvi... | /**
* Authenticates with the {@link OAuthLoginProvider} specified
* in the authentication request.
*
* {@link AccountManager} calls this method without password
* if authenticity of the user has already been established.
* In that case the {@link AuthRequest} is supposed to contain
* a resolved ema... | Authenticates with the <code>OAuthLoginProvider</code> specified in the authentication request. <code>AccountManager</code> calls this method without password if authenticity of the user has already been established. In that case the <code>AuthRequest</code> is supposed to contain a resolved email address and we can sk... | authenticate | {
"repo_name": "MerritCR/merrit",
"path": "gerrit-server/src/main/java/com/google/gerrit/server/auth/oauth/OAuthRealm.java",
"license": "apache-2.0",
"size": 4717
} | [
"com.google.common.base.Strings",
"com.google.gerrit.extensions.auth.oauth.OAuthLoginProvider",
"com.google.gerrit.extensions.auth.oauth.OAuthUserInfo",
"com.google.gerrit.server.account.AccountException",
"com.google.gerrit.server.account.AuthRequest",
"java.io.IOException"
] | import com.google.common.base.Strings; import com.google.gerrit.extensions.auth.oauth.OAuthLoginProvider; import com.google.gerrit.extensions.auth.oauth.OAuthUserInfo; import com.google.gerrit.server.account.AccountException; import com.google.gerrit.server.account.AuthRequest; import java.io.IOException; | import com.google.common.base.*; import com.google.gerrit.extensions.auth.oauth.*; import com.google.gerrit.server.account.*; import java.io.*; | [
"com.google.common",
"com.google.gerrit",
"java.io"
] | com.google.common; com.google.gerrit; java.io; | 584,005 |
public boolean isSelected(InstallData idata, File basedir, String filename, File file) throws Exception
{
// throw BuildException on error
validate();
// Determine file whose existence is to be checked
String[] destfiles = map.mapFileName(filename);
// If filename does ... | boolean function(InstallData idata, File basedir, String filename, File file) throws Exception { validate(); String[] destfiles = map.mapFileName(filename); if (destfiles == null) { return false; } if (destfiles.length != 1 destfiles[0] == null) { throw new Exception(STR + targetdir + STR + filename); } String destname... | /**
* The heart of the matter. This is where the selector gets to decide
* on the inclusion of a file in a particular fileset.
*
* @param basedir the base directory the scan is being done from
* @param filename is the name of the file to check
* @param file is a java.io.File object th... | The heart of the matter. This is where the selector gets to decide on the inclusion of a file in a particular fileset | isSelected | {
"repo_name": "mtjandra/izpack",
"path": "izpack-util/src/main/java/com/izforge/izpack/util/file/types/selectors/PresentSelector.java",
"license": "apache-2.0",
"size": 6599
} | [
"com.izforge.izpack.api.data.InstallData",
"java.io.File",
"java.util.EnumSet",
"java.util.HashMap",
"java.util.Map"
] | import com.izforge.izpack.api.data.InstallData; import java.io.File; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; | import com.izforge.izpack.api.data.*; import java.io.*; import java.util.*; | [
"com.izforge.izpack",
"java.io",
"java.util"
] | com.izforge.izpack; java.io; java.util; | 560,991 |
String getEvaluatedResult(File file, String xpath, Map<String, String> namespaces); | String getEvaluatedResult(File file, String xpath, Map<String, String> namespaces); | /**
* Returns the output of an evaluated XPath expression on a given XML file.
*
* @param file XML file
* @param xpath XPath expression
* @return Evaluated output as a string
*/ | Returns the output of an evaluated XPath expression on a given XML file | getEvaluatedResult | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb/src/org/wso2/developerstudio/eclipse/gmf/esb/util/XPathValidator.java",
"license": "apache-2.0",
"size": 2562
} | [
"java.io.File",
"java.util.Map"
] | import java.io.File; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,592,988 |
public void tableChanged(TableModelEvent ev)
{
vector=tableModel.getVector();
} | void function(TableModelEvent ev) { vector=tableModel.getVector(); } | /**
* Updates the related Vector object whenever TableModel datas were changed.
*/ | Updates the related Vector object whenever TableModel datas were changed | tableChanged | {
"repo_name": "jupsal/schmies-jTEM",
"path": "libUnzipped/de/jtem/blas/VectorEditorPanel.java",
"license": "bsd-2-clause",
"size": 6449
} | [
"javax.swing.event.TableModelEvent"
] | import javax.swing.event.TableModelEvent; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 1,735,038 |
public Object get(String name, Scriptable start) {
Object ret_val = NOT_FOUND;
if(propertyNames.contains(name)) {
ret_val = length;
}
return ret_val;
} | Object function(String name, Scriptable start) { Object ret_val = NOT_FOUND; if(propertyNames.contains(name)) { ret_val = length; } return ret_val; } | /**
* Get the value of the named function. If no function object is
* registex for this name, the method will return null.
*
* @param name The variable name
* @param start The object where the lookup began
* @return the corresponding function object or null
*/ | Get the value of the named function. If no function object is registex for this name, the method will return null | get | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/web3d/vrml/scripting/ecmascript/x3d/ComponentInfoArray.java",
"license": "gpl-2.0",
"size": 2950
} | [
"org.mozilla.javascript.Scriptable"
] | import org.mozilla.javascript.Scriptable; | import org.mozilla.javascript.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 1,273,449 |
public void setQualifiedName(final QName aQualifiedName) {
pQName = aQualifiedName;
} | void function(final QName aQualifiedName) { pQName = aQualifiedName; } | /**
* Sets the qualified name of this object
*
* @param aQualifiedName
* A qualified name
*/ | Sets the qualified name of this object | setQualifiedName | {
"repo_name": "isandlaTech/cohorte-runtime",
"path": "java/deprecated/isolates/org.psem2m.sca.converter/src/org/psem2m/sca/converter/model/AbstractNameableSCAElement.java",
"license": "apache-2.0",
"size": 3461
} | [
"org.psem2m.sca.converter.utils.QName"
] | import org.psem2m.sca.converter.utils.QName; | import org.psem2m.sca.converter.utils.*; | [
"org.psem2m.sca"
] | org.psem2m.sca; | 408,852 |
public void addListener(AgentRosterListener listener) {
synchronized (listeners) {
if (!listeners.contains(listener)) {
listeners.add(listener);
// Fire events for the existing entries and presences in the roster
for (EntityBareJid jid : getAgents... | void function(AgentRosterListener listener) { synchronized (listeners) { if (!listeners.contains(listener)) { listeners.add(listener); for (EntityBareJid jid : getAgents()) { if (entries.contains(jid)) { listener.agentAdded(jid); Jid j; try { j = JidCreate.from(jid); } catch (XmppStringprepException e) { throw new Ille... | /**
* Adds a listener to this roster. The listener will be fired anytime one or more
* changes to the roster are pushed from the server.
*
* @param listener an agent roster listener.
*/ | Adds a listener to this roster. The listener will be fired anytime one or more changes to the roster are pushed from the server | addListener | {
"repo_name": "igniterealtime/Smack",
"path": "smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java",
"license": "apache-2.0",
"size": 16430
} | [
"java.util.Iterator",
"java.util.Map",
"org.jivesoftware.smack.packet.Presence",
"org.jxmpp.jid.EntityBareJid",
"org.jxmpp.jid.Jid",
"org.jxmpp.jid.impl.JidCreate",
"org.jxmpp.jid.parts.Resourcepart",
"org.jxmpp.stringprep.XmppStringprepException"
] | import java.util.Iterator; import java.util.Map; import org.jivesoftware.smack.packet.Presence; import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.Jid; import org.jxmpp.jid.impl.JidCreate; import org.jxmpp.jid.parts.Resourcepart; import org.jxmpp.stringprep.XmppStringprepException; | import java.util.*; import org.jivesoftware.smack.packet.*; import org.jxmpp.jid.*; import org.jxmpp.jid.impl.*; import org.jxmpp.jid.parts.*; import org.jxmpp.stringprep.*; | [
"java.util",
"org.jivesoftware.smack",
"org.jxmpp.jid",
"org.jxmpp.stringprep"
] | java.util; org.jivesoftware.smack; org.jxmpp.jid; org.jxmpp.stringprep; | 1,816,512 |
private void restoreTableDescriptor(final MasterProcedureEnv env) throws IOException {
env.getMasterServices().getTableDescriptors().add(unmodifiedTableDescriptor);
// Make sure regions are opened after table descriptor is updated.
//reOpenAllRegionsIfTableIsOnline(env);
// TODO: NUKE ROLLBACK!!!!
... | void function(final MasterProcedureEnv env) throws IOException { env.getMasterServices().getTableDescriptors().add(unmodifiedTableDescriptor); } | /**
* Restore back to the old descriptor
* @param env MasterProcedureEnv
* @throws IOException
**/ | Restore back to the old descriptor | restoreTableDescriptor | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteColumnFamilyProcedure.java",
"license": "apache-2.0",
"size": 13423
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,832,192 |
@ApiModelProperty(value = "Limit access to before this date.")
public DateTime getAccessUntil() {
return accessUntil;
} | @ApiModelProperty(value = STR) DateTime function() { return accessUntil; } | /**
* Limit access to before this date.
* @return accessUntil
**/ | Limit access to before this date | getAccessUntil | {
"repo_name": "iterate-ch/cyberduck",
"path": "storegate/src/main/java/ch/cyberduck/core/storegate/io/swagger/client/model/CreateFileShareRequest.java",
"license": "gpl-3.0",
"size": 13214
} | [
"io.swagger.annotations.ApiModelProperty",
"org.joda.time.DateTime"
] | import io.swagger.annotations.ApiModelProperty; import org.joda.time.DateTime; | import io.swagger.annotations.*; import org.joda.time.*; | [
"io.swagger.annotations",
"org.joda.time"
] | io.swagger.annotations; org.joda.time; | 30,918 |
public void startNewVoting() {
logger.info("startNewVoting: explicitly starting new voting...");
ResourceResolver resourceResolver = null;
try {
resourceResolver = getResourceResolver();
final Resource clusterNodesRes = ResourceHelper.getOrCreateResource(
... | void function() { logger.info(STR); ResourceResolver resourceResolver = null; try { resourceResolver = getResourceResolver(); final Resource clusterNodesRes = ResourceHelper.getOrCreateResource( resourceResolver, config.getClusterInstancesPath()); final Set<String> liveInstances = ViewHelper.determineLiveInstances( clu... | /**
* Management function to trigger the otherwise algorithm-dependent
* start of a new voting.
* This can make sense when explicitly trying to force a leader
* change (which is otherwise not allowed by the discovery API)
*/ | Management function to trigger the otherwise algorithm-dependent start of a new voting. This can make sense when explicitly trying to force a leader change (which is otherwise not allowed by the discovery API) | startNewVoting | {
"repo_name": "gutsy/sling",
"path": "bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/common/heartbeat/HeartbeatHandler.java",
"license": "apache-2.0",
"size": 32055
} | [
"java.util.Set",
"org.apache.sling.api.resource.LoginException",
"org.apache.sling.api.resource.PersistenceException",
"org.apache.sling.api.resource.Resource",
"org.apache.sling.api.resource.ResourceResolver",
"org.apache.sling.discovery.impl.common.ViewHelper",
"org.apache.sling.discovery.impl.common.... | import java.util.Set; import org.apache.sling.api.resource.LoginException; import org.apache.sling.api.resource.PersistenceException; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.discovery.impl.common.ViewHelper; import org.apache.sling.di... | import java.util.*; import org.apache.sling.api.resource.*; import org.apache.sling.discovery.impl.common.*; import org.apache.sling.discovery.impl.common.resource.*; | [
"java.util",
"org.apache.sling"
] | java.util; org.apache.sling; | 917,532 |
int processResults(Result result, List<JSModule> modules, B options)
throws FlagUsageException, IOException {
if (config.printPassGraph) {
if (compiler.getRoot() == null) {
return 1;
} else {
jsOutput.append(
DotFormatter.toDot(compiler.getPassConfig().getPassGraph()... | int processResults(Result result, List<JSModule> modules, B options) throws FlagUsageException, IOException { if (config.printPassGraph) { if (compiler.getRoot() == null) { return 1; } else { jsOutput.append( DotFormatter.toDot(compiler.getPassConfig().getPassGraph())); jsOutput.append('\n'); return 0; } } if (config.p... | /**
* Processes the results of the compile job, and returns an error code.
*/ | Processes the results of the compile job, and returns an error code | processResults | {
"repo_name": "ksheedlo/closure-compiler",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 64695
} | [
"com.google.javascript.rhino.Node",
"java.io.IOException",
"java.io.Writer",
"java.util.List"
] | import com.google.javascript.rhino.Node; import java.io.IOException; import java.io.Writer; import java.util.List; | import com.google.javascript.rhino.*; import java.io.*; import java.util.*; | [
"com.google.javascript",
"java.io",
"java.util"
] | com.google.javascript; java.io; java.util; | 1,758,260 |
public void maybeShowPopup(MouseEvent evt) {
Point p = unzoomPoint(evt.getPoint());
PlayPenComponent c = contentPane.getComponentAt(p);
if(!mouseMode.equals(MouseModeType.CREATING_RELATIONSHIP) &&
!mouseMode.equals(MouseModeType.CREATING_TABLE)) {
if (c != null) {
... | void function(MouseEvent evt) { Point p = unzoomPoint(evt.getPoint()); PlayPenComponent c = contentPane.getComponentAt(p); if(!mouseMode.equals(MouseModeType.CREATING_RELATIONSHIP) && !mouseMode.equals(MouseModeType.CREATING_TABLE)) { if (c != null) { if(!c.isBeingDragged()) { p.translate(-c.getX(), -c.getY()); if (evt... | /**
* Shows the popup menus if appropriate.
*/ | Shows the popup menus if appropriate | maybeShowPopup | {
"repo_name": "ptrptr/power-architect",
"path": "src/main/java/ca/sqlpower/architect/swingui/PlayPen.java",
"license": "gpl-3.0",
"size": 137696
} | [
"java.awt.Point",
"java.awt.event.MouseEvent",
"javax.swing.JPanel",
"javax.swing.JPopupMenu"
] | import java.awt.Point; import java.awt.event.MouseEvent; import javax.swing.JPanel; import javax.swing.JPopupMenu; | import java.awt.*; import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,456,468 |
private String getUserName(String userAccessToken)
throws BimExchangeException {
String query = "SELECT AUTHZ_USER FROM IDN_OAUTH2_ACCESS_TOKEN WHERE ACCESS_TOKEN='"
+ userAccessToken.split(" ")[1]
+ "' AND USER_TYPE = 'APPLICATION_USER' AND TOKEN_STATE='ACTIVE'";
try {
return execute(query, "AU... | String function(String userAccessToken) throws BimExchangeException { String query = STR + userAccessToken.split(" ")[1] + STR; try { return execute(query, STR, BimExConstants.APIM_DB_SCHEMA) .get(0); } catch (BimExchangeException e) { LOG.error(STR + e); throw e; } } | /**
* Return the name of the user for the given user access token.
*
* @param userAccessToken
* access token of the user.
* @return name of the user.
* @throws BimExchangeException
* custom exception.
*/ | Return the name of the user for the given user access token | getUserName | {
"repo_name": "bbrangeo/OpenSourceBIMaaS",
"path": "dev/esb/core/src/main/java/com/bimaas/connect/AuthorizingUserForProjectMediator.java",
"license": "apache-2.0",
"size": 5577
} | [
"com.bimaas.connect.constants.BimExConstants",
"com.bimaas.connect.exception.BimExchangeException"
] | import com.bimaas.connect.constants.BimExConstants; import com.bimaas.connect.exception.BimExchangeException; | import com.bimaas.connect.constants.*; import com.bimaas.connect.exception.*; | [
"com.bimaas.connect"
] | com.bimaas.connect; | 883,941 |
private boolean cmd_saveInvoice (int C_Invoice_ID)
{
log.config("C_Invoice_ID=" + C_Invoice_ID);
MInvoice invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null);
if (invoice.get_ID() == 0)
{
log.log(Level.SEVERE, "Not found - C_Invoice_ID=" + C_Invoice_ID);
return false;
}
int lineCount = 0;
... | boolean function (int C_Invoice_ID) { log.config(STR + C_Invoice_ID); MInvoice invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null); if (invoice.get_ID() == 0) { log.log(Level.SEVERE, STR + C_Invoice_ID); return false; } int lineCount = 0; for (int i = 0; i < m_selectionList.size(); i++) { if (isSelectionSelected(... | /**
* Save to Invoice
* @param C_Invoice_ID id
* @return true if saved
*/ | Save to Invoice | cmd_saveInvoice | {
"repo_name": "erpcya/adempierePOS",
"path": "zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WBOMDrop.java",
"license": "gpl-2.0",
"size": 23719
} | [
"java.math.BigDecimal",
"java.util.logging.Level",
"org.adempiere.webui.window.FDialog",
"org.compiere.model.MInvoice",
"org.compiere.model.MInvoiceLine",
"org.compiere.util.Env",
"org.compiere.util.Msg"
] | import java.math.BigDecimal; import java.util.logging.Level; import org.adempiere.webui.window.FDialog; import org.compiere.model.MInvoice; import org.compiere.model.MInvoiceLine; import org.compiere.util.Env; import org.compiere.util.Msg; | import java.math.*; import java.util.logging.*; import org.adempiere.webui.window.*; import org.compiere.model.*; import org.compiere.util.*; | [
"java.math",
"java.util",
"org.adempiere.webui",
"org.compiere.model",
"org.compiere.util"
] | java.math; java.util; org.adempiere.webui; org.compiere.model; org.compiere.util; | 1,263,970 |
public Locale getLocale() {
return mLocale;
} | Locale function() { return mLocale; } | /**
* Gets the locale.
*
* @return the locale
*/ | Gets the locale | getLocale | {
"repo_name": "hopestar720/aioweb",
"path": "src/com/xhsoft/framework/common/date/FastDateFormat.java",
"license": "apache-2.0",
"size": 35462
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,030,764 |
val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
if (request.getMethod().equalsIgnoreCase(HttpMethod.POST.name())) {
WebUtils.putInitialHttpRequestPostParameters(context);
}
} | val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context); if (request.getMethod().equalsIgnoreCase(HttpMethod.POST.name())) { WebUtils.putInitialHttpRequestPostParameters(context); } } | /**
* Configure the POST parameters in webflow.
*
* @param context the webflow context
*/ | Configure the POST parameters in webflow | configureWebflowForPostParameters | {
"repo_name": "fogbeam/cas_mirror",
"path": "support/cas-server-support-actions/src/main/java/org/apereo/cas/web/flow/login/InitialFlowSetupAction.java",
"license": "apache-2.0",
"size": 10805
} | [
"org.apereo.cas.web.support.WebUtils",
"org.springframework.http.HttpMethod"
] | import org.apereo.cas.web.support.WebUtils; import org.springframework.http.HttpMethod; | import org.apereo.cas.web.support.*; import org.springframework.http.*; | [
"org.apereo.cas",
"org.springframework.http"
] | org.apereo.cas; org.springframework.http; | 1,021,835 |
public Adapter createDiagramExtensionDescriptionAdapter() {
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '
* {@link org.eclipse.sirius.diagram.description.DiagramExtensionDescription
* <em>Diagram Extension Description</em>}'. <!-- begin-user-doc --> This
* default implementation returns null so that we can easily ignore cases;
* it's useful to ig... | Creates a new adapter for an object of class ' <code>org.eclipse.sirius.diagram.description.DiagramExtensionDescription Diagram Extension Description</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. | createDiagramExtensionDescriptionAdapter | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionAdapterFactory.java",
"license": "epl-1.0",
"size": 31915
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,076,853 |
private static DataModel parseDataModel(String dataModel) throws TasteException {
if (!new File(dataModel).exists()) {
throw new IllegalArgumentException("Error: unable to find the the data model file.");
}
DataModel result;
try {
result = new StringUserDataModel(new File(dataModel));
... | static DataModel function(String dataModel) throws TasteException { if (!new File(dataModel).exists()) { throw new IllegalArgumentException(STR); } DataModel result; try { result = new StringUserDataModel(new File(dataModel)); } catch (IOException e) { throw new IllegalStateException(STR, e); } if (result.getNumUsers()... | /**
* Parses and checks the "data-model" option.
*/ | Parses and checks the "data-model" option | parseDataModel | {
"repo_name": "norbertdev/mynemo",
"path": "src/main/java/norbert/mynemo/ui/RecommendCommandParser.java",
"license": "apache-2.0",
"size": 17270
} | [
"java.io.File",
"java.io.IOException",
"norbert.mynemo.dataimport.StringUserDataModel",
"org.apache.mahout.cf.taste.common.TasteException",
"org.apache.mahout.cf.taste.model.DataModel"
] | import java.io.File; import java.io.IOException; import norbert.mynemo.dataimport.StringUserDataModel; import org.apache.mahout.cf.taste.common.TasteException; import org.apache.mahout.cf.taste.model.DataModel; | import java.io.*; import norbert.mynemo.dataimport.*; import org.apache.mahout.cf.taste.common.*; import org.apache.mahout.cf.taste.model.*; | [
"java.io",
"norbert.mynemo.dataimport",
"org.apache.mahout"
] | java.io; norbert.mynemo.dataimport; org.apache.mahout; | 195,759 |
protected static void markRlzNotified() {
SharedPreferencesManager.getInstance().writeBoolean(
ChromePreferenceKeys.RLZ_NOTIFIED, true);
} | static void function() { SharedPreferencesManager.getInstance().writeBoolean( ChromePreferenceKeys.RLZ_NOTIFIED, true); } | /**
* Stores that the RLZ provider has been notified that the first search has occurred.
*/ | Stores that the RLZ provider has been notified that the first search has occurred | markRlzNotified | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/rlz/RevenueStats.java",
"license": "bsd-3-clause",
"size": 2229
} | [
"org.chromium.chrome.browser.preferences.ChromePreferenceKeys",
"org.chromium.chrome.browser.preferences.SharedPreferencesManager"
] | import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.SharedPreferencesManager; | import org.chromium.chrome.browser.preferences.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 2,016,628 |
public void setCollapsedTitleTextColor(@NonNull ColorStateList colors) {
collapsingTextHelper.setCollapsedTextColor(colors);
} | void function(@NonNull ColorStateList colors) { collapsingTextHelper.setCollapsedTextColor(colors); } | /**
* Sets the text colors of the collapsed title.
*
* @param colors ColorStateList containing the new text colors
*/ | Sets the text colors of the collapsed title | setCollapsedTitleTextColor | {
"repo_name": "material-components/material-components-android",
"path": "lib/java/com/google/android/material/appbar/CollapsingToolbarLayout.java",
"license": "apache-2.0",
"size": 60621
} | [
"android.content.res.ColorStateList",
"androidx.annotation.NonNull"
] | import android.content.res.ColorStateList; import androidx.annotation.NonNull; | import android.content.res.*; import androidx.annotation.*; | [
"android.content",
"androidx.annotation"
] | android.content; androidx.annotation; | 881,865 |
public ParallelInference build() {
if (this.inferenceMode == InferenceMode.INPLACE) {
val inf = new InplaceParallelInference();
inf.inferenceMode = this.inferenceMode;
inf.model = this.model;
inf.workers = this.workers;
... | ParallelInference function() { if (this.inferenceMode == InferenceMode.INPLACE) { val inf = new InplaceParallelInference(); inf.inferenceMode = this.inferenceMode; inf.model = this.model; inf.workers = this.workers; inf.loadBalanceMode = this.loadBalanceMode; inf.init(); return inf; } else { ParallelInference inference... | /**
* This method builds new ParallelInference instance
*
* @return
*/ | This method builds new ParallelInference instance | build | {
"repo_name": "RobAltena/deeplearning4j",
"path": "deeplearning4j/deeplearning4j-scaleout/deeplearning4j-scaleout-parallelwrapper/src/main/java/org/deeplearning4j/parallelism/ParallelInference.java",
"license": "apache-2.0",
"size": 21826
} | [
"java.util.concurrent.BlockingQueue",
"java.util.concurrent.atomic.AtomicBoolean",
"java.util.concurrent.atomic.AtomicLong",
"java.util.concurrent.locks.ReentrantReadWriteLock",
"org.deeplearning4j.nn.api.Model",
"org.deeplearning4j.parallelism.inference.InferenceMode",
"org.deeplearning4j.parallelism.i... | import java.util.concurrent.BlockingQueue; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.deeplearning4j.nn.api.Model; import org.deeplearning4j.parallelism.inference.InferenceMode; import org.deeplear... | import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.concurrent.locks.*; import org.deeplearning4j.nn.api.*; import org.deeplearning4j.parallelism.inference.*; | [
"java.util",
"org.deeplearning4j.nn",
"org.deeplearning4j.parallelism"
] | java.util; org.deeplearning4j.nn; org.deeplearning4j.parallelism; | 1,837,424 |
public DataSourceType<T> removeMaxStatements()
{
childNode.removeChildren("max-statements");
return this;
}
// --------------------------------------------------------------------------------------------------------||
// ClassName: DataSourceType ElementName: xsd:ID ElementType : id
// ... | DataSourceType<T> function() { childNode.removeChildren(STR); return this; } | /**
* Removes the <code>max-statements</code> element
* @return the current instance of <code>DataSourceType<T></code>
*/ | Removes the <code>max-statements</code> element | removeMaxStatements | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/javaee6/DataSourceTypeImpl.java",
"license": "epl-1.0",
"size": 28456
} | [
"org.jboss.shrinkwrap.descriptor.api.javaee6.DataSourceType"
] | import org.jboss.shrinkwrap.descriptor.api.javaee6.DataSourceType; | import org.jboss.shrinkwrap.descriptor.api.javaee6.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 789,214 |
@Test
public void testUpdateRoles_giveAllRights() {
Identity id1 = JunitTestHelper.createAndPersistIdentityAsUser( "roles-" + UUID.randomUUID().toString());
Identity id2 = JunitTestHelper.createAndPersistIdentityAsUser( "roles-" + UUID.randomUUID().toString());
Roles roles = securityManager.getRoles(id1);
A... | void function() { Identity id1 = JunitTestHelper.createAndPersistIdentityAsUser( STR + UUID.randomUUID().toString()); Identity id2 = JunitTestHelper.createAndPersistIdentityAsUser( STR + UUID.randomUUID().toString()); Roles roles = securityManager.getRoles(id1); Assert.assertNotNull(roles); dbInstance.commitAndCloseSes... | /**
* Update roles
*/ | Update roles | testUpdateRoles_giveAllRights | {
"repo_name": "stevenhva/InfoLearn_OpenOLAT",
"path": "src/test/java/org/olat/basesecurity/BaseSecurityManagerTest.java",
"license": "apache-2.0",
"size": 45118
} | [
"java.util.UUID",
"org.junit.Assert",
"org.olat.core.id.Identity",
"org.olat.core.id.Roles",
"org.olat.test.JunitTestHelper"
] | import java.util.UUID; import org.junit.Assert; import org.olat.core.id.Identity; import org.olat.core.id.Roles; import org.olat.test.JunitTestHelper; | import java.util.*; import org.junit.*; import org.olat.core.id.*; import org.olat.test.*; | [
"java.util",
"org.junit",
"org.olat.core",
"org.olat.test"
] | java.util; org.junit; org.olat.core; org.olat.test; | 492,575 |
public void find(BundleContext context, String name, String filter,
boolean allServices, Collection references) {
if (!MENU_OPERATION_NAME.equals(name)) {
// It's not the managed service
// Do nothing
return;
}
if (context.getBundle().getBundle... | void function(BundleContext context, String name, String filter, boolean allServices, Collection references) { if (!MENU_OPERATION_NAME.equals(name)) { return; } if (context.getBundle().getBundleId() == 0) { return; } if (references.isEmpty()) { return; } if (bundleContext.equals(context)) { return; } for (Iterator ite... | /**
* Filter request returned by framework related to {@link MenuOperations}. <br>
* This method only manage the {@link MenuOperations} service request,
* removing from returned collection {@code references} all services except
* {@link MenuOperationsProxy}. <br>
* For request inside this bundl... | Filter request returned by framework related to <code>MenuOperations</code>. This method only manage the <code>MenuOperations</code> service request, removing from returned collection references all services except <code>MenuOperationsProxy</code>. For request inside this bundle all services are returned | find | {
"repo_name": "osroca/gvnix",
"path": "addon-web-mvc-menu/src/main/java/org/gvnix/web/menu/roo/addon/FilterMenuOperationsHook.java",
"license": "gpl-3.0",
"size": 5910
} | [
"java.util.Collection",
"java.util.Iterator",
"org.osgi.framework.BundleContext",
"org.osgi.framework.ServiceReference"
] | import java.util.Collection; import java.util.Iterator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; | import java.util.*; import org.osgi.framework.*; | [
"java.util",
"org.osgi.framework"
] | java.util; org.osgi.framework; | 282,777 |
public static DocumentIterator getInstance( DocumentIterator... documentIterator ) throws IOException {
if ( documentIterator.length == 0 ) throw new IllegalArgumentException( "The provided array of document iterators is empty." );
return new OrDocumentIterator( documentIterator );
}
protected OrDocumentIt... | static DocumentIterator function( DocumentIterator... documentIterator ) throws IOException { if ( documentIterator.length == 0 ) throw new IllegalArgumentException( STR ); return new OrDocumentIterator( documentIterator ); } protected OrDocumentIterator( final DocumentIterator... documentIterators ) throws IOException... | /** Returns a document iterator that computes the OR of the given nonzero-length array of iterators.
*
* <P>Note that the special case of the singleton array is handled efficiently.
*
* @param documentIterator the iterators to be joined.
* @return a document iterator that computes the OR of <code>it</code>.... | Returns a document iterator that computes the OR of the given nonzero-length array of iterators. Note that the special case of the singleton array is handled efficiently | getInstance | {
"repo_name": "JC-R/mg4j",
"path": "test/it/unimi/di/big/mg4j/mock/search/OrDocumentIterator.java",
"license": "gpl-3.0",
"size": 4572
} | [
"it.unimi.di.big.mg4j.index.Index",
"it.unimi.di.big.mg4j.search.DocumentIterator",
"it.unimi.di.big.mg4j.search.IntervalIterator",
"it.unimi.di.big.mg4j.search.IntervalIterators",
"it.unimi.dsi.fastutil.objects.Reference2ReferenceArrayMap",
"it.unimi.dsi.util.Interval",
"java.io.IOException"
] | import it.unimi.di.big.mg4j.index.Index; import it.unimi.di.big.mg4j.search.DocumentIterator; import it.unimi.di.big.mg4j.search.IntervalIterator; import it.unimi.di.big.mg4j.search.IntervalIterators; import it.unimi.dsi.fastutil.objects.Reference2ReferenceArrayMap; import it.unimi.dsi.util.Interval; import java.io.IOE... | import it.unimi.di.big.mg4j.index.*; import it.unimi.di.big.mg4j.search.*; import it.unimi.dsi.fastutil.objects.*; import it.unimi.dsi.util.*; import java.io.*; | [
"it.unimi.di",
"it.unimi.dsi",
"java.io"
] | it.unimi.di; it.unimi.dsi; java.io; | 2,868,469 |
private ATCommandResponsePacket createPacket(int frameId, ATCommandStatus status,
XBee16BitAddress addr16, XBee64BitAddress addr64, String ni, XBee16BitAddress parentAddr,
byte role, byte rssi, boolean raw802Packet) {
byte[] value = new byte[2 + 8 + ni.length() + 1
+ 2 + 1 + ... | ATCommandResponsePacket function(int frameId, ATCommandStatus status, XBee16BitAddress addr16, XBee64BitAddress addr64, String ni, XBee16BitAddress parentAddr, byte role, byte rssi, boolean raw802Packet) { byte[] value = new byte[2 + 8 + ni.length() + 1 + 2 + 1 + 1 + 2 + 2 + 4 + 1 ]; byte[] profile = new byte[]{(byte)0... | /**
* Helper method to create ND responses.
*
* @param frameId
* @param status
* @param addr16
* @param addr64
* @param ni
* @param parentAddr
* @param role
* @param rssi
* @param raw802Packet
* @return
*/ | Helper method to create ND responses | createPacket | {
"repo_name": "digidotcom/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/NodeDiscoveryDiscoverDevicesListenerTest.java",
"license": "mpl-2.0",
"size": 32152
} | [
"com.digi.xbee.api.RemoteXBeeDevice",
"com.digi.xbee.api.listeners.IDiscoveryListener",
"com.digi.xbee.api.models.ATCommandStatus",
"com.digi.xbee.api.models.XBee16BitAddress",
"com.digi.xbee.api.models.XBee64BitAddress",
"com.digi.xbee.api.packet.common.ATCommandResponsePacket",
"java.util.ArrayList",
... | import com.digi.xbee.api.RemoteXBeeDevice; import com.digi.xbee.api.listeners.IDiscoveryListener; import com.digi.xbee.api.models.ATCommandStatus; import com.digi.xbee.api.models.XBee16BitAddress; import com.digi.xbee.api.models.XBee64BitAddress; import com.digi.xbee.api.packet.common.ATCommandResponsePacket; import ja... | import com.digi.xbee.api.*; import com.digi.xbee.api.listeners.*; import com.digi.xbee.api.models.*; import com.digi.xbee.api.packet.common.*; import java.util.*; | [
"com.digi.xbee",
"java.util"
] | com.digi.xbee; java.util; | 1,303,946 |
public void evaluate(Dataset data, BaseEntryGenerator generator,
BaseDatasetFilter filter) throws Exception {
// Get iterator from the entry generator
EntryIterator = generator.iterator();
// Execute
if (Magpie.NThreads == 1) {
// Create clone... | void function(Dataset data, BaseEntryGenerator generator, BaseDatasetFilter filter) throws Exception { EntryIterator = generator.iterator(); if (Magpie.NThreads == 1) { Dataset runData = data.emptyClone(); data.addEntries(runAndFilter(Model, runData, filter)); } else { int nThreads = Magpie.NThreads; int origBatchSize ... | /**
* Generate entries and store them in a dataset. Optionally, filter data
* before adding it to dataset
* @param data Dataset to be added to
* @param generator Generator for creating entries
* @param filter Filter to be used before adding entries to data
* @throws java.lang.Except... | Generate entries and store them in a dataset. Optionally, filter data before adding it to dataset | evaluate | {
"repo_name": "amarkrishna/demo1",
"path": "src/magpie/utility/tools/BatchModelEvaluator.java",
"license": "mit",
"size": 14751
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.Callable",
"java.util.concurrent.ExecutorService",
"java.util.concurrent.Executors",
"java.util.concurrent.Future"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 326,089 |
public Builder preProcessor(BitmapProcessor preProcessor) {
this.preProcessor = preProcessor;
return this;
} | Builder function(BitmapProcessor preProcessor) { this.preProcessor = preProcessor; return this; } | /**
* Sets bitmap processor which will be process bitmaps before they will be cached in memory. So memory cache
* will contain bitmap processed by incoming preProcessor.<br />
* Image will be pre-processed even if caching in memory is disabled.
*/ | Sets bitmap processor which will be process bitmaps before they will be cached in memory. So memory cache will contain bitmap processed by incoming preProcessor. Image will be pre-processed even if caching in memory is disabled | preProcessor | {
"repo_name": "jixieshi999/juahya",
"path": "JuahyaLibrary/src/com/nostra13/universalimageloader/core/DisplayImageOptions.java",
"license": "apache-2.0",
"size": 10774
} | [
"com.nostra13.universalimageloader.core.process.BitmapProcessor"
] | import com.nostra13.universalimageloader.core.process.BitmapProcessor; | import com.nostra13.universalimageloader.core.process.*; | [
"com.nostra13.universalimageloader"
] | com.nostra13.universalimageloader; | 2,499,967 |
public static String localTimeToString(LocalTime time, String emptyTimeString) {
return (time == null) ? emptyTimeString : time.toString();
} | static String function(LocalTime time, String emptyTimeString) { return (time == null) ? emptyTimeString : time.toString(); } | /**
* localTimeToString, This will return the supplied time as a string. If the time is null, this
* will return the value of emptyTimeString.
*
* <p>Time values will be output in one of the following ISO-8601 formats: "HH:mm", "HH:mm:ss",
* "HH:mm:ss.SSS", "HH:mm:ss.SSSSSS", "HH:mm:ss.SSSSSSSSS".
*
... | localTimeToString, This will return the supplied time as a string. If the time is null, this will return the value of emptyTimeString. The format used will be the shortest that outputs the full value of the time where the omitted parts are implied to be zero | localTimeToString | {
"repo_name": "LGoodDatePicker/LGoodDatePicker",
"path": "Project/src/main/java/com/github/lgooddatepicker/optionalusertools/PickerUtilities.java",
"license": "mit",
"size": 10950
} | [
"java.time.LocalTime"
] | import java.time.LocalTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,944,379 |
SmithWatermanAlignment align(final byte[] ref, final byte[] alt, SWParameters parameters, SWOverhangStrategy overhangStrategy);
@Override
default void close() {} | SmithWatermanAlignment align(final byte[] ref, final byte[] alt, SWParameters parameters, SWOverhangStrategy overhangStrategy); default void close() {} | /**
* perform a Smith-Waterman alignment of alt against ref
*
* @param ref bases to align to, values must be the byte equivalent of uppercase chars
* @param alt bases to align against ref, values must be the byte equivalent of uppercase chars
* @param parameters a set of weights to use when pe... | perform a Smith-Waterman alignment of alt against ref | align | {
"repo_name": "BGI-flexlab/SOAPgaeaDevelopment4.0",
"path": "src/main/java/org/bgi/flexlab/gaea/tools/haplotypecaller/smithwaterman/SmithWatermanAligner.java",
"license": "gpl-3.0",
"size": 2493
} | [
"org.bgi.flexlab.gaea.tools.haplotypecaller.smithwaterman.SmithWatermanJavaAligner"
] | import org.bgi.flexlab.gaea.tools.haplotypecaller.smithwaterman.SmithWatermanJavaAligner; | import org.bgi.flexlab.gaea.tools.haplotypecaller.smithwaterman.*; | [
"org.bgi.flexlab"
] | org.bgi.flexlab; | 1,533,916 |
public boolean hasWorldPermission(Player player, String world) {
if (!player.hasPermission("jobs.use")) {
return false;
} else {
return player.hasPermission("jobs.world."+world.toLowerCase());
}
} | boolean function(Player player, String world) { if (!player.hasPermission(STR)) { return false; } else { return player.hasPermission(STR+world.toLowerCase()); } } | /**
* Check World permissions
*/ | Check World permissions | hasWorldPermission | {
"repo_name": "GamingMesh/Jobs",
"path": "src/main/java/com/gamingmesh/jobs/PermissionHandler.java",
"license": "apache-2.0",
"size": 6261
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 1,558,585 |
static String getDisplayID(Identified sbolElement) {
if (sbolElement.isSetDisplayId()) {
return sbolElement.getDisplayId();
}
String identity = sbolElement.getIdentity().toString();
return identity.substring(identity.lastIndexOf("/") + 1);
}
| static String getDisplayID(Identified sbolElement) { if (sbolElement.isSetDisplayId()) { return sbolElement.getDisplayId(); } String identity = sbolElement.getIdentity().toString(); return identity.substring(identity.lastIndexOf("/") + 1); } | /**
* Returns the specified SBOL object's displayId. This means the prefix of the SBOL element's displayId will be cut off.
* @param sbolElement - The SBOL element to retrieve its displayId
* @return The displayId of the given SBOL element.
*/ | Returns the specified SBOL object's displayId. This means the prefix of the SBOL element's displayId will be cut off | getDisplayID | {
"repo_name": "MyersResearchGroup/iBioSim",
"path": "conversion/src/main/java/edu/utah/ece/async/ibiosim/conversion/SBOL2SBML.java",
"license": "apache-2.0",
"size": 84633
} | [
"org.sbolstandard.core2.Identified"
] | import org.sbolstandard.core2.Identified; | import org.sbolstandard.core2.*; | [
"org.sbolstandard.core2"
] | org.sbolstandard.core2; | 382,293 |
public String toXml(Object root, String encoding) {
try {
StringWriter writer = new StringWriter();
createMarshaller(encoding).marshal(root, writer);
return writer.toString();
} catch (JAXBException e) {
LangUtils.throwBaseException(e);
}
return null;
}
| String function(Object root, String encoding) { try { StringWriter writer = new StringWriter(); createMarshaller(encoding).marshal(root, writer); return writer.toString(); } catch (JAXBException e) { LangUtils.throwBaseException(e); } return null; } | /**
* Java Object to Xml with encoding.
*/ | Java Object to Xml with encoding | toXml | {
"repo_name": "wayshall/onetwo",
"path": "core/modules/common/src/main/java/org/onetwo/common/xml/jaxb/JaxbMapper.java",
"license": "apache-2.0",
"size": 5760
} | [
"java.io.StringWriter",
"javax.xml.bind.JAXBException",
"org.onetwo.common.utils.LangUtils"
] | import java.io.StringWriter; import javax.xml.bind.JAXBException; import org.onetwo.common.utils.LangUtils; | import java.io.*; import javax.xml.bind.*; import org.onetwo.common.utils.*; | [
"java.io",
"javax.xml",
"org.onetwo.common"
] | java.io; javax.xml; org.onetwo.common; | 232,884 |
static public Vector<ScenarioObserver> importThisObserverList(final String fName, final java.io.InputStream is)
{
// create the new handler
final ASSETReaderWriter xr = new ASSETReaderWriter();
final Vector<ScenarioObserver> res = new Vector<ScenarioObserver>(0, 1);
| static Vector<ScenarioObserver> function(final String fName, final java.io.InputStream is) { final ASSETReaderWriter xr = new ASSETReaderWriter(); final Vector<ScenarioObserver> res = new Vector<ScenarioObserver>(0, 1); | /**
* handle the import of XML data, creating a new session for it
*/ | handle the import of XML data, creating a new session for it | importThisObserverList | {
"repo_name": "theanuradha/debrief",
"path": "org.mwc.asset.legacy/src/ASSET/Util/XML/ASSETReaderWriter.java",
"license": "epl-1.0",
"size": 15975
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 347,638 |
public void init() {
try {
M_log.info("init()");
} catch (Exception t) {
M_log.warn("init(): ", t);
}
getServices();
// Check to see if all out properties are defined
ArrayList<String> strings = foorm.checkI18NStrings(LTIService.TOOL_MODEL, rb);
for (String str : strings) {
M_log.warn(str... | void function() { try { M_log.info(STR); } catch (Exception t) { M_log.warn(STR, t); } getServices(); ArrayList<String> strings = foorm.checkI18NStrings(LTIService.TOOL_MODEL, rb); for (String str : strings) { M_log.warn(str + STR); } strings = foorm.checkI18NStrings(LTIService.CONTENT_MODEL, rb); for (String str : str... | /**
* Final initialization, once all dependencies are set.
*/ | Final initialization, once all dependencies are set | init | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "basiclti/basiclti-impl/src/java/org/sakaiproject/lti/impl/BaseLTIService.java",
"license": "apache-2.0",
"size": 27418
} | [
"java.util.ArrayList",
"org.sakaiproject.lti.api.LTIService"
] | import java.util.ArrayList; import org.sakaiproject.lti.api.LTIService; | import java.util.*; import org.sakaiproject.lti.api.*; | [
"java.util",
"org.sakaiproject.lti"
] | java.util; org.sakaiproject.lti; | 2,841,759 |
public static String getDirectoryAbsolutePath(final File dir) {
return dir.isDirectory() ? dir.getAbsolutePath() : dir.getParentFile().getAbsolutePath();
}
| static String function(final File dir) { return dir.isDirectory() ? dir.getAbsolutePath() : dir.getParentFile().getAbsolutePath(); } | /**
* Returns the absolute path of directory specified by dir,
* or its parent directory if dir specifies a file.
* @param dir The directory or its child file.
* @return The absolute path of directory specified by dir,
* or its parent directory if dir specifies a file.
*/ | Returns the absolute path of directory specified by dir, or its parent directory if dir specifies a file | getDirectoryAbsolutePath | {
"repo_name": "colinpalmer/dawnsci",
"path": "org.eclipse.dawnsci.remotedataset.test/src/org/eclipse/dawnsci/remotedataset/test/mock/FileUtils.java",
"license": "epl-1.0",
"size": 32437
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 301,583 |
public interface Listener {
void onMetadataUpdate(Cluster cluster, Set<String> unavailableTopics);
} | interface Listener { void function(Cluster cluster, Set<String> unavailableTopics); } | /**
* Callback invoked on metadata update.
*
* @param cluster the cluster containing metadata for topics with valid metadata
* @param unavailableTopics topics which are non-existent or have one or more partitions whose
* leader is not known
*/ | Callback invoked on metadata update | onMetadataUpdate | {
"repo_name": "ollie314/kafka",
"path": "clients/src/main/java/org/apache/kafka/clients/Metadata.java",
"license": "apache-2.0",
"size": 16934
} | [
"java.util.Set",
"org.apache.kafka.common.Cluster"
] | import java.util.Set; import org.apache.kafka.common.Cluster; | import java.util.*; import org.apache.kafka.common.*; | [
"java.util",
"org.apache.kafka"
] | java.util; org.apache.kafka; | 2,735,222 |
public void emitDirect(int taskId, String streamId, List<Object> tuple, Object messageId) {
delegate.emitDirect(taskId, streamId, tuple, messageId);
} | void function(int taskId, String streamId, List<Object> tuple, Object messageId) { delegate.emitDirect(taskId, streamId, tuple, messageId); } | /**
* Emits a tuple to the specified task on the specified output stream. This output
* stream must have been declared as a direct stream, and the specified task must
* use a direct grouping on this stream to receive the message. The emitted values must be
* immutable.
*/ | Emits a tuple to the specified task on the specified output stream. This output stream must have been declared as a direct stream, and the specified task must use a direct grouping on this stream to receive the message. The emitted values must be immutable | emitDirect | {
"repo_name": "twitter/heron",
"path": "storm-compatibility/v0.10.2/src/java/backtype/storm/spout/SpoutOutputCollector.java",
"license": "apache-2.0",
"size": 5646
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,747,432 |
private static void formatting(final String name, final String before)
throws ValidationException {
// @checkstyle MultipleStringLiterals (3 lines)
final String after = new Prettifier(before).prettify()
.replace("\r\n", "\n");
final String bnormalized = before.replace("\r... | static void function(final String name, final String before) throws ValidationException { final String after = new Prettifier(before).prettify() .replace("\r\n", "\n"); final String bnormalized = before.replace("\r\n", "\n"); final List<String> blines = Arrays.asList(bnormalized.split(XmlValidator.ESCAPED_EOL, -1)); fi... | /**
* Check formatting of given XML.
* @param name Name of XML file.
* @param before XML to check.
* @throws ValidationException In case of validation error.
*/ | Check formatting of given XML | formatting | {
"repo_name": "vkuchyn/qulice",
"path": "qulice-xml/src/main/java/com/qulice/xml/XmlValidator.java",
"license": "bsd-3-clause",
"size": 7397
} | [
"com.qulice.spi.ValidationException",
"java.util.Arrays",
"java.util.List",
"org.apache.commons.lang3.StringUtils"
] | import com.qulice.spi.ValidationException; import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.StringUtils; | import com.qulice.spi.*; import java.util.*; import org.apache.commons.lang3.*; | [
"com.qulice.spi",
"java.util",
"org.apache.commons"
] | com.qulice.spi; java.util; org.apache.commons; | 1,945,611 |
// TODO: We should add: ObjectMapper#getParentObjectMapper()
public ObjectMapper findParentObjectMapper(ObjectMapper objectMapper) {
int indexOfLastDot = objectMapper.fullPath().lastIndexOf('.');
if (indexOfLastDot != -1) {
String parentNestObjectPath = objectMapper.fullPath().substr... | ObjectMapper function(ObjectMapper objectMapper) { int indexOfLastDot = objectMapper.fullPath().lastIndexOf('.'); if (indexOfLastDot != -1) { String parentNestObjectPath = objectMapper.fullPath().substring(0, indexOfLastDot); return objectMappers().get(parentNestObjectPath); } else { return null; } } | /**
* Returns the parent {@link ObjectMapper} instance of the specified object mapper or <code>null</code> if there
* isn't any.
*/ | Returns the parent <code>ObjectMapper</code> instance of the specified object mapper or <code>null</code> if there isn't any | findParentObjectMapper | {
"repo_name": "zuoyebushiwo/ElasticSearch-Final",
"path": "src/main/java/org/elasticsearch/index/mapper/DocumentMapper.java",
"license": "apache-2.0",
"size": 28306
} | [
"org.elasticsearch.index.mapper.object.ObjectMapper"
] | import org.elasticsearch.index.mapper.object.ObjectMapper; | import org.elasticsearch.index.mapper.object.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 1,137,424 |
public boolean setFixedTilesAndReference( final int fixTilesIndex, final int mapBackIndex, final GlobalOptimizationType type )
{
final List< GlobalOptimizationSubset > subsets = type.getAllViewPairs();
//
// define fixed tiles
//
final Set< ViewId > fixedTiles = new HashSet< ViewId >();
if ( fixTilesI... | boolean function( final int fixTilesIndex, final int mapBackIndex, final GlobalOptimizationType type ) { final List< GlobalOptimizationSubset > subsets = type.getAllViewPairs(); if ( fixTilesIndex == 0 ) { for ( final GlobalOptimizationSubset subset : subsets ) { if ( subset.getViews().size() == 0 ) IOFunctions.println... | /**
* Assign the right fixed tiles and reference tiles for this type of optimization
*
* @param fixTilesIndex - "Fix first tile", "Select fixed tile", "Do not fix tiles"
* @param mapBackIndex - "Do not map back (use this if tiles are fixed)", "Map back to first tile using translation model", "Map back to first... | Assign the right fixed tiles and reference tiles for this type of optimization | setFixedTilesAndReference | {
"repo_name": "fiji/SPIM_Registration",
"path": "src/main/java/spim/fiji/plugin/Interest_Point_Registration.java",
"license": "gpl-2.0",
"size": 29263
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,103,372 |
public boolean containsAnyLiquid(AxisAlignedBB bb)
{
int i = MathHelper.floor_double(bb.minX);
int j = MathHelper.ceiling_double_int(bb.maxX);
int k = MathHelper.floor_double(bb.minY);
int l = MathHelper.ceiling_double_int(bb.maxY);
int i1 = MathHelper.floor_double(bb.min... | boolean function(AxisAlignedBB bb) { int i = MathHelper.floor_double(bb.minX); int j = MathHelper.ceiling_double_int(bb.maxX); int k = MathHelper.floor_double(bb.minY); int l = MathHelper.ceiling_double_int(bb.maxY); int i1 = MathHelper.floor_double(bb.minZ); int j1 = MathHelper.ceiling_double_int(bb.maxZ); BlockPos.Po... | /**
* Checks if any of the blocks within the aabb are liquids.
*/ | Checks if any of the blocks within the aabb are liquids | containsAnyLiquid | {
"repo_name": "danielyc/test-1.9.4",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/World.java",
"license": "gpl-3.0",
"size": 141454
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.math.AxisAlignedBB",
"net.minecraft.util.math.BlockPos",
"net.minecraft.util.math.MathHelper"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; | import net.minecraft.block.state.*; import net.minecraft.util.math.*; | [
"net.minecraft.block",
"net.minecraft.util"
] | net.minecraft.block; net.minecraft.util; | 1,463,003 |
private void beforeName() throws IOException {
JsonScope context = peek();
if (context == JsonScope.NONEMPTY_OBJECT) { // first in object
out.write(',');
} else if (context != JsonScope.EMPTY_OBJECT) { // not in an object!
throw new IllegalStateException("Nesting prob... | void function() throws IOException { JsonScope context = peek(); if (context == JsonScope.NONEMPTY_OBJECT) { out.write(','); } else if (context != JsonScope.EMPTY_OBJECT) { throw new IllegalStateException(STR + stack); } newline(); replaceTop(JsonScope.DANGLING_NAME); } | /**
* Inserts any necessary separators and whitespace before a name. Also
* adjusts the stack to expect the name's value.
*/ | Inserts any necessary separators and whitespace before a name. Also adjusts the stack to expect the name's value | beforeName | {
"repo_name": "axmadjon/AndroidSlidingMenu",
"path": "app/src/main/java/uz/greenwhite/slidingmenu/support/v10/json/android_json/JsonWriter.java",
"license": "apache-2.0",
"size": 16585
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,512,058 |
public void wipeDevice(String code, String data) {
String inputPin;
String savedPin =
Preference.getString(context,
resources.getString(R.string.shared_pref_pin));
try {
JSONObject wipeKey = new JSONObject(data);
inputPin = (String) wipeKey.get(resources.getString(R.string.s... | void function(String code, String data) { String inputPin; String savedPin = Preference.getString(context, resources.getString(R.string.shared_pref_pin)); try { JSONObject wipeKey = new JSONObject(data); inputPin = (String) wipeKey.get(resources.getString(R.string.shared_pref_pin)); String status; if (inputPin.trim().e... | /**
* Wipe the device.
* @param code - Operation code.
* @param data - Data required by the operation(PIN).
*/ | Wipe the device | wipeDevice | {
"repo_name": "ayyoob/product-iot-server",
"path": "modules/tools/mdm-android-agent-archetype/src/main/resources/archetype-resources/src/main/java/org/wso2/mdm/agent/services/Operation.java",
"license": "apache-2.0",
"size": 31674
} | [
"android.util.Log",
"android.widget.Toast",
"org.wso2.mdm.agent.utils.Preference"
] | import android.util.Log; import android.widget.Toast; import org.wso2.mdm.agent.utils.Preference; | import android.util.*; import android.widget.*; import org.wso2.mdm.agent.utils.*; | [
"android.util",
"android.widget",
"org.wso2.mdm"
] | android.util; android.widget; org.wso2.mdm; | 403,455 |
public void addUser(User user){
ArrayList<User> users = loadUsersFromFile();
if (userExists(user.getUsername(), user.getPassword()) == false) {
users.add(user);
saveToFile(users);
}
else {
Log.e("TOD", "Warning: tried to add user that already exist... | void function(User user){ ArrayList<User> users = loadUsersFromFile(); if (userExists(user.getUsername(), user.getPassword()) == false) { users.add(user); saveToFile(users); } else { Log.e("TOD", STR); } } | /**
* Adds a user to the local save file.
* @param user the user
*/ | Adds a user to the local save file | addUser | {
"repo_name": "CMPUT301W16T10/WhateverIsOkay",
"path": "app/src/main/java/com/example/suhussai/gameshare/LocalStorageAwareAppCompatActivity.java",
"license": "apache-2.0",
"size": 6202
} | [
"android.util.Log",
"java.util.ArrayList"
] | import android.util.Log; import java.util.ArrayList; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 1,018,705 |
@Advice.OnMethodExit
@SuppressFBWarnings(value = {"UC_USELESS_VOID_METHOD", "DLS_DEAD_LOCAL_STORE"}, justification = "Advice method serves as a template")
protected static void exit(@Advice.Return(readOnly = false, typing = Assigner.Typing.DYNAMIC) Object returned, @CachedReturnPlugin.CacheField Object cach... | @Advice.OnMethodExit @SuppressFBWarnings(value = {STR, STR}, justification = STR) static void function(@Advice.Return(readOnly = false, typing = Assigner.Typing.DYNAMIC) Object returned, @CachedReturnPlugin.CacheField Object cached) { if (returned == null) { returned = cached; } else { cached = returned; } } | /**
* The exit advice.
*
* @param returned The value that was returned by the method's execution or {@code 0} if it was not executed.
* @param cached The previously cached value or {@code 0} if no previous value exists.
*/ | The exit advice | exit | {
"repo_name": "DALDEI/byte-buddy",
"path": "byte-buddy-dep/src/precompiled/java/net/bytebuddy/build/CachedReturnPlugin$Object.java",
"license": "apache-2.0",
"size": 1571
} | [
"edu.umd.cs.findbugs.annotations.SuppressFBWarnings",
"net.bytebuddy.asm.Advice",
"net.bytebuddy.implementation.bytecode.assign.Assigner"
] | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import net.bytebuddy.asm.Advice; import net.bytebuddy.implementation.bytecode.assign.Assigner; | import edu.umd.cs.findbugs.annotations.*; import net.bytebuddy.asm.*; import net.bytebuddy.implementation.bytecode.assign.*; | [
"edu.umd.cs",
"net.bytebuddy.asm",
"net.bytebuddy.implementation"
] | edu.umd.cs; net.bytebuddy.asm; net.bytebuddy.implementation; | 345,887 |
@Override()
@NotNull()
String toString(); | @Override() @NotNull() String toString(); | /**
* Retrieves a string representation of this LDIF record. Note that it will
* be a single-line string representation and will therefore not be an LDIF
* representation.
*
* @return A string representation of this LDIF record.
*/ | Retrieves a string representation of this LDIF record. Note that it will be a single-line string representation and will therefore not be an LDIF representation | toString | {
"repo_name": "UnboundID/ldapsdk",
"path": "src/com/unboundid/ldif/LDIFRecord.java",
"license": "gpl-2.0",
"size": 7239
} | [
"com.unboundid.util.NotNull"
] | import com.unboundid.util.NotNull; | import com.unboundid.util.*; | [
"com.unboundid.util"
] | com.unboundid.util; | 1,492,599 |
public HttpServlet getServlet() {
return servlet;
} | HttpServlet function() { return servlet; } | /**
* The HTTP servlet.
*
* @return the servlet
*/ | The HTTP servlet | getServlet | {
"repo_name": "ROAMSYS/swaggerapi",
"path": "src/main/java/com/roamsys/swagger/data/SwaggerAPIContext.java",
"license": "mit",
"size": 1826
} | [
"javax.servlet.http.HttpServlet"
] | import javax.servlet.http.HttpServlet; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 567,603 |
public CollectionExpression buildCollectionExpression() {
List<AbstractExpression> children = new ArrayList<AbstractExpression>(1);
children.add((AbstractExpression) getSelectExpression());
List<Boolean> commas = new ArrayList<Boolean>(1);
commas.add(Boolean.FALSE);
List<B... | CollectionExpression function() { List<AbstractExpression> children = new ArrayList<AbstractExpression>(1); children.add((AbstractExpression) getSelectExpression()); List<Boolean> commas = new ArrayList<Boolean>(1); commas.add(Boolean.FALSE); List<Boolean> spaces = new ArrayList<Boolean>(1); spaces.add(Boolean.FALSE); ... | /**
* Creates a new {@link CollectionExpression} that will wrap the single select item.
*
* @return The single select item represented by a temporary collection
*/ | Creates a new <code>CollectionExpression</code> that will wrap the single select item | buildCollectionExpression | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa.jpql/src/org/eclipse/persistence/jpa/jpql/parser/AbstractSelectClause.java",
"license": "epl-1.0",
"size": 8836
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,653,663 |
public static FileInfo getDefaultFloat32BigEndianFileInfo(Grid1D grid){
FileInfo fI = new FileInfo();
fI.fileFormat = FileInfo.RAW;
fI.fileType = FileInfo.GRAY32_FLOAT;
fI.height = 1;
fI.width = grid.getSize()[0];
fI.nImages = 1;
fI.intelByteOrder = false;
fI.directory = "";
fI.fileName = "";
ret... | static FileInfo function(Grid1D grid){ FileInfo fI = new FileInfo(); fI.fileFormat = FileInfo.RAW; fI.fileType = FileInfo.GRAY32_FLOAT; fI.height = 1; fI.width = grid.getSize()[0]; fI.nImages = 1; fI.intelByteOrder = false; fI.directory = STR"; return fI; } | /**
* The default float 32, big endian format for CONRAD.
* @param grid the 1D grid to process
* @return the FileInfo object
*/ | The default float 32, big endian format for CONRAD | getDefaultFloat32BigEndianFileInfo | {
"repo_name": "YixingHuang/CONRAD",
"path": "src/edu/stanford/rsl/conrad/io/GridRawIOUtil.java",
"license": "gpl-3.0",
"size": 9126
} | [
"edu.stanford.rsl.conrad.data.numeric.Grid1D"
] | import edu.stanford.rsl.conrad.data.numeric.Grid1D; | import edu.stanford.rsl.conrad.data.numeric.*; | [
"edu.stanford.rsl"
] | edu.stanford.rsl; | 423,516 |
private void autoconnect() {
// If we don't have any servers to go with.
if( Atomic.getInstance().getServersAsArrayList().size() < 1 )
return;
// Or we've done this already
if( !doAutoconnect.getValue() )
return;
// We don't need to get this far.
// Are we connected to the greater... | void function() { if( Atomic.getInstance().getServersAsArrayList().size() < 1 ) return; if( !doAutoconnect.getValue() ) return; NetworkInfo ninf = ((ConnectivityManager)(this.getSystemService(Service.CONNECTIVITY_SERVICE))).getActiveNetworkInfo(); if( ninf == null ninf.getState() != NetworkInfo.State.CONNECTED ) { Toas... | /**
* Do the autoconnect stuff
*/ | Do the autoconnect stuff | autoconnect | {
"repo_name": "14mRh4X0r/Atomic",
"path": "application/src/main/java/indrora/atomic/activity/ServersActivity.java",
"license": "gpl-3.0",
"size": 12699
} | [
"android.app.Service",
"android.net.ConnectivityManager",
"android.net.NetworkInfo",
"android.util.Log",
"android.widget.Toast"
] | import android.app.Service; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.util.Log; import android.widget.Toast; | import android.app.*; import android.net.*; import android.util.*; import android.widget.*; | [
"android.app",
"android.net",
"android.util",
"android.widget"
] | android.app; android.net; android.util; android.widget; | 1,654,280 |
public TreeItem insertItem(int beforeIndex, SafeHtml itemHtml) {
return root.insertItem(beforeIndex, itemHtml);
} | TreeItem function(int beforeIndex, SafeHtml itemHtml) { return root.insertItem(beforeIndex, itemHtml); } | /**
* Inserts a child tree item at the specified index containing the specified
* html.
*
* @param beforeIndex the index where the item will be inserted
* @param itemHtml the html of the item to be added
* @return the item that was added
* @throws IndexOutOfBoundsException if the index is out of ra... | Inserts a child tree item at the specified index containing the specified html | insertItem | {
"repo_name": "syntelos/gwtcc",
"path": "src/com/google/gwt/user/client/ui/Tree.java",
"license": "apache-2.0",
"size": 41667
} | [
"com.google.gwt.safehtml.shared.SafeHtml"
] | import com.google.gwt.safehtml.shared.SafeHtml; | import com.google.gwt.safehtml.shared.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,250,040 |
@CanIgnoreReturnValue
@Deprecated
@Override
public final boolean removeIf(Predicate<? super E> filter) {
throw new UnsupportedOperationException();
} | final boolean function(Predicate<? super E> filter) { throw new UnsupportedOperationException(); } | /**
* Guaranteed to throw an exception and leave the collection unmodified.
*
* @throws UnsupportedOperationException always
* @deprecated Unsupported operation.
*/ | Guaranteed to throw an exception and leave the collection unmodified | removeIf | {
"repo_name": "EdwardLee03/guava",
"path": "guava/src/com/google/common/collect/ImmutableCollection.java",
"license": "apache-2.0",
"size": 17092
} | [
"java.util.function.Predicate"
] | import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 269,476 |
private Element createDataSourceElement(Document doc, String id,
String name, String url, String type, String display,
boolean visible, boolean editable, String blur, String color) {
// Set rootElement to "DataSource"
Element rootElement = doc.createElement("datasource");
// add attribute id to rootElem... | Element function(Document doc, String id, String name, String url, String type, String display, boolean visible, boolean editable, String blur, String color) { Element rootElement = doc.createElement(STR); rootElement.setAttribute("id", id); Element nameElement = doc.createElement("name"); nameElement.appendChild(doc.c... | /**
* Creates a XML Element in this form:
*
* <pre>
* <datasource id="0">
* <name></name>
* <url></url>
* <type></type>
* <display></display>
* <visible></visible>
* <blur></blur>
* </datasource>
* </pre>
*
* @param doc
* The XML Document to create the Element
* @param... | Creates a XML Element in this form: <code> </code> | createDataSourceElement | {
"repo_name": "pokerazor/mixare",
"path": "src/org/mixare/data/DataSourceStorage.java",
"license": "gpl-3.0",
"size": 13428
} | [
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,325,401 |
public ViewObjectImpl getAlbumsView1() {
return (ViewObjectImpl) findViewObject("AlbumsView1");
} | ViewObjectImpl function() { return (ViewObjectImpl) findViewObject(STR); } | /**
* Container's getter for AlbumsView1.
* @return AlbumsView1
*/ | Container's getter for AlbumsView1 | getAlbumsView1 | {
"repo_name": "lucasjellema/APM-Demo-App-WorldView",
"path": "Model/src/nl/amis/world/model/SoaringProposalServiceImpl.java",
"license": "apache-2.0",
"size": 2581
} | [
"oracle.jbo.server.ViewObjectImpl"
] | import oracle.jbo.server.ViewObjectImpl; | import oracle.jbo.server.*; | [
"oracle.jbo.server"
] | oracle.jbo.server; | 1,040,033 |
@Override
public void endAttributes()
throws JspParseException
{
} | void function() throws JspParseException { } | /**
* Called after all the attributes from the tag.
*/ | Called after all the attributes from the tag | endAttributes | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/jsp/java/JstlCoreWhen.java",
"license": "gpl-2.0",
"size": 3695
} | [
"com.caucho.jsp.JspParseException"
] | import com.caucho.jsp.JspParseException; | import com.caucho.jsp.*; | [
"com.caucho.jsp"
] | com.caucho.jsp; | 2,631,069 |
@SuppressWarnings("deprecation")
private String makeDeathMessage(Attack attack, EntityDamageEvent.DamageCause damageCause) {
String attackerText;
Client victim = Client.getClient(attack.victim);
String victimText = victim.getTeam().getColor() + attack.victim.getName();
ChatColor c = ChatColor.GRAY;
if (at... | @SuppressWarnings(STR) String function(Attack attack, EntityDamageEvent.DamageCause damageCause) { String attackerText; Client victim = Client.getClient(attack.victim); String victimText = victim.getTeam().getColor() + attack.victim.getName(); ChatColor c = ChatColor.GRAY; if (attack.attacker instanceof Player) { Clien... | /**
* Generates a death message based on the various circumstances of a falling
* kill.
*
* @param attack
* The fall that resulted in a kill
* @param damageCause
* The final cause of death
* @return A text message describing the kill
*/ | Generates a death message based on the various circumstances of a falling kill | makeDeathMessage | {
"repo_name": "ProjectRixor/Rixor",
"path": "src/main/java/com/projectrixor/rixor/scrimmage/tracker/GravityKillTracker.java",
"license": "mit",
"size": 25364
} | [
"com.projectrixor.rixor.scrimmage.player.Client",
"org.bukkit.ChatColor",
"org.bukkit.entity.Player",
"org.bukkit.event.entity.EntityDamageEvent"
] | import com.projectrixor.rixor.scrimmage.player.Client; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.event.entity.EntityDamageEvent; | import com.projectrixor.rixor.scrimmage.player.*; import org.bukkit.*; import org.bukkit.entity.*; import org.bukkit.event.entity.*; | [
"com.projectrixor.rixor",
"org.bukkit",
"org.bukkit.entity",
"org.bukkit.event"
] | com.projectrixor.rixor; org.bukkit; org.bukkit.entity; org.bukkit.event; | 436,724 |
protected void handleDirectoryEnd(final File directory, final int depth, final Collection<T> results) throws IOException {
// do nothing - overridable by subclass
} | void function(final File directory, final int depth, final Collection<T> results) throws IOException { } | /**
* Overridable callback method invoked at the end of processing each directory.
* <p>
* This implementation does nothing.
*
* @param directory the directory being processed
* @param depth the current directory level (starting directory = 0)
* @param results the collection of res... | Overridable callback method invoked at the end of processing each directory. This implementation does nothing | handleDirectoryEnd | {
"repo_name": "stereokrauts/stereoscope",
"path": "org.apache.commons.io/src/main/java/org/apache/commons/io/DirectoryWalker.java",
"license": "gpl-2.0",
"size": 26008
} | [
"java.io.File",
"java.io.IOException",
"java.util.Collection"
] | import java.io.File; import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,269,096 |
public static MozuClient<com.mozu.api.contracts.adminuser.TenantAdminUserAuthTicket> createUserAuthTicketClient(com.mozu.api.contracts.core.UserAuthInfo userAuthInfo) throws Exception
{
return createUserAuthTicketClient( userAuthInfo, null, null);
} | static MozuClient<com.mozu.api.contracts.adminuser.TenantAdminUserAuthTicket> function(com.mozu.api.contracts.core.UserAuthInfo userAuthInfo) throws Exception { return createUserAuthTicketClient( userAuthInfo, null, null); } | /**
* Creates an authentication ticket for the supplied user to specify in API requests associated with the supplied tenant.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.adminuser.TenantAdminUserAuthTicket> mozuClient=CreateUserAuthTicketClient( userAuthInfo);
* client.setBaseAddress(url);
* client.ex... | Creates an authentication ticket for the supplied user to specify in API requests associated with the supplied tenant. <code><code> MozuClient mozuClient=CreateUserAuthTicketClient( userAuthInfo); client.setBaseAddress(url); client.executeRequest(); TenantAdminUserAuthTicket tenantAdminUserAuthTicket = client.Result();... | createUserAuthTicketClient | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/platform/adminuser/TenantAdminUserAuthTicketClient.java",
"license": "mit",
"size": 7271
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,355,539 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<VpnClientConnectionHealthDetailListResultInner> getVpnclientConnectionHealthAsync(
String resourceGroupName, String virtualNetworkGatewayName); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<VpnClientConnectionHealthDetailListResultInner> getVpnclientConnectionHealthAsync( String resourceGroupName, String virtualNetworkGatewayName); | /**
* Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified
* resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayName The name of the virtual network gateway.
* @throws Illeg... | Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group | getVpnclientConnectionHealthAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java",
"license": "mit",
"size": 135947
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.network.fluent.models.VpnClientConnectionHealthDetailListResultInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.network.fluent.models.VpnClientConnectionHealthDetailListResultInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,644,802 |
public PaddingConfig getPadding()
{
return this.padding;
} //-- PaddingConfig getPadding() | PaddingConfig function() { return this.padding; } | /**
* Get sets paddings of the chart content<br /><br /><a
* href="http://docs.webix.com/api__link__ui.datasuggest_padding_config.html">Webix
* API Reference</a>
*
* @return PaddingConfig
*/ | Get sets paddings of the chart contentWebix API Reference | getPadding | {
"repo_name": "zhv/webix-api",
"path": "src/main/java/com/webix/ui/model/context/Datasuggest.java",
"license": "bsd-3-clause",
"size": 24253
} | [
"com.webix.ui.model.PaddingConfig"
] | import com.webix.ui.model.PaddingConfig; | import com.webix.ui.model.*; | [
"com.webix.ui"
] | com.webix.ui; | 614,047 |
public Node lastNode(Node node)
{
return node;
} | Node function(Node node) { return node; } | /**
* Returns the last node in the selection order.
*
* @param node the current node
*
* @return the last node
*/ | Returns the last node in the selection order | lastNode | {
"repo_name": "christianchristensen/resin",
"path": "modules/kernel/src/com/caucho/xpath/pattern/FromPrevious.java",
"license": "gpl-2.0",
"size": 6090
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 374,745 |
public Period periodUntil(final DateConstraint other) {
if (equals(other)) {
return Period.ZERO;
} else if (other instanceof PlusMinusPeriodDateConstraint) {
return ((PlusMinusPeriodDateConstraint) other).periodUntil(this).negated();
} else {
throw new IllegalArgumentException(other + " ... | Period function(final DateConstraint other) { if (equals(other)) { return Period.ZERO; } else if (other instanceof PlusMinusPeriodDateConstraint) { return ((PlusMinusPeriodDateConstraint) other).periodUntil(this).negated(); } else { throw new IllegalArgumentException(other + STR + this); } } | /**
* Approximates the period difference between two constraints, that is the period that must be added to this constraint to get the same value as the other
* one.
*
* @param other
* the other constraint, not null
* @return the difference as a period, not null
* @throws IllegalArgumentExc... | Approximates the period difference between two constraints, that is the period that must be added to this constraint to get the same value as the other one | periodUntil | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/main/java/com/opengamma/financial/analytics/timeseries/DateConstraint.java",
"license": "apache-2.0",
"size": 18955
} | [
"org.threeten.bp.Period"
] | import org.threeten.bp.Period; | import org.threeten.bp.*; | [
"org.threeten.bp"
] | org.threeten.bp; | 1,202,893 |
HsqlName getSchemaHsqlName(String name) {
return name == null ? currentSchema
: database.schemaManager.getSchemaHsqlName(name);
} | HsqlName getSchemaHsqlName(String name) { return name == null ? currentSchema : database.schemaManager.getSchemaHsqlName(name); } | /**
* If schemaName is null, return the current schema name, else return
* the HsqlName object for the schema. If schemaName does not exist,
* throw.
*/ | If schemaName is null, return the current schema name, else return the HsqlName object for the schema. If schemaName does not exist, throw | getSchemaHsqlName | {
"repo_name": "kumarrus/voltdb",
"path": "src/hsqldb19b3/org/hsqldb_voltpatches/Session.java",
"license": "agpl-3.0",
"size": 60910
} | [
"org.hsqldb_voltpatches.HsqlNameManager"
] | import org.hsqldb_voltpatches.HsqlNameManager; | import org.hsqldb_voltpatches.*; | [
"org.hsqldb_voltpatches"
] | org.hsqldb_voltpatches; | 2,193,126 |
@Named("health_monitor:get")
@GET
@Path("/health_monitors/{id}")
@SelectJson("health_monitor")
@Fallback(NullOnNotFoundOr404.class)
@Nullable
HealthMonitor getHealthMonitor(@PathParam("id") String id); | @Named(STR) @Path(STR) @SelectJson(STR) @Fallback(NullOnNotFoundOr404.class) HealthMonitor getHealthMonitor(@PathParam("id") String id); | /**
* Returns the details for a specific HealthMonitor.
*
* @param id the id of the HealthMonitor to return.
* @return Health Monitor or null if not found.
*/ | Returns the details for a specific HealthMonitor | getHealthMonitor | {
"repo_name": "asankasanjaya/stratos",
"path": "dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/extensions/lbaas/v1/LBaaSApi.java",
"license": "apache-2.0",
"size": 14416
} | [
"javax.inject.Named",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"org.jclouds.Fallbacks",
"org.jclouds.openstack.neutron.v2.domain.lbaas.v1.HealthMonitor",
"org.jclouds.rest.annotations.Fallback",
"org.jclouds.rest.annotations.SelectJson"
] | import javax.inject.Named; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.jclouds.Fallbacks; import org.jclouds.openstack.neutron.v2.domain.lbaas.v1.HealthMonitor; import org.jclouds.rest.annotations.Fallback; import org.jclouds.rest.annotations.SelectJson; | import javax.inject.*; import javax.ws.rs.*; import org.jclouds.*; import org.jclouds.openstack.neutron.v2.domain.lbaas.v1.*; import org.jclouds.rest.annotations.*; | [
"javax.inject",
"javax.ws",
"org.jclouds",
"org.jclouds.openstack",
"org.jclouds.rest"
] | javax.inject; javax.ws; org.jclouds; org.jclouds.openstack; org.jclouds.rest; | 2,603,914 |
public Observable<ServiceResponse<Void>> beginStopWithServiceResponseAsync(String resourceGroupName, String jobName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (r... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String jobName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (jobName == null) { throw new IllegalArgumentException(STR); } if (... | /**
* Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @p... | Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output | beginStopWithServiceResponseAsync | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java",
"license": "mit",
"size": 143599
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,389,133 |
@Test
public void testSlopOnDelayedFailingAsyncPut_2_1_1() {
String key = "a";
String val = "xyz";
Versioned<byte[]> versionedVal = new Versioned<byte[]>(val.getBytes());
ByteArray keyByteArray = new ByteArray(key.getBytes());
List<Integer> failingNodeIdList = null;
... | void function() { String key = "a"; String val = "xyz"; Versioned<byte[]> versionedVal = new Versioned<byte[]>(val.getBytes()); ByteArray keyByteArray = new ByteArray(key.getBytes()); List<Integer> failingNodeIdList = null; REPLICATION_FACTOR = 2; P_READS = 1; R_READS = 1; P_WRITES = 1; R_WRITES = 1; try { failingNodeI... | /**
* Test to ensure that when an asynchronous put completes (with a failure)
* after PerformParallelPut has finished processing the responses and before
* the hinted handoff actually begins, a slop is still registered for the
* same.
*
* This is for the 2-1-1 configuration.
*/ | Test to ensure that when an asynchronous put completes (with a failure) after PerformParallelPut has finished processing the responses and before the hinted handoff actually begins, a slop is still registered for the same. This is for the 2-1-1 configuration | testSlopOnDelayedFailingAsyncPut_2_1_1 | {
"repo_name": "medallia/voldemort",
"path": "test/unit/voldemort/store/routed/HintedHandoffFailureTest.java",
"license": "apache-2.0",
"size": 35706
} | [
"com.google.common.collect.Sets",
"java.util.List",
"java.util.Set",
"org.junit.Assert"
] | import com.google.common.collect.Sets; import java.util.List; import java.util.Set; import org.junit.Assert; | import com.google.common.collect.*; import java.util.*; import org.junit.*; | [
"com.google.common",
"java.util",
"org.junit"
] | com.google.common; java.util; org.junit; | 866,668 |
ArtifactRoot getCoverageMetadataDirectory() {
return coverageDirectory;
} | ArtifactRoot getCoverageMetadataDirectory() { return coverageDirectory; } | /**
* Returns the directory where coverage-related artifacts and metadata files should be stored.
* This includes for example uninstrumented class files needed for Jacoco's coverage reporting
* tools.
*/ | Returns the directory where coverage-related artifacts and metadata files should be stored. This includes for example uninstrumented class files needed for Jacoco's coverage reporting tools | getCoverageMetadataDirectory | {
"repo_name": "aehlig/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/config/OutputDirectories.java",
"license": "apache-2.0",
"size": 10313
} | [
"com.google.devtools.build.lib.actions.ArtifactRoot"
] | import com.google.devtools.build.lib.actions.ArtifactRoot; | import com.google.devtools.build.lib.actions.*; | [
"com.google.devtools"
] | com.google.devtools; | 958,337 |
@Test
public final void testSetRFDataNullData() {
// Setup the resources for the test.
byte[] origData = new byte[]{0x68, 0x6F, 0x6C, 0x61};
byte[] data = null;
GenericXBeePacket packet = new GenericXBeePacket(origData);
// Call the method under test.
packet.setRFData(data);
byte[] result = pack... | final void function() { byte[] origData = new byte[]{0x68, 0x6F, 0x6C, 0x61}; byte[] data = null; GenericXBeePacket packet = new GenericXBeePacket(origData); packet.setRFData(data); byte[] result = packet.getRFData(); assertThat(STR, result, is(equalTo(data))); assertThat(STR, result, is(nullValue(byte[].class))); } | /**
* Test method for {@link com.digi.xbee.api.packet.GenericXBeePacket#setRFData(byte[])}.
*/ | Test method for <code>com.digi.xbee.api.packet.GenericXBeePacket#setRFData(byte[])</code> | testSetRFDataNullData | {
"repo_name": "brucetsao/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/packet/GenericXBeePacketTest.java",
"license": "mpl-2.0",
"size": 13989
} | [
"com.digi.xbee.api.packet.GenericXBeePacket",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import com.digi.xbee.api.packet.GenericXBeePacket; import org.hamcrest.core.Is; import org.junit.Assert; | import com.digi.xbee.api.packet.*; import org.hamcrest.core.*; import org.junit.*; | [
"com.digi.xbee",
"org.hamcrest.core",
"org.junit"
] | com.digi.xbee; org.hamcrest.core; org.junit; | 759,999 |
@SuppressWarnings("unchecked")
private static Map<String, String> getCurrentUsers(HttpSession httpSession) {
Map<String, String> currentUsers = (Map<String, String>) httpSession.getServletContext().getAttribute(
WebConstants.CURRENT_USERS);
if (currentUsers == null) {
currentUsers = init(httpSessi... | @SuppressWarnings(STR) static Map<String, String> function(HttpSession httpSession) { Map<String, String> currentUsers = (Map<String, String>) httpSession.getServletContext().getAttribute( WebConstants.CURRENT_USERS); if (currentUsers == null) { currentUsers = init(httpSession.getServletContext()); } return currentUser... | /**
* Get the current list of map of users stored in the session
*
* @param httpSession the current session
* @return map of users logged in
*/ | Get the current list of map of users stored in the session | getCurrentUsers | {
"repo_name": "Bhamni/openmrs-core",
"path": "web/src/main/java/org/openmrs/web/user/CurrentUsers.java",
"license": "mpl-2.0",
"size": 3697
} | [
"java.util.Map",
"javax.servlet.http.HttpSession",
"org.openmrs.web.WebConstants"
] | import java.util.Map; import javax.servlet.http.HttpSession; import org.openmrs.web.WebConstants; | import java.util.*; import javax.servlet.http.*; import org.openmrs.web.*; | [
"java.util",
"javax.servlet",
"org.openmrs.web"
] | java.util; javax.servlet; org.openmrs.web; | 1,451,739 |
boolean buildCompleted = true;
// Use Rhino's global object's as prototype for top scope because
// logger.js assumes access to "print" function.
Global global = new Global();
Context cx = ContextFactory.getGlobal().enterContext();
global.init(cx);
// Set up standard scripts objects
Scriptable t... | boolean buildCompleted = true; Global global = new Global(); Context cx = ContextFactory.getGlobal().enterContext(); global.init(cx); Scriptable topScope = cx.initStandardObjects(global); cx.getWrapFactory().setJavaPrimitiveWrap(false); try { String moduleLoaderScript = readModuleLoaderSource(); Script moduleLoader = c... | /**
* Initiate the build process for the profile given. Will try to execute
* the JS build system scripts for this profile, reporting whether it
* executed successfully.
*
* @return Build completed successfully
*/ | Initiate the build process for the profile given. Will try to execute the JS build system scripts for this profile, reporting whether it executed successfully | executeBuild | {
"repo_name": "aguadev/aguadev",
"path": "html/dojo-1.8.3/dwb/src/main/java/org/dtk/resources/build/ProfileBuilder.java",
"license": "mit",
"size": 5850
} | [
"org.mozilla.javascript.Context",
"org.mozilla.javascript.ContextFactory",
"org.mozilla.javascript.Script",
"org.mozilla.javascript.Scriptable",
"org.mozilla.javascript.ScriptableObject",
"org.mozilla.javascript.tools.shell.Global"
] | import org.mozilla.javascript.Context; import org.mozilla.javascript.ContextFactory; import org.mozilla.javascript.Script; import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; import org.mozilla.javascript.tools.shell.Global; | import org.mozilla.javascript.*; import org.mozilla.javascript.tools.shell.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 2,886,955 |
public CognitiveServicesAccountCreateParameters withTags(Map<String, String> tags) {
this.tags = tags;
return this;
} | CognitiveServicesAccountCreateParameters function(Map<String, String> tags) { this.tags = tags; return this; } | /**
* Set the tags value.
*
* @param tags the tags value to set
* @return the CognitiveServicesAccountCreateParameters object itself.
*/ | Set the tags value | withTags | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/CognitiveServicesAccountCreateParameters.java",
"license": "mit",
"size": 4537
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 972,963 |
void postUnassign(final ObserverContext<MasterCoprocessorEnvironment> ctx,
final HRegionInfo regionInfo, final boolean force) throws IOException; | void postUnassign(final ObserverContext<MasterCoprocessorEnvironment> ctx, final HRegionInfo regionInfo, final boolean force) throws IOException; | /**
* Called after the region unassignment has been requested.
* @param ctx the environment to interact with the framework and master
* @param regionInfo
* @param force whether to force unassignment or not
*/ | Called after the region unassignment has been requested | postUnassign | {
"repo_name": "daidong/DominoHBase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java",
"license": "apache-2.0",
"size": 21042
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HRegionInfo"
] | import java.io.IOException; import org.apache.hadoop.hbase.HRegionInfo; | import java.io.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 459,994 |
protected void addTestHooks(BaseTestResult result) {
result.addSkipCheck(new MinAndroidSdkLevelSkipCheck());
result.addSkipCheck(new RestrictionSkipCheck(getTargetContext()));
result.addSkipCheck(new DisableIfSkipCheck());
} | void function(BaseTestResult result) { result.addSkipCheck(new MinAndroidSdkLevelSkipCheck()); result.addSkipCheck(new RestrictionSkipCheck(getTargetContext())); result.addSkipCheck(new DisableIfSkipCheck()); } | /**
* Override this method to register hooks and checks to be run for each test. Make sure to call
* the base implementation if you do so.
*
* @see BaseTestResult#addSkipCheck(BaseTestResult.SkipCheck)
* @see BaseTestResult#addPreTestHook(BaseTestResult.PreTestHook)
*/ | Override this method to register hooks and checks to be run for each test. Make sure to call the base implementation if you do so | addTestHooks | {
"repo_name": "danakj/chromium",
"path": "base/test/android/javatests/src/org/chromium/base/test/BaseInstrumentationTestRunner.java",
"license": "bsd-3-clause",
"size": 2669
} | [
"org.chromium.base.test.util.DisableIfSkipCheck",
"org.chromium.base.test.util.MinAndroidSdkLevelSkipCheck",
"org.chromium.base.test.util.RestrictionSkipCheck"
] | import org.chromium.base.test.util.DisableIfSkipCheck; import org.chromium.base.test.util.MinAndroidSdkLevelSkipCheck; import org.chromium.base.test.util.RestrictionSkipCheck; | import org.chromium.base.test.util.*; | [
"org.chromium.base"
] | org.chromium.base; | 1,362,317 |
void customize(EntityManagerFactoryBuilder builder); | void customize(EntityManagerFactoryBuilder builder); | /**
* Customize the given {@code builder}.
* @param builder the builder to customize
*/ | Customize the given builder | customize | {
"repo_name": "lburgazzoli/spring-boot",
"path": "spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryBuilderCustomizer.java",
"license": "apache-2.0",
"size": 1146
} | [
"org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder"
] | import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; | import org.springframework.boot.orm.jpa.*; | [
"org.springframework.boot"
] | org.springframework.boot; | 1,539,379 |
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void createTestDataInNewTransactionWithCheckedException(TestData testData)
throws TestJPAServiceException
{
createTestData(testData);
throw new TestJPAServiceException("Failed with a checked exception in a new transaction");
} | @Transactional(propagation = Propagation.REQUIRES_NEW) void function(TestData testData) throws TestJPAServiceException { createTestData(testData); throw new TestJPAServiceException(STR); } | /**
* Create the test data in a new transaction with a checked exception.
*
* @param testData the test data
*/ | Create the test data in a new transaction with a checked exception | createTestDataInNewTransactionWithCheckedException | {
"repo_name": "marcusportmann/mmp-java",
"path": "src/mmp-application/src/test/java/guru/mmp/application/test/TestJPAService.java",
"license": "apache-2.0",
"size": 6056
} | [
"org.springframework.transaction.annotation.Propagation",
"org.springframework.transaction.annotation.Transactional"
] | import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.*; | [
"org.springframework.transaction"
] | org.springframework.transaction; | 1,346,740 |
@Type(type="org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime")
@Basic( optional = true )
@Column( name = "date_created" )
public LocalDateTime getDateCreated() {
return this.dateCreated;
} | @Type(type=STR) @Basic( optional = true ) @Column( name = STR ) LocalDateTime function() { return this.dateCreated; } | /**
* Return the value associated with the column: dateCreated.
* @return A LocalDateTime object (this.dateCreated)
*/ | Return the value associated with the column: dateCreated | getDateCreated | {
"repo_name": "servinglynk/servinglynk-hmis",
"path": "bed-inventory/src/main/java/com/servinglynk/hmis/entity/ClientEntity.java",
"license": "mpl-2.0",
"size": 5955
} | [
"java.time.LocalDateTime",
"javax.persistence.Basic",
"javax.persistence.Column",
"org.hibernate.annotations.Type"
] | import java.time.LocalDateTime; import javax.persistence.Basic; import javax.persistence.Column; import org.hibernate.annotations.Type; | import java.time.*; import javax.persistence.*; import org.hibernate.annotations.*; | [
"java.time",
"javax.persistence",
"org.hibernate.annotations"
] | java.time; javax.persistence; org.hibernate.annotations; | 1,387,909 |
public String cpfAsText(CpfOptions options) {
long cpf = cpf();
String unmasked = new DecimalFormat("00000000000").format(cpf);
switch (options) {
case masked:
return Cpf.format(unmasked);
case unmasked:
return unmasked;
def... | String function(CpfOptions options) { long cpf = cpf(); String unmasked = new DecimalFormat(STR).format(cpf); switch (options) { case masked: return Cpf.format(unmasked); case unmasked: return unmasked; default: throw new AssertionError(); } } | /**
* Return a random valid Brazilian CPF, either unmasked (00000000000) or
* masked (000.000.000-00).
* <pre>
* chance.cpfAsText(CpfOptions.masked);
* => "506.385.808-20"
* chance.cpfAsText(CpfOptions.ummasked);
* => "50638580820"
* </pre>
*
* @param options Masked or ... | Return a random valid Brazilian CPF, either unmasked (00000000000) or masked (000.000.000-00). <code> chance.cpfAsText(CpfOptions.masked); => "506.385.808-20" chance.cpfAsText(CpfOptions.ummasked); => "50638580820" </code> | cpfAsText | {
"repo_name": "open-fidias/chance4j",
"path": "src/main/java/br/com/fidias/chance4j/Chance.java",
"license": "gpl-3.0",
"size": 58799
} | [
"br.com.fidias.chance4j.person.Cpf",
"br.com.fidias.chance4j.person.CpfOptions",
"java.text.DecimalFormat"
] | import br.com.fidias.chance4j.person.Cpf; import br.com.fidias.chance4j.person.CpfOptions; import java.text.DecimalFormat; | import br.com.fidias.chance4j.person.*; import java.text.*; | [
"br.com.fidias",
"java.text"
] | br.com.fidias; java.text; | 750,778 |
protected androidx.media2.common.MediaMetadata getMetadata(MediaItem exoPlayerMediaItem) {
@Nullable CharSequence title = exoPlayerMediaItem.mediaMetadata.title;
androidx.media2.common.MediaMetadata.Builder metadataBuilder =
new androidx.media2.common.MediaMetadata.Builder()
.putString(ME... | androidx.media2.common.MediaMetadata function(MediaItem exoPlayerMediaItem) { @Nullable CharSequence title = exoPlayerMediaItem.mediaMetadata.title; androidx.media2.common.MediaMetadata.Builder metadataBuilder = new androidx.media2.common.MediaMetadata.Builder() .putString(METADATA_KEY_MEDIA_ID, exoPlayerMediaItem.medi... | /**
* Returns a {@link androidx.media2.common.MediaMetadata} corresponding to the given {@link
* MediaItem ExoPlayer MediaItem}.
*/ | Returns a <code>androidx.media2.common.MediaMetadata</code> corresponding to the given <code>MediaItem ExoPlayer MediaItem</code> | getMetadata | {
"repo_name": "google/ExoPlayer",
"path": "extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/DefaultMediaItemConverter.java",
"license": "apache-2.0",
"size": 5722
} | [
"androidx.annotation.Nullable",
"com.google.android.exoplayer2.MediaItem",
"com.google.android.exoplayer2.MediaMetadata"
] | import androidx.annotation.Nullable; import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.MediaMetadata; | import androidx.annotation.*; import com.google.android.exoplayer2.*; | [
"androidx.annotation",
"com.google.android"
] | androidx.annotation; com.google.android; | 1,198,668 |
public static Set<String> getCountEnabledUserStores() throws UserStoreCounterException {
RealmConfiguration realmConfiguration;
Set<String> userStoreList = new HashSet<>();
try {
realmConfiguration = CarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguratio... | static Set<String> function() throws UserStoreCounterException { RealmConfiguration realmConfiguration; Set<String> userStoreList = new HashSet<>(); try { realmConfiguration = CarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration(); while (realmConfiguration != null) { if (!Boolean.valueOf(re... | /**
* Get the domain names of user stores which has count functionality enabled
*
* @return
*/ | Get the domain names of user stores which has count functionality enabled | getCountEnabledUserStores | {
"repo_name": "PasinduTennage/carbon-identity-framework",
"path": "components/user-store/org.wso2.carbon.identity.user.store.count/src/main/java/org/wso2/carbon/identity/user/store/count/util/UserStoreCountUtils.java",
"license": "apache-2.0",
"size": 9797
} | [
"java.util.HashSet",
"java.util.Set",
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.context.CarbonContext",
"org.wso2.carbon.identity.user.store.count.exception.UserStoreCounterException",
"org.wso2.carbon.user.api.RealmConfiguration",
"org.wso2.carbon.user.api.UserStoreException",
"org.wso2... | import java.util.HashSet; import java.util.Set; import org.apache.commons.lang.StringUtils; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.identity.user.store.count.exception.UserStoreCounterException; import org.wso2.carbon.user.api.RealmConfiguration; import org.wso2.carbon.user.api.UserStoreExc... | import java.util.*; import org.apache.commons.lang.*; import org.wso2.carbon.context.*; import org.wso2.carbon.identity.user.store.count.exception.*; import org.wso2.carbon.user.api.*; import org.wso2.carbon.user.core.*; | [
"java.util",
"org.apache.commons",
"org.wso2.carbon"
] | java.util; org.apache.commons; org.wso2.carbon; | 2,109,449 |
@PublicAPI(usage = ACCESS)
CONJUNCTION haveNameStartingWith(String prefix); | @PublicAPI(usage = ACCESS) CONJUNCTION haveNameStartingWith(String prefix); | /**
* Matches members with a name starting with the specified prefix.
*
* @param prefix A prefix the member name should start with
* @return A syntax conjunction element, which can be completed to form a full rule
*/ | Matches members with a name starting with the specified prefix | haveNameStartingWith | {
"repo_name": "TNG/ArchUnit",
"path": "archunit/src/main/java/com/tngtech/archunit/lang/syntax/elements/MembersThat.java",
"license": "apache-2.0",
"size": 18147
} | [
"com.tngtech.archunit.PublicAPI"
] | import com.tngtech.archunit.PublicAPI; | import com.tngtech.archunit.*; | [
"com.tngtech.archunit"
] | com.tngtech.archunit; | 95,376 |
public void initialize() {
super.initialize();
services = new HashMap(serializable + 1);
bcsListeners = new ArrayList(1);
} | void function() { super.initialize(); services = new HashMap(serializable + 1); bcsListeners = new ArrayList(1); } | /**
* called by BeanContextSupport superclass during construction and
* deserialization to initialize subclass transient state.
*
* subclasses may envelope this method, but should not override it or
* call it directly.
*/ | called by BeanContextSupport superclass during construction and deserialization to initialize subclass transient state. subclasses may envelope this method, but should not override it or call it directly | initialize | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java",
"license": "mit",
"size": 42459
} | [
"java.util.ArrayList",
"java.util.HashMap"
] | import java.util.ArrayList; import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,053,949 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.