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 void init(IPersistentSubscriptionStore storageService) {
Log.info("Initializing MQTT Subscription Store");
m_storageService = storageService;
//reload any subscriptions persisted
Log.trace("Reloading all stored subscriptions...subscription tree before {}", dumpTree());
... | void function(IPersistentSubscriptionStore storageService) { Log.info(STR); m_storageService = storageService; Log.trace(STR, dumpTree()); for (Subscription subscription : m_storageService.retrieveAllSubscriptions()) { Log.trace(STR, subscription.getClientId(), subscription.getTopic()); addDirect(subscription); } Log.t... | /**
* Initialize basic store structures, like the FS storage to maintain
* client's topics subscriptions
*/ | Initialize basic store structures, like the FS storage to maintain client's topics subscriptions | init | {
"repo_name": "kevoree/kevoree-telemetry",
"path": "org.kevoree.telemetry.server/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/subscriptions/SubscriptionsStore.java",
"license": "lgpl-3.0",
"size": 10684
} | [
"org.dna.mqtt.moquette.messaging.spi.IPersistentSubscriptionStore",
"org.kevoree.log.Log"
] | import org.dna.mqtt.moquette.messaging.spi.IPersistentSubscriptionStore; import org.kevoree.log.Log; | import org.dna.mqtt.moquette.messaging.spi.*; import org.kevoree.log.*; | [
"org.dna.mqtt",
"org.kevoree.log"
] | org.dna.mqtt; org.kevoree.log; | 439,642 |
public static void buildInActiveLayer(Editor editor, Object element) {
Layer layer = editor.getLayerManager().getActiveLayer();
FigAssociationClass thisFig =
(FigAssociationClass) layer.presentationFor(element);
if (thisFig != null) {
buildParts(editor, thisFig, ... | static void function(Editor editor, Object element) { Layer layer = editor.getLayerManager().getActiveLayer(); FigAssociationClass thisFig = (FigAssociationClass) layer.presentationFor(element); if (thisFig != null) { buildParts(editor, thisFig, layer); } } | /**
* Build the complex representation of an AssociationClass in the active
* layer of the current editor. This is a convenience function which is used
* when the pseudo-edge is added to a diagram via drag-and-drop or by using
* the "Add to Diagram" menu item.
*
* @param editor
... | Build the complex representation of an AssociationClass in the active layer of the current editor. This is a convenience function which is used when the pseudo-edge is added to a diagram via drag-and-drop or by using the "Add to Diagram" menu item | buildInActiveLayer | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/argouml_critics/argouml-app/src/org/argouml/uml/diagram/ui/ModeCreateAssociationClass.java",
"license": "gpl-3.0",
"size": 5991
} | [
"org.tigris.gef.base.Editor",
"org.tigris.gef.base.Layer"
] | import org.tigris.gef.base.Editor; import org.tigris.gef.base.Layer; | import org.tigris.gef.base.*; | [
"org.tigris.gef"
] | org.tigris.gef; | 2,703,520 |
public String readLine() throws IOException, CardTerminalException {
StringBuffer input = new StringBuffer();
int c;
while (((c = read()) != -1) && (c != '\n')) {
input.append((char)c);
}
if ((c == -1) && (input.length() == 0)) {
return null;
}
return input.t... | String function() throws IOException, CardTerminalException { StringBuffer input = new StringBuffer(); int c; while (((c = read()) != -1) && (c != '\n')) { input.append((char)c); } if ((c == -1) && (input.length() == 0)) { return null; } return input.toString(); } | /** Reads a line terminated by a '\n' or EOF.
*
* @return A string containing the read line.
* @exception java.io.IOException
* Thrown if an I/O error has occurred.
* @exception opencard.core.terminal.CardTerminalException
* Thrown when the smart card has been removed.... | Reads a line terminated by a '\n' or EOF | readLine | {
"repo_name": "zeroDenial/CNSReader",
"path": "ocf/opencard/opt/iso/fs/CardRandomByteAccess.java",
"license": "gpl-2.0",
"size": 23305
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,202,030 |
public void setTickMarkStroke(Stroke stroke) {
ParamChecks.nullNotPermitted(stroke, "stroke");
if (!this.tickMarkStroke.equals(stroke)) {
this.tickMarkStroke = stroke;
fireChangeEvent();
}
} | void function(Stroke stroke) { ParamChecks.nullNotPermitted(stroke, STR); if (!this.tickMarkStroke.equals(stroke)) { this.tickMarkStroke = stroke; fireChangeEvent(); } } | /**
* Sets the stroke used to draw tick marks and sends
* an {@link AxisChangeEvent} to all registered listeners.
*
* @param stroke the stroke (<code>null</code> not permitted).
*
* @see #getTickMarkStroke()
*/ | Sets the stroke used to draw tick marks and sends an <code>AxisChangeEvent</code> to all registered listeners | setTickMarkStroke | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/axis/Axis.java",
"license": "mit",
"size": 58723
} | [
"java.awt.Stroke",
"org.jfree.chart.util.ParamChecks"
] | import java.awt.Stroke; import org.jfree.chart.util.ParamChecks; | import java.awt.*; import org.jfree.chart.util.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 2,080,278 |
public List<WorkflowScheme> findSchemesByContentType(final String contentTypeId,
final User user) {
final ContentTypeAPI contentTypeAPI = APILocator.getContentTypeAPI(user);
try {
Logger.debug(this, () -> "Getting the schemes b... | List<WorkflowScheme> function(final String contentTypeId, final User user) { final ContentTypeAPI contentTypeAPI = APILocator.getContentTypeAPI(user); try { Logger.debug(this, () -> STR + contentTypeId); return this.workflowAPI.findSchemesForContentType (contentTypeAPI.find(contentTypeId)); } catch (DotDataException Do... | /**
* Find Schemes by content type id
* @param contentTypeId String
* @param user User the user that makes the request
* @return List
*/ | Find Schemes by content type id | findSchemesByContentType | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotcms/workflow/helper/WorkflowHelper.java",
"license": "gpl-3.0",
"size": 83329
} | [
"com.dotcms.contenttype.business.ContentTypeAPI",
"com.dotmarketing.business.APILocator",
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.exception.DotSecurityException",
"com.dotmarketing.portlets.workflows.business.DotWorkflowException",
"com.dotmarketing.portlets.workflows.model.Workfl... | import com.dotcms.contenttype.business.ContentTypeAPI; import com.dotmarketing.business.APILocator; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.portlets.workflows.business.DotWorkflowException; import com.dotmarketing.portlets.workf... | import com.dotcms.contenttype.business.*; import com.dotmarketing.business.*; import com.dotmarketing.exception.*; import com.dotmarketing.portlets.workflows.business.*; import com.dotmarketing.portlets.workflows.model.*; import com.dotmarketing.util.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.dotcms.contenttype",
"com.dotmarketing.business",
"com.dotmarketing.exception",
"com.dotmarketing.portlets",
"com.dotmarketing.util",
"com.liferay.portal",
"java.util"
] | com.dotcms.contenttype; com.dotmarketing.business; com.dotmarketing.exception; com.dotmarketing.portlets; com.dotmarketing.util; com.liferay.portal; java.util; | 668,355 |
this.beanResolver = beanResolver;
}
/**
* Sets the {@link ReactiveAdapterRegistry} to be used.
* @param adapterRegistry the {@link ReactiveAdapterRegistry} to use. Cannot be null.
* Default is {@link ReactiveAdapterRegistry#getSharedInstance()} | this.beanResolver = beanResolver; } /** * Sets the {@link ReactiveAdapterRegistry} to be used. * @param adapterRegistry the {@link ReactiveAdapterRegistry} to use. Cannot be null. * Default is {@link ReactiveAdapterRegistry#getSharedInstance()} | /**
* Sets the {@link BeanResolver} to be used on the expressions
* @param beanResolver the {@link BeanResolver} to use
*/ | Sets the <code>BeanResolver</code> to be used on the expressions | setBeanResolver | {
"repo_name": "djechelon/spring-security",
"path": "messaging/src/main/java/org/springframework/security/messaging/handler/invocation/reactive/AuthenticationPrincipalArgumentResolver.java",
"license": "apache-2.0",
"size": 7384
} | [
"org.springframework.core.ReactiveAdapterRegistry"
] | import org.springframework.core.ReactiveAdapterRegistry; | import org.springframework.core.*; | [
"org.springframework.core"
] | org.springframework.core; | 1,623,991 |
public Map<String, String> getDefaultValues() {
return defaultValues;
} | Map<String, String> function() { return defaultValues; } | /**
* Gets the registered default values for query parameters
*/ | Gets the registered default values for query parameters | getDefaultValues | {
"repo_name": "jonmcewen/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java",
"license": "apache-2.0",
"size": 13685
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,869,858 |
@Override
public long getUnifiedPosition() {
long position = 1;
for (SequenceSegment segment : mappingSegments) {
position = Math.max(position, segmentPosition(segment));
}
return position;
}
/**
* {@inheritDoc} | long function() { long position = 1; for (SequenceSegment segment : mappingSegments) { position = Math.max(position, segmentPosition(segment)); } return position; } /** * {@inheritDoc} | /**
* Method which return the unified position of the bookmark in the
* unified graph.
*
* @return unified position of the bookmark in the graph.
*/ | Method which return the unified position of the bookmark in the unified graph | getUnifiedPosition | {
"repo_name": "jorenham/LifeTiles",
"path": "lifetiles-graph/src/main/java/nl/tudelft/lifetiles/annotation/model/GeneAnnotation.java",
"license": "bsd-3-clause",
"size": 3093
} | [
"nl.tudelft.lifetiles.sequence.model.SequenceSegment"
] | import nl.tudelft.lifetiles.sequence.model.SequenceSegment; | import nl.tudelft.lifetiles.sequence.model.*; | [
"nl.tudelft.lifetiles"
] | nl.tudelft.lifetiles; | 1,641,877 |
public RedisTransaction renamenx(String key, String newkey, Handler<AsyncResult<String>> handler) {
delegate.renamenx(key, newkey, handler);
return this;
} | RedisTransaction function(String key, String newkey, Handler<AsyncResult<String>> handler) { delegate.renamenx(key, newkey, handler); return this; } | /**
* Rename a key, only if the new key does not exist
* @param key Key string to be renamed
* @param newkey New key string
* @param handler Handler for the result of this call.
* @return
*/ | Rename a key, only if the new key does not exist | renamenx | {
"repo_name": "brianjcj/vertx-redis-client",
"path": "src/main/generated/io/vertx/rxjava/redis/RedisTransaction.java",
"license": "apache-2.0",
"size": 184983
} | [
"io.vertx.core.AsyncResult",
"io.vertx.core.Handler"
] | import io.vertx.core.AsyncResult; import io.vertx.core.Handler; | import io.vertx.core.*; | [
"io.vertx.core"
] | io.vertx.core; | 638,632 |
public BigDecimal getNetDiscount() throws XPathExpressionException,
ParserConfigurationException, SAXException, IOException {
BigDecimal result = null;
Document doc = dataContainer.getDocument();
if (doc == null) {
return null;
}
Node costsAttribute =... | BigDecimal function() throws XPathExpressionException, ParserConfigurationException, SAXException, IOException { BigDecimal result = null; Document doc = dataContainer.getDocument(); if (doc == null) { return null; } Node costsAttribute = XMLConverter.getNodeByXPath(doc, STR); if (costsAttribute != null) { String costs... | /**
* Returns the net amount discount of this billing result. The XML may
* contain multiple price models with multiple discounts. Currently, only
* the first is returned.
*/ | Returns the net amount discount of this billing result. The XML may contain multiple price models with multiple discounts. Currently, only the first is returned | getNetDiscount | {
"repo_name": "opetrovski/development",
"path": "oscm-domainobjects/javasrc/org/oscm/domobjects/BillingResult.java",
"license": "apache-2.0",
"size": 12391
} | [
"java.io.IOException",
"java.math.BigDecimal",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.xpath.XPathExpressionException",
"org.oscm.converter.XMLConverter",
"org.w3c.dom.Document",
"org.w3c.dom.Node",
"org.xml.sax.SAXException"
] | import java.io.IOException; import java.math.BigDecimal; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathExpressionException; import org.oscm.converter.XMLConverter; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.xml.sax.SAXException; | import java.io.*; import java.math.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.oscm.converter.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"java.math",
"javax.xml",
"org.oscm.converter",
"org.w3c.dom",
"org.xml.sax"
] | java.io; java.math; javax.xml; org.oscm.converter; org.w3c.dom; org.xml.sax; | 1,070,375 |
public static String toString(Object object, final String tagName) throws JSONException {
final StringBuilder sb = new StringBuilder();
int i;
JSONArray ja;
JSONObject jo;
String key;
Iterator<String> keys;
int length;
String string;
Object val... | static String function(Object object, final String tagName) throws JSONException { final StringBuilder sb = new StringBuilder(); int i; JSONArray ja; JSONObject jo; String key; Iterator<String> keys; int length; String string; Object value; if (object instanceof JSONObject) { if (tagName != null) { sb.append('<'); sb.a... | /**
* Convert a JSONObject into a well-formed, element-normal XML string.
*
* @param object A JSONObject.
* @param tagName The optional name of the enclosing tag.
*
* @return A string.
*
* @throws JSONException
*/ | Convert a JSONObject into a well-formed, element-normal XML string | toString | {
"repo_name": "Litss/PlotSquared",
"path": "src/main/java/com/intellectualcrafters/json/XML.java",
"license": "gpl-3.0",
"size": 14178
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,726,794 |
private boolean contains(NodeSet nodeset, RMNode node) {
if (nodeset == null)
return false;
for (Node n : nodeset) {
try {
if (n.getNodeInformation().getURL().equals(node.getNodeURL())) {
return true;
}
} catch ... | boolean function(NodeSet nodeset, RMNode node) { if (nodeset == null) return false; for (Node n : nodeset) { try { if (n.getNodeInformation().getURL().equals(node.getNodeURL())) { return true; } } catch (Exception e) { continue; } } return false; } | /**
* Return true if node contains the node set.
*
* @param nodeset
* - a list of nodes to inspect
* @param node
* - a node to find
* @return true if node contains the node set.
*/ | Return true if node contains the node set | contains | {
"repo_name": "yinan-liu/scheduling",
"path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/selection/SelectionManager.java",
"license": "agpl-3.0",
"size": 28623
} | [
"org.objectweb.proactive.core.node.Node",
"org.ow2.proactive.resourcemanager.rmnode.RMNode",
"org.ow2.proactive.utils.NodeSet"
] | import org.objectweb.proactive.core.node.Node; import org.ow2.proactive.resourcemanager.rmnode.RMNode; import org.ow2.proactive.utils.NodeSet; | import org.objectweb.proactive.core.node.*; import org.ow2.proactive.resourcemanager.rmnode.*; import org.ow2.proactive.utils.*; | [
"org.objectweb.proactive",
"org.ow2.proactive"
] | org.objectweb.proactive; org.ow2.proactive; | 2,852,013 |
protected String getScript(Component component) {
return "var $this = $('#" + component.getMarkupId() + "');"
// + "$this.on('paste', function(event) {console.log(event); setTimeout(function(){$this.change();},1);});"
+ "$this.on('drop', function(event) {"
+ " event.prevent... | String function(Component component) { return STR + component.getMarkupId() + "');" + STR + STR + STR + STR + jsonOptions + ");" + STR + "});" + STR + jsonOptions + ");"; } | /**
* <p>Retorna o <i>script</i> gerado para este <i>behavior</i>.</p>
*
* @param component componente o qual este <i>behavior</i> deverá ser adicionado.
* @return o <i>javascript</i> gerado.
*/ | Retorna o script gerado para este behavior | getScript | {
"repo_name": "opensingular/singular-core",
"path": "form/wicket/src/main/java/org/opensingular/form/wicket/behavior/InputMaskBehavior.java",
"license": "apache-2.0",
"size": 9453
} | [
"org.apache.wicket.Component"
] | import org.apache.wicket.Component; | import org.apache.wicket.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 435,374 |
public Builder withReasonCodeAndValue(KiePMMLReasonCodeAndValue reasonCodeAndValue) {
this.toBuild.reasonCodeAndValue = reasonCodeAndValue;
return this;
} | Builder function(KiePMMLReasonCodeAndValue reasonCodeAndValue) { this.toBuild.reasonCodeAndValue = reasonCodeAndValue; return this; } | /**
* Add the given <b>reasonCode</b> to the ordered map of matched reason codes.
* <p>
* (rhs)
* <p><code$outputFieldsMap.put("_reasonCodeAndValue.reasonCode_", "__reasonCodeAndValue.value_");</code></p>
* @param reasonCodeAndValue
* @return
*/ | Add the given reasonCode to the ordered map of matched reason codes. (rhs) | withReasonCodeAndValue | {
"repo_name": "lanceleverich/drools",
"path": "kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/ast/KiePMMLDroolsRule.java",
"license": "apache-2.0",
"size": 19297
} | [
"org.kie.pmml.models.drools.tuples.KiePMMLReasonCodeAndValue"
] | import org.kie.pmml.models.drools.tuples.KiePMMLReasonCodeAndValue; | import org.kie.pmml.models.drools.tuples.*; | [
"org.kie.pmml"
] | org.kie.pmml; | 1,106,905 |
@XmlElement(name="pdp_per_row")
@XmlJavaTypeAdapter(LongAdapter.class)
public Long getPdpPerRow() {
return pdpPerRow;
} | @XmlElement(name=STR) @XmlJavaTypeAdapter(LongAdapter.class) Long function() { return pdpPerRow; } | /**
* Gets the PDP (Primary Data Points) per row.
*
* @return the PDP (Primary Data Points) per row
*/ | Gets the PDP (Primary Data Points) per row | getPdpPerRow | {
"repo_name": "aihua/opennms",
"path": "opennms-rrd/opennms-rrd-model/src/main/java/org/opennms/netmgt/rrd/model/AbstractRRA.java",
"license": "agpl-3.0",
"size": 4523
} | [
"javax.xml.bind.annotation.XmlElement",
"javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter"
] | import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; | import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.*; | [
"javax.xml"
] | javax.xml; | 2,242,094 |
public Map<String, String> queryDbpediaForExtraInfo(String dbpediaUri) {
Map<String, String> dbpediaAttribute2value = new HashMap<String, String>();
String ontology_service = this.dbpediaEndpoint;
String endpoint = "otee:Endpoints";
String endpointsSparql = "PREFIX dbp-prop: <http://dbpedia.org/propert... | Map<String, String> function(String dbpediaUri) { Map<String, String> dbpediaAttribute2value = new HashMap<String, String>(); String ontology_service = this.dbpediaEndpoint; String endpoint = STR; String endpointsSparql = STR dbpedia-owl:thumbnail ?mediaUrl; foaf:isPrimaryTopicOf ?externalLink.} LIMIT 1STRSTRSTRmediaUr... | /**
* Given a dbpedia uri, extracts extra infos. At the moment the extra infos
* are the mediaUrl and the external wikipedia link
**/ | Given a dbpedia uri, extracts extra infos. At the moment the extra infos are the mediaUrl and the external wikipedia link | queryDbpediaForExtraInfo | {
"repo_name": "AlessioDeAngelis/PolarGraph",
"path": "PolarGraph/src/it/uniroma3/dia/cicero/rdf/JenaManager.java",
"license": "gpl-2.0",
"size": 26384
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,618,078 |
public Predicate<HibBucketableElement> filter() {
return element -> {
Integer bucketId = element.getBucketId();
return isWithin(bucketId);
};
} | Predicate<HibBucketableElement> function() { return element -> { Integer bucketId = element.getBucketId(); return isWithin(bucketId); }; } | /**
* Filter all elements which are within the bucket.
*
* @return
*/ | Filter all elements which are within the bucket | filter | {
"repo_name": "gentics/mesh",
"path": "mdm/api/src/main/java/com/gentics/mesh/core/data/Bucket.java",
"license": "apache-2.0",
"size": 2247
} | [
"java.util.function.Predicate"
] | import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 606,493 |
public static CacheConfiguration hadoopSystemCache() {
CacheConfiguration cache = new CacheConfiguration();
cache.setName(CU.SYS_CACHE_HADOOP_MR);
cache.setCacheMode(REPLICATED);
cache.setAtomicityMode(TRANSACTIONAL);
cache.setWriteSynchronizationMode(FULL_SYNC);
ca... | static CacheConfiguration function() { CacheConfiguration cache = new CacheConfiguration(); cache.setName(CU.SYS_CACHE_HADOOP_MR); cache.setCacheMode(REPLICATED); cache.setAtomicityMode(TRANSACTIONAL); cache.setWriteSynchronizationMode(FULL_SYNC); cache.setEvictionPolicy(null); cache.setSwapEnabled(false); cache.setCac... | /**
* Create system cache used by Hadoop component.
*
* @return Hadoop cache configuration.
*/ | Create system cache used by Hadoop component | hadoopSystemCache | {
"repo_name": "agura/incubator-ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java",
"license": "apache-2.0",
"size": 61699
} | [
"org.apache.ignite.configuration.CacheConfiguration"
] | import org.apache.ignite.configuration.CacheConfiguration; | import org.apache.ignite.configuration.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 433,049 |
public Shape getLegendLine() {
return this.legendLine;
}
| Shape function() { return this.legendLine; } | /**
* Returns the shape used to represent a line in the legend.
*
* @return The legend line (never <code>null</code>).
*
* @see #setLegendLine(Shape)
*/ | Returns the shape used to represent a line in the legend | getLegendLine | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/renderer/DefaultPolarItemRenderer.java",
"license": "lgpl-2.1",
"size": 33651
} | [
"java.awt.Shape"
] | import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,604,273 |
public static void setListViewHeightBasedOnChildren(ListView listView) {
ListAdapter listAdapter = listView.getAdapter();
if (listAdapter == null)
return;
int desiredWidth = View.MeasureSpec.makeMeasureSpec(listView.getWidth(), View.MeasureSpec.UNSPECIFIED);
listView.mea... | static void function(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) return; int desiredWidth = View.MeasureSpec.makeMeasureSpec(listView.getWidth(), View.MeasureSpec.UNSPECIFIED); listView.measure(desiredWidth, View.MeasureSpec.UNSPECIFIED); int listHeight = listView.getM... | /**** Method for Setting the Height of the ListView dynamically.
**** Hack to fix the issue of not showing all the items of the ListView
**** when placed inside a ScrollView
**** This method was taken from the internet - http://stackoverflow.com/questions/18367522/android-list-view-inside-a-scroll-view *... | Method for Setting the Height of the ListView dynamically. Hack to fix the issue of not showing all the items of the ListView when placed inside a ScrollView | setListViewHeightBasedOnChildren | {
"repo_name": "barakyoresh/AlzheimerTest",
"path": "app/src/main/java/com/alztest/alztest/Prefrences/AlzTestPrefrencesFragment.java",
"license": "bsd-2-clause",
"size": 18853
} | [
"android.view.View",
"android.view.ViewGroup",
"android.widget.ListAdapter",
"android.widget.ListView"
] | import android.view.View; import android.view.ViewGroup; import android.widget.ListAdapter; import android.widget.ListView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 2,234,263 |
@Override
protected final void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mOnCreateTimestampMs = SystemClock.elapsedRealtime();
mOnCreateTimestampUptimeMs = SystemClock.uptimeMillis();
mSavedInstanceState = savedInstanceState;
ChromeBrowser... | final void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mOnCreateTimestampMs = SystemClock.elapsedRealtime(); mOnCreateTimestampUptimeMs = SystemClock.uptimeMillis(); mSavedInstanceState = savedInstanceState; ChromeBrowserInitializer.getInstance(this).handlePreNativeStartup(this); } | /**
* Extending classes should override {@link AsyncInitializationActivity#preInflationStartup()},
* {@link AsyncInitializationActivity#setContentView()} and
* {@link AsyncInitializationActivity#postInflationStartup()} instead of this call which will
* be called on that order.
*/ | Extending classes should override <code>AsyncInitializationActivity#preInflationStartup()</code>, <code>AsyncInitializationActivity#setContentView()</code> and <code>AsyncInitializationActivity#postInflationStartup()</code> instead of this call which will be called on that order | onCreate | {
"repo_name": "hefen1/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java",
"license": "bsd-3-clause",
"size": 8434
} | [
"android.os.Bundle",
"android.os.SystemClock"
] | import android.os.Bundle; import android.os.SystemClock; | import android.os.*; | [
"android.os"
] | android.os; | 2,058,018 |
public String getDestination(String function, YellowpagesSessionController scc, HttpServletRequest request) {
SilverTrace.info("yellowpages", "YellowpagesRequestRooter.getDestination()", "root.MSG_GEN_ENTER_METHOD");
SilverTrace.info("yellowpages", "YellowpagesRequestRooter.getDestination()", "root.MSG_GEN_... | String function(String function, YellowpagesSessionController scc, HttpServletRequest request) { SilverTrace.info(STR, STR, STR); SilverTrace.info(STR, STR, STR, STR + function); String destination = STR/yellowpages/jsp/STRProfileSTRMainSTRGoToSTRGoToSTRIdSTRActionSTRgroup_STR0STR1STR0STRTypeSearchSTRSearchCriteriaSTRC... | /**
* This method has to be implemented by the component request rooter it has to compute a
* destination page
*
* @param function The entering request function (ex : "Main.jsp")
* @param scc The component Session Control, build and initialised.
* @return The complete destination URL for a fo... | This method has to be implemented by the component request rooter it has to compute a destination page | getDestination | {
"repo_name": "stephaneperry/Silverpeas-Components",
"path": "yellowpages/yellowpages-war/src/main/java/com/stratelia/webactiv/yellowpages/servlets/YellowpagesRequestRouter.java",
"license": "agpl-3.0",
"size": 23826
} | [
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"com.stratelia.webactiv.yellowpages.control.YellowpagesSessionController",
"javax.servlet.http.HttpServletRequest"
] | import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.yellowpages.control.YellowpagesSessionController; import javax.servlet.http.HttpServletRequest; | import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.yellowpages.control.*; import javax.servlet.http.*; | [
"com.stratelia.silverpeas",
"com.stratelia.webactiv",
"javax.servlet"
] | com.stratelia.silverpeas; com.stratelia.webactiv; javax.servlet; | 2,763,425 |
public static Repository getRepostory() throws IOException {
Repository repo;
FileRepositoryBuilder repositoryBuilder = new FileRepositoryBuilder();
repo = repositoryBuilder.findGitDir().build();
return repo;
} | static Repository function() throws IOException { Repository repo; FileRepositoryBuilder repositoryBuilder = new FileRepositoryBuilder(); repo = repositoryBuilder.findGitDir().build(); return repo; } | /**
* Fetches an existing repository.
*
* @return existing repository.
* @throws IOException IO errors when unable to find existing repo
*/ | Fetches an existing repository | getRepostory | {
"repo_name": "ECSE456-G29/Untitled",
"path": "src/main/java/backend/Repo.java",
"license": "epl-1.0",
"size": 10153
} | [
"java.io.IOException",
"org.eclipse.jgit.lib.Repository",
"org.eclipse.jgit.storage.file.FileRepositoryBuilder"
] | import java.io.IOException; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.storage.file.FileRepositoryBuilder; | import java.io.*; import org.eclipse.jgit.lib.*; import org.eclipse.jgit.storage.file.*; | [
"java.io",
"org.eclipse.jgit"
] | java.io; org.eclipse.jgit; | 1,554,171 |
public static int read(InputStream is, byte[] buffer, int offset, int length) throws IOException {
int remaining = length;
while ( remaining > 0 ) {
int location = ( length - remaining );
int count = is.read( buffer, location, remaining );
if ( -1 == count ) { // ... | static int function(InputStream is, byte[] buffer, int offset, int length) throws IOException { int remaining = length; while ( remaining > 0 ) { int location = ( length - remaining ); int count = is.read( buffer, location, remaining ); if ( -1 == count ) { break; } remaining -= count; } return length - remaining; } | /**
* Read as much as possible into buffer.
*
* @param is the stream to read from
* @param buffer output buffer
* @param offset offset into buffer
* @param length number of bytes to read
*
* @return the number of bytes actually read
* @throws IOException if some I/O errors o... | Read as much as possible into buffer | read | {
"repo_name": "aksivaram2k2/jmeter-trunk",
"path": "src/jorphan/org/apache/jorphan/util/JOrphanUtils.java",
"license": "apache-2.0",
"size": 18915
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,867,871 |
public static <F2> TagProtocol<Tuple2<QName,F2>> tagNameAnd(Protocol<XMLEvent,F2> p2) {
return tagName(p2, Tuple::of, Tuple2::_1, Tuple2::_2);
} | static <F2> TagProtocol<Tuple2<QName,F2>> function(Protocol<XMLEvent,F2> p2) { return tagName(p2, Tuple::of, Tuple2::_1, Tuple2::_2); } | /**
* Reads and writes a tag with any name and inner protocols using [p*], represented by a Tuple2.
*/ | Reads and writes a tag with any name and inner protocols using [p*], represented by a Tuple2 | tagNameAnd | {
"repo_name": "Tradeshift/ts-reaktive",
"path": "ts-reaktive-marshal/src/main/java/com/tradeshift/reaktive/xml/XMLProtocol.java",
"license": "mit",
"size": 22485
} | [
"com.tradeshift.reaktive.marshal.Protocol",
"io.vavr.Tuple",
"io.vavr.Tuple2",
"javax.xml.namespace.QName",
"javax.xml.stream.events.XMLEvent"
] | import com.tradeshift.reaktive.marshal.Protocol; import io.vavr.Tuple; import io.vavr.Tuple2; import javax.xml.namespace.QName; import javax.xml.stream.events.XMLEvent; | import com.tradeshift.reaktive.marshal.*; import io.vavr.*; import javax.xml.namespace.*; import javax.xml.stream.events.*; | [
"com.tradeshift.reaktive",
"io.vavr",
"javax.xml"
] | com.tradeshift.reaktive; io.vavr; javax.xml; | 785,609 |
public Properties toProperties(boolean includeDSProperties) {
Properties props = new Properties();
props.setProperty(AUTO_CONNECT_NAME, toString(AUTO_CONNECT_NAME, getAutoConnect()));
props.setProperty(HTTP_ENABLED_NAME, toString(HTTP_ENABLED_NAME, isHttpEnabled()));
props.setProperty(HTTP_BIND_ADDR... | Properties function(boolean includeDSProperties) { Properties props = new Properties(); props.setProperty(AUTO_CONNECT_NAME, toString(AUTO_CONNECT_NAME, getAutoConnect())); props.setProperty(HTTP_ENABLED_NAME, toString(HTTP_ENABLED_NAME, isHttpEnabled())); props.setProperty(HTTP_BIND_ADDRESS_NAME, toString(HTTP_BIND_AD... | /**
* Converts the contents of this config to a property instance.
*
* @param includeDSProperties Should distributed system properties be included in the
* <code>Properties</code> object? See bug 32682.
*
* @return contents of this config as java.util.Properties
*/ | Converts the contents of this config to a property instance | toProperties | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentConfigImpl.java",
"license": "apache-2.0",
"size": 65604
} | [
"java.util.Iterator",
"java.util.Properties",
"org.apache.geode.admin.DistributionLocatorConfig"
] | import java.util.Iterator; import java.util.Properties; import org.apache.geode.admin.DistributionLocatorConfig; | import java.util.*; import org.apache.geode.admin.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 1,532,848 |
public static void printResults(
PowerDatacenter datacenter,
List<Vm> vms,
double lastClock,
String experimentName,
boolean outputInCsv,
String outputFolder) {
Log.enable();
List<Host> hosts = datacenter.getHostList();
int numberOfHosts = hosts.size();
int numberOfVms = vms.size... | static void function( PowerDatacenter datacenter, List<Vm> vms, double lastClock, String experimentName, boolean outputInCsv, String outputFolder) { Log.enable(); List<Host> hosts = datacenter.getHostList(); int numberOfHosts = hosts.size(); int numberOfVms = vms.size(); double totalSimulationTime = lastClock; double e... | /**
* Prints the results.
*
* @param datacenter the datacenter
* @param lastClock the last clock
* @param experimentName the experiment name
* @param outputInCsv the output in csv
* @param outputFolder the output folder
*/ | Prints the results | printResults | {
"repo_name": "Sukoon-Sharma/OpenSim",
"path": "src/org/cloudbus/cloudsim/examples/power/Helper.java",
"license": "lgpl-3.0",
"size": 27576
} | [
"java.io.File",
"java.util.List",
"java.util.Map",
"org.cloudbus.cloudsim.Host",
"org.cloudbus.cloudsim.Log",
"org.cloudbus.cloudsim.Vm",
"org.cloudbus.cloudsim.power.PowerDatacenter",
"org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract",
"org.cloudbus.cloudsim.util.MathUtil"
] | import java.io.File; import java.util.List; import java.util.Map; import org.cloudbus.cloudsim.Host; import org.cloudbus.cloudsim.Log; import org.cloudbus.cloudsim.Vm; import org.cloudbus.cloudsim.power.PowerDatacenter; import org.cloudbus.cloudsim.power.PowerVmAllocationPolicyMigrationAbstract; import org.cloudbus.clo... | import java.io.*; import java.util.*; import org.cloudbus.cloudsim.*; import org.cloudbus.cloudsim.power.*; import org.cloudbus.cloudsim.util.*; | [
"java.io",
"java.util",
"org.cloudbus.cloudsim"
] | java.io; java.util; org.cloudbus.cloudsim; | 2,232,606 |
public boolean canViewHidden() {
boolean canViewHidden= false;
try {
Site site = SiteService.getSite(ToolManager.getCurrentPlacement().getContext());
canViewHidden= SecurityService.unlock(
ContentHostingService.AUTH_RESOURCE_HIDDEN, site.getReference());
} catch (Id... | boolean function() { boolean canViewHidden= false; try { Site site = SiteService.getSite(ToolManager.getCurrentPlacement().getContext()); canViewHidden= SecurityService.unlock( ContentHostingService.AUTH_RESOURCE_HIDDEN, site.getReference()); } catch (IdUnusedException e) { logger.debug(STR); } return canViewHidden; } | /**
* Check if you have 'content.view.hidden' in the site
* @return true if can view hidden
*/ | Check if you have 'content.view.hidden' in the site | canViewHidden | {
"repo_name": "kingmook/sakai",
"path": "content/content-tool/tool/src/java/org/sakaiproject/content/tool/ResourcesAction.java",
"license": "apache-2.0",
"size": 336184
} | [
"org.sakaiproject.authz.cover.SecurityService",
"org.sakaiproject.content.cover.ContentHostingService",
"org.sakaiproject.exception.IdUnusedException",
"org.sakaiproject.site.api.Site",
"org.sakaiproject.site.cover.SiteService",
"org.sakaiproject.tool.cover.ToolManager"
] | import org.sakaiproject.authz.cover.SecurityService; import org.sakaiproject.content.cover.ContentHostingService; import org.sakaiproject.exception.IdUnusedException; import org.sakaiproject.site.api.Site; import org.sakaiproject.site.cover.SiteService; import org.sakaiproject.tool.cover.ToolManager; | import org.sakaiproject.authz.cover.*; import org.sakaiproject.content.cover.*; import org.sakaiproject.exception.*; import org.sakaiproject.site.api.*; import org.sakaiproject.site.cover.*; import org.sakaiproject.tool.cover.*; | [
"org.sakaiproject.authz",
"org.sakaiproject.content",
"org.sakaiproject.exception",
"org.sakaiproject.site",
"org.sakaiproject.tool"
] | org.sakaiproject.authz; org.sakaiproject.content; org.sakaiproject.exception; org.sakaiproject.site; org.sakaiproject.tool; | 775,057 |
public com.mozu.api.contracts.content.DocumentCollection getViewDocuments(String documentListName, String viewName, String filter, String sortBy, Integer pageSize, Integer startIndex, String responseFields) throws Exception
{
MozuClient<com.mozu.api.contracts.content.DocumentCollection> client = com.mozu.api.clie... | com.mozu.api.contracts.content.DocumentCollection function(String documentListName, String viewName, String filter, String sortBy, Integer pageSize, Integer startIndex, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentCollection> client = com.mozu.api.clients.content.documentl... | /**
*
* <p><pre><code>
* View view = new View();
* DocumentCollection documentCollection = view.getViewDocuments( documentListName, viewName, filter, sortBy, pageSize, startIndex, responseFields);
* </code></pre></p>
* @param documentListName
* @param filter A set of expressions that consist of a ... | <code><code> View view = new View(); DocumentCollection documentCollection = view.getViewDocuments( documentListName, viewName, filter, sortBy, pageSize, startIndex, responseFields); </code></code> | getViewDocuments | {
"repo_name": "eileenzhuang1/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/resources/content/documentlists/ViewResource.java",
"license": "mit",
"size": 2835
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,018,950 |
public Collection<String> getHostedLocators(InternalDistributedMember member) {
synchronized (this.membersLock) {
return this.hostedLocatorsAll.get(member);
}
} | Collection<String> function(InternalDistributedMember member) { synchronized (this.membersLock) { return this.hostedLocatorsAll.get(member); } } | /**
* Gets the value in {@link #hostedLocatorsAll} for a member with one or more
* hosted locators. The value is a collection of host[port] strings. If a
* bind-address was used for a locator then the form is bind-addr[port].
*
* @since 6.6.3
*/ | Gets the value in <code>#hostedLocatorsAll</code> for a member with one or more hosted locators. The value is a collection of host[port] strings. If a bind-address was used for a locator then the form is bind-addr[port] | getHostedLocators | {
"repo_name": "robertgeiger/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java",
"license": "apache-2.0",
"size": 176592
} | [
"com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember",
"java.util.Collection"
] | import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; import java.util.Collection; | import com.gemstone.gemfire.distributed.internal.membership.*; import java.util.*; | [
"com.gemstone.gemfire",
"java.util"
] | com.gemstone.gemfire; java.util; | 2,767,295 |
public List<String> getPreTriggerInclude() {
return preTriggerInclude;
} | List<String> function() { return preTriggerInclude; } | /**
* Gets the triggers to be invoked before the operation.
*
* @return the triggers to be invoked before the operation.
*/ | Gets the triggers to be invoked before the operation | getPreTriggerInclude | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosItemRequestOptions.java",
"license": "mit",
"size": 17335
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 838,096 |
private void writeFile(File file, byte[] input, CompressionMode mode) throws IOException {
try (OutputStream os = getStreamForMode(mode, new FileOutputStream(file))) {
os.write(input);
}
} | void function(File file, byte[] input, CompressionMode mode) throws IOException { try (OutputStream os = getStreamForMode(mode, new FileOutputStream(file))) { os.write(input); } } | /**
* Writes a single output file.
*/ | Writes a single output file | writeFile | {
"repo_name": "dhananjaypatkar/DataflowJavaSDK",
"path": "sdk/src/test/java/com/google/cloud/dataflow/sdk/io/CompressedSourceTest.java",
"license": "apache-2.0",
"size": 7298
} | [
"com.google.cloud.dataflow.sdk.io.CompressedSource",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import com.google.cloud.dataflow.sdk.io.CompressedSource; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; | import com.google.cloud.dataflow.sdk.io.*; import java.io.*; | [
"com.google.cloud",
"java.io"
] | com.google.cloud; java.io; | 730,511 |
@SuppressWarnings("unchecked")
public List<Usuario> listarPorRole(String role) {
if (trace) {
logger.trace(String.format(
"Listar usuarios por role=%s", role));
}
List<Usuario> list = null;
Query q = null;
try {
q = em.createQuery("from Usuario where role like :role");
q.setParamet... | @SuppressWarnings(STR) List<Usuario> function(String role) { if (trace) { logger.trace(String.format( STR, role)); } List<Usuario> list = null; Query q = null; try { q = em.createQuery(STR); q.setParameter("role", role); list = (List<Usuario>) q.getResultList(); } catch (Exception e) { if (trace) { logger.trace(STR, e)... | /**
* Lista Usuarios por Role.
* @param role Role dos usuarios.
* @return Lista de Usuarios.
*/ | Lista Usuarios por Role | listarPorRole | {
"repo_name": "robsonsmartins/fiap-mba-java-projects",
"path": "source/tcc.fiap.jboss7/BancoSeguroCommon/src/banco/dao/UsuarioDAO.java",
"license": "gpl-3.0",
"size": 4610
} | [
"java.util.List",
"javax.persistence.Query"
] | import java.util.List; import javax.persistence.Query; | import java.util.*; import javax.persistence.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 152,549 |
public void assertRegionOnlyOnServer(
final HRegionInfo hri, final ServerName server,
final long timeout) throws IOException, InterruptedException {
long timeoutTime = System.currentTimeMillis() + timeout;
while (true) {
List<HRegionInfo> regions = getHBaseAdmin().getOnlineRegions(server);
... | void function( final HRegionInfo hri, final ServerName server, final long timeout) throws IOException, InterruptedException { long timeoutTime = System.currentTimeMillis() + timeout; while (true) { List<HRegionInfo> regions = getHBaseAdmin().getOnlineRegions(server); if (regions.contains(hri)) { List<JVMClusterUtil.Reg... | /**
* Check to make sure the region is open on the specified
* region server, but not on any other one.
*/ | Check to make sure the region is open on the specified region server, but not on any other one | assertRegionOnlyOnServer | {
"repo_name": "StackVista/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 142672
} | [
"java.io.IOException",
"java.util.Collection",
"java.util.List",
"org.apache.hadoop.hbase.regionserver.HRegion",
"org.apache.hadoop.hbase.regionserver.HRegionServer",
"org.apache.hadoop.hbase.util.JVMClusterUtil",
"org.junit.Assert"
] | import java.io.IOException; import java.util.Collection; import java.util.List; import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hbase.util.JVMClusterUtil; import org.junit.Assert; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 2,238,662 |
public NamedNodeMap getNotations() {
if (needsSyncChildren()) {
synchronizeChildren();
}
return notations;
}
//
// Public methods
// | NamedNodeMap function() { if (needsSyncChildren()) { synchronizeChildren(); } return notations; } // | /**
* Access the collection of Notations defined in the DTD. A
* notation declares, by name, the format of an XML unparsed entity
* or is used to formally declare a Processing Instruction target.
*/ | Access the collection of Notations defined in the DTD. A notation declares, by name, the format of an XML unparsed entity or is used to formally declare a Processing Instruction target | getNotations | {
"repo_name": "jimma/xerces",
"path": "src/org/apache/xerces/dom/DocumentTypeImpl.java",
"license": "apache-2.0",
"size": 14088
} | [
"org.w3c.dom.NamedNodeMap"
] | import org.w3c.dom.NamedNodeMap; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,882,047 |
@InterfaceAudience.LimitedPrivate("vert.x")
void flush(); | @InterfaceAudience.LimitedPrivate(STR) void flush(); | /**
* internal experimental api
*/ | internal experimental api | flush | {
"repo_name": "eBaoTech/pinpoint",
"path": "bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/context/Trace.java",
"license": "apache-2.0",
"size": 1731
} | [
"com.navercorp.pinpoint.common.annotations.InterfaceAudience"
] | import com.navercorp.pinpoint.common.annotations.InterfaceAudience; | import com.navercorp.pinpoint.common.annotations.*; | [
"com.navercorp.pinpoint"
] | com.navercorp.pinpoint; | 1,550,525 |
protected void addDeltaProcessorCrankNicolson(Processor proc)
{
if (UpdaterDelta.class.isInstance(proc) && UpdaterCrankNicolson.class.isInstance(proc))
{
deltaProcessorCrankNicolsonUpdaters.add((UpdaterCrankNicolson)proc);
}
else if (ProcessorDoubleDelta.class.isInstance(pr... | void function(Processor proc) { if (UpdaterDelta.class.isInstance(proc) && UpdaterCrankNicolson.class.isInstance(proc)) { deltaProcessorCrankNicolsonUpdaters.add((UpdaterCrankNicolson)proc); } else if (ProcessorDoubleDelta.class.isInstance(proc)) { deltaProcessorCrankNicolsonUpdaters.add(new UpdaterCrankNicolsonHelper(... | /**
* Add to the list of crank nicolson trade processor if the appropriate type
*
* @param proc
*/ | Add to the list of crank nicolson trade processor if the appropriate type | addDeltaProcessorCrankNicolson | {
"repo_name": "robpayn/chsm",
"path": "src/main/java/org/payn/chsm/processors/finitedifference/ControllerCrankNicolson.java",
"license": "gpl-3.0",
"size": 4559
} | [
"org.payn.chsm.processors.Processor",
"org.payn.chsm.processors.finitedifference.interfaces.UpdaterCrankNicolson",
"org.payn.chsm.processors.finitedifference.interfaces.UpdaterDelta"
] | import org.payn.chsm.processors.Processor; import org.payn.chsm.processors.finitedifference.interfaces.UpdaterCrankNicolson; import org.payn.chsm.processors.finitedifference.interfaces.UpdaterDelta; | import org.payn.chsm.processors.*; import org.payn.chsm.processors.finitedifference.interfaces.*; | [
"org.payn.chsm"
] | org.payn.chsm; | 1,592,748 |
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String privateCloudName) {
deleteAsync(resourceGroupName, privateCloudName).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) void function(String resourceGroupName, String privateCloudName) { deleteAsync(resourceGroupName, privateCloudName).block(); } | /**
* Delete a private cloud.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if... | Delete a private cloud | delete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java",
"license": "mit",
"size": 106842
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 1,926,093 |
public Name add(int posn, String comp) throws InvalidNameException {
Rdn rdn = (new Rfc2253Parser(comp)).parseRdn();
rdns.add(posn, rdn);
unparsed = null; // no longer valid
return this;
} | Name function(int posn, String comp) throws InvalidNameException { Rdn rdn = (new Rfc2253Parser(comp)).parseRdn(); rdns.add(posn, rdn); unparsed = null; return this; } | /**
* Adds a single component at a specified position within this
* LDAP name.
* Components of this LDAP name at or after the index (if any) of the new
* component are shifted up by one (away from index 0) to accommodate
* the new component.
*
* @param comp The non-null component... | Adds a single component at a specified position within this LDAP name. Components of this LDAP name at or after the index (if any) of the new component are shifted up by one (away from index 0) to accommodate the new component | add | {
"repo_name": "andreagenso/java2scala",
"path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/javax/naming/ldap/LdapName.java",
"license": "apache-2.0",
"size": 29197
} | [
"javax.naming.InvalidNameException",
"javax.naming.Name"
] | import javax.naming.InvalidNameException; import javax.naming.Name; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 460,168 |
@Override
public List<NetappVolumeVO> listVolumesOnFiler(String poolName) {
List<NetappVolumeVO> vols = _volumeDao.listVolumesAscending(poolName);
for (NetappVolumeVO vol : vols) {
try {
String snapScheduleOnFiler = returnSnapshotSchedule(vol);
vol.s... | List<NetappVolumeVO> function(String poolName) { List<NetappVolumeVO> vols = _volumeDao.listVolumesAscending(poolName); for (NetappVolumeVO vol : vols) { try { String snapScheduleOnFiler = returnSnapshotSchedule(vol); vol.setSnapshotPolicy(snapScheduleOnFiler); } catch (ServerException e) { s_logger.warn(STR + vol.getV... | /**
* This method lists all the volumes by pool name
* @param poolName
* @return -- volumes in that pool
*/ | This method lists all the volumes by pool name | listVolumesOnFiler | {
"repo_name": "ikoula/cloudstack",
"path": "plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java",
"license": "gpl-2.0",
"size": 38652
} | [
"java.rmi.ServerException",
"java.util.List"
] | import java.rmi.ServerException; import java.util.List; | import java.rmi.*; import java.util.*; | [
"java.rmi",
"java.util"
] | java.rmi; java.util; | 2,639,532 |
public static AppInfoCache getInstance() {
CarbonUtils.checkSecurity();
if (instance == null) {
synchronized (AppInfoCache.class) {
if (instance == null) {
instance = new AppInfoCache();
}
}
}
return instance... | static AppInfoCache function() { CarbonUtils.checkSecurity(); if (instance == null) { synchronized (AppInfoCache.class) { if (instance == null) { instance = new AppInfoCache(); } } } return instance; } | /**
* Returns AppInfoCache instance
*
* @return instance of OAuthAppInfoCache
*/ | Returns AppInfoCache instance | getInstance | {
"repo_name": "thariyarox/carbon-identity",
"path": "components/oauth/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/cache/AppInfoCache.java",
"license": "apache-2.0",
"size": 1673
} | [
"org.wso2.carbon.utils.CarbonUtils"
] | import org.wso2.carbon.utils.CarbonUtils; | import org.wso2.carbon.utils.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 662,813 |
public RouteTableInner beginUpdateTags(String resourceGroupName, String routeTableName, Map<String, String> tags) {
return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().single().body();
} | RouteTableInner function(String resourceGroupName, String routeTableName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().single().body(); } | /**
* Updates a route table tags.
*
* @param resourceGroupName The name of the resource group.
* @param routeTableName The name of the route table.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown ... | Updates a route table tags | beginUpdateTags | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/RouteTablesInner.java",
"license": "mit",
"size": 75681
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 709,862 |
public Map<String, AutomaticTuningOptions> options() {
return this.options;
} | Map<String, AutomaticTuningOptions> function() { return this.options; } | /**
* Get automatic tuning options definition.
*
* @return the options value
*/ | Get automatic tuning options definition | options | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseAutomaticTuningInner.java",
"license": "mit",
"size": 2918
} | [
"com.microsoft.azure.management.sql.v2015_05_01_preview.AutomaticTuningOptions",
"java.util.Map"
] | import com.microsoft.azure.management.sql.v2015_05_01_preview.AutomaticTuningOptions; import java.util.Map; | import com.microsoft.azure.management.sql.v2015_05_01_preview.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 1,205,543 |
public IDataset getCrate(); | IDataset function(); | /**
* Crate number of detector
* <p>
* <b>Type:</b> NX_INT
* <b>Dimensions:</b> 1: i; 2: j;
* </p>
*
* @return the value.
*/ | Crate number of detector Type: NX_INT Dimensions: 1: i; 2: j; | getCrate | {
"repo_name": "jonahkichwacoders/dawnsci",
"path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXdetector.java",
"license": "epl-1.0",
"size": 22284
} | [
"org.eclipse.dawnsci.analysis.api.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.dataset.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 1,165,000 |
ProcessGroup getParentGroup(); | ProcessGroup getParentGroup(); | /**
* Returns the parent process group.
*
* @return parent
*/ | Returns the parent process group | getParentGroup | {
"repo_name": "WilliamNouet/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/authorization/ConnectionAuthorizable.java",
"license": "apache-2.0",
"size": 1963
} | [
"org.apache.nifi.groups.ProcessGroup"
] | import org.apache.nifi.groups.ProcessGroup; | import org.apache.nifi.groups.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 2,703,052 |
void cacheIntentValues(final long downloadId, final DownloadStatus downloadStatus) {
final String id = String.valueOf(downloadId);
final BasicDownloadInfo basicDownloadInfo = BasicDownloadInfo.getNewDownloadInfo(context, id);
downloadStatus.setDownloadInfo(basicDownloadInfo);
if (ba... | void cacheIntentValues(final long downloadId, final DownloadStatus downloadStatus) { final String id = String.valueOf(downloadId); final BasicDownloadInfo basicDownloadInfo = BasicDownloadInfo.getNewDownloadInfo(context, id); downloadStatus.setDownloadInfo(basicDownloadInfo); if (basicDownloadInfo != null) { downloadSt... | /**
* Update the cache with values from the content provider for both extras
* and categories.
*
* @param downloadId
* the id
* @param downloadStatus
* the download status
*/ | Update the cache with values from the content provider for both extras and categories | cacheIntentValues | {
"repo_name": "bootcamptropa/android",
"path": "app/src/main/java/com/dancingqueen/walladog/aws/downloader/service/DownloadStatusUpdater.java",
"license": "mit",
"size": 23847
} | [
"com.dancingqueen.walladog.aws.downloader.query.BasicDownloadInfo"
] | import com.dancingqueen.walladog.aws.downloader.query.BasicDownloadInfo; | import com.dancingqueen.walladog.aws.downloader.query.*; | [
"com.dancingqueen.walladog"
] | com.dancingqueen.walladog; | 828,748 |
private void givenGemFirePropertiesFile(final Properties config) {
try {
String name = GEMFIRE_PREFIX + "properties";
File file = new File(getWorkingDirectory(), name);
config.store(new FileWriter(file, false), testName.getMethodName());
assertThat(file).isFile().exists();
System.se... | void function(final Properties config) { try { String name = GEMFIRE_PREFIX + STR; File file = new File(getWorkingDirectory(), name); config.store(new FileWriter(file, false), testName.getMethodName()); assertThat(file).isFile().exists(); System.setProperty(PROPERTIES_FILE_PROPERTY, file.getCanonicalPath()); } catch (I... | /**
* Creates a gemfire properties file in temporaryFolder:
* <ol>
* <li>creates gemfire.properties in {@code temporaryFolder}</li>
* <li>writes config to the file</li>
* <li>sets "gemfirePropertyFile" system property</li>
* </ol>
*/ | Creates a gemfire properties file in temporaryFolder: creates gemfire.properties in temporaryFolder writes config to the file sets "gemfirePropertyFile" system property | givenGemFirePropertiesFile | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/integrationTest/java/org/apache/geode/distributed/ServerLauncherIntegrationTest.java",
"license": "apache-2.0",
"size": 11408
} | [
"java.io.File",
"java.io.FileWriter",
"java.io.IOException",
"java.io.UncheckedIOException",
"java.util.Properties",
"org.assertj.core.api.Assertions"
] | import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.UncheckedIOException; import java.util.Properties; import org.assertj.core.api.Assertions; | import java.io.*; import java.util.*; import org.assertj.core.api.*; | [
"java.io",
"java.util",
"org.assertj.core"
] | java.io; java.util; org.assertj.core; | 2,620,040 |
public static void main( String[] args )
{
new Regression_98257( );
}
public Regression_98257( )
{
final PluginSettings ps = PluginSettings.instance( );
try
{
dRenderer = ps.getDevice( "dv.JPG" );//$NON-NLS-1$
}
catch ( ChartException ex )
{
ex.printStackTrace( );
}
cm = createBarChar... | static void function( String[] args ) { new Regression_98257( ); } public Regression_98257( ) { final PluginSettings ps = PluginSettings.instance( ); try { dRenderer = ps.getDevice( STR ); } catch ( ChartException ex ) { ex.printStackTrace( ); } cm = createBarChart( ); cm = changeTo2Dwithdepth( cm ); BufferedImage img ... | /**
* execute application
*
* @param args
*/ | execute application | main | {
"repo_name": "sguan-actuate/birt",
"path": "testsuites/org.eclipse.birt.report.tests.chart/src/org/eclipse/birt/report/tests/chart/regression/Regression_98257.java",
"license": "epl-1.0",
"size": 8835
} | [
"java.awt.Graphics",
"java.awt.Graphics2D",
"java.awt.image.BufferedImage",
"org.eclipse.birt.chart.device.IDeviceRenderer",
"org.eclipse.birt.chart.exception.ChartException",
"org.eclipse.birt.chart.factory.Generator",
"org.eclipse.birt.chart.model.attribute.Bounds",
"org.eclipse.birt.chart.model.att... | import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import org.eclipse.birt.chart.device.IDeviceRenderer; import org.eclipse.birt.chart.exception.ChartException; import org.eclipse.birt.chart.factory.Generator; import org.eclipse.birt.chart.model.attribute.Bounds; import org.eclip... | import java.awt.*; import java.awt.image.*; import org.eclipse.birt.chart.device.*; import org.eclipse.birt.chart.exception.*; import org.eclipse.birt.chart.factory.*; import org.eclipse.birt.chart.model.attribute.*; import org.eclipse.birt.chart.model.attribute.impl.*; import org.eclipse.birt.chart.util.*; | [
"java.awt",
"org.eclipse.birt"
] | java.awt; org.eclipse.birt; | 2,526,272 |
@Override public void enterGtRule(@NotNull PJParser.GtRuleContext ctx) { } | @Override public void enterGtRule(@NotNull PJParser.GtRuleContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitContinueRule | {
"repo_name": "Diolor/PJ",
"path": "src/main/java/com/lorentzos/pj/PJBaseListener.java",
"license": "mit",
"size": 73292
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 782,390 |
protected void createMediaPlayerIfNeeded() {
if (mPlayer == null) {
mPlayer = new MediaPlayer();
// make sure the CPU won't go to sleep while media is playing
mPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);
// the media player w... | void function() { if (mPlayer == null) { mPlayer = new MediaPlayer(); mPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK); mPlayer.setOnPreparedListener(this); mPlayer.setOnCompletionListener(this); mPlayer.setOnErrorListener(this); } else { mPlayer.reset(); } } | /**
* Makes sure the media player exists and has been reset. This will create the media player
* if needed. reset the existing media player if one already exists.
*/ | Makes sure the media player exists and has been reset. This will create the media player if needed. reset the existing media player if one already exists | createMediaPlayerIfNeeded | {
"repo_name": "asifdahir/nscloud",
"path": "src/com/nscloud/android/media/MediaService.java",
"license": "gpl-2.0",
"size": 26301
} | [
"android.media.MediaPlayer",
"android.os.PowerManager"
] | import android.media.MediaPlayer; import android.os.PowerManager; | import android.media.*; import android.os.*; | [
"android.media",
"android.os"
] | android.media; android.os; | 768,349 |
@ReportableProperty(order=3, value="Validation status.",
ref="ICC.1:2004-10, \u00a7 10.19")
public Validity isValid() {
return this.isValid;
}
| @ReportableProperty(order=3, value=STR, ref=STR) Validity function() { return this.isValid; } | /** Get validation status.
* @return Validation status
*/ | Get validation status | isValid | {
"repo_name": "opf-labs/jhove2",
"path": "src/main/java/org/jhove2/module/format/icc/type/SignatureType.java",
"license": "bsd-2-clause",
"size": 7656
} | [
"org.jhove2.annotation.ReportableProperty",
"org.jhove2.module.format.Validator"
] | import org.jhove2.annotation.ReportableProperty; import org.jhove2.module.format.Validator; | import org.jhove2.annotation.*; import org.jhove2.module.format.*; | [
"org.jhove2.annotation",
"org.jhove2.module"
] | org.jhove2.annotation; org.jhove2.module; | 1,172,977 |
public File getInitialControlsConfig() {
if (simconfigDir != null) {
return new File(simconfigDir, "InitialControls.txt");
} else {
return null;
}
}
| File function() { if (simconfigDir != null) { return new File(simconfigDir, STR); } else { return null; } } | /**
* Return the initial controls configuration.
*
* @return the initial controls configuration
*/ | Return the initial controls configuration | getInitialControlsConfig | {
"repo_name": "hervegirod/j6dof-flight-sim",
"path": "src/flightsim/com/chrisali/javaflightsim/conf/Configuration.java",
"license": "gpl-3.0",
"size": 12774
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,575,846 |
public void validate() {
if (operatingSystem() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property operatingSystem in model OSDiskImage"));
}
}
private static final ClientLogger LOGGER = new Cl... | void function() { if (operatingSystem() == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException(STR)); } } private static final ClientLogger LOGGER = new ClientLogger(OSDiskImage.class); | /**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/ | Validates the instance | validate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/OSDiskImage.java",
"license": "mit",
"size": 1718
} | [
"com.azure.core.util.logging.ClientLogger"
] | import com.azure.core.util.logging.ClientLogger; | import com.azure.core.util.logging.*; | [
"com.azure.core"
] | com.azure.core; | 2,606,934 |
private Collection<String> getNamespaceInfo(
Function<FederationNamespaceInfo, String> f) throws IOException {
if (membershipStore == null) {
return new HashSet<>();
}
GetNamespaceInfoRequest request = GetNamespaceInfoRequest.newInstance();
GetNamespaceInfoResponse response =
membe... | Collection<String> function( Function<FederationNamespaceInfo, String> f) throws IOException { if (membershipStore == null) { return new HashSet<>(); } GetNamespaceInfoRequest request = GetNamespaceInfoRequest.newInstance(); GetNamespaceInfoResponse response = membershipStore.getNamespaceInfo(request); return response.... | /**
* Build a set of unique values found in all namespaces.
*
* @param f Method reference of the appropriate FederationNamespaceInfo
* getter function
* @return Set of unique string values found in all discovered namespaces.
* @throws IOException if the query could not be executed.
*/ | Build a set of unique values found in all namespaces | getNamespaceInfo | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java",
"license": "apache-2.0",
"size": 34251
} | [
"java.io.IOException",
"java.util.Collection",
"java.util.HashSet",
"java.util.function.Function",
"java.util.stream.Collectors",
"org.apache.hadoop.hdfs.server.federation.resolver.FederationNamespaceInfo",
"org.apache.hadoop.hdfs.server.federation.store.protocol.GetNamespaceInfoRequest",
"org.apache.... | import java.io.IOException; import java.util.Collection; import java.util.HashSet; import java.util.function.Function; import java.util.stream.Collectors; import org.apache.hadoop.hdfs.server.federation.resolver.FederationNamespaceInfo; import org.apache.hadoop.hdfs.server.federation.store.protocol.GetNamespaceInfoRequ... | import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; import org.apache.hadoop.hdfs.server.federation.resolver.*; import org.apache.hadoop.hdfs.server.federation.store.protocol.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,140,018 |
public NewsfeedGetListsQuery getLists(UserActor actor) {
return new NewsfeedGetListsQuery(getClient(), actor);
} | NewsfeedGetListsQuery function(UserActor actor) { return new NewsfeedGetListsQuery(getClient(), actor); } | /**
* Returns a list of newsfeeds followed by the current user.
*/ | Returns a list of newsfeeds followed by the current user | getLists | {
"repo_name": "kokorin/vk-java-sdk",
"path": "sdk/src/main/java/com/vk/api/sdk/actions/Newsfeed.java",
"license": "mit",
"size": 5994
} | [
"com.vk.api.sdk.client.actors.UserActor",
"com.vk.api.sdk.queries.newsfeed.NewsfeedGetListsQuery"
] | import com.vk.api.sdk.client.actors.UserActor; import com.vk.api.sdk.queries.newsfeed.NewsfeedGetListsQuery; | import com.vk.api.sdk.client.actors.*; import com.vk.api.sdk.queries.newsfeed.*; | [
"com.vk.api"
] | com.vk.api; | 2,692,200 |
@SuppressWarnings("unchecked")
public List<T> findFacts(final KieSession session, final BeanPropertyFilter... expectedProperties) { | @SuppressWarnings(STR) List<T> function(final KieSession session, final BeanPropertyFilter... expectedProperties) { | /**
* An assertion that a fact of the expected class with specified properties
* is in working memory.
*
* @param session
* A {@link KnowledgeSession} in which we are looking for the
* fact.
* @param factClass
* The simple name of the class of th... | An assertion that a fact of the expected class with specified properties is in working memory | findFacts | {
"repo_name": "gratiartis/qzr",
"path": "sctrcd-drools/src/main/java/com/sctrcd/drools/FactFinder.java",
"license": "apache-2.0",
"size": 3002
} | [
"com.sctrcd.beans.BeanPropertyFilter",
"java.util.List",
"org.kie.api.runtime.KieSession"
] | import com.sctrcd.beans.BeanPropertyFilter; import java.util.List; import org.kie.api.runtime.KieSession; | import com.sctrcd.beans.*; import java.util.*; import org.kie.api.runtime.*; | [
"com.sctrcd.beans",
"java.util",
"org.kie.api"
] | com.sctrcd.beans; java.util; org.kie.api; | 2,404,829 |
public UpdateRequest script(String script, ScriptService.ScriptType scriptType, @Nullable Map<String, Object> scriptParams) {
this.script = script;
this.scriptType = scriptType;
if (this.scriptParams != null) {
this.scriptParams.putAll(scriptParams);
} else {
... | UpdateRequest function(String script, ScriptService.ScriptType scriptType, @Nullable Map<String, Object> scriptParams) { this.script = script; this.scriptType = scriptType; if (this.scriptParams != null) { this.scriptParams.putAll(scriptParams); } else { this.scriptParams = scriptParams; } return this; } | /**
* The script to execute. Note, make sure not to send different script each times and instead
* use script params if possible with the same (automatically compiled) script.
*/ | The script to execute. Note, make sure not to send different script each times and instead use script params if possible with the same (automatically compiled) script | script | {
"repo_name": "zuoyebushiwo/elasticsearch1.7-study",
"path": "src/main/java/org/elasticsearch/action/update/UpdateRequest.java",
"license": "apache-2.0",
"size": 24049
} | [
"java.util.Map",
"org.elasticsearch.common.Nullable",
"org.elasticsearch.script.ScriptService"
] | import java.util.Map; import org.elasticsearch.common.Nullable; import org.elasticsearch.script.ScriptService; | import java.util.*; import org.elasticsearch.common.*; import org.elasticsearch.script.*; | [
"java.util",
"org.elasticsearch.common",
"org.elasticsearch.script"
] | java.util; org.elasticsearch.common; org.elasticsearch.script; | 422,606 |
PitchClass actual = PitchClass.getPitchClass(0);
assertEquals(PitchClass.C, actual);
} | PitchClass actual = PitchClass.getPitchClass(0); assertEquals(PitchClass.C, actual); } | /**
* Tests Pitch Class look up for a valid code.
*/ | Tests Pitch Class look up for a valid code | testGetPitchClass001 | {
"repo_name": "project-schumann/vmf-parser",
"path": "src/test/java/com/drkharma/vmf/PitchClassTest.java",
"license": "mit",
"size": 1075
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,367,276 |
public static Date dateOf(final LocalDate time) {
return Date.from(time.atStartOfDay(ZoneOffset.UTC).toInstant());
} | static Date function(final LocalDate time) { return Date.from(time.atStartOfDay(ZoneOffset.UTC).toInstant()); } | /**
* Date of local date.
*
* @param time the time
* @return the date
*/ | Date of local date | dateOf | {
"repo_name": "robertoschwald/cas",
"path": "core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java",
"license": "apache-2.0",
"size": 9289
} | [
"java.time.LocalDate",
"java.time.ZoneOffset",
"java.util.Date"
] | import java.time.LocalDate; import java.time.ZoneOffset; import java.util.Date; | import java.time.*; import java.util.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 1,959,688 |
public int doEndTag() throws JspException {
// do the super's ending part
int i = super.doEndTag();
// reset the properties
setName(originalName);
setProperty(originalProperty);
// continue
return i;
} | int function() throws JspException { int i = super.doEndTag(); setName(originalName); setProperty(originalProperty); return i; } | /**
* Complete the processing of the tag. The nested tags here will restore
* all the original value for the tag itself and the nesting context.
* @return int to describe the next step for the JSP processor
* @throws JspException for the bad things JSP's do
*/ | Complete the processing of the tag. The nested tags here will restore all the original value for the tag itself and the nesting context | doEndTag | {
"repo_name": "kawasima/struts-taglib-compatible",
"path": "src/share/org/apache/struts/taglib/nested/html/NestedSelectTag.java",
"license": "apache-2.0",
"size": 2599
} | [
"javax.servlet.jsp.JspException"
] | import javax.servlet.jsp.JspException; | import javax.servlet.jsp.*; | [
"javax.servlet"
] | javax.servlet; | 754,490 |
public int getChildCount(Object parent) {
if (debug) {
assert parent != null;
assert (parent instanceof Preferences);
}
Preferences prefs = (Preferences) parent;
try {
return prefs.childrenNames().length;
} catch (BackingStoreException e) {
e.printStackTrace(System.err);
}
return 0;
} | int function(Object parent) { if (debug) { assert parent != null; assert (parent instanceof Preferences); } Preferences prefs = (Preferences) parent; try { return prefs.childrenNames().length; } catch (BackingStoreException e) { e.printStackTrace(System.err); } return 0; } | /**
* Returns the number of children of <code>parent</code>. Returns 0 if the
* node is a leaf or if it has no children. <code>parent</code> must be a
* node previously obtained from this data source.
*
* @param parent
* a node in the tree, obtained from this data source
* @return the number o... | Returns the number of children of <code>parent</code>. Returns 0 if the node is a leaf or if it has no children. <code>parent</code> must be a node previously obtained from this data source | getChildCount | {
"repo_name": "tilm4nn/prefs-meta",
"path": "src/de/tkuhn/util/prefs/gui/PrefTreeModel.java",
"license": "mit",
"size": 9053
} | [
"java.util.prefs.BackingStoreException",
"java.util.prefs.Preferences"
] | import java.util.prefs.BackingStoreException; import java.util.prefs.Preferences; | import java.util.prefs.*; | [
"java.util"
] | java.util; | 1,784,896 |
@Update(sql = "DELETE FROM request_data WHERE project=0")
void deleteSaved(VoidCallback callback);
| @Update(sql = STR) void deleteSaved(VoidCallback callback); | /**
* Truncate table.
* @param callback
*/ | Truncate table | deleteSaved | {
"repo_name": "2947721120/ChromeRestClient",
"path": "RestClient/src/org/rest/client/storage/websql/RequestDataService.java",
"license": "apache-2.0",
"size": 6024
} | [
"com.google.code.gwt.database.client.service.Update",
"com.google.code.gwt.database.client.service.VoidCallback"
] | import com.google.code.gwt.database.client.service.Update; import com.google.code.gwt.database.client.service.VoidCallback; | import com.google.code.gwt.database.client.service.*; | [
"com.google.code"
] | com.google.code; | 595,080 |
public RectangleConstraint toRangeWidth(Range range) {
if (range == null) {
throw new IllegalArgumentException("Null 'range' argument.");
}
return new RectangleConstraint(range.getUpperBound(), range,
LengthConstraintType.RANGE, this.height, this.heightRange,... | RectangleConstraint function(Range range) { if (range == null) { throw new IllegalArgumentException(STR); } return new RectangleConstraint(range.getUpperBound(), range, LengthConstraintType.RANGE, this.height, this.heightRange, this.heightConstraintType); } | /**
* Returns a constraint that matches this one on the height attributes,
* but has a range width constraint.
*
* @param range the width range (<code>null</code> not permitted).
*
* @return A new constraint.
*/ | Returns a constraint that matches this one on the height attributes, but has a range width constraint | toRangeWidth | {
"repo_name": "ilyessou/jfreechart",
"path": "source/org/jfree/chart/block/RectangleConstraint.java",
"license": "lgpl-2.1",
"size": 12216
} | [
"org.jfree.data.Range"
] | import org.jfree.data.Range; | import org.jfree.data.*; | [
"org.jfree.data"
] | org.jfree.data; | 106,724 |
public boolean isInContacts(final String emailAddress) {
boolean result = false;
final Cursor c = getContactByAddress(emailAddress);
if (c != null) {
if (c.getCount() > 0) {
result = true;
}
c.close();
}
return result;
... | boolean function(final String emailAddress) { boolean result = false; final Cursor c = getContactByAddress(emailAddress); if (c != null) { if (c.getCount() > 0) { result = true; } c.close(); } return result; } | /**
* Check whether the provided email address belongs to one of the contacts.
*
* @param emailAddress The email address to look for.
* @return <tt>true</tt>, if the email address belongs to a contact.
* <tt>false</tt>, otherwise.
*/ | Check whether the provided email address belongs to one of the contacts | isInContacts | {
"repo_name": "rtreffer/openpgp-k-9",
"path": "src/com/fsck/k9/helper/Contacts.java",
"license": "bsd-3-clause",
"size": 14137
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 540,878 |
private CuotaInscripcionCurso persistirCuotaSocio(
CuotaCursoSocio cuota,
InscripcionCurso inscripcion) {
if(logger.isInfoEnabled()) {
logger.info("Persistiento una cuota: " +
cuota.getNombre() +
" de la inscripcion: " +
inscripcion.getDetalle());
}
CuotaInscripcionCurs... | CuotaInscripcionCurso function( CuotaCursoSocio cuota, InscripcionCurso inscripcion) { if(logger.isInfoEnabled()) { logger.info(STR + cuota.getNombre() + STR + inscripcion.getDetalle()); } CuotaInscripcionCurso cuotaInscripcionCurso = new CuotaInscripcionCurso(); cuotaInscripcionCurso.setCoutaSocio(cuota); cuotaInscrip... | /**
* Persiste una cuota de un curso para un Socio
* @param cuota
* @param inscripcion
* @return
*/ | Persiste una cuota de un curso para un Socio | persistirCuotaSocio | {
"repo_name": "jorgevillaverde/co",
"path": "src/main/java/ar/com/circuloodontochaco/co/service/impl/CoInscripcionServiceImpl.java",
"license": "apache-2.0",
"size": 42053
} | [
"ar.com.circuloodontochaco.co.model.CuotaCursoSocio",
"ar.com.circuloodontochaco.co.model.CuotaInscripcionCurso",
"ar.com.circuloodontochaco.co.model.InscripcionCurso"
] | import ar.com.circuloodontochaco.co.model.CuotaCursoSocio; import ar.com.circuloodontochaco.co.model.CuotaInscripcionCurso; import ar.com.circuloodontochaco.co.model.InscripcionCurso; | import ar.com.circuloodontochaco.co.model.*; | [
"ar.com.circuloodontochaco"
] | ar.com.circuloodontochaco; | 800,924 |
public static void deleteFileOnTermination(@NotNull GeneralCommandLine commandLine, @NotNull File fileToDelete) {
Set<File> set = commandLine.getUserData(DELETE_FILES_ON_TERMINATION);
if (set == null) {
commandLine.putUserData(DELETE_FILES_ON_TERMINATION, set = new THashSet<>());
}
set.add(fileT... | static void function(@NotNull GeneralCommandLine commandLine, @NotNull File fileToDelete) { Set<File> set = commandLine.getUserData(DELETE_FILES_ON_TERMINATION); if (set == null) { commandLine.putUserData(DELETE_FILES_ON_TERMINATION, set = new THashSet<>()); } set.add(fileToDelete); } | /**
* Registers a file to delete after the given command line finishes.
* In order to have an effect, the command line has to be executed with {@link #OSProcessHandler(GeneralCommandLine)}.
*/ | Registers a file to delete after the given command line finishes. In order to have an effect, the command line has to be executed with <code>#OSProcessHandler(GeneralCommandLine)</code> | deleteFileOnTermination | {
"repo_name": "paplorinc/intellij-community",
"path": "platform/platform-api/src/com/intellij/execution/process/OSProcessHandler.java",
"license": "apache-2.0",
"size": 8043
} | [
"com.intellij.execution.configurations.GeneralCommandLine",
"gnu.trove.THashSet",
"java.io.File",
"java.util.Set",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.execution.configurations.GeneralCommandLine; import gnu.trove.THashSet; import java.io.File; import java.util.Set; import org.jetbrains.annotations.NotNull; | import com.intellij.execution.configurations.*; import gnu.trove.*; import java.io.*; import java.util.*; import org.jetbrains.annotations.*; | [
"com.intellij.execution",
"gnu.trove",
"java.io",
"java.util",
"org.jetbrains.annotations"
] | com.intellij.execution; gnu.trove; java.io; java.util; org.jetbrains.annotations; | 2,667,002 |
@Override
public void switchToAutoAnswer() throws RemoteException {
SipService.this.enforceCallingOrSelfPermission(SipManager.PERMISSION_USE_SIP, null);
Log.d(THIS_FILE, "Switch to auto answer");
setAutoAnswerNext(true);
} | void function() throws RemoteException { SipService.this.enforceCallingOrSelfPermission(SipManager.PERMISSION_USE_SIP, null); Log.d(THIS_FILE, STR); setAutoAnswerNext(true); } | /**
* Switch in autoanswer mode
*/ | Switch in autoanswer mode | switchToAutoAnswer | {
"repo_name": "lainard/indonixvoip",
"path": "src/com/csipsimple/service/SipService.java",
"license": "gpl-3.0",
"size": 55550
} | [
"android.os.RemoteException",
"com.csipsimple.api.SipManager",
"com.csipsimple.utils.Log"
] | import android.os.RemoteException; import com.csipsimple.api.SipManager; import com.csipsimple.utils.Log; | import android.os.*; import com.csipsimple.api.*; import com.csipsimple.utils.*; | [
"android.os",
"com.csipsimple.api",
"com.csipsimple.utils"
] | android.os; com.csipsimple.api; com.csipsimple.utils; | 1,793,163 |
@ServiceMethod(returns = ReturnType.SINGLE)
public ThroughputSettingsGetResultsInner migrateSqlDatabaseToManualThroughput(
String resourceGroupName, String accountName, String databaseName, Context context) {
return migrateSqlDatabaseToManualThroughputAsync(resourceGroupName, accountName, databa... | @ServiceMethod(returns = ReturnType.SINGLE) ThroughputSettingsGetResultsInner function( String resourceGroupName, String accountName, String databaseName, Context context) { return migrateSqlDatabaseToManualThroughputAsync(resourceGroupName, accountName, databaseName, context).block(); } | /**
* Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param databaseName Cosmos DB database name.
* @param contex... | Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput | migrateSqlDatabaseToManualThroughput | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/SqlResourcesClientImpl.java",
"license": "mit",
"size": 547809
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.cosmos.fluent.models.ThroughputSettingsGetResultsInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.cosmos.fluent.models.ThroughputSettingsGetResultsInner; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.cosmos.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,839,451 |
private static boolean isForLoopVariable(DetailAST variableDef) {
final int parentType = variableDef.getParent().getType();
return parentType == TokenTypes.FOR_INIT
|| parentType == TokenTypes.FOR_EACH_CLAUSE;
} | static boolean function(DetailAST variableDef) { final int parentType = variableDef.getParent().getType(); return parentType == TokenTypes.FOR_INIT parentType == TokenTypes.FOR_EACH_CLAUSE; } | /**
* Checks if a variable is the loop's one.
* @param variableDef variable definition.
* @return true if a variable is the loop's one.
*/ | Checks if a variable is the loop's one | isForLoopVariable | {
"repo_name": "Godin/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/LocalVariableNameCheck.java",
"license": "lgpl-2.1",
"size": 4535
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.TokenTypes"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 1,943,744 |
// TODO continue to add MXBean accessor methods as necessary for GemFire MXBeans used in Gfsh and
// command classes...
DistributedSystemMXBean getDistributedSystemMXBean(); | DistributedSystemMXBean getDistributedSystemMXBean(); | /**
* Gets a proxy to the remote DistributedSystem MXBean to access attributes and invoke operations
* on the distributed system, or the GemFire cluster.
* <p/>
*
* @return a proxy instance of the GemFire Manager's DistributedSystem MXBean.
* @see org.apache.geode.management.DistributedSystemMXBean
... | Gets a proxy to the remote DistributedSystem MXBean to access attributes and invoke operations on the distributed system, or the GemFire cluster. | getDistributedSystemMXBean | {
"repo_name": "pdxrunner/geode",
"path": "geode-core/src/main/java/org/apache/geode/management/internal/cli/shell/OperationInvoker.java",
"license": "apache-2.0",
"size": 5615
} | [
"org.apache.geode.management.DistributedSystemMXBean"
] | import org.apache.geode.management.DistributedSystemMXBean; | import org.apache.geode.management.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,756,543 |
@Test
public void testDisableColumnAdjustment() throws Exception {
when(TableBuilderHelper.class, "shouldTrimColumns").thenReturn(false);
assertFalse(TableBuilderHelper.shouldTrimColumns());
Table table = createTableStructure(5, "|");
RowGroup rowGroup = table.getLastRowGroup();
Row row1 = rowG... | void function() throws Exception { when(TableBuilderHelper.class, STR).thenReturn(false); assertFalse(TableBuilderHelper.shouldTrimColumns()); Table table = createTableStructure(5, " "); RowGroup rowGroup = table.getLastRowGroup(); Row row1 = rowGroup.newRow(); row1.newLeftCol("1").newLeftCol(STR).newLeftCol(STR) .newL... | /**
* set gfsh env property result_viewer to basic disable for external reader
*/ | set gfsh env property result_viewer to basic disable for external reader | testDisableColumnAdjustment | {
"repo_name": "davinash/geode",
"path": "geode-gfsh/src/integrationTest/java/org/apache/geode/management/internal/cli/TableBuilderJUnitTest.java",
"license": "apache-2.0",
"size": 10453
} | [
"java.util.List",
"org.apache.geode.management.internal.cli.result.TableBuilder",
"org.apache.geode.management.internal.cli.result.TableBuilderHelper",
"org.junit.Assert",
"org.powermock.api.mockito.PowerMockito"
] | import java.util.List; import org.apache.geode.management.internal.cli.result.TableBuilder; import org.apache.geode.management.internal.cli.result.TableBuilderHelper; import org.junit.Assert; import org.powermock.api.mockito.PowerMockito; | import java.util.*; import org.apache.geode.management.internal.cli.result.*; import org.junit.*; import org.powermock.api.mockito.*; | [
"java.util",
"org.apache.geode",
"org.junit",
"org.powermock.api"
] | java.util; org.apache.geode; org.junit; org.powermock.api; | 1,029,150 |
GetSettingsRequestBuilder prepareGetSettings(String... indices); | GetSettingsRequestBuilder prepareGetSettings(String... indices); | /**
* Returns a builder for a per index settings get request.
* @param indices the indices to fetch the setting for.
* @see #getSettings(org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest)
*/ | Returns a builder for a per index settings get request | prepareGetSettings | {
"repo_name": "robin13/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java",
"license": "apache-2.0",
"size": 26479
} | [
"org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequestBuilder"
] | import org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequestBuilder; | import org.elasticsearch.action.admin.indices.settings.get.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 1,814,376 |
MutableBag<T> toBag(); | MutableBag<T> toBag(); | /**
* Converts the collection to the default MutableBag implementation.
*
* @since 1.0
*/ | Converts the collection to the default MutableBag implementation | toBag | {
"repo_name": "bhav0904/eclipse-collections",
"path": "eclipse-collections-api/src/main/java/org/eclipse/collections/api/RichIterable.java",
"license": "bsd-3-clause",
"size": 82747
} | [
"org.eclipse.collections.api.bag.MutableBag"
] | import org.eclipse.collections.api.bag.MutableBag; | import org.eclipse.collections.api.bag.*; | [
"org.eclipse.collections"
] | org.eclipse.collections; | 156,162 |
@Override
public void mapTileRequestCompleted(final MapTileRequestState pState, final Drawable pDrawable) {
final MapTile tile = pState.getMapTile();
if (pDrawable != null) {
mTileCache.putTile(tile, pDrawable);
}
// tell our caller we've finished and it should update its view
if (mTileRequestComplete... | void function(final MapTileRequestState pState, final Drawable pDrawable) { final MapTile tile = pState.getMapTile(); if (pDrawable != null) { mTileCache.putTile(tile, pDrawable); } if (mTileRequestCompleteHandler != null) { mTileRequestCompleteHandler.sendEmptyMessage(MapTile.MAPTILE_SUCCESS_ID); } if (DEBUGMODE) { lo... | /**
* Called by implementation class methods indicating that they have completed the request as
* best it can. The tile is added to the cache, and a MAPTILE_SUCCESS_ID message is sent.
*
* @param pState
* the map tile request state object
* @param pDrawable
* the Drawable of the map... | Called by implementation class methods indicating that they have completed the request as best it can. The tile is added to the cache, and a MAPTILE_SUCCESS_ID message is sent | mapTileRequestCompleted | {
"repo_name": "kruzel/citypark-android",
"path": "lib/src/osmdroid/osmdroid-read-only/osmdroid-android/src/org/osmdroid/tileprovider/MapTileProviderBase.java",
"license": "gpl-2.0",
"size": 4583
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 640,727 |
public void writeBoolean(boolean value)
throws IOException
{
write(value ? 1 : 0);
} | void function(boolean value) throws IOException { write(value ? 1 : 0); } | /**
* This method writes a Java boolean value to an output stream. If
* <code>value</code> is <code>true</code>, a byte with the value of
* 1 will be written, otherwise a byte with the value of 0 will be
* written.
*
* The value written can be read using the <code>readBoolean</code>
* method in <c... | This method writes a Java boolean value to an output stream. If <code>value</code> is <code>true</code>, a byte with the value of 1 will be written, otherwise a byte with the value of 0 will be written. The value written can be read using the <code>readBoolean</code> method in <code>DataInput</code> | writeBoolean | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/gnu/CORBA/CDR/LittleEndianOutputStream.java",
"license": "bsd-3-clause",
"size": 8086
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,408,735 |
@Test
public void testAsyncCheckpointingConcurrentCloseAfterAcknowledge() throws Exception {
final OneShotLatch acknowledgeCheckpointLatch = new OneShotLatch();
final OneShotLatch completeAcknowledge = new OneShotLatch(); | void function() throws Exception { final OneShotLatch acknowledgeCheckpointLatch = new OneShotLatch(); final OneShotLatch completeAcknowledge = new OneShotLatch(); | /**
* FLINK-5667
*
* <p>Tests that a concurrent cancel operation does not discard the state handles of an
* acknowledged checkpoint. The situation can only happen if the cancel call is executed after
* Environment.acknowledgeCheckpoint() and before the CloseableRegistry.unregisterClosable()
... | FLINK-5667 Tests that a concurrent cancel operation does not discard the state handles of an acknowledged checkpoint. The situation can only happen if the cancel call is executed after Environment.acknowledgeCheckpoint() and before the CloseableRegistry.unregisterClosable() call | testAsyncCheckpointingConcurrentCloseAfterAcknowledge | {
"repo_name": "kl0u/flink",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java",
"license": "apache-2.0",
"size": 96573
} | [
"org.apache.flink.core.testutils.OneShotLatch"
] | import org.apache.flink.core.testutils.OneShotLatch; | import org.apache.flink.core.testutils.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,536,487 |
@Test
public void test11_createNewLocationBoundaryFile() throws ApplicationException{
//Create a location
String locationName = "India";
LocationTypeDto countryLocationTypeDto = createAndSaveLocationType(locationService, "Country", null);
LocationDto location = createLocation(locationName, countryLocatio... | void function() throws ApplicationException{ String locationName = "India"; LocationTypeDto countryLocationTypeDto = createAndSaveLocationType(locationService, STR, null); LocationDto location = createLocation(locationName, countryLocationTypeDto, null); LocationDto savedLocation = locationService.saveLocation(location... | /**
* Test to upload a LocationBoundary file
* @throws ApplicationException
*/ | Test to upload a LocationBoundary file | test11_createNewLocationBoundaryFile | {
"repo_name": "ping2ravi/eswaraj",
"path": "core/src/test/java/com/eswaraj/core/service/impl/TestLocationServiceImpl.java",
"license": "gpl-3.0",
"size": 15055
} | [
"com.eswaraj.core.exceptions.ApplicationException",
"com.eswaraj.core.service.FileService",
"com.eswaraj.web.dto.LocationBoundaryFileDto",
"com.eswaraj.web.dto.LocationDto",
"com.eswaraj.web.dto.LocationTypeDto",
"java.io.InputStream",
"org.jmock.Expectations",
"org.junit.Assert"
] | import com.eswaraj.core.exceptions.ApplicationException; import com.eswaraj.core.service.FileService; import com.eswaraj.web.dto.LocationBoundaryFileDto; import com.eswaraj.web.dto.LocationDto; import com.eswaraj.web.dto.LocationTypeDto; import java.io.InputStream; import org.jmock.Expectations; import org.junit.Assert... | import com.eswaraj.core.exceptions.*; import com.eswaraj.core.service.*; import com.eswaraj.web.dto.*; import java.io.*; import org.jmock.*; import org.junit.*; | [
"com.eswaraj.core",
"com.eswaraj.web",
"java.io",
"org.jmock",
"org.junit"
] | com.eswaraj.core; com.eswaraj.web; java.io; org.jmock; org.junit; | 733,422 |
public static boolean hasEmphasisSpans(Spannable url) {
return getEmphasisSpans(url).length != 0;
} | static boolean function(Spannable url) { return getEmphasisSpans(url).length != 0; } | /**
* Returns whether the given URL has any emphasis spans applied.
*
* @param url The URL spannable to check emphasis on.
* @return True if the URL has emphasis spans, false if not.
*/ | Returns whether the given URL has any emphasis spans applied | hasEmphasisSpans | {
"repo_name": "SaschaMester/delicium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java",
"license": "bsd-3-clause",
"size": 12930
} | [
"android.text.Spannable"
] | import android.text.Spannable; | import android.text.*; | [
"android.text"
] | android.text; | 1,816,739 |
private static File getToolsJar() {
String javaHome = System.getProperty("java.home");
File file = new File(javaHome, "../lib/tools.jar");
if (!file.exists()) {
file = new File(javaHome, "lib/tools.jar");
if (!file.exists()) {
return null;
... | static File function() { String javaHome = System.getProperty(STR); File file = new File(javaHome, STR); if (!file.exists()) { file = new File(javaHome, STR); if (!file.exists()) { return null; } } return file; } @SuppressWarnings(STR) private static class VirtualMachineException extends Exception { VirtualMachineExcep... | /**
* Gets tools.jar from the JDK, or null if not found (for example, when
* running with a JRE rather than a JDK, or when running on Mac).
*/ | Gets tools.jar from the JDK, or null if not found (for example, when running with a JRE rather than a JDK, or when running on Mac) | getToolsJar | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/commands/HotSpotJavaDumperImpl.java",
"license": "epl-1.0",
"size": 12630
} | [
"java.io.File",
"java.lang.reflect.Method"
] | import java.io.File; import java.lang.reflect.Method; | import java.io.*; import java.lang.reflect.*; | [
"java.io",
"java.lang"
] | java.io; java.lang; | 2,288,113 |
String s = "";
String[] m = message.split(" ");
for (String t : m) {
s += formatting;
s += t;
s += " ";
}
player.sendMessage(new TextComponentString(s));
} | String s = STR STR "; } player.sendMessage(new TextComponentString(s)); } | /**
* Send message in the chat with formatting
*/ | Send message in the chat with formatting | sendFormattedChatMessage | {
"repo_name": "Wehavecookies56/Kingdom-Keys-Re-Coded",
"path": "src/main/java/uk/co/wehavecookies56/kk/common/core/helper/TextHelper.java",
"license": "lgpl-3.0",
"size": 843
} | [
"net.minecraft.util.text.TextComponentString"
] | import net.minecraft.util.text.TextComponentString; | import net.minecraft.util.text.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 2,078,612 |
@AtMostOnce
void reencryptEncryptionZone(String zone, ReencryptAction action)
throws IOException; | void reencryptEncryptionZone(String zone, ReencryptAction action) throws IOException; | /**
* Used to implement re-encryption of encryption zones.
*
* @param zone the encryption zone to re-encrypt.
* @param action the action for the re-encryption.
* @throws IOException
*/ | Used to implement re-encryption of encryption zones | reencryptEncryptionZone | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 71843
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.HdfsConstants"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.HdfsConstants; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,595,468 |
public static InputStream getUniqueResourceAsStream(String resourceName, final String resourceDescription) throws IOException {
resourceName = BASE_PATH + resourceName;
final URL result = getUniqueResource(resourceName, resourceDescription);
return result.openStream();
} | static InputStream function(String resourceName, final String resourceDescription) throws IOException { resourceName = BASE_PATH + resourceName; final URL result = getUniqueResource(resourceName, resourceDescription); return result.openStream(); } | /**
* Gets the unique schema file resource from the class loader off the base path. If
* the same resource exists multiple times then an error will result since the resource
* is not unique.
*
* @param resourceName
* the file name of the resource to load
* @param resourceDe... | Gets the unique schema file resource from the class loader off the base path. If the same resource exists multiple times then an error will result since the resource is not unique | getUniqueResourceAsStream | {
"repo_name": "tinglinux/search-guard",
"path": "src/test/java/org/apache/directory/api/ldap/schemaextractor/impl/DefaultSchemaLdifExtractor.java",
"license": "apache-2.0",
"size": 14233
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,268,510 |
@Test
public void isUserRegistryConfigured_multipleServiceAvailable() throws Exception {
mock.checking(new Expectations() {
{
allowing(componentContext).locateService("UserRegistry", ef);
will(returnValue(ur2));
allowing(componentContext).loca... | void function() throws Exception { mock.checking(new Expectations() { { allowing(componentContext).locateService(STR, ef); will(returnValue(ur2)); allowing(componentContext).locateService(STR, ur1Ref); will(returnValue(ur1)); allowing(ur1).getRealm(); will(returnValue("ur1")); allowing(ur2).getRealm(); will(returnValue... | /**
* If multiple UserRegistryConfiguration service is available, it used to throw an exception but now
* returning false. This modification is made in order to eliminate ffdc data generation.
*/ | If multiple UserRegistryConfiguration service is available, it used to throw an exception but now returning false. This modification is made in order to eliminate ffdc data generation | isUserRegistryConfigured_multipleServiceAvailable | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.registry/test/com/ibm/ws/security/registry/internal/UserRegistryServiceImplWithAutoDetectTest.java",
"license": "epl-1.0",
"size": 11384
} | [
"com.ibm.ws.security.registry.RegistryException",
"java.util.Collections",
"org.jmock.Expectations",
"org.junit.Assert"
] | import com.ibm.ws.security.registry.RegistryException; import java.util.Collections; import org.jmock.Expectations; import org.junit.Assert; | import com.ibm.ws.security.registry.*; import java.util.*; import org.jmock.*; import org.junit.*; | [
"com.ibm.ws",
"java.util",
"org.jmock",
"org.junit"
] | com.ibm.ws; java.util; org.jmock; org.junit; | 1,375,520 |
public int getWalArchiveSegments();
/**
* Gets the average WAL fsync duration in microseconds over the last time interval.
* <p>
* The length of time interval is configured via {@link PersistentStoreConfiguration#setRateTimeInterval(long)}
* configurartion property.
* The number of sub... | int function(); /** * Gets the average WAL fsync duration in microseconds over the last time interval. * <p> * The length of time interval is configured via {@link PersistentStoreConfiguration#setRateTimeInterval(long)} * configurartion property. * The number of subintervals is configured via {@link PersistentStoreConf... | /**
* Gets the current number of WAL segments in the WAL archive.
*/ | Gets the current number of WAL segments in the WAL archive | getWalArchiveSegments | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/PersistenceMetrics.java",
"license": "apache-2.0",
"size": 4411
} | [
"org.apache.ignite.configuration.PersistentStoreConfiguration"
] | import org.apache.ignite.configuration.PersistentStoreConfiguration; | import org.apache.ignite.configuration.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,739,722 |
public List<Sensor> extractSensors(final HttpResponse<JsonNode> response) throws JSONException, CreateModelException
{
final List<Sensor> sensors = new ArrayList<Sensor>();
final JSONArray array = response.getBody().getArray();
for (int i = 0; i < array.length(); i++)
{
final Sensor s = this.factor... | List<Sensor> function(final HttpResponse<JsonNode> response) throws JSONException, CreateModelException { final List<Sensor> sensors = new ArrayList<Sensor>(); final JSONArray array = response.getBody().getArray(); for (int i = 0; i < array.length(); i++) { final Sensor s = this.factory.createSensorFromJSON(array.getJS... | /**
* Extract sensors from a request's response.
*
* @param response
* The server's response.
* @return The list of sensors from the JSON.
* @throws JSONException
* If JSON cannot be parsed.
* @throws CreateModelException
* If data in the JSON are not valid.... | Extract sensors from a request's response | extractSensors | {
"repo_name": "VisianTeam/VIPJavaSDK",
"path": "src/fr/visian/vip/client/sdk/request/extract/SensorExtract.java",
"license": "apache-2.0",
"size": 2257
} | [
"com.mashape.unirest.http.HttpResponse",
"com.mashape.unirest.http.JsonNode",
"fr.visian.vip.client.sdk.exception.CreateModelException",
"fr.visian.vip.client.sdk.model.Sensor",
"java.util.ArrayList",
"java.util.List",
"org.json.JSONArray",
"org.json.JSONException"
] | import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.JsonNode; import fr.visian.vip.client.sdk.exception.CreateModelException; import fr.visian.vip.client.sdk.model.Sensor; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; | import com.mashape.unirest.http.*; import fr.visian.vip.client.sdk.exception.*; import fr.visian.vip.client.sdk.model.*; import java.util.*; import org.json.*; | [
"com.mashape.unirest",
"fr.visian.vip",
"java.util",
"org.json"
] | com.mashape.unirest; fr.visian.vip; java.util; org.json; | 1,326,365 |
@NotNull
private CompletableFuture<Void> yieldingMethodAsync() {
return Async.awaitAsync(Async.yieldAsync());
}
private static class JoinableFutureContextDerived extends JoinableFutureContext {
TriConsumer<Duration, Integer, UUID> onReportHang; | CompletableFuture<Void> function() { return Async.awaitAsync(Async.yieldAsync()); } private static class JoinableFutureContextDerived extends JoinableFutureContext { TriConsumer<Duration, Integer, UUID> onReportHang; | /**
* A method that does nothing but yield once.
*/ | A method that does nothing but yield once | yieldingMethodAsync | {
"repo_name": "tunnelvisionlabs/java-threading",
"path": "test/com/tunnelvisionlabs/util/concurrent/JoinableFutureContextTest.java",
"license": "mit",
"size": 25060
} | [
"java.time.Duration",
"java.util.concurrent.CompletableFuture"
] | import java.time.Duration; import java.util.concurrent.CompletableFuture; | import java.time.*; import java.util.concurrent.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 838,152 |
public void sendMessage(DataOutputStream out) {
if (!type.equals("") && length > 0) {
try {
String messageHead = "#" + type + "$";
out.writeInt(length); // Send over the length first
out.write(messageHead.getBytes()); // Send the type
out.write(data); // Send the data
out.flush();
... | void function(DataOutputStream out) { if (!type.equals(STR#STR$STRTCPMessageSTRSent message: STRTCPMessageSTRerror: STRTCPMessageSTRattempted to send empty message"); } | /**
* Manually send the message
*
* @param out
*/ | Manually send the message | sendMessage | {
"repo_name": "mattixtech/Nimpres",
"path": "src/com/nimpres/android/lan/TCPMessage.java",
"license": "mit",
"size": 5403
} | [
"java.io.DataOutputStream"
] | import java.io.DataOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,679,331 |
public static void setLandscape(@NonNull final Activity activity) {
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} | static void function(@NonNull final Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } | /**
* Set the screen to landscape.
*
* @param activity The activity.
*/ | Set the screen to landscape | setLandscape | {
"repo_name": "meclub/MeUI",
"path": "lib_util/src/main/java/com/me/ui/util/ScreenUtils.java",
"license": "apache-2.0",
"size": 9321
} | [
"android.app.Activity",
"android.content.pm.ActivityInfo",
"android.support.annotation.NonNull"
] | import android.app.Activity; import android.content.pm.ActivityInfo; import android.support.annotation.NonNull; | import android.app.*; import android.content.pm.*; import android.support.annotation.*; | [
"android.app",
"android.content",
"android.support"
] | android.app; android.content; android.support; | 1,505,493 |
public void upsertCollectionCi(CollectionNode ciNode) {
CmsCI ci = cmProcessor.upsertCmsCI(ciNode);
for(CollectionLink link: ciNode.getRelations()) {
link.setFromCiId(ci.getCiId());
cmProcessor.upsertRelation(link);
upsertCollectionCi(link.getLinkedNode());
... | void function(CollectionNode ciNode) { CmsCI ci = cmProcessor.upsertCmsCI(ciNode); for(CollectionLink link: ciNode.getRelations()) { link.setFromCiId(ci.getCiId()); cmProcessor.upsertRelation(link); upsertCollectionCi(link.getLinkedNode()); } } | /**
* Upsert collection ci.
*
* @param ciNode the ci node
*/ | Upsert collection ci | upsertCollectionCi | {
"repo_name": "gauravlall/oneops",
"path": "cmsdal/src/main/java/com/oneops/cms/collections/CollectionProcessor.java",
"license": "apache-2.0",
"size": 9334
} | [
"com.oneops.cms.cm.domain.CmsCI"
] | import com.oneops.cms.cm.domain.CmsCI; | import com.oneops.cms.cm.domain.*; | [
"com.oneops.cms"
] | com.oneops.cms; | 1,061,390 |
ModelWrapper model = null;
try {
model = ObjectFactory.unmarshalSBML("sample/sample.xml");
} catch (JAXBException e) {
e.printStackTrace();
}
// ListOfSpeciesAlias
List<SpeciesAlias> saList = model.getListOfSpeciesAliases();
for (SpeciesAlias sa : saList) {
String str = sa.getI... | ModelWrapper model = null; try { model = ObjectFactory.unmarshalSBML(STR); } catch (JAXBException e) { e.printStackTrace(); } List<SpeciesAlias> saList = model.getListOfSpeciesAliases(); for (SpeciesAlias sa : saList) { String str = sa.getId() + ":" + sa.getSpecies() + ":"; str += "(" + sa.getBounds().getX() + "," + sa... | /**
* The main method.
*
* @param args
* the arguments
*/ | The main method | main | {
"repo_name": "funasoul/celldesigner-parser",
"path": "src/sample/APITest.java",
"license": "apache-2.0",
"size": 2267
} | [
"java.util.List",
"javax.xml.bind.JAXBException",
"org.sbml._2001.ns.celldesigner.ConnectScheme",
"org.sbml._2001.ns.celldesigner.SpeciesAlias",
"org.sbml.wrapper.ModelWrapper",
"org.sbml.wrapper.ObjectFactory",
"org.sbml.wrapper.ReactionWrapper"
] | import java.util.List; import javax.xml.bind.JAXBException; import org.sbml._2001.ns.celldesigner.ConnectScheme; import org.sbml._2001.ns.celldesigner.SpeciesAlias; import org.sbml.wrapper.ModelWrapper; import org.sbml.wrapper.ObjectFactory; import org.sbml.wrapper.ReactionWrapper; | import java.util.*; import javax.xml.bind.*; import org.sbml.*; import org.sbml.wrapper.*; | [
"java.util",
"javax.xml",
"org.sbml",
"org.sbml.wrapper"
] | java.util; javax.xml; org.sbml; org.sbml.wrapper; | 2,281,001 |
private void addCreatedSplit(List<InputSplit> splitList,
List<String> locations,
ArrayList<OneBlockInfo> validBlocks) {
// create an input split
Path[] fl = new Path[validBlocks.size()];
long[] offset = new long[validBlocks.size()];
long[... | void function(List<InputSplit> splitList, List<String> locations, ArrayList<OneBlockInfo> validBlocks) { Path[] fl = new Path[validBlocks.size()]; long[] offset = new long[validBlocks.size()]; long[] length = new long[validBlocks.size()]; for (int i = 0; i < validBlocks.size(); i++) { fl[i] = validBlocks.get(i).onepath... | /**
* Create a single split from the list of blocks specified in validBlocks
* Add this new split into splitList.
*/ | Create a single split from the list of blocks specified in validBlocks Add this new split into splitList | addCreatedSplit | {
"repo_name": "apache/hadoop-mapreduce",
"path": "src/java/org/apache/hadoop/mapreduce/lib/input/CombineFileInputFormat.java",
"license": "apache-2.0",
"size": 22440
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.mapreduce.InputSplit"
] | import java.util.ArrayList; import java.util.List; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.InputSplit; | import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 874,914 |
public boolean isNumberField(Field field) {
Class<?> fType = field.getType();
return fType.isAssignableFrom(Long.class)
|| fType.isAssignableFrom(long.class)
|| fType.isAssignableFrom(Integer.class)
|| fType.isAssignableFrom(int.class)
... | boolean function(Field field) { Class<?> fType = field.getType(); return fType.isAssignableFrom(Long.class) fType.isAssignableFrom(long.class) fType.isAssignableFrom(Integer.class) fType.isAssignableFrom(int.class) fType.isAssignableFrom(Short.class) fType.isAssignableFrom(short.class) fType.isAssignableFrom(Double.cla... | /**
* Check if field is number
* @param field
* @return true if field type is number
*/ | Check if field is number | isNumberField | {
"repo_name": "luhonghai/LiteDB",
"path": "litedb/src/main/java/com/luhonghai/litedb/annotation/AnnotationHelper.java",
"license": "mit",
"size": 21050
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 333,741 |
public void setUserLocalService(UserLocalService userLocalService) {
this.userLocalService = userLocalService;
} | void function(UserLocalService userLocalService) { this.userLocalService = userLocalService; } | /**
* Sets the user local service.
*
* @param userLocalService the user local service
*/ | Sets the user local service | setUserLocalService | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/whp_site_danger_listServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 166320
} | [
"com.liferay.portal.service.UserLocalService"
] | import com.liferay.portal.service.UserLocalService; | import com.liferay.portal.service.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,421,092 |
EList<NullValue> getNullValues();
| EList<NullValue> getNullValues(); | /**
* Returns the value of the '<em><b>Null Values</b></em>' containment reference list.
* The list contents are of type {@link isostdisots_29002_10ed_1techxmlschemavalueSimplified.NullValue}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Null Values</em>' containment reference list isn't ... | Returns the value of the 'Null Values' containment reference list. The list contents are of type <code>isostdisots_29002_10ed_1techxmlschemavalueSimplified.NullValue</code>. If the meaning of the 'Null Values' containment reference list isn't clear, there really should be more of a description here... | getNullValues | {
"repo_name": "patrickneubauer/XMLIntellEdit",
"path": "xmlintelledit/xmltext/src/main/java/isostdisots_29002_10ed_1techxmlschemavalueSimplified/Combination.java",
"license": "mit",
"size": 22428
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,903,299 |
protected Stream<String> readResourceToStream(final String name, final Charset charset) {
try {
return Files.lines(getPath(name), charset);
}
catch (IOException | URISyntaxException e) {
throw new AssertionError("Can't read resource " + name, e);
}
} | Stream<String> function(final String name, final Charset charset) { try { return Files.lines(getPath(name), charset); } catch (IOException URISyntaxException e) { throw new AssertionError(STR + name, e); } } | /**
* Read all lines from the desired resource as a {@code Stream}, i.e. this method populates lazily as the stream is
* consumed.
* <p> Bytes from the resource are decoded into characters using the specified charset and the same line terminators
* as specified by {@link Files#readAllLines(Path, Cha... | Read all lines from the desired resource as a Stream, i.e. this method populates lazily as the stream is consumed. Bytes from the resource are decoded into characters using the specified charset and the same line terminators as specified by <code>Files#readAllLines(Path, Charset)</code> are supported | readResourceToStream | {
"repo_name": "whaph/analysis-model",
"path": "src/test/java/edu/hm/hafner/util/SerializableTest.java",
"license": "mit",
"size": 4152
} | [
"java.io.IOException",
"java.net.URISyntaxException",
"java.nio.charset.Charset",
"java.nio.file.Files",
"java.util.stream.Stream"
] | import java.io.IOException; import java.net.URISyntaxException; import java.nio.charset.Charset; import java.nio.file.Files; import java.util.stream.Stream; | import java.io.*; import java.net.*; import java.nio.charset.*; import java.nio.file.*; import java.util.stream.*; | [
"java.io",
"java.net",
"java.nio",
"java.util"
] | java.io; java.net; java.nio; java.util; | 2,385,182 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<TemplateHashResultInner> calculateTemplateHashAsync(Object template); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<TemplateHashResultInner> calculateTemplateHashAsync(Object template); | /**
* Calculate the hash of the given template.
*
* @param template Any object.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeExcep... | Calculate the hash of the given template | calculateTemplateHashAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java",
"license": "mit",
"size": 209954
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.resources.fluent.models.TemplateHashResultInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.TemplateHashResultInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,429,708 |
public void topologySnapshot(@NotNull Map<UUID, Integer> top) {
this.top = top;
} | void function(@NotNull Map<UUID, Integer> top) { this.top = top; } | /**
* Sets service's new topology snapshot.
*
* @param top Topology snapshot.
*/ | Sets service's new topology snapshot | topologySnapshot | {
"repo_name": "chandresh-pancholi/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceInfo.java",
"license": "apache-2.0",
"size": 6115
} | [
"java.util.Map",
"org.jetbrains.annotations.NotNull"
] | import java.util.Map; import org.jetbrains.annotations.NotNull; | import java.util.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.jetbrains.annotations"
] | java.util; org.jetbrains.annotations; | 2,058,732 |
public boolean execute(String jobName, Date jobRunDate) {
laborNightlyOutService.deleteCopiedLaborGenerealLedgerEntries();
return true;
}
| boolean function(String jobName, Date jobRunDate) { laborNightlyOutService.deleteCopiedLaborGenerealLedgerEntries(); return true; } | /**
* Deletes labor general ledger entries.
*
* @param jobName String that contains the job that will be executed.
* @param jobRunDate the time/date the job is run
* @return boolean
* @see org.kuali.kfs.sys.batch.Step#execute(String, Date)
*/ | Deletes labor general ledger entries | execute | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ld/batch/ClearLaborGLEntryStep.java",
"license": "agpl-3.0",
"size": 2089
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 685,009 |
private static void printExtensionDirectoriesForBitrock(Set<File> extDirs) {
String separator = " "; //$NON-NLS-1$
StringBuffer buf = new StringBuffer(2);
for (File next: extDirs) {
String fileName = XML.forwardSlash(next.getPath());
buf.append("\""+fileName+"\""+separator); //$NON-NLS-1$ //$NON-NLS-2$
}... | static void function(Set<File> extDirs) { String separator = " "; StringBuffer buf = new StringBuffer(2); for (File next: extDirs) { String fileName = XML.forwardSlash(next.getPath()); buf.append("\"STR\""+separator); } String s = buf.toString(); if (s.length()>=separator.length()) { s = s.substring(0, s.length()-separ... | /**
* Finds extension directories and prints a space-delimited list to System.out.
* A single space delimiter is parsable by Bitrock installers.
*/ | Finds extension directories and prints a space-delimited list to System.out. A single space delimiter is parsable by Bitrock installers | printExtensionDirectoriesForBitrock | {
"repo_name": "dobrown/tracker-mvn",
"path": "src/main/java/org/opensourcephysics/tools/ExtensionsManager.java",
"license": "gpl-3.0",
"size": 19966
} | [
"java.io.File",
"java.util.Set",
"org.opensourcephysics.controls.XML"
] | import java.io.File; import java.util.Set; import org.opensourcephysics.controls.XML; | import java.io.*; import java.util.*; import org.opensourcephysics.controls.*; | [
"java.io",
"java.util",
"org.opensourcephysics.controls"
] | java.io; java.util; org.opensourcephysics.controls; | 2,477,955 |
EClass getChannelList();
| EClass getChannelList(); | /**
* Returns the meta object for class '{@link org.muml.uppaal.declarations.global.ChannelList <em>Channel List</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Channel List</em>'.
* @see org.muml.uppaal.declarations.global.ChannelList
* @generated
... | Returns the meta object for class '<code>org.muml.uppaal.declarations.global.ChannelList Channel List</code>'. | getChannelList | {
"repo_name": "uppaal-emf/uppaal",
"path": "metamodel/org.muml.uppaal/src/org/muml/uppaal/declarations/global/GlobalPackage.java",
"license": "epl-1.0",
"size": 10433
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 397,886 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.