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
@Override public void unread() throws IOException { if (_is != null) _is.unread(); }
void function() throws IOException { if (_is != null) _is.unread(); }
/** * Unread a character. */
Unread a character
unread
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/quercus/lib/file/HttpInputOutput.java", "license": "gpl-2.0", "size": 9829 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,788,761
public Set<Integer> getAgents () { return agents.keySet(); } /** * Adds an ID for an agent to the {@link List} of agents involved in the * {@link Conflict}
Set<Integer> function () { return agents.keySet(); } /** * Adds an ID for an agent to the {@link List} of agents involved in the * {@link Conflict}
/** * Gets the {@link List} of agent IDs involved in the conflict * * @return */
Gets the <code>List</code> of agent IDs involved in the conflict
getAgents
{ "repo_name": "mj21181/ursus-swarm", "path": "src/main/java/path/elements/Conflict.java", "license": "gpl-3.0", "size": 4523 }
[ "java.util.List", "java.util.Set" ]
import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
83,171
public ExpandoValuePersistence getExpandoValuePersistence() { return expandoValuePersistence; }
ExpandoValuePersistence function() { return expandoValuePersistence; }
/** * Returns the expando value persistence. * * @return the expando value persistence */
Returns the expando value persistence
getExpandoValuePersistence
{ "repo_name": "juliocamarero/jukebox-portlet", "path": "docroot/WEB-INF/src/org/liferay/jukebox/service/base/SongServiceBaseImpl.java", "license": "gpl-2.0", "size": 30401 }
[ "com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence" ]
import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
import com.liferay.portlet.expando.service.persistence.*;
[ "com.liferay.portlet" ]
com.liferay.portlet;
890,681
private static String renderSubscriptionForUI(AndesSubscription subscription, int pendingMessageCount) throws AndesException { String nodeId = subscription.getSubscribedNode().split("/")[1]; if (!StringUtils.isBlank(nodeId)) { String ...
static String function(AndesSubscription subscription, int pendingMessageCount) throws AndesException { String nodeId = subscription.getSubscribedNode().split("/")[1]; if (!StringUtils.isBlank(nodeId)) { String subscriptionIdentifier = "1_" + nodeId + "@" + subscription.getTargetQueue(); return subscriptionIdentifier +...
/** * This method returns the formatted subscription string to be compatible with the UI processor. * <p/> * Format of the string : "subscriptionInfo = subscriptionIdentifier | * subscribedQueueOrTopicName | subscriberQueueBoundExchange | subscriberQueueName | * isDurable | isActive | numberOf...
This method returns the formatted subscription string to be compatible with the UI processor. Format of the string : "subscriptionInfo = subscriptionIdentifier | subscribedQueueOrTopicName | subscriberQueueBoundExchange | subscriberQueueName | isDurable | isActive | numberOfMessagesRemainingForSubscriber | subscriberNo...
renderSubscriptionForUI
{ "repo_name": "IndunilRathnayake/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/server/information/management/SubscriptionManagementInformationMBean.java", "license": "apache-2.0", "size": 7473 }
[ "org.apache.commons.lang.StringUtils", "org.wso2.andes.kernel.AndesException", "org.wso2.andes.kernel.AndesSubscription" ]
import org.apache.commons.lang.StringUtils; import org.wso2.andes.kernel.AndesException; import org.wso2.andes.kernel.AndesSubscription;
import org.apache.commons.lang.*; import org.wso2.andes.kernel.*;
[ "org.apache.commons", "org.wso2.andes" ]
org.apache.commons; org.wso2.andes;
2,050,818
public void executeAsync(XmlRpcClientConfig pConfig, String pMethodName, Object[] pParams, AsyncCallback pCallback) throws XmlRpcException { executeAsync(new XmlRpcClientRequestImpl(pConfig, pMethodName, pParams), pCallback); }
void function(XmlRpcClientConfig pConfig, String pMethodName, Object[] pParams, AsyncCallback pCallback) throws XmlRpcException { executeAsync(new XmlRpcClientRequestImpl(pConfig, pMethodName, pParams), pCallback); }
/** Performs an asynchronous request with the given configuration. * @param pConfig The request configuration. * @param pMethodName The method being performed. * @param pParams The parameters. * @param pCallback The callback being notified when the request is finished. * @throws XmlRpcException Performing the...
Performs an asynchronous request with the given configuration
executeAsync
{ "repo_name": "mmohan01/ReFactory", "path": "data/apachexmlrpc/apachexmlrpc-3.1/xmlrpc-3.1/client/src/main/java/org/apache/xmlrpc/client/XmlRpcClient.java", "license": "mit", "size": 10065 }
[ "org.apache.xmlrpc.XmlRpcException" ]
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.*;
[ "org.apache.xmlrpc" ]
org.apache.xmlrpc;
2,456,593
private void setAcl(String bucketName, String key, String versionId, CannedAccessControlList cannedAcl, AmazonWebServiceRequest originalRequest) { if (originalRequest == null) originalRequest = new GenericBucketRequest(bucketName); Request<AmazonWebServiceRequest> request = createRequest(bucketName...
void function(String bucketName, String key, String versionId, CannedAccessControlList cannedAcl, AmazonWebServiceRequest originalRequest) { if (originalRequest == null) originalRequest = new GenericBucketRequest(bucketName); Request<AmazonWebServiceRequest> request = createRequest(bucketName, key, originalRequest, Htt...
/** * Sets the Canned ACL for the specified resource in S3. If only bucketName * is specified, the canned ACL will be applied to the bucket, otherwise if * bucketName and key are specified, the canned ACL will be applied to the * object. * * @param bucketName * The name of ...
Sets the Canned ACL for the specified resource in S3. If only bucketName is specified, the canned ACL will be applied to the bucket, otherwise if bucketName and key are specified, the canned ACL will be applied to the object
setAcl
{ "repo_name": "tootedom/aws-sdk-java", "path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java", "license": "apache-2.0", "size": 202843 }
[ "com.amazonaws.AmazonWebServiceRequest", "com.amazonaws.Request", "com.amazonaws.http.HttpMethodName", "com.amazonaws.services.s3.model.CannedAccessControlList", "com.amazonaws.services.s3.model.GenericBucketRequest" ]
import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.Request; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.s3.model.CannedAccessControlList; import com.amazonaws.services.s3.model.GenericBucketRequest;
import com.amazonaws.*; import com.amazonaws.http.*; import com.amazonaws.services.s3.model.*;
[ "com.amazonaws", "com.amazonaws.http", "com.amazonaws.services" ]
com.amazonaws; com.amazonaws.http; com.amazonaws.services;
2,062,158
@SuppressWarnings("unchecked") default <Q> void complete(Class<Q> queryType, Predicate<? super Q> filter) { Predicate<SubscriptionQueryMessage<?, ?, ?>> sqmFilter = m -> queryType.isAssignableFrom(m.getPayloadType()) && filter.test((Q) m.getPayload()); complete(sqmFilter); }
@SuppressWarnings(STR) default <Q> void complete(Class<Q> queryType, Predicate<? super Q> filter) { Predicate<SubscriptionQueryMessage<?, ?, ?>> sqmFilter = m -> queryType.isAssignableFrom(m.getPayloadType()) && filter.test((Q) m.getPayload()); complete(sqmFilter); }
/** * Completes subscription queries matching given query type and filter. * * @param queryType the type of the query * @param filter predicate on query payload used to filter subscription queries * @param <Q> the type of the query */
Completes subscription queries matching given query type and filter
complete
{ "repo_name": "krosenvold/AxonFramework", "path": "messaging/src/main/java/org/axonframework/queryhandling/QueryUpdateEmitter.java", "license": "apache-2.0", "size": 8462 }
[ "java.util.function.Predicate" ]
import java.util.function.Predicate;
import java.util.function.*;
[ "java.util" ]
java.util;
1,202,857
protected Object invokeAdviceMethod(JoinPointMatch jpMatch, Object returnValue, Throwable ex) throws Throwable { return invokeAdviceMethodWithGivenArgs(argBinding(getJoinPoint(), jpMatch, returnValue, ex)); }
Object function(JoinPointMatch jpMatch, Object returnValue, Throwable ex) throws Throwable { return invokeAdviceMethodWithGivenArgs(argBinding(getJoinPoint(), jpMatch, returnValue, ex)); }
/** * Invoke the advice method. * @param jpMatch the JoinPointMatch that matched this execution join point * @param returnValue the return value from the method execution (may be null) * @param ex the exception thrown by the method execution (may be null) * @return the invocation result * @throws Throwable ...
Invoke the advice method
invokeAdviceMethod
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "src/org/springframework/aop/aspectj/AbstractAspectJAdvice.java", "license": "apache-2.0", "size": 24540 }
[ "org.aspectj.weaver.tools.JoinPointMatch" ]
import org.aspectj.weaver.tools.JoinPointMatch;
import org.aspectj.weaver.tools.*;
[ "org.aspectj.weaver" ]
org.aspectj.weaver;
1,255,696
private char getIntermediateLetter(char letterBefore, char letterAfter) { if (Character.isLetter(letterBefore) && Character.isLetter(letterAfter)) { // First grab all letters that come after the 'letterBefore' HashMap<Character, ProbabilityTable<Character>> wl = letters.get(letterBef...
char function(char letterBefore, char letterAfter) { if (Character.isLetter(letterBefore) && Character.isLetter(letterAfter)) { HashMap<Character, ProbabilityTable<Character>> wl = letters.get(letterBefore); if (wl == null) { return getRandomNextLetter(letterBefore); } Set<Character> letterCandidates = wl.get(letterBef...
/** * Searches for the best fit letter between the letter before and the letter * after (non-random). Used to determine penultimate letters in names. * * @param letterBefore The letter before the desired letter. * @param letterAfter The letter after the desired letter. * @return The best f...
Searches for the best fit letter between the letter before and the letter after (non-random). Used to determine penultimate letters in names
getIntermediateLetter
{ "repo_name": "davidbecker/SquidLib", "path": "squidlib-util/src/main/java/squidpony/WeightedLetterNamegen.java", "license": "apache-2.0", "size": 13275 }
[ "java.util.HashMap", "java.util.Set" ]
import java.util.HashMap; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
278,586
public void fromSaveFormat(Element savedFormat) { probabilityJump = Float.parseFloat(savedFormat.getChildText("probabilityJump")); probabilityMoveRight = Float.parseFloat(savedFormat.getChildText("probabilityMoveRight")); probabilityRun = Float.parseFloat(savedFormat.getChildText("probabilityRun")); probabi...
void function(Element savedFormat) { probabilityJump = Float.parseFloat(savedFormat.getChildText(STR)); probabilityMoveRight = Float.parseFloat(savedFormat.getChildText(STR)); probabilityRun = Float.parseFloat(savedFormat.getChildText(STR)); probabilityShoot = Float.parseFloat(savedFormat.getChildText(STR)); thisAgent ...
/** * Sets the probabilities and {@link #thisAgent} using the data held in the Element. * @param savedFormat - xml representation of data to be used. */
Sets the probabilities and <code>#thisAgent</code> using the data held in the Element
fromSaveFormat
{ "repo_name": "kbarrett/third-year-project", "path": "src/ch/idsia/agents/controllers/kbarrett/second/SecondAgent.java", "license": "bsd-3-clause", "size": 7583 }
[ "org.jdom.Element" ]
import org.jdom.Element;
import org.jdom.*;
[ "org.jdom" ]
org.jdom;
2,727,494
public ResultMatcher isSwitchingProtocols() { return matcher(HttpStatus.SWITCHING_PROTOCOLS); }
ResultMatcher function() { return matcher(HttpStatus.SWITCHING_PROTOCOLS); }
/** * Assert the response status code is {@code HttpStatus.SWITCHING_PROTOCOLS} (101). */
Assert the response status code is HttpStatus.SWITCHING_PROTOCOLS (101)
isSwitchingProtocols
{ "repo_name": "spring-projects/spring-framework", "path": "spring-test/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java", "license": "apache-2.0", "size": 17758 }
[ "org.springframework.http.HttpStatus", "org.springframework.test.web.servlet.ResultMatcher" ]
import org.springframework.http.HttpStatus; import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.http.*; import org.springframework.test.web.servlet.*;
[ "org.springframework.http", "org.springframework.test" ]
org.springframework.http; org.springframework.test;
1,832,978
private static void initializeOnlinePlayersIsCollectionField() { try { Method method = Bukkit.class.getDeclaredMethod("getOnlinePlayers"); getOnlinePlayersIsCollection = method.getReturnType() == Collection.class; } catch (NoSuchMethodException e) { ConsoleLogger....
static void function() { try { Method method = Bukkit.class.getDeclaredMethod(STR); getOnlinePlayersIsCollection = method.getReturnType() == Collection.class; } catch (NoSuchMethodException e) { ConsoleLogger.showError(STR); } }
/** * Method run when the Utils class is loaded to verify whether or not the Bukkit implementation * returns the online players as a Collection. * * @see Utils#getOnlinePlayers() */
Method run when the Utils class is loaded to verify whether or not the Bukkit implementation returns the online players as a Collection
initializeOnlinePlayersIsCollectionField
{ "repo_name": "sgdc3/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/util/Utils.java", "license": "gpl-3.0", "size": 11212 }
[ "fr.xephi.authme.ConsoleLogger", "java.lang.reflect.Method", "java.util.Collection", "org.bukkit.Bukkit" ]
import fr.xephi.authme.ConsoleLogger; import java.lang.reflect.Method; import java.util.Collection; import org.bukkit.Bukkit;
import fr.xephi.authme.*; import java.lang.reflect.*; import java.util.*; import org.bukkit.*;
[ "fr.xephi.authme", "java.lang", "java.util", "org.bukkit" ]
fr.xephi.authme; java.lang; java.util; org.bukkit;
1,481,695
void undelete(MarkDeletableRecord<?> obj) throws AccessException;
void undelete(MarkDeletableRecord<?> obj) throws AccessException;
/** * Object will be marked as deleted (booelan flag), therefore undelete is always possible without any loss of data. * * @param obj */
Object will be marked as deleted (booelan flag), therefore undelete is always possible without any loss of data
undelete
{ "repo_name": "FlowsenAusMonotown/projectforge", "path": "projectforge-business/src/main/java/org/projectforge/framework/persistence/api/JpaPfGenericPersistenceService.java", "license": "gpl-3.0", "size": 1070 }
[ "de.micromata.genome.jpa.MarkDeletableRecord", "org.projectforge.framework.access.AccessException" ]
import de.micromata.genome.jpa.MarkDeletableRecord; import org.projectforge.framework.access.AccessException;
import de.micromata.genome.jpa.*; import org.projectforge.framework.access.*;
[ "de.micromata.genome", "org.projectforge.framework" ]
de.micromata.genome; org.projectforge.framework;
2,061,616
private Animation outToRightAnimation() { Animation outToRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); return setProperties(outToR...
Animation function() { Animation outToRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); return setProperties(outToRight); }
/** * Custom animation that animates out to the right * * @return Animation the Animation object */
Custom animation that animates out to the right
outToRightAnimation
{ "repo_name": "gekowa/comicat-sdgo-android", "path": "app/src/main/java/cn/sdgundam/comicatsdgo/UnitViewActivity.java", "license": "apache-2.0", "size": 29715 }
[ "android.view.animation.Animation", "android.view.animation.TranslateAnimation" ]
import android.view.animation.Animation; import android.view.animation.TranslateAnimation;
import android.view.animation.*;
[ "android.view" ]
android.view;
51,589
public EntityListeners<Entity<T>> getOrCreateEntityListeners() { Node node = childNode.getOrCreate("entity-listeners"); EntityListeners<Entity<T>> entityListeners = new EntityListenersImpl<Entity<T>>(this, "entity-listeners", childNode, node); return entityListeners; }
EntityListeners<Entity<T>> function() { Node node = childNode.getOrCreate(STR); EntityListeners<Entity<T>> entityListeners = new EntityListenersImpl<Entity<T>>(this, STR, childNode, node); return entityListeners; }
/** * If not already created, a new <code>entity-listeners</code> element with the given value will be created. * Otherwise, the existing <code>entity-listeners</code> element will be returned. * @return a new or existing instance of <code>EntityListeners<Entity<T>></code> */
If not already created, a new <code>entity-listeners</code> element with the given value will be created. Otherwise, the existing <code>entity-listeners</code> element will be returned
getOrCreateEntityListeners
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm10/EntityImpl.java", "license": "epl-1.0", "size": 47108 }
[ "org.jboss.shrinkwrap.descriptor.api.orm10.Entity", "org.jboss.shrinkwrap.descriptor.api.orm10.EntityListeners", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import org.jboss.shrinkwrap.descriptor.api.orm10.Entity; import org.jboss.shrinkwrap.descriptor.api.orm10.EntityListeners; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import org.jboss.shrinkwrap.descriptor.api.orm10.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
1,769,115
protected Object unmarshall(Session session, TextMessage textMessage) throws JMSException { HierarchicalStreamReader in; if (streamDriver != null) { in = streamDriver.createReader(new StringReader(textMessage.getText())); } else { in = new XppReader(new StringReader(textMes...
Object function(Session session, TextMessage textMessage) throws JMSException { HierarchicalStreamReader in; if (streamDriver != null) { in = streamDriver.createReader(new StringReader(textMessage.getText())); } else { in = new XppReader(new StringReader(textMessage.getText()), new MXParser()); } return getXStream().un...
/** * Unmarshalls the XML encoded message in the {@link TextMessage} to an * Object */
Unmarshalls the XML encoded message in the <code>TextMessage</code> to an Object
unmarshall
{ "repo_name": "chirino/activemq", "path": "trash/activemq-optional/src/main/java/org/apache/activemq/util/oxm/XStreamMessageTransformer.java", "license": "apache-2.0", "size": 3602 }
[ "com.thoughtworks.xstream.io.HierarchicalStreamReader", "com.thoughtworks.xstream.io.xml.XppReader", "java.io.StringReader", "javax.jms.JMSException", "javax.jms.Session", "javax.jms.TextMessage", "org.xmlpull.mxp1.MXParser" ]
import com.thoughtworks.xstream.io.HierarchicalStreamReader; import com.thoughtworks.xstream.io.xml.XppReader; import java.io.StringReader; import javax.jms.JMSException; import javax.jms.Session; import javax.jms.TextMessage; import org.xmlpull.mxp1.MXParser;
import com.thoughtworks.xstream.io.*; import com.thoughtworks.xstream.io.xml.*; import java.io.*; import javax.jms.*; import org.xmlpull.mxp1.*;
[ "com.thoughtworks.xstream", "java.io", "javax.jms", "org.xmlpull.mxp1" ]
com.thoughtworks.xstream; java.io; javax.jms; org.xmlpull.mxp1;
1,692,005
public ServiceFuture<P2SVpnServerConfigurationInner> getAsync(String resourceGroupName, String virtualWanName, String p2SVpnServerConfigurationName, final ServiceCallback<P2SVpnServerConfigurationInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtu...
ServiceFuture<P2SVpnServerConfigurationInner> function(String resourceGroupName, String virtualWanName, String p2SVpnServerConfigurationName, final ServiceCallback<P2SVpnServerConfigurationInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualWanName, p2SVpnSe...
/** * Retrieves the details of a P2SVpnServerConfiguration. * * @param resourceGroupName The resource group name of the P2SVpnServerConfiguration. * @param virtualWanName The name of the VirtualWan. * @param p2SVpnServerConfigurationName The name of the P2SVpnServerConfiguration. * @param ...
Retrieves the details of a P2SVpnServerConfiguration
getAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_12_01/src/main/java/com/microsoft/azure/management/network/v2018_12_01/implementation/P2sVpnServerConfigurationsInner.java", "license": "mit", "size": 50537 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
808,326
public void saveChanges(File workspacePrefFile, File updatePrefFile, boolean saveNewProperties) { if (workspacePrefFile.exists()) { SortedProperties changes = getChanges(updatePrefFile, workspacePrefFile, saveNewProperties); if (!changes.isEmpty()) { SortedProperties updatedPropeties = update...
void function(File workspacePrefFile, File updatePrefFile, boolean saveNewProperties) { if (workspacePrefFile.exists()) { SortedProperties changes = getChanges(updatePrefFile, workspacePrefFile, saveNewProperties); if (!changes.isEmpty()) { SortedProperties updatedPropeties = updateProperties(changes, updatePrefFile); ...
/** * Saves the changes in the workspacePrefFile into the updatePrefFile. * * @param workspacePrefFile - new prefFile * @param updatePrefFile - old prefFile to be updated. * @param saveNewProperties - specifies if new properties are saved as well. */
Saves the changes in the workspacePrefFile into the updatePrefFile
saveChanges
{ "repo_name": "oasp-forge/bht-2017-RideSharing-Server", "path": "oasp4j-ide/oasp4j-ide-eclipse-configurator/src/main/java/io/oasp/ide/eclipse/configurator/core/PrefHandler.java", "license": "apache-2.0", "size": 8824 }
[ "io.oasp.ide.eclipse.configurator.entity.SortedProperties", "io.oasp.ide.eclipse.configurator.logging.Log", "java.io.File" ]
import io.oasp.ide.eclipse.configurator.entity.SortedProperties; import io.oasp.ide.eclipse.configurator.logging.Log; import java.io.File;
import io.oasp.ide.eclipse.configurator.entity.*; import io.oasp.ide.eclipse.configurator.logging.*; import java.io.*;
[ "io.oasp.ide", "java.io" ]
io.oasp.ide; java.io;
2,746,653
private String readLine() throws IOException { // thanks Sérgio Neves for this one StringBuilder sb = new StringBuilder(); char c1 = (char) _reader.read(), c2 = (char) _reader.read(); while (c1 != '\r' || c2 != '\n') { sb.append(c1); c1 = c2; c2 = (char) _reader.read(); } _logger.finest(String.f...
String function() throws IOException { StringBuilder sb = new StringBuilder(); char c1 = (char) _reader.read(), c2 = (char) _reader.read(); while (c1 != '\r' c2 != '\n') { sb.append(c1); c1 = c2; c2 = (char) _reader.read(); } _logger.finest(String.format(STR, sb.toString())); return sb.toString(); }
/** * Reads a line from the socket according to SSIP end of line conventions. * * @return the line read without the ending cr/lf pair. * @throws IOException * if an io error ocurs. */
Reads a line from the socket according to SSIP end of line conventions
readLine
{ "repo_name": "ragb/speechd-java", "path": "src/speechd/ssip/SSIPConnection.java", "license": "lgpl-2.1", "size": 13871 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
146,119
protected void addJoin(Join join) { if (joins == null) { joins = new LinkedList<Join>(); } joins.add(join); } /** * {@inheritDoc}
void function(Join join) { if (joins == null) { joins = new LinkedList<Join>(); } joins.add(join); } /** * {@inheritDoc}
/** * Adds the given {@link Join}. * * @param join The {@link Join} that is declared in the range variable declaration */
Adds the given <code>Join</code>
addJoin
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa.jpql/src/org/eclipse/persistence/jpa/jpql/tools/resolver/AbstractRangeDeclaration.java", "license": "epl-1.0", "size": 2162 }
[ "java.util.LinkedList", "org.eclipse.persistence.jpa.jpql.parser.Join" ]
import java.util.LinkedList; import org.eclipse.persistence.jpa.jpql.parser.Join;
import java.util.*; import org.eclipse.persistence.jpa.jpql.parser.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
346,766
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (OCCIPackage.Literals.ENTITY__PARTS, ElasticocciFactory.eINSTANCE.createStrategy(...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (OCCIPackage.Literals.ENTITY__PARTS, ElasticocciFactory.eINSTANCE.createStrategy())); newChildDescriptors.add (createChildParameter (OCCIPac...
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "occiware/Multi-Cloud-Studio", "path": "plugins/org.eclipse.cmf.occi.multicloud.elasticocci.edit/src-gen/org/eclipse/cmf/occi/multicloud/elasticocci/provider/ElasticlinkItemProvider.java", "license": "epl-1.0", "size": 5151 }
[ "java.util.Collection", "org.eclipse.cmf.occi.core.OCCIPackage", "org.eclipse.cmf.occi.infrastructure.InfrastructureFactory", "org.eclipse.cmf.occi.multicloud.elasticocci.ElasticocciFactory" ]
import java.util.Collection; import org.eclipse.cmf.occi.core.OCCIPackage; import org.eclipse.cmf.occi.infrastructure.InfrastructureFactory; import org.eclipse.cmf.occi.multicloud.elasticocci.ElasticocciFactory;
import java.util.*; import org.eclipse.cmf.occi.core.*; import org.eclipse.cmf.occi.infrastructure.*; import org.eclipse.cmf.occi.multicloud.elasticocci.*;
[ "java.util", "org.eclipse.cmf" ]
java.util; org.eclipse.cmf;
59,611
@Test public void testConvertToAvroInteger() { Schema expectedSchema = AvroUtils._int(); assertEquals(expectedSchema, AvroTypeConverter.convertToAvro(TalendType.INTEGER, null)); }
void function() { Schema expectedSchema = AvroUtils._int(); assertEquals(expectedSchema, AvroTypeConverter.convertToAvro(TalendType.INTEGER, null)); }
/** * Checks {@link AvroTypeConverter#convertToAvro(String, String)} returns Integer avro schema in case TalendType.INTEGER * Talend type * is passed */
Checks <code>AvroTypeConverter#convertToAvro(String, String)</code> returns Integer avro schema in case TalendType.INTEGER Talend type is passed
testConvertToAvroInteger
{ "repo_name": "Talend/components", "path": "core/components-common/src/test/java/org/talend/components/common/config/jdbc/AvroTypeConverterTest.java", "license": "apache-2.0", "size": 6895 }
[ "org.apache.avro.Schema", "org.junit.Assert", "org.talend.daikon.avro.AvroUtils" ]
import org.apache.avro.Schema; import org.junit.Assert; import org.talend.daikon.avro.AvroUtils;
import org.apache.avro.*; import org.junit.*; import org.talend.daikon.avro.*;
[ "org.apache.avro", "org.junit", "org.talend.daikon" ]
org.apache.avro; org.junit; org.talend.daikon;
2,478,544
boolean isDeclared(NodeRef nodeRef);
boolean isDeclared(NodeRef nodeRef);
/** * Indicates whether the record is declared * * @param nodeRef node reference of the record for which the check would be performed * @return boolean true if record is declared, false otherwise */
Indicates whether the record is declared
isDeclared
{ "repo_name": "dnacreative/records-management", "path": "rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/record/RecordService.java", "license": "lgpl-3.0", "size": 8886 }
[ "org.alfresco.service.cmr.repository.NodeRef" ]
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.service" ]
org.alfresco.service;
261,996
public static float getDistanceBetweenFlat(AIFloat3 p1, AIFloat3 p2) { float dx = p1.x - p2.x; float dz = p1.z - p2.z; return (float) Math.sqrt(dx * dx + dz * dz); }
static float function(AIFloat3 p1, AIFloat3 p2) { float dx = p1.x - p2.x; float dz = p1.z - p2.z; return (float) Math.sqrt(dx * dx + dz * dz); }
/** * Distnace between 2 point on flat */
Distnace between 2 point on flat
getDistanceBetweenFlat
{ "repo_name": "playerO1/FieldBOT", "path": "src/fieldbot/AIUtil/MathPoints.java", "license": "gpl-2.0", "size": 3990 }
[ "com.springrts.ai.oo.AIFloat3" ]
import com.springrts.ai.oo.AIFloat3;
import com.springrts.ai.oo.*;
[ "com.springrts.ai" ]
com.springrts.ai;
2,171,434
@JsonIgnore public ByteBuffer[] getRowKeyIdsToRead(int numRowKeysToRead) { int numKeys = hasRowKeys(numRowKeysToRead); if (numKeys == 0) { return null; } int index = 0; final ByteBuffer[] rowKeyIds = new ByteBuffer[numKeys]; while (index < numKeys) { Object o = rowKeyVector.ge...
ByteBuffer[] function(int numRowKeysToRead) { int numKeys = hasRowKeys(numRowKeysToRead); if (numKeys == 0) { return null; } int index = 0; final ByteBuffer[] rowKeyIds = new ByteBuffer[numKeys]; while (index < numKeys) { Object o = rowKeyVector.getAccessor().getObject(currentIndex + index); rowKeyIds[index++] = IdCode...
/** * Returns ids of rowKeys to be read. * Number of rowKey ids returned will be numRowKeysToRead at the most i.e. it * will be less than numRowKeysToRead if only that many exist in the currentBatch. */
Returns ids of rowKeys to be read. Number of rowKey ids returned will be numRowKeysToRead at the most i.e. it will be less than numRowKeysToRead if only that many exist in the currentBatch
getRowKeyIdsToRead
{ "repo_name": "johnnywale/drill", "path": "contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/RestrictedMapRDBSubScanSpec.java", "license": "apache-2.0", "size": 6144 }
[ "com.mapr.db.impl.IdCodec", "java.nio.ByteBuffer" ]
import com.mapr.db.impl.IdCodec; import java.nio.ByteBuffer;
import com.mapr.db.impl.*; import java.nio.*;
[ "com.mapr.db", "java.nio" ]
com.mapr.db; java.nio;
175,075
private ProbePublishingService getProbePublishingService() { return this.probePublishingService; }
ProbePublishingService function() { return this.probePublishingService; }
/** * The service under test. * * @return the service */
The service under test
getProbePublishingService
{ "repo_name": "serene-project/serene-collector", "path": "collector-webapp/src/test/java/net/sereneproject/collector/service/impl/ProbePublishingServiceTest.java", "license": "bsd-2-clause", "size": 3001 }
[ "net.sereneproject.collector.service.ProbePublishingService" ]
import net.sereneproject.collector.service.ProbePublishingService;
import net.sereneproject.collector.service.*;
[ "net.sereneproject.collector" ]
net.sereneproject.collector;
2,881,740
public Brigade getPreferredEnemyForLongRangeAttack(Brigade brigade, Set<Brigade> enemies, Order order, FieldBattleProcessor fieldBattleProcessor) { Set<Brigade> preferredEnemies = filterEnemies(enemies, order); Brigade preferredEnemy = null; ...
Brigade function(Brigade brigade, Set<Brigade> enemies, Order order, FieldBattleProcessor fieldBattleProcessor) { Set<Brigade> preferredEnemies = filterEnemies(enemies, order); Brigade preferredEnemy = null; if (order.isTargetHighestHeadcount()) { preferredEnemy = getHighestHeadcount(preferredEnemies); } else { preferr...
/** * Returns the preferred enemy for long-range attack. * * @param brigade the brigade * @param enemies the enemies * @param order the given order * @param fieldBattleProcessor the field battle processor * @return */
Returns the preferred enemy for long-range attack
getPreferredEnemyForLongRangeAttack
{ "repo_name": "EaW1805/engine", "path": "src/main/java/com/eaw1805/battles/field/processors/movement/AdditionalOrderBrigadeFilter.java", "license": "mit", "size": 8931 }
[ "com.eaw1805.battles.field.FieldBattleProcessor", "com.eaw1805.data.model.army.Brigade", "com.eaw1805.data.model.battles.field.Order", "java.util.Set" ]
import com.eaw1805.battles.field.FieldBattleProcessor; import com.eaw1805.data.model.army.Brigade; import com.eaw1805.data.model.battles.field.Order; import java.util.Set;
import com.eaw1805.battles.field.*; import com.eaw1805.data.model.army.*; import com.eaw1805.data.model.battles.field.*; import java.util.*;
[ "com.eaw1805.battles", "com.eaw1805.data", "java.util" ]
com.eaw1805.battles; com.eaw1805.data; java.util;
2,902,319
@ReactProp(name = ViewProps.FONT_STYLE) public void setFontStyle(@Nullable String fontStyleString) { int fontStyle = UNSET; if ("italic".equals(fontStyleString)) { fontStyle = Typeface.ITALIC; } else if ("normal".equals(fontStyleString)) { fontStyle = Typeface.NORMAL; } if (fontStyle...
@ReactProp(name = ViewProps.FONT_STYLE) void function(@Nullable String fontStyleString) { int fontStyle = UNSET; if (STR.equals(fontStyleString)) { fontStyle = Typeface.ITALIC; } else if (STR.equals(fontStyleString)) { fontStyle = Typeface.NORMAL; } if (fontStyle != mFontStyle) { mFontStyle = fontStyle; markUpdated(); ...
/** /* This code is duplicated in ReactTextInputManager /* TODO: Factor into a common place they can both use */
This code is duplicated in ReactTextInputManager
setFontStyle
{ "repo_name": "tausifmuzaffar/bisApp", "path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java", "license": "apache-2.0", "size": 22057 }
[ "android.graphics.Typeface", "com.facebook.react.uimanager.ViewProps", "com.facebook.react.uimanager.annotations.ReactProp", "javax.annotation.Nullable" ]
import android.graphics.Typeface; import com.facebook.react.uimanager.ViewProps; import com.facebook.react.uimanager.annotations.ReactProp; import javax.annotation.Nullable;
import android.graphics.*; import com.facebook.react.uimanager.*; import com.facebook.react.uimanager.annotations.*; import javax.annotation.*;
[ "android.graphics", "com.facebook.react", "javax.annotation" ]
android.graphics; com.facebook.react; javax.annotation;
452,592
public SearchSourceBuilder field(String name) { if (fieldNames == null) { fieldNames = new ArrayList<>(); } fieldNames.add(name); return this; }
SearchSourceBuilder function(String name) { if (fieldNames == null) { fieldNames = new ArrayList<>(); } fieldNames.add(name); return this; }
/** * Adds a field to load and return (note, it must be stored) as part of the * search request. If none are specified, the source of the document will be * return. */
Adds a field to load and return (note, it must be stored) as part of the search request. If none are specified, the source of the document will be return
field
{ "repo_name": "drewr/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java", "license": "apache-2.0", "size": 54962 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,691,528
public String runHTMLSuite( String browser, String startURL, String suiteURL, File outputFile, long timeoutInSeconds, String userExtensions) throws IOException { File parent = outputFile.getParentFile(); if (parent != null && !parent.exists()) { if (!parent.mkdirs()) { th...
String function( String browser, String startURL, String suiteURL, File outputFile, long timeoutInSeconds, String userExtensions) throws IOException { File parent = outputFile.getParentFile(); if (parent != null && !parent.exists()) { if (!parent.mkdirs()) { throw new IOException(STR + parent); } } if (outputFile.exist...
/** * Launches a single HTML Selenium test suite. * * @param browser - the browserString ("*firefox", "*iexplore" or an executable path) * @param startURL - the start URL for the browser * @param suiteURL - the relative URL to the HTML suite * @param outputFile - The file to which we'll output the HTM...
Launches a single HTML Selenium test suite
runHTMLSuite
{ "repo_name": "titusfortner/selenium", "path": "java/src/org/openqa/selenium/server/htmlrunner/HTMLLauncher.java", "license": "apache-2.0", "size": 12306 }
[ "com.thoughtworks.selenium.Selenium", "com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium", "java.io.File", "java.io.IOException", "java.io.Writer", "java.nio.file.Files", "java.util.List", "java.util.logging.Level", "org.openqa.selenium.By", "org.openqa.selenium.WebDriver", "org.openqa...
import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium; import java.io.File; import java.io.IOException; import java.io.Writer; import java.nio.file.Files; import java.util.List; import java.util.logging.Level; import org.openqa.selenium.By; import org.openqa.selen...
import com.thoughtworks.selenium.*; import com.thoughtworks.selenium.webdriven.*; import java.io.*; import java.nio.file.*; import java.util.*; import java.util.logging.*; import org.openqa.selenium.*;
[ "com.thoughtworks.selenium", "java.io", "java.nio", "java.util", "org.openqa.selenium" ]
com.thoughtworks.selenium; java.io; java.nio; java.util; org.openqa.selenium;
84,629
public SendgridResponse<ListsResponse> listAllLists() throws SendGridException { return sendGridBuilder.get("contactdb/lists", ListsResponse.class); }
SendgridResponse<ListsResponse> function() throws SendGridException { return sendGridBuilder.get(STR, ListsResponse.class); }
/** * Returns an empty list if you GET and no lists exist on your account. * * @return * @throws SendGridException */
Returns an empty list if you GET and no lists exist on your account
listAllLists
{ "repo_name": "touwolf/sendgrid-client-api-v3", "path": "src/main/java/com/touwolf/sendgrid3/model/contacts/ListsApi.java", "license": "mit", "size": 8416 }
[ "com.touwolf.sendgrid3.SendGridException", "com.touwolf.sendgrid3.model.SendgridResponse", "com.touwolf.sendgrid3.model.contacts.data.list.ListsResponse" ]
import com.touwolf.sendgrid3.SendGridException; import com.touwolf.sendgrid3.model.SendgridResponse; import com.touwolf.sendgrid3.model.contacts.data.list.ListsResponse;
import com.touwolf.sendgrid3.*; import com.touwolf.sendgrid3.model.*; import com.touwolf.sendgrid3.model.contacts.data.list.*;
[ "com.touwolf.sendgrid3" ]
com.touwolf.sendgrid3;
1,317,688
Response<String> getRunbookContentWithResponse( String resourceGroupName, String automationAccountName, String jobName, String clientRequestId, Context context);
Response<String> getRunbookContentWithResponse( String resourceGroupName, String automationAccountName, String jobName, String clientRequestId, Context context);
/** * Retrieve the runbook content of the job identified by job name. * * @param resourceGroupName Name of an Azure Resource group. * @param automationAccountName The name of the automation account. * @param jobName The job name. * @param clientRequestId Identifies this specific client req...
Retrieve the runbook content of the job identified by job name
getRunbookContentWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/models/Jobs.java", "license": "mit", "size": 12829 }
[ "com.azure.core.http.rest.Response", "com.azure.core.util.Context" ]
import com.azure.core.http.rest.Response; import com.azure.core.util.Context;
import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
2,913,673
protected RegisteredService getRegisteredServiceFromFile(final File file) { val fileName = file.getName(); if (fileName.startsWith(".")) { LOGGER.trace("[{}] starts with ., ignoring", fileName); return null; } if (Arrays.stream(getExtensions()).noneMatch(fileN...
RegisteredService function(final File file) { val fileName = file.getName(); if (fileName.startsWith(".")) { LOGGER.trace(STR, fileName); return null; } if (Arrays.stream(getExtensions()).noneMatch(fileName::endsWith)) { LOGGER.trace(STR, fileName); return null; } val matcher = this.serviceFileNamePattern.matcher(fileN...
/** * Gets registered service from file. * * @param file the file * @return the registered service from file */
Gets registered service from file
getRegisteredServiceFromFile
{ "repo_name": "rrenomeron/cas", "path": "core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/resource/AbstractResourceBasedServiceRegistry.java", "license": "apache-2.0", "size": 17289 }
[ "java.io.File", "java.util.Arrays", "org.apache.commons.lang3.math.NumberUtils", "org.apereo.cas.services.RegisteredService" ]
import java.io.File; import java.util.Arrays; import org.apache.commons.lang3.math.NumberUtils; import org.apereo.cas.services.RegisteredService;
import java.io.*; import java.util.*; import org.apache.commons.lang3.math.*; import org.apereo.cas.services.*;
[ "java.io", "java.util", "org.apache.commons", "org.apereo.cas" ]
java.io; java.util; org.apache.commons; org.apereo.cas;
449,735
public static boolean destroyProcess(final @NotNull Process process) { return destroyProcess(process, false); }
static boolean function(final @NotNull Process process) { return destroyProcess(process, false); }
/** * Destroys process tree: in case of windows via imitating ctrl+break, in case of unix via sending sig_kill to every process in tree. * @param process to kill with all sub-processes. */
Destroys process tree: in case of windows via imitating ctrl+break, in case of unix via sending sig_kill to every process in tree
destroyProcess
{ "repo_name": "siosio/intellij-community", "path": "platform/platform-impl/src/com/intellij/execution/process/RunnerMediator.java", "license": "apache-2.0", "size": 5181 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,732,881
@Override public void setActiveEditor(IEditorPart part) { super.setActiveEditor(part); activeEditorPart = part; // Switch to the new selection provider. // if (selectionProvider != null) { selectionProvider.removeSelectionChangedListener(this); } if (part == null) { selectionProvider = null; ...
void function(IEditorPart part) { super.setActiveEditor(part); activeEditorPart = part; selectionProvider.removeSelectionChangedListener(this); } if (part == null) { selectionProvider = null; } else { selectionProvider = part.getSite().getSelectionProvider(); selectionProvider.addSelectionChangedListener(this); selecti...
/** * When the active editor changes, this remembers the change and registers with it as a selection provider. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
When the active editor changes, this remembers the change and registers with it as a selection provider.
setActiveEditor
{ "repo_name": "leondart/FRaMED", "path": "ORM/org.framed.orm.model.editor/src/org/framed/orm/geometry/presentation/GeometryActionBarContributor.java", "license": "epl-1.0", "size": 14101 }
[ "org.eclipse.jface.viewers.SelectionChangedEvent", "org.eclipse.ui.IEditorPart" ]
import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.ui.IEditorPart;
import org.eclipse.jface.viewers.*; import org.eclipse.ui.*;
[ "org.eclipse.jface", "org.eclipse.ui" ]
org.eclipse.jface; org.eclipse.ui;
1,341,537
void compactRegionServer(ServerName sn, boolean major) throws IOException, InterruptedException;
void compactRegionServer(ServerName sn, boolean major) throws IOException, InterruptedException;
/** * Compact all regions on the region server. Asynchronous operation in that this method requests * that a Compaction run and then it returns. It does not wait on the completion of Compaction * (it can take a while). * @param sn the region server name * @param major if it's major compaction * @throw...
Compact all regions on the region server. Asynchronous operation in that this method requests that a Compaction run and then it returns. It does not wait on the completion of Compaction (it can take a while)
compactRegionServer
{ "repo_name": "vincentpoon/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 104154 }
[ "java.io.IOException", "org.apache.hadoop.hbase.ServerName" ]
import java.io.IOException; import org.apache.hadoop.hbase.ServerName;
import java.io.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,668,750
public synchronized void disableService() { // remove initiation packet listener this.connection.removePacketListener(this.initiationListener); // shutdown threads this.initiationListener.shutdown(); // clear listeners this.allRequestListeners.clear(); ...
synchronized void function() { this.connection.removePacketListener(this.initiationListener); this.initiationListener.shutdown(); this.allRequestListeners.clear(); this.userListeners.clear(); this.lastWorkingProxy = null; this.proxyBlacklist.clear(); this.ignoredBytestreamRequests.clear(); managers.remove(this.connecti...
/** * Disables the SOCKS5 Bytestream manager by removing the SOCKS5 Bytestream feature from the * service discovery, disabling the listener for SOCKS5 Bytestream initiation requests and * resetting its internal state. * <p> * To re-enable the SOCKS5 Bytestream feature invoke {@link #getByt...
Disables the SOCKS5 Bytestream manager by removing the SOCKS5 Bytestream feature from the service discovery, disabling the listener for SOCKS5 Bytestream initiation requests and resetting its internal state. To re-enable the SOCKS5 Bytestream feature invoke <code>#getBytestreamManager(Connection)</code>. Using the file...
disableService
{ "repo_name": "ErkiDerLoony/xpeter", "path": "lib/smack-3.2.1-source/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java", "license": "gpl-3.0", "size": 30850 }
[ "org.jivesoftware.smackx.ServiceDiscoveryManager" ]
import org.jivesoftware.smackx.ServiceDiscoveryManager;
import org.jivesoftware.smackx.*;
[ "org.jivesoftware.smackx" ]
org.jivesoftware.smackx;
1,294,767
public void createFile(JDBCSequentialFile file) throws SQLException { synchronized (connection) { try { connection.setAutoCommit(false); createFile.setString(1, file.getFileName()); createFile.setString(2, file.getExtension()); createFile.setBytes(3, new...
void function(JDBCSequentialFile file) throws SQLException { synchronized (connection) { try { connection.setAutoCommit(false); createFile.setString(1, file.getFileName()); createFile.setString(2, file.getExtension()); createFile.setBytes(3, new byte[0]); createFile.executeUpdate(); try (ResultSet keys = createFile.get...
/** * Creates a new database row representing the supplied file. * * @param file * @throws SQLException */
Creates a new database row representing the supplied file
createFile
{ "repo_name": "cshannon/activemq-artemis", "path": "artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java", "license": "apache-2.0", "size": 11604 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,311,686
@TargetApi(11) public void setMultiChoiceModeListener( MultiChoiceModeListener listener ) { if ( android.os.Build.VERSION.SDK_INT >= 11 ) { if ( mMultiChoiceModeCallback == null ) { mMultiChoiceModeCallback = new MultiChoiceModeWrapper( this ); } ((MultiChoiceModeWrapper) mMultiChoiceModeCallback).se...
@TargetApi(11) void function( MultiChoiceModeListener listener ) { if ( android.os.Build.VERSION.SDK_INT >= 11 ) { if ( mMultiChoiceModeCallback == null ) { mMultiChoiceModeCallback = new MultiChoiceModeWrapper( this ); } ((MultiChoiceModeWrapper) mMultiChoiceModeCallback).setWrapped( listener ); } else { Log.e( TAG, S...
/** * Set a {@link MultiChoiceModeListener} that will manage the lifecycle of the selection {@link ActionMode}. Only used when the * choice mode is set to {@link #CHOICE_MODE_MULTIPLE_MODAL}. * * @param listener * Listener that will manage the selection mode * * @see #setChoiceMode(int) */
Set a <code>MultiChoiceModeListener</code> that will manage the lifecycle of the selection <code>ActionMode</code>. Only used when the choice mode is set to <code>#CHOICE_MODE_MULTIPLE_MODAL</code>
setMultiChoiceModeListener
{ "repo_name": "BaneP/CustomViews", "path": "HorizontalListViewLibrary/src/it/sephiroth/android/library/widget/AbsHListView.java", "license": "apache-2.0", "size": 178847 }
[ "android.annotation.TargetApi", "android.os.Build", "android.util.Log", "it.sephiroth.android.library.util.v11.MultiChoiceModeListener", "it.sephiroth.android.library.util.v11.MultiChoiceModeWrapper" ]
import android.annotation.TargetApi; import android.os.Build; import android.util.Log; import it.sephiroth.android.library.util.v11.MultiChoiceModeListener; import it.sephiroth.android.library.util.v11.MultiChoiceModeWrapper;
import android.annotation.*; import android.os.*; import android.util.*; import it.sephiroth.android.library.util.v11.*;
[ "android.annotation", "android.os", "android.util", "it.sephiroth.android" ]
android.annotation; android.os; android.util; it.sephiroth.android;
492,316
@Override public void destroy() throws Exception { // Shut down the replenisherExecutor LOG.debug("DESTROY - Shutting down the replenisher executor."); replenisherExecutor.shutdown(); LOG.debug("DESTROY - Awaiting replenisher executor termination for 30 seconds"); reple...
void function() throws Exception { LOG.debug(STR); replenisherExecutor.shutdown(); LOG.debug(STR); replenisherExecutor.awaitTermination(30, TimeUnit.SECONDS); LOG.debug(STR); idServiceExecutor.shutdown(); LOG.debug(STR); idServiceExecutor.awaitTermination(30, TimeUnit.SECONDS); LOG.debug(STR); openIdStores.forEach((sto...
/** * Provides for an orderly shutdown of resources: (1) shut down and terminate worker thread pools and (2) commit * and close the underlying persistence store for the id caches. * * @throws Exception */
Provides for an orderly shutdown of resources: (1) shut down and terminate worker thread pools and (2) commit and close the underlying persistence store for the id caches
destroy
{ "repo_name": "rmap-project/rmap", "path": "idservice-ark/src/main/java/info/rmapproject/core/idservice/ConcurrentArkIdService.java", "license": "apache-2.0", "size": 16061 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,586,079
public void setOrAdd(int index, E element) { if (index < 0) { throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); } if (index >= values.length) { values = Arrays.copyOf(values, index + 1); } values[index] = element; }
void function(int index, E element) { if (index < 0) { throw new IndexOutOfBoundsException(STR + index + STR + size); } if (index >= values.length) { values = Arrays.copyOf(values, index + 1); } values[index] = element; }
/** * Sets the element at the specified position in this list to the specified element. If the values exists it is * replaced. If the index is greater than the list's capacity then the list grows. */
Sets the element at the specified position in this list to the specified element. If the values exists it is replaced. If the index is greater than the list's capacity then the list grows
setOrAdd
{ "repo_name": "MCPhoton/Photon-MC1.8", "path": "src/com/electronwill/collections/OpenList.java", "license": "agpl-3.0", "size": 8894 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
720,421
public static final ParquetMetadata readFooter(Configuration configuration, FileStatus file, MetadataFilter filter) throws IOException { FileSystem fileSystem = file.getPath().getFileSystem(configuration); FSDataInputStream in = fileSystem.open(file.getPath()); try { return readFooter(file, in, filt...
static final ParquetMetadata function(Configuration configuration, FileStatus file, MetadataFilter filter) throws IOException { FileSystem fileSystem = file.getPath().getFileSystem(configuration); FSDataInputStream in = fileSystem.open(file.getPath()); try { return readFooter(file, in, filter); } finally { in.close(); ...
/** * Reads the meta data block in the footer of the file * @param configuration * @param file the parquet File * @param filter the filter to apply to row groups * @return the metadata blocks in the footer * @throws IOException if an error occurs while reading the file */
Reads the meta data block in the footer of the file
readFooter
{ "repo_name": "nezihyigitbasi-nflx/parquet-mr", "path": "parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java", "license": "apache-2.0", "size": 41120 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FSDataInputStream", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.parquet.format.converter.ParquetMetadataConverter", "org.apache.parquet.hadoop.metadata.ParquetMetadata" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.parquet.format.converter.ParquetMetadataConverter; import org.apache.parquet.hadoop.metadata.ParquetMe...
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.parquet.format.converter.*; import org.apache.parquet.hadoop.metadata.*;
[ "java.io", "org.apache.hadoop", "org.apache.parquet" ]
java.io; org.apache.hadoop; org.apache.parquet;
239,214
public SemanticTag getSubSpaceTag() throws SharkKBException;
SemanticTag function() throws SharkKBException;
/** * Each sub space has it own identiy which is described by a * semantic tag. This methods returns this tag. This tag * <b>does not describe the meaning of this sub space</b> * @return * @throws SharkKBException */
Each sub space has it own identiy which is described by a semantic tag. This methods returns this tag. This tag does not describe the meaning of this sub space
getSubSpaceTag
{ "repo_name": "blackicetee/SharkProfile", "path": "src/java/coreApps/net/sharkfw/subspace/SubSpace.java", "license": "gpl-3.0", "size": 15868 }
[ "net.sharkfw.knowledgeBase.SemanticTag", "net.sharkfw.knowledgeBase.SharkKBException" ]
import net.sharkfw.knowledgeBase.SemanticTag; import net.sharkfw.knowledgeBase.SharkKBException;
import net.sharkfw.*;
[ "net.sharkfw" ]
net.sharkfw;
2,586,553
@Nullable public static <T> T getLast(Iterable<? extends T> iterable, @Nullable T defaultValue) { if (iterable instanceof Collection) { Collection<? extends T> c = Collections2.cast(iterable); if (c.isEmpty()) { return defaultValue; } else if (iterable instanceof List) { return...
static <T> T function(Iterable<? extends T> iterable, @Nullable T defaultValue) { if (iterable instanceof Collection) { Collection<? extends T> c = Collections2.cast(iterable); if (c.isEmpty()) { return defaultValue; } else if (iterable instanceof List) { return getLastInNonemptyList(Lists.cast(iterable)); } } return I...
/** * Returns the last element of {@code iterable} or {@code defaultValue} if * the iterable is empty. * * @param defaultValue the value to return if {@code iterable} is empty * @return the last element of {@code iterable} or the default value * @since 3.0 */
Returns the last element of iterable or defaultValue if the iterable is empty
getLast
{ "repo_name": "sensui/guava-libraries", "path": "guava/src/com/google/common/collect/Iterables.java", "license": "apache-2.0", "size": 37377 }
[ "java.util.Collection", "java.util.List", "javax.annotation.Nullable" ]
import java.util.Collection; import java.util.List; import javax.annotation.Nullable;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
2,123,748
@Test public void testWrongUserTypeForGet() { User user = getUserWithUserTypeAnbieter(); // Since we need the password within the header as cleartext, it is extracted from the passwordconfirm field String authString = user.getUsername() + ":" + user.getPasswordconfirm(); byte[] base64Encoded = Base6...
void function() { User user = getUserWithUserTypeAnbieter(); String authString = user.getUsername() + ":" + user.getPasswordconfirm(); byte[] base64Encoded = Base64.getEncoder().encode(authString.getBytes()); String encodedString = new String(base64Encoded); JsonPath response = RestAssured .given() .header(STR, STR + e...
/** * Test wrong user type for get. */
Test wrong user type for get
testWrongUserTypeForGet
{ "repo_name": "andju/findlunch", "path": "webapp/src/test/java/edu/hm/cs/projektstudium/findlunch/webapp/controller/rest/PushNotificationRestControllerIT.java", "license": "apache-2.0", "size": 44772 }
[ "com.jayway.restassured.RestAssured", "com.jayway.restassured.path.json.JsonPath", "edu.hm.cs.projektstudium.findlunch.webapp.model.User", "java.util.Base64", "org.junit.Assert" ]
import com.jayway.restassured.RestAssured; import com.jayway.restassured.path.json.JsonPath; import edu.hm.cs.projektstudium.findlunch.webapp.model.User; import java.util.Base64; import org.junit.Assert;
import com.jayway.restassured.*; import com.jayway.restassured.path.json.*; import edu.hm.cs.projektstudium.findlunch.webapp.model.*; import java.util.*; import org.junit.*;
[ "com.jayway.restassured", "edu.hm.cs", "java.util", "org.junit" ]
com.jayway.restassured; edu.hm.cs; java.util; org.junit;
2,400,504
@Resource(name = "usersrepository") public final void setUsers(UsersRepository users) { this.users = users; }
@Resource(name = STR) final void function(UsersRepository users) { this.users = users; }
/** * Sets the users repository. * * @param users * the users to set */
Sets the users repository
setUsers
{ "repo_name": "imatin/James", "path": "protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptHandler.java", "license": "apache-2.0", "size": 5591 }
[ "javax.annotation.Resource", "org.apache.james.user.api.UsersRepository" ]
import javax.annotation.Resource; import org.apache.james.user.api.UsersRepository;
import javax.annotation.*; import org.apache.james.user.api.*;
[ "javax.annotation", "org.apache.james" ]
javax.annotation; org.apache.james;
2,027,091
protected Button createToggleButton(Composite parent) { final Button button = new Button(parent, SWT.CHECK | SWT.LEFT); GridData data = new GridData(SWT.NONE); data.horizontalSpan = 2; button.setLayoutData(data); button.setFont(parent.getFont()); button.addSelection...
Button function(Composite parent) { final Button button = new Button(parent, SWT.CHECK SWT.LEFT); GridData data = new GridData(SWT.NONE); data.horizontalSpan = 2; button.setLayoutData(data); button.setFont(parent.getFont()); button.addSelectionListener(new SelectionAdapter() {
/** * Creates a toggle button without any text or state. The text and state * will be created by <code>createDialogArea</code>. * * @param parent * The composite in which the toggle button should be placed; * must not be <code>null</code>. * @return The added to...
Creates a toggle button without any text or state. The text and state will be created by <code>createDialogArea</code>
createToggleButton
{ "repo_name": "AntoineDelacroix/NewSuperProject-", "path": "org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialogWithToggle.java", "license": "gpl-2.0", "size": 26964 }
[ "org.eclipse.swt.events.SelectionAdapter", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Composite" ]
import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.events.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
761,469
@Test public void testIsSufixoEqualsInteger() { assertTrue(new CNPJ(cnpjBradescoFilialStrFmt).isSufixoEquals(5)); assertTrue(!new CNPJ(cnpjBradescoStrFmt).isSufixoEquals(5)); }
void function() { assertTrue(new CNPJ(cnpjBradescoFilialStrFmt).isSufixoEquals(5)); assertTrue(!new CNPJ(cnpjBradescoStrFmt).isSufixoEquals(5)); }
/** * Test method for {@link org.jrimum.domkee.comum.pessoa.id.cprf.CNPJ#isSufixoEquals(java.lang.Integer)}. */
Test method for <code>org.jrimum.domkee.comum.pessoa.id.cprf.CNPJ#isSufixoEquals(java.lang.Integer)</code>
testIsSufixoEqualsInteger
{ "repo_name": "braully/bopepo", "path": "src/test/java/org/jrimum/domkee/comum/pessoa/id/cprf/TestCNPJ.java", "license": "apache-2.0", "size": 5173 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,157,108
public final void printPartialStackTrace(PrintWriter out) { super.printStackTrace(out); }
final void function(PrintWriter out) { super.printStackTrace(out); }
/** * Prints the stack trace for this exception only (root cause not included) * using the specified writer. * * @param out the writer to write to * @since 2.1 */
Prints the stack trace for this exception only (root cause not included) using the specified writer
printPartialStackTrace
{ "repo_name": "glorycloud/GloryMail", "path": "CloudyMail/lib_src/org/apache/commons/lang/NotImplementedException.java", "license": "apache-2.0", "size": 9944 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
476,760
private IgniteCache<?, ?> createSqlCache(Ignite node) throws IgniteCheckedException { return createSqlCache(node, cacheConfiguration()); }
IgniteCache<?, ?> function(Ignite node) throws IgniteCheckedException { return createSqlCache(node, cacheConfiguration()); }
/** * Start SQL cache on given node. * @param node Node to create cache on. * @return Created cache. */
Start SQL cache on given node
createSqlCache
{ "repo_name": "NSAmelchev/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java", "license": "apache-2.0", "size": 37675 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.IgniteCache", "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,051,822
public String encodeRepositoryPath(final String path) { if (path == null) { throw new IllegalArgumentException("path must not be null!"); } String modifiedPath = path; for (Map.Entry<String, String> replacement : PATH_REPLACEMENT_MAP.entrySet()) { modifiedPath = modifiedPath.replaceAll(replacement.get...
String function(final String path) { if (path == null) { throw new IllegalArgumentException(STR); } String modifiedPath = path; for (Map.Entry<String, String> replacement : PATH_REPLACEMENT_MAP.entrySet()) { modifiedPath = modifiedPath.replaceAll(replacement.getKey(), replacement.getValue()); } return modifiedPath; }
/** * Encodes a repository path (see {@link com.rapidminer.repository.RepositoryLocation}) for searching. * This means that {@link com.rapidminer.repository.RepositoryLocation#REPOSITORY_PREFIX} and * {@link com.rapidminer.repository.RepositoryLocation#SEPARATOR} will be replaced by a string and all whitespaces w...
Encodes a repository path (see <code>com.rapidminer.repository.RepositoryLocation</code>) for searching. This means that <code>com.rapidminer.repository.RepositoryLocation#REPOSITORY_PREFIX</code> and <code>com.rapidminer.repository.RepositoryLocation#SEPARATOR</code> will be replaced by a string and all whitespaces wi...
encodeRepositoryPath
{ "repo_name": "rapidminer/rapidminer-studio", "path": "src/main/java/com/rapidminer/search/GlobalSearchUtilities.java", "license": "agpl-3.0", "size": 12061 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
261,929
public long getResourceLoadingTime() throws IOException, InterruptedException { return channel.call(new LoadingTime(true)); }
long function() throws IOException, InterruptedException { return channel.call(new LoadingTime(true)); }
/** * Shows {@link Channel#resourceLoadingTime}. * @since 1.495 */
Shows <code>Channel#resourceLoadingTime</code>
getResourceLoadingTime
{ "repo_name": "andresrc/jenkins", "path": "core/src/main/java/hudson/slaves/SlaveComputer.java", "license": "mit", "size": 38862 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
674,986
@FrameBooleanDefaultValue(false) @Property(WINDUP_GENERATED) void setWindupGenerated(boolean generated);
@FrameBooleanDefaultValue(false) @Property(WINDUP_GENERATED) void setWindupGenerated(boolean generated);
/** * Specifies if the given file was generated by windup or it originates from application. */
Specifies if the given file was generated by windup or it originates from application
setWindupGenerated
{ "repo_name": "johnsteele/windup", "path": "graph/api/src/main/java/org/jboss/windup/graph/model/resource/FileModel.java", "license": "epl-1.0", "size": 11458 }
[ "org.jboss.windup.graph.Property", "org.jboss.windup.graph.frames.FrameBooleanDefaultValue" ]
import org.jboss.windup.graph.Property; import org.jboss.windup.graph.frames.FrameBooleanDefaultValue;
import org.jboss.windup.graph.*; import org.jboss.windup.graph.frames.*;
[ "org.jboss.windup" ]
org.jboss.windup;
490,630
public CohortIndicator mothersNewBornPairReview() { return cohortIndicator("Mother-baby pair postnatal follow-up", map(qiEmtctCohortLibrary.mothersNewBornPairReview(), "onDate=${endDate}"), map(qiEmtctCohortLibrary.numberOfExpectedDeliveriesInTheFacilityCatchmentPopulationDuringTheReviewPeriod(), "onOrBefo...
CohortIndicator function() { return cohortIndicator(STR, map(qiEmtctCohortLibrary.mothersNewBornPairReview(), STR), map(qiEmtctCohortLibrary.numberOfExpectedDeliveriesInTheFacilityCatchmentPopulationDuringTheReviewPeriod(), STR) ); }
/** * % of Mother-newborn pairs reviewed by health care provider 7-14 days of birth * @return CohortIndicator */
% of Mother-newborn pairs reviewed by health care provider 7-14 days of birth
mothersNewBornPairReview
{ "repo_name": "hispindia/his-tb-emr", "path": "api/src/main/java/org/openmrs/module/kenyaemr/reporting/library/shared/hiv/QiEmtctIndicatorLibrary.java", "license": "gpl-3.0", "size": 8286 }
[ "org.openmrs.module.kenyacore.report.ReportUtils", "org.openmrs.module.kenyaemr.reporting.EmrReportingUtils", "org.openmrs.module.reporting.indicator.CohortIndicator" ]
import org.openmrs.module.kenyacore.report.ReportUtils; import org.openmrs.module.kenyaemr.reporting.EmrReportingUtils; import org.openmrs.module.reporting.indicator.CohortIndicator;
import org.openmrs.module.kenyacore.report.*; import org.openmrs.module.kenyaemr.reporting.*; import org.openmrs.module.reporting.indicator.*;
[ "org.openmrs.module" ]
org.openmrs.module;
373,486
public static InputFormatBuilder.ClientParams<Job> configure() { return new InputFormatBuilderImpl<>(CLASS); }
static InputFormatBuilder.ClientParams<Job> function() { return new InputFormatBuilderImpl<>(CLASS); }
/** * Sets all the information required for this map reduce job. */
Sets all the information required for this map reduce job
configure
{ "repo_name": "lstav/accumulo", "path": "hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoop/mapreduce/AccumuloInputFormat.java", "license": "apache-2.0", "size": 4662 }
[ "org.apache.accumulo.hadoopImpl.mapreduce.InputFormatBuilderImpl", "org.apache.hadoop.mapreduce.Job" ]
import org.apache.accumulo.hadoopImpl.mapreduce.InputFormatBuilderImpl; import org.apache.hadoop.mapreduce.Job;
import org.apache.accumulo.*; import org.apache.hadoop.mapreduce.*;
[ "org.apache.accumulo", "org.apache.hadoop" ]
org.apache.accumulo; org.apache.hadoop;
2,811,911
@Override public void RemoveFromSuppressLLDPs(DatapathId sw, OFPort port) { NodePortTuple npt = new NodePortTuple(sw, port); this.suppressLinkDiscovery.remove(npt); discover(npt); }
void function(DatapathId sw, OFPort port) { NodePortTuple npt = new NodePortTuple(sw, port); this.suppressLinkDiscovery.remove(npt); discover(npt); }
/** * Remove a switch port from the suppressed LLDP list. Discover links on * that switchport. */
Remove a switch port from the suppressed LLDP list. Discover links on that switchport
RemoveFromSuppressLLDPs
{ "repo_name": "cbarrin/EAGERFloodlight", "path": "src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java", "license": "apache-2.0", "size": 73310 }
[ "net.floodlightcontroller.core.types.NodePortTuple", "org.projectfloodlight.openflow.types.DatapathId", "org.projectfloodlight.openflow.types.OFPort" ]
import net.floodlightcontroller.core.types.NodePortTuple; import org.projectfloodlight.openflow.types.DatapathId; import org.projectfloodlight.openflow.types.OFPort;
import net.floodlightcontroller.core.types.*; import org.projectfloodlight.openflow.types.*;
[ "net.floodlightcontroller.core", "org.projectfloodlight.openflow" ]
net.floodlightcontroller.core; org.projectfloodlight.openflow;
1,480,900
protected DefaultFileSystemManager createManager() throws Exception { DefaultFileSystemManager fs = getProviderConfig().getDefaultFileSystemManager(); fs.setFilesCache(getProviderConfig().getFilesCache()); getProviderConfig().prepare(fs); if (!fs.hasProvider("file")) { ...
DefaultFileSystemManager function() throws Exception { DefaultFileSystemManager fs = getProviderConfig().getDefaultFileSystemManager(); fs.setFilesCache(getProviderConfig().getFilesCache()); getProviderConfig().prepare(fs); if (!fs.hasProvider("file")) { fs.addProvider("file", new DefaultLocalFileProvider()); } return ...
/** * creates a new uninitialized file system manager * @throws Exception */
creates a new uninitialized file system manager
createManager
{ "repo_name": "virajsenevirathne/wso2-commons-vfs", "path": "core/src/test/java/org/apache/commons/vfs2/test/AbstractProviderTestCase.java", "license": "apache-2.0", "size": 13036 }
[ "org.apache.commons.vfs2.impl.DefaultFileSystemManager", "org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider" ]
import org.apache.commons.vfs2.impl.DefaultFileSystemManager; import org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider;
import org.apache.commons.vfs2.impl.*; import org.apache.commons.vfs2.provider.local.*;
[ "org.apache.commons" ]
org.apache.commons;
22,688
public void setProcessEndDate(Date processEndDate) { this.processEndDate = (processEndDate == null ? null : new Date(processEndDate.getTime())); }
void function(Date processEndDate) { this.processEndDate = (processEndDate == null ? null : new Date(processEndDate.getTime())); }
/** * Set the process end date. This is the date and time the processing ended. * * @param processEndDate * The processEndDate to set. */
Set the process end date. This is the date and time the processing ended
setProcessEndDate
{ "repo_name": "jamie-dryad/dryad-repo", "path": "dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java", "license": "bsd-3-clause", "size": 4716 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,898,428
@Test public void testSun2() throws ParseException, NamingException { String value = "( 1.3.6.1.4.1.42.2.27.9.4.34.3.6 NAME 'caseExactSubstringMatch-2.16.840.1.113730.3.3.2.11.3' DESC 'en' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )"; if ( !parser.isQuirksMode() ) { try ...
void function() throws ParseException, NamingException { String value = STR; if ( !parser.isQuirksMode() ) { try { parser.parseMatchingRuleDescription( value ); fail( STR ); } catch ( ParseException pe ) { assertTrue( true ); } } else { MatchingRule matchingRule = parser.parseMatchingRuleDescription( value ); assertEqu...
/** * This is a real matching rule from Sun Directory 5.2. It has an invalid * syntax, no DOTs allowed in NAME value. */
This is a real matching rule from Sun Directory 5.2. It has an invalid syntax, no DOTs allowed in NAME value
testSun2
{ "repo_name": "darranl/directory-shared", "path": "ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/parser/MatchingRuleDescriptionSchemaParserTest.java", "license": "apache-2.0", "size": 13124 }
[ "java.text.ParseException", "javax.naming.NamingException", "org.apache.directory.api.ldap.model.schema.MatchingRule", "org.junit.Assert" ]
import java.text.ParseException; import javax.naming.NamingException; import org.apache.directory.api.ldap.model.schema.MatchingRule; import org.junit.Assert;
import java.text.*; import javax.naming.*; import org.apache.directory.api.ldap.model.schema.*; import org.junit.*;
[ "java.text", "javax.naming", "org.apache.directory", "org.junit" ]
java.text; javax.naming; org.apache.directory; org.junit;
738,436
public static List<Action> getActions(MonitoringRule rule, String nameFilter) { List<Action> result = new ArrayList<Action>(); if (nameFilter == null) { throw new NullPointerException("nameFilter cannot be null"); } for (Action action : getActions(rule)) { ...
static List<Action> function(MonitoringRule rule, String nameFilter) { List<Action> result = new ArrayList<Action>(); if (nameFilter == null) { throw new NullPointerException(STR); } for (Action action : getActions(rule)) { if (nameFilter.equalsIgnoreCase(action.getName())) { result.add(action); } } return result; }
/** * Get the actions of a rule filtered by its name */
Get the actions of a rule filtered by its name
getActions
{ "repo_name": "modaclouds/modaclouds-sla-mediator", "path": "src/main/java/eu/modaclouds/sla/mediator/model/QosModels.java", "license": "apache-2.0", "size": 4540 }
[ "it.polimi.modaclouds.qos_models.schema.Action", "it.polimi.modaclouds.qos_models.schema.MonitoringRule", "java.util.ArrayList", "java.util.List" ]
import it.polimi.modaclouds.qos_models.schema.Action; import it.polimi.modaclouds.qos_models.schema.MonitoringRule; import java.util.ArrayList; import java.util.List;
import it.polimi.modaclouds.qos_models.schema.*; import java.util.*;
[ "it.polimi.modaclouds", "java.util" ]
it.polimi.modaclouds; java.util;
1,638,991
public static SecureRandom getSecureRandom() { return LazySecureRandom.random; } // lazy initialization of SecureRandom private static class LazySecureRandom { static final SecureRandom random = new SecureRandom(); }
static SecureRandom function() { return LazySecureRandom.random; } private static class LazySecureRandom { static final SecureRandom random = new SecureRandom(); }
/** * Gets a lazy initialized globally {@link SecureRandom} object. * * @return a lazy initialized globally {@link SecureRandom} object. */
Gets a lazy initialized globally <code>SecureRandom</code> object
getSecureRandom
{ "repo_name": "Haixing-Hu/commons", "path": "src/main/java/com/github/haixing_hu/lang/SystemUtils.java", "license": "apache-2.0", "size": 32846 }
[ "java.security.SecureRandom" ]
import java.security.SecureRandom;
import java.security.*;
[ "java.security" ]
java.security;
850,122
@Test public void testSurviveErrorOnOpen() throws IOException, InterruptedException { LOG.info("Survive error on open with WALSource"); File basedir = FileUtil.mktempdir(); basedir.deleteOnExit(); // create empty file. File logDir = new File(basedir, NaiveFileWALManager.LOGGEDDIR); logDir.m...
void function() throws IOException, InterruptedException { LOG.info(STR); File basedir = FileUtil.mktempdir(); basedir.deleteOnExit(); File logDir = new File(basedir, NaiveFileWALManager.LOGGEDDIR); logDir.mkdirs(); File corrupt = new File(logDir, STR); LOG.info(STR + corrupt.getAbsolutePath()); corrupt.createNewFile()...
/** * WAL should succeed on open even if its internal opens fail. It will block * on next() while continuing to try get a valid source of events. * * This test demonstrates this by starting the WALSource, calling next in a * separate thread, and waits a little. Nothing should have happened. */
WAL should succeed on open even if its internal opens fail. It will block on next() while continuing to try get a valid source of events. This test demonstrates this by starting the WALSource, calling next in a separate thread, and waits a little. Nothing should have happened
testSurviveErrorOnOpen
{ "repo_name": "fengzanfeng/flume-v2", "path": "flume-core/test/java/com/cloudera/flume/agent/diskfailover/TestDiskFailoverSource.java", "license": "apache-2.0", "size": 13763 }
[ "com.cloudera.flume.agent.durability.NaiveFileWALManager", "com.cloudera.util.FileUtil", "java.io.File", "java.io.IOException", "java.util.concurrent.atomic.AtomicBoolean" ]
import com.cloudera.flume.agent.durability.NaiveFileWALManager; import com.cloudera.util.FileUtil; import java.io.File; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean;
import com.cloudera.flume.agent.durability.*; import com.cloudera.util.*; import java.io.*; import java.util.concurrent.atomic.*;
[ "com.cloudera.flume", "com.cloudera.util", "java.io", "java.util" ]
com.cloudera.flume; com.cloudera.util; java.io; java.util;
1,587,026
public static Response toConflictJsonResponse(ResourceException rex) { return Response.status(Response.Status.CONFLICT) .entity(toJson(rex)).type(MediaType.APPLICATION_JSON).build(); }
static Response function(ResourceException rex) { return Response.status(Response.Status.CONFLICT) .entity(toJson(rex)).type(MediaType.APPLICATION_JSON).build(); }
/** * To be used inside ClientErrorException, like this : * throw new ClientErrorException(toConflictJsonResponse(e)). * Inspired by JaxrsExceptionHelper * @param t * @return */
To be used inside ClientErrorException, like this : throw new ClientErrorException(toConflictJsonResponse(e)). Inspired by JaxrsExceptionHelper
toConflictJsonResponse
{ "repo_name": "ozwillo/ozwillo-datacore", "path": "ozwillo-datacore-rest-server/src/main/java/org/oasis/datacore/rest/server/DatacoreApiImpl.java", "license": "agpl-3.0", "size": 31174 }
[ "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.oasis.datacore.rest.server.resource.ResourceException" ]
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.oasis.datacore.rest.server.resource.ResourceException;
import javax.ws.rs.core.*; import org.oasis.datacore.rest.server.resource.*;
[ "javax.ws", "org.oasis.datacore" ]
javax.ws; org.oasis.datacore;
2,491,910
private Plugin[] buildPlugins(PluginFactoryStaticMethodSpec[] pluginFactoryStaticMethodSpecs) { int len = pluginFactoryStaticMethodSpecs.length; Plugin[] result = new Plugin[len]; for (int i = 0; i < len; i++) { result[i] = this.buildPlugin(pluginFactoryStaticMethodSpecs[i]); } return result; } ...
Plugin[] function(PluginFactoryStaticMethodSpec[] pluginFactoryStaticMethodSpecs) { int len = pluginFactoryStaticMethodSpecs.length; Plugin[] result = new Plugin[len]; for (int i = 0; i < len; i++) { result[i] = this.buildPlugin(pluginFactoryStaticMethodSpecs[i]); } return result; }
/** * maintain the order of the specs */
maintain the order of the specs
buildPlugins
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/FrameworkApplication.java", "license": "epl-1.0", "size": 35396 }
[ "org.eclipse.persistence.tools.workbench.framework.Plugin" ]
import org.eclipse.persistence.tools.workbench.framework.Plugin;
import org.eclipse.persistence.tools.workbench.framework.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,547,701
protected void appendFunctionalInterfaceAnnotation(JvmGenericType type) { if (type != null && Utils.isFunctionalInterface(type, this.sarlSignatureProvider) && this.annotationFinder.findAnnotation(type, FunctionalInterface.class) == null) { final JvmAnnotationReference annotationRef = this._annotationTypesBu...
void function(JvmGenericType type) { if (type != null && Utils.isFunctionalInterface(type, this.sarlSignatureProvider) && this.annotationFinder.findAnnotation(type, FunctionalInterface.class) == null) { final JvmAnnotationReference annotationRef = this._annotationTypesBuilder.annotationRef( FunctionalInterface.class); ...
/** Append the @FunctionalInterface to the given type if it is a functional interface according * to the Java 8 specification definition. * * @param type the type to update. */
Append the @FunctionalInterface to the given type if it is a functional interface according to the Java 8 specification definition
appendFunctionalInterfaceAnnotation
{ "repo_name": "gallandarakhneorg/sarl", "path": "eclipse-sarl/plugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/SARLJvmModelInferrer.java", "license": "apache-2.0", "size": 113698 }
[ "io.sarl.lang.util.Utils", "org.eclipse.xtext.common.types.JvmAnnotationReference", "org.eclipse.xtext.common.types.JvmGenericType" ]
import io.sarl.lang.util.Utils; import org.eclipse.xtext.common.types.JvmAnnotationReference; import org.eclipse.xtext.common.types.JvmGenericType;
import io.sarl.lang.util.*; import org.eclipse.xtext.common.types.*;
[ "io.sarl.lang", "org.eclipse.xtext" ]
io.sarl.lang; org.eclipse.xtext;
969,949
public void setAliases(List<String> aliases) { m_aliases = aliases; }
void function(List<String> aliases) { m_aliases = aliases; }
/** * Sets the aliases.<p> * * @param aliases the aliases to set */
Sets the aliases
setAliases
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/ade/sitemap/shared/CmsClientSitemapEntry.java", "license": "lgpl-2.1", "size": 28821 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,993,383
public void setMessageError(String nameResource, int View) { String messageError = getResources().getString(getResources().getIdentifier(nameResource, "string", getPackageName())); switch (View){ case R.id.til_user: //Incorrect user case //mTilUser.setError(error); ...
void function(String nameResource, int View) { String messageError = getResources().getString(getResources().getIdentifier(nameResource, STR, getPackageName())); switch (View){ case R.id.til_user: Snackbar.make(layout, messageError, Snackbar.LENGTH_SHORT).show(); break; case R.id.til_password: Toast.makeText(this, mess...
/** * Show to the user the errors when the user o the password doesn't complete mimimun requeriments. * @param nameResource String Error * @param View User/Password error. */
Show to the user the errors when the user o the password doesn't complete mimimun requeriments
setMessageError
{ "repo_name": "JMedinilla/deint_ManageProducts", "path": "MngProvider_v2/app/src/main/java/com/afg/MngProductContentProvider/Login_Activity.java", "license": "apache-2.0", "size": 5407 }
[ "android.support.design.widget.Snackbar", "android.view.View", "android.widget.Toast" ]
import android.support.design.widget.Snackbar; import android.view.View; import android.widget.Toast;
import android.support.design.widget.*; import android.view.*; import android.widget.*;
[ "android.support", "android.view", "android.widget" ]
android.support; android.view; android.widget;
2,915,515
public int getRows(String tableName) throws NamingException, SQLException { Context ctx = cache.getJNDIContext(); DataSource ds = (DataSource) ctx.lookup("java:/SimpleDataSource"); String sql = "select * from " + tableName; int counter = 0; try (Connection conn = ds.getConnection(); Sta...
int function(String tableName) throws NamingException, SQLException { Context ctx = cache.getJNDIContext(); DataSource ds = (DataSource) ctx.lookup(STR); String sql = STR + tableName; int counter = 0; try (Connection conn = ds.getConnection(); Statement sm = conn.createStatement(); ResultSet rs = sm.executeQuery(sql)) ...
/** * This method is used to return number rows from the timestamped table created by createTable() * in CacheUtils class. */
This method is used to return number rows from the timestamped table created by createTable() in CacheUtils class
getRows
{ "repo_name": "smgoller/geode", "path": "geode-junit/src/main/java/org/apache/geode/internal/jta/JTAUtils.java", "license": "apache-2.0", "size": 8108 }
[ "java.sql.Connection", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "javax.naming.Context", "javax.naming.NamingException", "javax.sql.DataSource" ]
import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.naming.Context; import javax.naming.NamingException; import javax.sql.DataSource;
import java.sql.*; import javax.naming.*; import javax.sql.*;
[ "java.sql", "javax.naming", "javax.sql" ]
java.sql; javax.naming; javax.sql;
1,930,341
public static JsonNode getJsonNodeForSchema(String schemaText) throws IOException { boolean isYaml = true; // Analyse first lines of content to guess content format. String line = null; BufferedReader reader = new BufferedReader(new StringReader(schemaText)); while ((line = reader.read...
static JsonNode function(String schemaText) throws IOException { boolean isYaml = true; String line = null; BufferedReader reader = new BufferedReader(new StringReader(schemaText)); while ((line = reader.readLine()) != null) { line = line.trim(); if (line.startsWith("{") line.startsWith("[")) { isYaml = false; break; }...
/** * Get a Jackson JsonNode representation for OpenAPI schema text. This handles * the fact that OpenAPI spec may be formatted in YAML. In that case, it handles the * conversion. * @param schemaText The JSON or YAML string for OpenAPI schema * @return The Jackson JsonNode corresponding to OpenAPI s...
Get a Jackson JsonNode representation for OpenAPI schema text. This handles the fact that OpenAPI spec may be formatted in YAML. In that case, it handles the conversion
getJsonNodeForSchema
{ "repo_name": "microcks/microcks", "path": "commons/util/src/main/java/io/github/microcks/util/openapi/OpenAPISchemaValidator.java", "license": "apache-2.0", "size": 12098 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.ObjectMapper", "com.fasterxml.jackson.dataformat.yaml.YAMLFactory", "java.io.BufferedReader", "java.io.IOException", "java.io.StringReader" ]
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.dataformat.yaml.*; import java.io.*;
[ "com.fasterxml.jackson", "java.io" ]
com.fasterxml.jackson; java.io;
1,229,092
public void setCfmFlapCount(Set<Long> cfmFlapCount) { ColumnDescription columndesc = new ColumnDescription( InterfaceColumn.CFMFLAPCOUNT .columnName(), ...
void function(Set<Long> cfmFlapCount) { ColumnDescription columndesc = new ColumnDescription( InterfaceColumn.CFMFLAPCOUNT .columnName(), STR, VersionNum.VERSION730); super.setDataHandler(columndesc, cfmFlapCount); }
/** * Add a Column entity which column name is "cfm_flap_count" to the Row * entity of attributes. * @param cfmFlapCount the column data which column name is "cfm_flap_count" */
Add a Column entity which column name is "cfm_flap_count" to the Row entity of attributes
setCfmFlapCount
{ "repo_name": "kuangrewawa/OnosFw", "path": "ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Interface.java", "license": "apache-2.0", "size": 51208 }
[ "java.util.Set", "org.onosproject.ovsdb.rfc.tableservice.ColumnDescription" ]
import java.util.Set; import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
import java.util.*; import org.onosproject.ovsdb.rfc.tableservice.*;
[ "java.util", "org.onosproject.ovsdb" ]
java.util; org.onosproject.ovsdb;
820,592
@Test public void testDateClosureUnderCalendarConversion() { Calendar calDate; DateTimeConverter converter = new DateTimeConverter(TZ); // if we pass in a calendar, should get the same Calendar back Calendar testCalDate = Calendar.getInstance(); calDate = (Calendar)conv...
void function() { Calendar calDate; DateTimeConverter converter = new DateTimeConverter(TZ); Calendar testCalDate = Calendar.getInstance(); calDate = (Calendar)converter.convert(null, testCalDate); assertEquals(testCalDate, calDate); Date testDate = new Date(); calDate = (Calendar)converter.convert(null, testDate); ass...
/** * Verify that if a calendar or a date is passed to the converter, the converter returns * back the a calendar or date that is equivalent. * * @expectedResults Assert that both objects are equal. */
Verify that if a calendar or a date is passed to the converter, the converter returns back the a calendar or date that is equivalent
testDateClosureUnderCalendarConversion
{ "repo_name": "forcedotcom/dataloader", "path": "src/test/java/com/salesforce/dataloader/dyna/DateConverterTest.java", "license": "bsd-3-clause", "size": 30964 }
[ "java.util.Calendar", "java.util.Date", "org.junit.Assert" ]
import java.util.Calendar; import java.util.Date; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,111,432
public final void setScanner(Scanner scanner) { this.scanner = scanner; }
final void function(Scanner scanner) { this.scanner = scanner; }
/** * Set the scanner on which we read the website. * * @param scanner The scanner. */
Set the scanner on which we read the website
setScanner
{ "repo_name": "wichtounet/jtheque-books-module", "path": "src/main/java/org/jtheque/books/services/impl/utils/web/analyzers/AbstractBookAnalyzer.java", "license": "apache-2.0", "size": 8183 }
[ "java.util.Scanner" ]
import java.util.Scanner;
import java.util.*;
[ "java.util" ]
java.util;
2,664,439
public static byte[] encodeURLWithoutPadding(byte[] src) { return src == null ? null : Base64.getUrlEncoder().withoutPadding().encode(src); }
static byte[] function(byte[] src) { return src == null ? null : Base64.getUrlEncoder().withoutPadding().encode(src); }
/** * Encodes a byte array to base64 URL format. * @param src the byte array to encode * @return the base64 URL encoded bytes */
Encodes a byte array to base64 URL format
encodeURLWithoutPadding
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/core/azure-core/src/main/java/com/azure/core/util/Base64Util.java", "license": "mit", "size": 2000 }
[ "java.util.Base64" ]
import java.util.Base64;
import java.util.*;
[ "java.util" ]
java.util;
341,934
@Override protected IntegerLiteralExp getFixture() { return (IntegerLiteralExp) fixture; }
IntegerLiteralExp function() { return (IntegerLiteralExp) fixture; }
/** * Returns the fixture for this Integer Literal Exp test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Returns the fixture for this Integer Literal Exp test case.
getFixture
{ "repo_name": "dresden-ocl/dresdenocl", "path": "tests/org.dresdenocl.essentialocl.tests/src/org/dresdenocl/essentialocl/expressions/tests/IntegerLiteralExpTest.java", "license": "lgpl-3.0", "size": 3795 }
[ "org.dresdenocl.essentialocl.expressions.IntegerLiteralExp" ]
import org.dresdenocl.essentialocl.expressions.IntegerLiteralExp;
import org.dresdenocl.essentialocl.expressions.*;
[ "org.dresdenocl.essentialocl" ]
org.dresdenocl.essentialocl;
1,768,116
public void setQueryParams(Set<String> queryParams) { this.queryParams = queryParams; } /** * Process the request. If * {@link org.apache.solr.client.solrj.SolrRequest#getResponseParser()} is * null, then use {@link #getParser()}
void function(Set<String> queryParams) { this.queryParams = queryParams; } /** * Process the request. If * {@link org.apache.solr.client.solrj.SolrRequest#getResponseParser()} is * null, then use {@link #getParser()}
/** * Expert Method * @param queryParams set of param keys to only send via the query string * Note that the param will be sent as a query string if the key is part * of this Set or the SolrRequest's query params. * @see org.apache.solr.client.solrj.SolrRequest#getQueryParams */
Expert Method
setQueryParams
{ "repo_name": "cscorley/solr-only-mirror", "path": "solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java", "license": "apache-2.0", "size": 29058 }
[ "java.util.Set", "org.apache.solr.client.solrj.SolrRequest" ]
import java.util.Set; import org.apache.solr.client.solrj.SolrRequest;
import java.util.*; import org.apache.solr.client.solrj.*;
[ "java.util", "org.apache.solr" ]
java.util; org.apache.solr;
1,009,099
private static void createSampleFile(Path inputLoc) throws IOException { fs.deleteOnExit(inputLoc); FSDataOutputStream out = fs.create(inputLoc); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out)); for (int i = 0; i < 10; i++) { writer.write("Hello World"); writer.writ...
static void function(Path inputLoc) throws IOException { fs.deleteOnExit(inputLoc); FSDataOutputStream out = fs.create(inputLoc); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out)); for (int i = 0; i < 10; i++) { writer.write(STR); writer.write(STR); writer.newLine(); } writer.close(); }
/** * Create sample file for wordcount program * * @param inputLoc * @throws IOException */
Create sample file for wordcount program
createSampleFile
{ "repo_name": "apache/tez", "path": "tez-tests/src/test/java/org/apache/tez/test/TestSecureShuffle.java", "license": "apache-2.0", "size": 13127 }
[ "java.io.BufferedWriter", "java.io.IOException", "java.io.OutputStreamWriter", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.Path" ]
import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,483,875
private List<JavadocTag> getJavadocTags(TextBlock textBlock) { final JavadocTags tags = JavadocUtils.getJavadocTags(textBlock, JavadocUtils.JavadocTagType.BLOCK); if (!allowUnknownTags) { for (final InvalidJavadocTag tag : tags.getInvalidTags()) { log(tag.getL...
List<JavadocTag> function(TextBlock textBlock) { final JavadocTags tags = JavadocUtils.getJavadocTags(textBlock, JavadocUtils.JavadocTagType.BLOCK); if (!allowUnknownTags) { for (final InvalidJavadocTag tag : tags.getInvalidTags()) { log(tag.getLine(), tag.getCol(), MSG_UNKNOWN_TAG, tag.getName()); } } return tags.getV...
/** * Gets all standalone tags from a given javadoc. * @param textBlock the Javadoc comment to process. * @return all standalone tags from the given javadoc. */
Gets all standalone tags from a given javadoc
getJavadocTags
{ "repo_name": "nikhilgupta23/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java", "license": "lgpl-2.1", "size": 12674 }
[ "com.puppycrawl.tools.checkstyle.api.TextBlock", "com.puppycrawl.tools.checkstyle.utils.JavadocUtils", "java.util.List" ]
import com.puppycrawl.tools.checkstyle.api.TextBlock; import com.puppycrawl.tools.checkstyle.utils.JavadocUtils; import java.util.List;
import com.puppycrawl.tools.checkstyle.api.*; import com.puppycrawl.tools.checkstyle.utils.*; import java.util.*;
[ "com.puppycrawl.tools", "java.util" ]
com.puppycrawl.tools; java.util;
730,529
public SnapshotDeletionPolicy getDeletionPolicy() { return deletionPolicy; } /** * Returns the {@link org.apache.lucene.index.MergePolicy} for the engines {@link org.apache.lucene.index.IndexWriter}
SnapshotDeletionPolicy function() { return deletionPolicy; } /** * Returns the {@link org.apache.lucene.index.MergePolicy} for the engines {@link org.apache.lucene.index.IndexWriter}
/** * Returns a {@link SnapshotDeletionPolicy} used in the engines * {@link org.apache.lucene.index.IndexWriter}. */
Returns a <code>SnapshotDeletionPolicy</code> used in the engines <code>org.apache.lucene.index.IndexWriter</code>
getDeletionPolicy
{ "repo_name": "nrkkalyan/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/engine/EngineConfig.java", "license": "apache-2.0", "size": 16114 }
[ "org.apache.lucene.index.MergePolicy", "org.apache.lucene.index.SnapshotDeletionPolicy" ]
import org.apache.lucene.index.MergePolicy; import org.apache.lucene.index.SnapshotDeletionPolicy;
import org.apache.lucene.index.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,391,462
public Processor getCreditCardProcessor() throws SQLException, IOException { Processor ccp = table.getConnector().getPayment().getProcessor().get(processorId); if(ccp==null) throw new SQLException("Unable to find CreditCardProcessor: "+processorId); return ccp; }
Processor function() throws SQLException, IOException { Processor ccp = table.getConnector().getPayment().getProcessor().get(processorId); if(ccp==null) throw new SQLException(STR+processorId); return ccp; }
/** * Gets the credit card processor used for this transaction. */
Gets the credit card processor used for this transaction
getCreditCardProcessor
{ "repo_name": "aoindustries/aoserv-client", "path": "src/main/java/com/aoindustries/aoserv/client/payment/Payment.java", "license": "lgpl-3.0", "size": 48391 }
[ "java.io.IOException", "java.sql.SQLException" ]
import java.io.IOException; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
1,247,545
public static String[] readAllLines() { ArrayList<String> lines = new ArrayList<String>(); while (hasNextLine()) { lines.add(readLine()); } return lines.toArray(new String[0]); } /** * Reads all remaining tokens from standard input, parses them as i...
static String[] function() { ArrayList<String> lines = new ArrayList<String>(); while (hasNextLine()) { lines.add(readLine()); } return lines.toArray(new String[0]); } /** * Reads all remaining tokens from standard input, parses them as integers, and returns * them as an array of integers. * @return all remaining integ...
/** * Reads all remaining lines from standard input and returns them as an array of strings. * @return all remaining lines on standard input, as an array of strings */
Reads all remaining lines from standard input and returns them as an array of strings
readAllLines
{ "repo_name": "idiotrudra/projects", "path": "algo/src/main/java/com/idiot/rudra/std/StdIn.java", "license": "apache-2.0", "size": 21681 }
[ "java.util.ArrayList", "java.util.InputMismatchException" ]
import java.util.ArrayList; import java.util.InputMismatchException;
import java.util.*;
[ "java.util" ]
java.util;
1,295,632
static boolean isValidPropertyName(FeatureSet mode, String name) { if (isValidSimpleName(name)) { return true; } else { return mode.has(Feature.KEYWORDS_AS_PROPERTIES) && TokenStream.isKeyword(name); } } private static class VarCollector implements Visitor { final Map<String, Node> va...
static boolean isValidPropertyName(FeatureSet mode, String name) { if (isValidSimpleName(name)) { return true; } else { return mode.has(Feature.KEYWORDS_AS_PROPERTIES) && TokenStream.isKeyword(name); } } private static class VarCollector implements Visitor { final Map<String, Node> vars = new LinkedHashMap<>();
/** * Determines whether the given name can appear on the right side of the dot operator. Many * properties (like reserved words) cannot, in ES3. */
Determines whether the given name can appear on the right side of the dot operator. Many properties (like reserved words) cannot, in ES3
isValidPropertyName
{ "repo_name": "Yannic/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeUtil.java", "license": "apache-2.0", "size": 170457 }
[ "com.google.javascript.jscomp.parsing.parser.FeatureSet", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.TokenStream", "java.util.LinkedHashMap", "java.util.Map" ]
import com.google.javascript.jscomp.parsing.parser.FeatureSet; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.TokenStream; import java.util.LinkedHashMap; import java.util.Map;
import com.google.javascript.jscomp.parsing.parser.*; import com.google.javascript.rhino.*; import java.util.*;
[ "com.google.javascript", "java.util" ]
com.google.javascript; java.util;
2,364,100
public Map<String, String> getRates() { return rates; }
Map<String, String> function() { return rates; }
/** * Returns the map of rates consisting of name of the another currency to amount. * * @return exchange rates. */
Returns the map of rates consisting of name of the another currency to amount
getRates
{ "repo_name": "coinbase/coinbase-java", "path": "coinbase-java/src/main/java/com/coinbase/resources/rates/ExchangeRates.java", "license": "apache-2.0", "size": 1174 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,106,341
private String readQName() throws IOException { if (version >= VERSION_3) { return readName(); } String uri = "#" + in.readInt(); String local = in.readUTF(); return uri + ":" + local; }
String function() throws IOException { if (version >= VERSION_3) { return readName(); } String uri = "#" + in.readInt(); String local = in.readUTF(); return uri + ":" + local; }
/** * Deserializes a Name * * @return the qname * @throws IOException in an I/O error occurs. */
Deserializes a Name
readQName
{ "repo_name": "apache/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/BundleDumper.java", "license": "apache-2.0", "size": 21819 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
597,702
public static void registerOperation(OpGeneric op, Multimap<String, OpGeneric> opmap) { opmap.put(op.name(), op); }
static void function(OpGeneric op, Multimap<String, OpGeneric> opmap) { opmap.put(op.name(), op); }
/** * Puts an operation into the given MultiMap * @param op The operation to register * @param opmap The multi map holding the operations */
Puts an operation into the given MultiMap
registerOperation
{ "repo_name": "anonymous100001/maxuse", "path": "src/main/org/tzi/use/uml/ocl/expr/operations/OpGeneric.java", "license": "gpl-2.0", "size": 4260 }
[ "com.google.common.collect.Multimap" ]
import com.google.common.collect.Multimap;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,509,043
Matrix rot = new Matrix(3, 3); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { rot.set(j, i, transform.getElement(i, j)); // transposed } } return rot; }
Matrix rot = new Matrix(3, 3); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { rot.set(j, i, transform.getElement(i, j)); } } return rot; }
/** * Convert a transformation matrix into a JAMA rotation matrix. Because the * JAMA matrix is a pre-multiplication matrix and the Vecmath matrix is a * post-multiplication one, the rotation matrix is transposed to ensure that * the transformation they produce is the same. * * @param transform * ...
Convert a transformation matrix into a JAMA rotation matrix. Because the JAMA matrix is a pre-multiplication matrix and the Vecmath matrix is a post-multiplication one, the rotation matrix is transposed to ensure that the transformation they produce is the same
getRotationJAMA
{ "repo_name": "emckee2006/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/Matrices.java", "license": "lgpl-2.1", "size": 3058 }
[ "org.biojava.nbio.structure.jama.Matrix" ]
import org.biojava.nbio.structure.jama.Matrix;
import org.biojava.nbio.structure.jama.*;
[ "org.biojava.nbio" ]
org.biojava.nbio;
618,904
private Collection<Artifact> getAutoFdoImports(RuleContext ruleContext, PathFragment sourceExecPath, LipoContextProvider lipoContextProvider) { Preconditions.checkState(lipoMode != LipoMode.OFF); ImmutableCollection<PathFragment> afdoImports = imports.get(sourceExecPath); Preconditions.checkState(af...
Collection<Artifact> function(RuleContext ruleContext, PathFragment sourceExecPath, LipoContextProvider lipoContextProvider) { Preconditions.checkState(lipoMode != LipoMode.OFF); ImmutableCollection<PathFragment> afdoImports = imports.get(sourceExecPath); Preconditions.checkState(afdoImports != null, STR, sourceExecPat...
/** * Returns the imports from the .afdo.imports file of a source file. * * @param sourceExecPath the source file */
Returns the imports from the .afdo.imports file of a source file
getAutoFdoImports
{ "repo_name": "anupcshan/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java", "license": "apache-2.0", "size": 30098 }
[ "com.google.common.collect.ImmutableCollection", "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.RuleContext", "com.google.devtools.build.lib.util.Preconditions", "com.google.devtools.build.lib.vfs.PathFragment", "com.g...
import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.util.Preconditions; import com.google.devtools.build.lib.vfs.PathFr...
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.vfs.*; import com.google.devtools.build.lib.view.config.crosstool.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,550,724
private void exportProperty(Map properties, String name) throws RepositoryException, SAXException { Property property = (Property) properties.remove(name); if (property != null) { exportProperty(name, property); } } /** * Utility method for processing th...
void function(Map properties, String name) throws RepositoryException, SAXException { Property property = (Property) properties.remove(name); if (property != null) { exportProperty(name, property); } } /** * Utility method for processing the given property. Calls either * {@link #exportProperty(Value)} or {@link #expor...
/** * Utility method for processing the named property from the given * map of properties. If the property exists, it is removed from the * given map and passed to {@link #exportProperty(Property)}. * The property is ignored if it does not exist. * * @param properties map of properties ...
Utility method for processing the named property from the given map of properties. If the property exists, it is removed from the given map and passed to <code>#exportProperty(Property)</code>. The property is ignored if it does not exist
exportProperty
{ "repo_name": "apache/jackrabbit", "path": "jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/xml/Exporter.java", "license": "apache-2.0", "size": 20600 }
[ "java.util.Map", "javax.jcr.Property", "javax.jcr.RepositoryException", "javax.jcr.Value", "org.xml.sax.SAXException" ]
import java.util.Map; import javax.jcr.Property; import javax.jcr.RepositoryException; import javax.jcr.Value; import org.xml.sax.SAXException;
import java.util.*; import javax.jcr.*; import org.xml.sax.*;
[ "java.util", "javax.jcr", "org.xml.sax" ]
java.util; javax.jcr; org.xml.sax;
1,753,728
public MultiOutput<InputT, OutputT> withOutputTags( TupleTag<OutputT> mainOutputTag, TupleTagList additionalOutputTags) { return new MultiOutput<>(fn, sideInputs, mainOutputTag, additionalOutputTags, fnDisplayData); }
MultiOutput<InputT, OutputT> function( TupleTag<OutputT> mainOutputTag, TupleTagList additionalOutputTags) { return new MultiOutput<>(fn, sideInputs, mainOutputTag, additionalOutputTags, fnDisplayData); }
/** * Returns a new multi-output {@link ParDo} {@link PTransform} that's like this {@link * PTransform} but with the specified output tags. Does not modify this {@link PTransform}. * * <p>See the discussion of Additional Outputs above for more explanation. */
Returns a new multi-output <code>ParDo</code> <code>PTransform</code> that's like this <code>PTransform</code> but with the specified output tags. Does not modify this <code>PTransform</code>. See the discussion of Additional Outputs above for more explanation
withOutputTags
{ "repo_name": "mxm/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java", "license": "apache-2.0", "size": 40923 }
[ "org.apache.beam.sdk.values.TupleTag", "org.apache.beam.sdk.values.TupleTagList" ]
import org.apache.beam.sdk.values.TupleTag; import org.apache.beam.sdk.values.TupleTagList;
import org.apache.beam.sdk.values.*;
[ "org.apache.beam" ]
org.apache.beam;
834,798
static Path getCompletedRecoveredEditsFilePath(Path srcPath, Long maximumEditLogSeqNum) { String fileName = formatRecoveredEditsFileName(maximumEditLogSeqNum); return new Path(srcPath.getParent(), fileName); }
static Path getCompletedRecoveredEditsFilePath(Path srcPath, Long maximumEditLogSeqNum) { String fileName = formatRecoveredEditsFileName(maximumEditLogSeqNum); return new Path(srcPath.getParent(), fileName); }
/** * Get the completed recovered edits file path, renaming it to be by last edit * in the file from its first edit. Then we could use the name to skip * recovered edits when doing {@link HRegion#replayRecoveredEditsIfAny}. * @param srcPath * @param maximumEditLogSeqNum * @return dstPath take file's l...
Get the completed recovered edits file path, renaming it to be by last edit in the file from its first edit. Then we could use the name to skip recovered edits when doing <code>HRegion#replayRecoveredEditsIfAny</code>
getCompletedRecoveredEditsFilePath
{ "repo_name": "Guavus/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java", "license": "apache-2.0", "size": 84996 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,114,359
public void testNodesFDAfterMasterReelection() throws Exception { startCluster(4); logger.info("--> stopping current master"); internalCluster().stopCurrentMasterNode(); ensureStableCluster(3); logger.info("--> reducing min master nodes to 2"); assertAcked(client()...
void function() throws Exception { startCluster(4); logger.info(STR); internalCluster().stopCurrentMasterNode(); ensureStableCluster(3); logger.info(STR); assertAcked(client().admin().cluster().prepareUpdateSettings() .setTransientSettings(Settings.builder().put(ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SET...
/** * Verify that nodes fault detection works after master (re) election */
Verify that nodes fault detection works after master (re) election
testNodesFDAfterMasterReelection
{ "repo_name": "scottsom/elasticsearch", "path": "server/src/test/java/org/elasticsearch/discovery/MasterDisruptionIT.java", "license": "apache-2.0", "size": 22586 }
[ "org.elasticsearch.common.settings.Settings", "org.elasticsearch.discovery.zen.ElectMasterService", "org.elasticsearch.test.disruption.NetworkDisruption", "org.elasticsearch.test.hamcrest.ElasticsearchAssertions" ]
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.discovery.zen.ElectMasterService; import org.elasticsearch.test.disruption.NetworkDisruption; import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.elasticsearch.common.settings.*; import org.elasticsearch.discovery.zen.*; import org.elasticsearch.test.disruption.*; import org.elasticsearch.test.hamcrest.*;
[ "org.elasticsearch.common", "org.elasticsearch.discovery", "org.elasticsearch.test" ]
org.elasticsearch.common; org.elasticsearch.discovery; org.elasticsearch.test;
2,628,635
public Owner getOwner() { return this.owner; }
Owner function() { return this.owner; }
/** * The Address owner. * * @return the Owner. */
The Address owner
getOwner
{ "repo_name": "NABUCCO/org.nabucco.framework.base", "path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/business/address/Address.java", "license": "epl-1.0", "size": 15782 }
[ "org.nabucco.framework.base.facade.datatype.Owner" ]
import org.nabucco.framework.base.facade.datatype.Owner;
import org.nabucco.framework.base.facade.datatype.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,048,316
public static ConjunctFuture<Void> waitForAll(Collection<? extends Future<?>> futures) { checkNotNull(futures, "futures"); return new WaitingConjunctFuture(futures); } public interface ConjunctFuture<T> extends CompletableFuture<T> {
static ConjunctFuture<Void> function(Collection<? extends Future<?>> futures) { checkNotNull(futures, STR); return new WaitingConjunctFuture(futures); } public interface ConjunctFuture<T> extends CompletableFuture<T> {
/** * Creates a future that is complete once all of the given futures have completed. * The future fails (completes exceptionally) once one of the given futures * fails. * * <p>The ConjunctFuture gives access to how many Futures have already * completed successfully, via {@link ConjunctFuture#getNumFuturesC...
Creates a future that is complete once all of the given futures have completed. The future fails (completes exceptionally) once one of the given futures fails. The ConjunctFuture gives access to how many Futures have already completed successfully, via <code>ConjunctFuture#getNumFuturesCompleted()</code>
waitForAll
{ "repo_name": "WangTaoTheTonic/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java", "license": "apache-2.0", "size": 9270 }
[ "java.util.Collection", "org.apache.flink.util.Preconditions" ]
import java.util.Collection; import org.apache.flink.util.Preconditions;
import java.util.*; import org.apache.flink.util.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
925,077
void printWarning(SourcePosition pos, String msg);
void printWarning(SourcePosition pos, String msg);
/** * Prints a warning message. * @param pos the position where the warning occured, or null if it is * unknown or not applicable * @param msg the message, or an empty string if none */
Prints a warning message
printWarning
{ "repo_name": "unktomi/form-follows-function", "path": "mjavac/langtools/src/share/classes/com/sun/mirror/apt/Messager.java", "license": "gpl-2.0", "size": 2951 }
[ "com.sun.mirror.util.SourcePosition" ]
import com.sun.mirror.util.SourcePosition;
import com.sun.mirror.util.*;
[ "com.sun.mirror" ]
com.sun.mirror;
1,206,558
private CMLMetadataList getMetadataList() { CMLMetadataList cmlMetadataList = new CMLMetadataList(); cmlMetadataList.addMetadata(getCMLMetaData(FILENAME, spectrumContainer.getId())); cmlMetadataList.addMetadata(getCMLMetaData(FILEDATA, spectrumContainer.getDataFile().getName())); c...
CMLMetadataList function() { CMLMetadataList cmlMetadataList = new CMLMetadataList(); cmlMetadataList.addMetadata(getCMLMetaData(FILENAME, spectrumContainer.getId())); cmlMetadataList.addMetadata(getCMLMetaData(FILEDATA, spectrumContainer.getDataFile().getName())); cmlMetadataList.addMetadata(getCMLMetaData(IONMODE, sp...
/** * Gets the meta data list. * * @return the meta data list */
Gets the meta data list
getMetadataList
{ "repo_name": "tomas-pluskal/masscascade", "path": "MassCascadeCore/src/main/java/uk/ac/ebi/masscascade/io/cml/FeatureSetSerializer.java", "license": "gpl-3.0", "size": 3544 }
[ "org.xmlcml.cml.element.CMLMetadataList" ]
import org.xmlcml.cml.element.CMLMetadataList;
import org.xmlcml.cml.element.*;
[ "org.xmlcml.cml" ]
org.xmlcml.cml;
2,071,371
return DefaultInputEvent.builder(); }
return DefaultInputEvent.builder(); }
/** * Create a builder for the {@code InputEvent} event type for this stream. */
Create a builder for the InputEvent event type for this stream
inputEventBuilder
{ "repo_name": "aws/aws-sdk-java-v2", "path": "codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/inputeventstream.java", "license": "apache-2.0", "size": 2551 }
[ "software.amazon.awssdk.services.jsonprotocoltests.model.inputeventstream.DefaultInputEvent" ]
import software.amazon.awssdk.services.jsonprotocoltests.model.inputeventstream.DefaultInputEvent;
import software.amazon.awssdk.services.jsonprotocoltests.model.inputeventstream.*;
[ "software.amazon.awssdk" ]
software.amazon.awssdk;
1,330,699
String copyStatusString = request.getHeaderField(Constants.HeaderConstants.COPY_STATUS); if (!Utility.isNullOrEmpty(copyStatusString)) { final CopyState copyState = new CopyState(); copyState.setStatus(CopyStatus.parse(copyStatusString)); copyState.setCopyId(request.getHeade...
String copyStatusString = request.getHeaderField(Constants.HeaderConstants.COPY_STATUS); if (!Utility.isNullOrEmpty(copyStatusString)) { final CopyState copyState = new CopyState(); copyState.setStatus(CopyStatus.parse(copyStatusString)); copyState.setCopyId(request.getHeaderField(Constants.HeaderConstants.COPY_ID)); c...
/** * Gets the copyState * * @param request * The response from server. * @return The CopyState. * @throws URISyntaxException * @throws ParseException */
Gets the copyState
getCopyState
{ "repo_name": "hnn-project/azure-content", "path": "demo/storage-demo/storage-demo-java/src/main/java/com/microsoft/azure/storage/file/FileResponse.java", "license": "mit", "size": 9298 }
[ "com.microsoft.azure.storage.Constants", "com.microsoft.azure.storage.core.Utility" ]
import com.microsoft.azure.storage.Constants; import com.microsoft.azure.storage.core.Utility;
import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,147,628
@Test public void createWithMissingParentScript() { // Create transform request TransformRequest request = new TransformRequest(); request.setScript("parent"); request.setParent(new TransformRequest.Parent()); // Test missing parent script SparkShellTransformCont...
void function() { TransformRequest request = new TransformRequest(); request.setScript(STR); request.setParent(new TransformRequest.Parent()); SparkShellTransformController controller = new SparkShellTransformController(); Response response = controller.create(request); Assert.assertEquals(Response.Status.BAD_REQUEST, ...
/** * Verify response if missing parent script. */
Verify response if missing parent script
createWithMissingParentScript
{ "repo_name": "rashidaligee/kylo", "path": "integrations/spark/spark-shell-client/spark-shell-client-app/src/test/java/com/thinkbiganalytics/spark/rest/SparkShellTransformControllerTest.java", "license": "apache-2.0", "size": 7579 }
[ "com.thinkbiganalytics.spark.rest.model.TransformRequest", "com.thinkbiganalytics.spark.rest.model.TransformResponse", "javax.ws.rs.core.Response", "org.junit.Assert" ]
import com.thinkbiganalytics.spark.rest.model.TransformRequest; import com.thinkbiganalytics.spark.rest.model.TransformResponse; import javax.ws.rs.core.Response; import org.junit.Assert;
import com.thinkbiganalytics.spark.rest.model.*; import javax.ws.rs.core.*; import org.junit.*;
[ "com.thinkbiganalytics.spark", "javax.ws", "org.junit" ]
com.thinkbiganalytics.spark; javax.ws; org.junit;
1,135,366
@SuppressWarnings("unchecked") public Type to(ExchangePattern pattern, String uri) { addOutput(new ToDefinition(uri, pattern)); return (Type) this; }
@SuppressWarnings(STR) Type function(ExchangePattern pattern, String uri) { addOutput(new ToDefinition(uri, pattern)); return (Type) this; }
/** * Sends the exchange with certain exchange pattern to the given endpoint * * @param pattern the pattern to use for the message exchange * @param uri the endpoint to send to * @return the builder */
Sends the exchange with certain exchange pattern to the given endpoint
to
{ "repo_name": "kingargyle/turmeric-bot", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 115380 }
[ "org.apache.camel.ExchangePattern" ]
import org.apache.camel.ExchangePattern;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,811,484
@Override public DataRecord getRecord(String objectId) throws FormException { return getGenericRecordSetManager().getRecord(recordTemplate, objectId); }
DataRecord function(String objectId) throws FormException { return getGenericRecordSetManager().getRecord(recordTemplate, objectId); }
/** * Returns the DataRecord with the given id. * @return the DataRecord with the given id. * @throws FormException when the id is unknown. */
Returns the DataRecord with the given id
getRecord
{ "repo_name": "ebonnet/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/contribution/content/form/record/GenericRecordSet.java", "license": "agpl-3.0", "size": 16487 }
[ "org.silverpeas.core.contribution.content.form.DataRecord", "org.silverpeas.core.contribution.content.form.FormException" ]
import org.silverpeas.core.contribution.content.form.DataRecord; import org.silverpeas.core.contribution.content.form.FormException;
import org.silverpeas.core.contribution.content.form.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
2,813,548
protected boolean skipFrame() throws JavaLayerException { Header h = readFrame(); if (h == null) { return false; } frameNumber++; bitstream.closeFrame(); return true; }
boolean function() throws JavaLayerException { Header h = readFrame(); if (h == null) { return false; } frameNumber++; bitstream.closeFrame(); return true; }
/** * skips over a single frame * @return false if there are no more frames to decode, true otherwise. */
skips over a single frame
skipFrame
{ "repo_name": "peterhuerlimann/bluej-java-learning", "path": "Kapitel11/Musikplayer/MusicFilePlayer.java", "license": "gpl-3.0", "size": 11325 }
[ "javazoom.jl.decoder.Header", "javazoom.jl.decoder.JavaLayerException" ]
import javazoom.jl.decoder.Header; import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.decoder.*;
[ "javazoom.jl.decoder" ]
javazoom.jl.decoder;
1,846,893