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
CompletionStage<Optional<Order>> getOrderByPaymentId(String paymentId);
CompletionStage<Optional<Order>> getOrderByPaymentId(String paymentId);
/** * Get an order which has one of {@code paymentInfo.payments.id = paymentId}. * <p> * This service does not expect we could have multiply orders for one payment * * @param paymentId CTP payment uuid * @return {@link Optional} {@link Order} if exists, empty {@link Optional} if not found....
Get an order which has one of paymentInfo.payments.id = paymentId. This service does not expect we could have multiply orders for one payment
getOrderByPaymentId
{ "repo_name": "commercetools/commercetools-payone-integration", "path": "service/src/main/java/com/commercetools/service/OrderService.java", "license": "mit", "size": 1317 }
[ "io.sphere.sdk.orders.Order", "java.util.Optional", "java.util.concurrent.CompletionStage" ]
import io.sphere.sdk.orders.Order; import java.util.Optional; import java.util.concurrent.CompletionStage;
import io.sphere.sdk.orders.*; import java.util.*; import java.util.concurrent.*;
[ "io.sphere.sdk", "java.util" ]
io.sphere.sdk; java.util;
755,076
@Test public void testKerberosEncryption() throws Exception { if (!runTests) { System.out.println("Skipping test because kerberos server could not be started"); return; } Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG); WSSecHeader s...
void function() throws Exception { if (!runTests) { System.out.println(STR); return; } Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG); WSSecHeader secHeader = new WSSecHeader(doc); secHeader.insertSecurityHeader();
/** * Test using the KerberosSecurity class to retrieve a service ticket from a KDC, wrap it * in a BinarySecurityToken, and use the session key to encrypt the SOAP Body. */
Test using the KerberosSecurity class to retrieve a service ticket from a KDC, wrap it in a BinarySecurityToken, and use the session key to encrypt the SOAP Body
testKerberosEncryption
{ "repo_name": "asoldano/wss4j", "path": "integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java", "license": "apache-2.0", "size": 60162 }
[ "org.apache.wss4j.dom.message.WSSecHeader", "org.apache.wss4j.stax.test.utils.SOAPUtil", "org.w3c.dom.Document" ]
import org.apache.wss4j.dom.message.WSSecHeader; import org.apache.wss4j.stax.test.utils.SOAPUtil; import org.w3c.dom.Document;
import org.apache.wss4j.dom.message.*; import org.apache.wss4j.stax.test.utils.*; import org.w3c.dom.*;
[ "org.apache.wss4j", "org.w3c.dom" ]
org.apache.wss4j; org.w3c.dom;
2,286,133
public static boolean isPm(final Date date) { return !isAm(date); }
static boolean function(final Date date) { return !isAm(date); }
/** * Return whether it is am. * * @param date The date. * @return {@code true}: yes<br>{@code false}: no */
Return whether it is am
isPm
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/TimeUtils.java", "license": "apache-2.0", "size": 58527 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
362,421
public void frame1() { //synchronized(c) { for(int i = 0; i < Settings.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { Client person = (Client)PlayerHandler.players[i]; if(person != null) { if(person.getOutStream() != null && !person.disconnected) { if(c.distanceToPoint(per...
void function() { for(int i = 0; i < Settings.MAX_PLAYERS; i++) { if(PlayerHandler.players[i] != null) { Client person = (Client)PlayerHandler.players[i]; if(person != null) { if(person.getOutStream() != null && !person.disconnected) { if(c.distanceToPoint(person.getX(), person.getY()) <= 25){ person.getOutStream().cre...
/** * Reseting animations for everyone **/
Reseting animations for everyone
frame1
{ "repo_name": "Jarinus/osrs-private-server", "path": "source/server/src/nl/osrs/model/player/PlayerAssistant.java", "license": "mit", "size": 64481 }
[ "nl.osrs.Settings" ]
import nl.osrs.Settings;
import nl.osrs.*;
[ "nl.osrs" ]
nl.osrs;
2,533,441
private void postorderRemove(String directory) { try { // gets the listing of directories in this node List<String> dirs = backend.getChildrenNodes(directory); if (dirs.size() != 0) { for (String currentDir : dirs) { // recursive...
void function(String directory) { try { List<String> dirs = backend.getChildrenNodes(directory); if (dirs.size() != 0) { for (String currentDir : dirs) { postorderRemove(currentDir); } } List<String> entries = backend.getKeys(directory); if (entries.size() != 0) { for (String key : entries) { this.removeSpi(key); } } }...
/** * Does a recursive postorder traversal of the preference tree, starting from * the given directory invalidating every preference found in the node. * * @param directory The name of the starting directory (node) */
Does a recursive postorder traversal of the preference tree, starting from the given directory invalidating every preference found in the node
postorderRemove
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/gnu/java/util/prefs/GConfBasedPreferences.java", "license": "gpl-2.0", "size": 12396 }
[ "java.util.List", "java.util.prefs.BackingStoreException" ]
import java.util.List; import java.util.prefs.BackingStoreException;
import java.util.*; import java.util.prefs.*;
[ "java.util" ]
java.util;
303,441
void setAttenuation(float constant, float linear, float quadratic) { setAttenuation(new Point3f(constant, linear, quadratic)); }
void setAttenuation(float constant, float linear, float quadratic) { setAttenuation(new Point3f(constant, linear, quadratic)); }
/** * Sets the point light's attenuation. * @param constant the point light's constant attenuation * @param linear the linear attenuation of the light * @param quadratic the quadratic attenuation of the light */
Sets the point light's attenuation
setAttenuation
{ "repo_name": "kephale/java3d-core", "path": "src/classes/share/javax/media/j3d/PointLightRetained.java", "license": "gpl-2.0", "size": 10652 }
[ "javax.vecmath.Point3f" ]
import javax.vecmath.Point3f;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
1,501,185
ServiceResponse<DMNResult> evaluateDecisionById(String containerId, String namespace, String modelName, String decisionId, DMNContext dmnContext);
ServiceResponse<DMNResult> evaluateDecisionById(String containerId, String namespace, String modelName, String decisionId, DMNContext dmnContext);
/** * Evaluate the decision identified by the given ID and all dependent decisions for the model identified by namespace and modelName, given the context dmnContext * * @param containerId the container id deploying the DMN model * @param namespace namespace to identify the model to evaluate * @...
Evaluate the decision identified by the given ID and all dependent decisions for the model identified by namespace and modelName, given the context dmnContext
evaluateDecisionById
{ "repo_name": "markcoble/droolsjbpm-integration", "path": "kie-server-parent/kie-server-remote/kie-server-client/src/main/java/org/kie/server/client/DMNServicesClient.java", "license": "apache-2.0", "size": 4087 }
[ "org.kie.dmn.api.core.DMNContext", "org.kie.dmn.api.core.DMNResult", "org.kie.server.api.model.ServiceResponse" ]
import org.kie.dmn.api.core.DMNContext; import org.kie.dmn.api.core.DMNResult; import org.kie.server.api.model.ServiceResponse;
import org.kie.dmn.api.core.*; import org.kie.server.api.model.*;
[ "org.kie.dmn", "org.kie.server" ]
org.kie.dmn; org.kie.server;
842,252
@VisibleForTesting static String getTopLevel(String importString) { Matcher m = TOPLEVEL_PATTERN.matcher(importString); if (m.find()) { return m.group(2); } else { throw new IllegalArgumentException(importString + " is not a valid import statement"); } } private enum Kind { S...
static String getTopLevel(String importString) { Matcher m = TOPLEVEL_PATTERN.matcher(importString); if (m.find()) { return m.group(2); } else { throw new IllegalArgumentException(importString + STR); } } private enum Kind { STATIC, GOOGLE, THIRD_PARTY, JAVA, JAVAX;
/** * Given an import string, returns the top-level package for that * import. */
Given an import string, returns the top-level package for that import
getTopLevel
{ "repo_name": "google/Refaster", "path": "src/main/com/google/errorprone/apply/ImportStatements.java", "license": "apache-2.0", "size": 8601 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
467,759
public void closeConnection(long timeout) throws AMQException { ConnectionCloseBody body = _protocolSession.getMethodRegistry().createConnectionCloseBody(AMQConstant.REPLY_SUCCESS.getCode(), // replyCode ne...
void function(long timeout) throws AMQException { ConnectionCloseBody body = _protocolSession.getMethodRegistry().createConnectionCloseBody(AMQConstant.REPLY_SUCCESS.getCode(), new AMQShortString(STR), 0, 0); final AMQFrame frame = body.generateFrame(0); if (!getStateManager().getCurrentState().equals(AMQState.CONNECTI...
/** * Closes the connection. * * <p/>If a failover exception occurs whilst closing the connection it is ignored, as the connection is closed * anyway. * * @param timeout The timeout to wait for an acknowledgement to the close request. * * @throws AMQException If the close fails f...
Closes the connection. If a failover exception occurs whilst closing the connection it is ignored, as the connection is closed anyway
closeConnection
{ "repo_name": "hastef88/andes", "path": "modules/andes-core/client/src/main/java/org/wso2/andes/client/protocol/AMQProtocolHandler.java", "license": "apache-2.0", "size": 35362 }
[ "org.wso2.andes.AMQException", "org.wso2.andes.AMQTimeoutException", "org.wso2.andes.client.failover.FailoverException", "org.wso2.andes.client.state.AMQState", "org.wso2.andes.framing.AMQFrame", "org.wso2.andes.framing.AMQShortString", "org.wso2.andes.framing.ConnectionCloseBody", "org.wso2.andes.fra...
import org.wso2.andes.AMQException; import org.wso2.andes.AMQTimeoutException; import org.wso2.andes.client.failover.FailoverException; import org.wso2.andes.client.state.AMQState; import org.wso2.andes.framing.AMQFrame; import org.wso2.andes.framing.AMQShortString; import org.wso2.andes.framing.ConnectionCloseBody; im...
import org.wso2.andes.*; import org.wso2.andes.client.failover.*; import org.wso2.andes.client.state.*; import org.wso2.andes.framing.*; import org.wso2.andes.protocol.*;
[ "org.wso2.andes" ]
org.wso2.andes;
949,176
@Override public String toString() { return "(" + StringUtils.arrayAwareToString(this.f0) + "," + StringUtils.arrayAwareToString(this.f1) + "," + StringUtils.arrayAwareToString(this.f2) + "," + StringUtils.arrayAwareToString(this.f3) + ")"; }
String function() { return "(" + StringUtils.arrayAwareToString(this.f0) + "," + StringUtils.arrayAwareToString(this.f1) + "," + StringUtils.arrayAwareToString(this.f2) + "," + StringUtils.arrayAwareToString(this.f3) + ")"; }
/** * Creates a string representation of the tuple in the form * (f0, f1, f2, f3), * where the individual fields are the value returned by calling {@link Object#toString} on that field. * @return The string representation of the tuple. */
Creates a string representation of the tuple in the form (f0, f1, f2, f3), where the individual fields are the value returned by calling <code>Object#toString</code> on that field
toString
{ "repo_name": "WangTaoTheTonic/flink", "path": "flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple4.java", "license": "apache-2.0", "size": 6631 }
[ "org.apache.flink.util.StringUtils" ]
import org.apache.flink.util.StringUtils;
import org.apache.flink.util.*;
[ "org.apache.flink" ]
org.apache.flink;
1,829,008
@Override public ProductReader createReaderInstance() { return new SeadasProductReader(this); }
ProductReader function() { return new SeadasProductReader(this); }
/** * Creates an instance of the actual product reader class. This method should never return <code>null</code>. * * @return a new reader instance, never <code>null</code> */
Creates an instance of the actual product reader class. This method should never return <code>null</code>
createReaderInstance
{ "repo_name": "seadas/seadas", "path": "seadas-reader/src/main/java/gov/nasa/gsfc/seadas/dataio/L1ProductReaderPlugIn.java", "license": "gpl-3.0", "size": 8586 }
[ "org.esa.beam.framework.dataio.ProductReader" ]
import org.esa.beam.framework.dataio.ProductReader;
import org.esa.beam.framework.dataio.*;
[ "org.esa.beam" ]
org.esa.beam;
876,669
private void visitCall(FunctionInformation sideEffectInfo, Node node) { // Handle special cases (Math, RegExp) if (node.isCall() && !NodeUtil.functionCallHasSideEffects(node, compiler)) { return; } // Handle known cases now (Object, Date, RegExp, etc) if (node.isNew(...
void function(FunctionInformation sideEffectInfo, Node node) { if (node.isCall() && !NodeUtil.functionCallHasSideEffects(node, compiler)) { return; } if (node.isNew() && !NodeUtil.constructorCallHasSideEffects(node)) { return; } sideEffectInfo.appendCall(node); }
/** * Record information about a call site. */
Record information about a call site
visitCall
{ "repo_name": "selkhateeb/closure-compiler", "path": "src/com/google/javascript/jscomp/PureFunctionIdentifier.java", "license": "apache-2.0", "size": 40490 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
202,212
public void toTable (ArrayList<Cell> table) { table.add(cell); }
void function (ArrayList<Cell> table) { table.add(cell); }
/** * Build the table representing the histogram data adding this node's cell to it. */
Build the table representing the histogram data adding this node's cell to it
toTable
{ "repo_name": "markus1978/jstattrack", "path": "plugins/de.hub.jstattrack/src/com/flaptor/hist4j/HistogramDataNode.java", "license": "gpl-2.0", "size": 8777 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,688,109
@Override protected UUID initNodeUuid() { return UuidT5Generator.get(getNodeSemantic().getSemanticUuid(), Arrays.toString(this.propertyPattern) + this.propertyImplication.toString()); } //~--- get methods ---------------------------------------------------------
UUID function() { return UuidT5Generator.get(getNodeSemantic().getSemanticUuid(), Arrays.toString(this.propertyPattern) + this.propertyImplication.toString()); }
/** * Inits the node uuid. * * @return the uuid */
Inits the node uuid
initNodeUuid
{ "repo_name": "OSEHRA/ISAAC", "path": "core/model/src/main/java/sh/isaac/model/logic/node/external/PropertyPatternImplicationNodeWithUuids.java", "license": "apache-2.0", "size": 8072 }
[ "java.util.Arrays", "sh.isaac.api.util.UuidT5Generator" ]
import java.util.Arrays; import sh.isaac.api.util.UuidT5Generator;
import java.util.*; import sh.isaac.api.util.*;
[ "java.util", "sh.isaac.api" ]
java.util; sh.isaac.api;
1,470,444
@Override public BindingInformation supplyBindingInformation() { BindingInformation binding = new BindingInformation(); String connectString = buildConnectionString(); binding.ensembleProvider = new FixedEnsembleProvider(connectString); binding.description = "fixed ZK quorum \"" + connectStr...
BindingInformation function() { BindingInformation binding = new BindingInformation(); String connectString = buildConnectionString(); binding.ensembleProvider = new FixedEnsembleProvider(connectString); binding.description = STRSTR\""; return binding; }
/** * Supply the binding information. * This implementation returns a fixed ensemble bonded to * the quorum supplied by {@link #buildConnectionString()}. * * @return the binding information */
Supply the binding information. This implementation returns a fixed ensemble bonded to the quorum supplied by <code>#buildConnectionString()</code>
supplyBindingInformation
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-common-project/hadoop-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/CuratorService.java", "license": "apache-2.0", "size": 26909 }
[ "org.apache.curator.ensemble.fixed.FixedEnsembleProvider" ]
import org.apache.curator.ensemble.fixed.FixedEnsembleProvider;
import org.apache.curator.ensemble.fixed.*;
[ "org.apache.curator" ]
org.apache.curator;
1,865,780
public void setIncludedFractionIDsVector(Vector<String> includedFractionIDsVector) { // remove from activefractionIDs any fraction with 0 date Vector<String> zeroFractionDates = new Vector<String>(); for (int i = 0; i < includedFractionIDsVector.size(); i++) { try { ...
void function(Vector<String> includedFractionIDsVector) { Vector<String> zeroFractionDates = new Vector<String>(); for (int i = 0; i < includedFractionIDsVector.size(); i++) { try { if (!fractionDateIsPositive(sample.getSampleFractionByName(includedFractionIDsVector.get(i)))) { zeroFractionDates.add(includedFractionIDs...
/** * sets the <code>includedFractionIDsVector</code> of this * <code>SampleDateModel</code> to argument * <code>includedFractionIDsVector</code>. * * @pre argument <code>includedFractionIDsVector</code> is a valid * <code>Vector</code> of <code>String</code> * @post <code>includedFra...
sets the <code>includedFractionIDsVector</code> of this <code>SampleDateModel</code> to argument <code>includedFractionIDsVector</code>
setIncludedFractionIDsVector
{ "repo_name": "johnzeringue/ET_Redux", "path": "src/main/java/org/earthtime/UPb_Redux/valueModels/SampleDateModel.java", "license": "apache-2.0", "size": 130389 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,773,933
private ServiceAssociationLinkPropertiesFormat innerProperties() { return this.innerProperties; }
ServiceAssociationLinkPropertiesFormat function() { return this.innerProperties; }
/** * Get the innerProperties property: Resource navigation link properties format. * * @return the innerProperties value. */
Get the innerProperties property: Resource navigation link properties format
innerProperties
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ServiceAssociationLink.java", "license": "mit", "size": 6564 }
[ "com.azure.resourcemanager.network.fluent.models.ServiceAssociationLinkPropertiesFormat" ]
import com.azure.resourcemanager.network.fluent.models.ServiceAssociationLinkPropertiesFormat;
import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
902,790
String getDescription(Messages messages);
String getDescription(Messages messages);
/** * Get a human-readable description of this cost. * * <p>For XP, display text will be determined by the * CostReducer if it uses Mana. * * <p>This does not include the amount, and only the label - e.g. "Bread" or "Mana" or "XP". * * @param messages The Messages class for looki...
Get a human-readable description of this cost. For XP, display text will be determined by the CostReducer if it uses Mana. This does not include the amount, and only the label - e.g. "Bread" or "Mana" or "XP"
getDescription
{ "repo_name": "elBukkit/MagicPlugin", "path": "MagicAPI/src/main/java/com/elmakers/mine/bukkit/api/item/Cost.java", "license": "mit", "size": 7300 }
[ "com.elmakers.mine.bukkit.api.magic.Messages" ]
import com.elmakers.mine.bukkit.api.magic.Messages;
import com.elmakers.mine.bukkit.api.magic.*;
[ "com.elmakers.mine" ]
com.elmakers.mine;
261,392
private PropertyDescriptorCacheEntry getPropertyDescriptorCacheEntry(Class c) { PropertyDescriptorCacheEntry pce; if (getIncludeReadOnly()) { synchronized (roPropertyDescriptorCache) { pce = roPropertyDescriptorCache.get(c); } }...
PropertyDescriptorCacheEntry function(Class c) { PropertyDescriptorCacheEntry pce; if (getIncludeReadOnly()) { synchronized (roPropertyDescriptorCache) { pce = roPropertyDescriptorCache.get(c); } } else { synchronized (rwPropertyDescriptorCache) { pce = rwPropertyDescriptorCache.get(c); } } try { if (pce == null) { Bea...
/** * Return an entry from the property descriptor cache for a class. * @param c the class * @return a descriptor cache entry or null */
Return an entry from the property descriptor cache for a class
getPropertyDescriptorCacheEntry
{ "repo_name": "apache/flex-blazeds", "path": "core/src/main/java/flex/messaging/io/BeanProxy.java", "license": "apache-2.0", "size": 32517 }
[ "java.beans.BeanInfo", "java.beans.IntrospectionException", "java.beans.Introspector", "java.beans.PropertyDescriptor", "java.util.TreeMap" ]
import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.util.TreeMap;
import java.beans.*; import java.util.*;
[ "java.beans", "java.util" ]
java.beans; java.util;
2,618,468
private boolean onQuit() { if (isConnected()) { onCancel(new Event(P2P.CANCEL, this, P2P.ALL)); mBus.unregisterAboutListener(this); if(!mNetworkEndpointMap.isEmpty()) { mAboutObj.unannounce(); } mBusEndpoint.onUnRe...
boolean function() { if (isConnected()) { onCancel(new Event(P2P.CANCEL, this, P2P.ALL)); mBus.unregisterAboutListener(this); if(!mNetworkEndpointMap.isEmpty()) { mAboutObj.unannounce(); } mBusEndpoint.onUnRegister(); for(P2PNetworkEndpointImpl it : mNetworkEndpointMap.values()) { it.onLeave(); } mBus.disconnect(); mBu...
/** * Handle quit on background thread. * @return boolean */
Handle quit on background thread
onQuit
{ "repo_name": "DISCOOS/discoos-p2p", "path": "p2p/src/main/java/org/discoos/p2p/internal/P2PHandler.java", "license": "bsd-2-clause", "size": 24172 }
[ "org.discoos.signal.Event" ]
import org.discoos.signal.Event;
import org.discoos.signal.*;
[ "org.discoos.signal" ]
org.discoos.signal;
1,248,366
@Override public GenerationResult updateSource(final String source, final Path path, final DataObject dataObject) { GenerationResult result = new GenerationResult(); KieModule module; try { m...
GenerationResult function(final String source, final Path path, final DataObject dataObject) { GenerationResult result = new GenerationResult(); KieModule module; try { module = moduleService.resolveModule(path); if (module == null) { logger.warn(STR + path.toURI() + STR); result.setSource(source); return result; } Cla...
/** * Updates Java code provided in the source parameter with the data object values provided in the dataObject * parameter. This method does not write any changes in the file system. * @param source Java code to be updated. * @param path Path to the java file. (used for error messages adf and proje...
Updates Java code provided in the source parameter with the data object values provided in the dataObject parameter. This method does not write any changes in the file system
updateSource
{ "repo_name": "etirelli/kie-wb-common", "path": "kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-backend/src/main/java/org/kie/workbench/common/screens/datamodeller/backend/server/DataModelerServiceImpl.java", "license": "apache-2.0", "size": 65467 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "org.kie.workbench.common.screens.datamodeller.model.DataModelerError", "org.kie.workbench.common.screens.datamodeller.model.GenerationResult", "org.kie.workbench.common.screens.datamodeller.service.ServiceException", "org.kie.workbench.commo...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.kie.workbench.common.screens.datamodeller.model.DataModelerError; import org.kie.workbench.common.screens.datamodeller.model.GenerationResult; import org.kie.workbench.common.screens.datamodeller.service.ServiceException; import org...
import java.util.*; import org.kie.workbench.common.screens.datamodeller.model.*; import org.kie.workbench.common.screens.datamodeller.service.*; import org.kie.workbench.common.services.datamodeller.core.*; import org.kie.workbench.common.services.shared.project.*; import org.uberfire.backend.vfs.*; import org.uberfir...
[ "java.util", "org.kie.workbench", "org.uberfire.backend", "org.uberfire.commons" ]
java.util; org.kie.workbench; org.uberfire.backend; org.uberfire.commons;
503,823
SimpleResponse unrelate(Class<?> type, Object sourceId, Property<?> relationship);
SimpleResponse unrelate(Class<?> type, Object sourceId, Property<?> relationship);
/** * Breaks the relationship between source and all its target objects. * * @since 1.2 */
Breaks the relationship between source and all its target objects
unrelate
{ "repo_name": "AbleOne/link-rest", "path": "agrest/src/main/java/io/agrest/runtime/IAgService.java", "license": "apache-2.0", "size": 3547 }
[ "io.agrest.SimpleResponse", "org.apache.cayenne.exp.Property" ]
import io.agrest.SimpleResponse; import org.apache.cayenne.exp.Property;
import io.agrest.*; import org.apache.cayenne.exp.*;
[ "io.agrest", "org.apache.cayenne" ]
io.agrest; org.apache.cayenne;
2,335,402
public static void sendNoSpamClient(@Nonnull ITextComponent... lines) { sendNoSpamMessages(lines); }
static void function(@Nonnull ITextComponent... lines) { sendNoSpamMessages(lines); }
/** * Skips the packet sending, unsafe to call on servers. * * @see #sendNoSpam(EntityPlayerMP, ITextComponent...) */
Skips the packet sending, unsafe to call on servers
sendNoSpamClient
{ "repo_name": "SleepyTrousers/EnderCore", "path": "src/main/java/com/enderio/core/common/util/ChatUtil.java", "license": "cc0-1.0", "size": 7801 }
[ "javax.annotation.Nonnull", "net.minecraft.util.text.ITextComponent" ]
import javax.annotation.Nonnull; import net.minecraft.util.text.ITextComponent;
import javax.annotation.*; import net.minecraft.util.text.*;
[ "javax.annotation", "net.minecraft.util" ]
javax.annotation; net.minecraft.util;
2,303,647
private void loadData(Admin admin, BufferedMutator table, TableName tableName, int fileNum, int rowNumPerFile) throws IOException, InterruptedException { if (fileNum <= 0) { throw new IllegalArgumentException(); } for (int i = 0; i < fileNum * rowNumPerFile; i++) { for (byte k0 : KEYS) { ...
void function(Admin admin, BufferedMutator table, TableName tableName, int fileNum, int rowNumPerFile) throws IOException, InterruptedException { if (fileNum <= 0) { throw new IllegalArgumentException(); } for (int i = 0; i < fileNum * rowNumPerFile; i++) { for (byte k0 : KEYS) { byte[] k = new byte[] { k0 }; byte[] ke...
/** * loads some data to the table. */
loads some data to the table
loadData
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.java", "license": "apache-2.0", "size": 49830 }
[ "java.io.IOException", "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.client.Admin", "org.apache.hadoop.hbase.client.BufferedMutator", "org.apache.hadoop.hbase.client.Durability", "org.apache.hadoop.hbase.client.Put", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.BufferedMutator; import org.apache.hadoop.hbase.client.Durability; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
51,515
private String sendRESTCall(String url, String urlParameters, String formParameters, String httpMethod) { String line; StringBuilder responseString = new StringBuilder(); HttpURLConnection connection = null; try { URL tiqrEP = new URL(url + urlParameters); con...
String function(String url, String urlParameters, String formParameters, String httpMethod) { String line; StringBuilder responseString = new StringBuilder(); HttpURLConnection connection = null; try { URL tiqrEP = new URL(url + urlParameters); connection = (HttpURLConnection) tiqrEP.openConnection(); connection.setDoI...
/** * Send REST call */
Send REST call
sendRESTCall
{ "repo_name": "RKathees/is-connectors", "path": "tiqr/authentication-endpoint/org.wso2.carbon.identity.application.authentication.endpoint.tiqr/src/main/java/org.wso2.carbon.identity.application.authentication.endpoint.tiqr/QRCode.java", "license": "apache-2.0", "size": 12017 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.io.OutputStreamWriter", "java.lang.String", "java.net.HttpURLConnection", "java.net.MalformedURLException", "java.net.ProtocolException" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.lang.String; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.ProtocolException;
import java.io.*; import java.lang.*; import java.net.*;
[ "java.io", "java.lang", "java.net" ]
java.io; java.lang; java.net;
1,690,418
public Variable getParameter(Variable.Key key) { return key instanceof Variable.AttrKey ? getD().getParameter((Variable.AttrKey) key) : null; }
Variable function(Variable.Key key) { return key instanceof Variable.AttrKey ? getD().getParameter((Variable.AttrKey) key) : null; }
/** * Method to return the Variable on this Cell with the given key * that is a parameter. Returns null if not found. * @param key the key of the variable * @return the Variable with that key, that is parameter. Returns null if none found. */
Method to return the Variable on this Cell with the given key that is a parameter. Returns null if not found
getParameter
{ "repo_name": "imr/Electric8", "path": "com/sun/electric/database/hierarchy/Cell.java", "license": "gpl-3.0", "size": 185659 }
[ "com.sun.electric.database.variable.Variable" ]
import com.sun.electric.database.variable.Variable;
import com.sun.electric.database.variable.*;
[ "com.sun.electric" ]
com.sun.electric;
476,032
public static void assertGapIsZero(Client client, String indexName, String type) throws IOException { testGap(client, indexName, type, 0); assertHitCount(client.prepareSearch(indexName) .setQuery(new MatchPhraseQueryBuilder("string", "one two")).get(), 1); }
static void function(Client client, String indexName, String type) throws IOException { testGap(client, indexName, type, 0); assertHitCount(client.prepareSearch(indexName) .setQuery(new MatchPhraseQueryBuilder(STR, STR)).get(), 1); }
/** * Asserts that the pre-2.0 default has been applied or explicitly * configured. */
Asserts that the pre-2.0 default has been applied or explicitly configured
assertGapIsZero
{ "repo_name": "strahanjen/strahanjen.github.io", "path": "elasticsearch-master/core/src/test/java/org/elasticsearch/index/mapper/AllFieldMapperPositionIncrementGapTests.java", "license": "bsd-3-clause", "size": 4658 }
[ "java.io.IOException", "org.elasticsearch.client.Client", "org.elasticsearch.index.query.MatchPhraseQueryBuilder", "org.elasticsearch.test.hamcrest.ElasticsearchAssertions" ]
import java.io.IOException; import org.elasticsearch.client.Client; import org.elasticsearch.index.query.MatchPhraseQueryBuilder; import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import java.io.*; import org.elasticsearch.client.*; import org.elasticsearch.index.query.*; import org.elasticsearch.test.hamcrest.*;
[ "java.io", "org.elasticsearch.client", "org.elasticsearch.index", "org.elasticsearch.test" ]
java.io; org.elasticsearch.client; org.elasticsearch.index; org.elasticsearch.test;
2,840,012
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("QNameSet"); sb.append(_inverted ? "-(" : "+("); for (String includedURIs : _includedURIs) { sb.append("+*@"); sb.append(includedURIs); sb.append(", "); } ...
String function() { StringBuilder sb = new StringBuilder(); sb.append(STR); sb.append(_inverted ? "-(" : "+("); for (String includedURIs : _includedURIs) { sb.append("+*@"); sb.append(includedURIs); sb.append(STR); } for (QName excludedQName : _excludedQNames) { sb.append("-"); sb.append(prettyQName(excludedQName)); sb...
/** * Returns a string representation useful for debugging, subject to change. */
Returns a string representation useful for debugging, subject to change
toString
{ "repo_name": "apache/xmlbeans", "path": "src/main/java/org/apache/xmlbeans/QNameSet.java", "license": "apache-2.0", "size": 15802 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
2,517,607
AdapterRegistry registry();
AdapterRegistry registry();
/** * The registry that contains all the adapters present on the context. * @return The adapter registry. */
The registry that contains all the adapters present on the context
registry
{ "repo_name": "jhrcek/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-core/kie-wb-common-stunner-api/kie-wb-common-stunner-core-api/src/main/java/org/kie/workbench/common/stunner/core/definition/adapter/AdapterManager.java", "license": "apache-2.0", "size": 2172 }
[ "org.kie.workbench.common.stunner.core.registry.definition.AdapterRegistry" ]
import org.kie.workbench.common.stunner.core.registry.definition.AdapterRegistry;
import org.kie.workbench.common.stunner.core.registry.definition.*;
[ "org.kie.workbench" ]
org.kie.workbench;
120,329
public void copyFromLocalFile(boolean delSrc, boolean overwrite, Path src, Path dst) throws IOException { Configuration conf = getConf(); FileUtil.copy(getLocal(conf), src, this, dst, delSrc, overwrite, conf); }
void function(boolean delSrc, boolean overwrite, Path src, Path dst) throws IOException { Configuration conf = getConf(); FileUtil.copy(getLocal(conf), src, this, dst, delSrc, overwrite, conf); }
/** * The src file is on the local disk. Add it to FS at * the given dst name. * delSrc indicates if the source should be removed * @param delSrc whether to delete the src * @param overwrite whether to overwrite an existing file * @param src path * @param dst path */
The src file is on the local disk. Add it to FS at the given dst name. delSrc indicates if the source should be removed
copyFromLocalFile
{ "repo_name": "songweijia/fffs", "path": "sources/hadoop-2.4.1-src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java", "license": "apache-2.0", "size": 102912 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration;
import java.io.*; import org.apache.hadoop.conf.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,514,736
Single<Boolean> trySetMaxSize(int maxSize);
Single<Boolean> trySetMaxSize(int maxSize);
/** * Tries to set max size of the map. * Superfluous elements are evicted using LRU algorithm. * * @param maxSize - max size * @return <code>true</code> if max size has been successfully set, otherwise <code>false</code>. */
Tries to set max size of the map. Superfluous elements are evicted using LRU algorithm
trySetMaxSize
{ "repo_name": "redisson/redisson", "path": "redisson/src/main/java/org/redisson/api/RMapCacheRx.java", "license": "apache-2.0", "size": 12141 }
[ "io.reactivex.rxjava3.core.Single" ]
import io.reactivex.rxjava3.core.Single;
import io.reactivex.rxjava3.core.*;
[ "io.reactivex.rxjava3" ]
io.reactivex.rxjava3;
1,035,445
private int directoryContentsCount(String path) { final File directory = serverPaths.getServerFileFromFsFile(new FsFile(path)); if (directory.exists()) { if (directory.isDirectory()) { return directory.list().length; } } els...
int function(String path) { final File directory = serverPaths.getServerFileFromFsFile(new FsFile(path)); if (directory.exists()) { if (directory.isDirectory()) { return directory.list().length; } } else { final File parent = directory.getParentFile(); if (parent != null && parent.exists() && parent.isDirectory()) { re...
/** * Count the entries in the given directory. * @param path the repository path for the directory * @return the number of entries in the directory, or {@code 0} if the path does not exist but its parent is a directory, * or a very large number if the path cannot be created as a dir...
Count the entries in the given directory
directoryContentsCount
{ "repo_name": "knabar/openmicroscopy", "path": "components/blitz/src/ome/services/blitz/repo/ManagedRepositoryI.java", "license": "gpl-2.0", "size": 72599 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,152,690
public Set<String> getNamespaces(String code);
Set<String> function(String code);
/** * Evaluates the currency namespace of a currency code. * * @param code The currency code. * @return {@code true}, if the currency is defined. */
Evaluates the currency namespace of a currency code
getNamespaces
{ "repo_name": "JavaMoney/javamoney-shelter", "path": "retired/currencies/src/main/java/org/javamoney/currencies/spi/CurrencyMappingsSingletonSpi.java", "license": "apache-2.0", "size": 3319 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
800,816
public static int readInt(InputStream inputStream) throws IOException { byte[] byteArray = new byte[4]; // Read in the next 4 bytes inputStream.read(byteArray); int number = convertIntFromBytes(byteArray); return number; }
static int function(InputStream inputStream) throws IOException { byte[] byteArray = new byte[4]; inputStream.read(byteArray); int number = convertIntFromBytes(byteArray); return number; }
/** * Read in an integer from an InputStream * * @param inputStream * The InputStream used to read the integer * @return An int, which is the next 4 bytes converted from the InputStream * @throws IOException * Thrown if there is a problem reading from the Input...
Read in an integer from an InputStream
readInt
{ "repo_name": "PlanetWaves/clockworkengine", "path": "branches/3.0/engine/src/core-plugins/com/clockwork/export/binary/ByteUtils.java", "license": "apache-2.0", "size": 13820 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,354,824
public static String getSingleSearchCriteria(String criteria) throws APIManagementException { criteria = criteria.trim(); String searchValue = criteria; String searchKey = APIConstants.NAME_TYPE_PREFIX; if (criteria.contains(":")) { if (criteria.split(":").length > 1) {...
static String function(String criteria) throws APIManagementException { criteria = criteria.trim(); String searchValue = criteria; String searchKey = APIConstants.NAME_TYPE_PREFIX; if (criteria.contains(":")) { if (criteria.split(":").length > 1) { String[] splitValues = criteria.split(":"); searchKey = splitValues[0]....
/** * Generates solr compatible search criteria synatax from user entered query criteria. * Ex: From version:1.0.0, this returns version=*1.0.0* * * @param criteria * @return solar compatible criteria * @throws APIManagementException */
Generates solr compatible search criteria synatax from user entered query criteria. Ex: From version:1.0.0, this returns version=*1.0.0
getSingleSearchCriteria
{ "repo_name": "ruks/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java", "license": "apache-2.0", "size": 564037 }
[ "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.APIConstants" ]
import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.APIConstants;
import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
889,393
public BoundStatement bindKeyValue(PreparedStatement statement, Object key, Object val) { Object[] values = new Object[persistenceSettings.getTableColumns().size()]; PersistenceSettings keySettings = persistenceSettings.getKeyPersistenceSettings(); PersistenceSettings valSettings = persiste...
BoundStatement function(PreparedStatement statement, Object key, Object val) { Object[] values = new Object[persistenceSettings.getTableColumns().size()]; PersistenceSettings keySettings = persistenceSettings.getKeyPersistenceSettings(); PersistenceSettings valSettings = persistenceSettings.getValuePersistenceSettings(...
/** * Binds Ignite cache key and value object to {@link com.datastax.driver.core.PreparedStatement}. * * @param statement statement to which key and value object should be bind. * @param key key object. * @param val value object. * * @return statement with bounded key and value. ...
Binds Ignite cache key and value object to <code>com.datastax.driver.core.PreparedStatement</code>
bindKeyValue
{ "repo_name": "ptupitsyn/ignite", "path": "modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/persistence/PersistenceController.java", "license": "apache-2.0", "size": 16259 }
[ "com.datastax.driver.core.BoundStatement", "com.datastax.driver.core.PreparedStatement" ]
import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.PreparedStatement;
import com.datastax.driver.core.*;
[ "com.datastax.driver" ]
com.datastax.driver;
860,264
private ImageView makeRecordingInfoIcon(int resourceId) { ImageView iconImage = new ImageView(context); iconImage.setImageResource(resourceId); iconImage.setAdjustViewBounds(true); // iconImage.setLayoutParams(new LayoutParams( // LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); iconImage.setScale...
ImageView function(int resourceId) { ImageView iconImage = new ImageView(context); iconImage.setImageResource(resourceId); iconImage.setAdjustViewBounds(true); iconImage.setScaleType(ScaleType.FIT_START); return iconImage; }
/** * Create the view for a icon with resourceId * * @param resourceId The id of a drawalbe image * @return */
Create the view for a icon with resourceId
makeRecordingInfoIcon
{ "repo_name": "lisaslyis/aikuma", "path": "Aikuma/src/org/lp20/aikuma/ui/RecordingArrayAdapter.java", "license": "agpl-3.0", "size": 9840 }
[ "android.widget.ImageView" ]
import android.widget.ImageView;
import android.widget.*;
[ "android.widget" ]
android.widget;
963,611
public Resource setIncludes(Collection<String> includes) { if (includes == null || includes.isEmpty()) { removeIncludes(); } else { setIncludes0(includes); } return this; }
Resource function(Collection<String> includes) { if (includes == null includes.isEmpty()) { removeIncludes(); } else { setIncludes0(includes); } return this; }
/** * Specifies list of file patterns which specifies the files to include into specified directory */
Specifies list of file patterns which specifies the files to include into specified directory
setIncludes
{ "repo_name": "akervern/che", "path": "plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Resource.java", "license": "epl-1.0", "size": 8664 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
209,842
@Test public void testPipelineRecoveryForLastBlock() throws IOException { DFSClientFaultInjector faultInjector = Mockito.mock(DFSClientFaultInjector.class); DFSClientFaultInjector oldInjector = DFSClientFaultInjector.get(); DFSClientFaultInjector.set(faultInjector); Configuration conf = new ...
void function() throws IOException { DFSClientFaultInjector faultInjector = Mockito.mock(DFSClientFaultInjector.class); DFSClientFaultInjector oldInjector = DFSClientFaultInjector.get(); DFSClientFaultInjector.set(faultInjector); Configuration conf = new HdfsConfiguration(); conf.setInt(HdfsClientConfigKeys.BlockWrite....
/** Test whether corrupt replicas are detected correctly during pipeline * recoveries. */
Test whether corrupt replicas are detected correctly during pipeline recoveries
testPipelineRecoveryForLastBlock
{ "repo_name": "aliyun-beta/aliyun-oss-hadoop-fs", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestClientProtocolForPipelineRecovery.java", "license": "apache-2.0", "size": 11961 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FSDataInputStream", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.client.HdfsClientConfigKeys", "org.junit.Assert", "org.mockito.Mockito" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.client.HdfsClientConfigKeys; import org.junit.Assert; import org.mockito.Mockito;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.client.*; import org.junit.*; import org.mockito.*;
[ "java.io", "org.apache.hadoop", "org.junit", "org.mockito" ]
java.io; org.apache.hadoop; org.junit; org.mockito;
1,425,788
void addConsumer(final MessageConsumer consumer) { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("addConsumer(" + consumer + ")"); } synchronized (consumers) { consumers.add(consumer); } }
void addConsumer(final MessageConsumer consumer) { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace(STR + consumer + ")"); } synchronized (consumers) { consumers.add(consumer); } }
/** * Add consumer * * @param consumer The consumer */
Add consumer
addConsumer
{ "repo_name": "mnovak1/activemq-artemis", "path": "artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java", "license": "apache-2.0", "size": 48497 }
[ "javax.jms.MessageConsumer" ]
import javax.jms.MessageConsumer;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
918,713
public void loadWorkspaceFrom(Element newRoot, Element originalLangRoot) { if (newRoot != null) { //load pages, page drawers, and their blocks from save file blockCanvas.loadSaveString(newRoot); //load the block drawers specified in the file (may contain ...
void function(Element newRoot, Element originalLangRoot) { if (newRoot != null) { blockCanvas.loadSaveString(newRoot); PageDrawerLoadingUtils.loadBlockDrawerSets(this, originalLangRoot, factory); PageDrawerLoadingUtils.loadBlockDrawerSets(this, newRoot, factory); loadWorkspaceSettings(newRoot); } else { blockCanvas.loa...
/** * Loads the workspace with the following content: * - RenderableBlocks and their associated Block instances that reside * within the BlockCanvas * @param newRoot the XML Element containing the new desired content. Some of the * content in newRoot may override the content in origina...
Loads the workspace with the following content: - RenderableBlocks and their associated Block instances that reside within the BlockCanvas
loadWorkspaceFrom
{ "repo_name": "laurentschall/openblocks", "path": "src/main/java/edu/mit/blocks/workspace/Workspace.java", "license": "lgpl-3.0", "size": 36613 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
903,232
public int diff_levenshtein(LinkedList<Diff> diffs) { int levenshtein = 0; int insertions = 0; int deletions = 0; for (Diff aDiff : diffs) { switch (aDiff.operation) { case INSERT: insertions += aDiff.text.length(); break; case DELETE: deletions += aDiff.text.length(); break; case...
int function(LinkedList<Diff> diffs) { int levenshtein = 0; int insertions = 0; int deletions = 0; for (Diff aDiff : diffs) { switch (aDiff.operation) { case INSERT: insertions += aDiff.text.length(); break; case DELETE: deletions += aDiff.text.length(); break; case EQUAL: levenshtein += Math.max(insertions, deletions)...
/** * Compute the Levenshtein distance; the number of inserted, deleted or * substituted characters. * * @param diffs * LinkedList of Diff objects. * @return Number of changes. */
Compute the Levenshtein distance; the number of inserted, deleted or substituted characters
diff_levenshtein
{ "repo_name": "End-of-degree-project/Robot-Colorizer", "path": "colorizer-robot/src/main/java/com/pablomartinez/wave/robot/util/diff_match_patch.java", "license": "agpl-3.0", "size": 84208 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
454,324
public static BuildFileAST parseBuildFile(ParserInputSource input, List<Statement> preludeStatements, EventHandler eventHandler) { Parser.ParseResult result = Parser.parseFile(input, eventHandler, BUILD); return create(pre...
static BuildFileAST function(ParserInputSource input, List<Statement> preludeStatements, EventHandler eventHandler) { Parser.ParseResult result = Parser.parseFile(input, eventHandler, BUILD); return create(preludeStatements, result, null, eventHandler); }
/** * Parse the specified build file, returning its AST. All errors during * scanning or parsing will be reported to the reporter. */
Parse the specified build file, returning its AST. All errors during scanning or parsing will be reported to the reporter
parseBuildFile
{ "repo_name": "variac/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java", "license": "apache-2.0", "size": 15512 }
[ "com.google.devtools.build.lib.events.EventHandler", "com.google.devtools.build.lib.syntax.Parser", "java.util.List" ]
import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.syntax.Parser; import java.util.List;
import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.syntax.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
2,252,536
public Budget updateBudget(Budget budget) throws RemoteException { return delegateLocator.getBudgetDelegate().update(budget); }
Budget function(Budget budget) throws RemoteException { return delegateLocator.getBudgetDelegate().update(budget); }
/** * Updates the Budget for the ExtendedManagedCustomer's ManagedCustomer. * * @param budget the Budget to insert * @return the updated Budget * @throws RemoteException for communication-related exceptions */
Updates the Budget for the ExtendedManagedCustomer's ManagedCustomer
updateBudget
{ "repo_name": "andyj24/googleads-java-lib", "path": "modules/adwords_axis_utility_extension/src/main/java/com/google/api/ads/adwords/axis/utility/extension/ExtendedManagedCustomer.java", "license": "apache-2.0", "size": 39892 }
[ "com.google.api.ads.adwords.axis.v201506.cm.Budget", "java.rmi.RemoteException" ]
import com.google.api.ads.adwords.axis.v201506.cm.Budget; import java.rmi.RemoteException;
import com.google.api.ads.adwords.axis.v201506.cm.*; import java.rmi.*;
[ "com.google.api", "java.rmi" ]
com.google.api; java.rmi;
2,758,784
public String unvisitedString(Set<Parser> visited) { return "word"; }
String function(Set<Parser> visited) { return "word"; }
/** * Returns a textual description of this production. * * @param vector a list of productions already printed in this * description * * @return string a textual description of this production * * @see ProductionRule#toString() */
Returns a textual description of this production
unvisitedString
{ "repo_name": "automenta/narchy", "path": "util/src/test/java/jcog/grammar/parse/examples/mechanics/LowercaseWord.java", "license": "agpl-3.0", "size": 1332 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
893,326
public DiskEncryptionSetsClient getDiskEncryptionSets() { return this.diskEncryptionSets; } private final DiskAccessesClient diskAccesses;
DiskEncryptionSetsClient function() { return this.diskEncryptionSets; } private final DiskAccessesClient diskAccesses;
/** * Gets the DiskEncryptionSetsClient object to access its operations. * * @return the DiskEncryptionSetsClient object. */
Gets the DiskEncryptionSetsClient object to access its operations
getDiskEncryptionSets
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java", "license": "mit", "size": 31289 }
[ "com.azure.resourcemanager.compute.fluent.DiskAccessesClient", "com.azure.resourcemanager.compute.fluent.DiskEncryptionSetsClient" ]
import com.azure.resourcemanager.compute.fluent.DiskAccessesClient; import com.azure.resourcemanager.compute.fluent.DiskEncryptionSetsClient;
import com.azure.resourcemanager.compute.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
719,663
public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) { Assert.assertNotNull(clazz, "Class must not be null"); Assert.assertNotNull(name, "Method name must not be null"); Class<?> searchType = clazz; while (searchType != null) { Method[] methods = (searchType.isInterface() ?...
static Method function(Class<?> clazz, String name, Class<?>... paramTypes) { Assert.assertNotNull(clazz, STR); Assert.assertNotNull(name, STR); Class<?> searchType = clazz; while (searchType != null) { Method[] methods = (searchType.isInterface() ? searchType.getMethods() : searchType.getDeclaredMethods()); for (Metho...
/** * Attempt to find a {@link Method} on the supplied class with the supplied name * and parameter types. Searches all superclasses up to <code>Object</code>. * <p>Returns <code>null</code> if no {@link Method} can be found. * @param clazz the class to introspect * @param name the name of the method * @par...
Attempt to find a <code>Method</code> on the supplied class with the supplied name and parameter types. Searches all superclasses up to <code>Object</code>. Returns <code>null</code> if no <code>Method</code> can be found
findMethod
{ "repo_name": "TinyGroup/tiny", "path": "framework/org.tinygroup.commons/src/main/java/org/tinygroup/commons/tools/ReflectionUtils.java", "license": "gpl-3.0", "size": 25137 }
[ "java.lang.reflect.Method", "java.util.Arrays" ]
import java.lang.reflect.Method; import java.util.Arrays;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,376,746
public static String startXslElement(String qname, String namespace, SerializationHandler handler, DOM dom, int node) { try { // Get prefix from qname String prefix; final int index = qname.indexOf(':'); if (index > 0) { prefix = q...
static String function(String qname, String namespace, SerializationHandler handler, DOM dom, int node) { try { String prefix; final int index = qname.indexOf(':'); if (index > 0) { prefix = qname.substring(0, index); if (namespace == null namespace.length() == 0) { try { namespace = dom.lookupNamespace(node, prefix); ...
/** * Utility function for the implementation of xsl:element. */
Utility function for the implementation of xsl:element
startXslElement
{ "repo_name": "openjdk/jdk7u", "path": "jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java", "license": "gpl-2.0", "size": 60774 }
[ "com.sun.org.apache.xml.internal.serializer.NamespaceMappings", "com.sun.org.apache.xml.internal.serializer.SerializationHandler", "org.xml.sax.SAXException" ]
import com.sun.org.apache.xml.internal.serializer.NamespaceMappings; import com.sun.org.apache.xml.internal.serializer.SerializationHandler; import org.xml.sax.SAXException;
import com.sun.org.apache.xml.internal.serializer.*; import org.xml.sax.*;
[ "com.sun.org", "org.xml.sax" ]
com.sun.org; org.xml.sax;
84,910
@Override public Element clone() { return this.cloneInternal(); }
Element function() { return this.cloneInternal(); }
/** * Every Element must be cloneable; this is required to handle * element's add and removal into/from arrays and collections. */
Every Element must be cloneable; this is required to handle element's add and removal into/from arrays and collections
clone
{ "repo_name": "chtiJBUG/wise-core", "path": "core/src/main/java/org/jboss/wise/tree/impl/ElementImpl.java", "license": "apache-2.0", "size": 17308 }
[ "org.jboss.wise.tree.Element" ]
import org.jboss.wise.tree.Element;
import org.jboss.wise.tree.*;
[ "org.jboss.wise" ]
org.jboss.wise;
1,229,524
public static void iterate(int dimension, int n, int[] size, int[] res, int dimension2, int n2, int[] size2, int[] res2, CoordinateFunction func) { if (dimension >= n || dimension2 >= n2) { // stop clause func.process(res, res2); return; ...
static void function(int dimension, int n, int[] size, int[] res, int dimension2, int n2, int[] size2, int[] res2, CoordinateFunction func) { if (dimension >= n dimension2 >= n2) { func.process(res, res2); return; } if (size2.length != size.length) { if (dimension >= size.length) return; for (int i = 0; i < size[dimens...
/** * Iterate over a pair of coordinates * @param dimension * @param n * @param size * @param res * @param dimension2 * @param n2 * @param size2 * @param res2 * @param func */
Iterate over a pair of coordinates
iterate
{ "repo_name": "smarthi/nd4j", "path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java", "license": "apache-2.0", "size": 84557 }
[ "org.nd4j.linalg.api.shape.loop.coordinatefunction.CoordinateFunction" ]
import org.nd4j.linalg.api.shape.loop.coordinatefunction.CoordinateFunction;
import org.nd4j.linalg.api.shape.loop.coordinatefunction.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
729,877
@SuppressWarnings("unchecked") public final static Value pop(final ValueMap thiz) { final Stack<Value> stack = (Stack<Value>) thiz.get("#INSTANCE#") .getObject(); return stack.pop(); }
@SuppressWarnings(STR) final static Value function(final ValueMap thiz) { final Stack<Value> stack = (Stack<Value>) thiz.get(STR) .getObject(); return stack.pop(); }
/** * Pops a value from this stack. * * @param thiz * This. * @return The value. */
Pops a value from this stack
pop
{ "repo_name": "rjeschke/weel", "path": "src/main/java/com/github/rjeschke/weel/jclass/WeelStack.java", "license": "apache-2.0", "size": 3134 }
[ "com.github.rjeschke.weel.Value", "com.github.rjeschke.weel.ValueMap", "java.util.Stack" ]
import com.github.rjeschke.weel.Value; import com.github.rjeschke.weel.ValueMap; import java.util.Stack;
import com.github.rjeschke.weel.*; import java.util.*;
[ "com.github.rjeschke", "java.util" ]
com.github.rjeschke; java.util;
841,032
public boolean containsAll(Collection c) { for (Object aC : c) { if (!contains(aC)) { return false; } } return true; } // Search Operations
boolean function(Collection c) { for (Object aC : c) { if (!contains(aC)) { return false; } } return true; }
/** * Returns true if this composite graphics node contains all the graphics * node in the specified collection, false otherwise. * * @param c the collection to be checked for containment */
Returns true if this composite graphics node contains all the graphics node in the specified collection, false otherwise
containsAll
{ "repo_name": "apache/batik", "path": "batik-gvt/src/main/java/org/apache/batik/gvt/CompositeGraphicsNode.java", "license": "apache-2.0", "size": 35542 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
219,443
@SafeVarargs public static final <T> List<T> distinctUnion( final List<T>... lists ) { final List<T> union = new UniqueArrayList<>(); for ( List<T> list : lists ) { union.addAll( list ); } return union; }
static final <T> List<T> function( final List<T>... lists ) { final List<T> union = new UniqueArrayList<>(); for ( List<T> list : lists ) { union.addAll( list ); } return union; }
/** * Unions the given array of lists into a single list with distinct items. * * @param <T> type. * @param lists the array of lists. * @return a union of the given lists. */
Unions the given array of lists into a single list with distinct items
distinctUnion
{ "repo_name": "dhis2/dhis2-core", "path": "dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.java", "license": "bsd-3-clause", "size": 10312 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,879,842
private void handleElseCondition(Statement statement) { ASTNode node = statement; boolean isFirstElseStatement = node.getLocationInParent() == IfStatement.ELSE_STATEMENT_PROPERTY; // Handle special condition for else if (isFirstElseStatement) { // Edge from current location to post if-...
void function(Statement statement) { ASTNode node = statement; boolean isFirstElseStatement = node.getLocationInParent() == IfStatement.ELSE_STATEMENT_PROPERTY; if (isFirstElseStatement) { CFANode prevNode = locStack.pop(); CFANode nextNode = locStack.peek(); if (isReachableNode(prevNode)) { BlankEdge blankEdge = new B...
/** * This Method checks, if Statement is start of a else Condition Block * or Statement, changes the cfa accordingly. * * * @param statement Given statement to be checked. */
This Method checks, if Statement is start of a else Condition Block or Statement, changes the cfa accordingly
handleElseCondition
{ "repo_name": "nishanttotla/predator", "path": "cpachecker/src/org/sosy_lab/cpachecker/cfa/parser/eclipse/java/CFAMethodBuilder.java", "license": "gpl-3.0", "size": 88299 }
[ "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.IfStatement", "org.eclipse.jdt.core.dom.Statement", "org.sosy_lab.cpachecker.cfa.model.BlankEdge", "org.sosy_lab.cpachecker.cfa.model.CFANode" ]
import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.IfStatement; import org.eclipse.jdt.core.dom.Statement; import org.sosy_lab.cpachecker.cfa.model.BlankEdge; import org.sosy_lab.cpachecker.cfa.model.CFANode;
import org.eclipse.jdt.core.dom.*; import org.sosy_lab.cpachecker.cfa.model.*;
[ "org.eclipse.jdt", "org.sosy_lab.cpachecker" ]
org.eclipse.jdt; org.sosy_lab.cpachecker;
2,326,140
private void clickEdidAd(Ad ad) { Log.d(TAG, "clickEdidAd() called with: " + "ad = [" + ad + "]"); Intent intent = new Intent(context, AdCreateActivity.class); intent.putExtra("ad", ad); startActivityForResult( intent, AD_EDIT_REQUEST); }
void function(Ad ad) { Log.d(TAG, STR + STR + ad + "]"); Intent intent = new Intent(context, AdCreateActivity.class); intent.putExtra("ad", ad); startActivityForResult( intent, AD_EDIT_REQUEST); }
/** * When click on edit Ad, send all data to add edit on * @param ad */
When click on edit Ad, send all data to add edit on
clickEdidAd
{ "repo_name": "imaginabit/YoNoDesperdicio", "path": "app/src/main/java/com/imaginabit/yonodesperdicion/activities/AdDetailActivity.java", "license": "gpl-3.0", "size": 34462 }
[ "android.content.Intent", "android.util.Log", "com.imaginabit.yonodesperdicion.models.Ad" ]
import android.content.Intent; import android.util.Log; import com.imaginabit.yonodesperdicion.models.Ad;
import android.content.*; import android.util.*; import com.imaginabit.yonodesperdicion.models.*;
[ "android.content", "android.util", "com.imaginabit.yonodesperdicion" ]
android.content; android.util; com.imaginabit.yonodesperdicion;
2,134,026
Map<UUID, Integer> reassign(@NotNull IgniteUuid srvcId, @NotNull ServiceConfiguration cfg, @NotNull AffinityTopologyVersion topVer, @Nullable TreeMap<UUID, Integer> oldTop) throws IgniteCheckedException { Object nodeFilter = cfg.getNodeFilter(); if (nodeFilter != null) c...
Map<UUID, Integer> reassign(@NotNull IgniteUuid srvcId, @NotNull ServiceConfiguration cfg, @NotNull AffinityTopologyVersion topVer, @Nullable TreeMap<UUID, Integer> oldTop) throws IgniteCheckedException { Object nodeFilter = cfg.getNodeFilter(); if (nodeFilter != null) ctx.resource().injectGeneric(nodeFilter); int tota...
/** * Reassigns service to nodes. * * @param srvcId Service id. * @param cfg Service configuration. * @param topVer Topology version. * @param oldTop Previous topology snapshot. Will be ignored for affinity service. * @throws IgniteCheckedException If failed. */
Reassigns service to nodes
reassign
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/service/IgniteServiceProcessor.java", "license": "apache-2.0", "size": 63821 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.List", "java.util.Map", "java.util.Random", "java.util.TreeMap", "java.util.TreeSet", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.processors.aff...
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Random; import java.util.TreeMap; import java.util.TreeSet; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cluster.ClusterNode; import org.apach...
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.lang.*; import org.apache.ignite.services.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
190,892
public String toString() { // Special case: It's zero if (this.num.equals(BigInteger.ZERO)) { return "0"; } // if it's zero // Lump together the string represention of the numerator, // a slash, and the string representation of the denominator // return this.num.toString().co...
String function() { if (this.num.equals(BigInteger.ZERO)) { return "0"; } return this.num + "/" + this.denom; }
/** * Convert this fraction to a string for ease of printing. */
Convert this fraction to a string for ease of printing
toString
{ "repo_name": "mauck/csc207-hw5", "path": "src/edu/grinnell/csc207/mauckchi/utils/Fraction.java", "license": "gpl-3.0", "size": 10306 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,485,153
NodeIdFactory getNodeIdFactory();
NodeIdFactory getNodeIdFactory();
/** * Gets the node id factory * * @return the node id factory */
Gets the node id factory
getNodeIdFactory
{ "repo_name": "gnodet/camel", "path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java", "license": "apache-2.0", "size": 24074 }
[ "org.apache.camel.spi.NodeIdFactory" ]
import org.apache.camel.spi.NodeIdFactory;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
877,025
protected void computeLaidoutText(BridgeContext ctx, Element e, GraphicsNode node) { TextNode tn = (TextNode)node; elemTPI.clear(); AttributedString as = buildAttributedString(ctx, e); if (as == null) { ...
void function(BridgeContext ctx, Element e, GraphicsNode node) { TextNode tn = (TextNode)node; elemTPI.clear(); AttributedString as = buildAttributedString(ctx, e); if (as == null) { tn.setAttributedCharacterIterator(null); return; } addGlyphPositionAttributes(as, e, ctx); if (ctx.isDynamic()) { laidoutText = new Attri...
/** * Recompute the layout of the &lt;text&gt; node. * * Assign onto the TextNode pending to the element * the new recomputed AttributedString. Also * update <code>laidoutText</code> with the new * value. */
Recompute the layout of the &lt;text&gt; node. Assign onto the TextNode pending to the element the new recomputed AttributedString. Also update <code>laidoutText</code> with the new value
computeLaidoutText
{ "repo_name": "sflyphotobooks/crp-batik", "path": "sources/org/apache/batik/bridge/SVGTextElementBridge.java", "license": "apache-2.0", "size": 114566 }
[ "java.text.AttributedString", "org.apache.batik.gvt.GraphicsNode", "org.apache.batik.gvt.TextNode", "org.apache.batik.gvt.text.TextPaintInfo", "org.w3c.dom.Element" ]
import java.text.AttributedString; import org.apache.batik.gvt.GraphicsNode; import org.apache.batik.gvt.TextNode; import org.apache.batik.gvt.text.TextPaintInfo; import org.w3c.dom.Element;
import java.text.*; import org.apache.batik.gvt.*; import org.apache.batik.gvt.text.*; import org.w3c.dom.*;
[ "java.text", "org.apache.batik", "org.w3c.dom" ]
java.text; org.apache.batik; org.w3c.dom;
2,201,986
public void testGetLegendItemSeriesIndex() { XYSeriesCollection d1 = new XYSeriesCollection(); XYSeries s1 = new XYSeries("S1"); s1.add(1.0, 1.1); XYSeries s2 = new XYSeries("S2"); s2.add(1.0, 1.1); d1.addSeries(s1); d1.addSeries(s2); XYSeriesCollecti...
void function() { XYSeriesCollection d1 = new XYSeriesCollection(); XYSeries s1 = new XYSeries("S1"); s1.add(1.0, 1.1); XYSeries s2 = new XYSeries("S2"); s2.add(1.0, 1.1); d1.addSeries(s1); d1.addSeries(s2); XYSeriesCollection d2 = new XYSeriesCollection(); XYSeries s3 = new XYSeries("S3"); s3.add(1.0, 1.1); XYSeries s...
/** * A check for the datasetIndex and seriesIndex fields in the LegendItem * returned by the getLegendItem() method. */
A check for the datasetIndex and seriesIndex fields in the LegendItem returned by the getLegendItem() method
testGetLegendItemSeriesIndex
{ "repo_name": "JSansalone/JFreeChart", "path": "tests/org/jfree/chart/renderer/xy/junit/StandardXYItemRendererTests.java", "license": "lgpl-2.1", "size": 10352 }
[ "org.jfree.chart.JFreeChart", "org.jfree.chart.LegendItem", "org.jfree.chart.axis.NumberAxis", "org.jfree.chart.plot.XYPlot", "org.jfree.chart.renderer.xy.StandardXYItemRenderer", "org.jfree.data.xy.XYSeries", "org.jfree.data.xy.XYSeriesCollection" ]
import org.jfree.chart.JFreeChart; import org.jfree.chart.LegendItem; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.renderer.xy.StandardXYItemRenderer; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection;
import org.jfree.chart.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.renderer.xy.*; import org.jfree.data.xy.*;
[ "org.jfree.chart", "org.jfree.data" ]
org.jfree.chart; org.jfree.data;
902,129
Set<String> getAttributeNames();
Set<String> getAttributeNames();
/** * Gets the attribute names that have a value associated with it. Each value can be * passed into {@link org.springframework.session.Session#getAttribute(String)} to * obtain the attribute value. * @return the attribute names that have a value associated with it. * @see #getAttribute(String) */
Gets the attribute names that have a value associated with it. Each value can be passed into <code>org.springframework.session.Session#getAttribute(String)</code> to obtain the attribute value
getAttributeNames
{ "repo_name": "vpavic/spring-session", "path": "spring-session-core/src/main/java/org/springframework/session/Session.java", "license": "apache-2.0", "size": 4936 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,783,919
protected void restoreGraphicsState() throws IOException { getPaintingState().restore(); }
void function() throws IOException { getPaintingState().restore(); }
/** * Restores the last graphics state of the rendering engine. * @throws IOException if an I/O error occurs */
Restores the last graphics state of the rendering engine
restoreGraphicsState
{ "repo_name": "pellcorp/fop", "path": "src/java/org/apache/fop/render/afp/AFPPainter.java", "license": "apache-2.0", "size": 21587 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,201,244
public static List<KeyedStateHandle> getRawKeyedStateHandles( OperatorState operatorState, KeyGroupRange subtaskKeyGroupRange) { final int parallelism = operatorState.getParallelism(); List<KeyedStateHandle> extractedKeyedStateHandles = null; for (int i = 0; i < parallelism; i++) { if (operatorStat...
static List<KeyedStateHandle> function( OperatorState operatorState, KeyGroupRange subtaskKeyGroupRange) { final int parallelism = operatorState.getParallelism(); List<KeyedStateHandle> extractedKeyedStateHandles = null; for (int i = 0; i < parallelism; i++) { if (operatorState.getState(i) != null) { Collection<KeyedSt...
/** * Collect {@link KeyGroupsStateHandle rawKeyedStateHandles} which have intersection with given * {@link KeyGroupRange} from {@link TaskState operatorState}. * * @param operatorState all state handles of a operator * @param subtaskKeyGroupRange the KeyGroupRange of a subtask * @return all rawKeye...
Collect <code>KeyGroupsStateHandle rawKeyedStateHandles</code> which have intersection with given <code>KeyGroupRange</code> from <code>TaskState operatorState</code>
getRawKeyedStateHandles
{ "repo_name": "bowenli86/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java", "license": "apache-2.0", "size": 25101 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.apache.flink.runtime.state.KeyGroupRange", "org.apache.flink.runtime.state.KeyedStateHandle" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.flink.runtime.state.KeyGroupRange; import org.apache.flink.runtime.state.KeyedStateHandle;
import java.util.*; import org.apache.flink.runtime.state.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
2,302,117
public static String resolveIfDefaultVhostToNull(String environmentName, String vhost) throws APIManagementException { // set VHost as null, if it is the default vhost of the read only environment if (APIUtil.getReadOnlyEnvironments().get(environmentName) != null && StringUtils.equal...
static String function(String environmentName, String vhost) throws APIManagementException { if (APIUtil.getReadOnlyEnvironments().get(environmentName) != null && StringUtils.equalsIgnoreCase(vhost, APIUtil.getDefaultVhostOfReadOnlyEnvironment(environmentName).getHost())) { return null; } return vhost; }
/** * Resolve vhost to null if the given vhost is the default (first) vhost of read only environment * * @param environmentName Environment name * @param vhost Host of the vhost * @return Resolved vhost * @throws APIManagementException if failed to find the read only environment */
Resolve vhost to null if the given vhost is the default (first) vhost of read only environment
resolveIfDefaultVhostToNull
{ "repo_name": "wso2/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/VHostUtils.java", "license": "apache-2.0", "size": 3561 }
[ "org.apache.commons.lang3.StringUtils", "org.wso2.carbon.apimgt.api.APIManagementException" ]
import org.apache.commons.lang3.StringUtils; import org.wso2.carbon.apimgt.api.APIManagementException;
import org.apache.commons.lang3.*; import org.wso2.carbon.apimgt.api.*;
[ "org.apache.commons", "org.wso2.carbon" ]
org.apache.commons; org.wso2.carbon;
1,953,624
private boolean isUserPriviledged(JID jid) throws NodeStoreException { boolean isUser = actorJid.toBareJID().equals(jid.toBareJID()); return (isUser || isOwnerModerator()) ? true : false; }
boolean function(JID jid) throws NodeStoreException { boolean isUser = actorJid.toBareJID().equals(jid.toBareJID()); return (isUser isOwnerModerator()) ? true : false; }
/** * Don't include any subscriptions other than Subscriptions.subscriptions, unless the user is * one of owner, moderator or the user. * * @param ns * * @return * @throws NodeStoreException */
Don't include any subscriptions other than Subscriptions.subscriptions, unless the user is one of owner, moderator or the user
isUserPriviledged
{ "repo_name": "ashward/buddycloud-server-java", "path": "src/main/java/org/buddycloud/channelserver/packetprocessor/iq/namespace/pubsub/get/SubscriptionsGet.java", "license": "apache-2.0", "size": 7393 }
[ "org.buddycloud.channelserver.db.exception.NodeStoreException" ]
import org.buddycloud.channelserver.db.exception.NodeStoreException;
import org.buddycloud.channelserver.db.exception.*;
[ "org.buddycloud.channelserver" ]
org.buddycloud.channelserver;
2,376,918
private GeocodeResponseHandler createGeocodeResponseHandler(final KrollFunction callback) { final GeolocationModule geolocationModule = this;
GeocodeResponseHandler function(final KrollFunction callback) { final GeolocationModule geolocationModule = this;
/** * Convenience method for creating a response handler that is used when doing a * geocode lookup. * * @param callback Javascript function that the response handler will invoke * once the geocode response is ready * @return the geocode response handler */
Convenience method for creating a response handler that is used when doing a geocode lookup
createGeocodeResponseHandler
{ "repo_name": "falkolab/titanium_mobile", "path": "android/modules/geolocation/src/java/ti/modules/titanium/geolocation/GeolocationModule.java", "license": "apache-2.0", "size": 37273 }
[ "org.appcelerator.kroll.KrollFunction" ]
import org.appcelerator.kroll.KrollFunction;
import org.appcelerator.kroll.*;
[ "org.appcelerator.kroll" ]
org.appcelerator.kroll;
2,218,176
public static void initNative(Context context, KeyInterface keyImpl, Class<? extends Activity> mainActivity) { SalesforceSDKManager.init(context, keyImpl, mainActivity, LoginActivity.class); }
static void function(Context context, KeyInterface keyImpl, Class<? extends Activity> mainActivity) { SalesforceSDKManager.init(context, keyImpl, mainActivity, LoginActivity.class); }
/** * Initializes components required for this class * to properly function. This method should be called * by native apps using the Salesforce Mobile SDK. * * @param context Application context. * @param keyImpl Implementation of KeyInterface. * @param mainActivity Activity that should be launched ...
Initializes components required for this class to properly function. This method should be called by native apps using the Salesforce Mobile SDK
initNative
{ "repo_name": "seethaa/force_analytics_example", "path": "native/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.java", "license": "apache-2.0", "size": 38136 }
[ "android.app.Activity", "android.content.Context", "com.salesforce.androidsdk.ui.LoginActivity" ]
import android.app.Activity; import android.content.Context; import com.salesforce.androidsdk.ui.LoginActivity;
import android.app.*; import android.content.*; import com.salesforce.androidsdk.ui.*;
[ "android.app", "android.content", "com.salesforce.androidsdk" ]
android.app; android.content; com.salesforce.androidsdk;
244,312
public void setHttp(Javalin http) { this.http = http; }
void function(Javalin http) { this.http = http; }
/** * Sets the non-secure http {@link Javalin} instance this API uses. * <p> * <b>Warning</b> This is only exposed for {@link OpenApiCompatHelper} and might be removed * in a future update * </p> * * @param http The non-secure {@link Javalin} instance for this API. */
Sets the non-secure http <code>Javalin</code> instance this API uses. Warning This is only exposed for <code>OpenApiCompatHelper</code> and might be removed in a future update
setHttp
{ "repo_name": "vitrivr/cineast", "path": "cineast-api/src/main/java/org/vitrivr/cineast/api/APIEndpoint.java", "license": "mit", "size": 19090 }
[ "io.javalin.Javalin" ]
import io.javalin.Javalin;
import io.javalin.*;
[ "io.javalin" ]
io.javalin;
500,031
public void setClock(final Clock clock) { FileVersion.setClock(clock); } // ///////////////////////////////////////////////////////// // Dependencies (from singleton) // /////////////////////////////////////////////////////////
void function(final Clock clock) { FileVersion.setClock(clock); }
/** * Set the clock used to generate sequence numbers and last changed dates * for version objects. */
Set the clock used to generate sequence numbers and last changed dates for version objects
setClock
{ "repo_name": "howepeng/isis", "path": "mothballed/component/objectstore/xml/src/main/java/org/apache/isis/objectstore/xml/XmlObjectStore.java", "license": "apache-2.0", "size": 18895 }
[ "org.apache.isis.objectstore.xml.internal.clock.Clock", "org.apache.isis.objectstore.xml.internal.version.FileVersion" ]
import org.apache.isis.objectstore.xml.internal.clock.Clock; import org.apache.isis.objectstore.xml.internal.version.FileVersion;
import org.apache.isis.objectstore.xml.internal.clock.*; import org.apache.isis.objectstore.xml.internal.version.*;
[ "org.apache.isis" ]
org.apache.isis;
1,441,920
@Override public String toString() { try { // MD5 does support cloning, so this should not fail return hexDigest(((MessageDigest) md.clone()).digest()); } catch (CloneNotSupportedException e) { // MessageDigest does not support cloning, // so just return the toString() on the Message...
String function() { try { return hexDigest(((MessageDigest) md.clone()).digest()); } catch (CloneNotSupportedException e) { return md.toString(); } }
/** * Override of Object.toString to return a string for the MD5 digest without * finalizing the digest computation. Calling hexDigest() instead will * finalize the digest computation. * * @return the string returned by hexDigest() */
Override of Object.toString to return a string for the MD5 digest without finalizing the digest computation. Calling hexDigest() instead will finalize the digest computation
toString
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/util/Fingerprint.java", "license": "apache-2.0", "size": 8957 }
[ "java.security.MessageDigest" ]
import java.security.MessageDigest;
import java.security.*;
[ "java.security" ]
java.security;
873,732
public RandomAccessFile getErrorProcessRAFile() throws FileNotFoundException;
RandomAccessFile function() throws FileNotFoundException;
/** * Returns errout as RandomAccessFile * @return Err file as RandomAccessFile * @throws FileNotFoundException Err file doesn't exist */
Returns errout as RandomAccessFile
getErrorProcessRAFile
{ "repo_name": "moravianlibrary/kramerius", "path": "common/src/main/java/cz/incad/kramerius/processes/LRProcess.java", "license": "gpl-3.0", "size": 7894 }
[ "java.io.FileNotFoundException", "java.io.RandomAccessFile" ]
import java.io.FileNotFoundException; import java.io.RandomAccessFile;
import java.io.*;
[ "java.io" ]
java.io;
2,613,459
protected String getServiceName() { if ( store == null ) { return null; } else { return Monitor.getServiceName( store ); } }
String function() { if ( store == null ) { return null; } else { return Monitor.getServiceName( store ); } }
/** * <p> * Get the name of the database if we are performing authentication at the database level. * </p> */
Get the name of the database if we are performing authentication at the database level.
getServiceName
{ "repo_name": "scnakandala/derby", "path": "java/engine/org/apache/derby/impl/jdbc/authentication/AuthenticationServiceBase.java", "license": "apache-2.0", "size": 28394 }
[ "org.apache.derby.iapi.services.monitor.Monitor" ]
import org.apache.derby.iapi.services.monitor.Monitor;
import org.apache.derby.iapi.services.monitor.*;
[ "org.apache.derby" ]
org.apache.derby;
2,575,757
public NodeRef getNodeRef() { return nodeRef; }
NodeRef function() { return nodeRef; }
/** * Gets the node reference * * @return NodeRef the node reference */
Gets the node reference
getNodeRef
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/blog/BlogDetails.java", "license": "lgpl-3.0", "size": 5813 }
[ "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;
607,678
public void send(Send send) { String connectionId = send.destination(); KafkaChannel channel = openOrClosingChannelOrFail(connectionId); if (closingChannels.containsKey(connectionId)) { // ensure notification via `disconnected`, leave channel in the state in which closing was tri...
void function(Send send) { String connectionId = send.destination(); KafkaChannel channel = openOrClosingChannelOrFail(connectionId); if (closingChannels.containsKey(connectionId)) { this.failedSends.add(connectionId); } else { try { channel.setSend(send); } catch (Exception e) { channel.state(ChannelState.FAILED_SEND)...
/** * Queue the given request for sending in the subsequent {@link #poll(long)} calls * @param send The request to send */
Queue the given request for sending in the subsequent <code>#poll(long)</code> calls
send
{ "repo_name": "sslavic/kafka", "path": "clients/src/main/java/org/apache/kafka/common/network/Selector.java", "license": "apache-2.0", "size": 68906 }
[ "java.nio.channels.CancelledKeyException" ]
import java.nio.channels.CancelledKeyException;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
535,570
private void writeDomainSpec(DomainSpec spec, Document document, Element parentElement) { Element categoryDomain = document.createElement("domain"); parentElement.appendChild(categoryDomain); categoryDomain.setAttribute("name", spec.getName()); }
void function(DomainSpec spec, Document document, Element parentElement) { Element categoryDomain = document.createElement(STR); parentElement.appendChild(categoryDomain); categoryDomain.setAttribute("name", spec.getName()); }
/** * Writes out a domain specification object * @param spec The domain specification to write out * @param document The document in which to write the domain specification * @param parentElement The parent element in the DOM tree. */
Writes out a domain specification object
writeDomainSpec
{ "repo_name": "lilicoding/soot-infoflow", "path": "src/soot/jimple/infoflow/rifl/RIFLWriter.java", "license": "lgpl-2.1", "size": 11616 }
[ "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
866,362
@NotNull List<File> getArtifacts();
List<File> getArtifacts();
/** * The paths where the artifacts is constructed * * @return */
The paths where the artifacts is constructed
getArtifacts
{ "repo_name": "msebire/intellij-community", "path": "plugins/gradle/tooling-extension-api/src/org/jetbrains/plugins/gradle/model/ExternalProject.java", "license": "apache-2.0", "size": 2194 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
237,840
@Test public void testClearTreeUpdateParentReferences() { final String[] path = {"Homer", "Ilias"}; final NodeKeyResolver<ImmutableNode> resolver = createResolver(); final InMemoryNodeModel model = new InMemoryNodeModel(ROOT_AUTHORS_TREE); final QueryResult<ImmutableNode> result ...
void function() { final String[] path = {"Homer", "Ilias"}; final NodeKeyResolver<ImmutableNode> resolver = createResolver(); final InMemoryNodeModel model = new InMemoryNodeModel(ROOT_AUTHORS_TREE); final QueryResult<ImmutableNode> result = QueryResult.createNodeResult(nodeForKey(model, nodePathWithEndNode(STR, path))...
/** * Tests whether references to parent nodes are updated correctly when clearing properties. */
Tests whether references to parent nodes are updated correctly when clearing properties
testClearTreeUpdateParentReferences
{ "repo_name": "apache/commons-configuration", "path": "src/test/java/org/apache/commons/configuration2/tree/TestInMemoryNodeModel.java", "license": "apache-2.0", "size": 38331 }
[ "java.util.Collections", "org.apache.commons.configuration2.tree.NodeStructureHelper", "org.easymock.EasyMock" ]
import java.util.Collections; import org.apache.commons.configuration2.tree.NodeStructureHelper; import org.easymock.EasyMock;
import java.util.*; import org.apache.commons.configuration2.tree.*; import org.easymock.*;
[ "java.util", "org.apache.commons", "org.easymock" ]
java.util; org.apache.commons; org.easymock;
2,153,002
public Observable<ServiceResponse<Page<DdosProtectionPlanInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<DdosProtectionPlanInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * Gets all DDoS protection plans in a subscription. * ServiceResponse<PageImpl<DdosProtectionPlanInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList...
Gets all DDoS protection plans in a subscription
listNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/DdosProtectionPlansInner.java", "license": "mit", "size": 66305 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
385,831
protected void insert(Pet pet) { Object[] objs = new Object[] { null, pet.getName(), new java.sql.Date(pet.getBirthDate().getTime()), pet.getType().getId(), pet.getOwner().getId(), new Timestamp(new java.util.Date().getTime()) }; super.update(objs); retrie...
void function(Pet pet) { Object[] objs = new Object[] { null, pet.getName(), new java.sql.Date(pet.getBirthDate().getTime()), pet.getType().getId(), pet.getOwner().getId(), new Timestamp(new java.util.Date().getTime()) }; super.update(objs); retrieveIdentity(pet); } } protected class PetUpdate extends SqlUpdate { prote...
/** * Method to insert a new <code>Pet</code>. * * @param pet * to insert */
Method to insert a new <code>Pet</code>
insert
{ "repo_name": "baboune/compass", "path": "samples/petclinic/src/java/org/compass/sample/petclinic/jdbc/AbstractJdbcClinic.java", "license": "apache-2.0", "size": 24301 }
[ "java.sql.Timestamp", "java.sql.Types", "java.util.Date", "javax.sql.DataSource", "org.compass.sample.petclinic.Pet", "org.springframework.jdbc.core.SqlParameter", "org.springframework.jdbc.object.SqlUpdate" ]
import java.sql.Timestamp; import java.sql.Types; import java.util.Date; import javax.sql.DataSource; import org.compass.sample.petclinic.Pet; import org.springframework.jdbc.core.SqlParameter; import org.springframework.jdbc.object.SqlUpdate;
import java.sql.*; import java.util.*; import javax.sql.*; import org.compass.sample.petclinic.*; import org.springframework.jdbc.core.*; import org.springframework.jdbc.object.*;
[ "java.sql", "java.util", "javax.sql", "org.compass.sample", "org.springframework.jdbc" ]
java.sql; java.util; javax.sql; org.compass.sample; org.springframework.jdbc;
1,770,848
private ResourceModel.DateField convertDateField(CrossrefCiteprocJSONModel.DateField dateField) { if (dateField != null) { ResourceModel.DateField resourceDate = new ResourceModel.DateField(); if (dateField.dateParts != null && dateField.dateParts.length > 0 && dateField.dateParts[0]...
ResourceModel.DateField function(CrossrefCiteprocJSONModel.DateField dateField) { if (dateField != null) { ResourceModel.DateField resourceDate = new ResourceModel.DateField(); if (dateField.dateParts != null && dateField.dateParts.length > 0 && dateField.dateParts[0].length > 0) { try { resourceDate.year = Integer.par...
/** * Convert a CiteProc date field to resource model date field * * @param dateField * @return */
Convert a CiteProc date field to resource model date field
convertDateField
{ "repo_name": "vivo-project/VIVO", "path": "api/src/main/java/org/vivoweb/webapp/createandlink/crossref/CrossrefResolverAPI.java", "license": "bsd-3-clause", "size": 13662 }
[ "org.vivoweb.webapp.createandlink.ResourceModel" ]
import org.vivoweb.webapp.createandlink.ResourceModel;
import org.vivoweb.webapp.createandlink.*;
[ "org.vivoweb.webapp" ]
org.vivoweb.webapp;
380,482
protected IdentifyAdminQuery populateListOfAllSpaces(List<IdentifyAdminQuery> admins) { IdentifyAdminQuery identifyAdmin = new IdentifyAdminQuery(); identifyAdmin.hasAnswered = Boolean.FALSE; space.write(identifyAdmin, SemiSpace.ONE_DAY); IdentifyAdminQuery iaq = new IdentifyAdminQu...
IdentifyAdminQuery function(List<IdentifyAdminQuery> admins) { IdentifyAdminQuery identifyAdmin = new IdentifyAdminQuery(); identifyAdmin.hasAnswered = Boolean.FALSE; space.write(identifyAdmin, SemiSpace.ONE_DAY); IdentifyAdminQuery iaq = new IdentifyAdminQuery(); iaq.hasAnswered = Boolean.TRUE; IdentifyAdminQuery mast...
/** * Protected as it is used every once in a while from periodic object reaper * @param admins List to fill with the admin processes found * @return List of identified SemiSpace admin classes */
Protected as it is used every once in a while from periodic object reaper
populateListOfAllSpaces
{ "repo_name": "nostra/semispace", "path": "semispace-main/src/main/java/org/semispace/admin/SemiSpaceAdmin.java", "license": "apache-2.0", "size": 14694 }
[ "java.util.List", "org.semispace.SemiSpace" ]
import java.util.List; import org.semispace.SemiSpace;
import java.util.*; import org.semispace.*;
[ "java.util", "org.semispace" ]
java.util; org.semispace;
1,281,098
public List<DXDataObject> getObjects() { return this.dataObjects; } }
List<DXDataObject> function() { return this.dataObjects; } }
/** * Lists all data objects in the specified folder. * * @return List containing a {@code DXDataObject} for each data object */
Lists all data objects in the specified folder
getObjects
{ "repo_name": "johnwallace123/dx-toolkit", "path": "src/java/src/main/java/com/dnanexus/DXContainer.java", "license": "apache-2.0", "size": 15032 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,957,199
public Collection<LBMonitor> listMonitor(String monitorId);
Collection<LBMonitor> function(String monitorId);
/** * List selected monitor by its ID. * @param monitorId Id of requested monitor */
List selected monitor by its ID
listMonitor
{ "repo_name": "onebsv1/floodlight", "path": "src/main/java/net/floodlightcontroller/loadbalancer/ILoadBalancerService.java", "license": "apache-2.0", "size": 6535 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,317,554
@Nullable public PrintServiceEndpoint post(@Nonnull final PrintServiceEndpoint newPrintServiceEndpoint) throws ClientException { return send(HttpMethod.POST, newPrintServiceEndpoint); }
PrintServiceEndpoint function(@Nonnull final PrintServiceEndpoint newPrintServiceEndpoint) throws ClientException { return send(HttpMethod.POST, newPrintServiceEndpoint); }
/** * Creates a PrintServiceEndpoint with a new object * * @param newPrintServiceEndpoint the new object to create * @return the created PrintServiceEndpoint * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Creates a PrintServiceEndpoint with a new object
post
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/PrintServiceEndpointRequest.java", "license": "mit", "size": 6213 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.PrintServiceEndpoint", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.PrintServiceEndpoint; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
2,279,677
//-------------------------------------------------------------------------- private AccessControlProvider getAccessControlProvider(String workspaceName) throws NoSuchWorkspaceException, RepositoryException { checkInitialized(); AccessControlProvider provider = acProviders.get(works...
AccessControlProvider function(String workspaceName) throws NoSuchWorkspaceException, RepositoryException { checkInitialized(); AccessControlProvider provider = acProviders.get(workspaceName); if (provider == null !provider.isLive()) { SystemSession systemSession = repository.getSystemSession(workspaceName); repository...
/** * Returns the access control provider for the specified * <code>workspaceName</code>. * * @param workspaceName Name of the workspace. * @return access control provider * @throws NoSuchWorkspaceException If no workspace with 'workspaceName' exists. * @throws RepositoryException ...
Returns the access control provider for the specified <code>workspaceName</code>
getAccessControlProvider
{ "repo_name": "dylanswartz/nakamura", "path": "bundles/server/src/main/java/org/apache/jackrabbit/core/DynamicSecurityManager.java", "license": "apache-2.0", "size": 26375 }
[ "javax.jcr.NoSuchWorkspaceException", "javax.jcr.RepositoryException", "org.apache.jackrabbit.core.config.WorkspaceConfig", "org.apache.jackrabbit.core.config.WorkspaceSecurityConfig", "org.apache.jackrabbit.core.security.authorization.AccessControlProvider" ]
import javax.jcr.NoSuchWorkspaceException; import javax.jcr.RepositoryException; import org.apache.jackrabbit.core.config.WorkspaceConfig; import org.apache.jackrabbit.core.config.WorkspaceSecurityConfig; import org.apache.jackrabbit.core.security.authorization.AccessControlProvider;
import javax.jcr.*; import org.apache.jackrabbit.core.config.*; import org.apache.jackrabbit.core.security.authorization.*;
[ "javax.jcr", "org.apache.jackrabbit" ]
javax.jcr; org.apache.jackrabbit;
2,262,574
public static StreamGraph generateStreamGraphWithDependencies( StreamExecutionEnvironment env, boolean clearTransformations) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException, NoSuchFieldException { Configuration mergedConfig = getEnvConfigWithDependencies(env); boolean execute...
static StreamGraph function( StreamExecutionEnvironment env, boolean clearTransformations) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException, NoSuchFieldException { Configuration mergedConfig = getEnvConfigWithDependencies(env); boolean executedInBatchMode = isExecuteInBatchMode(env, merge...
/** * Generate a {@link StreamGraph} for transformations maintained by current {@link StreamExecutionEnvironment}, and * reset the merged env configurations with dependencies to every {@link OneInputPythonFunctionOperator}. * It is an idempotent operation that can be call multiple times. Remember that only when n...
Generate a <code>StreamGraph</code> for transformations maintained by current <code>StreamExecutionEnvironment</code>, and reset the merged env configurations with dependencies to every <code>OneInputPythonFunctionOperator</code>. It is an idempotent operation that can be call multiple times. Remember that only when ne...
generateStreamGraphWithDependencies
{ "repo_name": "greghogan/flink", "path": "flink-python/src/main/java/org/apache/flink/python/util/PythonConfigUtil.java", "license": "apache-2.0", "size": 12179 }
[ "java.lang.reflect.Field", "java.lang.reflect.InvocationTargetException", "java.util.Collection", "java.util.List", "org.apache.flink.api.dag.Transformation", "org.apache.flink.configuration.Configuration", "org.apache.flink.configuration.PipelineOptions", "org.apache.flink.core.memory.ManagedMemoryUs...
import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.util.Collection; import java.util.List; import org.apache.flink.api.dag.Transformation; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.PipelineOptions; import org.apache.flink.core...
import java.lang.reflect.*; import java.util.*; import org.apache.flink.api.dag.*; import org.apache.flink.configuration.*; import org.apache.flink.core.memory.*; import org.apache.flink.python.*; import org.apache.flink.streaming.api.environment.*; import org.apache.flink.streaming.api.graph.*; import org.apache.flink...
[ "java.lang", "java.util", "org.apache.flink" ]
java.lang; java.util; org.apache.flink;
1,912,762
protected void authorizeSnippet(final SnippetAuthorizable snippet, final Authorizer authorizer, final AuthorizableLookup lookup, final RequestAction action, final boolean authorizeReferencedServices, final boolean authorizeTransitiveServices) { final Consumer<Authorizabl...
void function(final SnippetAuthorizable snippet, final Authorizer authorizer, final AuthorizableLookup lookup, final RequestAction action, final boolean authorizeReferencedServices, final boolean authorizeTransitiveServices) { final Consumer<Authorizable> authorize = authorizable -> authorizable.authorize(authorizer, a...
/** * Authorizes the specified Snippet with the specified request action. * * @param authorizer authorizer * @param lookup lookup * @param action action */
Authorizes the specified Snippet with the specified request action
authorizeSnippet
{ "repo_name": "apsaltis/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java", "license": "apache-2.0", "size": 59193 }
[ "java.util.function.Consumer", "org.apache.nifi.authorization.AuthorizableLookup", "org.apache.nifi.authorization.AuthorizeControllerServiceReference", "org.apache.nifi.authorization.Authorizer", "org.apache.nifi.authorization.RequestAction", "org.apache.nifi.authorization.SnippetAuthorizable", "org.apa...
import java.util.function.Consumer; import org.apache.nifi.authorization.AuthorizableLookup; import org.apache.nifi.authorization.AuthorizeControllerServiceReference; import org.apache.nifi.authorization.Authorizer; import org.apache.nifi.authorization.RequestAction; import org.apache.nifi.authorization.SnippetAuthoriz...
import java.util.function.*; import org.apache.nifi.authorization.*; import org.apache.nifi.authorization.resource.*; import org.apache.nifi.authorization.user.*;
[ "java.util", "org.apache.nifi" ]
java.util; org.apache.nifi;
1,182,748
public void test_copyOf_$CI() throws Exception { char[] result = Arrays.copyOf(charArray, arraySize * 2); int i = 0; for (; i < arraySize; i++) { assertEquals(i + 1, result[i]); } for (; i < result.length; i++) { assertEquals(0, result[i]); } ...
public void test_copyOf_$CI() throws Exception { char[] result = Arrays.copyOf(charArray, arraySize * 2); int i = 0; for (; i < arraySize; i++) { assertEquals(i + 1, result[i]); } for (; i < result.length; i++) { assertEquals(0, result[i]); } result = Arrays.copyOf(charArray, arraySize / 2); i = 0; for (; i < result.le...
/** * {@link java.util.Arrays#copyOf(char[], int) */
{@link java.util.Arrays#copyOf(char[], int)
test_copyOf_$CI
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java", "license": "gpl-2.0", "size": 207677 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
656,332
public Object next() { // for chained iterators if (chained) { if (it1 == null) { if (it2 == null) { throw new NoSuchElementException(); } if (it2.hasNext()) { return it2.next(); } ...
Object function() { if (chained) { if (it1 == null) { if (it2 == null) { throw new NoSuchElementException(); } if (it2.hasNext()) { return it2.next(); } it2 = null; next(); } else { if (it1.hasNext()) { return it1.next(); } it1 = null; next(); } } if (hasNext()) { return elements[i++]; } throw new NoSuchElementExceptio...
/** * Returns the next element. * * @return the next element * @throws NoSuchElementException if there is no next element */
Returns the next element
next
{ "repo_name": "ThangBK2009/android-source-browsing.platform--external--hsqldb", "path": "src/org/hsqldb/lib/WrapperIterator.java", "license": "bsd-3-clause", "size": 5826 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
550,991
@Test(timeout=60000) public void testWithEdits() throws Exception { final TableName tableName = TableName.valueOf("TestLogRollPeriodWithEdits"); final String family = "cf"; TEST_UTIL.createTable(tableName, family); try { HRegionServer server = TEST_UTIL.getRSForFirstRegionInTable(tableName); ...
@Test(timeout=60000) void function() throws Exception { final TableName tableName = TableName.valueOf(STR); final String family = "cf"; TEST_UTIL.createTable(tableName, family); try { HRegionServer server = TEST_UTIL.getRSForFirstRegionInTable(tableName); WAL log = server.getWAL(null); final Table table = new HTable(TE...
/** * Tests that the LogRoller perform the roll with some data in the log */
Tests that the LogRoller perform the roll with some data in the log
testWithEdits
{ "repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRollPeriod.java", "license": "apache-2.0", "size": 5589 }
[ "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.client.HTable", "org.apache.hadoop.hbase.client.Table", "org.apache.hadoop.hbase.regionserver.HRegionServer", "org.junit.Test" ]
import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.junit.Test;
import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.regionserver.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
1,036,565
private void buildStringRecursive(StringBuilder sb, int level) { // Get the names of all the definitions in this scope // and alphabetize them. String[] names = definitionStore.getAllNames().toArray(new String[0]); Arrays.sort(names); // Display a header identifying the ...
void function(StringBuilder sb, int level) { String[] names = definitionStore.getAllNames().toArray(new String[0]); Arrays.sort(names); indent(sb, level); sb.append(toStringHeader()); sb.append('\n'); for (String name : names) { indent(sb, level); sb.append(' '); sb.append(' '); sb.append(name.length() > 0 ? name : "\"...
/** * Used only for debugging, as part of {@link this.toString()}. */
Used only for debugging, as part of <code>this.toString()</code>
buildStringRecursive
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/compiler/internal/scopes/ASScopeBase.java", "license": "apache-2.0", "size": 19388 }
[ "java.util.Arrays", "org.apache.flex.compiler.definitions.IDefinition", "org.apache.flex.compiler.definitions.IScopedDefinition", "org.apache.flex.compiler.internal.definitions.DefinitionBase", "org.apache.flex.compiler.scopes.IDefinitionSet" ]
import java.util.Arrays; import org.apache.flex.compiler.definitions.IDefinition; import org.apache.flex.compiler.definitions.IScopedDefinition; import org.apache.flex.compiler.internal.definitions.DefinitionBase; import org.apache.flex.compiler.scopes.IDefinitionSet;
import java.util.*; import org.apache.flex.compiler.definitions.*; import org.apache.flex.compiler.internal.definitions.*; import org.apache.flex.compiler.scopes.*;
[ "java.util", "org.apache.flex" ]
java.util; org.apache.flex;
1,761,327
public void waitTableDisabled(byte[] table, long timeoutMillis) throws InterruptedException, IOException { waitTableDisabled(TableName.valueOf(table), timeoutMillis); }
void function(byte[] table, long timeoutMillis) throws InterruptedException, IOException { waitTableDisabled(TableName.valueOf(table), timeoutMillis); }
/** * Waits for a table to be 'disabled'. Disabled means that table is set as 'disabled' * @param table Table to wait on. * @param timeoutMillis Time to wait on it being marked disabled. * @throws InterruptedException * @throws IOException */
Waits for a table to be 'disabled'. Disabled means that table is set as 'disabled'
waitTableDisabled
{ "repo_name": "amyvmiwei/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 143059 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
898,549
private LinkWeight weight(List<Constraint> constraints) { return new MockTeConstraintBasedLinkWeight(constraints); }
LinkWeight function(List<Constraint> constraints) { return new MockTeConstraintBasedLinkWeight(constraints); }
/** * Returns an edge-weight capable of evaluating links on the basis of the * specified constraints. * * @param constraints path constraints * @return edge-weight function */
Returns an edge-weight capable of evaluating links on the basis of the specified constraints
weight
{ "repo_name": "paradisecr/ONOS-OXP", "path": "apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PathComputationTest.java", "license": "apache-2.0", "size": 50156 }
[ "java.util.List", "org.onosproject.net.intent.Constraint", "org.onosproject.net.topology.LinkWeight" ]
import java.util.List; import org.onosproject.net.intent.Constraint; import org.onosproject.net.topology.LinkWeight;
import java.util.*; import org.onosproject.net.intent.*; import org.onosproject.net.topology.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
468,126
public void setCookieHandler(CookieHandler cookieHandler) { this.cookieHandler = cookieHandler; }
void function(CookieHandler cookieHandler) { this.cookieHandler = cookieHandler; }
/** * Configure a cookie handler to maintain a HTTP session */
Configure a cookie handler to maintain a HTTP session
setCookieHandler
{ "repo_name": "pax95/camel", "path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java", "license": "apache-2.0", "size": 52446 }
[ "org.apache.camel.http.base.cookie.CookieHandler" ]
import org.apache.camel.http.base.cookie.CookieHandler;
import org.apache.camel.http.base.cookie.*;
[ "org.apache.camel" ]
org.apache.camel;
1,626,280
void addMonitor(IConnectionMonitor monitor);
void addMonitor(IConnectionMonitor monitor);
/** * Adds a connection monitor which monitors the availability of the * underlying JMS connections. * * @param monitor * a connection monitor. */
Adds a connection monitor which monitors the availability of the underlying JMS connections
addMonitor
{ "repo_name": "ControlSystemStudio/org.csstudio.iter", "path": "plugins/org.csstudio.iter.utility.jms/src/org/csstudio/iter/utility/jms/sharedconnection/IMessageListenerSession.java", "license": "epl-1.0", "size": 2823 }
[ "org.csstudio.iter.utility.jms.IConnectionMonitor" ]
import org.csstudio.iter.utility.jms.IConnectionMonitor;
import org.csstudio.iter.utility.jms.*;
[ "org.csstudio.iter" ]
org.csstudio.iter;
1,900,124
public void testInvokeAll1() throws Exception { final ExecutorService e = new ScheduledThreadPoolExecutor(2); try (PoolCleaner cleaner = cleaner(e)) { try { e.invokeAll(null); shouldThrow(); } catch (NullPointerException success) {} } ...
void function() throws Exception { final ExecutorService e = new ScheduledThreadPoolExecutor(2); try (PoolCleaner cleaner = cleaner(e)) { try { e.invokeAll(null); shouldThrow(); } catch (NullPointerException success) {} } }
/** * invokeAll(null) throws NPE */
invokeAll(null) throws NPE
testInvokeAll1
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/ScheduledExecutorTest.java", "license": "gpl-2.0", "size": 54017 }
[ "java.util.concurrent.ExecutorService", "java.util.concurrent.ScheduledThreadPoolExecutor" ]
import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
151,520
public static void times( AbstractComplex2By2 m, Complex2 v, Complex2 w ) { if ( v == w ) { double wARe = m.aRe*v.aRe-m.aIm*v.aIm + m.bRe*v.bRe-m.bIm*v.bIm; double wAIm = m.aRe*v.aIm+m.aIm*v.aRe + m.bRe*v.bIm+m.bIm*v.bRe; double wBRe = m.cRe*v.aRe-m.cIm*v.aIm + m.dRe*v.bRe-m.dIm*v.bIm; double ...
static void function( AbstractComplex2By2 m, Complex2 v, Complex2 w ) { if ( v == w ) { double wARe = m.aRe*v.aRe-m.aIm*v.aIm + m.bRe*v.bRe-m.bIm*v.bIm; double wAIm = m.aRe*v.aIm+m.aIm*v.aRe + m.bRe*v.bIm+m.bIm*v.bRe; double wBRe = m.cRe*v.aRe-m.cIm*v.aIm + m.dRe*v.bRe-m.dIm*v.bIm; double wBIm = m.cRe*v.aIm+m.cIm*v.aRe...
/** * Multiplies <code>m</code> with <code>v</code> and stores the result * in <code>w</code>. */
Multiplies <code>m</code> with <code>v</code> and stores the result in <code>w</code>
times
{ "repo_name": "jupsal/schmies-jTEM", "path": "libUnzipped/de/jtem/mfc/matrix/AbstractComplex2By2.java", "license": "bsd-2-clause", "size": 33984 }
[ "de.jtem.mfc.vector.Complex2" ]
import de.jtem.mfc.vector.Complex2;
import de.jtem.mfc.vector.*;
[ "de.jtem.mfc" ]
de.jtem.mfc;
2,377,025
public Collection<Collector> getCollectors() { return collectorMap.values(); }
Collection<Collector> function() { return collectorMap.values(); }
/** * Get all registered collectors. * * @return collection of all {@code Collector} implementation instances */
Get all registered collectors
getCollectors
{ "repo_name": "markuslamm/io.thesis", "path": "collector-client/collector-client-app/src/main/java/io/thesis/collector/client/CollectorRegistry.java", "license": "apache-2.0", "size": 1255 }
[ "io.thesis.collector.commons.Collector", "java.util.Collection" ]
import io.thesis.collector.commons.Collector; import java.util.Collection;
import io.thesis.collector.commons.*; import java.util.*;
[ "io.thesis.collector", "java.util" ]
io.thesis.collector; java.util;
2,872,307
public AdvancementsMessage createAdvancementsMessage( Map<NamespacedKey, Advancement> advancements, boolean clear, List<NamespacedKey> remove, Player player) { return new AdvancementsMessage(clear, advancements, remove); }
AdvancementsMessage function( Map<NamespacedKey, Advancement> advancements, boolean clear, List<NamespacedKey> remove, Player player) { return new AdvancementsMessage(clear, advancements, remove); }
/** * Creates an {@link AdvancementsMessage} containing a given list of advancements, along with * some extra actions. * * <p>This does not affect the server's advancement registry. * * @param advancements the advancements to add to the player's perspective. * @param clear whet...
Creates an <code>AdvancementsMessage</code> containing a given list of advancements, along with some extra actions. This does not affect the server's advancement registry
createAdvancementsMessage
{ "repo_name": "GlowstonePlusPlus/GlowstonePlusPlus", "path": "src/main/java/net/glowstone/GlowServer.java", "license": "mit", "size": 107961 }
[ "java.util.List", "java.util.Map", "net.glowstone.net.message.play.player.AdvancementsMessage", "org.bukkit.NamespacedKey", "org.bukkit.advancement.Advancement", "org.bukkit.entity.Player" ]
import java.util.List; import java.util.Map; import net.glowstone.net.message.play.player.AdvancementsMessage; import org.bukkit.NamespacedKey; import org.bukkit.advancement.Advancement; import org.bukkit.entity.Player;
import java.util.*; import net.glowstone.net.message.play.player.*; import org.bukkit.*; import org.bukkit.advancement.*; import org.bukkit.entity.*;
[ "java.util", "net.glowstone.net", "org.bukkit", "org.bukkit.advancement", "org.bukkit.entity" ]
java.util; net.glowstone.net; org.bukkit; org.bukkit.advancement; org.bukkit.entity;
911,333
public static void assertExpectedOutputNotContains(String expectedString, String x) { if (x.contains(expectedString)) { fail("expected '" + expectedString + "' found in '" + x + "'"); } }
static void function(String expectedString, String x) { if (x.contains(expectedString)) { fail(STR + expectedString + STR + x + "'"); } }
/** * Fails if expectedString is found in x * * @param expectedString * string searched for in x * @param x * what can be searched. */
Fails if expectedString is found in x
assertExpectedOutputNotContains
{ "repo_name": "lbeurerkellner/n4js", "path": "testhelpers/org.eclipse.n4js.tests.helper/src/org/eclipse/n4js/test/helper/hlc/N4CliHelper.java", "license": "epl-1.0", "size": 9755 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,411,697