method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static <T> Transformer<T, T> chainedTransformer(
final Collection<? extends Transformer<T, T>> transformers) {
return ChainedTransformer.chainedTransformer(transformers);
} | static <T> Transformer<T, T> function( final Collection<? extends Transformer<T, T>> transformers) { return ChainedTransformer.chainedTransformer(transformers); } | /**
* Create a new Transformer that calls each transformer in turn, passing the
* result into the next transformer. The ordering is that of the iterator()
* method on the collection.
*
* @param <T> the input/output type
* @param transformers a collection of transformers to chain
* @... | Create a new Transformer that calls each transformer in turn, passing the result into the next transformer. The ordering is that of the iterator() method on the collection | chainedTransformer | {
"repo_name": "krivachy/compgs03_mutation_testing",
"path": "src/main/java/org/apache/commons/collections4/TransformerUtils.java",
"license": "apache-2.0",
"size": 19860
} | [
"java.util.Collection",
"org.apache.commons.collections4.functors.ChainedTransformer"
] | import java.util.Collection; import org.apache.commons.collections4.functors.ChainedTransformer; | import java.util.*; import org.apache.commons.collections4.functors.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,666,518 |
@Generated
@Selector("includedRoutes")
public native NSArray<? extends NEIPv4Route> includedRoutes(); | @Selector(STR) native NSArray<? extends NEIPv4Route> function(); | /**
* [@property] includedRoutes
* <p>
* An array of NEIPv4Route objects. Traffic matching these routes will be routed through the virtual interface used by the VPN tunnel.
*/ | [@property] includedRoutes An array of NEIPv4Route objects. Traffic matching these routes will be routed through the virtual interface used by the VPN tunnel | includedRoutes | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/networkextension/NEIPv4Settings.java",
"license": "apache-2.0",
"size": 8403
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,120,937 |
interface WithSystemAssignedIdentityBasedAccessOrCreate<FluentT> extends WithCreate<FluentT> {
WithSystemAssignedIdentityBasedAccessOrCreate<FluentT> withSystemAssignedIdentityBasedAccessTo(
String resourceId, BuiltInRole role); | interface WithSystemAssignedIdentityBasedAccessOrCreate<FluentT> extends WithCreate<FluentT> { WithSystemAssignedIdentityBasedAccessOrCreate<FluentT> withSystemAssignedIdentityBasedAccessTo( String resourceId, BuiltInRole role); | /**
* Specifies that web app's system assigned (local) identity should have the given access (described by the
* role) on an ARM resource identified by the resource ID. Applications running on the web app will have the
* same permission (role) on the ARM resource.
*
... | Specifies that web app's system assigned (local) identity should have the given access (described by the role) on an ARM resource identified by the resource ID. Applications running on the web app will have the same permission (role) on the ARM resource | withSystemAssignedIdentityBasedAccessTo | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/WebAppBase.java",
"license": "mit",
"size": 60869
} | [
"com.azure.resourcemanager.authorization.models.BuiltInRole"
] | import com.azure.resourcemanager.authorization.models.BuiltInRole; | import com.azure.resourcemanager.authorization.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,453,597 |
void invokeAllCallbacksWithError(@NonNull final Exception error) {
if (callbacks.size() == 0) {
return;
}
ArrayList<String> keys = new ArrayList<>(); | void invokeAllCallbacksWithError(@NonNull final Exception error) { if (callbacks.size() == 0) { return; } ArrayList<String> keys = new ArrayList<>(); | /**
* Invoke potential error callbacks for all events which have added callbacks.
*
* @param error Exception.
*/ | Invoke potential error callbacks for all events which have added callbacks | invokeAllCallbacksWithError | {
"repo_name": "Leanplum/Leanplum-Android-SDK",
"path": "AndroidSDKCore/src/main/java/com/leanplum/internal/LeanplumEventCallbackManager.java",
"license": "apache-2.0",
"size": 5326
} | [
"androidx.annotation.NonNull",
"java.util.ArrayList"
] | import androidx.annotation.NonNull; import java.util.ArrayList; | import androidx.annotation.*; import java.util.*; | [
"androidx.annotation",
"java.util"
] | androidx.annotation; java.util; | 1,650,460 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> deleteUpdateWithResponseAsync(
String provider, String name, String version, RequestOptions requestOptions, Context context) {
return service.deleteUpdate(
this.client.getEndpoint(),
this.... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function( String provider, String name, String version, RequestOptions requestOptions, Context context) { return service.deleteUpdate( this.client.getEndpoint(), this.client.getInstanceId(), provider, name, version, this.client.getServiceVersion().getVers... | /**
* Delete a specific update version.
*
* <p><strong>Query Parameters</strong>
*
* <table border="1">
* <caption>Query Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>apiVersion</td><td>String</td><td>Yes</td... | Delete a specific update version. Query Parameters Query Parameters NameTypeRequiredDescription apiVersionStringYesApi Version | deleteUpdateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceUpdatesImpl.java",
"license": "mit",
"size": 145485
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.RequestOptions",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 140,234 |
public Connection createConnection() throws JMSException {
return createConnection(null, userName, password).getConnection();
}
| Connection function() throws JMSException { return createConnection(null, userName, password).getConnection(); } | /**
* Create the JMS connection using the already set username and password
*/ | Create the JMS connection using the already set username and password | createConnection | {
"repo_name": "deleidos/digitaledge-platform",
"path": "commons-core/src/main/java/com/deleidos/rtws/commons/net/jms/RoundRobinJMSConnectionFactory.java",
"license": "apache-2.0",
"size": 20449
} | [
"javax.jms.Connection",
"javax.jms.JMSException"
] | import javax.jms.Connection; import javax.jms.JMSException; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 960,771 |
public double drawParagraphs(Graphics2D graphics, double x, double y) {
DrawFactory fact = DrawFactory.getInstance(graphics);
double y0 = y;
Iterator<? extends TextParagraph<?,?,? extends TextRun>> paragraphs = getShape().iterator();
boolean isFirstLine = true;
for (int aut... | double function(Graphics2D graphics, double x, double y) { DrawFactory fact = DrawFactory.getInstance(graphics); double y0 = y; Iterator<? extends TextParagraph<?,?,? extends TextRun>> paragraphs = getShape().iterator(); boolean isFirstLine = true; for (int autoNbrIdx=0; paragraphs.hasNext(); autoNbrIdx++){ TextParagra... | /**
* paint the paragraphs starting from top left (x,y)
*
* @return the vertical advance, i.e. the cumulative space occupied by the text
*/ | paint the paragraphs starting from top left (x,y) | drawParagraphs | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/poi/org/apache/poi/sl/draw/DrawTextShape.java",
"license": "gpl-2.0",
"size": 9034
} | [
"java.awt.Graphics2D",
"java.util.Iterator",
"org.apache.poi.sl.usermodel.TextParagraph",
"org.apache.poi.sl.usermodel.TextRun"
] | import java.awt.Graphics2D; import java.util.Iterator; import org.apache.poi.sl.usermodel.TextParagraph; import org.apache.poi.sl.usermodel.TextRun; | import java.awt.*; import java.util.*; import org.apache.poi.sl.usermodel.*; | [
"java.awt",
"java.util",
"org.apache.poi"
] | java.awt; java.util; org.apache.poi; | 2,276,454 |
return OAuth20JwtAccessTokenEncoder.builder()
.accessTokenJwtBuilder(getConfigurationContext().getAccessTokenJwtBuilder())
.build()
.decode(token);
} | return OAuth20JwtAccessTokenEncoder.builder() .accessTokenJwtBuilder(getConfigurationContext().getAccessTokenJwtBuilder()) .build() .decode(token); } | /**
* Extract access token from token.
*
* @param token the token
* @return the string
*/ | Extract access token from token | extractAccessTokenFrom | {
"repo_name": "apereo/cas",
"path": "support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/endpoints/BaseOAuth20Controller.java",
"license": "apache-2.0",
"size": 1012
} | [
"org.apereo.cas.support.oauth.web.response.accesstoken.response.OAuth20JwtAccessTokenEncoder"
] | import org.apereo.cas.support.oauth.web.response.accesstoken.response.OAuth20JwtAccessTokenEncoder; | import org.apereo.cas.support.oauth.web.response.accesstoken.response.*; | [
"org.apereo.cas"
] | org.apereo.cas; | 1,986,908 |
public PrintStream getPrintStream() {
return outputStream;
} | PrintStream function() { return outputStream; } | /**
* Get the output stream if set, null if it hasn't been
*
* @return the outputStream for messages
*/ | Get the output stream if set, null if it hasn't been | getPrintStream | {
"repo_name": "CaptainHillman/jpoms",
"path": "src/uk/co/thisishillman/server/MessageReceiver.java",
"license": "mit",
"size": 9525
} | [
"java.io.PrintStream"
] | import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,413,697 |
@Deprecated
public static org.deeplearning4j.nn.api.Model importModelInputStream(InputStream modelHdf5Stream)
throws UnsupportedKerasConfigurationException, IOException, InvalidKerasConfigurationException {
return KerasModelImport.importKerasModelAndWeights(modelHdf5Stream, false);
... | static org.deeplearning4j.nn.api.Model function(InputStream modelHdf5Stream) throws UnsupportedKerasConfigurationException, IOException, InvalidKerasConfigurationException { return KerasModelImport.importKerasModelAndWeights(modelHdf5Stream, false); } | /**
* Load Keras model saved using model.save_model(...).
*
* @param modelHdf5Stream input stream storing Keras Sequential model
* @return DL4J MultiLayerNetwork
* @see MultiLayerNetwork
* @throws UnsupportedKerasConfigurationException
* @throws IOExcepti... | Load Keras model saved using model.save_model(...) | importModelInputStream | {
"repo_name": "shuodata/deeplearning4j",
"path": "deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/Model.java",
"license": "apache-2.0",
"size": 8828
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,702,886 |
final String name = player.getName();
if (isEnabled && database.hasSession(name)) {
database.setUnlogged(name);
database.revokeSession(name);
PlayerAuth auth = database.getAuth(name);
SessionState state = fetchSessionStatus(auth, player);
if (state.eq... | final String name = player.getName(); if (isEnabled && database.hasSession(name)) { database.setUnlogged(name); database.revokeSession(name); PlayerAuth auth = database.getAuth(name); SessionState state = fetchSessionStatus(auth, player); if (state.equals(SessionState.VALID)) { RestoreSessionEvent event = bukkitService... | /**
* Returns whether the player has a session he can resume.
*
* @param player the player to check
* @return true if there is a current session, false otherwise
*/ | Returns whether the player has a session he can resume | canResumeSession | {
"repo_name": "AuthMe/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/service/SessionService.java",
"license": "gpl-3.0",
"size": 3666
} | [
"fr.xephi.authme.data.auth.PlayerAuth",
"fr.xephi.authme.events.RestoreSessionEvent",
"fr.xephi.authme.message.MessageKey"
] | import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.events.RestoreSessionEvent; import fr.xephi.authme.message.MessageKey; | import fr.xephi.authme.data.auth.*; import fr.xephi.authme.events.*; import fr.xephi.authme.message.*; | [
"fr.xephi.authme"
] | fr.xephi.authme; | 1,331,176 |
void resolveStubDeclarations() {
for (StubDeclaration stub : stubDeclarations) {
Node n = stub.node;
Node parent = n.getParent();
String qName = n.getQualifiedName();
String propName = n.getLastChild().getString();
String ownerName = stub.ownerName;
boolean isEx... | void resolveStubDeclarations() { for (StubDeclaration stub : stubDeclarations) { Node n = stub.node; Node parent = n.getParent(); String qName = n.getQualifiedName(); String propName = n.getLastChild().getString(); String ownerName = stub.ownerName; boolean isExtern = stub.isExtern; if (scope.isDeclared(qName, false)) ... | /**
* Resolve any stub declarations to unknown types if we could not
* find types for them during traversal.
*/ | Resolve any stub declarations to unknown types if we could not find types for them during traversal | resolveStubDeclarations | {
"repo_name": "GerHobbelt/closure-compiler",
"path": "src/com/google/javascript/jscomp/TypedScopeCreator.java",
"license": "apache-2.0",
"size": 81651
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.jstype.ObjectType"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.ObjectType; | import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.javascript"
] | com.google.javascript; | 981,593 |
private static String setProperty(final String name, final String value) {
final PrivilegedAction<String> action;
if (value != null) {
action = new PrivilegedAction<String>() { | static String function(final String name, final String value) { final PrivilegedAction<String> action; if (value != null) { action = new PrivilegedAction<String>() { | /**
* Set property to given value.
* <p>
* Specifying a null value will cause the property to be cleared
*
* @param name
* @param value
* @return previous value
*/ | Set property to given value. Specifying a null value will cause the property to be cleared | setProperty | {
"repo_name": "vchoury/ses-daemon",
"path": "src/main/java/fr/vcy/coredaemon/httpd/utils/Requester.java",
"license": "mit",
"size": 96195
} | [
"java.security.PrivilegedAction"
] | import java.security.PrivilegedAction; | import java.security.*; | [
"java.security"
] | java.security; | 1,960,248 |
@Override
public synchronized void onPause() {
if (D) Log.e(TAG, "+ ON PAUSE +");
super.onPause();
if (mIO.isConnected()) {
mIO.close();
}
} | synchronized void function() { if (D) Log.e(TAG, STR); super.onPause(); if (mIO.isConnected()) { mIO.close(); } } | /**
* Called when the activity is paused.
*/ | Called when the activity is paused | onPause | {
"repo_name": "vsu/brutefir-remote",
"path": "src/com/vsu/bruteremote/BruteRemote.java",
"license": "gpl-2.0",
"size": 4618
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,178,730 |
private void checkForSuperfluousAttributes(SyntaxTreeNode node,
Attributes attrs)
{
QName qname = node.getQName();
boolean isStylesheet = (node instanceof Stylesheet);
String[] legal = (String[]) _instructionAttrs.get(qname);
if (versionIsOne && legal != null) {
... | void function(SyntaxTreeNode node, Attributes attrs) { QName qname = node.getQName(); boolean isStylesheet = (node instanceof Stylesheet); String[] legal = (String[]) _instructionAttrs.get(qname); if (versionIsOne && legal != null) { int j; final int n = attrs.getLength(); for (int i = 0; i < n; i++) { final String att... | /**
* checks the list of attributes against a list of allowed attributes
* for a particular element node.
*/ | checks the list of attributes against a list of allowed attributes for a particular element node | checkForSuperfluousAttributes | {
"repo_name": "openjdk-mirror/jdk7u-jaxp",
"path": "src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java",
"license": "gpl-2.0",
"size": 53809
} | [
"com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg",
"org.xml.sax.Attributes"
] | import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; import org.xml.sax.Attributes; | import com.sun.org.apache.xalan.internal.xsltc.compiler.util.*; import org.xml.sax.*; | [
"com.sun.org",
"org.xml.sax"
] | com.sun.org; org.xml.sax; | 255,826 |
time += tpf;
if (time > checkInterval)
{
if (topLevelNode == null){
topLevelNode = this;
while( topLevelNode.getParent() != null){
topLevelNode = topLevelNode.getParent();
}
}
Spatial child = topLeve... | time += tpf; if (time > checkInterval) { if (topLevelNode == null){ topLevelNode = this; while( topLevelNode.getParent() != null){ topLevelNode = topLevelNode.getParent(); } } Spatial child = topLevelNode.getChild(prefabName); if ( child != null && child instanceof Prefab) { onPrefabFound.prefabFound((Prefab)child, thi... | /**
* Check the scene for the prefab, when found the Runnable object
* will be activated.
* @param tpf
*/ | Check the scene for the prefab, when found the Runnable object will be activated | updateLogicalState | {
"repo_name": "samynk/DArtE",
"path": "src/dae/prefabs/standard/PrefabPlaceHolder.java",
"license": "bsd-2-clause",
"size": 2572
} | [
"com.jme3.scene.Spatial"
] | import com.jme3.scene.Spatial; | import com.jme3.scene.*; | [
"com.jme3.scene"
] | com.jme3.scene; | 1,293,496 |
List<IdeaDetail> ideaDtoList = null;
retrievalInfo.setNoOfRecords(retrievalInfo.getNoOfRecords() + ONE);
List<Idea> ideaList = ideaService.getIdeasByTagName(tagName, retrievalInfo);
if (ideaList != null && ideaList.size() > ZERO) {
ideaDtoList = convertToIdeaDetailList(ideaL... | List<IdeaDetail> ideaDtoList = null; retrievalInfo.setNoOfRecords(retrievalInfo.getNoOfRecords() + ONE); List<Idea> ideaList = ideaService.getIdeasByTagName(tagName, retrievalInfo); if (ideaList != null && ideaList.size() > ZERO) { ideaDtoList = convertToIdeaDetailList(ideaList, true, true, false, true); } return ideaD... | /**
* Retrieves the list of published ideas along with their tags and teams by
* tag names.
*
* @param retrievalInfo the idea list retrieval information
* @return Returns the list of IdeaDetail objects
*/ | Retrieves the list of published ideas along with their tags and teams by tag names | getIdeasByTagName | {
"repo_name": "akrain/thoughtsite",
"path": "src/main/java/com/google/ie/common/builder/IdeaBuilder.java",
"license": "apache-2.0",
"size": 10732
} | [
"com.google.ie.business.domain.Idea",
"com.google.ie.dto.IdeaDetail",
"java.util.List"
] | import com.google.ie.business.domain.Idea; import com.google.ie.dto.IdeaDetail; import java.util.List; | import com.google.ie.business.domain.*; import com.google.ie.dto.*; import java.util.*; | [
"com.google.ie",
"java.util"
] | com.google.ie; java.util; | 2,389,466 |
private static boolean parseCommandLine(String[] args) {
// verify command line args (min 4 args: p_1 p_2 -n name)
if (args.length < 4) {
logErrorMessage(PEAR_MERGER + " args: " + "pear_file_1 ... pear_file_n -n agg_name "
+ "[-f agg_pear_file]");
return false;
}
ArrayList li... | static boolean function(String[] args) { if (args.length < 4) { logErrorMessage(PEAR_MERGER + STR + STR + STR); return false; } ArrayList listOfPears = new ArrayList(); for (int i = 0; i < args.length; i++) { if (args[i].equals(AGGREGATE_NAME_ARG)) { if (++i < args.length) __aggregateName = args[i]; } else if (args[i].... | /**
* Parses and validates the command line and initializes static attributes.
*
* @param args
* The given command line arguments.
* @return <code>true</code>, if the command line arguments are valid, <code>false</code>
* otherwise.
*/ | Parses and validates the command line and initializes static attributes | parseCommandLine | {
"repo_name": "apache/uima-uimaj",
"path": "uimaj-tools/src/main/java/org/apache/uima/tools/pear/merger/PMController.java",
"license": "apache-2.0",
"size": 17133
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList"
] | import java.io.File; import java.io.IOException; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 341,872 |
public Users getUserByEmail(String email){
Session session = null;
try{
session = sessionFactory.openSession();
Users user = (Users) session.get(Users.class, email);
session.close();
return user;
} catch (Exception e){
return null;
}
}
| Users function(String email){ Session session = null; try{ session = sessionFactory.openSession(); Users user = (Users) session.get(Users.class, email); session.close(); return user; } catch (Exception e){ return null; } } | /**
* Used for getting Users instance form database for email primatry key
* @param email primary key to search for the object
* @return user object if found one else null if no entry is found against
* the provided email
*/ | Used for getting Users instance form database for email primatry key | getUserByEmail | {
"repo_name": "prithi/se",
"path": "hello/src/main/java/org/tutor/struts2/ormhelper/SessionBean.java",
"license": "mit",
"size": 9779
} | [
"org.hibernate.Session",
"org.tutor.struts2.model.Users"
] | import org.hibernate.Session; import org.tutor.struts2.model.Users; | import org.hibernate.*; import org.tutor.struts2.model.*; | [
"org.hibernate",
"org.tutor.struts2"
] | org.hibernate; org.tutor.struts2; | 482,527 |
public void switchUser(CmsObject cms, HttpServletRequest req, CmsUser user) throws CmsException {
// only user with root administrator role are allowed to switch the user
OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN.forOrgUnit(user.getOuFqn()));
CmsSessionInfo info = getSe... | void function(CmsObject cms, HttpServletRequest req, CmsUser user) throws CmsException { OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN.forOrgUnit(user.getOuFqn())); CmsSessionInfo info = getSessionInfo(req); HttpSession session = req.getSession(false); if ((info == null) (session == null)) { throw new CmsE... | /**
* Switches the current user to the given user. The session info is rebuild as if the given user
* performs a login at the workplace.
*
* @param cms the current CmsObject
* @param req the current request
* @param user the user to switch to
*
* @throws CmsException if... | Switches the current user to the given user. The session info is rebuild as if the given user performs a login at the workplace | switchUser | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/main/CmsSessionManager.java",
"license": "lgpl-2.1",
"size": 24189
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpSession",
"org.opencms.db.CmsUserSettings",
"org.opencms.file.CmsObject",
"org.opencms.file.CmsProject",
"org.opencms.file.CmsRequestContext",
"org.opencms.file.CmsUser",
"org.opencms.security.CmsRole",
"org.opencms.security.CmsSecurit... | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.opencms.db.CmsUserSettings; import org.opencms.file.CmsObject; import org.opencms.file.CmsProject; import org.opencms.file.CmsRequestContext; import org.opencms.file.CmsUser; import org.opencms.security.CmsRole; import org.o... | import javax.servlet.http.*; import org.opencms.db.*; import org.opencms.file.*; import org.opencms.security.*; import org.opencms.workplace.*; | [
"javax.servlet",
"org.opencms.db",
"org.opencms.file",
"org.opencms.security",
"org.opencms.workplace"
] | javax.servlet; org.opencms.db; org.opencms.file; org.opencms.security; org.opencms.workplace; | 384,042 |
@SuppressWarnings("WeakerAccess")
void endRecoverAnimation(ViewHolder viewHolder, boolean override) {
final int recoverAnimSize = mRecoverAnimations.size();
for (int i = recoverAnimSize - 1; i >= 0; i--) {
final RecoverAnimation anim = mRecoverAnimations.get(i);
if (anim... | @SuppressWarnings(STR) void endRecoverAnimation(ViewHolder viewHolder, boolean override) { final int recoverAnimSize = mRecoverAnimations.size(); for (int i = recoverAnimSize - 1; i >= 0; i--) { final RecoverAnimation anim = mRecoverAnimations.get(i); if (anim.mViewHolder == viewHolder) { anim.mOverridden = override; i... | /**
* Returns the animation type or 0 if cannot be found.
*/ | Returns the animation type or 0 if cannot be found | endRecoverAnimation | {
"repo_name": "CzBiX/Telegram",
"path": "TMessagesProj/src/main/java/androidx/recyclerview/widget/ItemTouchHelper.java",
"license": "gpl-2.0",
"size": 109348
} | [
"androidx.recyclerview.widget.RecyclerView"
] | import androidx.recyclerview.widget.RecyclerView; | import androidx.recyclerview.widget.*; | [
"androidx.recyclerview"
] | androidx.recyclerview; | 2,358,052 |
public VenOrderPayment persistVenOrderPayment(VenOrderPayment venOrderPayment); | VenOrderPayment function(VenOrderPayment venOrderPayment); | /**
* persistVenOrderPayment persists a country
*
* @param venOrderPayment
* @return the persisted VenOrderPayment
*/ | persistVenOrderPayment persists a country | persistVenOrderPayment | {
"repo_name": "yauritux/venice-legacy",
"path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/VenOrderPaymentSessionEJBRemote.java",
"license": "apache-2.0",
"size": 2596
} | [
"com.gdn.venice.persistence.VenOrderPayment"
] | import com.gdn.venice.persistence.VenOrderPayment; | import com.gdn.venice.persistence.*; | [
"com.gdn.venice"
] | com.gdn.venice; | 981,813 |
@SuppressWarnings("unchecked")
public Type unmarshal(String dataTypeRef) {
addOutput(new UnmarshalDefinition(dataTypeRef));
return (Type) this;
}
/**
* <a href="http://camel.apache.org/data-format.html">DataFormat:</a>
* Marshals the in body using a {@link DataFormat} expressi... | @SuppressWarnings(STR) Type function(String dataTypeRef) { addOutput(new UnmarshalDefinition(dataTypeRef)); return (Type) this; } /** * <a href="http: * Marshals the in body using a {@link DataFormat} expression to define the * format of the output which will be added to the out body. * * @return the expression to crea... | /**
* <a href="http://camel.apache.org/data-format.html">DataFormat:</a>
* Unmarshals the in body using the specified {@link DataFormat} reference
* in the {@link org.apache.camel.spi.Registry} and sets the output on the
* out message body.
*
* @param dataTypeRef
* referen... | DataFormat: Unmarshals the in body using the specified <code>DataFormat</code> reference in the <code>org.apache.camel.spi.Registry</code> and sets the output on the out message body | unmarshal | {
"repo_name": "shuliangtao/apache-camel-2.13.0-src",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 138060
} | [
"org.apache.camel.spi.DataFormat"
] | import org.apache.camel.spi.DataFormat; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 264,741 |
private void validateSubregionAttributes(RegionAttributes attrs) {
if (attrs == null) {
throw new IllegalArgumentException(
"region attributes must not be null");
}
if (scope == Scope.LOCAL && attrs.getScope() != Scope.LOCAL) {
throw new IllegalStateException(
"A region wit... | void function(RegionAttributes attrs) { if (attrs == null) { throw new IllegalArgumentException( STR); } if (scope == Scope.LOCAL && attrs.getScope() != Scope.LOCAL) { throw new IllegalStateException( STR); } } | /**
* validate attributes of subregion being created, sent to parent
*
* @throws IllegalArgumentException if attrs is null
* @throws IllegalStateException if attributes are invalid
*/ | validate attributes of subregion being created, sent to parent | validateSubregionAttributes | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java",
"license": "apache-2.0",
"size": 394235
} | [
"org.apache.geode.cache.RegionAttributes",
"org.apache.geode.cache.Scope"
] | import org.apache.geode.cache.RegionAttributes; import org.apache.geode.cache.Scope; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,785,478 |
public static URI getParentPath(URI path) {
Preconditions.checkNotNull(path);
// Root path has no parent.
if (path.equals(GCS_ROOT)) {
return null;
}
StorageResourceId resourceId = validatePathAndGetId(path, true);
if (resourceId.isBucket()) {
return GCS_ROOT;
} else {
... | static URI function(URI path) { Preconditions.checkNotNull(path); if (path.equals(GCS_ROOT)) { return null; } StorageResourceId resourceId = validatePathAndGetId(path, true); if (resourceId.isBucket()) { return GCS_ROOT; } else { int index; if (FileInfo.objectHasDirectoryPath(resourceId.getObjectName())) { index = reso... | /**
* Gets the parent directory of the given path.
*
* @param path Path to convert.
* @return Path of parent directory of the given item or null for root path.
*/ | Gets the parent directory of the given path | getParentPath | {
"repo_name": "peltekster/bigdata-interop-leanplum",
"path": "gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageFileSystem.java",
"license": "apache-2.0",
"size": 62406
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,497,653 |
// MZ Goodwill
public static MCostElement[] getNonCostingMethods(PO po)
{
ArrayList<MCostElement> list = new ArrayList<MCostElement>();
String sql = "SELECT * FROM M_CostElement "
+ "WHERE AD_Client_ID=?"
+ " AND IsActive='Y' AND CostingMethod IS NULL";
PreparedStatement pstmt = null;
try
{
ps... | static MCostElement[] function(PO po) { ArrayList<MCostElement> list = new ArrayList<MCostElement>(); String sql = STR + STR + STR; PreparedStatement pstmt = null; try { pstmt = DB.prepareStatement(sql, po.get_TrxName()); pstmt.setInt(1, po.getAD_Client_ID()); ResultSet rs = pstmt.executeQuery(); while (rs.next()) list... | /**
* Get active non Material Cost Element for client
*
* @param po parent
* @return cost element array
*/ | Get active non Material Cost Element for client | getNonCostingMethods | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-legacy/org/compiere/model/MCostElement.java",
"license": "gpl-2.0",
"size": 15844
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.util.ArrayList",
"org.compiere.util.DB"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import org.compiere.util.DB; | import java.sql.*; import java.util.*; import org.compiere.util.*; | [
"java.sql",
"java.util",
"org.compiere.util"
] | java.sql; java.util; org.compiere.util; | 1,176,322 |
public void deleteScore(ScorePK scorePK) throws RemoteException; | void function(ScorePK scorePK) throws RemoteException; | /**
* Method declaration
* @param scorePK
* @throws RemoteException
* @see
*/ | Method declaration | deleteScore | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "ejb-core/questioncontainer/src/main/java/com/stratelia/webactiv/util/score/control/ScoreBmSkeleton.java",
"license": "agpl-3.0",
"size": 5401
} | [
"com.stratelia.webactiv.util.score.model.ScorePK",
"java.rmi.RemoteException"
] | import com.stratelia.webactiv.util.score.model.ScorePK; import java.rmi.RemoteException; | import com.stratelia.webactiv.util.score.model.*; import java.rmi.*; | [
"com.stratelia.webactiv",
"java.rmi"
] | com.stratelia.webactiv; java.rmi; | 2,785,427 |
public void addDocumentToUserSession(UserSession userSession, WorkflowDocument document);
| void function(UserSession userSession, WorkflowDocument document); | /**
* This method places a document into the user session.
*/ | This method places a document into the user session | addDocumentToUserSession | {
"repo_name": "ricepanda/rice-git3",
"path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/service/SessionDocumentService.java",
"license": "apache-2.0",
"size": 2636
} | [
"org.kuali.rice.kew.api.WorkflowDocument",
"org.kuali.rice.krad.UserSession"
] | import org.kuali.rice.kew.api.WorkflowDocument; import org.kuali.rice.krad.UserSession; | import org.kuali.rice.kew.api.*; import org.kuali.rice.krad.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,385,050 |
public Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> query(
InetSocketAddress nameServerAddr, DnsQuestion question, Iterable<DnsRecord> additionals) {
return query0(nameServerAddr, question, toArray(additionals, false),
ch.eventLoop().<AddressedEnvelope<? extends Dns... | Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> function( InetSocketAddress nameServerAddr, DnsQuestion question, Iterable<DnsRecord> additionals) { return query0(nameServerAddr, question, toArray(additionals, false), ch.eventLoop().<AddressedEnvelope<? extends DnsResponse, InetSocketAddress>>newPromise()); } | /**
* Sends a DNS query with the specified question with additional records using the specified name server list.
*/ | Sends a DNS query with the specified question with additional records using the specified name server list | query | {
"repo_name": "louxiu/netty",
"path": "resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java",
"license": "apache-2.0",
"size": 40586
} | [
"io.netty.channel.AddressedEnvelope",
"io.netty.handler.codec.dns.DnsQuestion",
"io.netty.handler.codec.dns.DnsRecord",
"io.netty.handler.codec.dns.DnsResponse",
"io.netty.util.concurrent.Future",
"java.net.InetSocketAddress"
] | import io.netty.channel.AddressedEnvelope; import io.netty.handler.codec.dns.DnsQuestion; import io.netty.handler.codec.dns.DnsRecord; import io.netty.handler.codec.dns.DnsResponse; import io.netty.util.concurrent.Future; import java.net.InetSocketAddress; | import io.netty.channel.*; import io.netty.handler.codec.dns.*; import io.netty.util.concurrent.*; import java.net.*; | [
"io.netty.channel",
"io.netty.handler",
"io.netty.util",
"java.net"
] | io.netty.channel; io.netty.handler; io.netty.util; java.net; | 1,391,349 |
protected Serializable saveWithRequestedId(
Object entity,
Serializable requestedId,
String entityName,
Object anything,
EventSource source) {
return performSave(
entity,
requestedId,
source.getEntityPersister( entityName, entity ),
false,
anything,
source,
true
);
} | Serializable function( Object entity, Serializable requestedId, String entityName, Object anything, EventSource source) { return performSave( entity, requestedId, source.getEntityPersister( entityName, entity ), false, anything, source, true ); } | /**
* Prepares the save call using the given requested id.
*
* @param entity The entity to be saved.
* @param requestedId The id to which to associate the entity.
* @param entityName The name of the entity being saved.
* @param anything Generally cascade-specific information.
* @param source The session w... | Prepares the save call using the given requested id | saveWithRequestedId | {
"repo_name": "HerrB92/obp",
"path": "OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/main/java/org/hibernate/event/internal/AbstractSaveEventListener.java",
"license": "mit",
"size": 17362
} | [
"java.io.Serializable",
"org.hibernate.event.spi.EventSource"
] | import java.io.Serializable; import org.hibernate.event.spi.EventSource; | import java.io.*; import org.hibernate.event.spi.*; | [
"java.io",
"org.hibernate.event"
] | java.io; org.hibernate.event; | 1,338,602 |
public String getFieldCountGetFunctionName(Field field) {
if (field.isRepeated()) {
return methodName(Name.from("get", field.getSimpleName(), "count"));
} else {
throw new IllegalArgumentException(
"Non-repeated field " + field.getSimpleName() + " has no count function.");
}
} | String function(Field field) { if (field.isRepeated()) { return methodName(Name.from("get", field.getSimpleName(), "count")); } else { throw new IllegalArgumentException( STR + field.getSimpleName() + STR); } } | /**
* The function name to get the count of elements in the given field.
*
* @throws IllegalArgumentException if the field is not a repeated field.
*/ | The function name to get the count of elements in the given field | getFieldCountGetFunctionName | {
"repo_name": "geigerj/toolkit",
"path": "src/main/java/com/google/api/codegen/transformer/SurfaceNamer.java",
"license": "apache-2.0",
"size": 16978
} | [
"com.google.api.codegen.util.Name",
"com.google.api.tools.framework.model.Field"
] | import com.google.api.codegen.util.Name; import com.google.api.tools.framework.model.Field; | import com.google.api.codegen.util.*; import com.google.api.tools.framework.model.*; | [
"com.google.api"
] | com.google.api; | 1,543,530 |
@Test
public void testValueSetOutputSchemaPrimitiveType() throws FrontendException {
Schema inputSchema = new Schema();
Schema charArraySchema = new Schema(new FieldSchema(null, DataType.CHARARRAY));
FieldSchema mapSchema = new FieldSchema(null, charArraySchema, DataType.MAP);
in... | void function() throws FrontendException { Schema inputSchema = new Schema(); Schema charArraySchema = new Schema(new FieldSchema(null, DataType.CHARARRAY)); FieldSchema mapSchema = new FieldSchema(null, charArraySchema, DataType.MAP); inputSchema.add(mapSchema); Schema tupleSchema = new Schema(new FieldSchema(null, ch... | /**
* Tests that VALUESET preserves the schema when the map's value type is primitive.
*/ | Tests that VALUESET preserves the schema when the map's value type is primitive | testValueSetOutputSchemaPrimitiveType | {
"repo_name": "kellyzly/pig",
"path": "test/org/apache/pig/test/TestBuiltin.java",
"license": "apache-2.0",
"size": 152911
} | [
"org.apache.pig.data.DataType",
"org.apache.pig.impl.logicalLayer.FrontendException",
"org.apache.pig.impl.logicalLayer.schema.Schema",
"org.junit.Assert"
] | import org.apache.pig.data.DataType; import org.apache.pig.impl.logicalLayer.FrontendException; import org.apache.pig.impl.logicalLayer.schema.Schema; import org.junit.Assert; | import org.apache.pig.data.*; import org.apache.pig.impl.*; import org.junit.*; | [
"org.apache.pig",
"org.junit"
] | org.apache.pig; org.junit; | 2,338,808 |
@Test
public void createSecurityGroupMembership() {
//create a user with the default provider
Identity identity = JunitTestHelper.createAndPersistIdentityAsUser("update-membership-" + UUID.randomUUID().toString());
SecurityGroup secGroup = securityManager.createAndPersistSecurityGroup();
securityManager.add... | void function() { Identity identity = JunitTestHelper.createAndPersistIdentityAsUser(STR + UUID.randomUUID().toString()); SecurityGroup secGroup = securityManager.createAndPersistSecurityGroup(); securityManager.addIdentityToSecurityGroup(identity, secGroup); dbInstance.commitAndCloseSession(); boolean member = securit... | /**
* Dummy test to make sure all works as wanted
*/ | Dummy test to make sure all works as wanted | createSecurityGroupMembership | {
"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.test.JunitTestHelper"
] | import java.util.UUID; import org.junit.Assert; import org.olat.core.id.Identity; 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,585 |
public final void setDebugger(Debugger debugger, Object contextData)
{
if (sealed) onSealedMutation();
this.debugger = debugger;
debuggerData = contextData;
} | final void function(Debugger debugger, Object contextData) { if (sealed) onSealedMutation(); this.debugger = debugger; debuggerData = contextData; } | /**
* Set the associated debugger.
* @param debugger the debugger to be used on callbacks from
* the engine.
* @param contextData arbitrary object that debugger can use to store
* per Context data.
*/ | Set the associated debugger | setDebugger | {
"repo_name": "jsdoc3/rhino",
"path": "src/org/mozilla/javascript/Context.java",
"license": "mpl-2.0",
"size": 97824
} | [
"org.mozilla.javascript.debug.Debugger"
] | import org.mozilla.javascript.debug.Debugger; | import org.mozilla.javascript.debug.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 2,226,065 |
public SequenceView<NucleotideCompound> getReverse() {
return new ReversedSequenceView<NucleotideCompound>(this);
} | SequenceView<NucleotideCompound> function() { return new ReversedSequenceView<NucleotideCompound>(this); } | /**
* Returns a Sequence which runs in the current reverse order
*/ | Returns a Sequence which runs in the current reverse order | getReverse | {
"repo_name": "JolantaWojcik/biojavaOwn",
"path": "biojava3-core/src/main/java/org/biojava3/core/sequence/DNASequence.java",
"license": "lgpl-2.1",
"size": 6008
} | [
"org.biojava3.core.sequence.compound.NucleotideCompound",
"org.biojava3.core.sequence.template.SequenceView",
"org.biojava3.core.sequence.views.ReversedSequenceView"
] | import org.biojava3.core.sequence.compound.NucleotideCompound; import org.biojava3.core.sequence.template.SequenceView; import org.biojava3.core.sequence.views.ReversedSequenceView; | import org.biojava3.core.sequence.compound.*; import org.biojava3.core.sequence.template.*; import org.biojava3.core.sequence.views.*; | [
"org.biojava3.core"
] | org.biojava3.core; | 2,561,661 |
public void draw(Graphics2D g2, Rectangle2D area);
| void function(Graphics2D g2, Rectangle2D area); | /**
* Draws the border by filling in the reserved space (in black).
*
* @param g2 the graphics device.
* @param area the area.
*/ | Draws the border by filling in the reserved space (in black) | draw | {
"repo_name": "apetresc/JFreeChart",
"path": "src/main/java/org/jfree/chart/block/BlockFrame.java",
"license": "lgpl-2.1",
"size": 2372
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D"
] | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; | import java.awt.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 808,864 |
public LanguageExtensionInner withLanguageExtensionName(LanguageExtensionName languageExtensionName) {
this.languageExtensionName = languageExtensionName;
return this;
} | LanguageExtensionInner function(LanguageExtensionName languageExtensionName) { this.languageExtensionName = languageExtensionName; return this; } | /**
* Set the languageExtensionName property: The language extension name.
*
* @param languageExtensionName the languageExtensionName value to set.
* @return the LanguageExtensionInner object itself.
*/ | Set the languageExtensionName property: The language extension name | withLanguageExtensionName | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LanguageExtensionInner.java",
"license": "mit",
"size": 1685
} | [
"com.azure.resourcemanager.synapse.models.LanguageExtensionName"
] | import com.azure.resourcemanager.synapse.models.LanguageExtensionName; | import com.azure.resourcemanager.synapse.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,683,533 |
void delete(String ring, CassandraInstance instance); | void delete(String ring, CassandraInstance instance); | /**
* Deletes the Cassandra {@code instance}.
*
* @param ring name of the Cassandra ring
* @param instance the Cassandra instance
*/ | Deletes the Cassandra instance | delete | {
"repo_name": "BrightTag/agathon",
"path": "agathon-manager/src/main/java/com/brighttag/agathon/dao/CassandraInstanceDao.java",
"license": "apache-2.0",
"size": 2133
} | [
"com.brighttag.agathon.model.CassandraInstance"
] | import com.brighttag.agathon.model.CassandraInstance; | import com.brighttag.agathon.model.*; | [
"com.brighttag.agathon"
] | com.brighttag.agathon; | 1,285,494 |
@Test
public void empty_meta_result_set_01() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[0]);
// Check results metadata
ResultSetMetaData metadata = results.getMetaData();
Assert.assertEquals(0, metadata.getColumnCount());
// Check results... | void function() throws SQLException { MetaResultSet results = new MetaResultSet(new ColumnInfo[0]); ResultSetMetaData metadata = results.getMetaData(); Assert.assertEquals(0, metadata.getColumnCount()); Assert.assertTrue(results.isBeforeFirst()); Assert.assertFalse(results.next()); Assert.assertTrue(results.isAfterLast... | /**
* Check empty meta result set
*
* @throws SQLException
*/ | Check empty meta result set | empty_meta_result_set_01 | {
"repo_name": "samaitra/jena",
"path": "jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/metadata/results/TestMetaResultSet.java",
"license": "apache-2.0",
"size": 21597
} | [
"java.sql.ResultSetMetaData",
"java.sql.SQLException",
"org.apache.jena.jdbc.metadata.results.MetaResultSet",
"org.apache.jena.jdbc.results.metadata.columns.ColumnInfo",
"org.junit.Assert"
] | import java.sql.ResultSetMetaData; import java.sql.SQLException; import org.apache.jena.jdbc.metadata.results.MetaResultSet; import org.apache.jena.jdbc.results.metadata.columns.ColumnInfo; import org.junit.Assert; | import java.sql.*; import org.apache.jena.jdbc.metadata.results.*; import org.apache.jena.jdbc.results.metadata.columns.*; import org.junit.*; | [
"java.sql",
"org.apache.jena",
"org.junit"
] | java.sql; org.apache.jena; org.junit; | 1,467,230 |
public void removeContentProposalListener(IContentProposalListener listener) {
proposalListeners.remove(listener);
} | void function(IContentProposalListener listener) { proposalListeners.remove(listener); } | /**
* Removes the specified listener from the list of content proposal listeners that are notified when content
* proposals are chosen.
* </p>
*
* @param listener
* the IContentProposalListener to be removed as a listener. Must not be <code>null</code>. If the
* ... | Removes the specified listener from the list of content proposal listeners that are notified when content proposals are chosen. | removeContentProposalListener | {
"repo_name": "fqqb/yamcs-studio",
"path": "bundles/org.csstudio.autocomplete/src/org/csstudio/autocomplete/ui/content/ContentProposalAdapter.java",
"license": "epl-1.0",
"size": 42143
} | [
"org.eclipse.jface.fieldassist.IContentProposalListener"
] | import org.eclipse.jface.fieldassist.IContentProposalListener; | import org.eclipse.jface.fieldassist.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,503,878 |
public Query createNativeQuery(String sql)
{
return getCurrent().createNativeQuery(sql);
} | Query function(String sql) { return getCurrent().createNativeQuery(sql); } | /**
* Creates a query.
*/ | Creates a query | createNativeQuery | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/amber/manager/EntityManagerProxy.java",
"license": "gpl-2.0",
"size": 10934
} | [
"javax.persistence.Query"
] | import javax.persistence.Query; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 69,272 |
public java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotConstantHLAPI> getSubterm_dots_DotConstantHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.dots.hlapi.DotConstantHLAPI>();
for (Term elemnt : getSubterm()) {
if(elemnt.getCl... | java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotConstantHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.dots.hlapi.DotConstantHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.dots.impl.... | /**
* This accessor return a list of encapsulated subelement, only of DotConstantHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of DotConstantHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_dots_DotConstantHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/SublistHLAPI.java",
"license": "epl-1.0",
"size": 111755
} | [
"fr.lip6.move.pnml.hlpn.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 283,785 |
public InputStream newInputStream(int index) throws IOException {
synchronized (DiskLruCache.this) {
if (entry.currentEditor != this) {
throw new IllegalStateException();
}
if (!entry.readable) {
return null;
}
try {
return new FileInputStream(entry.getCleanFile(index));
}... | InputStream function(int index) throws IOException { synchronized (DiskLruCache.this) { if (entry.currentEditor != this) { throw new IllegalStateException(); } if (!entry.readable) { return null; } try { return new FileInputStream(entry.getCleanFile(index)); } catch (FileNotFoundException e) { return null; } } } | /**
* Returns an unbuffered input stream to read the last committed value,
* or null if no value has been committed.
*/ | Returns an unbuffered input stream to read the last committed value, or null if no value has been committed | newInputStream | {
"repo_name": "jinmiao0601/appcutt",
"path": "app/src/main/java/com/appcutt/demo/libs/imageloader/com/nostra13/universalimageloader/cache/disc/impl/ext/DiskLruCache.java",
"license": "apache-2.0",
"size": 30211
} | [
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,088,341 |
public static Connection getDBConnection(String dbDriver, String url, String dbConnectionName) throws ClassNotFoundException,
SQLException {
SharedDBConnectionLog4j instanceLocal = getInstance();
Connection connection = instanceLocal.getConnection(dbDriver, url, dbConnectionName);
... | static Connection function(String dbDriver, String url, String dbConnectionName) throws ClassNotFoundException, SQLException { SharedDBConnectionLog4j instanceLocal = getInstance(); Connection connection = instanceLocal.getConnection(dbDriver, url, dbConnectionName); return connection; } | /**
* If there don't exist the connection or it is closed, create and store it.
*
* @param dbDriver
* @param url
* @param dbConnectionName
* @return
* @throws ClassNotFoundException
* @throws SQLException
*/ | If there don't exist the connection or it is closed, create and store it | getDBConnection | {
"repo_name": "eea/eea.rancher.parity",
"path": "rancher2text_3/src/main/java/routines/system/SharedDBConnectionLog4j.java",
"license": "gpl-2.0",
"size": 9454
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,656,604 |
private Node parseUnionType(JsDocToken token) {
return parseUnionTypeWithAlternate(token, null);
} | Node function(JsDocToken token) { return parseUnionTypeWithAlternate(token, null); } | /**
* UnionType := '(' TypeUnionList ')'
* TypeUnionList := TypeExpression | TypeExpression '|' TypeUnionList
*
* We've removed the empty union type.
*/ | UnionType := '(' TypeUnionList ')' TypeUnionList := TypeExpression | TypeExpression '|' TypeUnionList We've removed the empty union type | parseUnionType | {
"repo_name": "selkhateeb/closure-compiler",
"path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java",
"license": "apache-2.0",
"size": 84556
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,854,139 |
public T mimeMultipart() {
MimeMultipartDataFormat mm = new MimeMultipartDataFormat();
return dataFormat(mm);
} | T function() { MimeMultipartDataFormat mm = new MimeMultipartDataFormat(); return dataFormat(mm); } | /**
* Uses the MIME Multipart data format
*/ | Uses the MIME Multipart data format | mimeMultipart | {
"repo_name": "jarst/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 39484
} | [
"org.apache.camel.model.dataformat.MimeMultipartDataFormat"
] | import org.apache.camel.model.dataformat.MimeMultipartDataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 332,905 |
private String getColumnValue(int columnIndex, boolean asResource, boolean fillEmptyValue) {
// try{
// throw new NullPointerException("blah");
// }catch(Exception e) {
// e.printStackTrace();
// }
// Pull from input cell.
String ... | String function(int columnIndex, boolean asResource, boolean fillEmptyValue) { String cellValue = record.getQuotelessCommadValue(columnIndex-1); if( this.eParams.getCodebook(columnIndex).containsKey(cellValue) ) { cellValue = this.eParams.getCodebook(columnIndex).get(cellValue).stringValue(); logger.finest(STR+columnIn... | /**
* Convenience method to URI-ify values while retrieving them from the CSVRecord.
*
* @param columnIndex - 1-based.
* @param asResource -
* @param fillEmptyValue - return 'rRcCreference' if the value is empty.
* @return
*/ | Convenience method to URI-ify values while retrieving them from the CSVRecord | getColumnValue | {
"repo_name": "timrdf/csv2rdf4lod",
"path": "src/edu/rpi/tw/data/csv/impl/CSVRecordTemplateFiller.java",
"license": "apache-2.0",
"size": 26734
} | [
"edu.rpi.tw.string.NameFactory"
] | import edu.rpi.tw.string.NameFactory; | import edu.rpi.tw.string.*; | [
"edu.rpi.tw"
] | edu.rpi.tw; | 429,067 |
@Test
public void testWriteWithEmptyPCollection() {
List<String> inputs = new ArrayList<>();
runWrite(inputs, IDENTITY_MAP);
} | void function() { List<String> inputs = new ArrayList<>(); runWrite(inputs, IDENTITY_MAP); } | /**
* Test a Write transform with an empty PCollection.
*/ | Test a Write transform with an empty PCollection | testWriteWithEmptyPCollection | {
"repo_name": "sammcveety/DataflowJavaSDK",
"path": "sdk/src/test/java/com/google/cloud/dataflow/sdk/io/WriteTest.java",
"license": "apache-2.0",
"size": 18276
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 79,935 |
@GET
@Path("search")
@ZeppelinApi
public Response search(@QueryParam("q") String queryTerm) {
LOG.info("Searching notebooks for: {}", queryTerm);
String principal = SecurityUtils.getPrincipal();
HashSet<String> roles = SecurityUtils.getRoles();
HashSet<String> userAndRoles = new HashSet<>();
... | @Path(STR) Response function(@QueryParam("q") String queryTerm) { LOG.info(STR, queryTerm); String principal = SecurityUtils.getPrincipal(); HashSet<String> roles = SecurityUtils.getRoles(); HashSet<String> userAndRoles = new HashSet<>(); userAndRoles.add(principal); userAndRoles.addAll(roles); List<Map<String, String>... | /**
* Search for a Notes with permissions
*/ | Search for a Notes with permissions | search | {
"repo_name": "onkarshedge/incubator-zeppelin",
"path": "zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java",
"license": "apache-2.0",
"size": 27362
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Map",
"javax.ws.rs.Path",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Response",
"org.apache.zeppelin.server.JsonResponse",
"org.apache.zeppelin.utils.SecurityUtils"
] | import java.util.HashSet; import java.util.List; import java.util.Map; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import org.apache.zeppelin.server.JsonResponse; import org.apache.zeppelin.utils.SecurityUtils; | import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.zeppelin.server.*; import org.apache.zeppelin.utils.*; | [
"java.util",
"javax.ws",
"org.apache.zeppelin"
] | java.util; javax.ws; org.apache.zeppelin; | 512,595 |
public static CharArraySet getDefaultStopSet() {
return DefaultSetHolder.DEFAULT_STOP_SET;
}
private static class DefaultSetHolder {
static final CharArraySet DEFAULT_STOP_SET = StandardAnalyzer.STOP_WORDS_SET;
}
public EnglishNoStemAnalyzer() {
this(DefaultSetHolder.... | static CharArraySet function() { return DefaultSetHolder.DEFAULT_STOP_SET; } private static class DefaultSetHolder { static final CharArraySet DEFAULT_STOP_SET = StandardAnalyzer.STOP_WORDS_SET; } public EnglishNoStemAnalyzer() { this(DefaultSetHolder.DEFAULT_STOP_SET); } public EnglishNoStemAnalyzer(CharArraySet stopw... | /**
* Returns an unmodifiable instance of the default stop words set.
*
* @return default stop words set.
*/ | Returns an unmodifiable instance of the default stop words set | getDefaultStopSet | {
"repo_name": "pippokill/tri",
"path": "src/main/java/di/uniba/it/tri/tokenizer/EnglishNoStemAnalyzer.java",
"license": "gpl-3.0",
"size": 3147
} | [
"java.io.Reader",
"org.apache.lucene.analysis.core.LowerCaseFilter",
"org.apache.lucene.analysis.core.StopFilter",
"org.apache.lucene.analysis.en.EnglishPossessiveFilter",
"org.apache.lucene.analysis.standard.StandardAnalyzer",
"org.apache.lucene.analysis.standard.StandardFilter",
"org.apache.lucene.ana... | import java.io.Reader; import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.en.EnglishPossessiveFilter; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.standard.StandardFilter; import o... | import java.io.*; import org.apache.lucene.analysis.core.*; import org.apache.lucene.analysis.en.*; import org.apache.lucene.analysis.standard.*; import org.apache.lucene.analysis.util.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,711,088 |
@Test
public void testShowCaption() {
System.out.println("testShowCaption()");
String username = "username";
String caption = "caption";
String language = "pt";
Resource icon = FontAwesome.ADJUST;
LifetimeButton instance = new LifetimeButtonLink(username, language... | void function() { System.out.println(STR); String username = STR; String caption = STR; String language = "pt"; Resource icon = FontAwesome.ADJUST; LifetimeButton instance = new LifetimeButtonLink(username, language, caption, icon); instance.showCaption(); assertNotNull(instance.getCaption()); } | /**
* Test of showCaption method, of class LifetimeButton.
*/ | Test of showCaption method, of class LifetimeButton | testShowCaption | {
"repo_name": "zuacaldeira/lifetime",
"path": "lifetime-ui/src/test/java/lifetime/component/custom/LifetimeButtonLinkNGTest.java",
"license": "unlicense",
"size": 4155
} | [
"com.vaadin.server.FontAwesome",
"com.vaadin.server.Resource",
"org.testng.Assert"
] | import com.vaadin.server.FontAwesome; import com.vaadin.server.Resource; import org.testng.Assert; | import com.vaadin.server.*; import org.testng.*; | [
"com.vaadin.server",
"org.testng"
] | com.vaadin.server; org.testng; | 2,527,672 |
public static ArrayList<String> collection2ArrayList(Collection<?> c) {
return (ArrayList<String>) castList(String.class, c);
}
| static ArrayList<String> function(Collection<?> c) { return (ArrayList<String>) castList(String.class, c); } | /**
* Safe cast of a collection to a ArrayList<String>. This method prevents
* unchecked conversion warnings. Example: <code>
* ArrayList<String> l = new ArrayList(); // with warning
* ArrayList<String> l = collection2ArrayList(new ArrayList()); // without warning
* </code>
*
* @see http
... | Safe cast of a collection to a ArrayList. This method prevents unchecked conversion warnings. Example: <code> ArrayList l = new ArrayList(); // with warning ArrayList l = collection2ArrayList(new ArrayList()); // without warning </code> | collection2ArrayList | {
"repo_name": "ltog/xtfvt",
"path": "src/main/java/ch/htwchur/xtfvt/helpers/IomXtfUtilityHelper.java",
"license": "lgpl-3.0",
"size": 1085
} | [
"java.util.ArrayList",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,636,353 |
public Paint getTickMarkPaint() {
return this.tickMarkPaint;
} | Paint function() { return this.tickMarkPaint; } | /**
* Returns the paint used to draw tick marks (if they are showing).
*
* @return The paint (never <code>null</code>).
*
* @see #setTickMarkPaint(Paint)
*/ | Returns the paint used to draw tick marks (if they are showing) | getTickMarkPaint | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/axis/Axis.java",
"license": "mit",
"size": 58723
} | [
"java.awt.Paint"
] | import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,080,279 |
public void setPropertyFile(String value) {
File f = (new File(value)).getAbsoluteFile();
if (f.isDirectory()) {
throw new IllegalArgumentException(
String.format("The file %s is a directory.", f));
}
File parent = f.getParentFile();
if (parent != null) {
if (!parent.isDirect... | void function(String value) { File f = (new File(value)).getAbsoluteFile(); if (f.isDirectory()) { throw new IllegalArgumentException( String.format(STR, f)); } File parent = f.getParentFile(); if (parent != null) { if (!parent.isDirectory()) { throw new IllegalArgumentException( String.format(STR, parent)); } } this.p... | /**
* Sets the agent's property file.
*
* @param value the name of the file to save the agent properties in.
* @throws IllegalArgumentException if the specified file is a directory.
* @throws IllegalArgumentException if the specified file's parent is not an existing directory.
*/ | Sets the agent's property file | setPropertyFile | {
"repo_name": "pdxrunner/geode",
"path": "geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java",
"license": "apache-2.0",
"size": 54418
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,885,489 |
public SDVariable softmaxDerivative(SDVariable x, SDVariable wrt, int dimension) {
SDValidation.validateNumerical("softmaxDerivative", "x", x);
SDValidation.validateNumerical("softmaxDerivative", "wrt", wrt);
return new org.nd4j.linalg.api.ops.impl.transforms.gradient.SoftmaxBp(sd,x, wrt, dimension).outpu... | SDVariable function(SDVariable x, SDVariable wrt, int dimension) { SDValidation.validateNumerical(STR, "x", x); SDValidation.validateNumerical(STR, "wrt", wrt); return new org.nd4j.linalg.api.ops.impl.transforms.gradient.SoftmaxBp(sd,x, wrt, dimension).outputVariable(); } | /**
* Softmax derivative function<br>
*
* @param x Softmax input (NUMERIC type)
* @param wrt Gradient at output, dL/dx (NUMERIC type)
* @param dimension Softmax dimension
* @return output (NUMERIC type)
*/ | Softmax derivative function | softmaxDerivative | {
"repo_name": "deeplearning4j/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java",
"license": "apache-2.0",
"size": 59569
} | [
"org.nd4j.autodiff.samediff.SDVariable"
] | import org.nd4j.autodiff.samediff.SDVariable; | import org.nd4j.autodiff.samediff.*; | [
"org.nd4j.autodiff"
] | org.nd4j.autodiff; | 2,157,027 |
RelativeLayout childLayout;
public SlideRevealLayout(Context context) {
super(context);
init(context);
}
public SlideRevealLayout(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
}
public SlideRevealLayout(Context context, AttributeSet attrs, int defStyle) {
super(c... | RelativeLayout childLayout; public SlideRevealLayout(Context context) { super(context); init(context); } public SlideRevealLayout(Context context, AttributeSet attrs) { super(context, attrs); init(context); } public SlideRevealLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); ... | /**
* Sets whether revealing is enabled
* @param enabled Whether revealing should be enabled
*/ | Sets whether revealing is enabled | setRevealEnabled | {
"repo_name": "Raizlabs/RZAndroidBaseUtils",
"path": "BaseUtils/src/com/raizlabs/widget/SlideRevealLayout.java",
"license": "mit",
"size": 16258
} | [
"android.content.Context",
"android.util.AttributeSet",
"android.widget.RelativeLayout"
] | import android.content.Context; import android.util.AttributeSet; import android.widget.RelativeLayout; | import android.content.*; import android.util.*; import android.widget.*; | [
"android.content",
"android.util",
"android.widget"
] | android.content; android.util; android.widget; | 1,010,919 |
// #region validaciones de lectura
public boolean validateReadingDate() {
VoidResult result = ReadingFieldsValidator.validateDateTime(
view.getReadingDate(), "fecha de lectura");
view.setReadingDateErrors(result.getErrors());
return !result.hasErrors();
} | boolean function() { VoidResult result = ReadingFieldsValidator.validateDateTime( view.getReadingDate(), STR); view.setReadingDateErrors(result.getErrors()); return !result.hasErrors(); } | /**
* Valida el campo de fecha de lectura
*
* @return true si es válido
*/ | Valida el campo de fecha de lectura | validateReadingDate | {
"repo_name": "diegoRodriguezAguila/Lecturas.Elfec.GD",
"path": "lecturasElfecGD/src/main/java/com/elfec/lecturas/gd/presenter/ReadingPresenter.java",
"license": "gpl-3.0",
"size": 22158
} | [
"com.elfec.lecturas.gd.business_logic.validators.ReadingFieldsValidator",
"com.elfec.lecturas.gd.model.results.VoidResult"
] | import com.elfec.lecturas.gd.business_logic.validators.ReadingFieldsValidator; import com.elfec.lecturas.gd.model.results.VoidResult; | import com.elfec.lecturas.gd.business_logic.validators.*; import com.elfec.lecturas.gd.model.results.*; | [
"com.elfec.lecturas"
] | com.elfec.lecturas; | 946,689 |
private void manageInputSourceChannelUpdate(AvrResponse response) {
updateState(getChannelUID(PioneerAvrBindingConstants.SET_INPUT_SOURCE_CHANNEL, response.getZone()),
new StringType(response.getParameterValue()));
} | void function(AvrResponse response) { updateState(getChannelUID(PioneerAvrBindingConstants.SET_INPUT_SOURCE_CHANNEL, response.getZone()), new StringType(response.getParameterValue())); } | /**
* Notify an AVR input source channel update to openHAB
*
* @param response
*/ | Notify an AVR input source channel update to openHAB | manageInputSourceChannelUpdate | {
"repo_name": "johannrichard/openhab2-addons",
"path": "addons/binding/org.openhab.binding.pioneeravr/src/main/java/org/openhab/binding/pioneeravr/internal/handler/AbstractAvrHandler.java",
"license": "epl-1.0",
"size": 12700
} | [
"org.eclipse.smarthome.core.library.types.StringType",
"org.openhab.binding.pioneeravr.PioneerAvrBindingConstants",
"org.openhab.binding.pioneeravr.protocol.AvrResponse"
] | import org.eclipse.smarthome.core.library.types.StringType; import org.openhab.binding.pioneeravr.PioneerAvrBindingConstants; import org.openhab.binding.pioneeravr.protocol.AvrResponse; | import org.eclipse.smarthome.core.library.types.*; import org.openhab.binding.pioneeravr.*; import org.openhab.binding.pioneeravr.protocol.*; | [
"org.eclipse.smarthome",
"org.openhab.binding"
] | org.eclipse.smarthome; org.openhab.binding; | 1,256,318 |
public void setRedeliveryPolicies(List<CamelRedeliveryPolicyFactoryBean> redeliveryPolicies) {
this.redeliveryPolicies = redeliveryPolicies;
} | void function(List<CamelRedeliveryPolicyFactoryBean> redeliveryPolicies) { this.redeliveryPolicies = redeliveryPolicies; } | /**
* Configuration of redelivery settings.
*/ | Configuration of redelivery settings | setRedeliveryPolicies | {
"repo_name": "jarst/camel",
"path": "components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java",
"license": "apache-2.0",
"size": 36496
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 503,857 |
public void logInfo(String msg) {
if (canLogAtLevel(LogLevel.INFO)) {
Log.i(mTag, msg);
}
} | void function(String msg) { if (canLogAtLevel(LogLevel.INFO)) { Log.i(mTag, msg); } } | /**
* Logs the info message.
*
* @param msg the message
*/ | Logs the info message | logInfo | {
"repo_name": "vinay-choudhary/logwrapper",
"path": "code/src/com/vinaychoudhary/common/util/LogWrapper.java",
"license": "gpl-2.0",
"size": 23697
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 987,967 |
@SuppressWarnings("unchecked")
public final Coalesce<T> coalesce(Expression<?>...exprs) {
Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin);
for (Expression expr : exprs) {
coalesce.add(expr);
}
return coalesce;
} | @SuppressWarnings(STR) final Coalesce<T> function(Expression<?>...exprs) { Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin); for (Expression expr : exprs) { coalesce.add(expr); } return coalesce; } | /**
* Create a {@code coalesce(this, exprs...)} expression
*
* @param exprs additional arguments
* @return coalesce
*/ | Create a coalesce(this, exprs...) expression | coalesce | {
"repo_name": "izeye/querydsl",
"path": "querydsl-core/src/main/java/com/querydsl/core/types/dsl/ComparableExpressionBase.java",
"license": "apache-2.0",
"size": 2711
} | [
"com.querydsl.core.types.Expression"
] | import com.querydsl.core.types.Expression; | import com.querydsl.core.types.*; | [
"com.querydsl.core"
] | com.querydsl.core; | 342,394 |
public DcmElement putAS(int tag) {
return put(StringElement.createAS(tag));
} | DcmElement function(int tag) { return put(StringElement.createAS(tag)); } | /**
* Description of the Method
*
* @param tag
* Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putAS | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_30/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 85555
} | [
"org.dcm4che.data.DcmElement"
] | import org.dcm4che.data.DcmElement; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 2,685,009 |
public static IntValuedEnum<LiblasLibrary.LASError > LASHeader_SetFileSourceId(LiblasLibrary.LASHeaderH hHeader, short value) {
return FlagSet.fromValue(LASHeader_SetFileSourceId(Pointer.getPeer(hHeader), value), LiblasLibrary.LASError.class);
} | static IntValuedEnum<LiblasLibrary.LASError > function(LiblasLibrary.LASHeaderH hHeader, short value) { return FlagSet.fromValue(LASHeader_SetFileSourceId(Pointer.getPeer(hHeader), value), LiblasLibrary.LASError.class); } | /**
* Sets the FileSource ID value for the header. By default, this value is "0" if it <br>
* is not explicitly set. See the LAS specification for details on what this<br>
* value should logically be set to.<br>
* @param hHeader LASHeaderH instance<br>
* @param value the value to set as the FileSource I... | Sets the FileSource ID value for the header. By default, this value is "0" if it is not explicitly set. See the LAS specification for details on what this value should logically be set to | LASHeader_SetFileSourceId | {
"repo_name": "petvana/las-bridj",
"path": "src/main/java/com/github/petvana/liblas/jna/LiblasLibrary.java",
"license": "bsd-3-clause",
"size": 116212
} | [
"org.bridj.FlagSet",
"org.bridj.IntValuedEnum",
"org.bridj.Pointer"
] | import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer; | import org.bridj.*; | [
"org.bridj"
] | org.bridj; | 1,558,076 |
@Test
public void testExtractClassificationMetadata2(){
AdapterComponentDocRepositoryHelper docRepoHelper = new AdapterComponentDocRepositoryHelper();
String result = null;
List<ClassificationType> classifications = new ArrayList();
ClassificationType classificationType = mock(ClassificationType.class);
c... | void function(){ AdapterComponentDocRepositoryHelper docRepoHelper = new AdapterComponentDocRepositoryHelper(); String result = null; List<ClassificationType> classifications = new ArrayList(); ClassificationType classificationType = mock(ClassificationType.class); classifications.add(classificationType); International... | /**
* Test for extractClassificationMetadata(List<ClassificationType>, String, String).
*/ | Test for extractClassificationMetadata(List, String, String) | testExtractClassificationMetadata2 | {
"repo_name": "beiyuxinke/CONNECT",
"path": "Product/Production/Common/CONNECTCoreLib/src/test/java/gov/hhs/fha/nhinc/docrepository/adapter/AdapterComponentDocRepositoryHelperTest.java",
"license": "bsd-3-clause",
"size": 8431
} | [
"java.util.ArrayList",
"java.util.List",
"org.junit.Assert",
"org.mockito.Mockito"
] | import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.mockito.Mockito; | import java.util.*; import org.junit.*; import org.mockito.*; | [
"java.util",
"org.junit",
"org.mockito"
] | java.util; org.junit; org.mockito; | 2,020,888 |
private void ensureReserved(long pos) throws IOException {
if (pos <= mPosReserved) {
return;
}
long toReserve = Math.max(pos - mPosReserved, mFileBufferBytes);
CreateLocalBlockRequest request =
mCreateRequest.toBuilder().setSpaceToReserve(toReserve).setOnlyReserveSpace(true).build();
... | void function(long pos) throws IOException { if (pos <= mPosReserved) { return; } long toReserve = Math.max(pos - mPosReserved, mFileBufferBytes); CreateLocalBlockRequest request = mCreateRequest.toBuilder().setSpaceToReserve(toReserve).setOnlyReserveSpace(true).build(); mStream.send(request, mDataTimeoutMs); CreateLoc... | /**
* Reserves enough space in the block worker.
*
* @param pos the pos of the file/block to reserve to
*/ | Reserves enough space in the block worker | ensureReserved | {
"repo_name": "EvilMcJerkface/alluxio",
"path": "core/client/fs/src/main/java/alluxio/client/block/stream/LocalFileDataWriter.java",
"license": "apache-2.0",
"size": 7561
} | [
"com.google.common.base.Preconditions",
"java.io.IOException"
] | import com.google.common.base.Preconditions; import java.io.IOException; | import com.google.common.base.*; import java.io.*; | [
"com.google.common",
"java.io"
] | com.google.common; java.io; | 1,927,596 |
@Override
public Fill getFill(GraphicFill graphicFill, GraphicPanelFieldManager fieldConfigManager) {
return null;
} | Fill function(GraphicFill graphicFill, GraphicPanelFieldManager fieldConfigManager) { return null; } | /**
* Gets the fill.
*
* @param graphicFill the graphic fill
* @param fieldConfigManager the field config manager
* @return the fill
*/ | Gets the fill | getFill | {
"repo_name": "robward-scisys/sldeditor",
"path": "modules/application/src/main/java/com/sldeditor/ui/detail/vendor/geoserver/marker/windbarb/FieldConfigWindBarbs.java",
"license": "gpl-3.0",
"size": 15862
} | [
"com.sldeditor.ui.detail.GraphicPanelFieldManager",
"org.geotools.styling.Fill",
"org.opengis.style.GraphicFill"
] | import com.sldeditor.ui.detail.GraphicPanelFieldManager; import org.geotools.styling.Fill; import org.opengis.style.GraphicFill; | import com.sldeditor.ui.detail.*; import org.geotools.styling.*; import org.opengis.style.*; | [
"com.sldeditor.ui",
"org.geotools.styling",
"org.opengis.style"
] | com.sldeditor.ui; org.geotools.styling; org.opengis.style; | 1,670,689 |
public static Intent createFindAndUploadLastCrashIntent(Context context) {
Intent intent = new Intent(context, MinidumpUploadService.class);
intent.setAction(ACTION_FIND_LAST);
return intent;
} | static Intent function(Context context) { Intent intent = new Intent(context, MinidumpUploadService.class); intent.setAction(ACTION_FIND_LAST); return intent; } | /**
* Creates an intent that when started will find the last created minidump,
* and try to upload it.
*
* @param context the context to use for the intent.
* @return an Intent to use to start the service.
*/ | Creates an intent that when started will find the last created minidump, and try to upload it | createFindAndUploadLastCrashIntent | {
"repo_name": "Pluto-tv/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadService.java",
"license": "bsd-3-clause",
"size": 11977
} | [
"android.content.Context",
"android.content.Intent"
] | import android.content.Context; import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 526,988 |
@SuppressWarnings("unchecked")
protected QB assertSerialization(QB testQuery) throws IOException {
try (BytesStreamOutput output = new BytesStreamOutput()) {
testQuery.writeTo(output);
try (StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(output.bytes()), name... | @SuppressWarnings(STR) QB function(QB testQuery) throws IOException { try (BytesStreamOutput output = new BytesStreamOutput()) { testQuery.writeTo(output); try (StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(output.bytes()), namedWriteableRegistry)) { QueryBuilder<?> prototype = queryParser(testQu... | /**
* Serialize the given query builder and asserts that both are equal
*/ | Serialize the given query builder and asserts that both are equal | assertSerialization | {
"repo_name": "markharwood/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java",
"license": "apache-2.0",
"size": 46530
} | [
"java.io.IOException",
"org.elasticsearch.common.io.stream.BytesStreamOutput",
"org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput",
"org.elasticsearch.common.io.stream.StreamInput"
] | import java.io.IOException; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput; import org.elasticsearch.common.io.stream.StreamInput; | import java.io.*; import org.elasticsearch.common.io.stream.*; | [
"java.io",
"org.elasticsearch.common"
] | java.io; org.elasticsearch.common; | 810,402 |
public static String getString(JsonObject object, String field, String defaultValue) {
final JsonValue value = object.get(field);
if (value == null) {
return defaultValue;
} else {
return value.asString();
}
} | static String function(JsonObject object, String field, String defaultValue) { final JsonValue value = object.get(field); if (value == null) { return defaultValue; } else { return value.asString(); } } | /**
* Returns a field in a Json object as a string.
*
* @param object the Json Object
* @param field the field in the Json object to return
* @param defaultValue a default value for the field if the field value is null
* @return the Json field value as a string
*/ | Returns a field in a Json object as a string | getString | {
"repo_name": "lmjacksoniii/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java",
"license": "apache-2.0",
"size": 9733
} | [
"com.eclipsesource.json.JsonObject",
"com.eclipsesource.json.JsonValue"
] | import com.eclipsesource.json.JsonObject; import com.eclipsesource.json.JsonValue; | import com.eclipsesource.json.*; | [
"com.eclipsesource.json"
] | com.eclipsesource.json; | 2,729,629 |
public Object visit(final SwitchStatement node) {
print("l." + node.getBeginLine() + " SwitchStatement {");
print("selector:");
indent();
node.getSelector().acceptVisitor(this);
unindent();
print("bindings:");
indent();
final Iterator it = node... | Object function(final SwitchStatement node) { print("l." + node.getBeginLine() + STR); print(STR); indent(); node.getSelector().acceptVisitor(this); unindent(); print(STR); indent(); final Iterator it = node.getBindings().iterator(); while (it.hasNext()) { ((Node) it.next()).acceptVisitor(this); } unindent(); displayPr... | /**
* Visits a SwitchStatement
*
* @param node the node to visit
*/ | Visits a SwitchStatement | visit | {
"repo_name": "mbshopM/openconcerto",
"path": "OpenConcerto/src/koala/dynamicjava/util/DisplayVisitor.java",
"license": "gpl-3.0",
"size": 51773
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,682,704 |
ImmutableList<SchemaOrgType> getResultList(); | ImmutableList<SchemaOrgType> getResultList(); | /**
* Returns the value list of property result. Empty list is returned if the property not set in
* current object.
*/ | Returns the value list of property result. Empty list is returned if the property not set in current object | getResultList | {
"repo_name": "google/schemaorg-java",
"path": "src/main/java/com/google/schemaorg/core/Action.java",
"license": "apache-2.0",
"size": 10417
} | [
"com.google.common.collect.ImmutableList",
"com.google.schemaorg.SchemaOrgType"
] | import com.google.common.collect.ImmutableList; import com.google.schemaorg.SchemaOrgType; | import com.google.common.collect.*; import com.google.schemaorg.*; | [
"com.google.common",
"com.google.schemaorg"
] | com.google.common; com.google.schemaorg; | 843,918 |
public List<Setor> findByHospital(Hospital hospital);
| List<Setor> function(Hospital hospital); | /**
* Metodo para retornar uma lista de setores a partir do hospital
* @param hospital, Hospital ao qual o setor pertence.
* @return Lista de Setor relacionada ao Hospital dado.
*/ | Metodo para retornar uma lista de setores a partir do hospital | findByHospital | {
"repo_name": "asleao/sincap-entities",
"path": "src/main/java/br/ifes/leds/sincap/controleInterno/cgd/SetorRepository.java",
"license": "gpl-2.0",
"size": 1192
} | [
"br.ifes.leds.sincap.controleInterno.cln.cdp.Hospital",
"br.ifes.leds.sincap.controleInterno.cln.cdp.Setor",
"java.util.List"
] | import br.ifes.leds.sincap.controleInterno.cln.cdp.Hospital; import br.ifes.leds.sincap.controleInterno.cln.cdp.Setor; import java.util.List; | import br.ifes.leds.sincap.*; import java.util.*; | [
"br.ifes.leds",
"java.util"
] | br.ifes.leds; java.util; | 2,359,966 |
public Object getValue() {
return (parent.valueType > HARD) ? ((Reference) value).get() : value;
}
| Object function() { return (parent.valueType > HARD) ? ((Reference) value).get() : value; } | /**
* Gets the value from the entry.
* This method dereferences weak and soft value and thus may return null.
*
* @return the value, which may be null if it was garbage collected
*/ | Gets the value from the entry. This method dereferences weak and soft value and thus may return null | getValue | {
"repo_name": "intelie/esper",
"path": "esper/src/main/java/com/espertech/esper/collection/apachecommons/AbstractReferenceMap.java",
"license": "gpl-2.0",
"size": 32760
} | [
"java.lang.ref.Reference"
] | import java.lang.ref.Reference; | import java.lang.ref.*; | [
"java.lang"
] | java.lang; | 1,180,890 |
private void initializeCommand(Guid storageId) {
initializeCommand(storageId, VolumeType.Unassigned);
} | void function(Guid storageId) { initializeCommand(storageId, VolumeType.Unassigned); } | /**
* Initialize the command for testing, using the given storage domain id for the parameters.
*
* @param storageId
* Storage domain id for the parameters
*/ | Initialize the command for testing, using the given storage domain id for the parameters | initializeCommand | {
"repo_name": "Dhandapani/gluster-ovirt",
"path": "backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddDiskToVmCommandTest.java",
"license": "apache-2.0",
"size": 16486
} | [
"org.ovirt.engine.core.common.businessentities.VolumeType",
"org.ovirt.engine.core.compat.Guid"
] | import org.ovirt.engine.core.common.businessentities.VolumeType; import org.ovirt.engine.core.compat.Guid; | import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 969,807 |
public static List<Module> getLoadedModulesCoreFirst() {
List<Module> list = new ArrayList<Module>(getLoadedModules());
final Collection<String> coreModuleIds = ModuleConstants.CORE_MODULES.keySet();
Collections.sort(list, new Comparator<Module>() {
| static List<Module> function() { List<Module> list = new ArrayList<Module>(getLoadedModules()); final Collection<String> coreModuleIds = ModuleConstants.CORE_MODULES.keySet(); Collections.sort(list, new Comparator<Module>() { | /**
* Returns all modules found/loaded into the system (started and not started), with the core
* modules at the start of that list
*
* @return <code>List<Module></code> of the modules loaded into the system, with the core
* modules first.
*/ | Returns all modules found/loaded into the system (started and not started), with the core modules at the start of that list | getLoadedModulesCoreFirst | {
"repo_name": "milankarunarathne/openmrs-core",
"path": "api/src/main/java/org/openmrs/module/ModuleFactory.java",
"license": "mpl-2.0",
"size": 56000
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.Comparator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 643,944 |
private void commit() throws IOException {
try {
response.commit();
} catch(Exception cause) {
throw new ResponseException("Unable to commit", cause);
}
} | void function() throws IOException { try { response.commit(); } catch(Exception cause) { throw new ResponseException(STR, cause); } } | /**
* This is used to compose the HTTP header and send it over the
* transport to the client. Once done the response is committed
* and no more headers can be set, also the semantics of the
* response have been committed and the encoder is created.
*/ | This is used to compose the HTTP header and send it over the transport to the client. Once done the response is committed and no more headers can be set, also the semantics of the response have been committed and the encoder is created | commit | {
"repo_name": "ggeorg/chillverse",
"path": "simple-http/src/main/java/org/simpleframework/http/core/ResponseEncoder.java",
"license": "apache-2.0",
"size": 11465
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,682,992 |
public EntityReference createEntityReference(String name)
{
DomEntityReference ret = new DomEntityReference(this, name);
DocumentType doctype = getDoctype();
if (doctype != null)
{
DomEntity ent = (DomEntity) doctype.getEntities().getNamedItem(name);
if (ent != null)
{
... | EntityReference function(String name) { DomEntityReference ret = new DomEntityReference(this, name); DocumentType doctype = getDoctype(); if (doctype != null) { DomEntity ent = (DomEntity) doctype.getEntities().getNamedItem(name); if (ent != null) { for (DomNode ctx = ent.first; ctx != null; ctx = ctx.next) { ret.appen... | /**
* <b>DOM L1</b>
* Returns a newly created reference to the specified entity.
* The caller should populate this with the appropriate children
* and then mark it as readonly.
*
* @see DomNode#makeReadonly
*/ | DOM L1 Returns a newly created reference to the specified entity. The caller should populate this with the appropriate children and then mark it as readonly | createEntityReference | {
"repo_name": "ivmai/JCGO",
"path": "goclsp/clsp_fix/gnu/xml/dom/DomDocument.java",
"license": "gpl-2.0",
"size": 47179
} | [
"org.w3c.dom.DocumentType",
"org.w3c.dom.EntityReference"
] | import org.w3c.dom.DocumentType; import org.w3c.dom.EntityReference; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,115,111 |
public void testSyntaxErrorInEval() {
final StringWriter stdout = new StringWriter();
final StringWriter stderr = new StringWriter();
final OctaveEngineFactory octaveEngineFactory = new OctaveEngineFactory();
octaveEngineFactory.setErrorWriter(stderr);
final OctaveEngine octa... | void function() { final StringWriter stdout = new StringWriter(); final StringWriter stderr = new StringWriter(); final OctaveEngineFactory octaveEngineFactory = new OctaveEngineFactory(); octaveEngineFactory.setErrorWriter(stderr); final OctaveEngine octave = octaveEngineFactory.getScriptEngine(); octave.setWriter(std... | /**
* Test that syntax error in eval() does not break the engine
*/ | Test that syntax error in eval() does not break the engine | testSyntaxErrorInEval | {
"repo_name": "prateek/javaoctave",
"path": "src/test/java/dk/ange/octave/TestOctaveErrors.java",
"license": "apache-2.0",
"size": 10250
} | [
"dk.ange.octave.exception.OctaveIOException",
"dk.ange.octave.exception.OctaveNonrecoverableException",
"dk.ange.octave.type.OctaveString",
"java.io.StringWriter"
] | import dk.ange.octave.exception.OctaveIOException; import dk.ange.octave.exception.OctaveNonrecoverableException; import dk.ange.octave.type.OctaveString; import java.io.StringWriter; | import dk.ange.octave.exception.*; import dk.ange.octave.type.*; import java.io.*; | [
"dk.ange.octave",
"java.io"
] | dk.ange.octave; java.io; | 2,382,100 |
public static <T> Expression mandatoryBodyExpression(final Class<T> type) {
return mandatoryBodyExpression(type, false);
} | static <T> Expression function(final Class<T> type) { return mandatoryBodyExpression(type, false); } | /**
* Returns the expression for the exchanges inbound message body converted
* to the given type.
* <p/>
* Does <b>not</b> allow null bodies.
*/ | Returns the expression for the exchanges inbound message body converted to the given type. Does not allow null bodies | mandatoryBodyExpression | {
"repo_name": "lburgazzoli/apache-camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java",
"license": "apache-2.0",
"size": 92185
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 529,494 |
void setEnabledA(AtomicBoolean value); | void setEnabledA(AtomicBoolean value); | /**
* Sets the value of the '{@link org.openhab.binding.tinkerforge.internal.model.MBaseDevice#getEnabledA <em>Enabled A</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Enabled A</em>' attribute.
* @see #getEnabledA()
* @generated
*/ | Sets the value of the '<code>org.openhab.binding.tinkerforge.internal.model.MBaseDevice#getEnabledA Enabled A</code>' attribute. | setEnabledA | {
"repo_name": "Greblys/openhab",
"path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/MBaseDevice.java",
"license": "epl-1.0",
"size": 5369
} | [
"java.util.concurrent.atomic.AtomicBoolean"
] | import java.util.concurrent.atomic.AtomicBoolean; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 463,282 |
public void sortSeries(SeriesPointsList series) {
series.sortPoints();
} | void function(SeriesPointsList series) { series.sortPoints(); } | /**
* sorts a points list as on points ascending
*
* @param series
* pointslist to be sorted
*/ | sorts a points list as on points ascending | sortSeries | {
"repo_name": "sgrosven/gromurph",
"path": "Javascore/src/main/java/org/gromurph/javascore/model/scoring/ScoringLowPoint.java",
"license": "gpl-2.0",
"size": 22409
} | [
"org.gromurph.javascore.model.SeriesPointsList"
] | import org.gromurph.javascore.model.SeriesPointsList; | import org.gromurph.javascore.model.*; | [
"org.gromurph.javascore"
] | org.gromurph.javascore; | 240,881 |
public Point2D[] vertexArray() {
return this.vertices.toArray(new Point2D[] {});
}
| Point2D[] function() { return this.vertices.toArray(new Point2D[] {}); } | /**
* Returns the collection of vertices as an array of Point2D.
*
* @return an array of Point2D
*/ | Returns the collection of vertices as an array of Point2D | vertexArray | {
"repo_name": "pokowaka/android-geom",
"path": "geom/src/main/java/math/geom2d/polygon/LinearCurve2D.java",
"license": "lgpl-2.1",
"size": 18055
} | [
"math.geom2d.Point2D"
] | import math.geom2d.Point2D; | import math.geom2d.*; | [
"math.geom2d"
] | math.geom2d; | 2,722,293 |
public void testFloorKey() {
TreeMap q = map5();
Object e1 = q.floorKey(three);
assertEquals(three, e1);
Object e2 = q.floorKey(six);
assertEquals(five, e2);
Object e3 = q.floorKey(one);
assertEquals(one, e3);
Object e4 = q.floorKey(zero);
a... | void function() { TreeMap q = map5(); Object e1 = q.floorKey(three); assertEquals(three, e1); Object e2 = q.floorKey(six); assertEquals(five, e2); Object e3 = q.floorKey(one); assertEquals(one, e3); Object e4 = q.floorKey(zero); assertNull(e4); } | /**
* floorKey returns preceding element
*/ | floorKey returns preceding element | testFloorKey | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "jsr166-tests/src/test/java/jsr166/TreeMapTest.java",
"license": "gpl-2.0",
"size": 33145
} | [
"java.util.TreeMap"
] | import java.util.TreeMap; | import java.util.*; | [
"java.util"
] | java.util; | 43,411 |
public boolean onCreateOptionsMenu(Menu menu) {
return true;
} | boolean function(Menu menu) { return true; } | /**
* Action bar helper code to be run in
* {@link Activity#onCreateOptionsMenu(android.view.Menu)}.
*
* NOTE: Setting the visibility of menu items in <em>menu</em> is not
* currently supported.
*/ | Action bar helper code to be run in <code>Activity#onCreateOptionsMenu(android.view.Menu)</code>. currently supported | onCreateOptionsMenu | {
"repo_name": "bjoernlohrmann/livescale-toolkit",
"path": "livescale-examples/livestream/livestream-android/src/de/tuberlin/cit/livestream/android/view/actionbar/ActionBarHelper.java",
"license": "apache-2.0",
"size": 3397
} | [
"android.view.Menu"
] | import android.view.Menu; | import android.view.*; | [
"android.view"
] | android.view; | 97,342 |
@Override
public boolean showWarning() {
if (getPosition() == AbstractNavTable.EMPTY_REGISTER) {
return true;
}
if (isChangedValues()) {
boolean save = false;
Object[] options = {
PluginServices.getText(this, "saveButtonTooltip"),
PluginServices.getText(this, "ignoreButton") };
... | boolean function() { if (getPosition() == AbstractNavTable.EMPTY_REGISTER) { return true; } if (isChangedValues()) { boolean save = false; Object[] options = { PluginServices.getText(this, STR), PluginServices.getText(this, STR) }; int response = JOptionPane.showOptionDialog(this, PluginServices.getText(this, STR), Plu... | /**
* Shows a warning to the user if there's unsaved data.
*
*/ | Shows a warning to the user if there's unsaved data | showWarning | {
"repo_name": "iCarto/siga",
"path": "extNavTable/src/es/udc/cartolab/gvsig/navtable/AlphanumericNavTable.java",
"license": "gpl-3.0",
"size": 9938
} | [
"com.iver.andami.PluginServices",
"javax.swing.JOptionPane"
] | import com.iver.andami.PluginServices; import javax.swing.JOptionPane; | import com.iver.andami.*; import javax.swing.*; | [
"com.iver.andami",
"javax.swing"
] | com.iver.andami; javax.swing; | 196,252 |
private void addRecipientList(final Collection<String> addresses, final Message.RecipientType recipientType) {
try {
InternetAddress address;
for (String addressAsString : addresses) {
if (addressAsString != null) {
address = new InternetAddress(addressAsString.trim());
currentMessage.add... | void function(final Collection<String> addresses, final Message.RecipientType recipientType) { try { InternetAddress address; for (String addressAsString : addresses) { if (addressAsString != null) { address = new InternetAddress(addressAsString.trim()); currentMessage.addRecipient(recipientType, address); } } } catch ... | /**
* <p>
* Internal utility method to add a list of addresses to the email's
* recipient list.
* </p>
*
* @param addresses
* The list of recipient addresses.
* @param recipientType
* The recipient type e.g. 'To:', 'Cc:' or 'Bcc:'.
* @throws Latency4JException
* ... | Internal utility method to add a list of addresses to the email's recipient list. | addRecipientList | {
"repo_name": "latency4j/repo",
"path": "core/src/main/java/org/latency4j/util/Latency4JEmailSender.java",
"license": "gpl-3.0",
"size": 22568
} | [
"java.util.Collection",
"javax.mail.Message",
"javax.mail.MessagingException",
"javax.mail.internet.InternetAddress",
"org.latency4j.Latency4JException"
] | import java.util.Collection; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.internet.InternetAddress; import org.latency4j.Latency4JException; | import java.util.*; import javax.mail.*; import javax.mail.internet.*; import org.latency4j.*; | [
"java.util",
"javax.mail",
"org.latency4j"
] | java.util; javax.mail; org.latency4j; | 511,850 |
public static double parseDouble(CharSequence csq, Cursor cursor)
throws NumberFormatException {
final int start = cursor.getIndex();
final int end = csq.length();
int i = start;
char c = csq.charAt(i);
// Checks for NaN.
if ((c == 'N') && match("NaN", cs... | static double function(CharSequence csq, Cursor cursor) throws NumberFormatException { final int start = cursor.getIndex(); final int end = csq.length(); int i = start; char c = csq.charAt(i); if ((c == 'N') && match("NaN", csq, i, end)) { cursor.increment(3); return Double.NaN; } boolean isNegative = (c == '-'); if ((... | /**
* Parses the specified character sequence from the specified position
* as a <code>double</code>.
*
* @param csq the character sequence to parse.
* @param cursor the cursor position (being maintained) or
* <code>null></code> to parse the whole character sequence.
* @retur... | Parses the specified character sequence from the specified position as a <code>double</code> | parseDouble | {
"repo_name": "mariusj/org.openntf.domino",
"path": "domino/externals/javolution/src/main/java/javolution/text/TypeFormat.java",
"license": "apache-2.0",
"size": 30208
} | [
"javolution.lang.MathLib"
] | import javolution.lang.MathLib; | import javolution.lang.*; | [
"javolution.lang"
] | javolution.lang; | 877,933 |
public NXTables getTables() {
return tables;
} | NXTables function() { return tables; } | /**
* Gets the {@code NXTables} from this file.
*
* @return this file's offset tables
*/ | Gets the NXTables from this file | getTables | {
"repo_name": "aatxe/pkgnx",
"path": "src/main/java/us/aaronweiss/pkgnx/NXFile.java",
"license": "mit",
"size": 3136
} | [
"us.aaronweiss.pkgnx.internal.NXTables"
] | import us.aaronweiss.pkgnx.internal.NXTables; | import us.aaronweiss.pkgnx.internal.*; | [
"us.aaronweiss.pkgnx"
] | us.aaronweiss.pkgnx; | 2,871,389 |
public static IBond getClosestBond(int xPosition, int yPosition, IAtomContainer atomCon) {
Point2d bondCenter;
IBond closestBond = null;
double smallestMouseDistance = -1;
double mouseDistance;
Iterator<IBond> bonds = atomCon.bonds().iterator();
while (bonds.hasNext(... | static IBond function(int xPosition, int yPosition, IAtomContainer atomCon) { Point2d bondCenter; IBond closestBond = null; double smallestMouseDistance = -1; double mouseDistance; Iterator<IBond> bonds = atomCon.bonds().iterator(); while (bonds.hasNext()) { IBond currentBond = (IBond) bonds.next(); bondCenter = get2DC... | /**
* Returns the bond of the given molecule that is closest to the given
* coordinates. See comment for center(IAtomContainer atomCon, Dimension
* areaDim, HashMap renderingCoordinates) for details on coordinate sets
*
* @param xPosition The x coordinate
* @param yPosition The y coordinat... | Returns the bond of the given molecule that is closest to the given coordinates. See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets | getClosestBond | {
"repo_name": "asad/ReactionDecoder",
"path": "src/main/java/uk/ac/ebi/reactionblast/graphics/direct/GeometryTools.java",
"license": "lgpl-3.0",
"size": 74105
} | [
"java.util.Iterator",
"javax.vecmath.Point2d",
"org.openscience.cdk.interfaces.IAtomContainer",
"org.openscience.cdk.interfaces.IBond"
] | import java.util.Iterator; import javax.vecmath.Point2d; import org.openscience.cdk.interfaces.IAtomContainer; import org.openscience.cdk.interfaces.IBond; | import java.util.*; import javax.vecmath.*; import org.openscience.cdk.interfaces.*; | [
"java.util",
"javax.vecmath",
"org.openscience.cdk"
] | java.util; javax.vecmath; org.openscience.cdk; | 1,744,162 |
public WireTapDefinition<Type> wireTap(Endpoint endpoint) {
WireTapDefinition answer = new WireTapDefinition();
answer.setUri(endpoint.getEndpointUri());
addOutput(answer);
return answer;
} | WireTapDefinition<Type> function(Endpoint endpoint) { WireTapDefinition answer = new WireTapDefinition(); answer.setUri(endpoint.getEndpointUri()); addOutput(answer); return answer; } | /**
* <a href="http://camel.apache.org/wiretap.html">WireTap EIP:</a>
* Sends messages to all its child outputs; so that each processor and
* destination gets a copy of the original message to avoid the processors
* interfering with each other using {@link ExchangePattern#InOnly}.
*
* @par... | Sends messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other using <code>ExchangePattern#InOnly</code> | wireTap | {
"repo_name": "davidkarlsen/camel",
"path": "core/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 149529
} | [
"org.apache.camel.Endpoint"
] | import org.apache.camel.Endpoint; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,640,809 |
private void setData(final String data) throws Exception {
final InputStream istream = new ByteArrayInputStream(
data.getBytes(Charset.forName("UTF-8")));
BufferedReader reader = new BufferedReader(new InputStreamReader(istream));
PowerMockito.doReturn(reader).when(TextImporter.class,
... | void function(final String data) throws Exception { final InputStream istream = new ByteArrayInputStream( data.getBytes(Charset.forName("UTF-8"))); BufferedReader reader = new BufferedReader(new InputStreamReader(istream)); PowerMockito.doReturn(reader).when(TextImporter.class, PowerMockito.method(TextImporter.class, "... | /**
* Helper to set the reader buffer. Just pass a string to use for the unit test
* @param data The data to set
*/ | Helper to set the reader buffer. Just pass a string to use for the unit test | setData | {
"repo_name": "cyngn/opentsdb",
"path": "test/tools/TestTextImporter.java",
"license": "gpl-3.0",
"size": 23150
} | [
"java.io.BufferedReader",
"java.io.ByteArrayInputStream",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.nio.charset.Charset",
"org.mockito.Mockito",
"org.powermock.api.mockito.PowerMockito"
] | import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.Charset; import org.mockito.Mockito; import org.powermock.api.mockito.PowerMockito; | import java.io.*; import java.nio.charset.*; import org.mockito.*; import org.powermock.api.mockito.*; | [
"java.io",
"java.nio",
"org.mockito",
"org.powermock.api"
] | java.io; java.nio; org.mockito; org.powermock.api; | 1,793,783 |
private void testDefaultReport(CoveringArrayParameters parameters[])
{
File report = new File(this.OUTPUT_PATH + "default_report.txt");
CAReportUtils.prepareReport(report, parameters, null, null);
} | void function(CoveringArrayParameters parameters[]) { File report = new File(this.OUTPUT_PATH + STR); CAReportUtils.prepareReport(report, parameters, null, null); } | /**
* Creates a default report.
* @param parameters the example parameters that are passed.
*/ | Creates a default report | testDefaultReport | {
"repo_name": "RushangKaria/JEssentials",
"path": "samples/coveringarray/report/CAReportUtilsDemo.java",
"license": "gpl-3.0",
"size": 3845
} | [
"com.coveringarray.CoveringArrayParameters",
"com.coveringarray.report.CAReportUtils",
"java.io.File"
] | import com.coveringarray.CoveringArrayParameters; import com.coveringarray.report.CAReportUtils; import java.io.File; | import com.coveringarray.*; import com.coveringarray.report.*; import java.io.*; | [
"com.coveringarray",
"com.coveringarray.report",
"java.io"
] | com.coveringarray; com.coveringarray.report; java.io; | 1,693,915 |
public Iterator getPendingFKs()
{
return _waitedForIdentites.iterator();
} | Iterator function() { return _waitedForIdentites.iterator(); } | /**
* Returns the identities of the object that this object is waiting for.
*
* @return The identities
*/ | Returns the identities of the object that this object is waiting for | getPendingFKs | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/tools/src/ddlutils/java/org/apache/ddlutils/io/WaitingObject.java",
"license": "apache-2.0",
"size": 3726
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,918,734 |
public void testIsAppCacheEnabledOverridesExtends() throws Exception {
DefDescriptor<ApplicationDef> parentDesc = addSourceAutoCleanup(ApplicationDef.class,
String.format(baseTag, "useAppcache='true' extensible='true'", ""));
DefDescriptor<ApplicationDef> desc = addSourceAutoCleanup(... | void function() throws Exception { DefDescriptor<ApplicationDef> parentDesc = addSourceAutoCleanup(ApplicationDef.class, String.format(baseTag, STR, STRextends='%s' useAppcache='false'STR")); ApplicationDef appdef = Aura.getDefinitionService().getDefinition(desc); assertEquals(Boolean.FALSE, appdef.isAppcacheEnabled())... | /**
* App's useAppcache attribute value overrides value from parent app
*/ | App's useAppcache attribute value overrides value from parent app | testIsAppCacheEnabledOverridesExtends | {
"repo_name": "TribeMedia/aura",
"path": "aura-integration-test/src/test/java/org/auraframework/integration/test/def/ApplicationDefTest.java",
"license": "apache-2.0",
"size": 9952
} | [
"org.auraframework.Aura",
"org.auraframework.def.ApplicationDef",
"org.auraframework.def.DefDescriptor"
] | import org.auraframework.Aura; import org.auraframework.def.ApplicationDef; import org.auraframework.def.DefDescriptor; | import org.auraframework.*; import org.auraframework.def.*; | [
"org.auraframework",
"org.auraframework.def"
] | org.auraframework; org.auraframework.def; | 512,851 |
protected ConstraintMapping makeConstraintMapping (Constraint constraint, String url, String method, String[] omissions)
{
ConstraintMapping mapping = new ConstraintMapping();
mapping.setConstraint(constraint);
mapping.setPathSpec(url);
if (method != null)
mapping.set... | ConstraintMapping function (Constraint constraint, String url, String method, String[] omissions) { ConstraintMapping mapping = new ConstraintMapping(); mapping.setConstraint(constraint); mapping.setPathSpec(url); if (method != null) mapping.setMethod(method); if (omissions != null) mapping.setMethodOmissions(omissions... | /**
* Make a ConstraintMapping which captures the <http-method> or <http-method-omission> elements for a particular url pattern,
* and relates it to a Constraint object (<auth-constraint> and <user-data-constraint>).
* @param constraint
* @param url
* @param method
* @param omissions
... | Make a ConstraintMapping which captures the or elements for a particular url pattern, and relates it to a Constraint object ( and ) | makeConstraintMapping | {
"repo_name": "leoleegit/jetty-8.0.4.v20111024",
"path": "jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ServletSecurityAnnotationHandler.java",
"license": "apache-2.0",
"size": 12683
} | [
"org.eclipse.jetty.http.security.Constraint",
"org.eclipse.jetty.security.ConstraintMapping"
] | import org.eclipse.jetty.http.security.Constraint; import org.eclipse.jetty.security.ConstraintMapping; | import org.eclipse.jetty.http.security.*; import org.eclipse.jetty.security.*; | [
"org.eclipse.jetty"
] | org.eclipse.jetty; | 2,497,486 |
public static Pipe newPipe(byte[] data) throws IOException
{
return newPipe(data, 0, data.length);
}
| static Pipe function(byte[] data) throws IOException { return newPipe(data, 0, data.length); } | /**
* Creates an xml pipe from a byte array.
*/ | Creates an xml pipe from a byte array | newPipe | {
"repo_name": "Shvid/protostuff",
"path": "protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java",
"license": "apache-2.0",
"size": 19193
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,261,008 |
public static boolean validateDoubleRange(Object bean,
ValidatorAction va, Field field,
ActionMessages errors,
Validator validator,
... | static boolean function(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) { String value = null; if (isString(bean)) { value = (String) bean; } else { value = ValidatorUtils.getValueAsString(bean, field.getProperty()); } if (!GenericValidator.isBlankOr... | /**
* Checks if a fields value is within a range (min & max specified in the
* vars attribute).
*
* @param bean The bean validation is being performed on.
* @param va The <code>ValidatorAction</code> that is currently being performed.
* @param field The <code>Field</c... | Checks if a fields value is within a range (min & max specified in the vars attribute) | validateDoubleRange | {
"repo_name": "kawasima/struts-taglib-compatible",
"path": "src/share/org/apache/struts/validator/FieldChecks.java",
"license": "apache-2.0",
"size": 38920
} | [
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.validator.Field",
"org.apache.commons.validator.GenericValidator",
"org.apache.commons.validator.Validator",
"org.apache.commons.validator.ValidatorAction",
"org.apache.commons.validator.util.ValidatorUtils",
"org.apache.struts.action.ActionMe... | import javax.servlet.http.HttpServletRequest; import org.apache.commons.validator.Field; import org.apache.commons.validator.GenericValidator; import org.apache.commons.validator.Validator; import org.apache.commons.validator.ValidatorAction; import org.apache.commons.validator.util.ValidatorUtils; import org.apache.st... | import javax.servlet.http.*; import org.apache.commons.validator.*; import org.apache.commons.validator.util.*; import org.apache.struts.action.*; | [
"javax.servlet",
"org.apache.commons",
"org.apache.struts"
] | javax.servlet; org.apache.commons; org.apache.struts; | 298,443 |
public List<JROrigin> getOriginsList()
{
return originsList;
} | List<JROrigin> function() { return originsList; } | /**
* Gets a list of report origins.
*/ | Gets a list of report origins | getOriginsList | {
"repo_name": "MHTaleb/Encologim",
"path": "lib/JasperReport/src/net/sf/jasperreports/engine/JasperPrint.java",
"license": "gpl-3.0",
"size": 18913
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 446,168 |
private static void addThemeSlotFillers(TextAnnotation ta, Set<String> themeIds,
Map<String, TextAnnotation> bionlpIdToAnnotationMap) {
for (String id : themeIds)
addSlotFiller(ta, id, THEME_SLOT_NAME, bionlpIdToAnnotationMap);
} | static void function(TextAnnotation ta, Set<String> themeIds, Map<String, TextAnnotation> bionlpIdToAnnotationMap) { for (String id : themeIds) addSlotFiller(ta, id, THEME_SLOT_NAME, bionlpIdToAnnotationMap); } | /**
* Adds a theme slot filler annotation for each of the input theme IDs
*
* @param ta
* @param themeIds
* @return
*/ | Adds a theme slot filler annotation for each of the input theme IDs | addThemeSlotFillers | {
"repo_name": "UCDenver-ccp/ccp-nlp",
"path": "ccp-nlp-uima-serialization/src/main/java/edu/ucdenver/ccp/nlp/uima/serialization/bionlp/parser/BioNlpEventFactory.java",
"license": "bsd-3-clause",
"size": 6513
} | [
"edu.ucdenver.ccp.nlp.core.annotation.TextAnnotation",
"java.util.Map",
"java.util.Set"
] | import edu.ucdenver.ccp.nlp.core.annotation.TextAnnotation; import java.util.Map; import java.util.Set; | import edu.ucdenver.ccp.nlp.core.annotation.*; import java.util.*; | [
"edu.ucdenver.ccp",
"java.util"
] | edu.ucdenver.ccp; java.util; | 1,799,725 |
// -----[ openSession ]------------------------------------------
public native void openSession()
throws CBGPException; | native void function() throws CBGPException; | /**
* Open the session.
*/ | Open the session | openSession | {
"repo_name": "lvanbever/cbgp",
"path": "src/jni/be/ac/ucl/ingi/cbgp/bgp/Peer.java",
"license": "gpl-3.0",
"size": 7326
} | [
"be.ac.ucl.ingi.cbgp.exceptions.CBGPException"
] | import be.ac.ucl.ingi.cbgp.exceptions.CBGPException; | import be.ac.ucl.ingi.cbgp.exceptions.*; | [
"be.ac.ucl"
] | be.ac.ucl; | 446,343 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.