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 Date getLastPing() { return lastPing; }
Date function() { return lastPing; }
/** * Method to get the time of the most recent ping from the device * @return the time of the most recent ping from the device */
Method to get the time of the most recent ping from the device
getLastPing
{ "repo_name": "jaGilbertson/PiTechSuppRemote", "path": "RPITechSuppCamViewer/src/rpi/technical/support/camera/viewer/RPICam.java", "license": "gpl-3.0", "size": 7657 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,711,076
@Operation(desc = "List the client addresses which match the given IP Address", impact = MBeanOperationInfo.INFO) String[] listRemoteAddresses(@Parameter(desc = "an IP address", name = "ipAddress") String ipAddress) throws Exception;
@Operation(desc = STR, impact = MBeanOperationInfo.INFO) String[] listRemoteAddresses(@Parameter(desc = STR, name = STR) String ipAddress) throws Exception;
/** * Lists the addresses of the clients connected to this address which matches the specified IP address. */
Lists the addresses of the clients connected to this address which matches the specified IP address
listRemoteAddresses
{ "repo_name": "paulgallagher75/activemq-artemis", "path": "artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSServerControl.java", "license": "apache-2.0", "size": 24627 }
[ "javax.management.MBeanOperationInfo", "org.apache.activemq.artemis.api.core.management.Operation", "org.apache.activemq.artemis.api.core.management.Parameter" ]
import javax.management.MBeanOperationInfo; import org.apache.activemq.artemis.api.core.management.Operation; import org.apache.activemq.artemis.api.core.management.Parameter;
import javax.management.*; import org.apache.activemq.artemis.api.core.management.*;
[ "javax.management", "org.apache.activemq" ]
javax.management; org.apache.activemq;
2,482,082
val tgtId = WebUtils.getTicketGrantingTicketId(requestContext); if (StringUtils.isBlank(tgtId)) { return new Event(this, CasWebflowConstants.TRANSITION_ID_TGT_NOT_EXISTS); } try { val ticket = this.centralAuthenticationService.getTicket(tgtId, Ticket.class); i...
val tgtId = WebUtils.getTicketGrantingTicketId(requestContext); if (StringUtils.isBlank(tgtId)) { return new Event(this, CasWebflowConstants.TRANSITION_ID_TGT_NOT_EXISTS); } try { val ticket = this.centralAuthenticationService.getTicket(tgtId, Ticket.class); if (ticket != null && !ticket.isExpired()) { return new Event...
/** * Determines whether the TGT in the flow request context is valid. * * @param requestContext Flow request context. * @return webflow transition to indicate TGT status. */
Determines whether the TGT in the flow request context is valid
doExecute
{ "repo_name": "GIP-RECIA/cas", "path": "support/cas-server-support-actions/src/main/java/org/apereo/cas/web/flow/login/TicketGrantingTicketCheckAction.java", "license": "apache-2.0", "size": 1903 }
[ "org.apache.commons.lang3.StringUtils", "org.apereo.cas.ticket.AbstractTicketException", "org.apereo.cas.ticket.Ticket", "org.apereo.cas.web.flow.CasWebflowConstants", "org.apereo.cas.web.support.WebUtils", "org.springframework.webflow.execution.Event" ]
import org.apache.commons.lang3.StringUtils; import org.apereo.cas.ticket.AbstractTicketException; import org.apereo.cas.ticket.Ticket; import org.apereo.cas.web.flow.CasWebflowConstants; import org.apereo.cas.web.support.WebUtils; import org.springframework.webflow.execution.Event;
import org.apache.commons.lang3.*; import org.apereo.cas.ticket.*; import org.apereo.cas.web.flow.*; import org.apereo.cas.web.support.*; import org.springframework.webflow.execution.*;
[ "org.apache.commons", "org.apereo.cas", "org.springframework.webflow" ]
org.apache.commons; org.apereo.cas; org.springframework.webflow;
1,222,723
public void smoothScrollToPosition(int position) { if (mLayoutFrozen) { return; } if (mLayout == null) { Log.e(TAG, "Cannot smooth scroll without a LayoutManager set. " + "Call setLayoutManager with a non-null argument."); return; ...
void function(int position) { if (mLayoutFrozen) { return; } if (mLayout == null) { Log.e(TAG, STR + STR); return; } mLayout.smoothScrollToPosition(this, mState, position); }
/** * Starts a smooth scroll to an adapter position. * <p> * To support smooth scrolling, you must override * {@link LayoutManager#smoothScrollToPosition(RecyclerView, State, int)} and create a * {@link SmoothScroller}. * <p> * {@link LayoutManager} is responsible for creating the act...
Starts a smooth scroll to an adapter position. To support smooth scrolling, you must override <code>LayoutManager#smoothScrollToPosition(RecyclerView, State, int)</code> and create a <code>SmoothScroller</code>. <code>LayoutManager</code> is responsible for creating the actual scroll action. If you want to provide a cu...
smoothScrollToPosition
{ "repo_name": "devDavide/Decisiongram", "path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/RecyclerView.java", "license": "gpl-2.0", "size": 438498 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
659,795
private void sendListOfSubDirectoriesForTrunkOrFeatureBranch(DirectoryCoordinateIds ids, Integer parentBranchId, ServerResponseFactoryInterface response) { // Find all the project/branch sub-directories... List<String> segments = new ArrayList<>(); FunctionalQueriesDAO functionalQueriesDAO =...
void function(DirectoryCoordinateIds ids, Integer parentBranchId, ServerResponseFactoryInterface response) { List<String> segments = new ArrayList<>(); FunctionalQueriesDAO functionalQueriesDAO = new FunctionalQueriesDAOImpl(schemaName); List<Branch> branchArray = functionalQueriesDAO.getBranchAncestryList(ids.getBranc...
/** * Send the list of sub directories for the branch. * * @param ids the directory coordinate ids. * @param parentBranchId the parent branch id. * @param response the object that identifies the client. */
Send the list of sub directories for the branch
sendListOfSubDirectoriesForTrunkOrFeatureBranch
{ "repo_name": "jimv39/qvcsos", "path": "qvcse-server/src/main/java/com/qumasoft/server/clientrequest/ClientRequestRegisterClientListener.java", "license": "apache-2.0", "size": 20452 }
[ "com.qumasoft.qvcslib.DirectoryCoordinateIds", "com.qumasoft.qvcslib.ServerResponseFactoryInterface", "com.qvcsos.server.dataaccess.FunctionalQueriesDAO", "com.qvcsos.server.dataaccess.impl.FunctionalQueriesDAOImpl", "com.qvcsos.server.datamodel.Branch", "java.util.ArrayList", "java.util.List" ]
import com.qumasoft.qvcslib.DirectoryCoordinateIds; import com.qumasoft.qvcslib.ServerResponseFactoryInterface; import com.qvcsos.server.dataaccess.FunctionalQueriesDAO; import com.qvcsos.server.dataaccess.impl.FunctionalQueriesDAOImpl; import com.qvcsos.server.datamodel.Branch; import java.util.ArrayList; import java....
import com.qumasoft.qvcslib.*; import com.qvcsos.server.dataaccess.*; import com.qvcsos.server.dataaccess.impl.*; import com.qvcsos.server.datamodel.*; import java.util.*;
[ "com.qumasoft.qvcslib", "com.qvcsos.server", "java.util" ]
com.qumasoft.qvcslib; com.qvcsos.server; java.util;
311,808
public final void removeAtomicReference(final String name) throws IgniteCheckedException { assert name != null; assert dsCacheCtx != null; awaitInitialization();
final void function(final String name) throws IgniteCheckedException { assert name != null; assert dsCacheCtx != null; awaitInitialization();
/** * Removes atomic reference from cache. * * @param name Atomic reference name. * @throws IgniteCheckedException If removing failed. */
Removes atomic reference from cache
removeAtomicReference
{ "repo_name": "vldpyatkov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java", "license": "apache-2.0", "size": 84431 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,088,615
private void calcEdges() { // TODO: need to fix this problem. PathIterator iter = area.getBounds2D().getPathIterator(null); double[] coords = new double[6]; double px = 0, py = 0; Path2D edge = null; while(!iter.isDone()) { int type = iter.currentSegment(coords); switch(type) { ...
void function() { PathIterator iter = area.getBounds2D().getPathIterator(null); double[] coords = new double[6]; double px = 0, py = 0; Path2D edge = null; while(!iter.isDone()) { int type = iter.currentSegment(coords); switch(type) { case PathIterator.SEG_MOVETO: assert edge == null; px = coords[0]; py = coords[1]; br...
/** * Calculate the list of edges. */
Calculate the list of edges
calcEdges
{ "repo_name": "bowzheng/AIM4_delay", "path": "src/main/java/aim4/im/RoadBasedIntersection.java", "license": "gpl-3.0", "size": 21165 }
[ "java.awt.geom.Path2D", "java.awt.geom.PathIterator" ]
import java.awt.geom.Path2D; import java.awt.geom.PathIterator;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
808,948
public List<Criteria> getOredCriteria() { return oredCriteria; }
List<Criteria> function() { return oredCriteria; }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table acct * * @mbggenerated Wed Oct 17 17:54:47 CST 2018 */
This method was generated by MyBatis Generator. This method corresponds to the database table acct
getOredCriteria
{ "repo_name": "408657544/springbank", "path": "springbank-dao/src/main/java/com/springbank/dao/generate/model/AcctExample.java", "license": "gpl-3.0", "size": 36723 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,735,972
private PersistentSubscription getSubscriptionReference(String subName, PersistentTopic topic) { try { PersistentSubscription sub = topic.getPersistentSubscription(subName); return checkNotNull(sub); } catch (Exception e) { throw new RestException(Status.NOT_FOUND...
PersistentSubscription function(String subName, PersistentTopic topic) { try { PersistentSubscription sub = topic.getPersistentSubscription(subName); return checkNotNull(sub); } catch (Exception e) { throw new RestException(Status.NOT_FOUND, STR); } }
/** * Get the Subscription object reference from the Topic reference */
Get the Subscription object reference from the Topic reference
getSubscriptionReference
{ "repo_name": "bradtm/pulsar", "path": "pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/PersistentTopics.java", "license": "apache-2.0", "size": 79031 }
[ "com.google.common.base.Preconditions", "javax.ws.rs.core.Response", "org.apache.pulsar.broker.service.persistent.PersistentSubscription", "org.apache.pulsar.broker.service.persistent.PersistentTopic", "org.apache.pulsar.broker.web.RestException" ]
import com.google.common.base.Preconditions; import javax.ws.rs.core.Response; import org.apache.pulsar.broker.service.persistent.PersistentSubscription; import org.apache.pulsar.broker.service.persistent.PersistentTopic; import org.apache.pulsar.broker.web.RestException;
import com.google.common.base.*; import javax.ws.rs.core.*; import org.apache.pulsar.broker.service.persistent.*; import org.apache.pulsar.broker.web.*;
[ "com.google.common", "javax.ws", "org.apache.pulsar" ]
com.google.common; javax.ws; org.apache.pulsar;
1,894,740
public static List<Rule> rulesFromURL( String uri ) { try { BufferedReader br = FileUtils.asBufferedUTF8( FileManager.get().open(uri) ); return parseRules( Rule.rulesParserFromReader( br ) ); } catch (WrappedIOException e) { throw new RulesetNotFound...
static List<Rule> function( String uri ) { try { BufferedReader br = FileUtils.asBufferedUTF8( FileManager.get().open(uri) ); return parseRules( Rule.rulesParserFromReader( br ) ); } catch (WrappedIOException e) { throw new RulesetNotFoundException( uri ); } }
/** * Answer the list of rules parsed from the given URL. * @throws RulesetNotFoundException */
Answer the list of rules parsed from the given URL
rulesFromURL
{ "repo_name": "jacekkopecky/parkjam", "path": "src/com/hp/hpl/jena/reasoner/rulesys/Rule.java", "license": "apache-2.0", "size": 41749 }
[ "com.hp.hpl.jena.shared.RulesetNotFoundException", "com.hp.hpl.jena.shared.WrappedIOException", "com.hp.hpl.jena.util.FileManager", "com.hp.hpl.jena.util.FileUtils", "java.io.BufferedReader", "java.util.List" ]
import com.hp.hpl.jena.shared.RulesetNotFoundException; import com.hp.hpl.jena.shared.WrappedIOException; import com.hp.hpl.jena.util.FileManager; import com.hp.hpl.jena.util.FileUtils; import java.io.BufferedReader; import java.util.List;
import com.hp.hpl.jena.shared.*; import com.hp.hpl.jena.util.*; import java.io.*; import java.util.*;
[ "com.hp.hpl", "java.io", "java.util" ]
com.hp.hpl; java.io; java.util;
1,316,260
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataAllValuesFromImpl instance) throws SerializationException { serialize(streamWriter, instance); }
void function(SerializationStreamWriter streamWriter, OWLDataAllValuesFromImpl instance) throws SerializationException { serialize(streamWriter, instance); }
/** * Serializes the content of the object into the * {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. * * @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the * object's content to * @param instance ...
Serializes the content of the object into the <code>com.google.gwt.user.client.rpc.SerializationStreamWriter</code>
serializeInstance
{ "repo_name": "matthewhorridge/owlapi-gwt", "path": "owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataAllValuesFromImpl_CustomFieldSerializer.java", "license": "lgpl-3.0", "size": 4533 }
[ "com.google.gwt.user.client.rpc.SerializationException", "com.google.gwt.user.client.rpc.SerializationStreamWriter" ]
import com.google.gwt.user.client.rpc.SerializationException; import com.google.gwt.user.client.rpc.SerializationStreamWriter;
import com.google.gwt.user.client.rpc.*;
[ "com.google.gwt" ]
com.google.gwt;
2,397,758
int swipeMode = SWIPE_MODE_BOTH; boolean swipeOpenOnLongPress = true; boolean swipeCloseAllItemsWhenMoveList = true; long swipeAnimationTime = 0; float swipeOffsetLeft = 0; float swipeOffsetRight = 0; int swipeDrawableChecked = 0; int swipeDrawableUnchecke...
int swipeMode = SWIPE_MODE_BOTH; boolean swipeOpenOnLongPress = true; boolean swipeCloseAllItemsWhenMoveList = true; long swipeAnimationTime = 0; float swipeOffsetLeft = 0; float swipeOffsetRight = 0; int swipeDrawableChecked = 0; int swipeDrawableUnchecked = 0; int swipeActionLeft = SWIPE_ACTION_REVEAL; int swipeActio...
/** * Init ListView * * @param attrs AttributeSet */
Init ListView
init
{ "repo_name": "x251089003/EveryXDay", "path": "EveryXDay/src/main/java/com/xinxin/everyxday/widget/swipelistview/SwipeListView.java", "license": "apache-2.0", "size": 20981 }
[ "android.content.res.TypedArray", "android.support.v4.view.ViewConfigurationCompat", "android.view.ViewConfiguration" ]
import android.content.res.TypedArray; import android.support.v4.view.ViewConfigurationCompat; import android.view.ViewConfiguration;
import android.content.res.*; import android.support.v4.view.*; import android.view.*;
[ "android.content", "android.support", "android.view" ]
android.content; android.support; android.view;
1,976,732
void startBatch() throws SQLException;
void startBatch() throws SQLException;
/** * Starts a batch in which update statements will be cached before being sent to * the database all at once. This can improve overall performance of updates update * when dealing with numerous updates (e.g. inserting 1:M related data). * * @throws java.sql.SQLException If the batch could not be s...
Starts a batch in which update statements will be cached before being sent to the database all at once. This can improve overall performance of updates update when dealing with numerous updates (e.g. inserting 1:M related data)
startBatch
{ "repo_name": "ahwxl/ads", "path": "ads/src/main/java/com/ibatis/sqlmap/client/SqlMapExecutor.java", "license": "apache-2.0", "size": 15340 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,027,743
Set<RequestReference> requestReferences = new HashSet<RequestReference>(); // First check that we're really parsing an MultiRequests if (!DOMHelper.getLocalName(root).equals("MultiRequests")) { throw new ParsingException("MultiRequests object cannot be created " ...
Set<RequestReference> requestReferences = new HashSet<RequestReference>(); if (!DOMHelper.getLocalName(root).equals(STR)) { throw new ParsingException(STR + STR + DOMHelper.getLocalName(root)); } NodeList nodes = root.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); if (STR.equa...
/** * creates a <code>MultiRequests</code> based on its DOM node. * @param root root the node to parse for the AttributeAssignment * @return a new <code>MultiRequests</code> constructed by parsing * @throws ParsingException if the DOM node is invalid */
creates a <code>MultiRequests</code> based on its DOM node
getInstance
{ "repo_name": "TU-Berlin-SNET/tresor-pdp-caching", "path": "modules/balana/modules/balana-core/src/main/java/org/wso2/balana/xacml3/MultiRequests.java", "license": "apache-2.0", "size": 4521 }
[ "java.util.HashSet", "java.util.Set", "org.w3c.dom.NamedNodeMap", "org.w3c.dom.Node", "org.w3c.dom.NodeList", "org.wso2.balana.DOMHelper", "org.wso2.balana.ParsingException" ]
import java.util.HashSet; import java.util.Set; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.wso2.balana.DOMHelper; import org.wso2.balana.ParsingException;
import java.util.*; import org.w3c.dom.*; import org.wso2.balana.*;
[ "java.util", "org.w3c.dom", "org.wso2.balana" ]
java.util; org.w3c.dom; org.wso2.balana;
1,015,282
public static ChronoFormatter<PlainDate> ofDateStyle( FormatStyle style, Locale locale ) { Builder<PlainDate> builder = new Builder<>(PlainDate.axis(), locale); return builder.addStyle(style, style).build(); } /*[deutsch] * <p>Konstruiert einen Formatier...
static ChronoFormatter<PlainDate> function( FormatStyle style, Locale locale ) { Builder<PlainDate> builder = new Builder<>(PlainDate.axis(), locale); return builder.addStyle(style, style).build(); } /*[deutsch] * <p>Konstruiert einen Formatierer f&uuml;r reine Uhrzeitobjekte. </p> * * @param style format style * @para...
/** * <p>Constructs a style-based formatter for plain date objects. </p> * * @param style format style * @param locale format locale * @return new {@code ChronoFormatter}-instance * @see CalendarText#patternForDate(FormatStyle, Locale) * @since 5.8 */
Constructs a style-based formatter for plain date objects.
ofDateStyle
{ "repo_name": "MenoData/Time4J", "path": "base/src/main/java/net/time4j/format/expert/ChronoFormatter.java", "license": "lgpl-2.1", "size": 324360 }
[ "java.time.format.FormatStyle", "java.util.Locale", "net.time4j.PlainDate", "net.time4j.format.CalendarText", "net.time4j.format.DisplayMode" ]
import java.time.format.FormatStyle; import java.util.Locale; import net.time4j.PlainDate; import net.time4j.format.CalendarText; import net.time4j.format.DisplayMode;
import java.time.format.*; import java.util.*; import net.time4j.*; import net.time4j.format.*;
[ "java.time", "java.util", "net.time4j", "net.time4j.format" ]
java.time; java.util; net.time4j; net.time4j.format;
2,879,048
protected void copyTable(String tableName, String newTableName, boolean transferContent, boolean extensions) { ContentsDataType dataType = getTableDataType(tableName); if (dataType != null) { switch (dataType) { case ATTRIBUTES: copyAttributeTable(tableName, newTableName, transferContent); bre...
void function(String tableName, String newTableName, boolean transferContent, boolean extensions) { ContentsDataType dataType = getTableDataType(tableName); if (dataType != null) { switch (dataType) { case ATTRIBUTES: copyAttributeTable(tableName, newTableName, transferContent); break; case FEATURES: copyFeatureTable(t...
/** * Copy the table * * @param tableName * table name * @param newTableName * new table name * @param transferContent * transfer content flag * @param extensions * extensions copy flag */
Copy the table
copyTable
{ "repo_name": "ngageoint/geopackage-core-java", "path": "src/main/java/mil/nga/geopackage/GeoPackageCoreImpl.java", "license": "mit", "size": 34594 }
[ "mil.nga.geopackage.contents.ContentsDataType" ]
import mil.nga.geopackage.contents.ContentsDataType;
import mil.nga.geopackage.contents.*;
[ "mil.nga.geopackage" ]
mil.nga.geopackage;
2,726,109
@ServiceMethod(returns = ReturnType.SINGLE) Response<DataBoxEdgeDeviceInner> getByResourceGroupWithResponse( String resourceGroupName, String deviceName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<DataBoxEdgeDeviceInner> getByResourceGroupWithResponse( String resourceGroupName, String deviceName, Context context);
/** * Gets the properties of the Data Box Edge/Data Box Gateway device. * * @param resourceGroupName The resource group name. * @param deviceName The device name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the...
Gets the properties of the Data Box Edge/Data Box Gateway device
getByResourceGroupWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/DevicesClient.java", "license": "mit", "size": 31816 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.DataBoxEdgeDeviceInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.databoxedge.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,022,519
Date getLastLoadDate();
Date getLastLoadDate();
/** * Returns the value of the '<em><b>Last Load Date</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Last Load Date</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value o...
Returns the value of the 'Last Load Date' attribute. If the meaning of the 'Last Load Date' attribute isn't clear, there really should be more of a description here...
getLastLoadDate
{ "repo_name": "Cooperate-Project/EnterpriseArchitectBridge", "path": "bundles/de.cooperateproject.eabridge.eaobjectmodel/src-gen/de/cooperateproject/eabridge/eaobjectmodel/Package.java", "license": "epl-1.0", "size": 27848 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,672,397
public ProvisioningState provisioningState() { return this.provisioningState; }
ProvisioningState function() { return this.provisioningState; }
/** * Get the provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * * @return the provisioningState value */
Get the provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
provisioningState
{ "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/LocalNetworkGatewayInner.java", "license": "mit", "size": 5560 }
[ "com.microsoft.azure.management.network.v2020_06_01.ProvisioningState" ]
import com.microsoft.azure.management.network.v2020_06_01.ProvisioningState;
import com.microsoft.azure.management.network.v2020_06_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
236,167
private LdapContext getWiredContext( LdapServer ldapServer, Control[] controls ) throws Exception { Hashtable<String, String> env = new Hashtable<String, String>(); env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" ); env.put( Context.PROVIDER_URL, "ldap://loca...
LdapContext function( LdapServer ldapServer, Control[] controls ) throws Exception { Hashtable<String, String> env = new Hashtable<String, String>(); env.put( Context.INITIAL_CONTEXT_FACTORY, STR ); env.put( Context.PROVIDER_URL, STRsecretSTRsimple" ); return new InitialLdapContext( env, JndiUtils.toJndiControls( LdapA...
/** * Creates a JNDI LdapContext with a connection over the wire using the * SUN LDAP provider. The connection is made using the administrative * user as the principalDN. The context is to the rootDSE. * * @param ldapServer the LDAP server to get the connection to * @param controls the...
Creates a JNDI LdapContext with a connection over the wire using the SUN LDAP provider. The connection is made using the administrative user as the principalDN. The context is to the rootDSE
getWiredContext
{ "repo_name": "lucastheisen/apache-directory-server", "path": "server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java", "license": "apache-2.0", "size": 10092 }
[ "java.util.Hashtable", "javax.naming.Context", "javax.naming.ldap.InitialLdapContext", "javax.naming.ldap.LdapContext", "org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory", "org.apache.directory.api.ldap.model.message.Control", "org.apache.directory.api.ldap.util.JndiUtils", "org.apache.di...
import java.util.Hashtable; import javax.naming.Context; import javax.naming.ldap.InitialLdapContext; import javax.naming.ldap.LdapContext; import org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory; import org.apache.directory.api.ldap.model.message.Control; import org.apache.directory.api.ldap.util.JndiUtil...
import java.util.*; import javax.naming.*; import javax.naming.ldap.*; import org.apache.directory.api.ldap.codec.api.*; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.api.ldap.util.*; import org.apache.directory.server.ldap.*;
[ "java.util", "javax.naming", "org.apache.directory" ]
java.util; javax.naming; org.apache.directory;
337,560
DeclaredType getAnnotationType();
DeclaredType getAnnotationType();
/** * Returns the type of this annotation. * * @return the type of this annotation */
Returns the type of this annotation
getAnnotationType
{ "repo_name": "daniel-beck/sorcerer", "path": "javac/src/main/java/javax/lang/model/element/AnnotationMirror.java", "license": "mit", "size": 2851 }
[ "javax.lang.model.type.DeclaredType" ]
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.*;
[ "javax.lang" ]
javax.lang;
1,152,633
public Trigger getDisplayAlarmTrigger() { VAlarm alarm = getDisplayAlarm(); if (alarm == null) { return null; } return (Trigger) alarm.getProperties().getProperty(Property.TRIGGER); }
Trigger function() { VAlarm alarm = getDisplayAlarm(); if (alarm == null) { return null; } return (Trigger) alarm.getProperties().getProperty(Property.TRIGGER); }
/** * Gets display alarm trigger. * @return The trigger. */
Gets display alarm trigger
getDisplayAlarmTrigger
{ "repo_name": "astrolox/cosmo", "path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/model/mock/MockBaseEventStamp.java", "license": "apache-2.0", "size": 31817 }
[ "net.fortuna.ical4j.model.Property", "net.fortuna.ical4j.model.component.VAlarm", "net.fortuna.ical4j.model.property.Trigger" ]
import net.fortuna.ical4j.model.Property; import net.fortuna.ical4j.model.component.VAlarm; import net.fortuna.ical4j.model.property.Trigger;
import net.fortuna.ical4j.model.*; import net.fortuna.ical4j.model.component.*; import net.fortuna.ical4j.model.property.*;
[ "net.fortuna.ical4j" ]
net.fortuna.ical4j;
1,796,818
protected boolean shouldClearSpecialHandling() { if (!isDisbVchrSpecialHandlingCode()) { // are we at the campus route node? List<RouteNodeInstance> currentNodes = getDocumentHeader().getWorkflowDocument().getCurrentRouteNodeInstances(); return (currentNodes.contains(...
boolean function() { if (!isDisbVchrSpecialHandlingCode()) { List<RouteNodeInstance> currentNodes = getDocumentHeader().getWorkflowDocument().getCurrentRouteNodeInstances(); return (currentNodes.contains(DisbursementVoucherConstants.RouteLevelNames.CAMPUS)); } return false; }
/** * Determines if the special handling fields should be cleared, based on whether the special handling has been turned off and whether the current node is CAMPUS * @return true if special handling should be cleared, false otherwise */
Determines if the special handling fields should be cleared, based on whether the special handling has been turned off and whether the current node is CAMPUS
shouldClearSpecialHandling
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/fp/document/DisbursementVoucherDocument.java", "license": "agpl-3.0", "size": 81619 }
[ "java.util.List", "org.kuali.rice.kew.api.document.node.RouteNodeInstance" ]
import java.util.List; import org.kuali.rice.kew.api.document.node.RouteNodeInstance;
import java.util.*; import org.kuali.rice.kew.api.document.node.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
2,817,990
public ISAACCipher getEncryptor() { return encryptor; }
ISAACCipher function() { return encryptor; }
/** * Gets the encryptor for encrypting messages. * * @return the encryptor. */
Gets the encryptor for encrypting messages
getEncryptor
{ "repo_name": "lare96/asteria-3.0", "path": "src/com/asteria/net/message/LoginDetailsMessage.java", "license": "gpl-3.0", "size": 2710 }
[ "com.asteria.net.ISAACCipher" ]
import com.asteria.net.ISAACCipher;
import com.asteria.net.*;
[ "com.asteria.net" ]
com.asteria.net;
2,787,860
EReference getRobotPositionInformation_Position();
EReference getRobotPositionInformation_Position();
/** * Returns the meta object for the containment reference '{@link de.dfki.iui.basys.model.data.RobotPositionInformation#getPosition <em>Position</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Position</em>'. * @see de.dfki.iui.basys.mod...
Returns the meta object for the containment reference '<code>de.dfki.iui.basys.model.data.RobotPositionInformation#getPosition Position</code>'.
getRobotPositionInformation_Position
{ "repo_name": "BaSys-PC1/models", "path": "de.dfki.iui.basys.model.base/src/de/dfki/iui/basys/model/data/DataPackage.java", "license": "epl-1.0", "size": 12181 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,484,960
public static CompoundAssignment compoundAssignment( Set<Kind> operators, Matcher<ExpressionTree> receiverMatcher, Matcher<ExpressionTree> expressionMatcher) { return new CompoundAssignment(operators, receiverMatcher, expressionMatcher); } /** * Matches when the receiver of an instance m...
static CompoundAssignment function( Set<Kind> operators, Matcher<ExpressionTree> receiverMatcher, Matcher<ExpressionTree> expressionMatcher) { return new CompoundAssignment(operators, receiverMatcher, expressionMatcher); } /** * Matches when the receiver of an instance method is the same reference as a particular argum...
/** * Matches a compound assignment operator AST node which matches a given left-operand matcher, a * given right-operand matcher, and is one of a set of compound assignment operators. Does not * match compound assignment operators. * * @param operators Which compound assignment operators to match agains...
Matches a compound assignment operator AST node which matches a given left-operand matcher, a given right-operand matcher, and is one of a set of compound assignment operators. Does not match compound assignment operators
compoundAssignment
{ "repo_name": "Anish2/error-prone", "path": "core/src/main/java/com/google/errorprone/matchers/Matchers.java", "license": "apache-2.0", "size": 48610 }
[ "com.sun.source.tree.ExpressionTree", "com.sun.source.tree.Tree", "java.util.Set" ]
import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.Tree; import java.util.Set;
import com.sun.source.tree.*; import java.util.*;
[ "com.sun.source", "java.util" ]
com.sun.source; java.util;
2,645,963
public void addAdapter(int id, BaseAdapter adapter) { synchronized (mLock) { //mAdapters.put(id, adapter); mAdapters.add(id, adapter); } }
void function(int id, BaseAdapter adapter) { synchronized (mLock) { mAdapters.add(id, adapter); } }
/** * Adds a new adapter to the list. * @param adapter The adapter to add. */
Adds a new adapter to the list
addAdapter
{ "repo_name": "victorhaggqvist/sthlmtraveling", "path": "sthlmtraveling/src/main/java/com/markupartist/sthlmtraveling/MultipleListAdapter.java", "license": "apache-2.0", "size": 8232 }
[ "android.widget.BaseAdapter" ]
import android.widget.BaseAdapter;
import android.widget.*;
[ "android.widget" ]
android.widget;
497,064
public static <K, V, M extends Map<K, V>> MapBuilder<K, V, M> createMap(final K key, final V value, final Supplier<M> mapFactory) { return create(mapFactory.get()).put(key, value); }
static <K, V, M extends Map<K, V>> MapBuilder<K, V, M> function(final K key, final V value, final Supplier<M> mapFactory) { return create(mapFactory.get()).put(key, value); }
/** * Create new map builder for HashMap and stores a new entry * * @param key * the key of the new entry * @param value * the value of the new entry * @param mapFactory * factory used to create the map * @param <K> * key type * @param <V> * ...
Create new map builder for HashMap and stores a new entry
createMap
{ "repo_name": "thexman/commons", "path": "src/main/java/com/a9ski/utils/MapBuilder.java", "license": "apache-2.0", "size": 5783 }
[ "java.util.Map", "java.util.function.Supplier" ]
import java.util.Map; import java.util.function.Supplier;
import java.util.*; import java.util.function.*;
[ "java.util" ]
java.util;
2,148,031
protected ObjectCreationFactory getFactory(Attributes attributes) throws Exception { if (creationFactory == null) { String realClassName = className; if (attributeName != null) { String value = attributes.getValue(attributeName); if (value...
ObjectCreationFactory function(Attributes attributes) throws Exception { if (creationFactory == null) { String realClassName = className; if (attributeName != null) { String value = attributes.getValue(attributeName); if (value != null) { realClassName = value; } } if (digester.log.isDebugEnabled()) { digester.log.debu...
/** * Return an instance of our associated object creation factory, * creating one if necessary. * * @param attributes Attributes passed to our factory creation element * * @exception Exception if any error occurs */
Return an instance of our associated object creation factory, creating one if necessary
getFactory
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/commons-digester/org/apache/commons/digester/FactoryCreateRule.java", "license": "gpl-2.0", "size": 17891 }
[ "org.xml.sax.Attributes" ]
import org.xml.sax.Attributes;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
489,464
private void writeDataToFile(IntermediateSortTempRow row) throws IOException { sortStepRowHandler.writeIntermediateSortTempRowToOutputStream(row, stream); }
void function(IntermediateSortTempRow row) throws IOException { sortStepRowHandler.writeIntermediateSortTempRowToOutputStream(row, stream); }
/** * Below method will be used to write data to file * * @throws IOException problem while writing */
Below method will be used to write data to file
writeDataToFile
{ "repo_name": "zzcclp/carbondata", "path": "processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java", "license": "apache-2.0", "size": 9377 }
[ "java.io.IOException", "org.apache.carbondata.processing.loading.row.IntermediateSortTempRow" ]
import java.io.IOException; import org.apache.carbondata.processing.loading.row.IntermediateSortTempRow;
import java.io.*; import org.apache.carbondata.processing.loading.row.*;
[ "java.io", "org.apache.carbondata" ]
java.io; org.apache.carbondata;
1,707,411
public void setJudgeDate(Date judgeDate) { this.judgeDate = judgeDate; }
void function(Date judgeDate) { this.judgeDate = judgeDate; }
/** * <p> * Sets judgeDate. * </p> * * @param judgeDate * judgeDate */
Sets judgeDate.
setJudgeDate
{ "repo_name": "lei-cao/zoj", "path": "judge_server/src/main/cn/edu/zju/acm/onlinejudge/bean/Submission.java", "license": "gpl-3.0", "size": 8775 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,542,628
@Override public String getText(Object object) { Type type = (Type) object; String label = type.getName(); // get the key name of this object for the translated string // by using the objects interface name String className = type.eClass().getName(); ...
String function(Object object) { Type type = (Type) object; String label = type.getName(); String className = type.eClass().getName(); String keyName = "_UI_" + className + "_type"; return label == null label.length() == 0 ? getString(keyName) : getString(keyName) + " " + label; }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * @param object the object a textual representation to get for * @return the textual representation for the given object * <!-- end-user-doc --> * @generated NOT */
This returns the label text for the adapted class.
getText
{ "repo_name": "mschoettle/ecse429-fall15-project", "path": "ca.mcgill.sel.ram.edit/src/ca/mcgill/sel/ram/provider/TypeItemProvider.java", "license": "gpl-2.0", "size": 3031 }
[ "ca.mcgill.sel.ram.Type" ]
import ca.mcgill.sel.ram.Type;
import ca.mcgill.sel.ram.*;
[ "ca.mcgill.sel" ]
ca.mcgill.sel;
1,428,332
public void setInterval(IntervalList list) { intervalList = list; }
void function(IntervalList list) { intervalList = list; }
/** * Before transmitting in the modes <code>TRANSMIT_BAR</code> * or <code>TRANSMIT_VERT_BARS</code>, an <code>IntervalList</code> * must be set. * * @param list An <code>IntervalList</code>. */
Before transmitting in the modes <code>TRANSMIT_BAR</code> or <code>TRANSMIT_VERT_BARS</code>, an <code>IntervalList</code> must be set
setInterval
{ "repo_name": "mobilesec/openuat", "path": "src/org/openuat/channel/oob/ButtonChannelImpl.java", "license": "lgpl-3.0", "size": 6650 }
[ "org.openuat.util.IntervalList" ]
import org.openuat.util.IntervalList;
import org.openuat.util.*;
[ "org.openuat.util" ]
org.openuat.util;
2,278,189
public Map getViewState() { return viewstate; }
Map function() { return viewstate; }
/** * Get viewer state parameters. * @return Map of parameters. */
Get viewer state parameters
getViewState
{ "repo_name": "elmarquez/Federation", "path": "src/ca/sfu/federation/ApplicationContext.java", "license": "gpl-2.0", "size": 8984 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
109,712
private void handleViewerCreated(ViewerCreated evt) { }
void function(ViewerCreated evt) { }
/** * Handles the {@link ViewerCreated} event. * * @param evt The event to handle. */
Handles the <code>ViewerCreated</code> event
handleViewerCreated
{ "repo_name": "rleigh-dundee/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/TreeViewerAgent.java", "license": "gpl-2.0", "size": 18715 }
[ "org.openmicroscopy.shoola.agents.events.iviewer.ViewerCreated" ]
import org.openmicroscopy.shoola.agents.events.iviewer.ViewerCreated;
import org.openmicroscopy.shoola.agents.events.iviewer.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
253,639
private void drawMetaField(MetaField field, String indent, MetaType type){ if(field instanceof MetaClass){ this.drawClass((MetaClass)field, indent, type); } else if(field instanceof MetaCollection){ this.drawCollection((MetaCollection)field, indent, type); } ...
void function(MetaField field, String indent, MetaType type){ if(field instanceof MetaClass){ this.drawClass((MetaClass)field, indent, type); } else if(field instanceof MetaCollection){ this.drawCollection((MetaCollection)field, indent, type); } else if(field instanceof MetaEnum){ this.drawEnum((MetaEnum)field, indent,...
/** * Creates a plain text representation of a field. * * @param field The field to create the plain text representation of. * @param indent The indentation to draw. * @param type The complete type. */
Creates a plain text representation of a field
drawMetaField
{ "repo_name": "SanderMertens/opensplice", "path": "src/tools/cm/common/code/org/opensplice/common/view/entity/EntityInfoFormatterText.java", "license": "gpl-3.0", "size": 15697 }
[ "org.opensplice.cm.meta.MetaClass", "org.opensplice.cm.meta.MetaCollection", "org.opensplice.cm.meta.MetaEnum", "org.opensplice.cm.meta.MetaField", "org.opensplice.cm.meta.MetaPrimitive", "org.opensplice.cm.meta.MetaStruct", "org.opensplice.cm.meta.MetaType", "org.opensplice.cm.meta.MetaUnion" ]
import org.opensplice.cm.meta.MetaClass; import org.opensplice.cm.meta.MetaCollection; import org.opensplice.cm.meta.MetaEnum; import org.opensplice.cm.meta.MetaField; import org.opensplice.cm.meta.MetaPrimitive; import org.opensplice.cm.meta.MetaStruct; import org.opensplice.cm.meta.MetaType; import org.opensplice.cm....
import org.opensplice.cm.meta.*;
[ "org.opensplice.cm" ]
org.opensplice.cm;
2,462,045
public void setCommand(final Command command) { this.command = command; }
void function(final Command command) { this.command = command; }
/** * A command this code action executes. If a code action * provides a edit and a command, first the edit is * executed and then the command. */
A command this code action executes. If a code action provides a edit and a command, first the edit is executed and then the command
setCommand
{ "repo_name": "smarr/SOMns-vscode", "path": "server/org.eclipse.lsp4j-gen/org/eclipse/lsp4j/CodeAction.java", "license": "mit", "size": 11451 }
[ "org.eclipse.lsp4j.Command" ]
import org.eclipse.lsp4j.Command;
import org.eclipse.lsp4j.*;
[ "org.eclipse.lsp4j" ]
org.eclipse.lsp4j;
1,299,184
protected static String byte2char(final byte[] bytes) throws UnsupportedEncodingException { return new String(bytes, "UTF-8"); }
static String function(final byte[] bytes) throws UnsupportedEncodingException { return new String(bytes, "UTF-8"); }
/** * Byte to char. * * @param bytes the bytes * @return the string * @throws UnsupportedEncodingException the unsupported encoding exception */
Byte to char
byte2char
{ "repo_name": "y1011/cas-server", "path": "cas-server-extension-clearpass/src/main/java/org/jasig/cas/extension/clearpass/EncryptedMapDecorator.java", "license": "apache-2.0", "size": 18235 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
26,859
return streamSetup; } /** * Legt den Wert der streamSetup-Eigenschaft fest. * * @param value * allowed object is {@link StreamSetup }
return streamSetup; } /** * Legt den Wert der streamSetup-Eigenschaft fest. * * @param value * allowed object is {@link StreamSetup }
/** * Ruft den Wert der streamSetup-Eigenschaft ab. * * @return possible object is {@link StreamSetup } * */
Ruft den Wert der streamSetup-Eigenschaft ab
getStreamSetup
{ "repo_name": "milg0/onvif-java-lib", "path": "src/org/onvif/ver10/media/wsdl/GetStreamUri.java", "license": "apache-2.0", "size": 2514 }
[ "org.onvif.ver10.schema.StreamSetup" ]
import org.onvif.ver10.schema.StreamSetup;
import org.onvif.ver10.schema.*;
[ "org.onvif.ver10" ]
org.onvif.ver10;
1,918,067
public String processFormSubmission(String formId, InputStream model, String method, String action, Map<String, Object> parameters) throws FormSubmissionException;
String function(String formId, InputStream model, String method, String action, Map<String, Object> parameters) throws FormSubmissionException;
/** * given a form submission process the result * * @param formId * the id of the form to process * @param model * the submitted model * @param method * the submit method * @param action * the submit action * @param parameters * ...
given a form submission process the result
processFormSubmission
{ "repo_name": "hlim/studio", "path": "cstudio-share-war/src/main/java/org/craftercms/cstudio/share/forms/FormSubmissionProcessor.java", "license": "gpl-3.0", "size": 1744 }
[ "java.io.InputStream", "java.util.Map" ]
import java.io.InputStream; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
696,070
public static void main(String[] args) throws Exception { ToolRunner.run(HBaseConfiguration.create(), new TagNetworkMR(), args); } /** * {@inheritDoc}
static void function(String[] args) throws Exception { ToolRunner.run(HBaseConfiguration.create(), new TagNetworkMR(), args); } /** * {@inheritDoc}
/** * Runs the {@link TokenCountMR}. */
Runs the <code>TokenCountMR</code>
main
{ "repo_name": "fozziethebeat/C-Cat", "path": "core/src/main/java/gov/llnl/ontology/mapreduce/stats/TagNetworkMR.java", "license": "gpl-2.0", "size": 4575 }
[ "org.apache.hadoop.hbase.HBaseConfiguration", "org.apache.hadoop.util.ToolRunner" ]
import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.util.ToolRunner;
import org.apache.hadoop.hbase.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
811,799
public ChunkedDocument readDocument(String docStr, String id) throws ExtractorException { ArrayList<String> sents = new ArrayList<String>(); Iterables.addAll(sents, sentExtractor.extract(docStr)); ArrayList<ChunkedSentence> chunkedSents = new ArrayList<ChunkedSentence>(...
ChunkedDocument function(String docStr, String id) throws ExtractorException { ArrayList<String> sents = new ArrayList<String>(); Iterables.addAll(sents, sentExtractor.extract(docStr)); ArrayList<ChunkedSentence> chunkedSents = new ArrayList<ChunkedSentence>(sents.size()); int sentNum = 1; for (String sent : sents) { t...
/** * Reads a document from the given string, assigning it the given id * @param docStr * @param id * @return the document * @throws ExtractorException if unable to run sentence extractor */
Reads a document from the given string, assigning it the given id
readDocument
{ "repo_name": "wavii/reverb-core", "path": "src/main/java/edu/washington/cs/knowitall/nlp/ChunkedDocumentReader.java", "license": "gpl-3.0", "size": 5583 }
[ "com.google.common.collect.Iterables", "edu.washington.cs.knowitall.extractor.ExtractorException", "java.util.ArrayList" ]
import com.google.common.collect.Iterables; import edu.washington.cs.knowitall.extractor.ExtractorException; import java.util.ArrayList;
import com.google.common.collect.*; import edu.washington.cs.knowitall.extractor.*; import java.util.*;
[ "com.google.common", "edu.washington.cs", "java.util" ]
com.google.common; edu.washington.cs; java.util;
1,360,880
EAttribute getTransition_FaultProbability();
EAttribute getTransition_FaultProbability();
/** * Returns the meta object for the attribute '{@link org.tud.inf.st.mbt.ulang.guigraph.Transition#getFaultProbability <em>Fault Probability</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Fault Probability</em>'. * @see org.tud.inf.st.mbt.ulang.gui...
Returns the meta object for the attribute '<code>org.tud.inf.st.mbt.ulang.guigraph.Transition#getFaultProbability Fault Probability</code>'.
getTransition_FaultProbability
{ "repo_name": "paetti1988/qmate", "path": "MATE/org.tud.inf.st.mbt.emf/src-gen/org/tud/inf/st/mbt/ulang/guigraph/GuigraphPackage.java", "license": "apache-2.0", "size": 62918 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
456,889
public List<String> unlockedVideos() { return new ArrayList<>(unlockedVideos); }
List<String> function() { return new ArrayList<>(unlockedVideos); }
/** * Returns a list of all unlocked videos. * @return the list of unlocked videos */
Returns a list of all unlocked videos
unlockedVideos
{ "repo_name": "p-smith/open-ig", "path": "src/hu/openig/model/Profile.java", "license": "lgpl-3.0", "size": 3864 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,803,127
public void initialiseAndTrainClassifier() throws gate.creole. ExecutionException, java.io.IOException { if (DEBUG) System.out.println("Entering initialise and train classifier"); // First save the dataset to disk, so svm_learn can access it. java.io.FileWriter fileWriter = new java....
void function() throws gate.creole. ExecutionException, java.io.IOException { if (DEBUG) System.out.println(STR); java.io.FileWriter fileWriter = new java.io.FileWriter(trainingDataFile.getCanonicalPath(), false); saveDataset(fileWriter, trainingData); fileWriter.close(); if (DEBUG) System.out.println(STR); java.lang.P...
/** * Use svm_learn to create a new svm model, based on all the data currently * stored in the wrapper. * * @throws gate.creole.ExecutionException */
Use svm_learn to create a new svm model, based on all the data currently stored in the wrapper
initialiseAndTrainClassifier
{ "repo_name": "SONIAGroup/S.O.N.I.A.", "path": "GATE_Developer_8.0/plugins/Machine_Learning/src/gate/creole/ml/svmlight/SVMLightWrapper.java", "license": "gpl-2.0", "size": 58593 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
848,657
@Override public String getFormat() { return title == null ? Strings.EMPTY : title; }
String function() { return title == null ? Strings.EMPTY : title; }
/** * Returns the title. * @return the title. */
Returns the title
getFormat
{ "repo_name": "apache/logging-log4j2", "path": "log4j-api/src/main/java/org/apache/logging/log4j/message/ThreadDumpMessage.java", "license": "apache-2.0", "size": 7079 }
[ "org.apache.logging.log4j.util.Strings" ]
import org.apache.logging.log4j.util.Strings;
import org.apache.logging.log4j.util.*;
[ "org.apache.logging" ]
org.apache.logging;
1,192,264
protected void tearDown() throws Exception { Statement st = createStatement(); st.execute("DROP TABLE TEST_TABLE"); st.close(); commit(); super.tearDown(); }
void function() throws Exception { Statement st = createStatement(); st.execute(STR); st.close(); commit(); super.tearDown(); }
/** * to make sure all tables and databases are dropped */
to make sure all tables and databases are dropped
tearDown
{ "repo_name": "lpxz/grail-derby104", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/ShutdownDatabaseTest.java", "license": "apache-2.0", "size": 8676 }
[ "java.sql.Statement" ]
import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
543,444
FileInfo readFile(final ObjectId fileId) throws FileNotFoundException; FileInfo readFile(final String storeName) throws FileNotFoundException;
FileInfo readFile(final ObjectId fileId) throws FileNotFoundException; FileInfo readFile(final String storeName) throws FileNotFoundException;
/** * Returns the InputStream of the file with the given name. * @param storeName File Id to read. * @return A InputStream with that file Information. * @throws FileNotFoundException If there is no file with that name. */
Returns the InputStream of the file with the given name
readFile
{ "repo_name": "craftercms/commons", "path": "mongo/src/main/java/org/craftercms/commons/mongo/CrudRepository.java", "license": "gpl-3.0", "size": 18615 }
[ "java.io.FileNotFoundException", "org.bson.types.ObjectId" ]
import java.io.FileNotFoundException; import org.bson.types.ObjectId;
import java.io.*; import org.bson.types.*;
[ "java.io", "org.bson.types" ]
java.io; org.bson.types;
1,358,207
protected String getURLForDocument(DistributionOfIncomeAndExpenseDocument doc) { StringBuilder url = new StringBuilder(); url.append(URL_PREFIX); url.append(getUrlDocType()); url.append(URL_MIDDLE); url.append(KewApiConstants.ACTIONLIST_COMMAND); url.append(URL_...
String function(DistributionOfIncomeAndExpenseDocument doc) { StringBuilder url = new StringBuilder(); url.append(URL_PREFIX); url.append(getUrlDocType()); url.append(URL_MIDDLE); url.append(KewApiConstants.ACTIONLIST_COMMAND); url.append(URL_SUFFIX); url.append(doc.getDocumentNumber()); return url.toString(); }
/** * Builds the URL that can be used to redirect to the correct document * * @param doc the document to build the URL for * @return the relative URL to redirect to */
Builds the URL that can be used to redirect to the correct document
getURLForDocument
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/fp/batch/service/impl/DistributionOfIncomeAndExpenseElectronicPaymentClaimingHelperStrategyImpl.java", "license": "agpl-3.0", "size": 12714 }
[ "org.kuali.kfs.fp.document.DistributionOfIncomeAndExpenseDocument", "org.kuali.rice.kew.api.KewApiConstants" ]
import org.kuali.kfs.fp.document.DistributionOfIncomeAndExpenseDocument; import org.kuali.rice.kew.api.KewApiConstants;
import org.kuali.kfs.fp.document.*; import org.kuali.rice.kew.api.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
1,107,733
private static boolean isValidSnappyStream(File f) throws IOException { byte[] byteArray = new byte[SnappyCodec.MAGIC_LEN]; try (FileInputStream fis = new FileInputStream(f)) { if (SnappyCodec.MAGIC_LEN != fis.read(byteArray, 0, SnappyCodec.MAGIC_LEN)) { LOG.error("Read i...
static boolean function(File f) throws IOException { byte[] byteArray = new byte[SnappyCodec.MAGIC_LEN]; try (FileInputStream fis = new FileInputStream(f)) { if (SnappyCodec.MAGIC_LEN != fis.read(byteArray, 0, SnappyCodec.MAGIC_LEN)) { LOG.error(STR, f.getName()); return false; } ByteBuffer bb = ByteBuffer.wrap(byteArr...
/** * Certify the Snappy stream integrity by checking the header * for the Snappy magic string * * @param f file to verify * @return true if it has the correct Snappy magic string * @throws IOException */
Certify the Snappy stream integrity by checking the header for the Snappy magic string
isValidSnappyStream
{ "repo_name": "arshadmohammad/zookeeper", "path": "zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java", "license": "apache-2.0", "size": 10771 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.nio.ByteBuffer", "java.util.Arrays", "org.xerial.snappy.SnappyCodec" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; import org.xerial.snappy.SnappyCodec;
import java.io.*; import java.nio.*; import java.util.*; import org.xerial.snappy.*;
[ "java.io", "java.nio", "java.util", "org.xerial.snappy" ]
java.io; java.nio; java.util; org.xerial.snappy;
1,874,441
public HashMap<String, Item> getHashMap() { return items; }
HashMap<String, Item> function() { return items; }
/** * Retourner le HashMap des objets * * @return le HashMap des objets */
Retourner le HashMap des objets
getHashMap
{ "repo_name": "rubeus90/watergame", "path": "src/pkg_Items/ItemListe.java", "license": "gpl-3.0", "size": 1792 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
192,850
@AfterClass public static void cleanUp() throws IOException { db.shutdown(); }
static void function() throws IOException { db.shutdown(); }
/** * Clean up after ourselves. * @throws IOException when the database could not be deleted */
Clean up after ourselves
cleanUp
{ "repo_name": "AbeelLab/dnainator", "path": "dnainator-core/src/test/java/nl/tudelft/dnainator/graph/impl/Neo4jClusterTest.java", "license": "bsd-3-clause", "size": 3428 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,578,303
@SuppressWarnings("unused") private void vectorizeRightIndexing( Hop hop ) throws HopsException { if( hop instanceof IndexingOp ) //right indexing { IndexingOp ihop0 = (IndexingOp) hop; boolean isSingleRow = ihop0.isRowLowerEqualsUpper(); boolean isSingleCol = ihop0.isColLowerEqualsUpper(); boole...
@SuppressWarnings(STR) void function( Hop hop ) throws HopsException { if( hop instanceof IndexingOp ) { IndexingOp ihop0 = (IndexingOp) hop; boolean isSingleRow = ihop0.isRowLowerEqualsUpper(); boolean isSingleCol = ihop0.isColLowerEqualsUpper(); boolean appliedRow = false; if( isSingleRow && isSingleCol ){ Hop input ...
/** * Note: unnecessary row or column indexing then later removed via * dynamic rewrites * * @param hop high-level operator * @throws HopsException if HopsException occurs */
Note: unnecessary row or column indexing then later removed via dynamic rewrites
vectorizeRightIndexing
{ "repo_name": "sandeep-n/incubator-systemml", "path": "src/main/java/org/apache/sysml/hops/rewrite/RewriteIndexingVectorization.java", "license": "apache-2.0", "size": 14494 }
[ "java.util.ArrayList", "org.apache.sysml.hops.Hop", "org.apache.sysml.hops.HopsException", "org.apache.sysml.hops.IndexingOp", "org.apache.sysml.hops.LiteralOp" ]
import java.util.ArrayList; import org.apache.sysml.hops.Hop; import org.apache.sysml.hops.HopsException; import org.apache.sysml.hops.IndexingOp; import org.apache.sysml.hops.LiteralOp;
import java.util.*; import org.apache.sysml.hops.*;
[ "java.util", "org.apache.sysml" ]
java.util; org.apache.sysml;
306,997
public ServiceFuture<ExpressRouteCircuitConnectionInner> beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback<ExpressRouteCircuitConnectionInner> serviceCall...
ServiceFuture<ExpressRouteCircuitConnectionInner> function(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback<ExpressRouteCircuitConnectionInner> serviceCallback) { return ServiceFutur...
/** * Creates or updates a Express Route Circuit Connection in the specified express route circuits. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @param connectionNam...
Creates or updates a Express Route Circuit Connection in the specified express route circuits
beginCreateOrUpdateAsync
{ "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/ExpressRouteCircuitConnectionsInner.java", "license": "mit", "size": 53215 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
876,194
public EReference getReceipt_CashierShift() { return (EReference)getReceipt().getEStructuralFeatures().get(3); }
EReference function() { return (EReference)getReceipt().getEStructuralFeatures().get(3); }
/** * Returns the meta object for the reference '{@link CIM15.IEC61968.PaymentMetering.Receipt#getCashierShift <em>Cashier Shift</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Cashier Shift</em>'. * @see CIM15.IEC61968.PaymentMetering.Receipt#getCash...
Returns the meta object for the reference '<code>CIM15.IEC61968.PaymentMetering.Receipt#getCashierShift Cashier Shift</code>'.
getReceipt_CashierShift
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61968/PaymentMetering/PaymentMeteringPackage.java", "license": "apache-2.0", "size": 290630 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,148,530
public void deleteFaceDetectionObserver(GenericObserver<FacesDetectedEvent> _o) { mFaceDetectionObservable.deleteObserver(_o); } // // public void addYuvImageObserver(GenericObserver<YuvImageEvent> _o) { // mYuvImageObservable.addObserver(_o); // } // // // public void deleteYuvImageObserver(GenericObse...
void function(GenericObserver<FacesDetectedEvent> _o) { mFaceDetectionObservable.deleteObserver(_o); }
/** * See {@link #mDoFaceDetection}. */
See <code>#mDoFaceDetection</code>
deleteFaceDetectionObserver
{ "repo_name": "mobilesec/sesames", "path": "FaceDetectionViewComponent/src/at/fhooe/facedetectionview/view/FaceView.java", "license": "lgpl-3.0", "size": 11747 }
[ "at.fhooe.facedetectionview.model.FacesDetectedEvent", "at.fhooe.mc.genericobserver.GenericObserver" ]
import at.fhooe.facedetectionview.model.FacesDetectedEvent; import at.fhooe.mc.genericobserver.GenericObserver;
import at.fhooe.facedetectionview.model.*; import at.fhooe.mc.genericobserver.*;
[ "at.fhooe.facedetectionview", "at.fhooe.mc" ]
at.fhooe.facedetectionview; at.fhooe.mc;
1,438,702
public static GcsPath fromUri(String uri) { Matcher m = GCS_URI.matcher(uri); Preconditions.checkArgument(m.matches(), "Invalid GCS URI: %s", uri); Preconditions.checkArgument(m.group("SCHEME").equalsIgnoreCase(SCHEME), "URI: %s is not a GCS URI", uri); return new GcsPath(null, m.group("BUCKE...
static GcsPath function(String uri) { Matcher m = GCS_URI.matcher(uri); Preconditions.checkArgument(m.matches(), STR, uri); Preconditions.checkArgument(m.group(STR).equalsIgnoreCase(SCHEME), STR, uri); return new GcsPath(null, m.group(STR), m.group(STR)); } private static final Pattern GCS_RESOURCE_NAME = Pattern.compi...
/** * Creates a GcsPath from a URI in string form. * * <p> This does not use URI parsing, which means it may accept patterns that * the URI parser would not accept. */
Creates a GcsPath from a URI in string form. This does not use URI parsing, which means it may accept patterns that the URI parser would not accept
fromUri
{ "repo_name": "vikaspalkar/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/util/gcsfs/GcsPath.java", "license": "apache-2.0", "size": 18101 }
[ "com.google.api.client.util.Preconditions", "java.net.URI", "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import com.google.api.client.util.Preconditions; import java.net.URI; import java.util.regex.Matcher; import java.util.regex.Pattern;
import com.google.api.client.util.*; import java.net.*; import java.util.regex.*;
[ "com.google.api", "java.net", "java.util" ]
com.google.api; java.net; java.util;
2,880,648
public String getA9() { return getDecimal(5 + 47, 6); } // getA9 //---------------- protected static final Field A10 = new Field(5 + 53, 10, "A10");
String function() { return getDecimal(5 + 47, 6); } protected static final Field A10 = new Field(5 + 53, 10, "A10");
/** Gets A9 - Kontonr * @return Kontonr */
Gets A9 - Kontonr
getA9
{ "repo_name": "gfis/xtrans", "path": "src/main/java/org/teherba/xtrans/finance/DTA2RecordBase.java", "license": "apache-2.0", "size": 30931 }
[ "org.teherba.xtrans.Field" ]
import org.teherba.xtrans.Field;
import org.teherba.xtrans.*;
[ "org.teherba.xtrans" ]
org.teherba.xtrans;
2,078,845
void setLastModified(long timemillisecs) throws IOException;
void setLastModified(long timemillisecs) throws IOException;
/** * Set stored last modified timestamp. */
Set stored last modified timestamp
setLastModified
{ "repo_name": "cnoelle/knopflerfish_framework", "path": "src/main/java/org/knopflerfish/framework/BundleArchive.java", "license": "bsd-3-clause", "size": 6146 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,845,717
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(MindLibrary.class)) { case MindidePackage.MIND_LIBRARY__FULLPATH: case MindidePackage.MIND_LIBRARY__FOLDER: case MindidePackage.MIND_LIBRARY__TARGET_FILTER: case MindideP...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(MindLibrary.class)) { case MindidePackage.MIND_LIBRARY__FULLPATH: case MindidePackage.MIND_LIBRARY__FOLDER: case MindidePackage.MIND_LIBRARY__TARGET_FILTER: case MindidePackage.MIND_LIBRARY__FULLPATH_LIB: case Min...
/** * 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": "StephaneSeyvoz/mindEd", "path": "org.ow2.mindEd.ide.edit/src-gen/org/ow2/mindEd/ide/edit/provider/MindLibraryItemProvider.java", "license": "lgpl-3.0", "size": 10337 }
[ "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification", "org.ow2.mindEd.ide.model.MindLibrary", "org.ow2.mindEd.ide.model.MindidePackage" ]
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.ow2.mindEd.ide.model.MindLibrary; import org.ow2.mindEd.ide.model.MindidePackage;
import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.ow2.*;
[ "org.eclipse.emf", "org.ow2" ]
org.eclipse.emf; org.ow2;
33,373
@Override public void handleNotification(Notification notification, Object hb) { AdminDistributedSystemJmxImpl adminDSJmx = (AdminDistributedSystemJmxImpl) this.member.getDistributedSystem(); String typeStatResourceStats = RefreshNotificationType.STATISTIC_RESOURCE_STATISTICS.getType(); if (ty...
void function(Notification notification, Object hb) { AdminDistributedSystemJmxImpl adminDSJmx = (AdminDistributedSystemJmxImpl) this.member.getDistributedSystem(); String typeStatResourceStats = RefreshNotificationType.STATISTIC_RESOURCE_STATISTICS.getType(); if (typeStatResourceStats.equals(notification.getType()) &&...
/** * Handles notification to refresh. Reacts by refreshing the values of this SystemMember's * ConfigurationParamaters. Any other notification is ignored. Given notification is handled only * if there is any JMX client connected to the system. * <p> * TODO: investigate use of NotificationFilter instead ...
Handles notification to refresh. Reacts by refreshing the values of this SystemMember's ConfigurationParamaters. Any other notification is ignored. Given notification is handled only if there is any JMX client connected to the system.
handleNotification
{ "repo_name": "PurelyApplied/geode", "path": "geode-core/src/main/java/org/apache/geode/admin/jmx/internal/StatisticResourceJmxImpl.java", "license": "apache-2.0", "size": 12932 }
[ "javax.management.Notification", "org.apache.geode.CancelException", "org.apache.geode.SystemFailure", "org.apache.geode.admin.AdminException" ]
import javax.management.Notification; import org.apache.geode.CancelException; import org.apache.geode.SystemFailure; import org.apache.geode.admin.AdminException;
import javax.management.*; import org.apache.geode.*; import org.apache.geode.admin.*;
[ "javax.management", "org.apache.geode" ]
javax.management; org.apache.geode;
794,114
public static String encodeAll(String unescaped, String charset) throws URIException { return encode(unescaped, empty, charset); }
static String function(String unescaped, String charset) throws URIException { return encode(unescaped, empty, charset); }
/** * Get the all escaped and encoded string with a given charset. * It's the same function to use <code>encode(String unescaped, Bitset * empty, String charset)</code>. * * @param unescaped an unescaped string * @param charset the charset * @return the escaped string * * @...
Get the all escaped and encoded string with a given charset. It's the same function to use <code>encode(String unescaped, Bitset empty, String charset)</code>
encodeAll
{ "repo_name": "fmassart/commons-httpclient", "path": "src/java/org/apache/commons/httpclient/util/URIUtil.java", "license": "apache-2.0", "size": 21737 }
[ "org.apache.commons.httpclient.URIException" ]
import org.apache.commons.httpclient.URIException;
import org.apache.commons.httpclient.*;
[ "org.apache.commons" ]
org.apache.commons;
122,952
private static boolean isPrime(final int number) { IntPredicate numberIsDivisible = (divisor) -> number % divisor == 0; return number > 1 && IntStream .range(2, number - 1) .parallel() .noneMatch(numberIsDivisible); }
static boolean function(final int number) { IntPredicate numberIsDivisible = (divisor) -> number % divisor == 0; return number > 1 && IntStream .range(2, number - 1) .parallel() .noneMatch(numberIsDivisible); }
/** * Our nice, readable, functional prime number checker */
Our nice, readable, functional prime number checker
isPrime
{ "repo_name": "bpedman/lambdas-lnl", "path": "src/main/java/com/bpedman/lambdas/Example_06.java", "license": "mit", "size": 1542 }
[ "java.util.function.IntPredicate", "java.util.stream.IntStream" ]
import java.util.function.IntPredicate; import java.util.stream.IntStream;
import java.util.function.*; import java.util.stream.*;
[ "java.util" ]
java.util;
37,147
@Test (timeout = 60000) public void testApplicationKillAtAcceptedState() throws Exception {
@Test (timeout = 60000) void function() throws Exception {
/** * Validate killing an application when it is at accepted state. * @throws Exception exception */
Validate killing an application when it is at accepted state
testApplicationKillAtAcceptedState
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRM.java", "license": "apache-2.0", "size": 29718 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
258,188
@ApiModelProperty( example = "10000123", value = "This account identifier is generated by the financial institute (FI). This must be" + " unique for your financial institute.") public String getAccountToken() { return accountToken; }
@ApiModelProperty( example = STR, value = STR + STR) String function() { return accountToken; }
/** * This account identifier is generated by the financial institute (FI). This must be unique for * your financial institute. maximum: 50 * * @return accountToken */
This account identifier is generated by the financial institute (FI). This must be unique for your financial institute. maximum: 50
getAccountToken
{ "repo_name": "SidneyAllen/Xero-Java", "path": "src/main/java/com/xero/models/bankfeeds/FeedConnection.java", "license": "mit", "size": 10841 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
912,352
public int nextHypergeometric(int populationSize, int numberOfSuccesses, int sampleSize) throws NotPositiveException, NotStrictlyPositiveException, NumberIsTooLargeException { return new HypergeometricDistribution(getRan(),populationSize, numberOfSuccesses, sampleSize).sample(); }
int function(int populationSize, int numberOfSuccesses, int sampleSize) throws NotPositiveException, NotStrictlyPositiveException, NumberIsTooLargeException { return new HypergeometricDistribution(getRan(),populationSize, numberOfSuccesses, sampleSize).sample(); }
/** * Generates a random value from the {@link HypergeometricDistribution Hypergeometric Distribution}. * * @param populationSize the population size of the Hypergeometric distribution * @param numberOfSuccesses number of successes in the population of the Hypergeometric distribution * @param s...
Generates a random value from the <code>HypergeometricDistribution Hypergeometric Distribution</code>
nextHypergeometric
{ "repo_name": "SpoonLabs/astor", "path": "examples/math_20/src/main/java/org/apache/commons/math3/random/RandomDataGenerator.java", "license": "gpl-2.0", "size": 31646 }
[ "org.apache.commons.math3.distribution.HypergeometricDistribution", "org.apache.commons.math3.exception.NotPositiveException", "org.apache.commons.math3.exception.NotStrictlyPositiveException", "org.apache.commons.math3.exception.NumberIsTooLargeException" ]
import org.apache.commons.math3.distribution.HypergeometricDistribution; import org.apache.commons.math3.exception.NotPositiveException; import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.apache.commons.math3.exception.NumberIsTooLargeException;
import org.apache.commons.math3.distribution.*; import org.apache.commons.math3.exception.*;
[ "org.apache.commons" ]
org.apache.commons;
2,585,225
public static java.util.List extractAssessmentInfoList(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.AssessmentInfoCollection voCollection) { return extractAssessmentInfoList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.AssessmentInfoCollection voCollection) { return extractAssessmentInfoList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.nursing.assessment.domain.objects.AssessmentInfo list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.nursing.assessment.domain.objects.AssessmentInfo list from the value object collection
extractAssessmentInfoList
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/AssessmentInfoAssembler.java", "license": "agpl-3.0", "size": 19137 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,790,922
public Observable<ServiceResponse<NetworkWatcherInner>> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } ...
Observable<ServiceResponse<NetworkWatcherInner>> function(String resourceGroupName, String networkWatcherName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (networkWatcherName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new ...
/** * Updates a network watcher tags. * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the NetworkWatcherInner ob...
Updates a network watcher tags
updateTagsWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkWatchersInner.java", "license": "mit", "size": 186527 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
624,862
public void setConjunctionType(Type conjunctionType) { this.conjunctionType = Objects.requireNonNull(conjunctionType, "No conjunction type given!"); }
void function(Type conjunctionType) { this.conjunctionType = Objects.requireNonNull(conjunctionType, STR); }
/** * Set the type of the conjunction. * @param conjunctionType the type of the conjunction * @throws NullPointerException if the given conjunction is null */
Set the type of the conjunction
setConjunctionType
{ "repo_name": "virenpc/nsehistoricaldata", "path": "src/com/viren/conditions/Conjunction.java", "license": "apache-2.0", "size": 3323 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
246,284
public void setLastPoll(Timestamp time) { m_lastPoll = time; m_changed |= CHANGED_POLLTIME; }
void function(Timestamp time) { m_lastPoll = time; m_changed = CHANGED_POLLTIME; }
/** * Sets the last poll time. * * @param time * The last poll time. * */
Sets the last poll time
setLastPoll
{ "repo_name": "tdefilip/opennms", "path": "opennms-services/src/main/java/org/opennms/netmgt/capsd/DbNodeEntry.java", "license": "agpl-3.0", "size": 61668 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,171,597
public static synchronized void setExpressions(String pats) { clearExpressions(); if (pats != null) { String[] patterns = pats.split("\n"); for (String pattern : patterns) { if (StringUtils.isNotEmpty(pattern)) addExpression(pattern); ...
static synchronized void function(String pats) { clearExpressions(); if (pats != null) { String[] patterns = pats.split("\n"); for (String pattern : patterns) { if (StringUtils.isNotEmpty(pattern)) addExpression(pattern); } } }
/** * Sets patterns and persists. * * @param pats patters as text (pattern per line). */
Sets patterns and persists
setExpressions
{ "repo_name": "pitosalas/blogbridge", "path": "src/com/salas/bb/imageblocker/ImageBlocker.java", "license": "gpl-2.0", "size": 3878 }
[ "com.salas.bb.utils.StringUtils" ]
import com.salas.bb.utils.StringUtils;
import com.salas.bb.utils.*;
[ "com.salas.bb" ]
com.salas.bb;
1,794,089
public static apDevTypeType fromPerAligned(byte[] encodedBytes) { apDevTypeType result = new apDevTypeType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static apDevTypeType function(byte[] encodedBytes) { apDevTypeType result = new apDevTypeType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new apDevTypeType from encoded stream. */
Creates a new apDevTypeType from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/ver2_ulp_components/SupportedWLANApData.java", "license": "apache-2.0", "size": 13831 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
2,575,641
public String getFullText(CommandSender forWho) { return fullText; }
String function(CommandSender forWho) { return fullText; }
/** * Returns the full description of this help topic that is displayed when * the user requests this topic's details. * <p> * The result will be paginated to properly fit the user's client. * * @param forWho The player or console requesting the full text. Useful * for further sec...
Returns the full description of this help topic that is displayed when the user requests this topic's details. The result will be paginated to properly fit the user's client
getFullText
{ "repo_name": "SpannaProject/SpannaAPI", "path": "src/main/java/org/spanna/help/HelpTopic.java", "license": "apache-2.0", "size": 4305 }
[ "org.spanna.command.CommandSender" ]
import org.spanna.command.CommandSender;
import org.spanna.command.*;
[ "org.spanna.command" ]
org.spanna.command;
759,401
@Override public void close() throws IOException { // enforce sequential close() calls synchronized (CLOSE_MUTEX) { this.recordWriter.close(new HadoopDummyReporter()); if (this.outputCommitter.needsTaskCommit(this.context)) { this.outputCommitter.commitTask(this.context); } } }
void function() throws IOException { synchronized (CLOSE_MUTEX) { this.recordWriter.close(new HadoopDummyReporter()); if (this.outputCommitter.needsTaskCommit(this.context)) { this.outputCommitter.commitTask(this.context); } } }
/** * commit the task by moving the output file out from the temporary directory. * @throws java.io.IOException */
commit the task by moving the output file out from the temporary directory
close
{ "repo_name": "zohar-mizrahi/flink", "path": "flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapred/HadoopOutputFormatBase.java", "license": "apache-2.0", "size": 7782 }
[ "java.io.IOException", "org.apache.flink.api.java.hadoop.mapred.wrapper.HadoopDummyReporter" ]
import java.io.IOException; import org.apache.flink.api.java.hadoop.mapred.wrapper.HadoopDummyReporter;
import java.io.*; import org.apache.flink.api.java.hadoop.mapred.wrapper.*;
[ "java.io", "org.apache.flink" ]
java.io; org.apache.flink;
220,013
public String getRequestBody() { if (requestBodyData != null) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { requestBodyData.appendTo(baos); return new String(baos.toByteArray(), "UTF-8"); } catch (Exception ex) { ...
String function() { if (requestBodyData != null) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { requestBodyData.appendTo(baos); return new String(baos.toByteArray(), "UTF-8"); } catch (Exception ex) { Log.e(ex); throw new RuntimeException(STR); } } return requestBody; }
/** * The request body can be used instead of arguments to pass JSON data to a restful request, * it can't be used in a get request and will fail if you have arguments * @return the requestBody */
The request body can be used instead of arguments to pass JSON data to a restful request, it can't be used in a get request and will fail if you have arguments
getRequestBody
{ "repo_name": "codenameone/CodenameOne", "path": "CodenameOne/src/com/codename1/io/ConnectionRequest.java", "license": "gpl-2.0", "size": 108017 }
[ "java.io.ByteArrayOutputStream" ]
import java.io.ByteArrayOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
937,708
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area, List<ValueTick> ticks) { // no renderer, no gridlines... if (getRenderer() == null) { return; } // draw the range grid lines, if any... if (isRangeGridlinesV...
void function(Graphics2D g2, Rectangle2D area, List<ValueTick> ticks) { if (getRenderer() == null) { return; } if (isRangeGridlinesVisible() isRangeMinorGridlinesVisible()) { Stroke gridStroke = null; Paint gridPaint = null; ValueAxis axis = getRangeAxis(); if (axis != null) { boolean paintLine; for (ValueTick tick : t...
/** * Draws the gridlines for the plot's primary range axis, if they are * visible. * * @param g2 the graphics device. * @param area the data area. * @param ticks the ticks. * * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List) */
Draws the gridlines for the plot's primary range axis, if they are visible
drawRangeGridlines
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/main/java/org/jfree/chart/plot/XYPlot.java", "license": "gpl-3.0", "size": 198838 }
[ "java.awt.Graphics2D", "java.awt.Paint", "java.awt.Stroke", "java.awt.geom.Rectangle2D", "java.util.List", "org.jfree.chart.axis.TickType", "org.jfree.chart.axis.ValueAxis", "org.jfree.chart.axis.ValueTick" ]
import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Stroke; import java.awt.geom.Rectangle2D; import java.util.List; import org.jfree.chart.axis.TickType; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.axis.ValueTick;
import java.awt.*; import java.awt.geom.*; import java.util.*; import org.jfree.chart.axis.*;
[ "java.awt", "java.util", "org.jfree.chart" ]
java.awt; java.util; org.jfree.chart;
2,289,510
@Override public void clearCache() { if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { CacheRegistryUtil.clear(ConfiguracaoImpl.class.getName()); } EntityCacheUtil.clearCache(ConfiguracaoImpl.class.getName()); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); ...
void function() { if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { CacheRegistryUtil.clear(ConfiguracaoImpl.class.getName()); } EntityCacheUtil.clearCache(ConfiguracaoImpl.class.getName()); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCach...
/** * Clears the cache for all configuracaos. * * <p> * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. * </p> */
Clears the cache for all configuracaos. The <code>com.liferay.portal.kernel.dao.orm.EntityCache</code> and <code>com.liferay.portal.kernel.dao.orm.FinderCache</code> are both cleared by this method.
clearCache
{ "repo_name": "camaradosdeputadosoficial/edemocracia", "path": "cd-guiadiscussao-portlet/src/main/java/br/gov/camara/edemocracia/portlets/guiadiscussao/service/persistence/ConfiguracaoPersistenceImpl.java", "license": "lgpl-2.1", "size": 34038 }
[ "br.gov.camara.edemocracia.portlets.guiadiscussao.model.impl.ConfiguracaoImpl", "com.liferay.portal.kernel.cache.CacheRegistryUtil", "com.liferay.portal.kernel.dao.orm.EntityCacheUtil", "com.liferay.portal.kernel.dao.orm.FinderCacheUtil" ]
import br.gov.camara.edemocracia.portlets.guiadiscussao.model.impl.ConfiguracaoImpl; import com.liferay.portal.kernel.cache.CacheRegistryUtil; import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
import br.gov.camara.edemocracia.portlets.guiadiscussao.model.impl.*; import com.liferay.portal.kernel.cache.*; import com.liferay.portal.kernel.dao.orm.*;
[ "br.gov.camara", "com.liferay.portal" ]
br.gov.camara; com.liferay.portal;
193,038
default @NotNull List<TextRange> getAdditionalTextRanges() { return Collections.emptyList(); }
default @NotNull List<TextRange> getAdditionalTextRanges() { return Collections.emptyList(); }
/** * Additional ranges associated with matched range (e.g. for multi-line matching) */
Additional ranges associated with matched range (e.g. for multi-line matching)
getAdditionalTextRanges
{ "repo_name": "siosio/intellij-community", "path": "platform/indexing-api/src/com/intellij/psi/search/IndexPatternOccurrence.java", "license": "apache-2.0", "size": 1294 }
[ "com.intellij.openapi.util.TextRange", "java.util.Collections", "java.util.List", "org.jetbrains.annotations.NotNull" ]
import com.intellij.openapi.util.TextRange; import java.util.Collections; import java.util.List; import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.util.*; import java.util.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "java.util", "org.jetbrains.annotations" ]
com.intellij.openapi; java.util; org.jetbrains.annotations;
1,192,631
public CalendarReminder getCalendarReminder(long userId, String eventId,Date sendDate);
CalendarReminder function(long userId, String eventId,Date sendDate);
/** * Find an CalenderReminder, based on the user, event and date of the reminder * @param userId userId of the CalendarReminder to retrieve * @param eventId eventId of the CalendarReminder to retrieve * @param sendDate Date of the CalendarReminder to retrieve * @return */
Find an CalenderReminder, based on the user, event and date of the reminder
getCalendarReminder
{ "repo_name": "ggonzales/ksl", "path": "src/com/dotmarketing/portlets/calendar/business/CalendarReminderFactory.java", "license": "gpl-3.0", "size": 1593 }
[ "com.dotmarketing.portlets.calendar.model.CalendarReminder", "java.util.Date" ]
import com.dotmarketing.portlets.calendar.model.CalendarReminder; import java.util.Date;
import com.dotmarketing.portlets.calendar.model.*; import java.util.*;
[ "com.dotmarketing.portlets", "java.util" ]
com.dotmarketing.portlets; java.util;
876,744
public static void runExample( AdManagerServices adManagerServices, AdManagerSession session, long userId) throws RemoteException { // Get the UserService. UserServiceInterface userService = adManagerServices.get(session, UserServiceInterface.class); // Create a statement to select a user. ...
static void function( AdManagerServices adManagerServices, AdManagerSession session, long userId) throws RemoteException { UserServiceInterface userService = adManagerServices.get(session, UserServiceInterface.class); StatementBuilder statementBuilder = new StatementBuilder() .where(STR) .orderBy(STR) .limit(StatementB...
/** * Runs the example. * * @param adManagerServices the services factory. * @param session the session. * @param userId the ID of the user to deactivate. * @throws ApiException if the API request failed with one or more service errors. * @throws RemoteException if the API request failed due to oth...
Runs the example
runExample
{ "repo_name": "googleads/googleads-java-lib", "path": "examples/admanager_axis/src/main/java/admanager/axis/v202111/userservice/DeactivateUsers.java", "license": "apache-2.0", "size": 7324 }
[ "com.google.api.ads.admanager.axis.factory.AdManagerServices", "com.google.api.ads.admanager.axis.utils.v202111.StatementBuilder", "com.google.api.ads.admanager.axis.v202111.UpdateResult", "com.google.api.ads.admanager.axis.v202111.User", "com.google.api.ads.admanager.axis.v202111.UserPage", "com.google.a...
import com.google.api.ads.admanager.axis.factory.AdManagerServices; import com.google.api.ads.admanager.axis.utils.v202111.StatementBuilder; import com.google.api.ads.admanager.axis.v202111.UpdateResult; import com.google.api.ads.admanager.axis.v202111.User; import com.google.api.ads.admanager.axis.v202111.UserPage; im...
import com.google.api.ads.admanager.axis.factory.*; import com.google.api.ads.admanager.axis.utils.v202111.*; import com.google.api.ads.admanager.axis.v202111.*; import com.google.api.ads.admanager.lib.client.*; import java.rmi.*;
[ "com.google.api", "java.rmi" ]
com.google.api; java.rmi;
2,462,604
public CommitOp setCommitterTimeZoneOffset(@Nullable final Integer timeZoneOffset) { this.committerTimeZoneOffset = timeZoneOffset; return this; }
CommitOp function(@Nullable final Integer timeZoneOffset) { this.committerTimeZoneOffset = timeZoneOffset; return this; }
/** * Sets the time zone offset of the committer. * * @param timeZoneOffset time zone offset of the committer * @return {@code this}, to ease command chaining */
Sets the time zone offset of the committer
setCommitterTimeZoneOffset
{ "repo_name": "jdgarrett/geogig", "path": "src/core/src/main/java/org/locationtech/geogig/porcelain/CommitOp.java", "license": "bsd-3-clause", "size": 17917 }
[ "org.eclipse.jdt.annotation.Nullable" ]
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jdt.annotation.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,272,239
@Test public void testFindWvwMatchMapBonusType() { System.out.println("findWvwMatchMapBonusType"); final String[] values = { "Bloodlust", // NOI18N. "Center", // NOI18N. null, "" // NOI18N. }; final WvwMatchMapBonusT...
void function() { System.out.println(STR); final String[] values = { STR, STR, null, "" }; final WvwMatchMapBonusType[] expResults = { WvwMatchMapBonusType.BLOODLUST, WvwMatchMapBonusType.CENTER, WvwMatchMapBonusType.UNKNOWN, WvwMatchMapBonusType.UNKNOWN }; assertEquals(values.length, expResults.length); IntStream.rang...
/** * Test of MatchMapBonusType. */
Test of MatchMapBonusType
testFindWvwMatchMapBonusType
{ "repo_name": "fabricebouye/gw2-web-api-mapping", "path": "test/api/web/gw2/mapping/v2/wvw/matches/WvwMatchesUtilsTest.java", "license": "bsd-3-clause", "size": 4288 }
[ "java.util.stream.IntStream", "org.junit.jupiter.api.Assertions" ]
import java.util.stream.IntStream; import org.junit.jupiter.api.Assertions;
import java.util.stream.*; import org.junit.jupiter.api.*;
[ "java.util", "org.junit.jupiter" ]
java.util; org.junit.jupiter;
825,458
public static boolean checkMD5OfFile(String targetMD5, File file) throws IOException { InputStream in = FileUtils.openInputStream(file); String trueMd5 = DigestUtils.md5Hex(in); IOUtils.closeQuietly(in); return (targetMD5.equals(trueMd5)); }
static boolean function(String targetMD5, File file) throws IOException { InputStream in = FileUtils.openInputStream(file); String trueMd5 = DigestUtils.md5Hex(in); IOUtils.closeQuietly(in); return (targetMD5.equals(trueMd5)); }
/** * Check the MD5 of the specified file * @param targetMD5 Expected MD5 * @param file File to check * @return True if MD5 matches, false otherwise */
Check the MD5 of the specified file
checkMD5OfFile
{ "repo_name": "RobAltena/deeplearning4j", "path": "nd4j/nd4j-common/src/main/java/org/nd4j/resources/Downloader.java", "license": "apache-2.0", "size": 5547 }
[ "java.io.File", "java.io.IOException", "java.io.InputStream", "org.apache.commons.codec.digest.DigestUtils", "org.apache.commons.io.FileUtils", "org.apache.commons.io.IOUtils" ]
import java.io.File; import java.io.IOException; import java.io.InputStream; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils;
import java.io.*; import org.apache.commons.codec.digest.*; import org.apache.commons.io.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,206,082
private void addContentLimitedByPermissions(User user, ContentletRelationshipRecords contentletRelationshipRecords, List<Contentlet> relatedContentlets) { //consider immutable collections contentletRelationshipRecords.setRecords(new ArrayList<>(contentletRelationshipRecords....
void function(User user, ContentletRelationshipRecords contentletRelationshipRecords, List<Contentlet> relatedContentlets) { contentletRelationshipRecords.setRecords(new ArrayList<>(contentletRelationshipRecords.getRecords())); contentletRelationshipRecords.getRecords() .addAll(relatedContentlets.stream() .filter(conte...
/** * This method adds restricted content to the list of related content to be updated * @param user * @param contentletRelationshipRecords * @param relatedContentlets */
This method adds restricted content to the list of related content to be updated
addContentLimitedByPermissions
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ESContentletAPIImpl.java", "license": "gpl-3.0", "size": 427219 }
[ "com.dotmarketing.business.PermissionAPI", "com.dotmarketing.exception.DotDataException", "com.dotmarketing.portlets.contentlet.model.Contentlet", "com.dotmarketing.portlets.structure.model.ContentletRelationships", "com.liferay.portal.model.User", "java.util.ArrayList", "java.util.List", "java.util.s...
import com.dotmarketing.business.PermissionAPI; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.dotmarketing.portlets.structure.model.ContentletRelationships; import com.liferay.portal.model.User; import java.util.ArrayList; import java.util.L...
import com.dotmarketing.business.*; import com.dotmarketing.exception.*; import com.dotmarketing.portlets.contentlet.model.*; import com.dotmarketing.portlets.structure.model.*; import com.liferay.portal.model.*; import java.util.*; import java.util.stream.*;
[ "com.dotmarketing.business", "com.dotmarketing.exception", "com.dotmarketing.portlets", "com.liferay.portal", "java.util" ]
com.dotmarketing.business; com.dotmarketing.exception; com.dotmarketing.portlets; com.liferay.portal; java.util;
626,462
@Path("config") @POST @NoCache public Response createAuthenticatorConfig(AuthenticatorConfigRepresentation rep) { auth.requireManage(); AuthenticatorConfigModel config = realm.addAuthenticatorConfig(RepresentationToModel.toModel(rep)); adminEvent.operation(OperationType.CREATE)....
@Path(STR) Response function(AuthenticatorConfigRepresentation rep) { auth.requireManage(); AuthenticatorConfigModel config = realm.addAuthenticatorConfig(RepresentationToModel.toModel(rep)); adminEvent.operation(OperationType.CREATE).resource(ResourceType.AUTHENTICATOR_CONFIG).resourcePath(uriInfo, config.getId()).rep...
/** * Create new authenticator configuration * @param rep JSON describing new authenticator configuration * @deprecated Use {@link #newExecutionConfig(String, AuthenticatorConfigRepresentation)} instead */
Create new authenticator configuration
createAuthenticatorConfig
{ "repo_name": "wildfly-security-incubator/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java", "license": "apache-2.0", "size": 42745 }
[ "javax.ws.rs.Path", "javax.ws.rs.core.Response", "org.keycloak.events.admin.OperationType", "org.keycloak.events.admin.ResourceType", "org.keycloak.models.AuthenticatorConfigModel", "org.keycloak.models.utils.RepresentationToModel", "org.keycloak.representations.idm.AuthenticatorConfigRepresentation" ]
import javax.ws.rs.Path; import javax.ws.rs.core.Response; import org.keycloak.events.admin.OperationType; import org.keycloak.events.admin.ResourceType; import org.keycloak.models.AuthenticatorConfigModel; import org.keycloak.models.utils.RepresentationToModel; import org.keycloak.representations.idm.AuthenticatorConf...
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.keycloak.events.admin.*; import org.keycloak.models.*; import org.keycloak.models.utils.*; import org.keycloak.representations.idm.*;
[ "javax.ws", "org.keycloak.events", "org.keycloak.models", "org.keycloak.representations" ]
javax.ws; org.keycloak.events; org.keycloak.models; org.keycloak.representations;
1,234,328
public void reportScreenshot(File file) { Reporter.log("<a href=\"" + file.getPath() + "\"><p><img width=\"878\" src=\"" + file.getPath() + "\" alt=\"screenshot at " + new Date() + "\"/></p></a><br />"); log.warn("Screenshot captured, path is {}", file.getAbsolutePath()); }
void function(File file) { Reporter.log(STRSTR\STR878\STRSTR\STRscreenshot at STR\STR); log.warn(STR, file.getAbsolutePath()); }
/** * Log the screenshot of a failed log entry (error(...)) to * the logs * @param file * file must exist */
Log the screenshot of a failed log entry (error(...)) to the logs
reportScreenshot
{ "repo_name": "GiannisPapadakis/seletest", "path": "src/main/java/com/automation/seletest/core/services/utilities/FilesUtils.java", "license": "bsd-3-clause", "size": 8938 }
[ "java.io.File", "org.testng.Reporter" ]
import java.io.File; import org.testng.Reporter;
import java.io.*; import org.testng.*;
[ "java.io", "org.testng" ]
java.io; org.testng;
257,937
@Override public User createUser(String username, String password, String name, String email, String phone, String birthday, String job, int sex, String signName) { // TODO Auto-generated method stub return null; }
User function(String username, String password, String name, String email, String phone, String birthday, String job, int sex, String signName) { return null; }
/** * gjy * Title: createUser * Description: * @param username * @param password * @param name * @param email * @param phone * @return * @see org.jivesoftware.openfire.user.UserProvider#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) ...
gjy Title: createUser Description:
createUser
{ "repo_name": "gaojinyu/openfire_src", "path": "src/java/org/jivesoftware/openfire/crowd/CrowdUserProvider.java", "license": "apache-2.0", "size": 10019 }
[ "org.jivesoftware.openfire.user.User" ]
import org.jivesoftware.openfire.user.User;
import org.jivesoftware.openfire.user.*;
[ "org.jivesoftware.openfire" ]
org.jivesoftware.openfire;
2,352,139
void onDeviceConfigChange() { // because changing the content of a combo triggers a change event, respect the // mDisableUpdates flag if (mDisableUpdates > 0) { return; } State prev = mConfiguration.getDeviceState(); State state = (State) mOrientationComb...
void onDeviceConfigChange() { if (mDisableUpdates > 0) { return; } State prev = mConfiguration.getDeviceState(); State state = (State) mOrientationCombo.getData(); mConfiguration.setDeviceState(state, false); if (mClient != null) { boolean accepted = mClient.changed(CHANGED_DEVICE CHANGED_DEVICE_CONFIG); if (!accepted)...
/** * Called when the device config selection changes. */
Called when the device config selection changes
onDeviceConfigChange
{ "repo_name": "rex-xxx/mt6572_x201", "path": "sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java", "license": "gpl-2.0", "size": 73403 }
[ "com.android.sdklib.devices.State" ]
import com.android.sdklib.devices.State;
import com.android.sdklib.devices.*;
[ "com.android.sdklib" ]
com.android.sdklib;
2,710,310
public static void saveInstalledChecksumCache(File dir, Map<File, Long> checksums) throws IOException { File cacheFile = new File(dir, FOLDER_CHECKSUM_CACHE); Properties properties = new Properties(); Set<Map.Entry<File, Long>> entries = checksums.entrySet(); for (Map.Entry<File, Lon...
static void function(File dir, Map<File, Long> checksums) throws IOException { File cacheFile = new File(dir, FOLDER_CHECKSUM_CACHE); Properties properties = new Properties(); Set<Map.Entry<File, Long>> entries = checksums.entrySet(); for (Map.Entry<File, Long> entry : entries) { properties.put(entry.getKey().getName()...
/** * Saves the given checksums into the folder in the {@link #FOLDER_CHECKSUM_CACHE} file */
Saves the given checksums into the folder in the <code>#FOLDER_CHECKSUM_CACHE</code> file
saveInstalledChecksumCache
{ "repo_name": "dhirajsb/fabric8", "path": "components/fabric8-utils/src/main/java/io/fabric8/utils/ChecksumUtils.java", "license": "apache-2.0", "size": 4436 }
[ "java.io.File", "java.io.IOException", "java.util.Date", "java.util.Map", "java.util.Properties", "java.util.Set" ]
import java.io.File; import java.io.IOException; import java.util.Date; import java.util.Map; import java.util.Properties; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
570,763
private void init() throws DatabaseException, FileNotFoundException { System.out.println("-> Creating a BDB database"); DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setTransactional(true); dbConfig.setAllowCreate(true); dbConfig.setType(DatabaseType.BTREE...
void function() throws DatabaseException, FileNotFoundException { System.out.println(STR); DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setTransactional(true); dbConfig.setAllowCreate(true); dbConfig.setType(DatabaseType.BTREE); eventDb = env.openDatabase(null, STR, null, dbConfig); DatabaseConfig catalogCo...
/** * Create all primary and secondary indices. */
Create all primary and secondary indices
init
{ "repo_name": "racker/omnibus", "path": "source/db-5.0.26.NC/examples_java/src/persist/EventExample.java", "license": "apache-2.0", "size": 15076 }
[ "com.sleepycat.bind.serial.SerialBinding", "com.sleepycat.bind.serial.StoredClassCatalog", "com.sleepycat.db.DatabaseConfig", "com.sleepycat.db.DatabaseException", "com.sleepycat.db.DatabaseType", "com.sleepycat.db.SecondaryConfig", "java.io.FileNotFoundException" ]
import com.sleepycat.bind.serial.SerialBinding; import com.sleepycat.bind.serial.StoredClassCatalog; import com.sleepycat.db.DatabaseConfig; import com.sleepycat.db.DatabaseException; import com.sleepycat.db.DatabaseType; import com.sleepycat.db.SecondaryConfig; import java.io.FileNotFoundException;
import com.sleepycat.bind.serial.*; import com.sleepycat.db.*; import java.io.*;
[ "com.sleepycat.bind", "com.sleepycat.db", "java.io" ]
com.sleepycat.bind; com.sleepycat.db; java.io;
460,056
private void dispatchEvent(MotionEvent event, boolean allowDefaultAction) { if (allowDefaultAction) { if (mGestureDetector.onTouchEvent(event)) { return; } mScaleGestureDetector.onTouchEvent(event); if (mScaleGestureDetector.isInProgress()) { ...
void function(MotionEvent event, boolean allowDefaultAction) { if (allowDefaultAction) { if (mGestureDetector.onTouchEvent(event)) { return; } mScaleGestureDetector.onTouchEvent(event); if (mScaleGestureDetector.isInProgress()) { return; } } mPanZoomController.handleEvent(event, !allowDefaultAction); }
/** * Dispatch the event to the gesture detectors and the pan/zoom controller. */
Dispatch the event to the gesture detectors and the pan/zoom controller
dispatchEvent
{ "repo_name": "jrconlin/mc_backup", "path": "base/gfx/TouchEventHandler.java", "license": "mpl-2.0", "size": 14728 }
[ "android.view.MotionEvent" ]
import android.view.MotionEvent;
import android.view.*;
[ "android.view" ]
android.view;
2,070,158
public void testUpdate() { DefaultSemanticLabel in1 = new DefaultSemanticLabel("in1"); DefaultSemanticLabel in2 = new DefaultSemanticLabel("in2"); DefaultSemanticLabel in3 = new DefaultSemanticLabel("in3"); DefaultSemanticLabel out1 = new DefaultSemanticLabel("out1"); Def...
void function() { DefaultSemanticLabel in1 = new DefaultSemanticLabel("in1"); DefaultSemanticLabel in2 = new DefaultSemanticLabel("in2"); DefaultSemanticLabel in3 = new DefaultSemanticLabel("in3"); DefaultSemanticLabel out1 = new DefaultSemanticLabel("out1"); DefaultSemanticLabel out2 = new DefaultSemanticLabel("out2")...
/** * Test of update method, of class gov.sandia.cognition.framework.learning.StatefulEvaluatorBasedCognitiveModule. */
Test of update method, of class gov.sandia.cognition.framework.learning.StatefulEvaluatorBasedCognitiveModule
testUpdate
{ "repo_name": "codeaudit/Foundry", "path": "Components/FrameworkLearning/Test/gov/sandia/cognition/framework/learning/StatefulEvaluatorBasedCognitiveModuleTest.java", "license": "bsd-3-clause", "size": 10832 }
[ "gov.sandia.cognition.framework.CognitiveModel", "gov.sandia.cognition.framework.CogxelState", "gov.sandia.cognition.framework.DefaultSemanticLabel", "gov.sandia.cognition.framework.SemanticIdentifier", "gov.sandia.cognition.framework.SemanticIdentifierMap", "gov.sandia.cognition.framework.SemanticLabel",...
import gov.sandia.cognition.framework.CognitiveModel; import gov.sandia.cognition.framework.CogxelState; import gov.sandia.cognition.framework.DefaultSemanticLabel; import gov.sandia.cognition.framework.SemanticIdentifier; import gov.sandia.cognition.framework.SemanticIdentifierMap; import gov.sandia.cognition.framewor...
import gov.sandia.cognition.framework.*; import gov.sandia.cognition.framework.learning.converter.*; import gov.sandia.cognition.framework.lite.*; import gov.sandia.cognition.math.matrix.*; import gov.sandia.cognition.math.matrix.mtj.*; import gov.sandia.cognition.math.signals.*;
[ "gov.sandia.cognition" ]
gov.sandia.cognition;
2,530,991
public List<String> counterSpecifiers() { return this.counterSpecifiers; }
List<String> function() { return this.counterSpecifiers; }
/** * Get the counterSpecifiers property: A list of specifier names of the performance counters you want to collect. * Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run * the command 'typeperf'. * * @return the counterSpecifiers val...
Get the counterSpecifiers property: A list of specifier names of the performance counters you want to collect. Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'
counterSpecifiers
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/PerfCounterDataSource.java", "license": "mit", "size": 5478 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,609,766
public void printf(String format, Object value) { Object object; try { object = getProperty("out"); } catch (MissingPropertyException e) { DefaultGroovyMethods.printf(System.out, format, value); return; } InvokerHelper.invokeMethod(object...
void function(String format, Object value) { Object object; try { object = getProperty("out"); } catch (MissingPropertyException e) { DefaultGroovyMethods.printf(System.out, format, value); return; } InvokerHelper.invokeMethod(object, STR, new Object[] { format, value }); }
/** * Prints a formatted string using the specified format string and argument. * * @param format the format to follow * @param value the value to be formatted */
Prints a formatted string using the specified format string and argument
printf
{ "repo_name": "OpenBEL/bel-nav", "path": "tools/groovy/src/src/main/groovy/lang/Script.java", "license": "apache-2.0", "size": 7517 }
[ "org.codehaus.groovy.runtime.DefaultGroovyMethods", "org.codehaus.groovy.runtime.InvokerHelper" ]
import org.codehaus.groovy.runtime.DefaultGroovyMethods; import org.codehaus.groovy.runtime.InvokerHelper;
import org.codehaus.groovy.runtime.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
1,660,239
public void pause() { if (prepared && player.isPlaying()) { player.pause(); this.lastPaused = new Date(); stopProgressUpdater(); mediaSession.updatePlayState(STATE_PAUSED); rebuildNotification(false); } }
void function() { if (prepared && player.isPlaying()) { player.pause(); this.lastPaused = new Date(); stopProgressUpdater(); mediaSession.updatePlayState(STATE_PAUSED); rebuildNotification(false); } }
/** * Pause current playback. */
Pause current playback
pause
{ "repo_name": "salema/Podcatcher-Deluxe-Android-Studio", "path": "app/src/audioSimple/java/com/podcatcher/deluxe/services/PlayEpisodeService.java", "license": "gpl-3.0", "size": 24309 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,060,787
public void requestNodeNeighborUpdate(int nodeId) { this.enqueue(new RequestNodeNeighborUpdateMessageClass().doRequest(nodeId)); }
void function(int nodeId) { this.enqueue(new RequestNodeNeighborUpdateMessageClass().doRequest(nodeId)); }
/** * Request the node neighbor list to be updated for the specified node. Once * this is complete, the requestNodeRoutingInfo will be called automatically * to update the data in the binding. * * @param nodeId * The address of the node to update * */
Request the node neighbor list to be updated for the specified node. Once this is complete, the requestNodeRoutingInfo will be called automatically to update the data in the binding
requestNodeNeighborUpdate
{ "repo_name": "jongj/openhab2-addons", "path": "addons/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java", "license": "epl-1.0", "size": 55391 }
[ "org.openhab.binding.zwave.internal.protocol.serialmessage.RequestNodeNeighborUpdateMessageClass" ]
import org.openhab.binding.zwave.internal.protocol.serialmessage.RequestNodeNeighborUpdateMessageClass;
import org.openhab.binding.zwave.internal.protocol.serialmessage.*;
[ "org.openhab.binding" ]
org.openhab.binding;
458,554
public ServiceFuture<DetectorDefinitionInner> getSiteDetectorSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot, final ServiceCallback<DetectorDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(getSiteDetectorSlotWithServiceRes...
ServiceFuture<DetectorDefinitionInner> function(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot, final ServiceCallback<DetectorDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(getSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteN...
/** * Get Detector. * Description for Get Detector. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param siteName Site Name * @param diagnosticCategory Diagnostic Category * @param detectorName Detector Name * @param slot Slot Name ...
Get Detector. Description for Get Detector
getSiteDetectorSlotAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticsInner.java", "license": "mit", "size": 278784 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,268,952
@Nonnull default IMPLTYPE argOrNull (@Nonnegative final int nIndex, @Nullable final IJSExpression aArgument) { return aArgument == null ? argNull (nIndex) : arg (nIndex, aArgument); }
default IMPLTYPE argOrNull (@Nonnegative final int nIndex, @Nullable final IJSExpression aArgument) { return aArgument == null ? argNull (nIndex) : arg (nIndex, aArgument); }
/** * Add an expression to this invocation's argument list * * @param nIndex * Index to insert * @param aArgument * Argument to add to argument list * @return this */
Add an expression to this invocation's argument list
argOrNull
{ "repo_name": "phax/ph-oton", "path": "ph-oton-jscode/src/main/java/com/helger/html/jscode/IJSInvocation.java", "license": "apache-2.0", "size": 12478 }
[ "javax.annotation.Nonnegative", "javax.annotation.Nullable" ]
import javax.annotation.Nonnegative; import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,453,254
public static int execCmd(String cmd, LoggerInterface logger) throws Exception { logger.debug("executing: " + cmd); Process proc = Runtime.getRuntime().exec(cmd); // any error message? StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR", logger); StreamGobbler output...
static int function(String cmd, LoggerInterface logger) throws Exception { logger.debug(STR + cmd); Process proc = Runtime.getRuntime().exec(cmd); StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR", logger); StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), STR, logger); ...
/** * Execute a command on the system and report on logger. * * @param cmd * @param logger * @return Exit code. * @throws Exception */
Execute a command on the system and report on logger
execCmd
{ "repo_name": "dtag-dbu/speechalyzer", "path": "src/FelixUtil/src/com/felix/util/Util.java", "license": "lgpl-2.1", "size": 19087 }
[ "com.felix.util.logging.LoggerInterface" ]
import com.felix.util.logging.LoggerInterface;
import com.felix.util.logging.*;
[ "com.felix.util" ]
com.felix.util;
2,914,317
void registerListener(NetworkListener cl);
void registerListener(NetworkListener cl);
/** * Register a listener to get information about connection activities. */
Register a listener to get information about connection activities
registerListener
{ "repo_name": "abertschi/auto-web-auth", "path": "auto-web-auth-core-api/src/main/java/org/autowebauth/core/api/network/provider/NetworkProvider.java", "license": "gpl-2.0", "size": 900 }
[ "org.autowebauth.core.api.network.provider.conn.NetworkListener" ]
import org.autowebauth.core.api.network.provider.conn.NetworkListener;
import org.autowebauth.core.api.network.provider.conn.*;
[ "org.autowebauth.core" ]
org.autowebauth.core;
502,304