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 handleEvent(Event evt) { EventTarget target = evt.getTarget(); if (!(target instanceof XBLOMDefinitionElement)) { return; } XBLOMDefinitionElement def = (XBLOMDefinitionElement) target; if (!isActiveDefinition(def, importEl...
void function(Event evt) { EventTarget target = evt.getTarget(); if (!(target instanceof XBLOMDefinitionElement)) { return; } XBLOMDefinitionElement def = (XBLOMDefinitionElement) target; if (!isActiveDefinition(def, importElement)) { return; } MutationEvent mevt = (MutationEvent) evt; String attrName = mevt.getAttrNam...
/** * Handles the event. */
Handles the event
handleEvent
{ "repo_name": "apache/batik", "path": "batik-bridge/src/main/java/org/apache/batik/bridge/svg12/DefaultXBLManager.java", "license": "apache-2.0", "size": 70234 }
[ "org.apache.batik.anim.dom.XBLOMDefinitionElement", "org.w3c.dom.Element", "org.w3c.dom.events.Event", "org.w3c.dom.events.EventListener", "org.w3c.dom.events.EventTarget", "org.w3c.dom.events.MutationEvent" ]
import org.apache.batik.anim.dom.XBLOMDefinitionElement; import org.w3c.dom.Element; import org.w3c.dom.events.Event; import org.w3c.dom.events.EventListener; import org.w3c.dom.events.EventTarget; import org.w3c.dom.events.MutationEvent;
import org.apache.batik.anim.dom.*; import org.w3c.dom.*; import org.w3c.dom.events.*;
[ "org.apache.batik", "org.w3c.dom" ]
org.apache.batik; org.w3c.dom;
365,609
public static AsymmetricKeyParameter createKey(byte[] keyInfoData) throws IOException { return createKey(SubjectPublicKeyInfo.getInstance(ASN1Object.fromByteArray(keyInfoData))); }
static AsymmetricKeyParameter function(byte[] keyInfoData) throws IOException { return createKey(SubjectPublicKeyInfo.getInstance(ASN1Object.fromByteArray(keyInfoData))); }
/** * Create a public key from a SubjectPublicKeyInfo encoding * * @param keyInfoData the SubjectPublicKeyInfo encoding * @return the appropriate key parameter * @throws IOException on an error decoding the key */
Create a public key from a SubjectPublicKeyInfo encoding
createKey
{ "repo_name": "Qingbao/PasswdManagerAndroid", "path": "src/noconflict/org/bouncycastle/crypto/util/PublicKeyFactory.java", "license": "lgpl-2.1", "size": 9373 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
979,843
@Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<TriggerSubscriptionOperationStatus>> subscribeTriggerToEventsWithResponse(String triggerName) { return this.serviceClient.subscribeTriggerToEventsWithResponseAsync(triggerName); }
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<TriggerSubscriptionOperationStatus>> function(String triggerName) { return this.serviceClient.subscribeTriggerToEventsWithResponseAsync(triggerName); }
/** * Subscribe event trigger to events. * * @param triggerName The trigger name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server. * @throws RuntimeException all other wrappe...
Subscribe event trigger to events
subscribeTriggerToEventsWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-analytics-synapse-artifacts/src/main/java/com/azure/analytics/synapse/artifacts/TriggerAsyncClient.java", "license": "mit", "size": 15777 }
[ "com.azure.analytics.synapse.artifacts.models.TriggerSubscriptionOperationStatus", "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response" ]
import com.azure.analytics.synapse.artifacts.models.TriggerSubscriptionOperationStatus; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response;
import com.azure.analytics.synapse.artifacts.models.*; import com.azure.core.annotation.*; import com.azure.core.http.rest.*;
[ "com.azure.analytics", "com.azure.core" ]
com.azure.analytics; com.azure.core;
721,839
String getServerDomain(); public static class SimpleImpl extends ObjectiveConfig implements MigueldoraEnv { private static final long serialVersionUID = 1L;
String getServerDomain(); public static class SimpleImpl extends ObjectiveConfig implements MigueldoraEnv { private static final long serialVersionUID = 1L;
/** * Get the value for the key 'server.domain'. <br> * The value is, e.g. localhost:8091 <br> * comment: domain to access this application from internet, e.g. for registration mail * @return The value of found property. (NotNull: if not found, exception but basically no way) */
Get the value for the key 'server.domain'. The value is, e.g. localhost:8091 comment: domain to access this application from internet, e.g. for registration mail
getServerDomain
{ "repo_name": "dbflute-session/lastaflute-rehearsal-migueldora", "path": "src/main/java/org/docksidestage/mylasta/direction/MigueldoraEnv.java", "license": "apache-2.0", "size": 14965 }
[ "org.lastaflute.core.direction.ObjectiveConfig" ]
import org.lastaflute.core.direction.ObjectiveConfig;
import org.lastaflute.core.direction.*;
[ "org.lastaflute.core" ]
org.lastaflute.core;
2,055,277
public void setFeedDownloadUrl(String original, String updated) { ContentValues values = new ContentValues(); values.put(KEY_DOWNLOAD_URL, updated); db.update(TABLE_NAME_FEEDS, values, KEY_DOWNLOAD_URL + "=?", new String[]{original}); }
void function(String original, String updated) { ContentValues values = new ContentValues(); values.put(KEY_DOWNLOAD_URL, updated); db.update(TABLE_NAME_FEEDS, values, KEY_DOWNLOAD_URL + "=?", new String[]{original}); }
/** * Updates the download URL of a Feed. */
Updates the download URL of a Feed
setFeedDownloadUrl
{ "repo_name": "johnjohndoe/AntennaPod", "path": "core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java", "license": "mit", "size": 61471 }
[ "android.content.ContentValues" ]
import android.content.ContentValues;
import android.content.*;
[ "android.content" ]
android.content;
2,049,840
protected Serializable[] getUndoData() { return new Serializable[]{ m_Data, m_Modified, m_Reader, m_Source }; }
Serializable[] function() { return new Serializable[]{ m_Data, m_Modified, m_Reader, m_Source }; }
/** * Returns the data to store in the undo. * * @return the undo point */
Returns the data to store in the undo
getUndoData
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-weka/src/main/java/adams/gui/tools/wekainvestigator/data/SpreadSheetContainer.java", "license": "gpl-3.0", "size": 4286 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
883,477
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(ReceiveTask.class)) { case Bpmn2Package.RECEIVE_TASK__IMPLEMENTATION: case Bpmn2Package.RECEIVE_TASK__INSTANTIATE: fireNotifyChanged(new ViewerNotification(notification, ...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(ReceiveTask.class)) { case Bpmn2Package.RECEIVE_TASK__IMPLEMENTATION: case Bpmn2Package.RECEIVE_TASK__INSTANTIATE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); ...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "adbrucker/SecureBPMN", "path": "designer/src/org.activiti.designer.model.edit/src/org/eclipse/bpmn2/provider/ReceiveTaskItemProvider.java", "license": "apache-2.0", "size": 7040 }
[ "org.eclipse.bpmn2.Bpmn2Package", "org.eclipse.bpmn2.ReceiveTask", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import org.eclipse.bpmn2.Bpmn2Package; import org.eclipse.bpmn2.ReceiveTask; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.bpmn2.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.bpmn2", "org.eclipse.emf" ]
org.eclipse.bpmn2; org.eclipse.emf;
2,741,337
@Test public void testQueryRewrite_geometry_feature() { Graph graph = model.getGraph(); Node subject = GEOMETRY_A.asNode(); Node predicate = Geo.SF_CONTAINS_NODE; Node object = FEATURE_B.asNode(); GenericPropertyFunction instance = new SfContainsPF(); QueryRewrit...
void function() { Graph graph = model.getGraph(); Node subject = GEOMETRY_A.asNode(); Node predicate = Geo.SF_CONTAINS_NODE; Node object = FEATURE_B.asNode(); GenericPropertyFunction instance = new SfContainsPF(); QueryRewriteIndex queryRewriteIndex = QueryRewriteIndex.createDefault(); Boolean expResult = true; Boolean...
/** * Test of queryRewrite method, of class GenericPropertyFunction. */
Test of queryRewrite method, of class GenericPropertyFunction
testQueryRewrite_geometry_feature
{ "repo_name": "apache/jena", "path": "jena-geosparql/src/test/java/org/apache/jena/geosparql/geo/topological/GenericPropertyFunctionTest.java", "license": "apache-2.0", "size": 21628 }
[ "org.apache.jena.geosparql.geo.topological.property_functions.simple_features.SfContainsPF", "org.apache.jena.geosparql.implementation.index.QueryRewriteIndex", "org.apache.jena.geosparql.implementation.vocabulary.Geo", "org.apache.jena.graph.Graph", "org.apache.jena.graph.Node", "org.junit.Assert" ]
import org.apache.jena.geosparql.geo.topological.property_functions.simple_features.SfContainsPF; import org.apache.jena.geosparql.implementation.index.QueryRewriteIndex; import org.apache.jena.geosparql.implementation.vocabulary.Geo; import org.apache.jena.graph.Graph; import org.apache.jena.graph.Node; import org.jun...
import org.apache.jena.geosparql.geo.topological.property_functions.simple_features.*; import org.apache.jena.geosparql.implementation.index.*; import org.apache.jena.geosparql.implementation.vocabulary.*; import org.apache.jena.graph.*; import org.junit.*;
[ "org.apache.jena", "org.junit" ]
org.apache.jena; org.junit;
462,569
protected void refresh() { treeViewer.refresh(); treeViewer.expandAll(); for (TreeColumn tc : treeViewer.getTree().getColumns()) { tc.pack(); } }
void function() { treeViewer.refresh(); treeViewer.expandAll(); for (TreeColumn tc : treeViewer.getTree().getColumns()) { tc.pack(); } }
/** * Refreshes the tree */
Refreshes the tree
refresh
{ "repo_name": "kbabioch/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/utility/ViewProperties.java", "license": "apache-2.0", "size": 6682 }
[ "org.eclipse.swt.widgets.TreeColumn" ]
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
353,615
public String getName() { return name; } public SourcesPage(final PageParameters params) { super(params); filename = new Label("filename", () -> name != null ? name : params.get(SOURCE).toOptionalString()); filename.setOutputMarkupId(true); add(filename); codePanel = new CodePanel("codepanel").s...
String function() { return name; } public SourcesPage(final PageParameters params) { super(params); filename = new Label(STR, () -> name != null ? name : params.get(SOURCE).toOptionalString()); filename.setOutputMarkupId(true); add(filename); codePanel = new CodePanel(STR).setOutputMarkupId(true); add(codePanel); add(n...
/** * Gets the name. * * @return the name. */
Gets the name
getName
{ "repo_name": "mosoft521/wicket", "path": "wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java", "license": "apache-2.0", "size": 13648 }
[ "org.apache.wicket.markup.html.basic.Label", "org.apache.wicket.request.mapper.parameter.PageParameters" ]
import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.markup.html.basic.*; import org.apache.wicket.request.mapper.parameter.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,765,954
@SuppressWarnings("unchecked") private List<Object> getActionsFromHit(final Map<String, Object> source) { final Map<String, Object> result = (Map<String, Object>) source.get("result"); return (List<Object>) result.get("actions"); }
@SuppressWarnings(STR) List<Object> function(final Map<String, Object> source) { final Map<String, Object> result = (Map<String, Object>) source.get(STR); return (List<Object>) result.get(STR); }
/** * Get the "actions" from the Watch History hit. * * @param source The hit's source. * @return The list of "actions" */
Get the "actions" from the Watch History hit
getActionsFromHit
{ "repo_name": "GlenRSmith/elasticsearch", "path": "x-pack/plugin/watcher/src/internalClusterTest/java/org/elasticsearch/xpack/watcher/history/HistoryActionConditionTests.java", "license": "apache-2.0", "size": 12732 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,635,356
PersistenceService getPersistenceService(); /** * Changes state of the cluster to the {@link ClusterState#PASSIVE} transactionally, * then triggers the shutdown process on each node. Transaction will be {@code TWO_PHASE}
PersistenceService getPersistenceService(); /** * Changes state of the cluster to the {@link ClusterState#PASSIVE} transactionally, * then triggers the shutdown process on each node. Transaction will be {@code TWO_PHASE}
/** * Returns the public persistence service for interacting with Persistence * * @return the persistence service * @throws UnsupportedOperationException if the persistence service is not * supported on this instance (e.g. on client) * @since 5.0 */
Returns the public persistence service for interacting with Persistence
getPersistenceService
{ "repo_name": "jerrinot/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/cluster/Cluster.java", "license": "apache-2.0", "size": 17507 }
[ "com.hazelcast.persistence.PersistenceService" ]
import com.hazelcast.persistence.PersistenceService;
import com.hazelcast.persistence.*;
[ "com.hazelcast.persistence" ]
com.hazelcast.persistence;
1,833,409
public void setupContainerImage(final ImageBuilder builder);
void function(final ImageBuilder builder);
/** * Setup the runtime specific configuration of a container * * @param builder the builder instance that builds the new container */
Setup the runtime specific configuration of a container
setupContainerImage
{ "repo_name": "SmartLambda/SmartLambda", "path": "src/main/java/edu/teco/smartlambda/runtime/Runtime.java", "license": "gpl-3.0", "size": 904 }
[ "edu.teco.smartlambda.container.ImageBuilder" ]
import edu.teco.smartlambda.container.ImageBuilder;
import edu.teco.smartlambda.container.*;
[ "edu.teco.smartlambda" ]
edu.teco.smartlambda;
2,399,977
public synchronized void addSchema(int schemaId, BinarySchema schema) { if (inline) { // Check if this is already known schema. if (schemaId == schemaId1 || schemaId == schemaId2 || schemaId == schemaId3 || schemaId == schemaId4) return; // Try positionin...
synchronized void function(int schemaId, BinarySchema schema) { if (inline) { if (schemaId == schemaId1 schemaId == schemaId2 schemaId == schemaId3 schemaId == schemaId4) return; if (schemaId1 == EMPTY) { schemaId1 = schemaId; schema1 = schema; inline = true; return; } if (schemaId2 == EMPTY) { schemaId2 = schemaId; sc...
/** * Add schema. * * @param schemaId Schema ID. * @param schema Schema. */
Add schema
addSchema
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/binary/BinarySchemaRegistry.java", "license": "apache-2.0", "size": 5578 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,380,559
protected void fireFailureListener_failurePerform(FailEvent evt) { for (FailureListener listener : failListenerList) { listener.failurePerform(evt); } }
void function(FailEvent evt) { for (FailureListener listener : failListenerList) { listener.failurePerform(evt); } }
/** * Notifies <code>failure listeners</code> about a <code>failure event</code>. * * @param evt the event. */
Notifies <code>failure listeners</code> about a <code>failure event</code>
fireFailureListener_failurePerform
{ "repo_name": "ecabrerar/astivetoolkit", "path": "apis/atk-api-menu/src/main/java/org/astivetoolkit/menu/Menu.java", "license": "apache-2.0", "size": 18924 }
[ "org.astivetoolkit.menu.event.FailEvent", "org.astivetoolkit.menu.event.FailureListener" ]
import org.astivetoolkit.menu.event.FailEvent; import org.astivetoolkit.menu.event.FailureListener;
import org.astivetoolkit.menu.event.*;
[ "org.astivetoolkit.menu" ]
org.astivetoolkit.menu;
833,975
public static void cursorDoubleToContentValues(Cursor cursor, String field, ContentValues values, String key) { int colIndex = cursor.getColumnIndex(field); if (!cursor.isNull(colIndex)) { values.put(key, cursor.getDouble(colIndex)); } else { values.put(ke...
static void function(Cursor cursor, String field, ContentValues values, String key) { int colIndex = cursor.getColumnIndex(field); if (!cursor.isNull(colIndex)) { values.put(key, cursor.getDouble(colIndex)); } else { values.put(key, (Double) null); } }
/** * Reads a Double out of a field in a Cursor and writes it to a Map. * * @param cursor The cursor to read from * @param field The REAL field to read * @param values The {@link ContentValues} to put the value into * @param key The key to store the value with in the map */
Reads a Double out of a field in a Cursor and writes it to a Map
cursorDoubleToContentValues
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/database/DatabaseUtils.java", "license": "apache-2.0", "size": 53995 }
[ "android.content.ContentValues" ]
import android.content.ContentValues;
import android.content.*;
[ "android.content" ]
android.content;
1,907,258
public Map<String, ConfigurationEventTypeXMLDOM> getEventTypesXMLDOM();
Map<String, ConfigurationEventTypeXMLDOM> function();
/** * Returns the mapping of event type name to XML DOM event type information. * @return event type name mapping to XML DOM configs */
Returns the mapping of event type name to XML DOM event type information
getEventTypesXMLDOM
{ "repo_name": "intelie/esper", "path": "esper/src/main/java/com/espertech/esper/client/ConfigurationInformation.java", "license": "gpl-2.0", "size": 7775 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,215,868
public String getServerUrls() { if (servers != null) { CollectionStringBuffer csb = new CollectionStringBuffer(","); for (String server : servers) { csb.append(server); } return csb.toString(); } return null; }
String function() { if (servers != null) { CollectionStringBuffer csb = new CollectionStringBuffer(","); for (String server : servers) { csb.append(server); } return csb.toString(); } return null; }
/** * The zookeeper server hosts (multiple servers can be separated by comma) */
The zookeeper server hosts (multiple servers can be separated by comma)
getServerUrls
{ "repo_name": "Fabryprog/camel", "path": "components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZooKeeperConfiguration.java", "license": "apache-2.0", "size": 6142 }
[ "org.apache.camel.util.CollectionStringBuffer" ]
import org.apache.camel.util.CollectionStringBuffer;
import org.apache.camel.util.*;
[ "org.apache.camel" ]
org.apache.camel;
2,116,712
private static void checkCreatePatternForGlob(@NotNull final String glob, @NotNull final CharSequence name, final boolean expectedResult) { final String pattern = GlobFileFilter.createPatternForGlob(glob); Assert.assertEquals("glob=" + glob + ", pattern=" + pattern, expectedResult, Pattern.compile(p...
static void function(@NotNull final String glob, @NotNull final CharSequence name, final boolean expectedResult) { final String pattern = GlobFileFilter.createPatternForGlob(glob); Assert.assertEquals("glob=" + glob + STR + pattern, expectedResult, Pattern.compile(pattern).matcher(name).matches()); }
/** * Calls {@link GlobFileFilter#createPatternForGlob(String)}, matches the given name against it and check for the expected result. * @param glob the pattern to check * @param name the name to match against the pattern * @param expectedResult the expected result */
Calls <code>GlobFileFilter#createPatternForGlob(String)</code>, matches the given name against it and check for the expected result
checkCreatePatternForGlob
{ "repo_name": "christianhujer/japi", "path": "historic2/src/test/net/sf/japi/util/filter/file/GlobFileFilterTest.java", "license": "lgpl-3.0", "size": 3706 }
[ "java.util.regex.Pattern", "net.sf.japi.util.filter.file.GlobFileFilter", "org.jetbrains.annotations.NotNull", "org.junit.Assert" ]
import java.util.regex.Pattern; import net.sf.japi.util.filter.file.GlobFileFilter; import org.jetbrains.annotations.NotNull; import org.junit.Assert;
import java.util.regex.*; import net.sf.japi.util.filter.file.*; import org.jetbrains.annotations.*; import org.junit.*;
[ "java.util", "net.sf.japi", "org.jetbrains.annotations", "org.junit" ]
java.util; net.sf.japi; org.jetbrains.annotations; org.junit;
1,120,234
public static void init(Process process) { long seed = 2001; if (process != null) { try { seed = process.getRootOperator().getParameterAsInt(ProcessRootOperator.PARAMETER_RANDOM_SEED); } catch (UndefinedParameterError e) { // tries to read the general random seed // if no seed was specif...
static void function(Process process) { long seed = 2001; if (process != null) { try { seed = process.getRootOperator().getParameterAsInt(ProcessRootOperator.PARAMETER_RANDOM_SEED); } catch (UndefinedParameterError e) { seed = 2001; } } if (seed == -1) globalRandomGenerator = new RandomGenerator(); else globalRandomGen...
/** * Instantiates the global random number generator and initializes it with * the random number generator seed specified in the <code>global</code> * section of the configuration file. Should be invoked before the * process starts. */
Instantiates the global random number generator and initializes it with the random number generator seed specified in the <code>global</code> section of the configuration file. Should be invoked before the process starts
init
{ "repo_name": "aborg0/rapidminer-vega", "path": "src/com/rapidminer/tools/RandomGenerator.java", "license": "agpl-3.0", "size": 10472 }
[ "com.rapidminer.Process", "com.rapidminer.operator.ProcessRootOperator", "com.rapidminer.parameter.UndefinedParameterError" ]
import com.rapidminer.Process; import com.rapidminer.operator.ProcessRootOperator; import com.rapidminer.parameter.UndefinedParameterError;
import com.rapidminer.*; import com.rapidminer.operator.*; import com.rapidminer.parameter.*;
[ "com.rapidminer", "com.rapidminer.operator", "com.rapidminer.parameter" ]
com.rapidminer; com.rapidminer.operator; com.rapidminer.parameter;
2,240,566
public double getAggregateN(Collection<RandomPercentile> aggregates) { double result = 0; final Iterator<RandomPercentile> iterator = aggregates.iterator(); while (iterator.hasNext()) { result += iterator.next().getN(); } return result; }
double function(Collection<RandomPercentile> aggregates) { double result = 0; final Iterator<RandomPercentile> iterator = aggregates.iterator(); while (iterator.hasNext()) { result += iterator.next().getN(); } return result; }
/** * Returns the total number of values that have been consumed by the aggregates. * * @param aggregates collection of RandomPercentile instances whose combined sample size is sought * @return total number of values that have been consumed by the aggregates */
Returns the total number of values that have been consumed by the aggregates
getAggregateN
{ "repo_name": "sdinot/hipparchus", "path": "hipparchus-stat/src/main/java/org/hipparchus/stat/descriptive/rank/RandomPercentile.java", "license": "apache-2.0", "size": 50124 }
[ "java.util.Collection", "java.util.Iterator" ]
import java.util.Collection; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,055,061
public static MatchResult notMatch() { return new MatchResult(false, Collections.emptyMap()); } }
static MatchResult function() { return new MatchResult(false, Collections.emptyMap()); } }
/** * Creates an instance of {@link MatchResult} that is not a match. * @return */
Creates an instance of <code>MatchResult</code> that is not a match
notMatch
{ "repo_name": "spring-projects/spring-security", "path": "web/src/main/java/org/springframework/security/web/util/matcher/RequestMatcher.java", "license": "apache-2.0", "size": 3231 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
2,466,977
public Properties asProperties() { Properties result = new Properties(); for (Property property : getAllProperties().values()) { result.setProperty(property.getName(), property.getValue()); } return result; }
Properties function() { Properties result = new Properties(); for (Property property : getAllProperties().values()) { result.setProperty(property.getName(), property.getValue()); } return result; }
/** * Converts this package to {@link Properties} object. The result object contains all properties * from all parents as returned by {@link #getAllProperties()}. * * @return {@link Properties} object */
Converts this package to <code>Properties</code> object. The result object contains all properties from all parents as returned by <code>#getAllProperties()</code>
asProperties
{ "repo_name": "azzazzel/apropos", "path": "src/main/java/com/commsen/apropos/core/PropertyPackage.java", "license": "gpl-3.0", "size": 11056 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
964,593
private void addRouteContextToMessage(final ServerMessage message) { byte[] ids = message.getBytesProperty(idsHeaderName); if (ids == null) { ids = new byte[8]; } else { byte[] newIds = new byte[ids.length + 8]; System.arraycopy(ids, 0, newIds, 8, ids.length); ...
void function(final ServerMessage message) { byte[] ids = message.getBytesProperty(idsHeaderName); if (ids == null) { ids = new byte[8]; } else { byte[] newIds = new byte[ids.length + 8]; System.arraycopy(ids, 0, newIds, 8, ids.length); ids = newIds; } ByteBuffer buff = ByteBuffer.wrap(ids); buff.putLong(remoteQueueID)...
/** * This will add routing information to the message. * This will be later processed during the delivery between the nodes. Because of that this has to be persisted as a property on the message. * * @param message */
This will add routing information to the message. This will be later processed during the delivery between the nodes. Because of that this has to be persisted as a property on the message
addRouteContextToMessage
{ "repo_name": "lburgazzoli/apache-activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/RemoteQueueBindingImpl.java", "license": "apache-2.0", "size": 9492 }
[ "java.nio.ByteBuffer", "org.apache.activemq.artemis.core.server.ServerMessage" ]
import java.nio.ByteBuffer; import org.apache.activemq.artemis.core.server.ServerMessage;
import java.nio.*; import org.apache.activemq.artemis.core.server.*;
[ "java.nio", "org.apache.activemq" ]
java.nio; org.apache.activemq;
2,136,725
FamilyTree createFamilyTree(FamilyTree familyTree);
FamilyTree createFamilyTree(FamilyTree familyTree);
/** * create family tree * * @param familyTree * @return */
create family tree
createFamilyTree
{ "repo_name": "lookdowndown/weijin", "path": "src/main/java/com/fnet/weijin/familytree/service/FamilyTreeService.java", "license": "gpl-3.0", "size": 1464 }
[ "com.fnet.weijin.familytree.bean.FamilyTree" ]
import com.fnet.weijin.familytree.bean.FamilyTree;
import com.fnet.weijin.familytree.bean.*;
[ "com.fnet.weijin" ]
com.fnet.weijin;
1,240,479
@Override public void scan(HttpMessage msg, String paramName, String value) { // Get rid of strings that are all numeric // (they probably aren't encoded and they pollute results) if (!value.matches("^[0-9]+$")) { for (OracleEncoder encoder : OracleEncoder.values()) { ...
void function(HttpMessage msg, String paramName, String value) { if (!value.matches(STR)) { for (OracleEncoder encoder : OracleEncoder.values()) { if (checkPaddingOracle(paramName, value, encoder)) { break; } } } }
/** * Scan for Paddding Oracle Vulnerabilites * * @param msg a request only copy of the original message (the response isn't copied) * @param paramName the parameter name that need to be exploited * @param value the original parameter value */
Scan for Paddding Oracle Vulnerabilites
scan
{ "repo_name": "kingthorin/zap-extensions", "path": "addOns/ascanrulesBeta/src/main/java/org/zaproxy/zap/extension/ascanrulesBeta/PaddingOracleScanRule.java", "license": "apache-2.0", "size": 12741 }
[ "org.parosproxy.paros.network.HttpMessage" ]
import org.parosproxy.paros.network.HttpMessage;
import org.parosproxy.paros.network.*;
[ "org.parosproxy.paros" ]
org.parosproxy.paros;
943,731
private PointF isFlingingToDelete() { if (mVelocityTracker == null) return null; if (mDropTarget == null) { mDropTarget = (ButtonDropTarget) mLauncher.findViewById(R.id.delete_target_text); } if (mDropTarget == null || !mDropTarget.isDropEnabled()) return null; Vi...
PointF function() { if (mVelocityTracker == null) return null; if (mDropTarget == null) { mDropTarget = (ButtonDropTarget) mLauncher.findViewById(R.id.delete_target_text); } if (mDropTarget == null !mDropTarget.isDropEnabled()) return null; ViewConfiguration config = ViewConfiguration.get(mLauncher); mVelocityTracker.c...
/** * Determines whether the user flung the current item to delete it. * * @return the vector at which the item was flung, or null if no fling was detected. */
Determines whether the user flung the current item to delete it
isFlingingToDelete
{ "repo_name": "Deletescape-Media/Lawnchair", "path": "src/com/android/launcher3/dragndrop/FlingToDeleteHelper.java", "license": "gpl-3.0", "size": 4184 }
[ "android.graphics.PointF", "android.view.ViewConfiguration", "com.android.launcher3.ButtonDropTarget" ]
import android.graphics.PointF; import android.view.ViewConfiguration; import com.android.launcher3.ButtonDropTarget;
import android.graphics.*; import android.view.*; import com.android.launcher3.*;
[ "android.graphics", "android.view", "com.android.launcher3" ]
android.graphics; android.view; com.android.launcher3;
1,892,185
Map<DatanodeStorage, BlockListAsLongs> getBlockReports(String bpid);
Map<DatanodeStorage, BlockListAsLongs> getBlockReports(String bpid);
/** * Returns one block report per volume. * @param bpid Block Pool Id * @return - a map of DatanodeStorage to block report for the volume. */
Returns one block report per volume
getBlockReports
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java", "license": "apache-2.0", "size": 22452 }
[ "java.util.Map", "org.apache.hadoop.hdfs.protocol.BlockListAsLongs", "org.apache.hadoop.hdfs.server.protocol.DatanodeStorage" ]
import java.util.Map; import org.apache.hadoop.hdfs.protocol.BlockListAsLongs; import org.apache.hadoop.hdfs.server.protocol.DatanodeStorage;
import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.protocol.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
872,571
void setCalibration(Calibration calibration);
void setCalibration(Calibration calibration);
/** * Sets the calibration used to obtain the results. * * @param calibration The calibration used to obtain the results */
Sets the calibration used to obtain the results
setCalibration
{ "repo_name": "aherbert/GDSC-SMLM", "path": "src/main/java/uk/ac/sussex/gdsc/smlm/results/PeakResults.java", "license": "gpl-3.0", "size": 5326 }
[ "uk.ac.sussex.gdsc.smlm.data.config.CalibrationProtos" ]
import uk.ac.sussex.gdsc.smlm.data.config.CalibrationProtos;
import uk.ac.sussex.gdsc.smlm.data.config.*;
[ "uk.ac.sussex" ]
uk.ac.sussex;
2,090,318
public static boolean isOnVine(Player player) { return player.getLocation().getBlock().getType() == Material.VINE; }
static boolean function(Player player) { return player.getLocation().getBlock().getType() == Material.VINE; }
/** * Determine whether a player is on a vine (can be free hanging) * * @param player to check * @return true if on vine */
Determine whether a player is on a vine (can be free hanging)
isOnVine
{ "repo_name": "dmulloy2/AntiCheat", "path": "src/main/java/net/gravitydevelopment/anticheat/util/Util.java", "license": "gpl-3.0", "size": 27170 }
[ "org.bukkit.Material", "org.bukkit.entity.Player" ]
import org.bukkit.Material; import org.bukkit.entity.Player;
import org.bukkit.*; import org.bukkit.entity.*;
[ "org.bukkit", "org.bukkit.entity" ]
org.bukkit; org.bukkit.entity;
831,258
public void delete(Bulwark bulw) { serv.delete(bulw); }
void function(Bulwark bulw) { serv.delete(bulw); }
/** * Removes a bulwark. * * @param bulw * Bulwark to remove. Must be != null and already stored. */
Removes a bulwark
delete
{ "repo_name": "psygate/civrealms_bulwark", "path": "src/com/psygate/bulwark/db/DBLayer.java", "license": "gpl-2.0", "size": 6716 }
[ "com.psygate.bulwark.entity.Bulwark" ]
import com.psygate.bulwark.entity.Bulwark;
import com.psygate.bulwark.entity.*;
[ "com.psygate.bulwark" ]
com.psygate.bulwark;
2,007,809
@Override public synchronized void init(Decoder<VideoFrame> decoder, MultimediaObjectDescriptor object) { if (!this.isrunning) { this.decoder = decoder; this.complete = false; this.preShotList.clear(); this.segments.clear(); this.videoFrameList...
synchronized void function(Decoder<VideoFrame> decoder, MultimediaObjectDescriptor object) { if (!this.isrunning) { this.decoder = decoder; this.complete = false; this.preShotList.clear(); this.segments.clear(); this.videoFrameList.clear(); this.knownShotBoundaries = this.segmentReader.lookUpSegmentsOfObject(object.get...
/** * Method used to initialize the Segmenter - assigns the new Decoder instance and clears * all the queues. * * @param object Media object that is about to be segmented. */
Method used to initialize the Segmenter - assigns the new Decoder instance and clears all the queues
init
{ "repo_name": "silvanheller/cineast", "path": "src/org/vitrivr/cineast/core/segmenter/video/VideoHistogramSegmenter.java", "license": "mit", "size": 8905 }
[ "java.util.Comparator", "org.vitrivr.cineast.core.data.entities.MultimediaObjectDescriptor", "org.vitrivr.cineast.core.data.entities.SegmentDescriptor", "org.vitrivr.cineast.core.data.frames.VideoFrame", "org.vitrivr.cineast.core.decode.general.Decoder" ]
import java.util.Comparator; import org.vitrivr.cineast.core.data.entities.MultimediaObjectDescriptor; import org.vitrivr.cineast.core.data.entities.SegmentDescriptor; import org.vitrivr.cineast.core.data.frames.VideoFrame; import org.vitrivr.cineast.core.decode.general.Decoder;
import java.util.*; import org.vitrivr.cineast.core.data.entities.*; import org.vitrivr.cineast.core.data.frames.*; import org.vitrivr.cineast.core.decode.general.*;
[ "java.util", "org.vitrivr.cineast" ]
java.util; org.vitrivr.cineast;
2,408,717
@Test public final void testCreateInterfaceAlreadyOpenExceptionMessageAndCauseBothNull() { // Setup the resources for the test. String message = null; Throwable cause = null; // Call the method under test. InterfaceAlreadyOpenException e = new InterfaceAlreadyOpenException(message, cause); // Veri...
final void function() { String message = null; Throwable cause = null; InterfaceAlreadyOpenException e = new InterfaceAlreadyOpenException(message, cause); assertThat(STR, e.getMessage(), is(equalTo(message))); assertThat(STR, e.getCause(), is(equalTo(cause))); }
/** * Test method for {@link com.digi.xbee.api.exceptions.InterfaceAlreadyOpenException#InterfaceAlreadyOpenException(String, Throwable)}. */
Test method for <code>com.digi.xbee.api.exceptions.InterfaceAlreadyOpenException#InterfaceAlreadyOpenException(String, Throwable)</code>
testCreateInterfaceAlreadyOpenExceptionMessageAndCauseBothNull
{ "repo_name": "GUBotDev/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/exceptions/InterfaceAlreadyOpenExceptionTest.java", "license": "mpl-2.0", "size": 6486 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
1,491,481
private static JNIMethodId[] getCurrentThreadStackTrace() { JvmtiEnv jvmti = Support.jvmtiEnv(); int threadStackFrameCount = getCurrentThreadStackFrameCount(jvmti); if (threadStackFrameCount < 0) { return new JNIMethodId[0]; } boolean wrongPhase = false; ...
static JNIMethodId[] function() { JvmtiEnv jvmti = Support.jvmtiEnv(); int threadStackFrameCount = getCurrentThreadStackFrameCount(jvmti); if (threadStackFrameCount < 0) { return new JNIMethodId[0]; } boolean wrongPhase = false; int iterationCount = threadStackFrameCount / STACK_FRAMES_PER_ITERATION; if (threadStackFra...
/** * Returns the stack trace of the current thread. * * The returned array contains the current thread's stack, with the first element representing * the top of the stack. Elements in the array correspond to the raw value of JNIMethodId of the * particular method on the stack. * */
Returns the stack trace of the current thread. The returned array contains the current thread's stack, with the first element representing the top of the stack. Elements in the array correspond to the raw value of JNIMethodId of the particular method on the stack
getCurrentThreadStackTrace
{ "repo_name": "smarr/Truffle", "path": "substratevm/src/com.oracle.svm.agent/src/com/oracle/svm/agent/stackaccess/EagerlyLoadedJavaStackAccess.java", "license": "gpl-2.0", "size": 5650 }
[ "com.oracle.svm.jni.JNIObjectHandles", "com.oracle.svm.jni.nativeapi.JNIMethodId", "com.oracle.svm.jvmtiagentbase.Support", "com.oracle.svm.jvmtiagentbase.jvmti.JvmtiEnv", "com.oracle.svm.jvmtiagentbase.jvmti.JvmtiError", "com.oracle.svm.jvmtiagentbase.jvmti.JvmtiFrameInfo", "org.graalvm.nativeimage.Sta...
import com.oracle.svm.jni.JNIObjectHandles; import com.oracle.svm.jni.nativeapi.JNIMethodId; import com.oracle.svm.jvmtiagentbase.Support; import com.oracle.svm.jvmtiagentbase.jvmti.JvmtiEnv; import com.oracle.svm.jvmtiagentbase.jvmti.JvmtiError; import com.oracle.svm.jvmtiagentbase.jvmti.JvmtiFrameInfo; import org.gra...
import com.oracle.svm.jni.*; import com.oracle.svm.jni.nativeapi.*; import com.oracle.svm.jvmtiagentbase.*; import com.oracle.svm.jvmtiagentbase.jvmti.*; import org.graalvm.nativeimage.*; import org.graalvm.nativeimage.c.struct.*; import org.graalvm.nativeimage.c.type.*; import org.graalvm.word.*;
[ "com.oracle.svm", "org.graalvm.nativeimage", "org.graalvm.word" ]
com.oracle.svm; org.graalvm.nativeimage; org.graalvm.word;
1,767,105
public static void getsAllSQLServerInstanceInASubscription( com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) { manager.sqlServerInstances().list(Context.NONE); }
static void function( com.azure.resourcemanager.azurearcdata.AzureArcDataManager manager) { manager.sqlServerInstances().list(Context.NONE); }
/** * Sample code: Gets all SQL Server Instance in a subscription. * * @param manager Entry point to AzureArcDataManager. */
Sample code: Gets all SQL Server Instance in a subscription
getsAllSQLServerInstanceInASubscription
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/azurearcdata/azure-resourcemanager-azurearcdata/src/samples/java/com/azure/resourcemanager/azurearcdata/generated/SqlServerInstancesListSamples.java", "license": "mit", "size": 879 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
773,391
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) @Override public void setDataSource(FileDescriptor fd) throws IOException, IllegalArgumentException, IllegalStateException { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR1) { int native_fd = -1; try { ...
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) void function(FileDescriptor fd) throws IOException, IllegalArgumentException, IllegalStateException { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR1) { int native_fd = -1; try { Field f = fd.getClass().getDeclaredField(STR); f.setAccessible(true); native_fd ...
/** * Sets the data source (FileDescriptor) to use. It is the caller's responsibility * to close the file descriptor. It is safe to do so as soon as this call returns. * * @param fd the FileDescriptor for the file you want to play * @throws IllegalStateException if it is called in an invalid st...
Sets the data source (FileDescriptor) to use. It is the caller's responsibility to close the file descriptor. It is safe to do so as soon as this call returns
setDataSource
{ "repo_name": "307509256/ijkplayer-android", "path": "android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java", "license": "gpl-2.0", "size": 44731 }
[ "android.annotation.TargetApi", "android.os.Build", "android.os.ParcelFileDescriptor", "java.io.FileDescriptor", "java.io.IOException", "java.lang.reflect.Field" ]
import android.annotation.TargetApi; import android.os.Build; import android.os.ParcelFileDescriptor; import java.io.FileDescriptor; import java.io.IOException; import java.lang.reflect.Field;
import android.annotation.*; import android.os.*; import java.io.*; import java.lang.reflect.*;
[ "android.annotation", "android.os", "java.io", "java.lang" ]
android.annotation; android.os; java.io; java.lang;
472,711
public BigDecimal beginningBalance() { return this.innerProperties() == null ? null : this.innerProperties().beginningBalance(); }
BigDecimal function() { return this.innerProperties() == null ? null : this.innerProperties().beginningBalance(); }
/** * Get the beginningBalance property: The beginning balance for the billing period. * * @return the beginningBalance value. */
Get the beginningBalance property: The beginning balance for the billing period
beginningBalance
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java", "license": "mit", "size": 7309 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,313,079
protected String getLabel(String typeName) { try { return BaseEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); } catch(MissingResourceException mre) { BaseEditorPlugin.INSTANCE.log(mre); } return typeName; }
String function(String typeName) { try { return BaseEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); } catch(MissingResourceException mre) { BaseEditorPlugin.INSTANCE.log(mre); } return typeName; }
/** * Returns the label for the specified type name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Returns the label for the specified type name.
getLabel
{ "repo_name": "BaSys-PC1/models", "path": "de.dfki.iui.basys.model.base.editor/src/de/dfki/iui/basys/model/base/presentation/BaseModelWizard.java", "license": "epl-1.0", "size": 17597 }
[ "de.dfki.iui.basys.model.base.provider.BaseEditPlugin", "java.util.MissingResourceException" ]
import de.dfki.iui.basys.model.base.provider.BaseEditPlugin; import java.util.MissingResourceException;
import de.dfki.iui.basys.model.base.provider.*; import java.util.*;
[ "de.dfki.iui", "java.util" ]
de.dfki.iui; java.util;
1,385,703
@Test public void testValidateLoadTabPrivilegesForUser() throws Exception { outputTabHierarcyList.add(buildObjectHierarchy(SERVER1, CUSTOMER_DB, PURCHASES_TAB)); testAuth.authorize(HiveOperation.LOAD, loadTabPrivileges, MANAGER_SUBJECT, inputTabHierarcyList, outputTabHierarcyList); }
void function() throws Exception { outputTabHierarcyList.add(buildObjectHierarchy(SERVER1, CUSTOMER_DB, PURCHASES_TAB)); testAuth.authorize(HiveOperation.LOAD, loadTabPrivileges, MANAGER_SUBJECT, inputTabHierarcyList, outputTabHierarcyList); }
/** * validate load table permissions on manager for customer:purchases */
validate load table permissions on manager for customer:purchases
testValidateLoadTabPrivilegesForUser
{ "repo_name": "mapr/incubator-sentry", "path": "sentry-binding/sentry-binding-hive/src/test/java/org/apache/sentry/binding/hive/TestHiveAuthzBindings.java", "license": "apache-2.0", "size": 17383 }
[ "org.apache.hadoop.hive.ql.plan.HiveOperation" ]
import org.apache.hadoop.hive.ql.plan.HiveOperation;
import org.apache.hadoop.hive.ql.plan.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
373,008
public void writeTo(final OutputStream out) throws IOException { if (this.getData().length == 0) { out.write(intToByteArray(8)); out.write(intToByteArray(this.getRequest())); } else { out.write(intToByteArray(this.getData().length + 8)); out.write(intT...
void function(final OutputStream out) throws IOException { if (this.getData().length == 0) { out.write(intToByteArray(8)); out.write(intToByteArray(this.getRequest())); } else { out.write(intToByteArray(this.getData().length + 8)); out.write(intToByteArray(this.getRequest())); out.write(this.getData()); } }
/** * Writes the {@link PagePrinterRequest} to the given {@link OutputStream}. * @param out The {@link OutputStream} to write to. * @throws IOException if an I/O error occurs. */
Writes the <code>PagePrinterRequest</code> to the given <code>OutputStream</code>
writeTo
{ "repo_name": "michaelknigge/ipdsbox", "path": "ipdsbox/src/main/java/mk/ipdsbox/ppd/PagePrinterRequest.java", "license": "mpl-2.0", "size": 2666 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,494,043
public ValueGroupChangeBuilder id(final UUID id) { this.id = id; return this; } /** * Set the name of the driver that will be updated if value group created is a new value group. * * @param driverName the driver name that will be updated in the {@link DecisionTreeRule}
ValueGroupChangeBuilder function(final UUID id) { this.id = id; return this; } /** * Set the name of the driver that will be updated if value group created is a new value group. * * @param driverName the driver name that will be updated in the {@link DecisionTreeRule}
/** * Sets the value group id that will be de-activated or have the date range changed. * * @param id the value group id * @return reference to this for method chaining */
Sets the value group id that will be de-activated or have the date range changed
id
{ "repo_name": "LogicRunner/swblocks-decisiontree", "path": "change/src/main/java/org/swblocks/decisiontree/change/domain/builder/ValueGroupChangeBuilder.java", "license": "apache-2.0", "size": 15093 }
[ "org.swblocks.decisiontree.domain.DecisionTreeRule" ]
import org.swblocks.decisiontree.domain.DecisionTreeRule;
import org.swblocks.decisiontree.domain.*;
[ "org.swblocks.decisiontree" ]
org.swblocks.decisiontree;
2,748,323
private void setCurrentDtxn(AbstractTransaction ts) { // There can never be another current dtxn still unfinished at this partition! assert(this.currentBlockedTxns.isEmpty()) : String.format("Concurrent multi-partition transactions at partition %d: " + "Orig[%s]...
void function(AbstractTransaction ts) { assert(this.currentBlockedTxns.isEmpty()) : String.format(STR + STR, this.partitionId, this.currentDtxn, ts, this.currentBlockedTxns.size()); assert(this.currentDtxn == null) : String.format(STR + STR, this.partitionId, this.currentDtxn, ts, this.currentBlockedTxns.size()); this....
/** * Set the given AbstractTransaction handle as the current distributed txn * that is running at this partition. Note that this will check to make sure * that no other txn is marked as the currentDtxn. * @param ts */
Set the given AbstractTransaction handle as the current distributed txn that is running at this partition. Note that this will check to make sure that no other txn is marked as the currentDtxn
setCurrentDtxn
{ "repo_name": "tempbottle/h-store", "path": "src/frontend/edu/brown/hstore/PartitionExecutor.java", "license": "gpl-3.0", "size": 272924 }
[ "edu.brown.hstore.txns.AbstractTransaction" ]
import edu.brown.hstore.txns.AbstractTransaction;
import edu.brown.hstore.txns.*;
[ "edu.brown.hstore" ]
edu.brown.hstore;
704,141
public static ArrayList<Key> getPubKeysOfChannel(Connection conn, Channel channel, boolean serverSide, boolean temporary) throws ScriptException, SQLException { ArrayList<Key> currentKeys = new ArrayList<Key>(); ArrayList<String> pubKeys = ScriptTools.getPubKeysOfChannel(channel, serverSide, temporary); ...
static ArrayList<Key> function(Connection conn, Channel channel, boolean serverSide, boolean temporary) throws ScriptException, SQLException { ArrayList<Key> currentKeys = new ArrayList<Key>(); ArrayList<String> pubKeys = ScriptTools.getPubKeysOfChannel(channel, serverSide, temporary); return currentKeys; }
/** * Gets the pub keys of channel. * * @param conn the conn * @param channel the channel * @param serverSide the server side * @param temporary the temporary * @return the pub keys of channel * @throws ScriptException the script exception * @throws SQLException the SQL exception */
Gets the pub keys of channel
getPubKeysOfChannel
{ "repo_name": "josephyzhou/thundernetwork", "path": "thunder-server/src/main/java/network/thunder/server/database/MySQLConnection.java", "license": "agpl-3.0", "size": 92883 }
[ "java.sql.Connection", "java.sql.SQLException", "java.util.ArrayList", "network.thunder.server.database.objects.Channel", "network.thunder.server.database.objects.Key", "network.thunder.server.etc.ScriptTools", "org.bitcoinj.core.ScriptException" ]
import java.sql.Connection; import java.sql.SQLException; import java.util.ArrayList; import network.thunder.server.database.objects.Channel; import network.thunder.server.database.objects.Key; import network.thunder.server.etc.ScriptTools; import org.bitcoinj.core.ScriptException;
import java.sql.*; import java.util.*; import network.thunder.server.database.objects.*; import network.thunder.server.etc.*; import org.bitcoinj.core.*;
[ "java.sql", "java.util", "network.thunder.server", "org.bitcoinj.core" ]
java.sql; java.util; network.thunder.server; org.bitcoinj.core;
2,667,238
final static ChordRetrievalFutureImpl create(Executor exec, Overlay c, Key k) { if (c == null) { throw new IllegalArgumentException("OverlayRetrievalFuture: chord instance must not be null!"); } if (k == null) { throw new IllegalArgumentExc...
final static ChordRetrievalFutureImpl create(Executor exec, Overlay c, Key k) { if (c == null) { throw new IllegalArgumentException(STR); } if (k == null) { throw new IllegalArgumentException(STR); } ChordRetrievalFutureImpl future = new ChordRetrievalFutureImpl(c, k); exec.execute(future.getTask()); return future; } p...
/** * Factory method to create an instance of this class. This method also prepares execution of the retrieval with help of the provided * {@link Executor} <code>exec</code>. * * @param exec * The executor that should asynchronously execute the retrieval of entries with key <co...
Factory method to create an instance of this class. This method also prepares execution of the retrieval with help of the provided <code>Executor</code> <code>exec</code>
create
{ "repo_name": "alessandroleite/dohko", "path": "overlay/src/main/java/br/cic/unb/overlay/chord/ChordRetrievalFutureImpl.java", "license": "lgpl-3.0", "size": 4699 }
[ "br.cic.unb.overlay.Key", "br.cic.unb.overlay.Overlay", "java.util.concurrent.Executor" ]
import br.cic.unb.overlay.Key; import br.cic.unb.overlay.Overlay; import java.util.concurrent.Executor;
import br.cic.unb.overlay.*; import java.util.concurrent.*;
[ "br.cic.unb", "java.util" ]
br.cic.unb; java.util;
1,708,767
private void saveUploadedFile() { OCFile file = mCurrentUpload.getFile(); if (file.fileExists()) { file = mStorageManager.getFileById(file.getFileId()); } long syncDate = System.currentTimeMillis(); file.setLastSyncDateForData(syncDate); // new PROPFIND t...
void function() { OCFile file = mCurrentUpload.getFile(); if (file.fileExists()) { file = mStorageManager.getFileById(file.getFileId()); } long syncDate = System.currentTimeMillis(); file.setLastSyncDateForData(syncDate); ReadRemoteFileOperation operation = new ReadRemoteFileOperation(mCurrentUpload.getRemotePath()); R...
/** * Saves a OC File after a successful upload. * * A PROPFIND is necessary to keep the props in the local database * synchronized with the server, specially the modification time and Etag * (where available) * * TODO refactor this ugly thing */
Saves a OC File after a successful upload. A PROPFIND is necessary to keep the props in the local database synchronized with the server, specially the modification time and Etag (where available) TODO refactor this ugly thing
saveUploadedFile
{ "repo_name": "Barbu5177/android", "path": "src/com/owncloud/android/files/services/FileUploader.java", "license": "gpl-2.0", "size": 38433 }
[ "com.owncloud.android.datamodel.OCFile", "com.owncloud.android.lib.common.operations.RemoteOperationResult", "com.owncloud.android.lib.resources.files.ReadRemoteFileOperation", "com.owncloud.android.lib.resources.files.RemoteFile" ]
import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation; import com.owncloud.android.lib.resources.files.RemoteFile;
import com.owncloud.android.datamodel.*; import com.owncloud.android.lib.common.operations.*; import com.owncloud.android.lib.resources.files.*;
[ "com.owncloud.android" ]
com.owncloud.android;
579,476
public RuleDescr getRuleDescr() { return this.ruleDescr; }
RuleDescr function() { return this.ruleDescr; }
/** * Returns the current RuleDescriptor * @return */
Returns the current RuleDescriptor
getRuleDescr
{ "repo_name": "bobmcwhirter/drools", "path": "drools-compiler/src/main/java/org/drools/rule/builder/RuleBuildContext.java", "license": "apache-2.0", "size": 7648 }
[ "org.drools.lang.descr.RuleDescr" ]
import org.drools.lang.descr.RuleDescr;
import org.drools.lang.descr.*;
[ "org.drools.lang" ]
org.drools.lang;
2,046,092
private static ObjectInspector createStructFromFields(List<StructField> fields, String prefixToRemove) { int prefixLength = prefixToRemove.length() + 1; // also remove the '.' after the prefix ArrayList<String> fieldNames = new ArrayList<String>(); ArrayList<ObjectInspector> fieldOIs = new ArrayList<Objec...
static ObjectInspector function(List<StructField> fields, String prefixToRemove) { int prefixLength = prefixToRemove.length() + 1; ArrayList<String> fieldNames = new ArrayList<String>(); ArrayList<ObjectInspector> fieldOIs = new ArrayList<ObjectInspector>(); for (StructField field : fields) { fieldNames.add(field.getFi...
/** * Create a new struct object inspector for the list of struct fields, first removing the * prefix from the field name. * @param fields * @param prefixToRemove * @return */
Create a new struct object inspector for the list of struct fields, first removing the prefix from the field name
createStructFromFields
{ "repo_name": "jcamachor/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/JoinUtil.java", "license": "apache-2.0", "size": 18063 }
[ "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector", "org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory", "org.apache.hadoop.hive.serde2.objectinspector.StructField" ]
import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory; import org.apache.hadoop.hive.serde2.objectinspector.StructField;
import java.util.*; import org.apache.hadoop.hive.serde2.objectinspector.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
690,446
@Test public void testPermittedTopology_polygon_polygon() { DimensionInfo sourceDimensionInfo = DimensionInfo.XY_POLYGON; DimensionInfo targetDimensionInfo = DimensionInfo.XY_POLYGON; SfCrossesFF instance = new SfCrossesFF(); boolean expResult = false; boolean result = i...
void function() { DimensionInfo sourceDimensionInfo = DimensionInfo.XY_POLYGON; DimensionInfo targetDimensionInfo = DimensionInfo.XY_POLYGON; SfCrossesFF instance = new SfCrossesFF(); boolean expResult = false; boolean result = instance.permittedTopology(sourceDimensionInfo, targetDimensionInfo); assertEquals(expResult...
/** * Test of permittedTopology method, of class SfCrossesFF. */
Test of permittedTopology method, of class SfCrossesFF
testPermittedTopology_polygon_polygon
{ "repo_name": "apache/jena", "path": "jena-geosparql/src/test/java/org/apache/jena/geosparql/geof/topological/filter_functions/simple_features/SfCrossesFFTest.java", "license": "apache-2.0", "size": 13827 }
[ "org.apache.jena.geosparql.implementation.DimensionInfo", "org.junit.Assert" ]
import org.apache.jena.geosparql.implementation.DimensionInfo; import org.junit.Assert;
import org.apache.jena.geosparql.implementation.*; import org.junit.*;
[ "org.apache.jena", "org.junit" ]
org.apache.jena; org.junit;
1,709,961
protected String getSubmitHostPathToPegasusLiteCommon() { StringBuffer path = new StringBuffer(); // first get the path to the share directory File share = mProps.getSharedDir(); if (share == null) { throw new RuntimeException("Property for Pegasus share directory is not...
String function() { StringBuffer path = new StringBuffer(); File share = mProps.getSharedDir(); if (share == null) { throw new RuntimeException(STR); } path.append(share.getAbsolutePath()) .append(File.separator) .append("sh") .append(File.separator) .append(PegasusLite.PEGASUS_LITE_COMMON_FILE_BASENAME); return path.t...
/** * Determines the path to common shell functions file that Pegasus Lite wrapped jobs use. * * @return the path on the submit host. */
Determines the path to common shell functions file that Pegasus Lite wrapped jobs use
getSubmitHostPathToPegasusLiteCommon
{ "repo_name": "pegasus-isi/pegasus", "path": "src/edu/isi/pegasus/planner/code/gridstart/PegasusLite.java", "license": "apache-2.0", "size": 62549 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,372,363
public void remove(String string) { checkWidget(); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); list.remove(string); }
void function(String string) { checkWidget(); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); list.remove(string); }
/** * Searches the receiver's list starting at the first item until an item is * found that is equal to the argument, and removes that item from the list. * * @param string * the item to remove * @exception IllegalArgumentException * <ul> * <li>ERROR_NULL_ARGUME...
Searches the receiver's list starting at the first item until an item is found that is equal to the argument, and removes that item from the list
remove
{ "repo_name": "xored/q7.quality.mockups", "path": "plugins/com.xored.q7.quality.mockups.issues/src/com/xored/q7/quality/mockups/issues/parts/internal/VeryCustomCombo.java", "license": "epl-1.0", "size": 69643 }
[ "org.eclipse.swt.SWT" ]
import org.eclipse.swt.SWT;
import org.eclipse.swt.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
700,287
private void setListenerRadioButton() throws FileNotFoundException, IOException { setListenerRadioButton(diffRadioButton, Constants.DIFF_PERSPECTIVE); setListenerRadioButton(similarRadioButton, Constants.SIMILARITY_PERSPECTIVE); }
void function() throws FileNotFoundException, IOException { setListenerRadioButton(diffRadioButton, Constants.DIFF_PERSPECTIVE); setListenerRadioButton(similarRadioButton, Constants.SIMILARITY_PERSPECTIVE); }
/** * Set Listener for checkBox */
Set Listener for checkBox
setListenerRadioButton
{ "repo_name": "gems-uff/idiff", "path": "src/main/java/gui/MainILCS.java", "license": "mit", "size": 23607 }
[ "java.io.FileNotFoundException", "java.io.IOException" ]
import java.io.FileNotFoundException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,382,796
public static Intent getHideIntent(Context context, Class<? extends StandOutWindow> cls, int id) { return new Intent(context, cls).putExtra("id", id).setAction(ACTION_HIDE); }
static Intent function(Context context, Class<? extends StandOutWindow> cls, int id) { return new Intent(context, cls).putExtra("id", id).setAction(ACTION_HIDE); }
/** * See {@link #hide(Context, Class, int)}. * * @param context * A Context of the application package implementing this class. * @param cls * The Service extending {@link StandOutWindow} that is managing * the window. * @param id * The id representing thi...
See <code>#hide(Context, Class, int)</code>
getHideIntent
{ "repo_name": "mkodekar/Roundr", "path": "StandOutRoundR/src/wei/mark/standout/StandOutWindow.java", "license": "apache-2.0", "size": 59590 }
[ "android.content.Context", "android.content.Intent" ]
import android.content.Context; import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
396,263
Task waitForTask(String url) throws MaxTimeWaitingExceedException;
Task waitForTask(String url) throws MaxTimeWaitingExceedException;
/** * Wait while the task is running. * * @param url * the url where the task is * @throws MaxTimeWaitingExceedException * if the waiting takes more time than expected */
Wait while the task is running
waitForTask
{ "repo_name": "hmunfru/fiware-sdc", "path": "client/src/main/java/com/telefonica/euro_iaas/sdc/client/services/TaskService.java", "license": "apache-2.0", "size": 3331 }
[ "com.telefonica.euro_iaas.sdc.client.exception.MaxTimeWaitingExceedException", "com.telefonica.euro_iaas.sdc.model.Task" ]
import com.telefonica.euro_iaas.sdc.client.exception.MaxTimeWaitingExceedException; import com.telefonica.euro_iaas.sdc.model.Task;
import com.telefonica.euro_iaas.sdc.client.exception.*; import com.telefonica.euro_iaas.sdc.model.*;
[ "com.telefonica.euro_iaas" ]
com.telefonica.euro_iaas;
1,949,935
static String getStringValue(Node n) { // TODO(user): regex literals as well. switch (n.getType()) { case Token.STRING: case Token.STRING_KEY: return n.getString(); case Token.NAME: String name = n.getString(); if ("undefined".equals(name) || "Infinity".e...
static String getStringValue(Node n) { switch (n.getType()) { case Token.STRING: case Token.STRING_KEY: return n.getString(); case Token.NAME: String name = n.getString(); if (STR.equals(name) STR.equals(name) "NaN".equals(name)) { return name; } break; case Token.NUMBER: return getStringValue(n.getDouble()); case Toke...
/** * Gets the value of a node as a String, or null if it cannot be converted. * When it returns a non-null String, this method effectively emulates the * <code>String()</code> JavaScript cast function. */
Gets the value of a node as a String, or null if it cannot be converted. When it returns a non-null String, this method effectively emulates the <code>String()</code> JavaScript cast function
getStringValue
{ "repo_name": "blickly/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeUtil.java", "license": "apache-2.0", "size": 103104 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token", "com.google.javascript.rhino.jstype.TernaryValue" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; import com.google.javascript.rhino.jstype.TernaryValue;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
1,554,813
EClass getYMaxLengthValidationConfig();
EClass getYMaxLengthValidationConfig();
/** * Returns the meta object for class '{@link org.lunifera.ecview.core.common.model.validation.YMaxLengthValidationConfig <em>YMax Length Validation Config</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>YMax Length Validation Config</em>'. * @see org.lunif...
Returns the meta object for class '<code>org.lunifera.ecview.core.common.model.validation.YMaxLengthValidationConfig YMax Length Validation Config</code>'.
getYMaxLengthValidationConfig
{ "repo_name": "lunifera/lunifera-ecview", "path": "org.lunifera.ecview.core.common.model/src/org/lunifera/ecview/core/common/model/validation/ValidationPackage.java", "license": "epl-1.0", "size": 33986 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,378,134
private int read() throws IOException { if (read<(-1)) read=reader.read(); if (read<0) { malform("Unexpected end of file."); } else if (read=='\n') { x=1; y++; } else { x++; } int ans = read; read = -2; return ans; }
int function() throws IOException { if (read<(-1)) read=reader.read(); if (read<0) { malform(STR); } else if (read=='\n') { x=1; y++; } else { x++; } int ans = read; read = -2; return ans; }
/** Read the next character. * @throws IOException if end-of-file is reached. * @throws IOException if an I/O error occurred. */
Read the next character
read
{ "repo_name": "ModelWriter/WP3", "path": "Source/eu.modelwriter.visualization.test/src/edu/mit/csail/sdg/alloy4/XMLNode.java", "license": "epl-1.0", "size": 22498 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,710,142
public static <V> SortedMap<Integer, V> filter(SortedMap<Integer, V> map, String from, String to) { if (from == null && to == null) return map; if (to == null) return map.headMap(Integer.parseInt(from) - 1); if (from == null) return map.tailMap(Integer.parseInt(t...
static <V> SortedMap<Integer, V> function(SortedMap<Integer, V> map, String from, String to) { if (from == null && to == null) return map; if (to == null) return map.headMap(Integer.parseInt(from) - 1); if (from == null) return map.tailMap(Integer.parseInt(to)); return map.subMap(Integer.parseInt(to), Integer.parseInt(...
/** * Creates a sub map by using the given range (both ends inclusive). */
Creates a sub map by using the given range (both ends inclusive)
filter
{ "repo_name": "v1v/jenkins", "path": "core/src/main/java/hudson/Functions.java", "license": "mit", "size": 87344 }
[ "java.util.SortedMap" ]
import java.util.SortedMap;
import java.util.*;
[ "java.util" ]
java.util;
285,062
public static void assertPredicateDoesNotMatch(Predicate predicate, Exchange exchange) { try { PredicateAssertHelper.assertMatches(predicate, "Predicate should match: ", exchange); } catch (AssertionError e) { LOG.debug("Caught expected assertion error: " + e); } ...
static void function(Predicate predicate, Exchange exchange) { try { PredicateAssertHelper.assertMatches(predicate, STR, exchange); } catch (AssertionError e) { LOG.debug(STR + e); } assertPredicate(predicate, exchange, false); }
/** * Asserts that the predicate returns the expected value on the exchange */
Asserts that the predicate returns the expected value on the exchange
assertPredicateDoesNotMatch
{ "repo_name": "mgyongyosi/camel", "path": "components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java", "license": "apache-2.0", "size": 20660 }
[ "org.apache.camel.Exchange", "org.apache.camel.Predicate", "org.apache.camel.util.PredicateAssertHelper" ]
import org.apache.camel.Exchange; import org.apache.camel.Predicate; import org.apache.camel.util.PredicateAssertHelper;
import org.apache.camel.*; import org.apache.camel.util.*;
[ "org.apache.camel" ]
org.apache.camel;
2,522,625
final void setThreshold(int percentage) { if (percentage < 0) { percentage = defaultThreshold; } if (MemoryUsageConstants.isThresholdValid(percentage)) { TreeSet<String> thresholdPools = new TreeSet<String>(); TreeSet<String>...
final void setThreshold(int percentage) { if (percentage < 0) { percentage = defaultThreshold; } if (MemoryUsageConstants.isThresholdValid(percentage)) { TreeSet<String> thresholdPools = new TreeSet<String>(); TreeSet<String> noThresholdPools = new TreeSet<String>(); List<MemoryPoolMXBean> pools = getMemoryPools(); for...
/** * Sets the threshold percentage. * * @param percentage The threshold as a percentage of memory consumption. * This value may be 0 (zero) to switch off automatic heap dumps * or in the range {@link #MIN_DUMP_THRESHOLD} to * {@link #MAX_DUMP_THRESHO...
Sets the threshold percentage
setThreshold
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/webconsole-plugins/memoryusage/src/main/java/org/apache/felix/webconsole/plugins/memoryusage/internal/MemoryUsageSupport.java", "license": "apache-2.0", "size": 24537 }
[ "java.lang.management.MemoryPoolMXBean", "java.util.List", "java.util.TreeSet", "org.osgi.service.log.LogService" ]
import java.lang.management.MemoryPoolMXBean; import java.util.List; import java.util.TreeSet; import org.osgi.service.log.LogService;
import java.lang.management.*; import java.util.*; import org.osgi.service.log.*;
[ "java.lang", "java.util", "org.osgi.service" ]
java.lang; java.util; org.osgi.service;
962,839
@After public void tearDown() { if (this.context != null) { LibUsb.exit(this.context); } }
void function() { if (this.context != null) { LibUsb.exit(this.context); } }
/** * Tear down the test. */
Tear down the test
tearDown
{ "repo_name": "zodsoft/usb4java", "path": "src/test/java/org/usb4java/LibUsbGlobalTest.java", "license": "mit", "size": 4343 }
[ "org.usb4java.LibUsb" ]
import org.usb4java.LibUsb;
import org.usb4java.*;
[ "org.usb4java" ]
org.usb4java;
773,373
@Override public boolean removeObject(I id) throws IllegalObjectException { boolean removed = getObjects().remove(getObject(id)); if (!removed) { throw new IllegalObjectException("Object" + id + "not successfully removed"); } return true; }
boolean function(I id) throws IllegalObjectException { boolean removed = getObjects().remove(getObject(id)); if (!removed) { throw new IllegalObjectException(STR + id + STR); } return true; }
/** * Removes a given object from the set of objects of this context. * @param id identifier of the object to be removed * @return <code>true</code> if the object with identifier <code>id</code> is successfully removed, <code>false</code> * otherwise * @throws IllegalObjectException if <code>object</code> doe...
Removes a given object from the set of objects of this context
removeObject
{ "repo_name": "fcatools/fcalib", "path": "src/main/java/de/tudresden/inf/tcs/fcalib/PartialContext.java", "license": "gpl-3.0", "size": 10988 }
[ "de.tudresden.inf.tcs.fcaapi.exception.IllegalObjectException" ]
import de.tudresden.inf.tcs.fcaapi.exception.IllegalObjectException;
import de.tudresden.inf.tcs.fcaapi.exception.*;
[ "de.tudresden.inf" ]
de.tudresden.inf;
531,173
protected void saveResponseHeaders(HierarchicalStreamWriter writer, MarshallingContext context, SampleResult res, SampleSaveConfiguration save) { if (save.saveResponseHeaders()) { writeString(writer, TAG_RESPONSE_HEADER, res.getResponseHeaders()); } }
void function(HierarchicalStreamWriter writer, MarshallingContext context, SampleResult res, SampleSaveConfiguration save) { if (save.saveResponseHeaders()) { writeString(writer, TAG_RESPONSE_HEADER, res.getResponseHeaders()); } }
/** * Save response headers from sample result into the stream * * @param writer * stream to save objects into * @param context * context for xstream to allow nested objects * @param res * sample to be saved * @param save * co...
Save response headers from sample result into the stream
saveResponseHeaders
{ "repo_name": "ra0077/jmeter", "path": "src/core/org/apache/jmeter/save/converters/SampleResultConverter.java", "license": "apache-2.0", "size": 20924 }
[ "com.thoughtworks.xstream.converters.MarshallingContext", "com.thoughtworks.xstream.io.HierarchicalStreamWriter", "org.apache.jmeter.samplers.SampleResult", "org.apache.jmeter.samplers.SampleSaveConfiguration" ]
import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; import org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.samplers.SampleSaveConfiguration;
import com.thoughtworks.xstream.converters.*; import com.thoughtworks.xstream.io.*; import org.apache.jmeter.samplers.*;
[ "com.thoughtworks.xstream", "org.apache.jmeter" ]
com.thoughtworks.xstream; org.apache.jmeter;
554,412
private void unlockEntries(Iterable<GridCacheEntryEx> locked) { for (GridCacheEntryEx entry : locked) entry.unlockEntry(); AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion(); for (GridCacheEntryEx entry : locked) entry.touch(); }
void function(Iterable<GridCacheEntryEx> locked) { for (GridCacheEntryEx entry : locked) entry.unlockEntry(); AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion(); for (GridCacheEntryEx entry : locked) entry.touch(); }
/** * Releases java-level locks on cache entries. * * @param locked Locked entries. */
Releases java-level locks on cache entries
unlockEntries
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java", "license": "apache-2.0", "size": 57061 }
[ "org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion", "org.apache.ignite.internal.processors.cache.GridCacheEntryEx" ]
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,266,456
public static String format( final List<? extends NameValuePair> parameters, final String encoding) { final StringBuilder result = new StringBuilder(); for (final NameValuePair parameter : parameters) { final String encodedName = encode(parameter.getName(), encodi...
static String function( final List<? extends NameValuePair> parameters, final String encoding) { final StringBuilder result = new StringBuilder(); for (final NameValuePair parameter : parameters) { final String encodedName = encode(parameter.getName(), encoding); final String value = parameter.getValue(); final String ...
/** * Returns a String that is suitable for use as an <code>application/x-www-form-urlencoded</code> * list of parameters in an HTTP PUT or HTTP POST. * * @param parameters The parameters to include. * @param encoding The encoding to use. */
Returns a String that is suitable for use as an <code>application/x-www-form-urlencoded</code> list of parameters in an HTTP PUT or HTTP POST
format
{ "repo_name": "OnlyInAmerica/SecureShareLib", "path": "SecureShareUILibrary/src/io/scal/secureshareui/soundcloud/Request.java", "license": "apache-2.0", "size": 21170 }
[ "java.util.List", "org.apache.http.NameValuePair" ]
import java.util.List; import org.apache.http.NameValuePair;
import java.util.*; import org.apache.http.*;
[ "java.util", "org.apache.http" ]
java.util; org.apache.http;
2,229,029
public static Hop deepCopyHopsDag( Hop hops ) throws HopsException { Hop ret = null; try { HashMap<Long, Hop> memo = new HashMap<Long, Hop>(); //orig ID, new clone ret = rDeepCopyHopsDag(hops, memo); } catch(Exception ex) { throw new HopsException(ex); } return ret; }
static Hop function( Hop hops ) throws HopsException { Hop ret = null; try { HashMap<Long, Hop> memo = new HashMap<Long, Hop>(); ret = rDeepCopyHopsDag(hops, memo); } catch(Exception ex) { throw new HopsException(ex); } return ret; }
/** * Deep copy of hops dags for parallel recompilation. * * @param hops high-level operator * @return high-level operator * @throws HopsException if HopsException occurs */
Deep copy of hops dags for parallel recompilation
deepCopyHopsDag
{ "repo_name": "akchinSTC/systemml", "path": "src/main/java/org/apache/sysml/hops/recompile/Recompiler.java", "license": "apache-2.0", "size": 69607 }
[ "java.util.HashMap", "org.apache.sysml.hops.Hop", "org.apache.sysml.hops.HopsException" ]
import java.util.HashMap; import org.apache.sysml.hops.Hop; import org.apache.sysml.hops.HopsException;
import java.util.*; import org.apache.sysml.hops.*;
[ "java.util", "org.apache.sysml" ]
java.util; org.apache.sysml;
2,455,751
@Test public void testRDNCompareToNC2NC() throws LdapException { Rdn rdn1 = new Rdn( schemaManager, " cn = b " ); Rdn rdn2 = new Rdn( schemaManager, " cn = b " ); assertTrue( rdn1.equals( rdn2 ) ); }
void function() throws LdapException { Rdn rdn1 = new Rdn( schemaManager, STR ); Rdn rdn2 = new Rdn( schemaManager, STR ); assertTrue( rdn1.equals( rdn2 ) ); }
/** * Compares a simple NC to a simple NC. * * @throws LdapException */
Compares a simple NC to a simple NC
testRDNCompareToNC2NC
{ "repo_name": "darranl/directory-shared", "path": "integ/src/test/java/org/apache/directory/api/ldap/model/name/SchemaAwareRdnTest.java", "license": "apache-2.0", "size": 35457 }
[ "org.apache.directory.api.ldap.model.exception.LdapException", "org.apache.directory.api.ldap.model.name.Rdn", "org.junit.Assert" ]
import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.name.Rdn; import org.junit.Assert;
import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.name.*; import org.junit.*;
[ "org.apache.directory", "org.junit" ]
org.apache.directory; org.junit;
779,280
@Override public PrintWriter getLogWriter() throws SQLException { return dataSource.getLogWriter(); }
PrintWriter function() throws SQLException { return dataSource.getLogWriter(); }
/** * JAVADOC Method Level Comments * * @return JAVADOC. * @throws SQLException JAVADOC. */
JAVADOC Method Level Comments
getLogWriter
{ "repo_name": "cucina/opencucina", "path": "nosql/security/src/main/java/org/cucina/security/crypto/EncryptedCredentialsDataSource.java", "license": "apache-2.0", "size": 3957 }
[ "java.io.PrintWriter", "java.sql.SQLException" ]
import java.io.PrintWriter; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
2,359,388
public static String getShortenAddress(Place selectedPlace) { //get the first name of the address String shortAddress = ""; for (int i = 0; i < selectedPlace.getAddress().length(); i++) { if (selectedPlace.getAddress().charAt(i) == ',') { shortAddress = (String) s...
static String function(Place selectedPlace) { String shortAddress = ""; for (int i = 0; i < selectedPlace.getAddress().length(); i++) { if (selectedPlace.getAddress().charAt(i) == ',') { shortAddress = (String) selectedPlace.getAddress().subSequence(0, i); break; } } return shortAddress; }
/** * Method to get a short address from the place picker * * @param selectedPlace the elected place * @return the shorten address */
Method to get a short address from the place picker
getShortenAddress
{ "repo_name": "Ahmed-Abdelmeged/ADAS", "path": "app/src/main/java/com/example/mego/adas/utils/AdasUtils.java", "license": "apache-2.0", "size": 6830 }
[ "com.google.android.gms.location.places.Place" ]
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.*;
[ "com.google.android" ]
com.google.android;
676,153
Publisher<Document> runCommand(ClientSession clientSession, Bson command, ReadPreference readPreference);
Publisher<Document> runCommand(ClientSession clientSession, Bson command, ReadPreference readPreference);
/** * Executes command in the context of the current database. * * @param clientSession the client session with which to associate this operation * @param command the command to be run * @param readPreference the {@link com.mongodb.ReadPreference} to be used when executing the command ...
Executes command in the context of the current database
runCommand
{ "repo_name": "rozza/mongo-java-driver-reactivestreams", "path": "driver/src/main/com/mongodb/reactivestreams/client/MongoDatabase.java", "license": "apache-2.0", "size": 22823 }
[ "com.mongodb.ReadPreference", "org.bson.Document", "org.bson.conversions.Bson", "org.reactivestreams.Publisher" ]
import com.mongodb.ReadPreference; import org.bson.Document; import org.bson.conversions.Bson; import org.reactivestreams.Publisher;
import com.mongodb.*; import org.bson.*; import org.bson.conversions.*; import org.reactivestreams.*;
[ "com.mongodb", "org.bson", "org.bson.conversions", "org.reactivestreams" ]
com.mongodb; org.bson; org.bson.conversions; org.reactivestreams;
2,553,914
public static void getTime(final JLabel hour, final JLabel min) { Calendar c = Calendar.getInstance(TimeZone.getDefault()); String tmp = "" + c.get(Calendar.HOUR_OF_DAY); tmp = tmp.length() == 1 ? "0" + tmp : tmp; hour.setText(tmp); tmp = "" + c.get(Calendar.MINUTE); tmp = tmp.length() == 1 ? "0"...
static void function(final JLabel hour, final JLabel min) { Calendar c = Calendar.getInstance(TimeZone.getDefault()); String tmp = STR0STRSTR0" + tmp : tmp; min.setText(tmp); }
/** * Write the hour and minute of the current time into the given labels. * * @param hour * Label for the hour display. * @param min * Label for the minute display. */
Write the hour and minute of the current time into the given labels
getTime
{ "repo_name": "Kazeheki/Alotoc", "path": "src/alotoc/logic/Time.java", "license": "mit", "size": 1045 }
[ "java.util.Calendar", "java.util.TimeZone", "javax.swing.JLabel" ]
import java.util.Calendar; import java.util.TimeZone; import javax.swing.JLabel;
import java.util.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
684,616
protected static List<TaskTag> getCurrentTaskTags() { try { final IScopeContext[] contexts = new IScopeContext[] { EclipseUtil.instanceScope(), EclipseUtil.defaultScope() }; String rawTagNames = Platform.getPreferencesService().getString(PREF_PLUGIN_ID, ICorePreferenceConstants.TASK_TAG_NAMES, n...
static List<TaskTag> function() { try { final IScopeContext[] contexts = new IScopeContext[] { EclipseUtil.instanceScope(), EclipseUtil.defaultScope() }; String rawTagNames = Platform.getPreferencesService().getString(PREF_PLUGIN_ID, ICorePreferenceConstants.TASK_TAG_NAMES, null, contexts); String rawTagPriorities = Pl...
/** * Looks up the task tag strings an priorities from preferences. * * @return */
Looks up the task tag strings an priorities from preferences
getCurrentTaskTags
{ "repo_name": "apicloudcom/APICloud-Studio", "path": "com.aptana.core/src/com/aptana/core/resources/TaskTag.java", "license": "gpl-3.0", "size": 5987 }
[ "com.aptana.core.CorePlugin", "com.aptana.core.ICorePreferenceConstants", "com.aptana.core.logging.IdeLog", "com.aptana.core.util.EclipseUtil", "java.util.Collections", "java.util.List", "org.eclipse.core.runtime.Platform", "org.eclipse.core.runtime.preferences.IScopeContext" ]
import com.aptana.core.CorePlugin; import com.aptana.core.ICorePreferenceConstants; import com.aptana.core.logging.IdeLog; import com.aptana.core.util.EclipseUtil; import java.util.Collections; import java.util.List; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.IScopeContext;
import com.aptana.core.*; import com.aptana.core.logging.*; import com.aptana.core.util.*; import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.core.runtime.preferences.*;
[ "com.aptana.core", "java.util", "org.eclipse.core" ]
com.aptana.core; java.util; org.eclipse.core;
673,156
public List<ApplicationGatewayRedirectConfiguration> redirectConfigurations() { return this.redirectConfigurations; }
List<ApplicationGatewayRedirectConfiguration> function() { return this.redirectConfigurations; }
/** * Get redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). * * @return the redirectConfigurations value */
Get redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](HREF)
redirectConfigurations
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/ApplicationGatewayInner.java", "license": "mit", "size": 36336 }
[ "com.microsoft.azure.management.network.v2020_06_01.ApplicationGatewayRedirectConfiguration", "java.util.List" ]
import com.microsoft.azure.management.network.v2020_06_01.ApplicationGatewayRedirectConfiguration; import java.util.List;
import com.microsoft.azure.management.network.v2020_06_01.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,662,834
protected void startAuthSession(HttpServletRequest servletRequest, HttpServletResponse servletResponse, Object userSession, boolean isNew) { AuthUtil.startUserSession(servletRequest, userSession); if (useCookie == false) { return; } if (isNew == true || recreateCookieOnLogin == true) { String[] c...
void function(HttpServletRequest servletRequest, HttpServletResponse servletResponse, Object userSession, boolean isNew) { AuthUtil.startUserSession(servletRequest, userSession); if (useCookie == false) { return; } if (isNew == true recreateCookieOnLogin == true) { String[] cookieData = createCookieData(userSession); i...
/** * Starts auth session by saving session auth object and optionally creating an auth cookie. * Auth cookie is created for new auth sessions and for old ones if recreation is enabled. * @param servletRequest http request * @param servletResponse http response * @param userSession created session object...
Starts auth session by saving session auth object and optionally creating an auth cookie. Auth cookie is created for new auth sessions and for old ones if recreation is enabled
startAuthSession
{ "repo_name": "Artemish/jodd", "path": "jodd-joy/src/main/java/jodd/joy/auth/AuthenticationInterceptor.java", "license": "bsd-3-clause", "size": 8527 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,276,373
//----------------------------------------------------------------------- public Builder shiftType(ScenarioShiftType shiftType) { JodaBeanUtils.notNull(shiftType, "shiftType"); this._shiftType = shiftType; return this; }
Builder function(ScenarioShiftType shiftType) { JodaBeanUtils.notNull(shiftType, STR); this._shiftType = shiftType; return this; }
/** * Sets how the shift should be applied. * @param shiftType the new value, not null * @return this, for chaining, not null */
Sets how the shift should be applied
shiftType
{ "repo_name": "McLeodMoores/starling", "path": "projects/integration/src/main/java/com/opengamma/integration/marketdata/manipulator/dsl/YieldCurveParallelShift.java", "license": "apache-2.0", "size": 11944 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,734,694
protected Configuration getParserConfig() { return parserConfig; }
Configuration function() { return parserConfig; }
/** * Get parser configuration structure * * @return parser <code>Configuration</code> structure instance */
Get parser configuration structure
getParserConfig
{ "repo_name": "stefandmn/AREasy", "path": "src/java/org/areasy/runtime/engine/services/parser/AbstractParser.java", "license": "lgpl-3.0", "size": 4498 }
[ "org.areasy.common.support.configuration.Configuration" ]
import org.areasy.common.support.configuration.Configuration;
import org.areasy.common.support.configuration.*;
[ "org.areasy.common" ]
org.areasy.common;
1,752,607
public String doctorScheduleCalendar(){ DoctorData docData = new DoctorData(); List<DoctorModel> branchList = docData.getBranchStandard(docModel.getDoctorID()); docModel.setPre_name_th(branchList.get(0).getPre_name_th()); docModel.setFirst_name_th(branchList.get(0).getFirst_name_th()); docModel...
String function(){ DoctorData docData = new DoctorData(); List<DoctorModel> branchList = docData.getBranchStandard(docModel.getDoctorID()); docModel.setPre_name_th(branchList.get(0).getPre_name_th()); docModel.setFirst_name_th(branchList.get(0).getFirst_name_th()); docModel.setLast_name_th(branchList.get(0).getLast_nam...
/** * Displaying the doctor's calendar schedule. * @author anubissmile * @return String | Action result. */
Displaying the doctor's calendar schedule
doctorScheduleCalendar
{ "repo_name": "smartictcoop/SmartDental", "path": "src/main/java/com/smict/person/action/DoctorAction.java", "license": "unlicense", "size": 71988 }
[ "com.smict.person.data.DoctorData", "com.smict.person.model.DoctorModel", "java.util.List" ]
import com.smict.person.data.DoctorData; import com.smict.person.model.DoctorModel; import java.util.List;
import com.smict.person.data.*; import com.smict.person.model.*; import java.util.*;
[ "com.smict.person", "java.util" ]
com.smict.person; java.util;
718,040
public All getContainerAll() { return item.getContainerAll(); }
All function() { return item.getContainerAll(); }
/** * Return the encapsulate Low Level API object. */
Return the encapsulate Low Level API object
getContainerAll
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/terms/hlapi/MultisetSortHLAPI.java", "license": "epl-1.0", "size": 16242 }
[ "fr.lip6.move.pnml.pthlpng.multisets.All" ]
import fr.lip6.move.pnml.pthlpng.multisets.All;
import fr.lip6.move.pnml.pthlpng.multisets.*;
[ "fr.lip6.move" ]
fr.lip6.move;
2,645,452
public long getMaxTime(final TimeUnit timeUnit) { notNull("timeUnit", timeUnit); return timeUnit.convert(maxTimeMS, TimeUnit.MILLISECONDS); }
long function(final TimeUnit timeUnit) { notNull(STR, timeUnit); return timeUnit.convert(maxTimeMS, TimeUnit.MILLISECONDS); }
/** * Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time. * * @param timeUnit the time unit to return the result in * @return the maximum execution time in the given time unit */
Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time
getMaxTime
{ "repo_name": "jsonking/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/operation/CountOperation.java", "license": "apache-2.0", "size": 11178 }
[ "com.mongodb.assertions.Assertions", "java.util.concurrent.TimeUnit" ]
import com.mongodb.assertions.Assertions; import java.util.concurrent.TimeUnit;
import com.mongodb.assertions.*; import java.util.concurrent.*;
[ "com.mongodb.assertions", "java.util" ]
com.mongodb.assertions; java.util;
1,007,913
@CanIgnoreReturnValue @Override public int setCount(E element, int count) { checkNotNull(element); checkNonnegative(count, "count"); while (true) { AtomicInteger existingCounter = Maps.safeGet(countMap, element); if (existingCounter == null) { if (count == 0) { return 0; ...
int function(E element, int count) { checkNotNull(element); checkNonnegative(count, "count"); while (true) { AtomicInteger existingCounter = Maps.safeGet(countMap, element); if (existingCounter == null) { if (count == 0) { return 0; } else { existingCounter = countMap.putIfAbsent(element, new AtomicInteger(count)); if ...
/** * Adds or removes occurrences of {@code element} such that the {@link #count} of the element * becomes {@code count}. * * @return the count of {@code element} in the multiset before this call * @throws IllegalArgumentException if {@code count} is negative */
Adds or removes occurrences of element such that the <code>#count</code> of the element becomes count
setCount
{ "repo_name": "berndhopp/guava", "path": "guava/src/com/google/common/collect/ConcurrentHashMultiset.java", "license": "apache-2.0", "size": 20741 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.CollectPreconditions", "java.util.concurrent.atomic.AtomicInteger" ]
import com.google.common.base.Preconditions; import com.google.common.collect.CollectPreconditions; import java.util.concurrent.atomic.AtomicInteger;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.concurrent.atomic.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,092,626
public static String searchString(final String pDbFieldname, final String pJavaString, final String pJdbcClass) { String convertedString = null; if (pJdbcClass == null || pJdbcClass.equals(Constants.JDBC_CLASS_MYSQL)) { convertedString = StringToSQL.searchStringMySQL(pDbFieldname, pJavaString); ...
static String function(final String pDbFieldname, final String pJavaString, final String pJdbcClass) { String convertedString = null; if (pJdbcClass == null pJdbcClass.equals(Constants.JDBC_CLASS_MYSQL)) { convertedString = StringToSQL.searchStringMySQL(pDbFieldname, pJavaString); } else if (pJdbcClass.equals(Constants...
/** * The <code>SearchString</code> method prepares a string for searching in a SQL database using = * or like. * * @param pDbFieldname database fieldname * @param pJavaString Java string to convert * @param pJdbcClass name of the JDBC class to detect DataBase * @return string as SQL */
The <code>SearchString</code> method prepares a string for searching in a SQL database using = or like
searchString
{ "repo_name": "ManfredTremmel/dbnavigationbar", "path": "src/main/java/de/knightsoft/dbnavigationbar/server/StringToSQL.java", "license": "agpl-3.0", "size": 19376 }
[ "de.knightsoft.dbnavigationbar.shared.Constants" ]
import de.knightsoft.dbnavigationbar.shared.Constants;
import de.knightsoft.dbnavigationbar.shared.*;
[ "de.knightsoft.dbnavigationbar" ]
de.knightsoft.dbnavigationbar;
1,912,594
@Message(id = 356, value = "EJB component type %s does not support pools") IllegalStateException invalidComponentType(String simpleName);
@Message(id = 356, value = STR) IllegalStateException invalidComponentType(String simpleName);
/** * Creates an exception indicating EJB component type does not support pools * * @return an {@link IllegalStateException} for the error. */
Creates an exception indicating EJB component type does not support pools
invalidComponentType
{ "repo_name": "golovnin/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java", "license": "lgpl-2.1", "size": 147179 }
[ "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
1,150,712
public List<DeliveryRuleCondition> conditions() { return this.innerProperties() == null ? null : this.innerProperties().conditions(); }
List<DeliveryRuleCondition> function() { return this.innerProperties() == null ? null : this.innerProperties().conditions(); }
/** * Get the conditions property: A list of conditions that must be matched for the actions to be executed. * * @return the conditions value. */
Get the conditions property: A list of conditions that must be matched for the actions to be executed
conditions
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/RuleUpdateParameters.java", "license": "mit", "size": 5840 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,912,141
public MessagePermissions getForumMessagePermissionForRole(BaseForum forum, String role, String typeId) { MessagePermissions permissions = forum == null || forum.getId() == null ? null : getMessagePermissionByKeyValue(role, "forumId", forum.getId().toString(), false); MessagePermissions mp = new Mes...
MessagePermissions function(BaseForum forum, String role, String typeId) { MessagePermissions permissions = forum == null forum.getId() == null ? null : getMessagePermissionByKeyValue(role, STR, forum.getId().toString(), false); MessagePermissions mp = new MessagePermissionsImpl(); if (permissions == null) { return nul...
/** * Get the forum message permission for a given role. This provides the permissions * that the role currently has. */
Get the forum message permission for a given role. This provides the permissions that the role currently has
getForumMessagePermissionForRole
{ "repo_name": "rodriguezdevera/sakai", "path": "msgcntr/messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/PermissionManagerImpl.java", "license": "apache-2.0", "size": 48949 }
[ "org.sakaiproject.api.app.messageforums.BaseForum", "org.sakaiproject.api.app.messageforums.MessagePermissions", "org.sakaiproject.component.app.messageforums.dao.hibernate.MessagePermissionsImpl" ]
import org.sakaiproject.api.app.messageforums.BaseForum; import org.sakaiproject.api.app.messageforums.MessagePermissions; import org.sakaiproject.component.app.messageforums.dao.hibernate.MessagePermissionsImpl;
import org.sakaiproject.api.app.messageforums.*; import org.sakaiproject.component.app.messageforums.dao.hibernate.*;
[ "org.sakaiproject.api", "org.sakaiproject.component" ]
org.sakaiproject.api; org.sakaiproject.component;
1,712,727
public void loadEssentialsSpawn() { // EssentialsSpawn cannot run without Essentials, so it's fine to get the Essentials data folder File essentialsFolder = pluginHookService.getEssentialsDataFolder(); if (essentialsFolder == null) { return; } File essentialsSpaw...
void function() { File essentialsFolder = pluginHookService.getEssentialsDataFolder(); if (essentialsFolder == null) { return; } File essentialsSpawnFile = new File(essentialsFolder, STR); if (essentialsSpawnFile.exists()) { essentialsSpawn = getLocationFromConfiguration( YamlConfiguration.loadConfiguration(essentialsS...
/** * Load the spawn point defined in EssentialsSpawn. */
Load the spawn point defined in EssentialsSpawn
loadEssentialsSpawn
{ "repo_name": "Krokit/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/settings/SpawnLoader.java", "license": "gpl-3.0", "size": 10037 }
[ "fr.xephi.authme.ConsoleLogger", "java.io.File", "org.bukkit.configuration.file.YamlConfiguration" ]
import fr.xephi.authme.ConsoleLogger; import java.io.File; import org.bukkit.configuration.file.YamlConfiguration;
import fr.xephi.authme.*; import java.io.*; import org.bukkit.configuration.file.*;
[ "fr.xephi.authme", "java.io", "org.bukkit.configuration" ]
fr.xephi.authme; java.io; org.bukkit.configuration;
824,264
@Test public void testModelXmlSerialization002() throws Exception { Logger.getLogger(getClass()).debug("TEST testModelXmlTransient002"); XmlSerializationTester tester = new XmlSerializationTester(object); assertTrue(tester.testXmlSerialization()); }
void function() throws Exception { Logger.getLogger(getClass()).debug(STR); XmlSerializationTester tester = new XmlSerializationTester(object); assertTrue(tester.testXmlSerialization()); }
/** * Test XML serialization. * * @throws Exception the exception */
Test XML serialization
testModelXmlSerialization002
{ "repo_name": "WestCoastInformatics/ihtsdo-refset-tool", "path": "jpa-model/src/test/java/org/ihtsdo/otf/refset/model/ModelUnit002Test.java", "license": "apache-2.0", "size": 3769 }
[ "org.apache.log4j.Logger", "org.ihtsdo.otf.refset.helpers.XmlSerializationTester", "org.junit.Assert" ]
import org.apache.log4j.Logger; import org.ihtsdo.otf.refset.helpers.XmlSerializationTester; import org.junit.Assert;
import org.apache.log4j.*; import org.ihtsdo.otf.refset.helpers.*; import org.junit.*;
[ "org.apache.log4j", "org.ihtsdo.otf", "org.junit" ]
org.apache.log4j; org.ihtsdo.otf; org.junit;
2,125,774
public final void setCellBackColor(Object key, int col, Color color, boolean repaint) { setCellBackColor(getCell(key,col),color,repaint); }
final void function(Object key, int col, Color color, boolean repaint) { setCellBackColor(getCell(key,col),color,repaint); }
/** * Sets the background color of a cell * * A color of (Color) null will cause baseTable to revert to using the * background selected for the column (if defined) or the background for * the table. * * @param key key to the row of the cell * @param col column of the cell * @param color the C...
Sets the background color of a cell A color of (Color) null will cause baseTable to revert to using the background selected for the column (if defined) or the background for the table
setCellBackColor
{ "repo_name": "jonabbey/Ganymede", "path": "src/ganymede/arlut/csd/JTable/rowTable.java", "license": "gpl-2.0", "size": 32645 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
700,364
boolean isEmpty = isEmpty(fieldValue); if(isEmpty) { GlobalVariables.getMessageMap().putError(errorProperty, REQUIRED_ERROR_KEY, errorParms); } return !isEmpty; }
boolean isEmpty = isEmpty(fieldValue); if(isEmpty) { GlobalVariables.getMessageMap().putError(errorProperty, REQUIRED_ERROR_KEY, errorParms); } return !isEmpty; }
/** * This method checks a required Object field value and registers an error if the * field value is null, or if a String, if field value is empty * @param fieldValue * @param errorProperty * @param errorParms * @return True if field is valid according to required rules */
This method checks a required Object field value and registers an error if the field value is null, or if a String, if field value is empty
checkRequiredField
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/budget/distributionincome/ValidationHelper.java", "license": "apache-2.0", "size": 2378 }
[ "org.kuali.rice.krad.util.GlobalVariables" ]
import org.kuali.rice.krad.util.GlobalVariables;
import org.kuali.rice.krad.util.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,830,249
public KualiDecimal getCardCycleVolumeLimit() { return cardCycleVolumeLimit; }
KualiDecimal function() { return cardCycleVolumeLimit; }
/** * Gets the cardCycleVolumeLimit attribute. * * @return Returns the cardCycleVolumeLimit */
Gets the cardCycleVolumeLimit attribute
getCardCycleVolumeLimit
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/businessobject/ProcurementCardDefault.java", "license": "agpl-3.0", "size": 15525 }
[ "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,325,309
public void newSource( String sourcename, URL url, String identifier, boolean toLoop, SimpleVector jPCTposition, int attmodel ) { newSource( false, sourcename, url, identifier, toLoop, jPCTposition, attmodel ); }
void function( String sourcename, URL url, String identifier, boolean toLoop, SimpleVector jPCTposition, int attmodel ) { newSource( false, sourcename, url, identifier, toLoop, jPCTposition, attmodel ); }
/** * Creates a new non-streaming, non-priority source at the specified position. * Default value is used for either fade-distance or rolloff factor, depending * on the value of parameter 'attmodel'. * See {@link paulscode.sound.SoundSystemConfig SoundSystemConfig} for more * information about Attenuation, fade di...
Creates a new non-streaming, non-priority source at the specified position. Default value is used for either fade-distance or rolloff factor, depending on the value of parameter 'attmodel'. See <code>paulscode.sound.SoundSystemConfig SoundSystemConfig</code> for more information about Attenuation, fade distance, and ro...
newSource
{ "repo_name": "rekh127/Catacomb-Snatch-Reloaded", "path": "paulscodesrc/paulscode/sound/SoundSystemJPCT.java", "license": "mit", "size": 154879 }
[ "com.threed.jpct.SimpleVector" ]
import com.threed.jpct.SimpleVector;
import com.threed.jpct.*;
[ "com.threed.jpct" ]
com.threed.jpct;
2,032,467
protected void updateEntityTypeCheckBoxes() { if (isSIFSelected()) { eventValue.setSelected(areEventsAllowed()); taskValue.setSelected(areTasksAllowed()); eventValue.setEnabled(false); taskValue.setEnabled(false); } else { PIMCalendarSyncS...
void function() { if (isSIFSelected()) { eventValue.setSelected(areEventsAllowed()); taskValue.setSelected(areTasksAllowed()); eventValue.setEnabled(false); taskValue.setEnabled(false); } else { PIMCalendarSyncSource syncSource = (PIMCalendarSyncSource)getSyncSource(); boolean events = false; boolean tasks = false; if ...
/** * Updates entities checkboxes according to the selected type */
Updates entities checkboxes according to the selected type
updateEntityTypeCheckBoxes
{ "repo_name": "accesstest3/cfunambol", "path": "modules/foundation/foundation-core/src/main/java/com/funambol/foundation/admin/PIMCalendarSyncSourceConfigPanel.java", "license": "agpl-3.0", "size": 11618 }
[ "com.funambol.common.pim.calendar.Event", "com.funambol.common.pim.calendar.Task", "com.funambol.foundation.engine.source.PIMCalendarSyncSource" ]
import com.funambol.common.pim.calendar.Event; import com.funambol.common.pim.calendar.Task; import com.funambol.foundation.engine.source.PIMCalendarSyncSource;
import com.funambol.common.pim.calendar.*; import com.funambol.foundation.engine.source.*;
[ "com.funambol.common", "com.funambol.foundation" ]
com.funambol.common; com.funambol.foundation;
769,567
public ServiceFuture<VirtualNetworkTapInner> updateTagsAsync(String resourceGroupName, String tapName, Map<String, String> tags, final ServiceCallback<VirtualNetworkTapInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, tapName, tags), serviceCal...
ServiceFuture<VirtualNetworkTapInner> function(String resourceGroupName, String tapName, Map<String, String> tags, final ServiceCallback<VirtualNetworkTapInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, tapName, tags), serviceCallback); }
/** * Updates an VirtualNetworkTap tags. * * @param resourceGroupName The name of the resource group. * @param tapName The name of the tap. * @param tags Resource tags. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgum...
Updates an VirtualNetworkTap tags
updateTagsAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VirtualNetworkTapsInner.java", "license": "mit", "size": 64262 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture", "java.util.Map" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
1,695,845
ReadRequest handle(PiHandle handle);
ReadRequest handle(PiHandle handle);
/** * Requests to read one entity identified by the given handle. * * @param handle handle * @return this */
Requests to read one entity identified by the given handle
handle
{ "repo_name": "oplinkoms/onos", "path": "protocols/p4runtime/api/src/main/java/org/onosproject/p4runtime/api/P4RuntimeReadClient.java", "license": "apache-2.0", "size": 8962 }
[ "org.onosproject.net.pi.runtime.PiHandle" ]
import org.onosproject.net.pi.runtime.PiHandle;
import org.onosproject.net.pi.runtime.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,269,704
public Set<UrlPattern> getUrls() { return urls; }
Set<UrlPattern> function() { return urls; }
/** * Return the Set of URL Patterns that this permission applies to. * @return The Set of URL Patterns that this permission applies to. * * @hibernate.set table="PERMISSION_URLPATTERN" cascade="save-update" inverse="true" * @hibernate.collection-key column="PU_PERMISSION_ID" * @hibernate.collection-...
Return the Set of URL Patterns that this permission applies to
getUrls
{ "repo_name": "DIA-NZ/webcurator", "path": "wct-core/src/main/java/org/webcurator/domain/model/core/Permission.java", "license": "apache-2.0", "size": 23657 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,263,007
static int getEpochYear(long epochMillisecond) { Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.setTimeZone(UTC_TIME_ZONE); calendar.setTimeInMillis(epochMillisecond); return calendar.get(Calendar.YEAR); }
static int getEpochYear(long epochMillisecond) { Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.setTimeZone(UTC_TIME_ZONE); calendar.setTimeInMillis(epochMillisecond); return calendar.get(Calendar.YEAR); }
/** * Extracts the epoch year from the epoch millisecond. * * @param epochMillisecond the number of milliseconds since January 1, 1970 00:00:00 * @return the year */
Extracts the epoch year from the epoch millisecond
getEpochYear
{ "repo_name": "zakrywilson/TLE", "path": "src/main/java/com/zakrywilson/astro/tle/EpochUtils.java", "license": "mit", "size": 5347 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
439
@Test public void testCheckpointStatsTrackerPendingCheckpointCallback() throws Exception { final long timestamp = System.currentTimeMillis(); // set up the coordinator and validate the initial state CheckpointCoordinator coord = new CheckpointCoordinatorBuilder() .setTimer(manuallyTriggeredScheduledEx...
void function() throws Exception { final long timestamp = System.currentTimeMillis(); CheckpointCoordinator coord = new CheckpointCoordinatorBuilder() .setTimer(manuallyTriggeredScheduledExecutor) .build(); CheckpointStatsTracker tracker = mock(CheckpointStatsTracker.class); coord.setCheckpointStatsTracker(tracker); wh...
/** * Tests that the pending checkpoint stats callbacks are created. */
Tests that the pending checkpoint stats callbacks are created
testCheckpointStatsTrackerPendingCheckpointCallback
{ "repo_name": "bowenli86/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java", "license": "apache-2.0", "size": 102221 }
[ "java.util.concurrent.CompletableFuture", "org.apache.flink.runtime.checkpoint.CheckpointCoordinatorTestingUtils", "org.junit.Assert", "org.mockito.Matchers", "org.mockito.Mockito" ]
import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.checkpoint.CheckpointCoordinatorTestingUtils; import org.junit.Assert; import org.mockito.Matchers; import org.mockito.Mockito;
import java.util.concurrent.*; import org.apache.flink.runtime.checkpoint.*; import org.junit.*; import org.mockito.*;
[ "java.util", "org.apache.flink", "org.junit", "org.mockito" ]
java.util; org.apache.flink; org.junit; org.mockito;
1,036,291
@Override public Date getDate(long columnIndex, long rowIndex){ return new Date(nativeGetDateTimeValue(nativePtr, columnIndex, rowIndex)*1000); }
Date function(long columnIndex, long rowIndex){ return new Date(nativeGetDateTimeValue(nativePtr, columnIndex, rowIndex)*1000); }
/** * Get the value of the particular (date) cell. * * @param columnIndex 0 based index value of the cell column. * @param rowIndex 0 based index of the row. * @return value of the particular cell. */
Get the value of the particular (date) cell
getDate
{ "repo_name": "bunnyblue/realm-java", "path": "realm/src/main/java/io/realm/internal/TableView.java", "license": "apache-2.0", "size": 31817 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,440,908
void enterException_handler(@NotNull PLSQLParser.Exception_handlerContext ctx); void exitException_handler(@NotNull PLSQLParser.Exception_handlerContext ctx);
void enterException_handler(@NotNull PLSQLParser.Exception_handlerContext ctx); void exitException_handler(@NotNull PLSQLParser.Exception_handlerContext ctx);
/** * Exit a parse tree produced by {@link PLSQLParser#exception_handler}. * @param ctx the parse tree */
Exit a parse tree produced by <code>PLSQLParser#exception_handler</code>
exitException_handler
{ "repo_name": "developeron29/PLSQLParser", "path": "PLSQLListener.java", "license": "mit", "size": 45486 }
[ "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;
1,662,869
private void validateWebXmlReferences(GraphContext context) { WebXmlService webXmlService = new WebXmlService(context); Iterator<WebXmlModel> models = webXmlService.findAll().iterator(); // There should be at least one file Assert.assertTrue(models.hasNext()); WebXmlMode...
void function(GraphContext context) { WebXmlService webXmlService = new WebXmlService(context); Iterator<WebXmlModel> models = webXmlService.findAll().iterator(); Assert.assertTrue(models.hasNext()); WebXmlModel model = models.next(); Assert.assertFalse(models.hasNext()); Assert.assertEquals(STR, model.getDisplayName()...
/** * Validate that a web.xml file was found, and that the metadata was extracted correctly */
Validate that a web.xml file was found, and that the metadata was extracted correctly
validateWebXmlReferences
{ "repo_name": "mbriskar/windup", "path": "tests/src/test/java/org/jboss/windup/tests/application/WindupArchitectureSourceModeTest.java", "license": "epl-1.0", "size": 14617 }
[ "java.util.Iterator", "org.jboss.windup.graph.GraphContext", "org.jboss.windup.rules.apps.javaee.model.EnvironmentReferenceModel", "org.jboss.windup.rules.apps.javaee.model.WebXmlModel", "org.jboss.windup.rules.apps.javaee.service.WebXmlService", "org.junit.Assert" ]
import java.util.Iterator; import org.jboss.windup.graph.GraphContext; import org.jboss.windup.rules.apps.javaee.model.EnvironmentReferenceModel; import org.jboss.windup.rules.apps.javaee.model.WebXmlModel; import org.jboss.windup.rules.apps.javaee.service.WebXmlService; import org.junit.Assert;
import java.util.*; import org.jboss.windup.graph.*; import org.jboss.windup.rules.apps.javaee.model.*; import org.jboss.windup.rules.apps.javaee.service.*; import org.junit.*;
[ "java.util", "org.jboss.windup", "org.junit" ]
java.util; org.jboss.windup; org.junit;
2,696,581
public void testElementTestAnyNode() throws RepositoryException, NotExecutableException { Node n1 = testRootNode.addNode(nodeName1, testNodeType); Node n2 = testRootNode.addNode(nodeName2, simpleNodeType); Node n3 = testRootNode.addNode(nodeName3, testNodeType); testRootNode.getSessi...
void function() throws RepositoryException, NotExecutableException { Node n1 = testRootNode.addNode(nodeName1, testNodeType); Node n2 = testRootNode.addNode(nodeName2, simpleNodeType); Node n3 = testRootNode.addNode(nodeName3, testNodeType); testRootNode.getSession().save(); String query = "/" + jcrRoot + testRoot + ST...
/** * Tests the element test with one any node argument. * @throws NotExecutableException */
Tests the element test with one any node argument
testElementTestAnyNode
{ "repo_name": "Overseas-Student-Living/jackrabbit", "path": "jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/ElementTest.java", "license": "apache-2.0", "size": 7379 }
[ "javax.jcr.Node", "javax.jcr.RepositoryException", "org.apache.jackrabbit.test.NotExecutableException" ]
import javax.jcr.Node; import javax.jcr.RepositoryException; import org.apache.jackrabbit.test.NotExecutableException;
import javax.jcr.*; import org.apache.jackrabbit.test.*;
[ "javax.jcr", "org.apache.jackrabbit" ]
javax.jcr; org.apache.jackrabbit;
66,288
public void logEvent(Value<?> value);
void function(Value<?> value);
/** * This method logs the value which is provided. * * The time stamp is set to the current time within the method. * * @param value * is the {@link Value} to be logged. */
This method logs the value which is provided. The time stamp is set to the current time within the method
logEvent
{ "repo_name": "PureSolTechnologies/Purifinity", "path": "analysis/server/systemmonitor/core.api/src/main/java/com/puresoltechnologies/server/systemmonitor/core/api/metrics/MetricLoggerCommon.java", "license": "agpl-3.0", "size": 1078 }
[ "com.puresoltechnologies.commons.domain.Value" ]
import com.puresoltechnologies.commons.domain.Value;
import com.puresoltechnologies.commons.domain.*;
[ "com.puresoltechnologies.commons" ]
com.puresoltechnologies.commons;
796,118