method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public JMeterGUIComponent getCurrentGui() { try { updateCurrentNode(); TestElement curNode = treeListener.getCurrentNode().getTestElement(); JMeterGUIComponent comp = getGui(curNode); comp.clearGui(); log.debug("Updating gui to new node"); ...
JMeterGUIComponent function() { try { updateCurrentNode(); TestElement curNode = treeListener.getCurrentNode().getTestElement(); JMeterGUIComponent comp = getGui(curNode); comp.clearGui(); log.debug(STR); comp.configure(curNode); currentNodeUpdated = false; return comp; } catch (Exception e) { log.error(STR, e); return...
/** * Convenience method for grabbing the gui for the current node. * * @return the GUI component associated with the currently selected node */
Convenience method for grabbing the gui for the current node
getCurrentGui
{ "repo_name": "yuyupapa/OpenSource", "path": "apache-jmeter-3.0/src/core/org/apache/jmeter/gui/GuiPackage.java", "license": "apache-2.0", "size": 29555 }
[ "org.apache.jmeter.testelement.TestElement" ]
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.testelement.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
1,583,327
protected static void getExplicitProperties(List<InternalEventPropDescriptor> result, Class clazz, ConfigurationEventTypeLegacy legacyConfig) { for (Configura...
static void function(List<InternalEventPropDescriptor> result, Class clazz, ConfigurationEventTypeLegacy legacyConfig) { for (ConfigurationEventTypeLegacy.LegacyFieldPropDesc desc : legacyConfig.getFieldProperties()) { result.add(makeDesc(clazz, desc)); } for (ConfigurationEventTypeLegacy.LegacyMethodPropDesc desc : le...
/** * Populates explicitly-defined properties into the result list. * @param result is the resulting list of event property descriptors * @param clazz is the class to introspect * @param legacyConfig supplies specification of explicit methods and fields to expose */
Populates explicitly-defined properties into the result list
getExplicitProperties
{ "repo_name": "b-cuts/esper", "path": "esper/src/main/java/com/espertech/esper/event/bean/PropertyListBuilderExplicit.java", "license": "gpl-2.0", "size": 6352 }
[ "com.espertech.esper.client.ConfigurationEventTypeLegacy", "com.espertech.esper.event.bean.InternalEventPropDescriptor", "java.util.List" ]
import com.espertech.esper.client.ConfigurationEventTypeLegacy; import com.espertech.esper.event.bean.InternalEventPropDescriptor; import java.util.List;
import com.espertech.esper.client.*; import com.espertech.esper.event.bean.*; import java.util.*;
[ "com.espertech.esper", "java.util" ]
com.espertech.esper; java.util;
2,150,951
private void initComponents() throws CryptoException { // Are there any certificates to view? if (m_certs.length == 0) { m_iSelCert = -1; } else { m_iSelCert = 0; }
void function() throws CryptoException { if (m_certs.length == 0) { m_iSelCert = -1; } else { m_iSelCert = 0; }
/** * Initialize the dialog's GUI components. * * @throws CryptoException A problem was encountered getting the certificates' details */
Initialize the dialog's GUI components
initComponents
{ "repo_name": "venator85/portecle", "path": "src/main/net/sf/portecle/DViewCertificate.java", "license": "gpl-2.0", "size": 25622 }
[ "net.sf.portecle.crypto.CryptoException" ]
import net.sf.portecle.crypto.CryptoException;
import net.sf.portecle.crypto.*;
[ "net.sf.portecle" ]
net.sf.portecle;
159,343
static Table addTableConstraintDefinitions(Session session, Table table, HsqlArrayList tempConstraints, HsqlArrayList constraintList) { Constraint c = (Constraint) tempConstraints.get(0); String namePart = c.getName() == null ? null ...
static Table addTableConstraintDefinitions(Session session, Table table, HsqlArrayList tempConstraints, HsqlArrayList constraintList) { Constraint c = (Constraint) tempConstraints.get(0); String namePart = c.getName() == null ? null : c.getName().name; HsqlName indexName = session.database.nameManager.newAutoName("IDX"...
/** * Adds a list of temp constraints to a new table */
Adds a list of temp constraints to a new table
addTableConstraintDefinitions
{ "repo_name": "ifcharming/original2.0", "path": "src/hsqldb19b3/org/hsqldb_voltpatches/ParserDDL.java", "license": "gpl-3.0", "size": 145138 }
[ "org.hsqldb_voltpatches.HsqlNameManager", "org.hsqldb_voltpatches.index.Index", "org.hsqldb_voltpatches.lib.HsqlArrayList" ]
import org.hsqldb_voltpatches.HsqlNameManager; import org.hsqldb_voltpatches.index.Index; import org.hsqldb_voltpatches.lib.HsqlArrayList;
import org.hsqldb_voltpatches.*; import org.hsqldb_voltpatches.index.*; import org.hsqldb_voltpatches.lib.*;
[ "org.hsqldb_voltpatches", "org.hsqldb_voltpatches.index", "org.hsqldb_voltpatches.lib" ]
org.hsqldb_voltpatches; org.hsqldb_voltpatches.index; org.hsqldb_voltpatches.lib;
612,105
public Date convertFromTimeZone1StringToServerDate (SimpleDateFormat ndf, String tz1string, TimeZone tz1){ Date serverDate= null; try { ndf.setTimeZone(tz1); serverDate= ndf.parse(tz1string); } catch(Exception e){ e.printStackTrace(); } return serverDate; }
Date function (SimpleDateFormat ndf, String tz1string, TimeZone tz1){ Date serverDate= null; try { ndf.setTimeZone(tz1); serverDate= ndf.parse(tz1string); } catch(Exception e){ e.printStackTrace(); } return serverDate; }
/** * Convert a String representation of date and time in the client TimeZone * to Date representation of date and time in server TimeZone * before saving to DB. * tz1 is the client timezone, tz2 is the server timezone */
Convert a String representation of date and time in the client TimeZone to Date representation of date and time in server TimeZone before saving to DB. tz1 is the client timezone, tz2 is the server timezone
convertFromTimeZone1StringToServerDate
{ "repo_name": "harfalm/Sakai-10.1", "path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/util/TimeUtil.java", "license": "apache-2.0", "size": 4466 }
[ "java.text.SimpleDateFormat", "java.util.Date", "java.util.TimeZone" ]
import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,648,058
@Operation(opcode = Opcode.WRITE_BARRIERED) public static native void writeWord(Object object, int offset, WordBase val, LocationIdentity locationIdentity);
@Operation(opcode = Opcode.WRITE_BARRIERED) static native void function(Object object, int offset, WordBase val, LocationIdentity locationIdentity);
/** * Writes the memory at address {@code (object + offset)}. The offset is in bytes. * * @param object the base object for the memory access * @param offset the signed offset for the memory access * @param locationIdentity the identity of the write * @param val the value to be written to ...
Writes the memory at address (object + offset). The offset is in bytes
writeWord
{ "repo_name": "zapster/graal-core", "path": "graal/com.oracle.graal.word/src/com/oracle/graal/word/BarrieredAccess.java", "license": "gpl-2.0", "size": 43991 }
[ "com.oracle.graal.compiler.common.LocationIdentity", "com.oracle.graal.word.Word" ]
import com.oracle.graal.compiler.common.LocationIdentity; import com.oracle.graal.word.Word;
import com.oracle.graal.compiler.common.*; import com.oracle.graal.word.*;
[ "com.oracle.graal" ]
com.oracle.graal;
1,512,671
static MethodHandle lookupArrayLoad(Class<?> receiverClass) { if (receiverClass.isArray()) { return MethodHandles.arrayElementGetter(receiverClass); } else if (Map.class.isAssignableFrom(receiverClass)) { // maps allow access like mymap[key] return MAP_GET; ...
static MethodHandle lookupArrayLoad(Class<?> receiverClass) { if (receiverClass.isArray()) { return MethodHandles.arrayElementGetter(receiverClass); } else if (Map.class.isAssignableFrom(receiverClass)) { return MAP_GET; } else if (List.class.isAssignableFrom(receiverClass)) { return LIST_GET; } throw new IllegalArgume...
/** * Returns a method handle to do an array load. * @param receiverClass Class of the array to load the value from * @return a MethodHandle that accepts the receiver as first argument, the index as second argument. * It returns the loaded value. */
Returns a method handle to do an array load
lookupArrayLoad
{ "repo_name": "ern/elasticsearch", "path": "modules/lang-painless/src/main/java/org/elasticsearch/painless/Def.java", "license": "apache-2.0", "size": 64157 }
[ "java.lang.invoke.MethodHandle", "java.lang.invoke.MethodHandles", "java.lang.invoke.MethodType", "java.util.Collections", "java.util.Iterator", "java.util.List", "java.util.Map", "java.util.function.Function", "java.util.stream.Collectors", "java.util.stream.Stream" ]
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream;
import java.lang.invoke.*; import java.util.*; import java.util.function.*; import java.util.stream.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,848,105
public static String readFileAsStringV2(String fileName) throws java.io.IOException { return readFileAsStringV2(new File(fileName)); }
static String function(String fileName) throws java.io.IOException { return readFileAsStringV2(new File(fileName)); }
/** * from http://www.cs.helsinki.fi/group/converge/ * webcore.utilities.FileUtils * * @param fileName * @return * @throws java.io.IOException */
from HREF webcore.utilities.FileUtils
readFileAsStringV2
{ "repo_name": "qingtian/tb-diamond", "path": "diamond-utils/src/main/java/com/taobao/diamond/utils/ZFileUtil.java", "license": "gpl-2.0", "size": 13522 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
527,605
private Node renameProperty(Node propertyName) { checkArgument(propertyName.isString()); if (!renameProperties) { return propertyName; } Node call = IR.call( IR.name(NodeUtil.JSC_PROPERTY_NAME_FN).srcref(propertyName), propertyName); call.srcref(propertyName); call.putBoo...
Node function(Node propertyName) { checkArgument(propertyName.isString()); if (!renameProperties) { return propertyName; } Node call = IR.call( IR.name(NodeUtil.JSC_PROPERTY_NAME_FN).srcref(propertyName), propertyName); call.srcref(propertyName); call.putBooleanProp(Node.FREE_CALL, true); call.putBooleanProp(Node.IS_CO...
/** * Wraps a property string in a JSCompiler_renameProperty call. * * <p>Should only be called in phases running before {@link RenameProperties}, * if such a pass is even used (see {@link #renameProperties}). */
Wraps a property string in a JSCompiler_renameProperty call. Should only be called in phases running before <code>RenameProperties</code>, if such a pass is even used (see <code>#renameProperties</code>)
renameProperty
{ "repo_name": "tiobe/closure-compiler", "path": "src/com/google/javascript/jscomp/DartSuperAccessorsPass.java", "license": "apache-2.0", "size": 6876 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
66
@Override public OutputStream getOutputStream() { baos = new ByteArrayOutputStream(); return baos; }
OutputStream function() { baos = new ByteArrayOutputStream(); return baos; }
/** * Get the OutputStream to write to. * * @return An OutputStream * @since 1.0 */
Get the OutputStream to write to
getOutputStream
{ "repo_name": "apache/commons-email", "path": "src/main/java/org/apache/commons/mail/ByteArrayDataSource.java", "license": "apache-2.0", "size": 6261 }
[ "java.io.ByteArrayOutputStream", "java.io.OutputStream" ]
import java.io.ByteArrayOutputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,857,539
public List<String> getReadableFileExtensions() throws OpenStegoException { if(readFormats != null) { return readFormats; } String format = null; String[] formats = null; List<String> formatList = new ArrayList<String>(); formats =...
List<String> function() throws OpenStegoException { if(readFormats != null) { return readFormats; } String format = null; String[] formats = null; List<String> formatList = new ArrayList<String>(); formats = ImageIO.getReaderFormatNames(); for(int i = 0; i < formats.length; i++) { format = formats[i].toLowerCase(); if(...
/** * Method to get the list of supported file extensions for reading * * @return List of supported file extensions for reading * @throws OpenStegoException */
Method to get the list of supported file extensions for reading
getReadableFileExtensions
{ "repo_name": "seglo/openstego", "path": "src/net/sourceforge/openstego/plugin/template/dct/DCTPluginTemplate.java", "license": "gpl-2.0", "size": 4600 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "javax.imageio.ImageIO", "net.sourceforge.openstego.OpenStegoException" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.imageio.ImageIO; import net.sourceforge.openstego.OpenStegoException;
import java.util.*; import javax.imageio.*; import net.sourceforge.openstego.*;
[ "java.util", "javax.imageio", "net.sourceforge.openstego" ]
java.util; javax.imageio; net.sourceforge.openstego;
759,931
//Esta parte del codigo muestra el logo de la empresa PropCapos prop = new PropCapos(); File jarPath=new File(DbCapos.class.getProtectionDomain().getCodeSource().getLocation().getPath()); String propertiesPath=jarPath.getParentFile().getAbsolutePath(); Image image = new Image("file:"...
PropCapos prop = new PropCapos(); File jarPath=new File(DbCapos.class.getProtectionDomain().getCodeSource().getLocation().getPath()); String propertiesPath=jarPath.getParentFile().getAbsolutePath(); Image image = new Image("file:"+propertiesPath+"/"+prop.getStore_logo(), 256, 100, false, false); imgLogoCom.setImage(ima...
/** * Initializes the controller class. */
Initializes the controller class
initialize
{ "repo_name": "antoniotorres/CAPOS", "path": "src/main/loginController.java", "license": "gpl-3.0", "size": 1879 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,332,033
private void testSecondSnapshot() throws Exception { testLog.info("testSecondSnapshot starting"); expSnapshotState.add(payload3); expSnapshotState.add(payload4); expSnapshotState.add(payload5); expSnapshotState.add(payload6); // Delay the CaptureSnapshot message to ...
void function() throws Exception { testLog.info(STR); expSnapshotState.add(payload3); expSnapshotState.add(payload4); expSnapshotState.add(payload5); expSnapshotState.add(payload6); leaderActor.underlyingActor().startDropMessages(CaptureSnapshotReply.class); payload7 = sendPayloadData(leaderActor, "seven"); CaptureSnap...
/** * Send one more payload to trigger another snapshot. In this scenario, we delay the snapshot until * consensus occurs and the leader applies the state. * @throws Exception */
Send one more payload to trigger another snapshot. In this scenario, we delay the snapshot until consensus occurs and the leader applies the state
testSecondSnapshot
{ "repo_name": "Sushma7785/OpenDayLight-Load-Balancer", "path": "opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicationAndSnapshotsIntegrationTest.java", "license": "epl-1.0", "size": 24462 }
[ "java.util.List", "org.junit.Assert", "org.opendaylight.controller.cluster.raft.base.messages.ApplyState", "org.opendaylight.controller.cluster.raft.base.messages.CaptureSnapshotReply", "org.opendaylight.controller.cluster.raft.messages.AppendEntries", "org.opendaylight.controller.cluster.raft.messages.Ap...
import java.util.List; import org.junit.Assert; import org.opendaylight.controller.cluster.raft.base.messages.ApplyState; import org.opendaylight.controller.cluster.raft.base.messages.CaptureSnapshotReply; import org.opendaylight.controller.cluster.raft.messages.AppendEntries; import org.opendaylight.controller.cluster...
import java.util.*; import org.junit.*; import org.opendaylight.controller.cluster.raft.base.messages.*; import org.opendaylight.controller.cluster.raft.messages.*; import org.opendaylight.controller.cluster.raft.utils.*;
[ "java.util", "org.junit", "org.opendaylight.controller" ]
java.util; org.junit; org.opendaylight.controller;
889,767
public TimeValue getAsTime(String setting, TimeValue defaultValue) { return parseTimeValue(get(setting), defaultValue, setting); }
TimeValue function(String setting, TimeValue defaultValue) { return parseTimeValue(get(setting), defaultValue, setting); }
/** * Returns the setting value (as time) associated with the setting key. If it does not exists, * returns the default value provided. */
Returns the setting value (as time) associated with the setting key. If it does not exists, returns the default value provided
getAsTime
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/settings/Settings.java", "license": "apache-2.0", "size": 54918 }
[ "org.elasticsearch.common.unit.TimeValue" ]
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,225,001
public List<ImageData> getFailures() { List<ImageData> failures = new ArrayList<ImageData>(); Map<Boolean, List<ImageData>> e; Iterator<Map<Boolean, List<ImageData>>> i = result.values().iterator(); while (i.hasNext()) { e = i.next(); failures.addAll(e.get(Boolean.valueOf(false))); } return fa...
List<ImageData> function() { List<ImageData> failures = new ArrayList<ImageData>(); Map<Boolean, List<ImageData>> e; Iterator<Map<Boolean, List<ImageData>>> i = result.values().iterator(); while (i.hasNext()) { e = i.next(); failures.addAll(e.get(Boolean.valueOf(false))); } return failures; } public SecurityContext get...
/** * Returns the images that failed to be moved or deleted. * * @return See above. */
Returns the images that failed to be moved or deleted
getFailures
{ "repo_name": "simleo/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/model/MIFResultObject.java", "license": "gpl-2.0", "size": 4470 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,270,927
protected static XMLParameter getServiceSection(CommonModel model, Object stationKey) { Vector classes = model.getClassKeys(); //creating set of service time distributions XMLParameter[] distrParams = new XMLParameter[classes.size()]; Object currentClass; for (int i = 0; i < distrParams.length; i++) { c...
static XMLParameter function(CommonModel model, Object stationKey) { Vector classes = model.getClassKeys(); XMLParameter[] distrParams = new XMLParameter[classes.size()]; Object currentClass; for (int i = 0; i < distrParams.length; i++) { currentClass = classes.get(i); Object serviceDistribution = model.getServiceTimeD...
/** * Returns a service section rapresentation in XMLParameter format * @param model model data structure * @param stationKey search's key for current station * @return service section rapresentation in XMLParameter format * Author: Bertoli Marco */
Returns a service section rapresentation in XMLParameter format
getServiceSection
{ "repo_name": "HOMlab/QN-ACTR-Release", "path": "QN-ACTR Java/src/jmt/gui/common/xml/XMLWriter.java", "license": "lgpl-3.0", "size": 47785 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,479,449
public ExpressRoutePeeringState state() { return this.state; }
ExpressRoutePeeringState function() { return this.state; }
/** * Get the peering state. Possible values include: 'Disabled', 'Enabled'. * * @return the state value */
Get the peering state. Possible values include: 'Disabled', 'Enabled'
state
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/network/v2019_08_01/implementation/ExpressRouteCrossConnectionPeeringInner.java", "license": "mit", "size": 12184 }
[ "com.microsoft.azure.management.network.v2019_08_01.ExpressRoutePeeringState" ]
import com.microsoft.azure.management.network.v2019_08_01.ExpressRoutePeeringState;
import com.microsoft.azure.management.network.v2019_08_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,333,295
public void testEqualsAndHashcode() throws IOException { for (int runs = 0; runs < NUMBER_OF_TESTBUILDERS; runs++) { checkEqualsAndHashCode(createTestItem(), this::copy, this::mutate); } }
void function() throws IOException { for (int runs = 0; runs < NUMBER_OF_TESTBUILDERS; runs++) { checkEqualsAndHashCode(createTestItem(), this::copy, this::mutate); } }
/** * Test equality and hashCode properties */
Test equality and hashCode properties
testEqualsAndHashcode
{ "repo_name": "henakamaMSFT/elasticsearch", "path": "core/src/test/java/org/elasticsearch/search/sort/AbstractSortTestCase.java", "license": "apache-2.0", "size": 12141 }
[ "java.io.IOException", "org.elasticsearch.test.EqualsHashCodeTestUtils" ]
import java.io.IOException; import org.elasticsearch.test.EqualsHashCodeTestUtils;
import java.io.*; import org.elasticsearch.test.*;
[ "java.io", "org.elasticsearch.test" ]
java.io; org.elasticsearch.test;
639,733
public Neighbor<double[], E> nearest(double[] q, double recall, int T) { if (recall > 1 || recall < 0) { throw new IllegalArgumentException("Invalid recall: " + recall); } double alpha = 1 - Math.pow(1 - recall, 1.0 / hash.size()); IntArrayList candidates = new IntArray...
Neighbor<double[], E> function(double[] q, double recall, int T) { if (recall > 1 recall < 0) { throw new IllegalArgumentException(STR + recall); } double alpha = 1 - Math.pow(1 - recall, 1.0 / hash.size()); IntArrayList candidates = new IntArrayList(); for (int i = 0; i < hash.size(); i++) { IntArrayList buckets = mod...
/** * Returns the approximate nearest neighbor. A posteriori multiple probe * model has to be trained already. * @param q the query object. * @param recall the expected recall rate. * @param T the maximum number of probes. */
Returns the approximate nearest neighbor. A posteriori multiple probe model has to be trained already
nearest
{ "repo_name": "dublinio/smile", "path": "Smile/src/main/java/smile/neighbor/MPLSH.java", "license": "apache-2.0", "size": 33511 }
[ "java.util.ArrayList", "java.util.Arrays" ]
import java.util.ArrayList; import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,116,790
public default GraphTraversal<S, Vertex> addV(final Traversal<?, String> vertexLabelTraversal) { if (null == vertexLabelTraversal) throw new IllegalArgumentException("vertexLabelTraversal cannot be null"); this.asAdmin().getBytecode().addStep(Symbols.addV, vertexLabelTraversal); return this....
default GraphTraversal<S, Vertex> function(final Traversal<?, String> vertexLabelTraversal) { if (null == vertexLabelTraversal) throw new IllegalArgumentException(STR); this.asAdmin().getBytecode().addStep(Symbols.addV, vertexLabelTraversal); return this.asAdmin().addStep(new AddVertexStep<>(this.asAdmin(), vertexLabel...
/** * Adds a {@link Vertex} with a vertex label determined by a {@link Traversal}. * * @return the traversal with the {@link AddVertexStep} added * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#addvertex-step" target="_blank">Reference Documentation - AddVertex Step</a...
Adds a <code>Vertex</code> with a vertex label determined by a <code>Traversal</code>
addV
{ "repo_name": "apache/tinkerpop", "path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java", "license": "apache-2.0", "size": 186459 }
[ "org.apache.tinkerpop.gremlin.process.traversal.Traversal", "org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep", "org.apache.tinkerpop.gremlin.structure.Vertex" ]
import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStep; import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.process.traversal.*; import org.apache.tinkerpop.gremlin.process.traversal.step.map.*; import org.apache.tinkerpop.gremlin.structure.*;
[ "org.apache.tinkerpop" ]
org.apache.tinkerpop;
2,632,256
public BoxSharedLinkRequestObject setPermissions(final BoxSharedLinkPermissions permissionsEntity) { put(BoxSharedLink.FIELD_PERMISSIONS, permissionsEntity); return this; }
BoxSharedLinkRequestObject function(final BoxSharedLinkPermissions permissionsEntity) { put(BoxSharedLink.FIELD_PERMISSIONS, permissionsEntity); return this; }
/** * Set permissions. * * @param permissionsEntity * permissions * @return */
Set permissions
setPermissions
{ "repo_name": "ElectroJunkie/box-java-sdk-v2-master", "path": "BoxJavaLibraryV2/src/com/box/boxjavalibv2/requests/requestobjects/BoxSharedLinkRequestObject.java", "license": "apache-2.0", "size": 2989 }
[ "com.box.boxjavalibv2.dao.BoxSharedLink", "com.box.boxjavalibv2.dao.BoxSharedLinkPermissions" ]
import com.box.boxjavalibv2.dao.BoxSharedLink; import com.box.boxjavalibv2.dao.BoxSharedLinkPermissions;
import com.box.boxjavalibv2.dao.*;
[ "com.box.boxjavalibv2" ]
com.box.boxjavalibv2;
90,531
public void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService) { this.originEntryGroupService = originEntryGroupService; }
void function(OriginEntryGroupService originEntryGroupService) { this.originEntryGroupService = originEntryGroupService; }
/** * Sets the originEntryGroupService attribute value. * * @param originEntryGroupService The originEntryGroupService to set. */
Sets the originEntryGroupService attribute value
setOriginEntryGroupService
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/ld/batch/service/impl/LaborPosterServiceImpl.java", "license": "agpl-3.0", "size": 27221 }
[ "org.kuali.kfs.gl.service.OriginEntryGroupService" ]
import org.kuali.kfs.gl.service.OriginEntryGroupService;
import org.kuali.kfs.gl.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
960,227
private void writeSkip(int skip, PacketBuilder pb) { if (skip > -1) { int type = 0; if (skip != 0) { if (skip < 32) { type = 1; } else if (skip < 256) { type = 2; } else if (skip < 2048) { ...
void function(int skip, PacketBuilder pb) { if (skip > -1) { int type = 0; if (skip != 0) { if (skip < 32) { type = 1; } else if (skip < 256) { type = 2; } else if (skip < 2048) { type = 3; } else { throw new IllegalArgumentException(STR); } } pb.putBits(1, 0); pb.putBits(2, type); switch (type) { case 1: pb.putBits(5,...
/** * Writes an amount of loops to skip. * * @param skip The amount of loops to skip. * @param pb The message factory to write with. */
Writes an amount of loops to skip
writeSkip
{ "repo_name": "Anadyr/OSRSe", "path": "src/Servers/Game/org/osrse/game/logic/protocol/ComplexUpdate.java", "license": "mit", "size": 18830 }
[ "org.osrse.network.PacketBuilder" ]
import org.osrse.network.PacketBuilder;
import org.osrse.network.*;
[ "org.osrse.network" ]
org.osrse.network;
2,742,687
public static Reader newReader(ReadableByteChannel ch, String csName) { checkNotNull(csName, "csName"); return newReader(ch, Charset.forName(csName).newDecoder(), -1); }
static Reader function(ReadableByteChannel ch, String csName) { checkNotNull(csName, STR); return newReader(ch, Charset.forName(csName).newDecoder(), -1); }
/** * Constructs a reader that decodes bytes from the given channel according * to the named charset. * * <p> An invocation of this method of the form * * <blockquote><pre> * Channels.newReader(ch, csname)</pre></blockquote> * * behaves in exactly the same way as the express...
Constructs a reader that decodes bytes from the given channel according to the named charset. An invocation of this method of the form <code> Channels.newReader(ch, csname)</code> behaves in exactly the same way as the expression <code> Channels.newReader(ch, Charset.forName(csName) .newDecoder(), -1);</code>
newReader
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "ojluni/src/main/java/java/nio/channels/Channels.java", "license": "gpl-2.0", "size": 16470 }
[ "java.io.Reader", "java.nio.charset.Charset" ]
import java.io.Reader; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,540,287
public void generateEvent(String dskType, String id, double magnitude) { String key = dskType + "' / '" + id; if (log.isInfoEnabled()) { log.info("Generate Flare Event for : '" + key + "' with magnitude " + magnitude); } Vector<IPluginEventPublisher> publishers = policyElements.get(key); if (publishers ...
void function(String dskType, String id, double magnitude) { String key = dskType + STR + id; if (log.isInfoEnabled()) { log.info(STR + key + STR + magnitude); } Vector<IPluginEventPublisher> publishers = policyElements.get(key); if (publishers != null) { for (IPluginEventPublisher publisher : publishers) { publisher.p...
/** * generate event * * @param dskType disk type * @param id event id * @param magnitude magnitude */
generate event
generateEvent
{ "repo_name": "opensds/nbp", "path": "vmware/vro/plugin/src/main/java/org/opensds/storage/vro/plugin/core/OpenSDSStorageEventGenerator.java", "license": "apache-2.0", "size": 3889 }
[ "ch.dunes.vso.sdk.api.IPluginEventPublisher", "java.util.Vector" ]
import ch.dunes.vso.sdk.api.IPluginEventPublisher; import java.util.Vector;
import ch.dunes.vso.sdk.api.*; import java.util.*;
[ "ch.dunes.vso", "java.util" ]
ch.dunes.vso; java.util;
2,347,807
private static boolean canOptimizeObjectCreate(Node firstParam) { Node curParam = firstParam; while (curParam != null) { // All keys must be strings or numbers. if (!curParam.isString() && !curParam.isNumber()) { return false; } curParam = curParam.getNext(); // Check fo...
static boolean function(Node firstParam) { Node curParam = firstParam; while (curParam != null) { if (!curParam.isString() && !curParam.isNumber()) { return false; } curParam = curParam.getNext(); if (curParam == null) { return false; } curParam = curParam.getNext(); } return true; }
/** * Returns whether the given call to goog.object.create can be converted to an * object literal. */
Returns whether the given call to goog.object.create can be converted to an object literal
canOptimizeObjectCreate
{ "repo_name": "LorenzoDV/closure-compiler", "path": "src/com/google/javascript/jscomp/ClosureOptimizePrimitives.java", "license": "apache-2.0", "size": 7403 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
133,537
int deleteByExample(BDIHistoryDayExample example);
int deleteByExample(BDIHistoryDayExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table nfjd502.dbo.BDIHistoryDay * * @mbggenerated Thu Mar 02 11:23:21 CST 2017 */
This method was generated by MyBatis Generator. This method corresponds to the database table nfjd502.dbo.BDIHistoryDay
deleteByExample
{ "repo_name": "xtwxy/cassandra-tests", "path": "mstar-server-dao/src/main/java/com/wincom/mstar/dao/mapper/BDIHistoryDayMapper.java", "license": "apache-2.0", "size": 2198 }
[ "com.wincom.mstar.domain.BDIHistoryDayExample" ]
import com.wincom.mstar.domain.BDIHistoryDayExample;
import com.wincom.mstar.domain.*;
[ "com.wincom.mstar" ]
com.wincom.mstar;
295,387
public void setHelpText(String text, Point location) { helpTextLabel.setText(text); moveHelpText(location); }
void function(String text, Point location) { helpTextLabel.setText(text); moveHelpText(location); }
/** * Set a help Text on the canvas at a given position * * @param text * @param location */
Set a help Text on the canvas at a given position
setHelpText
{ "repo_name": "RaphaelBrugier/gwtuml", "path": "GWTUMLAPI/src/com/objetdirect/gwt/umlapi/client/umlCanvas/DecoratorCanvas.java", "license": "gpl-3.0", "size": 15506 }
[ "com.objetdirect.gwt.umlapi.client.engine.Point" ]
import com.objetdirect.gwt.umlapi.client.engine.Point;
import com.objetdirect.gwt.umlapi.client.engine.*;
[ "com.objetdirect.gwt" ]
com.objetdirect.gwt;
261,768
private void setAppContext(Context context) { appContext = context; }
void function(Context context) { appContext = context; }
/** * Set the calling application context. * @param context the application context to set * @author Vibhor */
Set the calling application context
setAppContext
{ "repo_name": "vibhorgoswami/Utilities", "path": "DownloadLibrary/app/src/main/java/com/vibs/downloadlibrary/core/DownloadManager.java", "license": "gpl-2.0", "size": 25227 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,025,809
@Test public void sameLoggers() { TinylogLoggerFactory factory = new TinylogLoggerFactory(); TinylogLogger first = factory.getLogger("abc"); assertThat(first.getName()).isEqualTo("abc"); TinylogLogger second = factory.getLogger("abc"); assertThat(second.getName()).isEqualTo("abc"); assertThat(second)....
void function() { TinylogLoggerFactory factory = new TinylogLoggerFactory(); TinylogLogger first = factory.getLogger("abc"); assertThat(first.getName()).isEqualTo("abc"); TinylogLogger second = factory.getLogger("abc"); assertThat(second.getName()).isEqualTo("abc"); assertThat(second).isSameAs(first); }
/** * Verifies that the same logger instance will be returned for the same name. */
Verifies that the same logger instance will be returned for the same name
sameLoggers
{ "repo_name": "pmwmedia/tinylog", "path": "slf4j-tinylog/src/test/java/org/tinylog/slf4j/TinylogLoggerFactoryTest.java", "license": "apache-2.0", "size": 2249 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
564,476
protected void writeToNestedBWC(StreamOutput out, QueryBuilder query, String nestedPath) throws IOException { assert out.getVersion().before(Version.V_5_5_0) : "invalid output version, must be < " + Version.V_5_5_0.toString(); writeToBWC(out, query, nestedPath, null); }
void function(StreamOutput out, QueryBuilder query, String nestedPath) throws IOException { assert out.getVersion().before(Version.V_5_5_0) : STR + Version.V_5_5_0.toString(); writeToBWC(out, query, nestedPath, null); }
/** * BWC serialization for nested {@link InnerHitBuilder}. * Should only be used to send nested inner hits to nodes pre 5.5. */
BWC serialization for nested <code>InnerHitBuilder</code>. Should only be used to send nested inner hits to nodes pre 5.5
writeToNestedBWC
{ "repo_name": "strapdata/elassandra5-rc", "path": "core/src/main/java/org/elasticsearch/index/query/InnerHitBuilder.java", "license": "apache-2.0", "size": 21817 }
[ "java.io.IOException", "org.elasticsearch.Version", "org.elasticsearch.common.io.stream.StreamOutput" ]
import java.io.IOException; import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.StreamOutput;
import java.io.*; import org.elasticsearch.*; import org.elasticsearch.common.io.stream.*;
[ "java.io", "org.elasticsearch", "org.elasticsearch.common" ]
java.io; org.elasticsearch; org.elasticsearch.common;
2,062,973
public boolean isCorrectConfig() { return (!TextUtils.isEmpty(mConfig.getToken())); } public static class TGConfiguration { public static final String API_VERSION = "0.4"; private static final String DEFAULT_API_URL = "https://api.tapglue.com/"; private static final int...
boolean function() { return (!TextUtils.isEmpty(mConfig.getToken())); } public static class TGConfiguration { public static final String API_VERSION = "0.4"; private static final String DEFAULT_API_URL = "https: private static final int DEFAULT_FLUSH_INTERVAL = 15 * 1000; private static final int MAX_FLUSH_INTERVAL = 1...
/** * Check if current configuration is correct (exists with non-null token) * * @return Is config correct? */
Check if current configuration is correct (exists with non-null token)
isCorrectConfig
{ "repo_name": "AutomatedPlayground/android_sdk", "path": "tapglue-android-sdk/src/main/java/com/tapglue/Tapglue.java", "license": "apache-2.0", "size": 11002 }
[ "android.text.TextUtils" ]
import android.text.TextUtils;
import android.text.*;
[ "android.text" ]
android.text;
517,007
public HashMap<String, List<WSDLElement>> getElementTypes(List<Element> schemaElements, String targetNamespace) { HashMap<String, List<WSDLElement>> elementTypeToElements = new HashMap<>(); for (Element elm : schemaElements) { ElementImpl elmImpl = (ElementImpl) elm; elementT...
HashMap<String, List<WSDLElement>> function(List<Element> schemaElements, String targetNamespace) { HashMap<String, List<WSDLElement>> elementTypeToElements = new HashMap<>(); for (Element elm : schemaElements) { ElementImpl elmImpl = (ElementImpl) elm; elementTypeToElements.put(getTypeWithNamespace(targetNamespace, el...
/** * This method create a map of list of sub elements against element name * * @param schemaElements List of elements * @param targetNamespace TargetNamespace of the element * @return Map of list of sub elements against element name */
This method create a map of list of sub elements against element name
getElementTypes
{ "repo_name": "wso2/carbon-governance-extensions", "path": "components/governance-extensions/org.wso2.carbon.governance.soap.viewer/src/main/java/org/wso2/carbon/governance/soap/viewer/WSDLVisualizer.java", "license": "apache-2.0", "size": 66401 }
[ "java.util.HashMap", "java.util.List", "org.ow2.easywsdl.schema.api.Element", "org.ow2.easywsdl.schema.impl.ElementImpl" ]
import java.util.HashMap; import java.util.List; import org.ow2.easywsdl.schema.api.Element; import org.ow2.easywsdl.schema.impl.ElementImpl;
import java.util.*; import org.ow2.easywsdl.schema.api.*; import org.ow2.easywsdl.schema.impl.*;
[ "java.util", "org.ow2.easywsdl" ]
java.util; org.ow2.easywsdl;
871,079
public FormEntryPrompt[] getQuestionPrompts() throws RuntimeException { ArrayList<FormIndex> indicies = new ArrayList<FormIndex>(); FormIndex currentIndex = getFormIndex(); // For questions, there is only one. // For groups, there could be many, but we set that below FormEn...
FormEntryPrompt[] function() throws RuntimeException { ArrayList<FormIndex> indicies = new ArrayList<FormIndex>(); FormIndex currentIndex = getFormIndex(); FormEntryPrompt[] questions = new FormEntryPrompt[1]; IFormElement element = mFormEntryController.getModel().getForm().getChild(currentIndex); if (element instanceo...
/** * Returns an array of question promps. * * @return */
Returns an array of question promps
getQuestionPrompts
{ "repo_name": "smap-consulting/ODK1.4_lib", "path": "src/org/odk/collect/android/logic/FormController.java", "license": "apache-2.0", "size": 44030 }
[ "android.util.Log", "java.util.ArrayList", "org.javarosa.core.model.FormIndex", "org.javarosa.core.model.GroupDef", "org.javarosa.core.model.IFormElement", "org.javarosa.form.api.FormEntryController", "org.javarosa.form.api.FormEntryPrompt", "org.odk.collect.android.views.ODKView" ]
import android.util.Log; import java.util.ArrayList; import org.javarosa.core.model.FormIndex; import org.javarosa.core.model.GroupDef; import org.javarosa.core.model.IFormElement; import org.javarosa.form.api.FormEntryController; import org.javarosa.form.api.FormEntryPrompt; import org.odk.collect.android.views.ODKVie...
import android.util.*; import java.util.*; import org.javarosa.core.model.*; import org.javarosa.form.api.*; import org.odk.collect.android.views.*;
[ "android.util", "java.util", "org.javarosa.core", "org.javarosa.form", "org.odk.collect" ]
android.util; java.util; org.javarosa.core; org.javarosa.form; org.odk.collect;
2,060,304
public final String getLikelyEndContextMismatchCause(ContentKind contentKind) { Preconditions.checkArgument(!isValidEndContextForContentKind(contentKind)); if (contentKind == ContentKind.ATTRIBUTES) { // Special error message for ATTRIBUTES since it has some specific logic. return "an unterminated...
final String function(ContentKind contentKind) { Preconditions.checkArgument(!isValidEndContextForContentKind(contentKind)); if (contentKind == ContentKind.ATTRIBUTES) { return STR; } switch (state) { case HTML_TAG_NAME: case HTML_TAG: case HTML_ATTRIBUTE_NAME: case HTML_NORMAL_ATTR_VALUE: return STR; case CSS: return ...
/** * Returns a plausible human-readable description of a context mismatch; * <p> * This assumes that the provided context is an invalid end context for the particular content * kind. */
Returns a plausible human-readable description of a context mismatch; This assumes that the provided context is an invalid end context for the particular content kind
getLikelyEndContextMismatchCause
{ "repo_name": "atul-bhouraskar/closure-templates", "path": "java/src/com/google/template/soy/parsepasses/contextautoesc/Context.java", "license": "apache-2.0", "size": 54126 }
[ "com.google.common.base.Preconditions", "com.google.template.soy.data.SanitizedContent", "javax.annotation.Nullable" ]
import com.google.common.base.Preconditions; import com.google.template.soy.data.SanitizedContent; import javax.annotation.Nullable;
import com.google.common.base.*; import com.google.template.soy.data.*; import javax.annotation.*;
[ "com.google.common", "com.google.template", "javax.annotation" ]
com.google.common; com.google.template; javax.annotation;
54,009
public void startApp() { if (!initialized) { nfcMenu = new NfcMenuForm(this); nfcMenu.init(); } Display.getDisplay(this).setCurrent(nfcMenu); }
void function() { if (!initialized) { nfcMenu = new NfcMenuForm(this); nfcMenu.init(); } Display.getDisplay(this).setCurrent(nfcMenu); }
/** * Called when the midlet is entering the active state. * On the very first start-up, this registers listening for NDEF tags. */
Called when the midlet is entering the active state. On the very first start-up, this registers listening for NDEF tags
startApp
{ "repo_name": "andijakl/nfccreator", "path": "src/com/nokia/examples/NfcCreatorMidlet.java", "license": "gpl-3.0", "size": 1743 }
[ "javax.microedition.lcdui.Display" ]
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.*;
[ "javax.microedition" ]
javax.microedition;
1,059,494
@Override protected boolean standardRetainAll(Collection<?> elementsToRetain) { return Multisets.retainAllImpl(this, elementsToRetain); }
boolean function(Collection<?> elementsToRetain) { return Multisets.retainAllImpl(this, elementsToRetain); }
/** * A sensible definition of {@link #retainAll} in terms of the {@code * retainAll} method of {@link #elementSet}. If you override {@link * #elementSet}, you may wish to override {@link #retainAll} to forward to * this implementation. * * @since 7.0 */
A sensible definition of <code>#retainAll</code> in terms of the retainAll method of <code>#elementSet</code>. If you override <code>#elementSet</code>, you may wish to override <code>#retainAll</code> to forward to this implementation
standardRetainAll
{ "repo_name": "paulmartel/voltdb", "path": "third_party/java/src/com/google_voltpatches/common/collect/ForwardingMultiset.java", "license": "agpl-3.0", "size": 9962 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,296,676
public static HashFunction hmacMd5(byte[] key) { return hmacMd5(new SecretKeySpec(checkNotNull(key), "HmacMD5")); }
static HashFunction function(byte[] key) { return hmacMd5(new SecretKeySpec(checkNotNull(key), STR)); }
/** * Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the * MD5 (128 hash bits) hash function and a {@link SecretKeySpec} created from the given byte array * and the MD5 algorithm. * * @param key the key material of the secret key * @since 20.0 */
Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the MD5 (128 hash bits) hash function and a <code>SecretKeySpec</code> created from the given byte array and the MD5 algorithm
hmacMd5
{ "repo_name": "typetools/guava", "path": "guava/src/com/google/common/hash/Hashing.java", "license": "apache-2.0", "size": 26827 }
[ "javax.crypto.spec.SecretKeySpec" ]
import javax.crypto.spec.SecretKeySpec;
import javax.crypto.spec.*;
[ "javax.crypto" ]
javax.crypto;
2,769,378
private static int blendColors(int color1, int color2, float ratio) { final float inverseRation = 1f - ratio; float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); float b = (Color...
static int function(int color1, int color2, float ratio) { final float inverseRation = 1f - ratio; float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * ...
/** * Blend {@code color1} and {@code color2} using the given ratio. * * @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend, * 0.0 will return {@code color2}. */
Blend color1 and color2 using the given ratio
blendColors
{ "repo_name": "KyoungjunPark/SmartClass", "path": "app/src/main/java/com/example/kjpark/smartclass/SlidingTabStrip.java", "license": "mit", "size": 6417 }
[ "android.graphics.Color" ]
import android.graphics.Color;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,674,866
public boolean isMarkPointRange(float x, float y) { float range = DensityUtils.dp2px(getContext(), 60); if (x > (markPointX - range) && x < (markPointX + range) && y > (markPointY - range) && y < (markPointY + range)) { return true; } else { return false; } }
boolean function(float x, float y) { float range = DensityUtils.dp2px(getContext(), 60); if (x > (markPointX - range) && x < (markPointX + range) && y > (markPointY - range) && y < (markPointY + range)) { return true; } else { return false; } }
/** * Checks if is mark point range. * * @param x * the x * @param y * the y * @return true, if is mark point range */
Checks if is mark point range
isMarkPointRange
{ "repo_name": "gizwits/Gizwits-SmartBuld_Android", "path": "src/com/gizwits/opensource/devicecontrol/ui/view/ColorTempCircularSeekBar.java", "license": "mit", "size": 25145 }
[ "com.gizwits.opensource.devicecontrol.ui.utils.DensityUtils" ]
import com.gizwits.opensource.devicecontrol.ui.utils.DensityUtils;
import com.gizwits.opensource.devicecontrol.ui.utils.*;
[ "com.gizwits.opensource" ]
com.gizwits.opensource;
2,159,678
public void testBooleanValueType() throws Exception { // isXxx assertFalse(BOOLEAN_TYPE.isArrayType()); assertFalse(BOOLEAN_TYPE.isBooleanObjectType()); assertTrue(BOOLEAN_TYPE.isBooleanValueType()); assertFalse(BOOLEAN_TYPE.isDateType()); assertFalse(BOOLEAN_TYPE.isEnumElementType()); ass...
void function() throws Exception { assertFalse(BOOLEAN_TYPE.isArrayType()); assertFalse(BOOLEAN_TYPE.isBooleanObjectType()); assertTrue(BOOLEAN_TYPE.isBooleanValueType()); assertFalse(BOOLEAN_TYPE.isDateType()); assertFalse(BOOLEAN_TYPE.isEnumElementType()); assertFalse(BOOLEAN_TYPE.isNamedType()); assertFalse(BOOLEAN_...
/** * Tests the behavior of the boolean type. */
Tests the behavior of the boolean type
testBooleanValueType
{ "repo_name": "LorenzoDV/closure-compiler", "path": "test/com/google/javascript/rhino/jstype/JSTypeTest.java", "license": "apache-2.0", "size": 273520 }
[ "com.google.javascript.rhino.testing.Asserts" ]
import com.google.javascript.rhino.testing.Asserts;
import com.google.javascript.rhino.testing.*;
[ "com.google.javascript" ]
com.google.javascript;
377,572
public static SRPPublicKey valueOf(byte[] k) { // check magic... // we should parse here enough bytes to know which codec to use, and // direct the byte array to the appropriate codec. since we only have one // codec, we could have immediately tried it; nevertheless since testing // one byte is ...
static SRPPublicKey function(byte[] k) { if (k[0] == Registry.MAGIC_RAW_SRP_PUBLIC_KEY[0]) { IKeyPairCodec codec = new SRPKeyPairRawCodec(); return (SRPPublicKey) codec.decodePublicKey(k); } throw new IllegalArgumentException("magic"); }
/** * A class method that takes the output of the <code>encodePublicKey()</code> * method of an SRP keypair codec object (an instance implementing * {@link IKeyPairCodec} for SRP keys, and re-constructs an instance of this * object. * * @param k the contents of a previously encoded instance of this ob...
A class method that takes the output of the <code>encodePublicKey()</code> method of an SRP keypair codec object (an instance implementing <code>IKeyPairCodec</code> for SRP keys, and re-constructs an instance of this object
valueOf
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/javax/crypto/key/srp6/SRPPublicKey.java", "license": "gpl-2.0", "size": 5852 }
[ "gnu.java.security.Registry", "gnu.java.security.key.IKeyPairCodec" ]
import gnu.java.security.Registry; import gnu.java.security.key.IKeyPairCodec;
import gnu.java.security.*; import gnu.java.security.key.*;
[ "gnu.java.security" ]
gnu.java.security;
2,159,500
EClass getUrl_Statement();
EClass getUrl_Statement();
/** * Returns the meta object for class '{@link org.xtext.example.macros.macros.Url_Statement <em>Url Statement</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Url Statement</em>'. * @see org.xtext.example.macros.macros.Url_Statement * @generated *...
Returns the meta object for class '<code>org.xtext.example.macros.macros.Url_Statement Url Statement</code>'.
getUrl_Statement
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.macros/src-gen/org/xtext/example/macros/macros/MacrosPackage.java", "license": "epl-1.0", "size": 25384 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
763,684
ServiceCall createUserAsync(User body, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
ServiceCall createUserAsync(User body, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
/** * Create user. * This can only be done by the logged in user. * * @param body Created user object * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Servic...
Create user. This can only be done by the logged in user
createUserAsync
{ "repo_name": "xingwu1/autorest", "path": "Samples/petstore/Java/SwaggerPetstore.java", "license": "mit", "size": 35698 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,510,990
private INodeAttributeProvider getUserFilteredAttributeProvider( UserGroupInformation ugi) { if (attributeProvider == null || (ugi != null && isUserBypassingExtAttrProvider(ugi.getUserName()))) { return null; } return attributeProvider; }
INodeAttributeProvider function( UserGroupInformation ugi) { if (attributeProvider == null (ugi != null && isUserBypassingExtAttrProvider(ugi.getUserName()))) { return null; } return attributeProvider; }
/** * Return attributeProvider or null if ugi is to bypass attributeProvider. * @param ugi * @return configured attributeProvider or null */
Return attributeProvider or null if ugi is to bypass attributeProvider
getUserFilteredAttributeProvider
{ "repo_name": "huafengw/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java", "license": "apache-2.0", "size": 71874 }
[ "org.apache.hadoop.security.UserGroupInformation" ]
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
841,847
Optional<Long> extent();
Optional<Long> extent();
/** * Get the extent of the aggregation. * <p> * The extent is the space of time in milliseconds that an aggregation takes samples. * * @return The extent if available, otherwise an empty result. */
Get the extent of the aggregation. The extent is the space of time in milliseconds that an aggregation takes samples
extent
{ "repo_name": "dbrounst/heroic", "path": "heroic-component/src/main/java/com/spotify/heroic/aggregation/Aggregation.java", "license": "apache-2.0", "size": 2041 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
2,529,782
@ApiModelProperty(example = "null", value = "Use this detector name when refering to this detector in a configuration for media processing") public String getDetectorName() { return detectorName; }
@ApiModelProperty(example = "null", value = STR) String function() { return detectorName; }
/** * Use this detector name when refering to this detector in a configuration for media processing * @return detectorName **/
Use this detector name when refering to this detector in a configuration for media processing
getDetectorName
{ "repo_name": "jbocharov/voicebase-java-samples", "path": "v3-upload-transcribe/src/main/java/com/voicebase/sample/v3client/model/VbDetectorModel.java", "license": "mit", "size": 7686 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,059,119
@Override public void onCreate(SQLiteDatabase db) { onUpgrade(db,0,DATABASE_VERSION); }
void function(SQLiteDatabase db) { onUpgrade(db,0,DATABASE_VERSION); }
/** * In the onCreate function we create the tables * @param db Android will pass in a writable SQLiteDatabase that we use to create the tables */
In the onCreate function we create the tables
onCreate
{ "repo_name": "SNiels/Multi-Mania-app", "path": "app/MultiMania/app/src/main/java/be/ana/nmct/multimania/data/DbHelper.java", "license": "mit", "size": 10632 }
[ "android.database.sqlite.SQLiteDatabase" ]
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.*;
[ "android.database" ]
android.database;
1,237,888
long getRemainingSpace() throws IOException;
long getRemainingSpace() throws IOException;
/** * Get the amount of free space on the mount, in bytes. You should decrease this value as the user writes to the * mount, and write operations should fail once it reaches zero. * * @return The amount of free space, in bytes. * @throws IOException If the remaining space could not be computed....
Get the amount of free space on the mount, in bytes. You should decrease this value as the user writes to the mount, and write operations should fail once it reaches zero
getRemainingSpace
{ "repo_name": "rolandoislas/PeripheralsPlusPlus", "path": "src/api/java/dan200/computercraft/api/filesystem/IWritableMount.java", "license": "gpl-2.0", "size": 3189 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,542,543
public static Color getColor(final int systemColorID) { final Display display = Display.getCurrent(); return display.getSystemColor(systemColorID); }
static Color function(final int systemColorID) { final Display display = Display.getCurrent(); return display.getSystemColor(systemColorID); }
/** * Returns the system {@link Color} matching the specific ID. * * @param systemColorID * the ID value for the color * @return the system {@link Color} matching the specific ID */
Returns the system <code>Color</code> matching the specific ID
getColor
{ "repo_name": "Berloe/SDMapGen", "path": "org.smapgen/src/org/eclipse/wb/swt/SWTResourceManager.java", "license": "epl-1.0", "size": 18234 }
[ "org.eclipse.swt.graphics.Color", "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.graphics.Color; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,898,800
public final CreateIndexRequestBuilder prepareCreate(String index) { return prepareCreate(index, -1); }
final CreateIndexRequestBuilder function(String index) { return prepareCreate(index, -1); }
/** * Creates a new {@link CreateIndexRequestBuilder} with the settings obtained from {@link #indexSettings()}. */
Creates a new <code>CreateIndexRequestBuilder</code> with the settings obtained from <code>#indexSettings()</code>
prepareCreate
{ "repo_name": "rajanm/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 107161 }
[ "org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder" ]
import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder;
import org.elasticsearch.action.admin.indices.create.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,212
@Test public void selectItemOfSpecificType() { ListItemDock item = new ListItemDock(listView1.asList(), Date.class, new Any()); listView1.asSelectable().selector().select(item.control()); }
void function() { ListItemDock item = new ListItemDock(listView1.asList(), Date.class, new Any()); listView1.asSelectable().selector().select(item.control()); }
/** * Selecting an item of specific type. */
Selecting an item of specific type
selectItemOfSpecificType
{ "repo_name": "teamfx/openjfx-8u-dev-tests", "path": "tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewSample.java", "license": "gpl-2.0", "size": 6707 }
[ "java.util.Date", "org.jemmy.fx.control.ListItemDock", "org.jemmy.lookup.Any" ]
import java.util.Date; import org.jemmy.fx.control.ListItemDock; import org.jemmy.lookup.Any;
import java.util.*; import org.jemmy.fx.control.*; import org.jemmy.lookup.*;
[ "java.util", "org.jemmy.fx", "org.jemmy.lookup" ]
java.util; org.jemmy.fx; org.jemmy.lookup;
1,579,761
protected Object lookup() throws NamingException { return lookup(getJndiName(), getExpectedType()); }
Object function() throws NamingException { return lookup(getJndiName(), getExpectedType()); }
/** * Perform the actual JNDI lookup for this locator's target resource. * @return the located target object * @throws NamingException if the JNDI lookup failed or if the * located JNDI object is not assigable to the expected type * @see #setJndiName * @see #setExpectedType * @see #lookup(String, Class) ...
Perform the actual JNDI lookup for this locator's target resource
lookup
{ "repo_name": "mattxia/spring-2.5-analysis", "path": "src/org/springframework/jndi/JndiObjectLocator.java", "license": "apache-2.0", "size": 3358 }
[ "javax.naming.NamingException" ]
import javax.naming.NamingException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
1,744,937
@Override public CMActivity getStartActivity(final Long processClassId) throws CMWorkflowException { logger.debug("getting starting activity for process with class id '{}'", processClassId); return workflowEngine.findProcessClassById(processClassId).getStartActivity(); }
CMActivity function(final Long processClassId) throws CMWorkflowException { logger.debug(STR, processClassId); return workflowEngine.findProcessClassById(processClassId).getStartActivity(); }
/** * Returns the process start activity for the current user. * * @param process * class id * @return the start activity definition * @throws CMWorkflowException */
Returns the process start activity for the current user
getStartActivity
{ "repo_name": "jzinedine/CMDBuild", "path": "core/src/main/java/org/cmdbuild/logic/workflow/DefaultWorkflowLogic.java", "license": "agpl-3.0", "size": 19284 }
[ "org.cmdbuild.workflow.CMActivity", "org.cmdbuild.workflow.CMWorkflowException" ]
import org.cmdbuild.workflow.CMActivity; import org.cmdbuild.workflow.CMWorkflowException;
import org.cmdbuild.workflow.*;
[ "org.cmdbuild.workflow" ]
org.cmdbuild.workflow;
386,405
public void fireSpanChanged(SpanModelEvent event) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listener...
void function(SpanModelEvent event) { Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == SpanModelListener.class) { ((SpanModelListener) listeners[i + 1]).spanChanged(event); } } }
/** * Forwards the given notification event to all * <code>SpanModelListeners</code> that registered themselves as listeners * for this SpanModel. * * @param event * the event to be forwarded * * @see #addSpanModelListener * @see SpanModelEvent * @see EventListenerList */
Forwards the given notification event to all <code>SpanModelListeners</code> that registered themselves as listeners for this SpanModel
fireSpanChanged
{ "repo_name": "nextreports/nextreports-designer", "path": "src/ro/nextreports/designer/grid/AbstractSpanModel.java", "license": "apache-2.0", "size": 4104 }
[ "ro.nextreports.designer.grid.event.SpanModelEvent", "ro.nextreports.designer.grid.event.SpanModelListener" ]
import ro.nextreports.designer.grid.event.SpanModelEvent; import ro.nextreports.designer.grid.event.SpanModelListener;
import ro.nextreports.designer.grid.event.*;
[ "ro.nextreports.designer" ]
ro.nextreports.designer;
2,568,932
public String getFullName() { CharBuffer name = new CharBuffer(); name.append(getName()); name.append("("); JClass []params = getParameterTypes(); for (int i = 0; i < params.length; i++) { if (i != 0) name.append(", "); name.append(params[i].getShortName()); } nam...
String function() { CharBuffer name = new CharBuffer(); name.append(getName()); name.append("("); JClass []params = getParameterTypes(); for (int i = 0; i < params.length; i++) { if (i != 0) name.append(STR); name.append(params[i].getShortName()); } name.append(')'); return name.toString(); }
/** * Returns a full method name with arguments. */
Returns a full method name with arguments
getFullName
{ "repo_name": "dlitz/resin", "path": "modules/kernel/src/com/caucho/bytecode/JMethod.java", "license": "gpl-2.0", "size": 3732 }
[ "com.caucho.util.CharBuffer" ]
import com.caucho.util.CharBuffer;
import com.caucho.util.*;
[ "com.caucho.util" ]
com.caucho.util;
1,500,040
public List<LumberjackFrame> getFrames() throws LumberjackFrameException { List<LumberjackFrame> frames = new LinkedList<>(); if (currState != LumberjackState.COMPLETE) { throw new LumberjackFrameException("Must be at the trailer of a frame"); } try { if (cur...
List<LumberjackFrame> function() throws LumberjackFrameException { List<LumberjackFrame> frames = new LinkedList<>(); if (currState != LumberjackState.COMPLETE) { throw new LumberjackFrameException(STR); } try { if (currState == LumberjackState.COMPLETE && frameBuilder.frameType == FRAME_COMPRESSED) { logger.debug(STR,...
/** * Returns the decoded frame and resets the decoder for the next frame. * This method should be called after checking isComplete(). * * @return the LumberjackFrame that was decoded */
Returns the decoded frame and resets the decoder for the next frame. This method should be called after checking isComplete()
getFrames
{ "repo_name": "jtstorck/nifi", "path": "nifi-nar-bundles/nifi-lumberjack-bundle/nifi-lumberjack-processors/src/main/java/org/apache/nifi/processors/lumberjack/frame/LumberjackDecoder.java", "license": "apache-2.0", "size": 12238 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
961,904
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) { return true; } else { TileEntity tileentity = wor...
boolean function(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) { return true; } else { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityHopper) { playerIn.display...
/** * Called when the block is right clicked by a player. */
Called when the block is right clicked by a player
onBlockActivated
{ "repo_name": "Severed-Infinity/technium", "path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockHopper.java", "license": "gpl-3.0", "size": 11063 }
[ "net.minecraft.block.state.IBlockState", "net.minecraft.entity.player.EntityPlayer", "net.minecraft.stats.StatList", "net.minecraft.tileentity.TileEntity", "net.minecraft.tileentity.TileEntityHopper", "net.minecraft.util.EnumFacing", "net.minecraft.util.EnumHand", "net.minecraft.util.math.BlockPos", ...
import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.stats.StatList; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityHopper; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft...
import net.minecraft.block.state.*; import net.minecraft.entity.player.*; import net.minecraft.stats.*; import net.minecraft.tileentity.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "net.minecraft.block", "net.minecraft.entity", "net.minecraft.stats", "net.minecraft.tileentity", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.block; net.minecraft.entity; net.minecraft.stats; net.minecraft.tileentity; net.minecraft.util; net.minecraft.world;
454,197
public MetaProperty<DaysAdjustment> exCouponPeriod() { return exCouponPeriod; }
MetaProperty<DaysAdjustment> function() { return exCouponPeriod; }
/** * The meta-property for the {@code exCouponPeriod} property. * @return the meta-property, not null */
The meta-property for the exCouponPeriod property
exCouponPeriod
{ "repo_name": "OpenGamma/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/bond/CapitalIndexedBond.java", "license": "apache-2.0", "size": 39324 }
[ "com.opengamma.strata.basics.date.DaysAdjustment", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.basics.date.DaysAdjustment; import org.joda.beans.MetaProperty;
import com.opengamma.strata.basics.date.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
1,779,165
@Override public void appendTo(Appendable out, String name) throws IOException { // Write the mappings out to the file. The format of the generated // source map is three sections, each delimited by a magic comment. // // The first section contains an array for each line of the generated // code...
void function(Appendable out, String name) throws IOException { int maxLine = prepMappings(); out.append(STRfile\STR); out.append(escapeString(name)); out.append(STRcount\STR); out.append(String.valueOf(maxLine + 1)); out.append(STR); (new LineMapper(out)).appendLineMappings(); out.append("\n"); for (int i = 0; i <= ma...
/** * Appends the source map in LavaBug format to the given buffer. * * @param out The stream to which the map will be appended. * @param name The name of the generated source file that this source map * represents. */
Appends the source map in LavaBug format to the given buffer
appendTo
{ "repo_name": "wenzowski/closure-compiler", "path": "src/com/google/debugging/sourcemap/SourceMapGeneratorV1.java", "license": "apache-2.0", "size": 19573 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,510,495
void subscribeTags(final Set<Long> tagIds);
void subscribeTags(final Set<Long> tagIds);
/** * This method handles the subscription of the <code>ClientDataTag</code> to * the <code>JmsProxy</code> and <code>SupervisionManager</code>. * * @param tagIds The ids of the <code>ClientDataTag</code> objects that shall * be subscribed to. */
This method handles the subscription of the <code>ClientDataTag</code> to the <code>JmsProxy</code> and <code>SupervisionManager</code>
subscribeTags
{ "repo_name": "c2mon/c2mon", "path": "c2mon-client/c2mon-client-core/src/main/java/cern/c2mon/client/core/cache/CacheSynchronizer.java", "license": "lgpl-3.0", "size": 4040 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,771,294
WebApplicationService getService();
WebApplicationService getService();
/** * Method to obtain the service for which we are asserting this ticket is * valid for. * * @return the service for which we are asserting this ticket is valid for. */
Method to obtain the service for which we are asserting this ticket is valid for
getService
{ "repo_name": "apereo/cas", "path": "api/cas-server-core-api-validation/src/main/java/org/apereo/cas/validation/Assertion.java", "license": "apache-2.0", "size": 1477 }
[ "org.apereo.cas.authentication.principal.WebApplicationService" ]
import org.apereo.cas.authentication.principal.WebApplicationService;
import org.apereo.cas.authentication.principal.*;
[ "org.apereo.cas" ]
org.apereo.cas;
2,406,059
public final void setSequenceNr(IContext context, Long sequencenr) { getMendixObject().setValue(context, MemberNames.SequenceNr.toString(), sequencenr); }
final void function(IContext context, Long sequencenr) { getMendixObject().setValue(context, MemberNames.SequenceNr.toString(), sequencenr); }
/** * Set value of SequenceNr * @param context * @param sequencenr */
Set value of SequenceNr
setSequenceNr
{ "repo_name": "mrgroen/reCAPTCHA", "path": "test/javasource/restservices/proxies/ChangeItem.java", "license": "apache-2.0", "size": 10446 }
[ "com.mendix.systemwideinterfaces.core.IContext" ]
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.systemwideinterfaces.core.*;
[ "com.mendix.systemwideinterfaces" ]
com.mendix.systemwideinterfaces;
2,238,731
protected boolean sendAccountRegistrationActivationSms(final AccountRegistrationRequest registrationRequest, final String url) { if (StringUtils.isNotBlank(registrationRequest.getPhone())) { val smsProps = casProperties.getAccountRegistration().getSms(); val message = smsProps.getFor...
boolean function(final AccountRegistrationRequest registrationRequest, final String url) { if (StringUtils.isNotBlank(registrationRequest.getPhone())) { val smsProps = casProperties.getAccountRegistration().getSms(); val message = smsProps.getFormattedText(url); return communicationsManager.sms(smsProps.getFrom(), regi...
/** * Send account registration activation sms. * * @param registrationRequest the registration request * @param url the url * @return the boolean */
Send account registration activation sms
sendAccountRegistrationActivationSms
{ "repo_name": "rkorn86/cas", "path": "support/cas-server-support-account-mgmt/src/main/java/org/apereo/cas/acct/webflow/SubmitAccountRegistrationAction.java", "license": "apache-2.0", "size": 6821 }
[ "org.apache.commons.lang3.StringUtils", "org.apereo.cas.acct.AccountRegistrationRequest" ]
import org.apache.commons.lang3.StringUtils; import org.apereo.cas.acct.AccountRegistrationRequest;
import org.apache.commons.lang3.*; import org.apereo.cas.acct.*;
[ "org.apache.commons", "org.apereo.cas" ]
org.apache.commons; org.apereo.cas;
2,345,893
if(REDIS_COUNTER.getAndIncrement() == 0) { LOG.info("Starting redis..."); try { redisServer = new RedisServer(port); redisServer.start(); } catch (IOException e){ throw new RuntimeException("Unable to start embedded redis", e); ...
if(REDIS_COUNTER.getAndIncrement() == 0) { LOG.info(STR); try { redisServer = new RedisServer(port); redisServer.start(); } catch (IOException e){ throw new RuntimeException(STR, e); } LOG.info(STR); } }
/** * Starts an embedded redis on the provided port * * @param port The port to start redis on */
Starts an embedded redis on the provided port
start
{ "repo_name": "alexandraorth/grakn", "path": "grakn-test-tools/src/main/java/ai/grakn/util/EmbeddedRedis.java", "license": "gpl-3.0", "size": 2168 }
[ "java.io.IOException", "redis.embedded.RedisServer" ]
import java.io.IOException; import redis.embedded.RedisServer;
import java.io.*; import redis.embedded.*;
[ "java.io", "redis.embedded" ]
java.io; redis.embedded;
1,189,832
long getTagsCount() { return tagsCount; } class IngestJobQueryCallback implements CaseDbAccessManager.CaseDbAccessQueryCallback { private IngestJobStatusType jobStatus = null;
long getTagsCount() { return tagsCount; } class IngestJobQueryCallback implements CaseDbAccessManager.CaseDbAccessQueryCallback { private IngestJobStatusType jobStatus = null;
/** * Get the number of tagged content objects in this DataSource * * @return the tagsCount */
Get the number of tagged content objects in this DataSource
getTagsCount
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummary.java", "license": "apache-2.0", "size": 5962 }
[ "org.sleuthkit.datamodel.CaseDbAccessManager", "org.sleuthkit.datamodel.IngestJobInfo" ]
import org.sleuthkit.datamodel.CaseDbAccessManager; import org.sleuthkit.datamodel.IngestJobInfo;
import org.sleuthkit.datamodel.*;
[ "org.sleuthkit.datamodel" ]
org.sleuthkit.datamodel;
1,258,496
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Channel.class)) { case EipPackage.CHANNEL__NAME: case EipPackage.CHANNEL__GUARANTEED: fireNotifyChanged(new ViewerNotification(notification, not...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Channel.class)) { case EipPackage.CHANNEL__NAME: case EipPackage.CHANNEL__GUARANTEED: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "lbroudoux/eip-designer", "path": "plugins/com.github.lbroudoux.dsl.eip.edit/src/com/github/lbroudoux/dsl/eip/provider/ChannelItemProvider.java", "license": "apache-2.0", "size": 6675 }
[ "com.github.lbroudoux.dsl.eip.Channel", "com.github.lbroudoux.dsl.eip.EipPackage", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import com.github.lbroudoux.dsl.eip.Channel; import com.github.lbroudoux.dsl.eip.EipPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import com.github.lbroudoux.dsl.eip.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "com.github.lbroudoux", "org.eclipse.emf" ]
com.github.lbroudoux; org.eclipse.emf;
2,568,766
public static String makeMetaDir(String specDir, String fromChkpt) { return makeMetaDir(new Date(), specDir, fromChkpt); }
static String function(String specDir, String fromChkpt) { return makeMetaDir(new Date(), specDir, fromChkpt); }
/** * The MetaDir is fromChkpt if it is not null. Otherwise, create a * new one based on the current time. * @param specDir the specification directory * @param fromChkpt, path of the checkpoints if recovering, or <code>null</code> * */
The MetaDir is fromChkpt if it is not null. Otherwise, create a new one based on the current time
makeMetaDir
{ "repo_name": "lemmy/tlaplus", "path": "tlatools/org.lamport.tlatools/src/util/FileUtil.java", "license": "mit", "size": 17256 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
803,533
@JsonProperty("notes") public String getNotes() { return notes; }
@JsonProperty("notes") String function() { return notes; }
/** * Notes * <p> * Any notes required to understand or interpret the given statistic. */
Notes Any notes required to understand or interpret the given statistic
getNotes
{ "repo_name": "devgateway/oc-explorer", "path": "persistence-mongodb/src/main/java/org/devgateway/ocds/persistence/mongo/Statistic.java", "license": "mit", "size": 7966 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,183,537
private static TrieNode buildTrie(Text[] splits, int lower, int upper, Text prefix, int maxDepth) { int depth = prefix.getLength(); if (depth >= maxDepth || lower == upper) { return new LeafTrieNode(depth, splits, lower, upper); } InnerTrieNode r...
static TrieNode function(Text[] splits, int lower, int upper, Text prefix, int maxDepth) { int depth = prefix.getLength(); if (depth >= maxDepth lower == upper) { return new LeafTrieNode(depth, splits, lower, upper); } InnerTrieNode result = new InnerTrieNode(depth); Text trial = new Text(prefix); trial.append(new byte...
/** * Given a sorted set of cut points, build a trie that will find the correct * partition quickly. * @param splits the list of cut points * @param lower the lower bound of partitions 0..numPartitions-1 * @param upper the upper bound of partitions 0..numPartitions-1 * @param prefix the pr...
Given a sorted set of cut points, build a trie that will find the correct partition quickly
buildTrie
{ "repo_name": "hanhlh/hadoop-0.20.2_FatBTree", "path": "src/examples/org/apache/hadoop/examples/terasort/TeraSort.java", "license": "apache-2.0", "size": 8906 }
[ "org.apache.hadoop.io.Text" ]
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,304,242
//public void publish(String pid, String publishCode) throws ValidateException; public void publish(FedoraObject fedoraObject, PublishLocation publishLocation) throws ValidateException;
void function(FedoraObject fedoraObject, PublishLocation publishLocation) throws ValidateException;
/** * publish * * Placeholder * * <pre> * Version Date Developer Description * 0.1 15/05/2012 Genevieve Turner (GT) Initial build * 0.5 28/03/2013 Genevieve Turner(GT) Updated the paremeters * </pre> * * @param fedoraObject The fedora object to publish * @param publishLocation The locatio...
publish Placeholder <code> Version Date Developer Description 0.1 15/05/2012 Genevieve Turner (GT) Initial build 0.5 28/03/2013 Genevieve Turner(GT) Updated the paremeters </code>
publish
{ "repo_name": "anu-doi/anudc", "path": "DataCommons/src/main/java/au/edu/anu/datacommons/publish/Publish.java", "license": "gpl-3.0", "size": 3775 }
[ "au.edu.anu.datacommons.data.db.model.FedoraObject", "au.edu.anu.datacommons.data.db.model.PublishLocation", "au.edu.anu.datacommons.exception.ValidateException" ]
import au.edu.anu.datacommons.data.db.model.FedoraObject; import au.edu.anu.datacommons.data.db.model.PublishLocation; import au.edu.anu.datacommons.exception.ValidateException;
import au.edu.anu.datacommons.data.db.model.*; import au.edu.anu.datacommons.exception.*;
[ "au.edu.anu" ]
au.edu.anu;
2,565,956
public static Test territoryCollatedCaseInsensitiveDatabase(Test test, final String locale) { Properties attributes = new Properties(); attributes.setProperty("collation", "TERRITORY_BASED:SECONDARY"); if (locale != null) attributes.setProperty("territory", locale); ...
static Test function(Test test, final String locale) { Properties attributes = new Properties(); attributes.setProperty(STR, STR); if (locale != null) attributes.setProperty(STR, locale); return attributesDatabase(attributes, test); }
/** * Decorate a set of tests to use an single * use database with TERRITORY_BASED:SECONDARY collation * set to the passed in locale. * @param locale Locale used to set territory JDBC attribute. If null * then only collation=TERRITORY_BASED:SECONDARY will be set. */
Decorate a set of tests to use an single set to the passed in locale
territoryCollatedCaseInsensitiveDatabase
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/junit/Decorator.java", "license": "apache-2.0", "size": 7788 }
[ "java.util.Properties", "junit.framework.Test" ]
import java.util.Properties; import junit.framework.Test;
import java.util.*; import junit.framework.*;
[ "java.util", "junit.framework" ]
java.util; junit.framework;
431,667
private static void d_uacmxx( double[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru ) { //init output (base for incremental agg) Arrays.fill(c, init); //execute builtin aggregate for( int i=rl, aix=rl*n; i<ru; i++, aix+=n ) builtinAgg( a, c, aix, n, builtin ); }
static void function( double[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru ) { Arrays.fill(c, init); for( int i=rl, aix=rl*n; i<ru; i++, aix+=n ) builtinAgg( a, c, aix, n, builtin ); }
/** * COLMIN/COLMAX, opcode: uacmin/uacmax, dense input. * * @param a * @param c * @param m * @param n * @param builtin */
COLMIN/COLMAX, opcode: uacmin/uacmax, dense input
d_uacmxx
{ "repo_name": "Myasuka/systemml", "path": "system-ml/src/main/java/com/ibm/bi/dml/runtime/matrix/data/LibMatrixAgg.java", "license": "apache-2.0", "size": 77315 }
[ "com.ibm.bi.dml.runtime.functionobjects.Builtin", "java.util.Arrays" ]
import com.ibm.bi.dml.runtime.functionobjects.Builtin; import java.util.Arrays;
import com.ibm.bi.dml.runtime.functionobjects.*; import java.util.*;
[ "com.ibm.bi", "java.util" ]
com.ibm.bi; java.util;
947,158
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<DeploymentExtendedInner> listAtScopeAsync(String scope);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<DeploymentExtendedInner> listAtScopeAsync(String scope);
/** * Get all the deployments at the given scope. * * @param scope The resource scope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws Runti...
Get all the deployments at the given scope
listAtScopeAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java", "license": "mit", "size": 218889 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.resources.fluent.models.DeploymentExtendedInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.resources.fluent.models.DeploymentExtendedInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.resources.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
217,430
final FileObject scratchFolder = getWriteFolder(); // Make sure the test folder is empty scratchFolder.delete(Selectors.EXCLUDE_SELF); scratchFolder.createFolder(); return scratchFolder; }
final FileObject scratchFolder = getWriteFolder(); scratchFolder.delete(Selectors.EXCLUDE_SELF); scratchFolder.createFolder(); return scratchFolder; }
/** * Sets up a scratch folder for the test to use. */
Sets up a scratch folder for the test to use
createScratchFolder
{ "repo_name": "apache/commons-vfs", "path": "commons-vfs2-jackrabbit2/src/test/java/org/apache/commons/vfs2/provider/webdav4/test/Webdav4VersioningTests.java", "license": "apache-2.0", "size": 7019 }
[ "org.apache.commons.vfs2.FileObject", "org.apache.commons.vfs2.Selectors" ]
import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.Selectors;
import org.apache.commons.vfs2.*;
[ "org.apache.commons" ]
org.apache.commons;
1,092,779
@Test public void testGetColumnIndex() { TaskSeriesCollection c = createCollection1(); assertEquals(0, c.getColumnIndex("Task 1")); assertEquals(1, c.getColumnIndex("Task 2")); assertEquals(2, c.getColumnIndex("Task 3")); }
void function() { TaskSeriesCollection c = createCollection1(); assertEquals(0, c.getColumnIndex(STR)); assertEquals(1, c.getColumnIndex(STR)); assertEquals(2, c.getColumnIndex(STR)); }
/** * Some tests for the getColumnIndex() method. */
Some tests for the getColumnIndex() method
testGetColumnIndex
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/test/java/org/jfree/data/gantt/TaskSeriesCollectionTest.java", "license": "gpl-3.0", "size": 23526 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,740,426
public VariableMap permuteVariables(int[] perms) { VariableMap result = new VariableMap(); String[] names = this.getNameArray(); Iterator<String> iter = this.keySet().iterator(); int idisp = 0; while (iter.hasNext()) { String key = iter.next(); in...
VariableMap function(int[] perms) { VariableMap result = new VariableMap(); String[] names = this.getNameArray(); Iterator<String> iter = this.keySet().iterator(); int idisp = 0; while (iter.hasNext()) { String key = iter.next(); int index = perms[idisp]; result.put(key, names[index]); idisp ++; } return result; }
/** Gets a map to permuted variable names * @param perms indexes for permutation of variable names * of the keys = variable names. * @return a new {@link VariableMap} with the variables mapped to some permutation */
Gets a map to permuted variable names
permuteVariables
{ "repo_name": "gfis/ramath", "path": "src/main/java/org/teherba/ramath/symbolic/VariableMap.java", "license": "apache-2.0", "size": 21964 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,732,492
public void saveToRepository(RepositoryAttributeInterface attributeInterface) throws KettleException;
void function(RepositoryAttributeInterface attributeInterface) throws KettleException;
/** * Saves the log table to a repository. * @param attributeInterface The attribute interface used to store the attributes */
Saves the log table to a repository
saveToRepository
{ "repo_name": "dianhu/Kettle-Research", "path": "src-db/org/pentaho/di/core/logging/LogTableInterface.java", "license": "lgpl-2.1", "size": 4096 }
[ "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.repository.RepositoryAttributeInterface" ]
import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.repository.RepositoryAttributeInterface;
import org.pentaho.di.core.exception.*; import org.pentaho.di.repository.*;
[ "org.pentaho.di" ]
org.pentaho.di;
303,131
public void finish(int maxDeterminizedStates) { Automaton automaton = builder.finish(); // System.out.println("before det:\n" + automaton.toDot()); Transition t = new Transition(); // TODO: should we add "eps back to initial node" for all states, // and det that? then we don't need to revisit ...
void function(int maxDeterminizedStates) { Automaton automaton = builder.finish(); Transition t = new Transition(); if (anyTermID != -1) { int count = automaton.initTransition(0, t); for(int i=0;i<count;i++) { automaton.getNextTransition(t); if (anyTermID >= t.min && anyTermID <= t.max) { throw new IllegalStateExceptio...
/** * Call this once you are done adding states/transitions. * @param maxDeterminizedStates Maximum number of states created when * determinizing the automaton. Higher numbers allow this operation to * consume more memory but allow more complex automatons. */
Call this once you are done adding states/transitions
finish
{ "repo_name": "q474818917/solr-5.2.0", "path": "lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java", "license": "apache-2.0", "size": 14179 }
[ "org.apache.lucene.util.automaton.Automaton", "org.apache.lucene.util.automaton.Operations", "org.apache.lucene.util.automaton.Transition" ]
import org.apache.lucene.util.automaton.Automaton; import org.apache.lucene.util.automaton.Operations; import org.apache.lucene.util.automaton.Transition;
import org.apache.lucene.util.automaton.*;
[ "org.apache.lucene" ]
org.apache.lucene;
1,210,455
public RemoteMethodControl newMainProxy(Object impl) { TestClassLoader cl = new TestClassLoader(); InvocationHandler ih = new InvHandler(impl); return (RemoteMethodControl) ProxyTrustUtil.newProxyInstance(impl, ih, cl); }
RemoteMethodControl function(Object impl) { TestClassLoader cl = new TestClassLoader(); InvocationHandler ih = new InvHandler(impl); return (RemoteMethodControl) ProxyTrustUtil.newProxyInstance(impl, ih, cl); }
/** * Creates main proxy. * * @param impl * @return proxy created */
Creates main proxy
newMainProxy
{ "repo_name": "pfirmstone/JGDMS", "path": "qa/src/org/apache/river/test/spec/security/proxytrust/util/AbstractTestBase.java", "license": "apache-2.0", "size": 26594 }
[ "java.lang.reflect.InvocationHandler", "net.jini.core.constraint.RemoteMethodControl" ]
import java.lang.reflect.InvocationHandler; import net.jini.core.constraint.RemoteMethodControl;
import java.lang.reflect.*; import net.jini.core.constraint.*;
[ "java.lang", "net.jini.core" ]
java.lang; net.jini.core;
579,142
public List<HybridConnectionInner> hybridConnectionsV2() { return this.hybridConnectionsV2; }
List<HybridConnectionInner> function() { return this.hybridConnectionsV2; }
/** * Get the hybridConnectionsV2 property: The Hybrid Connection V2 (Service Bus) view. * * @return the hybridConnectionsV2 value. */
Get the hybridConnectionsV2 property: The Hybrid Connection V2 (Service Bus) view
hybridConnectionsV2
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/NetworkFeaturesInner.java", "license": "mit", "size": 3282 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,569,199
EReference getTypeResult_T7();
EReference getTypeResult_T7();
/** * Returns the meta object for the containment reference '{@link com.euclideanspace.spad.editor.TypeResult#getT7 <em>T7</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>T7</em>'. * @see com.euclideanspace.spad.editor.TypeResult#getT...
Returns the meta object for the containment reference '<code>com.euclideanspace.spad.editor.TypeResult#getT7 T7</code>'.
getTypeResult_T7
{ "repo_name": "martinbaker/euclideanspace", "path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java", "license": "agpl-3.0", "size": 593321 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,228,655
protected Path getLinkTarget(final Path f) throws IOException { throw new AssertionError(); }
Path function(final Path f) throws IOException { throw new AssertionError(); }
/** * The specification of this method matches that of * {@link FileContext#getLinkTarget(Path)}; */
The specification of this method matches that of <code>FileContext#getLinkTarget(Path)</code>
getLinkTarget
{ "repo_name": "ekoontz/hadoop-common", "path": "src/java/org/apache/hadoop/fs/AbstractFileSystem.java", "license": "apache-2.0", "size": 29476 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
368,975
void updateTeTopology(TeTopology teTopology);
void updateTeTopology(TeTopology teTopology);
/** * Creates or updates a TE topology. * * @param teTopology value of the TE topology to be updated */
Creates or updates a TE topology
updateTeTopology
{ "repo_name": "y-higuchi/onos", "path": "apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/TeTopologyStore.java", "license": "apache-2.0", "size": 8169 }
[ "org.onosproject.tetopology.management.api.TeTopology" ]
import org.onosproject.tetopology.management.api.TeTopology;
import org.onosproject.tetopology.management.api.*;
[ "org.onosproject.tetopology" ]
org.onosproject.tetopology;
496,686
@ManyToOne(cascade = {}, fetch = FetchType.LAZY) @JoinColumn(name = "LoanID", unique = false, nullable = false, insertable = true, updatable = true) public Loan getLoan() { return this.loan; }
@ManyToOne(cascade = {}, fetch = FetchType.LAZY) @JoinColumn(name = STR, unique = false, nullable = false, insertable = true, updatable = true) Loan function() { return this.loan; }
/** * * ID of loan agent at AgentID played a role in */
ID of loan agent at AgentID played a role in
getLoan
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/specify/datamodel/LoanAgent.java", "license": "gpl-2.0", "size": 5586 }
[ "javax.persistence.FetchType", "javax.persistence.JoinColumn", "javax.persistence.ManyToOne" ]
import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
752,907
PagedIterable<DedicatedCapacity> listByResourceGroup(String resourceGroupName, Context context);
PagedIterable<DedicatedCapacity> listByResourceGroup(String resourceGroupName, Context context);
/** * Gets all the Dedicated capacities for the given resource group. * * @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part. * This name must be at least 1 character in length, and no more than 90. * @param context The context t...
Gets all the Dedicated capacities for the given resource group
listByResourceGroup
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Capacities.java", "license": "mit", "size": 17073 }
[ "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context" ]
import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context;
import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
1,232,789
public void saveThingsToDo(PracticeDto practice);
void function(PracticeDto practice);
/** * Save the practice's things to do elements * * @param practice */
Save the practice's things to do elements
saveThingsToDo
{ "repo_name": "dads-software-brotherhood/sekc", "path": "src/main/java/mx/infotec/dads/sekc/admin/practice/service/PracticeHelperService.java", "license": "apache-2.0", "size": 1687 }
[ "mx.infotec.dads.sekc.admin.practice.dto.PracticeDto" ]
import mx.infotec.dads.sekc.admin.practice.dto.PracticeDto;
import mx.infotec.dads.sekc.admin.practice.dto.*;
[ "mx.infotec.dads" ]
mx.infotec.dads;
678,221
public IgniteInternalFuture<TxDeadlock> detectDeadlock( IgniteInternalTx tx, Set<IgniteTxKey> keys ) { return txDeadlockDetection.detectDeadlock(tx, keys); }
IgniteInternalFuture<TxDeadlock> function( IgniteInternalTx tx, Set<IgniteTxKey> keys ) { return txDeadlockDetection.detectDeadlock(tx, keys); }
/** * Performs deadlock detection for given keys. * * @param tx Target tx. * @param keys Keys. * @return Detection result. */
Performs deadlock detection for given keys
detectDeadlock
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java", "license": "apache-2.0", "size": 141099 }
[ "java.util.Set", "org.apache.ignite.internal.IgniteInternalFuture" ]
import java.util.Set; import org.apache.ignite.internal.IgniteInternalFuture;
import java.util.*; import org.apache.ignite.internal.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,160,479
@Override public void clearExceptionInThreads() { exceptionInThreads = false; LoggingUncaughtExceptionHandler.clearUncaughtExceptionsCount(); }
void function() { exceptionInThreads = false; LoggingUncaughtExceptionHandler.clearUncaughtExceptionsCount(); }
/** * Clears the boolean that determines whether or not an exception occurred in one of the worker * threads. This method should be used for testing purposes only! */
Clears the boolean that determines whether or not an exception occurred in one of the worker threads. This method should be used for testing purposes only
clearExceptionInThreads
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java", "license": "apache-2.0", "size": 93878 }
[ "org.apache.geode.logging.internal.executors.LoggingUncaughtExceptionHandler" ]
import org.apache.geode.logging.internal.executors.LoggingUncaughtExceptionHandler;
import org.apache.geode.logging.internal.executors.*;
[ "org.apache.geode" ]
org.apache.geode;
2,724,647
public void testDescendingCeiling() { NavigableSet q = dset5(); Object e1 = q.ceiling(m3); assertEquals(m3, e1); Object e2 = q.ceiling(zero); assertEquals(m1, e2); Object e3 = q.ceiling(m5); assertEquals(m5, e3); Object e4 = q.ceiling(m6); a...
void function() { NavigableSet q = dset5(); Object e1 = q.ceiling(m3); assertEquals(m3, e1); Object e2 = q.ceiling(zero); assertEquals(m1, e2); Object e3 = q.ceiling(m5); assertEquals(m5, e3); Object e4 = q.ceiling(m6); assertNull(e4); }
/** * ceiling returns next element */
ceiling returns next element
testDescendingCeiling
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "jsr166-tests/src/test/java/jsr166/TreeSubSetTest.java", "license": "gpl-2.0", "size": 30800 }
[ "java.util.NavigableSet" ]
import java.util.NavigableSet;
import java.util.*;
[ "java.util" ]
java.util;
2,396,974
private void createGUI () throws IOException { // Set title setTitle (TITLE); // Create menu setJMenuBar(getMenu()); // Create main panel getContentPane().add (getMainPanel (), BorderLayout.CENTER); pack(); setSize(800, 300); Dimension size = getSize(); Dimension screenSize = getToolk...
void function () throws IOException { setTitle (TITLE); setJMenuBar(getMenu()); getContentPane().add (getMainPanel (), BorderLayout.CENTER); pack(); setSize(800, 300); Dimension size = getSize(); Dimension screenSize = getToolkit().getScreenSize(); Point p = new Point ( (int)(screenSize.getWidth() / 2 - size.getWidth()...
/** * Create GUI items. */
Create GUI items
createGUI
{ "repo_name": "lsilvestre/Jogre", "path": "util/src/org/jogre/properties/JogrePropertiesEditor.java", "license": "gpl-2.0", "size": 10185 }
[ "java.awt.BorderLayout", "java.awt.Dimension", "java.awt.Point", "java.io.IOException" ]
import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Point; import java.io.IOException;
import java.awt.*; import java.io.*;
[ "java.awt", "java.io" ]
java.awt; java.io;
2,284,720
@Endpoint( describeByClass = true ) public static <T extends TType> CollectivePermute<T> create(Scope scope, Operand<T> input, Operand<TInt32> sourceTargetPairs) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "CollectivePermute"); opBuilder.addInput(input.asOutput()); opBuilder.ad...
@Endpoint( describeByClass = true ) static <T extends TType> CollectivePermute<T> function(Scope scope, Operand<T> input, Operand<TInt32> sourceTargetPairs) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, STR); opBuilder.addInput(input.asOutput()); opBuilder.addInput(sourceTargetPairs.asOutput()); return new Co...
/** * Factory method to create a class wrapping a new CollectivePermute operation. * * @param scope current scope * @param input The local input to be permuted. Currently only supports float and * bfloat16. * @param sourceTargetPairs A tensor with shape [num_pairs, 2]. * @param <T> data type for {@...
Factory method to create a class wrapping a new CollectivePermute operation
create
{ "repo_name": "tensorflow/java", "path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/CollectivePermute.java", "license": "apache-2.0", "size": 4031 }
[ "org.tensorflow.Operand", "org.tensorflow.OperationBuilder", "org.tensorflow.op.Scope", "org.tensorflow.op.annotation.Endpoint", "org.tensorflow.types.TInt32", "org.tensorflow.types.family.TType" ]
import org.tensorflow.Operand; import org.tensorflow.OperationBuilder; import org.tensorflow.op.Scope; import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.types.TInt32; import org.tensorflow.types.family.TType;
import org.tensorflow.*; import org.tensorflow.op.*; import org.tensorflow.op.annotation.*; import org.tensorflow.types.*; import org.tensorflow.types.family.*;
[ "org.tensorflow", "org.tensorflow.op", "org.tensorflow.types" ]
org.tensorflow; org.tensorflow.op; org.tensorflow.types;
2,781,442
public void layoutContainer (Container parent) { Insets insets = parent.getInsets(); // int width = insets.left; int height = insets.top; // We need to layout if (needLayout(parent)) { int x = 5; int y = 5; // Go through all components for (int i = 0; i < parent.getComponentC...
void function (Container parent) { Insets insets = parent.getInsets(); int width = insets.left; int height = insets.top; if (needLayout(parent)) { int x = 5; int y = 5; for (int i = 0; i < parent.getComponentCount(); i++) { Component comp = parent.getComponent(i); if (comp.isVisible() && comp instanceof WFNode) { Dimen...
/************************************************************************** * Lays out the specified container. * @param parent the container to be laid out * @see java.awt.LayoutManager#layoutContainer(Container) */
Lays out the specified container
layoutContainer
{ "repo_name": "neuroidss/adempiere", "path": "client/src/org/compiere/apps/wf/WFLayoutManager.java", "license": "gpl-2.0", "size": 6252 }
[ "java.awt.Component", "java.awt.Container", "java.awt.Dimension", "java.awt.Insets", "java.awt.Point" ]
import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Insets; import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,573,327
public List<String> getAvailableActions(String orderId) throws Exception { MozuClient<List<String>> client = com.mozu.api.clients.commerce.OrderClient.getAvailableActionsClient( orderId); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); }
List<String> function(String orderId) throws Exception { MozuClient<List<String>> client = com.mozu.api.clients.commerce.OrderClient.getAvailableActionsClient( orderId); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); }
/** * * <p><pre><code> * Order order = new Order(); * string string = order.getAvailableActions( orderId); * </code></pre></p> * @param orderId Unique identifier of the order. * @return List<string> * @see string */
<code><code> Order order = new Order(); string string = order.getAvailableActions( orderId); </code></code>
getAvailableActions
{ "repo_name": "Mozu/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/OrderResource.java", "license": "mit", "size": 27247 }
[ "com.mozu.api.MozuClient", "java.util.List" ]
import com.mozu.api.MozuClient; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
880,688
public synchronized InternetHeaders fetchHeaders(int sequenceNumber, String part) throws MessagingException { IMAPCommand command = new IMAPCommand("FETCH"); command.appendInteger(sequenceNumber); command.startList(); command.appendAtom("BODY.PEEK"); command.appendBodySection...
synchronized InternetHeaders function(int sequenceNumber, String part) throws MessagingException { IMAPCommand command = new IMAPCommand("FETCH"); command.appendInteger(sequenceNumber); command.startList(); command.appendAtom(STR); command.appendBodySection(part, STR); command.endList(); sendCommand(command); IMAPInter...
/** * Issue a FETCH command to retrieve the message RFC822.HEADERS structure containing the message headers (using PEEK). * * @param sequenceNumber The sequence number of the message. * * @return The IMAPRFC822Headers item for the message. * All other untagged responses are queued ...
Issue a FETCH command to retrieve the message RFC822.HEADERS structure containing the message headers (using PEEK)
fetchHeaders
{ "repo_name": "apache/geronimo-javamail", "path": "geronimo-javamail_1.6/geronimo-javamail_1.6_provider/src/main/java/org/apache/geronimo/javamail/store/imap/connection/IMAPConnection.java", "license": "apache-2.0", "size": 75320 }
[ "javax.mail.MessagingException", "javax.mail.internet.InternetHeaders" ]
import javax.mail.MessagingException; import javax.mail.internet.InternetHeaders;
import javax.mail.*; import javax.mail.internet.*;
[ "javax.mail" ]
javax.mail;
557,998
public static void loadTestResults(InputStream reader, ResultCollectorHelper resultCollectorHelper) throws IOException { // Get the InputReader to use InputStreamReader inputStreamReader = getInputStreamReader(reader); DataHolder dh = JTLSAVER.newDataHolder(); dh.put(RESULTCOLLEC...
static void function(InputStream reader, ResultCollectorHelper resultCollectorHelper) throws IOException { InputStreamReader inputStreamReader = getInputStreamReader(reader); DataHolder dh = JTLSAVER.newDataHolder(); dh.put(RESULTCOLLECTOR_HELPER_OBJECT, resultCollectorHelper); JTLSAVER.unmarshal(new XppDriver().create...
/** * Read results from JTL file. * * @param reader of the file * @param resultCollectorHelper helper class to enable TestResultWrapperConverter to deliver the samples * @throws IOException */
Read results from JTL file
loadTestResults
{ "repo_name": "saketh7/Jmeter", "path": "src/core/org/apache/jmeter/save/SaveService.java", "license": "apache-2.0", "size": 28164 }
[ "com.thoughtworks.xstream.converters.DataHolder", "com.thoughtworks.xstream.io.xml.XppDriver", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "org.apache.jmeter.reporters.ResultCollectorHelper" ]
import com.thoughtworks.xstream.converters.DataHolder; import com.thoughtworks.xstream.io.xml.XppDriver; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.apache.jmeter.reporters.ResultCollectorHelper;
import com.thoughtworks.xstream.converters.*; import com.thoughtworks.xstream.io.xml.*; import java.io.*; import org.apache.jmeter.reporters.*;
[ "com.thoughtworks.xstream", "java.io", "org.apache.jmeter" ]
com.thoughtworks.xstream; java.io; org.apache.jmeter;
1,730,179
Object conditionalCopy(Object o) { if (isCopyOnRead() && !Token.isInvalid(o)) { return CopyHelper.copy(o); } return o; } private final String fullPath;
Object conditionalCopy(Object o) { if (isCopyOnRead() && !Token.isInvalid(o)) { return CopyHelper.copy(o); } return o; } private final String fullPath;
/** * Makes a copy, if copy-on-get is enabled, of the specified object. * * @since GemFire 4.0 */
Makes a copy, if copy-on-get is enabled, of the specified object
conditionalCopy
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java", "license": "apache-2.0", "size": 394235 }
[ "org.apache.geode.CopyHelper" ]
import org.apache.geode.CopyHelper;
import org.apache.geode.*;
[ "org.apache.geode" ]
org.apache.geode;
1,785,458
public String toString() { GsonBuilder gbuilder = new GsonBuilder(); Gson gson = gbuilder.setPrettyPrinting().create(); return gson.toJson(this); }
String function() { GsonBuilder gbuilder = new GsonBuilder(); Gson gson = gbuilder.setPrettyPrinting().create(); return gson.toJson(this); }
/** * print out as a json file */
print out as a json file
toString
{ "repo_name": "jravila08/PBPParser", "path": "src/player/PlayerStats.java", "license": "apache-2.0", "size": 3558 }
[ "com.google.gson.Gson", "com.google.gson.GsonBuilder" ]
import com.google.gson.Gson; import com.google.gson.GsonBuilder;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
2,342,947
public static void assertServiceUnavailable(String message, String className, long timeout, TimeUnit timeUnit) { assertThat("Class name is null", className, notNullValue()); assertThat("TimeUnit is null", timeUnit, notNullValue()); //noinspection unchecked Object service = getService...
static void function(String message, String className, long timeout, TimeUnit timeUnit) { assertThat(STR, className, notNullValue()); assertThat(STR, timeUnit, notNullValue()); Object service = getService(getBundleContext(), className, timeout, timeUnit); assertThat(message, service, nullValue()); }
/** * Asserts that service with class name is unavailable in OSGi registry within given timeout. If it not as expected * {@link AssertionError} is thrown with the given message * * @param message message * @param className service class name * @param timeout time interval in millisecon...
Asserts that service with class name is unavailable in OSGi registry within given timeout. If it not as expected <code>AssertionError</code> is thrown with the given message
assertServiceUnavailable
{ "repo_name": "dpishchukhin/org.knowhowlab.osgi.testing", "path": "org.knowhowlab.osgi.testing.assertions/src/main/java/org/knowhowlab/osgi/testing/assertions/ServiceAssert.java", "license": "apache-2.0", "size": 42585 }
[ "java.util.concurrent.TimeUnit", "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert", "org.knowhowlab.osgi.testing.utils.ServiceUtils" ]
import java.util.concurrent.TimeUnit; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.knowhowlab.osgi.testing.utils.ServiceUtils;
import java.util.concurrent.*; import org.hamcrest.*; import org.knowhowlab.osgi.testing.utils.*;
[ "java.util", "org.hamcrest", "org.knowhowlab.osgi" ]
java.util; org.hamcrest; org.knowhowlab.osgi;
2,203,884
public static void renameExport() { EditWindow wnd = EditWindow.getCurrent(); Highlight h = wnd.getHighlighter().getOneHighlight(); if (h == null || h.getVarKey() != Export.EXPORT_NAME || !(h.getElectricObject() instanceof Export)) { System.out.println("Must select an export name before renaming it"); ...
static void function() { EditWindow wnd = EditWindow.getCurrent(); Highlight h = wnd.getHighlighter().getOneHighlight(); if (h == null h.getVarKey() != Export.EXPORT_NAME !(h.getElectricObject() instanceof Export)) { System.out.println(STR); return; } Export pp = (Export)h.getElectricObject(); String response = JOption...
/** * Method to rename the currently selected export. */
Method to rename the currently selected export
renameExport
{ "repo_name": "imr/Electric8", "path": "com/sun/electric/tool/user/ExportChanges.java", "license": "gpl-3.0", "size": 60558 }
[ "com.sun.electric.Main", "com.sun.electric.database.hierarchy.Export", "com.sun.electric.tool.Job", "com.sun.electric.tool.user.ui.EditWindow", "javax.swing.JOptionPane" ]
import com.sun.electric.Main; import com.sun.electric.database.hierarchy.Export; import com.sun.electric.tool.Job; import com.sun.electric.tool.user.ui.EditWindow; import javax.swing.JOptionPane;
import com.sun.electric.*; import com.sun.electric.database.hierarchy.*; import com.sun.electric.tool.*; import com.sun.electric.tool.user.ui.*; import javax.swing.*;
[ "com.sun.electric", "javax.swing" ]
com.sun.electric; javax.swing;
2,388,376