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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public MBeanNotificationInfo[] getNotificationInfo()
{
String[] notificationTypes = new String[] { MonitorNotification.THRESHOLD_VALUE_EXCEEDED };
String name = MonitorNotification.class.getName();
String description = "Per connection message processing rate threshold excee... | MBeanNotificationInfo[] function() { String[] notificationTypes = new String[] { MonitorNotification.THRESHOLD_VALUE_EXCEEDED }; String name = MonitorNotification.class.getName(); String description = STR; MBeanNotificationInfo info = new MBeanNotificationInfo(notificationTypes, name, description); return new MBeanNoti... | /**
* Returns metadata of the Notifications sent by this MBean.
*/ | Returns metadata of the Notifications sent by this MBean | getNotificationInfo | {
"repo_name": "akalankapagoda/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/server/virtualhost/AMQChannelMBean.java",
"license": "apache-2.0",
"size": 2137
} | [
"javax.management.MBeanNotificationInfo",
"javax.management.monitor.MonitorNotification"
] | import javax.management.MBeanNotificationInfo; import javax.management.monitor.MonitorNotification; | import javax.management.*; import javax.management.monitor.*; | [
"javax.management"
] | javax.management; | 1,847,633 |
private void deleteMessagesFromStore(int numberOfRetriesBefore) throws AndesException {
try {
messagingEngine.deleteMessages(messagesToRemove);
if (log.isTraceEnabled()) {
StringBuilder messageIDsString = new StringBuilder();
for (DeliverableAndesMeta... | void function(int numberOfRetriesBefore) throws AndesException { try { messagingEngine.deleteMessages(messagesToRemove); if (log.isTraceEnabled()) { StringBuilder messageIDsString = new StringBuilder(); for (DeliverableAndesMetadata metadata : messagesToRemove) { messageIDsString.append(metadata.getMessageID()).append(... | /**
* Delete acknowledged messages from message store. Deletion is retried if it failed due to a
* AndesTransactionRollbackException.
*
* @param numberOfRetriesBefore
* number of recursive calls
* @throws AndesException
*/ | Delete acknowledged messages from message store. Deletion is retried if it failed due to a AndesTransactionRollbackException | deleteMessagesFromStore | {
"repo_name": "indikasampath2000/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/disruptor/inbound/AckHandler.java",
"license": "apache-2.0",
"size": 7150
} | [
"org.wso2.andes.kernel.AndesException",
"org.wso2.andes.kernel.DeliverableAndesMetadata",
"org.wso2.andes.store.AndesTransactionRollbackException"
] | import org.wso2.andes.kernel.AndesException; import org.wso2.andes.kernel.DeliverableAndesMetadata; import org.wso2.andes.store.AndesTransactionRollbackException; | import org.wso2.andes.kernel.*; import org.wso2.andes.store.*; | [
"org.wso2.andes"
] | org.wso2.andes; | 1,969,808 |
Properties prop = new Properties();
InputStream is = null;
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
is = cl.getResourceAsStream(propertyFilePath);
Assert.notNull(is, "Failed to obtain InputStream for " + propertyFilePath);
prop.load(is);
resolveSystemPropertyPlaceholder... | Properties prop = new Properties(); InputStream is = null; ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { is = cl.getResourceAsStream(propertyFilePath); Assert.notNull(is, STR + propertyFilePath); prop.load(is); resolveSystemPropertyPlaceholders(prop); } catch (Exception e) { throw new IllegalSt... | /**
* Will create an instance of {@link Properties} object loaded from the properties file
* identified by the given <i>propertyFilePath</i> relative to the root of the classpath
*
* @param propertyFilePath path to the property file.
* @return
*/ | Will create an instance of <code>Properties</code> object loaded from the properties file identified by the given propertyFilePath relative to the root of the classpath | loadProperties | {
"repo_name": "hortonworks/dstream",
"path": "dstream-api/src/main/java/io/dstream/utils/PropertiesHelper.java",
"license": "apache-2.0",
"size": 2692
} | [
"java.io.InputStream",
"java.util.Properties"
] | import java.io.InputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,389,016 |
public static Subject createAnonymousSubject() {
Subject anonymousSubject = new Subject();
UserPrincipal userPrincipal = new UserPrincipal(ANONYMOUS_USER_NAME);
if (!anonymousSubject.getPrincipals().contains(userPrincipal)) {
anonymousSubject.getPrincipals().add(userPrincipal);
}
return anon... | static Subject function() { Subject anonymousSubject = new Subject(); UserPrincipal userPrincipal = new UserPrincipal(ANONYMOUS_USER_NAME); if (!anonymousSubject.getPrincipals().contains(userPrincipal)) { anonymousSubject.getPrincipals().add(userPrincipal); } return anonymousSubject; } | /**
* Creates an anonymous subject.
*
* @return a new anonymous subject.
*/ | Creates an anonymous subject | createAnonymousSubject | {
"repo_name": "maximehamm/jspresso-ce",
"path": "security/src/main/java/org/jspresso/framework/security/SecurityHelper.java",
"license": "lgpl-3.0",
"size": 4430
} | [
"javax.security.auth.Subject"
] | import javax.security.auth.Subject; | import javax.security.auth.*; | [
"javax.security"
] | javax.security; | 286,303 |
public void checkTrans(TransMeta transMeta, boolean only_selected) {
if (transMeta == null)
return;
TransGraph transGraph = delegates.trans.findTransGraphOfTransformation(transMeta);
if (transGraph == null)
return;
CheckTransProgressDialog ctpd = new CheckTransProgressDialog(shell,... | void function(TransMeta transMeta, boolean only_selected) { if (transMeta == null) return; TransGraph transGraph = delegates.trans.findTransGraphOfTransformation(transMeta); if (transGraph == null) return; CheckTransProgressDialog ctpd = new CheckTransProgressDialog(shell, transMeta, transGraph.getRemarks(), only_selec... | /**
* Check the steps in a transformation
*
* @param only_selected
* True: Check only the selected steps...
*/ | Check the steps in a transformation | checkTrans | {
"repo_name": "jjeb/kettle-trunk",
"path": "ui/src/org/pentaho/di/ui/spoon/Spoon.java",
"license": "apache-2.0",
"size": 320804
} | [
"org.pentaho.di.trans.TransMeta",
"org.pentaho.di.ui.spoon.dialog.CheckTransProgressDialog",
"org.pentaho.di.ui.spoon.trans.TransGraph"
] | import org.pentaho.di.trans.TransMeta; import org.pentaho.di.ui.spoon.dialog.CheckTransProgressDialog; import org.pentaho.di.ui.spoon.trans.TransGraph; | import org.pentaho.di.trans.*; import org.pentaho.di.ui.spoon.dialog.*; import org.pentaho.di.ui.spoon.trans.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,167,928 |
private ActionListener<Releasable> wrapPrimaryOperationPermitListener(final ActionListener<Releasable> listener) {
return ActionListener.delegateFailure(
listener,
(l, r) -> {
if (replicationTracker.isPrimaryMode()) {
l.onResponse(r... | ActionListener<Releasable> function(final ActionListener<Releasable> listener) { return ActionListener.delegateFailure( listener, (l, r) -> { if (replicationTracker.isPrimaryMode()) { l.onResponse(r); } else { r.close(); l.onFailure(new ShardNotInPrimaryModeException(shardId, state)); } }); } | /**
* Wraps the action to run on a primary after acquiring permit. This wrapping is used to check if the shard is in primary mode before
* executing the action.
*
* @param listener the listener to wrap
* @return the wrapped listener
*/ | Wraps the action to run on a primary after acquiring permit. This wrapping is used to check if the shard is in primary mode before executing the action | wrapPrimaryOperationPermitListener | {
"repo_name": "HonzaKral/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 171709
} | [
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.common.lease.Releasable"
] | import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.lease.Releasable; | import org.elasticsearch.action.*; import org.elasticsearch.common.lease.*; | [
"org.elasticsearch.action",
"org.elasticsearch.common"
] | org.elasticsearch.action; org.elasticsearch.common; | 982,357 |
@Override
public void processNullSessionPacket(Packet packet, NonAuthUserRepository repo,
Queue<Packet> results, Map<String, Object> settings)
throws PacketErrorTypeException {
if (packet.getType() == StanzaType.get) {
try {
String strvCard = repo.getPublicData(packet.getStanzaTo().getBareJID(), ID... | void function(Packet packet, NonAuthUserRepository repo, Queue<Packet> results, Map<String, Object> settings) throws PacketErrorTypeException { if (packet.getType() == StanzaType.get) { try { String strvCard = repo.getPublicData(packet.getStanzaTo().getBareJID(), ID, VCARD_KEY, null); if (strvCard != null) { results.of... | /**
* Method description
*
*
* @param packet
* @param repo
* @param results
* @param settings
*
* @throws PacketErrorTypeException
*/ | Method description | processNullSessionPacket | {
"repo_name": "f24-ag/tigase",
"path": "src/main/java/tigase/xmpp/impl/VCardTemp.java",
"license": "agpl-3.0",
"size": 10928
} | [
"java.util.Map",
"java.util.Queue"
] | import java.util.Map; import java.util.Queue; | import java.util.*; | [
"java.util"
] | java.util; | 1,536,992 |
public static Set<Statement> asStatements(Set<OWLAxiom> axioms) {
try {
OWLOntology ontology = OWLManager.createOWLOntologyManager().createOntology(axioms);
Model model = getModel(ontology);
return model.listStatements().toSet();
} catch (OWLOntologyCreationException e) {
throw new RuntimeException("... | static Set<Statement> function(Set<OWLAxiom> axioms) { try { OWLOntology ontology = OWLManager.createOWLOntologyManager().createOntology(axioms); Model model = getModel(ontology); return model.listStatements().toSet(); } catch (OWLOntologyCreationException e) { throw new RuntimeException(STR, e); } } | /**
* Convert OWL API OWL axioms into JENA API statements.
* @param axioms the OWL API axioms
* @return
*/ | Convert OWL API OWL axioms into JENA API statements | asStatements | {
"repo_name": "MaRoe/DL-Learner",
"path": "components-core/src/main/java/org/dllearner/utilities/OwlApiJenaUtils.java",
"license": "gpl-3.0",
"size": 3904
} | [
"com.hp.hpl.jena.rdf.model.Model",
"com.hp.hpl.jena.rdf.model.Statement",
"java.util.Set",
"org.semanticweb.owlapi.apibinding.OWLManager",
"org.semanticweb.owlapi.model.OWLAxiom",
"org.semanticweb.owlapi.model.OWLOntology",
"org.semanticweb.owlapi.model.OWLOntologyCreationException"
] | import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.Statement; import java.util.Set; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; | import com.hp.hpl.jena.rdf.model.*; import java.util.*; import org.semanticweb.owlapi.apibinding.*; import org.semanticweb.owlapi.model.*; | [
"com.hp.hpl",
"java.util",
"org.semanticweb.owlapi"
] | com.hp.hpl; java.util; org.semanticweb.owlapi; | 700,438 |
@Override
public List<RuleEvent> generateEvents() {
return new ArrayList<RuleEvent>();
} | List<RuleEvent> function() { return new ArrayList<RuleEvent>(); } | /**
* This overridden method returns an empty list always
*
* @see org.kuali.rice.krad.rules.rule.event.SaveDocumentEvent#generateEvents()
*/ | This overridden method returns an empty list always | generateEvents | {
"repo_name": "bhutchinson/rice",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/rules/rule/event/SaveOnlyDocumentEvent.java",
"license": "apache-2.0",
"size": 2333
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,062,564 |
EventExecutor executor();
/**
* The unique name of the {@link ChannelHandlerContext}.The name was used when then {@link ChannelHandler} | EventExecutor executor(); /** * The unique name of the {@link ChannelHandlerContext}.The name was used when then {@link ChannelHandler} | /**
* The {@link EventExecutor} that is used to dispatch the events. This can also be used to directly
* submit tasks that get executed in the event loop. For more informations please refer to the
* {@link EventExecutor} javadocs.
*/ | The <code>EventExecutor</code> that is used to dispatch the events. This can also be used to directly submit tasks that get executed in the event loop. For more informations please refer to the <code>EventExecutor</code> javadocs | executor | {
"repo_name": "menacher/netty",
"path": "transport/src/main/java/io/netty/channel/ChannelHandlerContext.java",
"license": "apache-2.0",
"size": 10055
} | [
"io.netty.util.concurrent.EventExecutor"
] | import io.netty.util.concurrent.EventExecutor; | import io.netty.util.concurrent.*; | [
"io.netty.util"
] | io.netty.util; | 360,484 |
public void setErrorReporter(ErrorReporter reporter); | void function(ErrorReporter reporter); | /**
* Register an error reporter with the engine so that any errors generated
* by the node's internals can be reported in a nice, pretty fashion.
* Setting a value of null will clear the currently set reporter. If one
* is already set, the new value replaces the old.
*
* @param reporter T... | Register an error reporter with the engine so that any errors generated by the node's internals can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old | setErrorReporter | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "aviatrix3d/src/java/org/j3d/aviatrix3d/management/RenderManager.java",
"license": "gpl-2.0",
"size": 9136
} | [
"org.j3d.util.ErrorReporter"
] | import org.j3d.util.ErrorReporter; | import org.j3d.util.*; | [
"org.j3d.util"
] | org.j3d.util; | 1,317,760 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<FirewallRuleInner>> getWithResponseAsync(
String resourceGroupName, String serverName, String firewallRuleName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new Ill... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<FirewallRuleInner>> function( String resourceGroupName, String serverName, String firewallRuleName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .... | /**
* List all the firewall rules in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param firewallRuleName The name of the server firewall rule.
* @throws IllegalArgumentException thr... | List all the firewall rules in a given server | getWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java",
"license": "mit",
"size": 55055
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,048,186 |
@Override
public People downloadModel(String userId) {
People people = null;
try {
people = Flickr.getInstance().findPeopleByUserId(userId);
mCache.put(userId, new SoftReference<>(people));
} catch (IOException e) {
Log.d(TAG, "Failed to fetch the pe... | People function(String userId) { People people = null; try { people = Flickr.getInstance().findPeopleByUserId(userId); mCache.put(userId, new SoftReference<>(people)); } catch (IOException e) { Log.d(TAG, STR); e.printStackTrace(); } return people; } | /**
* Fetch a people
* @param userId user id
* @return a people instance
*/ | Fetch a people | downloadModel | {
"repo_name": "TwentySevenC/Flickr-Photos",
"path": "FlichrPhotos/app/src/main/java/com/android/liujian/flichrphotos/control/PeopleDownloader.java",
"license": "lgpl-3.0",
"size": 5489
} | [
"android.util.Log",
"com.android.liujian.flichrphotos.model.People",
"java.io.IOException",
"java.lang.ref.SoftReference"
] | import android.util.Log; import com.android.liujian.flichrphotos.model.People; import java.io.IOException; import java.lang.ref.SoftReference; | import android.util.*; import com.android.liujian.flichrphotos.model.*; import java.io.*; import java.lang.ref.*; | [
"android.util",
"com.android.liujian",
"java.io",
"java.lang"
] | android.util; com.android.liujian; java.io; java.lang; | 2,404,657 |
public boolean createTopic(int p_gameId, String p_topicName, LocalDate p_date)
{
String insertUserData = "INSERT INTO topics (F_gameId, topicName, dateCreated) VALUES (?, ?, ?)";
int affectedRows = -1;
try
{
PreparedStatement statement = m_connection.prepareSt... | boolean function(int p_gameId, String p_topicName, LocalDate p_date) { String insertUserData = STR; int affectedRows = -1; try { PreparedStatement statement = m_connection.prepareStatement(insertUserData); statement.setInt(1, p_gameId); statement.setString(2, p_topicName); statement.setDate(3, java.sql.Date.valueOf(p_d... | /**
* Create a new topic in the database
* @param p_topic
* @return True if we have successfully entered the game into the DB, false if not.
*/ | Create a new topic in the database | createTopic | {
"repo_name": "mirrormind/mo-test-eam",
"path": "mo-test-eam/src/moeam/db/query/QueryTopic.java",
"license": "apache-2.0",
"size": 4854
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.time.LocalDate"
] | import java.sql.PreparedStatement; import java.sql.SQLException; import java.time.LocalDate; | import java.sql.*; import java.time.*; | [
"java.sql",
"java.time"
] | java.sql; java.time; | 2,511,692 |
static @Nullable Response maybeRedirectToCanonicalUri(BaseUrls baseUrls, UriInfo uriInfo) {
if (!baseUrls.canonicalBaseUri().isPresent()) {
return null; // nothing to do
}
if (uriInfo.getBaseUri().equals(baseUrls.canonicalBaseUri().get())) {
return null; // we're already on the canonical base ... | static @Nullable Response maybeRedirectToCanonicalUri(BaseUrls baseUrls, UriInfo uriInfo) { if (!baseUrls.canonicalBaseUri().isPresent()) { return null; } if (uriInfo.getBaseUri().equals(baseUrls.canonicalBaseUri().get())) { return null; } URI relativeUri = uriInfo.getBaseUri().relativize(uriInfo.getRequestUri()); URI ... | /**
* Returns a {@link Response} redirecting to the canonical URI for the given {@code UriInfo},
* or {@code null} if it already is canonical.
*/ | Returns a <code>Response</code> redirecting to the canonical URI for the given UriInfo, or null if it already is canonical | maybeRedirectToCanonicalUri | {
"repo_name": "ozwillo/ozwillo-kernel",
"path": "oasis-webapp/src/main/java/oasis/web/authn/UserCanonicalBaseUriFilter.java",
"license": "agpl-3.0",
"size": 2405
} | [
"javax.annotation.Nullable",
"javax.ws.rs.core.Response",
"javax.ws.rs.core.UriInfo"
] | import javax.annotation.Nullable; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; | import javax.annotation.*; import javax.ws.rs.core.*; | [
"javax.annotation",
"javax.ws"
] | javax.annotation; javax.ws; | 845,350 |
InputStream resolve(String documentId) throws XDSDocumentResolutionException; | InputStream resolve(String documentId) throws XDSDocumentResolutionException; | /**
* Resolves a document ID to an InputStream
*
* @param documentId the document ID
* @return the InputStream
* @throws XDSDocumentResolutionException on error
*/ | Resolves a document ID to an InputStream | resolve | {
"repo_name": "NCIP/cacis",
"path": "nav/src/main/java/gov/nih/nci/cacis/nav/XDSDocumentResolver.java",
"license": "bsd-3-clause",
"size": 886
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,386,818 |
private void persistAenderungsanfrage(
final CidsBean aenderungsanfrageBean,
final StacEntry stacEntry,
final AenderungsanfrageJson aenderungsanfrageProcessed,
final Integer kassenzeichennumer,
final AenderungsanfrageUtils.Status status,
final ... | void function( final CidsBean aenderungsanfrageBean, final StacEntry stacEntry, final AenderungsanfrageJson aenderungsanfrageProcessed, final Integer kassenzeichennumer, final AenderungsanfrageUtils.Status status, final boolean aenderungsanfrageAlreadyExists) throws Exception { aenderungsanfrageBean.setProperty( Verdis... | /**
* DOCUMENT ME!
*
* @param aenderungsanfrageBean DOCUMENT ME!
* @param stacEntry DOCUMENT ME!
* @param aenderungsanfrageProcessed DOCUMENT ME!
* @param kassenzeichennumer DOCUMENT ME!
* @param status ... | DOCUMENT ME | persistAenderungsanfrage | {
"repo_name": "cismet/verdis-server",
"path": "src/main/java/de/cismet/verdis/server/action/KassenzeichenChangeRequestServerAction.java",
"license": "lgpl-3.0",
"size": 22163
} | [
"de.cismet.cids.dynamics.CidsBean",
"de.cismet.verdis.commons.constants.VerdisConstants",
"de.cismet.verdis.server.json.AenderungsanfrageJson",
"de.cismet.verdis.server.utils.AenderungsanfrageUtils",
"de.cismet.verdis.server.utils.StacEntry",
"java.sql.Timestamp",
"java.util.Date"
] | import de.cismet.cids.dynamics.CidsBean; import de.cismet.verdis.commons.constants.VerdisConstants; import de.cismet.verdis.server.json.AenderungsanfrageJson; import de.cismet.verdis.server.utils.AenderungsanfrageUtils; import de.cismet.verdis.server.utils.StacEntry; import java.sql.Timestamp; import java.util.Date; | import de.cismet.cids.dynamics.*; import de.cismet.verdis.commons.constants.*; import de.cismet.verdis.server.json.*; import de.cismet.verdis.server.utils.*; import java.sql.*; import java.util.*; | [
"de.cismet.cids",
"de.cismet.verdis",
"java.sql",
"java.util"
] | de.cismet.cids; de.cismet.verdis; java.sql; java.util; | 2,378,643 |
private void setTabsFromSettings() {
ArrayList<TabSettings> tabArray = view.getSettings().getTabArray();
if (tabArray.size() == 0) {
// Don't have anything yet. Just draw a new tab with default vals
addTab(new TabSettings(view.getSettings()));
} else {
for (TabSettings tabSettings : tabArray) {
ad... | void function() { ArrayList<TabSettings> tabArray = view.getSettings().getTabArray(); if (tabArray.size() == 0) { addTab(new TabSettings(view.getSettings())); } else { for (TabSettings tabSettings : tabArray) { addTab(tabSettings); } } } | /**
* Load all tabs defined in our settings object, and load them
*/ | Load all tabs defined in our settings object, and load them | setTabsFromSettings | {
"repo_name": "JervenBolleman/yasgui",
"path": "src/main/java/com/data2semantics/yasgui/client/QueryTabs.java",
"license": "mit",
"size": 13449
} | [
"com.data2semantics.yasgui.client.settings.TabSettings",
"java.util.ArrayList"
] | import com.data2semantics.yasgui.client.settings.TabSettings; import java.util.ArrayList; | import com.data2semantics.yasgui.client.settings.*; import java.util.*; | [
"com.data2semantics.yasgui",
"java.util"
] | com.data2semantics.yasgui; java.util; | 2,000,690 |
public static String encodeToString(byte[] input, int flags) {
try {
return new String(encode(input, flags), "US-ASCII");
} catch (UnsupportedEncodingException e) {
// US-ASCII is guaranteed to be available.
throw new AssertionError(e);
}
} | static String function(byte[] input, int flags) { try { return new String(encode(input, flags), STR); } catch (UnsupportedEncodingException e) { throw new AssertionError(e); } } | /**
* Base64-encode the given data and return a newly allocated
* String with the result.
*
* @param input the data to encode
* @param flags controls certain features of the encoded output.
* Passing {@code DEFAULT} results in output that
* adheres to RFC... | Base64-encode the given data and return a newly allocated String with the result | encodeToString | {
"repo_name": "BranchMetrics/android-branch-deep-linking",
"path": "Branch-SDK/src/main/java/io/branch/referral/Base64.java",
"license": "mit",
"size": 28829
} | [
"java.io.UnsupportedEncodingException"
] | import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 2,202,594 |
public static ThrottlingPolicyListDTO fromTierListToDTO(List<Tier> throttlingPolicyList, String policyLevel, int limit,
int offset) {
ThrottlingPolicyListDTO throttlingPolicyListDTO = new ThrottlingPolicyListDTO();
List<ThrottlingPolicyDTO... | static ThrottlingPolicyListDTO function(List<Tier> throttlingPolicyList, String policyLevel, int limit, int offset) { ThrottlingPolicyListDTO throttlingPolicyListDTO = new ThrottlingPolicyListDTO(); List<ThrottlingPolicyDTO> throttlingPolicyDTOs = throttlingPolicyListDTO.getList(); if (throttlingPolicyDTOs == null) { t... | /**
* Converts a List object of Tiers into a DTO
*
* @param throttlingPolicyList a list of Tier objects
* @param policyLevel the policy level(eg: application or subscription)
* @param limit max number of objects returned
* @param offset starting index
... | Converts a List object of Tiers into a DTO | fromTierListToDTO | {
"repo_name": "pubudu538/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/mappings/ThrottlingPolicyMappingUtil.java",
"license": "apache-2.0",
"size": 7283
} | [
"java.util.ArrayList",
"java.util.List",
"org.wso2.carbon.apimgt.api.model.Tier",
"org.wso2.carbon.apimgt.rest.api.store.v1.dto.ThrottlingPolicyDTO",
"org.wso2.carbon.apimgt.rest.api.store.v1.dto.ThrottlingPolicyListDTO"
] | import java.util.ArrayList; import java.util.List; import org.wso2.carbon.apimgt.api.model.Tier; import org.wso2.carbon.apimgt.rest.api.store.v1.dto.ThrottlingPolicyDTO; import org.wso2.carbon.apimgt.rest.api.store.v1.dto.ThrottlingPolicyListDTO; | import java.util.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.rest.api.store.v1.dto.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 2,371,676 |
private void setItemsArray(@ArrayRes int arrayResId, @LayoutRes int spinnerItemRes, @LayoutRes int dropdownViewRes) {
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
getContext(),
arrayResId,
spinnerItemRes);
adapter.setDropDownVi... | void function(@ArrayRes int arrayResId, @LayoutRes int spinnerItemRes, @LayoutRes int dropdownViewRes) { ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( getContext(), arrayResId, spinnerItemRes); adapter.setDropDownViewResource(dropdownViewRes); mSpinner.setAdapter(adapter); } | /**
* A private helper method to set the array of items to be used in the
* Spinner.
*
* @param arrayResId The identifier of the array to use as the data
* source (e.g. R.array.myArray)
* @param spinnerItemRes The identifier of the layout used to create
* ... | A private helper method to set the array of items to be used in the Spinner | setItemsArray | {
"repo_name": "weslly99/glucosio-android",
"path": "app/src/main/java/org/glucosio/android/tools/LabelledSpinner.java",
"license": "gpl-3.0",
"size": 13970
} | [
"android.support.annotation.ArrayRes",
"android.support.annotation.LayoutRes",
"android.widget.ArrayAdapter"
] | import android.support.annotation.ArrayRes; import android.support.annotation.LayoutRes; import android.widget.ArrayAdapter; | import android.support.annotation.*; import android.widget.*; | [
"android.support",
"android.widget"
] | android.support; android.widget; | 319,696 |
void setLines(List<String> value); | void setLines(List<String> value); | /**
* Sets the value of the '{@link fr.jmini.eadoc.EBlock#getLines <em>Lines</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Lines</em>' attribute.
* @see #getLines()
* @generated
*/ | Sets the value of the '<code>fr.jmini.eadoc.EBlock#getLines Lines</code>' attribute. | setLines | {
"repo_name": "jmini/asciidoctorj-experiments",
"path": "eadoc/src/main/java-gen/fr/jmini/eadoc/EBlock.java",
"license": "apache-2.0",
"size": 2884
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,753,420 |
//-----------------------------------------------------------------------
public Instant getTimeOverride() {
return _timeOverride;
} | Instant function() { return _timeOverride; } | /**
* Gets the time override.
* @return the value of the property
*/ | Gets the time override | getTimeOverride | {
"repo_name": "McLeodMoores/starling",
"path": "projects/master-db/src/main/java/com/opengamma/masterdb/TimeOverrideRequest.java",
"license": "apache-2.0",
"size": 5916
} | [
"org.threeten.bp.Instant"
] | import org.threeten.bp.Instant; | import org.threeten.bp.*; | [
"org.threeten.bp"
] | org.threeten.bp; | 1,037,671 |
protected final URL getResource(String subPath) {
//TODO check the viability of this method
URL url;
url = this.getClass().getResource(subPath);
if(null==url) {
String qualifiedPath = this.getClass().getPackage().getName().replace('.','/') + "/";
url = this.getClass().getClassLoader()... | final URL function(String subPath) { URL url; url = this.getClass().getResource(subPath); if(null==url) { String qualifiedPath = this.getClass().getPackage().getName().replace('.','/') + "/"; url = this.getClass().getClassLoader().getResource(qualifiedPath+subPath); } if(url==null) { throw new IllegalArgumentException(... | /**
* Retrieve a URL of a resource associated with this class.
* @param subPath path to the resource
* @return returns the url of the resource
* @throws IllegalArgumentException if the path cannot be found
*/ | Retrieve a URL of a resource associated with this class | getResource | {
"repo_name": "daisy/pipeline-issues",
"path": "libs/dotify/dotify.translator.impl/src/org/daisy/dotify/translator/impl/sv_SE/SwedishBrailleFilter.java",
"license": "apache-2.0",
"size": 3425
} | [
"org.daisy.dotify.common.text.StringFilter"
] | import org.daisy.dotify.common.text.StringFilter; | import org.daisy.dotify.common.text.*; | [
"org.daisy.dotify"
] | org.daisy.dotify; | 1,849,287 |
protected void loadOfferings(Element offeringsEl, Map<Long, Offering> offeringTable, Map<Long, Course> courseTable, Map<Long, Placement> timetable) {
HashMap<Long, Config> configTable = new HashMap<Long, Config>();
HashMap<Long, Subpart> subpartTable = new HashMap<Long, Subpart>();
HashMap<L... | void function(Element offeringsEl, Map<Long, Offering> offeringTable, Map<Long, Course> courseTable, Map<Long, Placement> timetable) { HashMap<Long, Config> configTable = new HashMap<Long, Config>(); HashMap<Long, Subpart> subpartTable = new HashMap<Long, Subpart>(); HashMap<Long, Section> sectionTable = new HashMap<Lo... | /**
* Load offerings
* @param offeringsEl offerings element
* @param offeringTable offering table
* @param courseTable course table
* @param timetable provided timetable (null if to be loaded from the given document)
*/ | Load offerings | loadOfferings | {
"repo_name": "UniTime/cpsolver",
"path": "src/org/cpsolver/studentsct/StudentSectioningXMLLoader.java",
"license": "lgpl-3.0",
"size": 63607
} | [
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map",
"org.cpsolver.coursett.model.Placement",
"org.cpsolver.studentsct.model.Config",
"org.cpsolver.studentsct.model.Course",
"org.cpsolver.studentsct.model.Offering",
"org.cpsolver.studentsct.model.Section",
"org.cpsolver.studentsct.model.Subpa... | import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.cpsolver.coursett.model.Placement; import org.cpsolver.studentsct.model.Config; import org.cpsolver.studentsct.model.Course; import org.cpsolver.studentsct.model.Offering; import org.cpsolver.studentsct.model.Section; import org.cpsol... | import java.util.*; import org.cpsolver.coursett.model.*; import org.cpsolver.studentsct.model.*; import org.dom4j.*; | [
"java.util",
"org.cpsolver.coursett",
"org.cpsolver.studentsct",
"org.dom4j"
] | java.util; org.cpsolver.coursett; org.cpsolver.studentsct; org.dom4j; | 293,235 |
StringBuffer format(
final double value,
final boolean writeUnits,
final Locale locale,
StringBuffer buffer) {
return buffer.append(value);
} | StringBuffer format( final double value, final boolean writeUnits, final Locale locale, StringBuffer buffer) { return buffer.append(value); } | /**
* Format the specified value using the specified locale convention.
*
* @param value The value to format.
* @param writeUnits {@code true} if unit symbol should be formatted after the number. Ignored
* if this category list has no unit.
* @param locale The locale, or {@code null} f... | Format the specified value using the specified locale convention | format | {
"repo_name": "geotools/geotools",
"path": "modules/library/coverage/src/main/java/org/geotools/coverage/CategoryList.java",
"license": "lgpl-2.1",
"size": 32378
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,600,615 |
static int _lcmp(long value1, long value2) throws InterpreterInvokedPragma {
if (value1 > value2) {
return 1;
}
if (value1 == value2) {
return 0;
}
return -1;
} | static int _lcmp(long value1, long value2) throws InterpreterInvokedPragma { if (value1 > value2) { return 1; } if (value1 == value2) { return 0; } return -1; } | /**
* Execute the equivalent of the JVMS lcmp instruction.
*
* @param value1 the value1 operand
* @param value2 the value2 operand
* @return 0, 1, or -1 according to the spec
*/ | Execute the equivalent of the JVMS lcmp instruction | _lcmp | {
"repo_name": "nejads/MqttMoped",
"path": "squawk/cldc/src/com/sun/squawk/VM.java",
"license": "gpl-2.0",
"size": 178144
} | [
"com.sun.squawk.pragma.InterpreterInvokedPragma"
] | import com.sun.squawk.pragma.InterpreterInvokedPragma; | import com.sun.squawk.pragma.*; | [
"com.sun.squawk"
] | com.sun.squawk; | 2,517,863 |
public ItemLabelPosition getBaseNegativeItemLabelPosition() {
return this.baseNegativeItemLabelPosition;
} | ItemLabelPosition function() { return this.baseNegativeItemLabelPosition; } | /**
* Returns the base item label position for negative values.
*
* @return The position (never <code>null</code>).
*
* @see #setBaseNegativeItemLabelPosition(ItemLabelPosition)
*/ | Returns the base item label position for negative values | getBaseNegativeItemLabelPosition | {
"repo_name": "djun100/afreechart",
"path": "src/org/afree/chart/renderer/AbstractRenderer.java",
"license": "lgpl-3.0",
"size": 122597
} | [
"org.afree.chart.labels.ItemLabelPosition"
] | import org.afree.chart.labels.ItemLabelPosition; | import org.afree.chart.labels.*; | [
"org.afree.chart"
] | org.afree.chart; | 420,030 |
public void setDateTimeFormat( String format ) throws SemanticException; | void function( String format ) throws SemanticException; | /**
* Sets date time format
*
* @param format
* @throws SemanticException
*/ | Sets date time format | setDateTimeFormat | {
"repo_name": "sguan-actuate/birt",
"path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/simpleapi/IHighlightRule.java",
"license": "epl-1.0",
"size": 3343
} | [
"org.eclipse.birt.report.model.api.activity.SemanticException"
] | import org.eclipse.birt.report.model.api.activity.SemanticException; | import org.eclipse.birt.report.model.api.activity.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 258,544 |
public Map<String, String> getHeadersAsAttribute() {
return headers;
}
| Map<String, String> function() { return headers; } | /**
* Return the headers as attributes which spamd generates
*
* @return headers Map of headers to add as attributes
*/ | Return the headers as attributes which spamd generates | getHeadersAsAttribute | {
"repo_name": "svn2github/hwmail-mirror",
"path": "hedwig-server/src/main/java/com/hs/mail/mailet/SpamAssassinInvoker.java",
"license": "apache-2.0",
"size": 5093
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,876,736 |
private boolean hasEnoughResources(Map<Integer, Number> neededResources) {
boolean result = true;
if (vehicle != null) {
for (Map.Entry<Integer, Number> entry : neededResources.entrySet()) {
int id = entry.getKey();
Object value = entry.getValue();
if (id < ResourceUtil.FIRST_ITEM_RESO... | boolean function(Map<Integer, Number> neededResources) { boolean result = true; if (vehicle != null) { for (Map.Entry<Integer, Number> entry : neededResources.entrySet()) { int id = entry.getKey(); Object value = entry.getValue(); if (id < ResourceUtil.FIRST_ITEM_RESOURCE_ID) { double amount = (Double) value; double am... | /**
* Checks if there are enough resources available in the vehicle.
*
* @param neededResources map of amount and item resources and their Double
* amount or Integer number.
* @return true if enough resources.
*/ | Checks if there are enough resources available in the vehicle | hasEnoughResources | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/VehicleMission.java",
"license": "gpl-3.0",
"size": 54214
} | [
"java.util.Map",
"java.util.logging.Level",
"org.mars_sim.msp.core.resource.ItemResourceUtil",
"org.mars_sim.msp.core.resource.ResourceUtil"
] | import java.util.Map; import java.util.logging.Level; import org.mars_sim.msp.core.resource.ItemResourceUtil; import org.mars_sim.msp.core.resource.ResourceUtil; | import java.util.*; import java.util.logging.*; import org.mars_sim.msp.core.resource.*; | [
"java.util",
"org.mars_sim.msp"
] | java.util; org.mars_sim.msp; | 1,631,494 |
ByteArrayOutputStream decompress(InputStream inputStream); | ByteArrayOutputStream decompress(InputStream inputStream); | /**
* Does the decompression of an InputStream.
* @param inputStream the {@link InputStream} that will be decompressed.
* @return a ByteArrayOutputStream containing the decompressed information
*/ | Does the decompression of an InputStream | decompress | {
"repo_name": "nagyistoce/Wilma",
"path": "wilma-application/modules/wilma-compression/src/main/java/com/epam/wilma/compression/CompressionService.java",
"license": "gpl-3.0",
"size": 1617
} | [
"java.io.ByteArrayOutputStream",
"java.io.InputStream"
] | import java.io.ByteArrayOutputStream; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,762,064 |
public synchronized void close() throws IOException {
try {
super.close();
}
finally {
if ( m_file != null ) {
//
// We have to set m_file to null so this code will never be
// called more than once per file.
... | synchronized void function() throws IOException { try { super.close(); } finally { if ( m_file != null ) { m_file = null; m_owningCache.notifyAboutCloseOf( temp ); } } } FileCacheOutputStream( File file, FileCache owningCache ) throws FileNotFoundException { super( file ); m_file = file; m_owningCache = owningCache; } ... | /**
* Close the underlying {@link FileOutputStream}, then notify the owning
* {@link FileCache} that an output file was closed.
*/ | Close the underlying <code>FileOutputStream</code>, then notify the owning <code>FileCache</code> that an output file was closed | close | {
"repo_name": "MarinnaCole/LightZone",
"path": "lightcrafts/src/com/lightcrafts/utils/filecache/FileCacheOutputStream.java",
"license": "bsd-3-clause",
"size": 2553
} | [
"java.io.File",
"java.io.FileNotFoundException",
"java.io.IOException"
] | import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 350,411 |
public Observable<ServiceResponse<Page<PolicyAssignmentInner>>> listSinglePageAsync(final String filter) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.a... | Observable<ServiceResponse<Page<PolicyAssignmentInner>>> function(final String filter) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException(STR); } | /**
* Gets all the policy assignments for a subscription.
*
ServiceResponse<PageImpl<PolicyAssignmentInner>> * @param filter The filter to apply on the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<PolicyAssignmentInner> obje... | Gets all the policy assignments for a subscription | listSinglePageAsync | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentsInner.java",
"license": "mit",
"size": 105191
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,997,996 |
public void setCredit(ScaleTwoDecimal credit) {
this.credit = credit != null ? credit : new ScaleTwoDecimal(0);
} | void function(ScaleTwoDecimal credit) { this.credit = credit != null ? credit : new ScaleTwoDecimal(0); } | /**
* Sets the value of credit
*
* @param argCredit Value to assign to this.credit
*/ | Sets the value of credit | setCredit | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/kra/institutionalproposal/contacts/InstitutionalProposalPersonUnitCreditSplit.java",
"license": "apache-2.0",
"size": 7533
} | [
"org.kuali.coeus.sys.api.model.ScaleTwoDecimal"
] | import org.kuali.coeus.sys.api.model.ScaleTwoDecimal; | import org.kuali.coeus.sys.api.model.*; | [
"org.kuali.coeus"
] | org.kuali.coeus; | 519,090 |
private static SOAPEnvelope createEnvelope(SOAPPart soapPart) throws SOAPException {
SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
addNamespaceDeclaration(soapEnvelope);
setEncodingStyle(soapEnvelope);
return soapEnvelope;
} | static SOAPEnvelope function(SOAPPart soapPart) throws SOAPException { SOAPEnvelope soapEnvelope = soapPart.getEnvelope(); addNamespaceDeclaration(soapEnvelope); setEncodingStyle(soapEnvelope); return soapEnvelope; } | /**
* Creates SOAP envelope and adds namespace declaration and sets encoding
* style
*
* @param soapPart
* the message part
* @return the SOAP envelope
* @throws SOAPException
*/ | Creates SOAP envelope and adds namespace declaration and sets encoding style | createEnvelope | {
"repo_name": "PaulLuchyn/libreplan",
"path": "libreplan-webapp/src/main/java/org/libreplan/importers/TimSoapClient.java",
"license": "agpl-3.0",
"size": 11052
} | [
"javax.xml.soap.SOAPEnvelope",
"javax.xml.soap.SOAPException",
"javax.xml.soap.SOAPPart"
] | import javax.xml.soap.SOAPEnvelope; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPPart; | import javax.xml.soap.*; | [
"javax.xml"
] | javax.xml; | 1,777,516 |
protected void addInput__iDontCheckInputPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CtrlUnit38_Input__iDontCheckInput_feature"),
g... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), WTSpecPackage.eINSTANCE.getCtrlUnit38_Input__iDontCheckInput(), true, false, true, null, null, nu... | /**
* This adds a property descriptor for the Input iDont Check Input feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Input iDont Check Input feature. | addInput__iDontCheckInputPropertyDescriptor | {
"repo_name": "FTSRG/mondo-collab-framework",
"path": "archive/workspaceTracker/VA/ikerlanEMF.edit/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/provider/CtrlUnit38ItemProvider.java",
"license": "epl-1.0",
"size": 8446
} | [
"eu.mondo.collaboration.operationtracemodel.example.WTSpec",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory"
] | import eu.mondo.collaboration.operationtracemodel.example.WTSpec; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | import eu.mondo.collaboration.operationtracemodel.example.*; import org.eclipse.emf.edit.provider.*; | [
"eu.mondo.collaboration",
"org.eclipse.emf"
] | eu.mondo.collaboration; org.eclipse.emf; | 2,677,173 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> reapplyAsync(String resourceGroupName, String vmName) {
return beginReapplyAsync(resourceGroupName, vmName).last().flatMap(this.client::getLroFinalResultOrError);
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String resourceGroupName, String vmName) { return beginReapplyAsync(resourceGroupName, vmName).last().flatMap(this.client::getLroFinalResultOrError); } | /**
* The operation to reapply a virtual machine's state.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ApiErrorException thrown if the req... | The operation to reapply a virtual machine's state | reapplyAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java",
"license": "mit",
"size": 333925
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 902,674 |
public DJBar3DChartBuilder setTitleColor(Color titleColor) {
this.chart.getOptions().setTitleColor(titleColor);
return this;
}
| DJBar3DChartBuilder function(Color titleColor) { this.chart.getOptions().setTitleColor(titleColor); return this; } | /**
* Sets the title color.
*
* @param titleColor the title color
**/ | Sets the title color | setTitleColor | {
"repo_name": "FDVSolutions/DynamicJasper",
"path": "src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJBar3DChartBuilder.java",
"license": "lgpl-3.0",
"size": 12953
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,477,345 |
private void addEmailList(Collection emailList, Collection userList) {
if ((emailList != null) && (userList != null)) {
Iterator iter = userList.iterator();
while (iter.hasNext()) {
try {
UserDTO user = (UserDTO) iter.next();
addEmailList(emailList, user);
} catch (ClassCastException cce) ... | void function(Collection emailList, Collection userList) { if ((emailList != null) && (userList != null)) { Iterator iter = userList.iterator(); while (iter.hasNext()) { try { UserDTO user = (UserDTO) iter.next(); addEmailList(emailList, user); } catch (ClassCastException cce) { } } } } | /**
* Method to add an email list
*
* @param emailList
* @param userList
*/ | Method to add an email list | addEmailList | {
"repo_name": "CentOps-TechMahindra/CentOps",
"path": "PSDashboard/src/com/techm/psd/email/bo/PSDMailer.java",
"license": "mit",
"size": 10226
} | [
"com.techm.psd.common.dto.UserDTO",
"java.util.Collection",
"java.util.Iterator"
] | import com.techm.psd.common.dto.UserDTO; import java.util.Collection; import java.util.Iterator; | import com.techm.psd.common.dto.*; import java.util.*; | [
"com.techm.psd",
"java.util"
] | com.techm.psd; java.util; | 2,100,678 |
public void writeToNBT(NBTTagCompound nbttagcompound) {
NBTTagList tlist = new NBTTagList();
nbttagcompound.setTag("Aspects", tlist);
for (Aspect aspect : getAspects())
if (aspect != null) {
NBTTagCompound f = new NBTTagCompound();
f.setString("key... | void function(NBTTagCompound nbttagcompound) { NBTTagList tlist = new NBTTagList(); nbttagcompound.setTag(STR, tlist); for (Aspect aspect : getAspects()) if (aspect != null) { NBTTagCompound f = new NBTTagCompound(); f.setString("key", aspect.getTag()); f.setInteger(STR, getAmount(aspect)); tlist.appendTag(f); } } | /**
* Writes the list of aspects to nbt
*
* @param nbttagcompound
* @return
*/ | Writes the list of aspects to nbt | writeToNBT | {
"repo_name": "yolp900/ItsJustaCharmOutdated",
"path": "src/api/java/thaumcraft/api/aspects/AspectList.java",
"license": "gpl-2.0",
"size": 8637
} | [
"net.minecraft.nbt.NBTTagCompound",
"net.minecraft.nbt.NBTTagList"
] | import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; | import net.minecraft.nbt.*; | [
"net.minecraft.nbt"
] | net.minecraft.nbt; | 1,271,357 |
DMatrixRMaj getState(); | DMatrixRMaj getState(); | /**
* Returns the current estimated state of the system.
*
* @return The state.
*/ | Returns the current estimated state of the system | getState | {
"repo_name": "lessthanoptimal/ejml",
"path": "examples/src/org/ejml/example/KalmanFilter.java",
"license": "apache-2.0",
"size": 2329
} | [
"org.ejml.data.DMatrixRMaj"
] | import org.ejml.data.DMatrixRMaj; | import org.ejml.data.*; | [
"org.ejml.data"
] | org.ejml.data; | 1,037,730 |
public final List getDependencies() {
return this.dependencies;
} | final List function() { return this.dependencies; } | /**
* Gets the List of module dependencies (containing Strings).
*
* @return dependency List
*/ | Gets the List of module dependencies (containing Strings) | getDependencies | {
"repo_name": "chirkovmail/vfs-maven-plugin",
"path": "src/main/java/com/comundus/opencms/vfs/conf/Module.java",
"license": "lgpl-2.1",
"size": 6792
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,194,946 |
@Override
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
super.looseUnmarshal(wireFormat, o, dataIn);
SubscriptionInfo info = (SubscriptionInfo) o;
info.setClientId(looseUnmarshalString(dataIn));
info.setDestination((OpenWi... | void function(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); SubscriptionInfo info = (SubscriptionInfo) o; info.setClientId(looseUnmarshalString(dataIn)); info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); i... | /**
* Un-marshal an object instance from the data input stream
*
* @param o
* the object to un-marshal
* @param dataIn
* the data input stream to build the object from
* @throws IOException
*/ | Un-marshal an object instance from the data input stream | looseUnmarshal | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SubscriptionInfoMarshaller.java",
"license": "apache-2.0",
"size": 5811
} | [
"java.io.DataInput",
"java.io.IOException",
"org.apache.activemq.openwire.codec.OpenWireFormat",
"org.apache.activemq.openwire.commands.OpenWireDestination",
"org.apache.activemq.openwire.commands.SubscriptionInfo"
] | import java.io.DataInput; import java.io.IOException; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.OpenWireDestination; import org.apache.activemq.openwire.commands.SubscriptionInfo; | import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 2,786,724 |
return Collections.<Map.Entry<Integer, String>>unmodifiableSet(UDP.entrySet());
} | return Collections.<Map.Entry<Integer, String>>unmodifiableSet(UDP.entrySet()); } | /**
* Return all the known UDP service entries.
*/ | Return all the known UDP service entries | enumUdp | {
"repo_name": "joval/jSAF",
"path": "src/jsaf/service/PortRegistry.java",
"license": "lgpl-2.1",
"size": 3047
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 374,993 |
public static CmsRole valueOf(CmsGroup group) {
// check groups for internal representing the roles
if (group.isRole()) {
CmsRole role = valueOfGroupName(group.getName());
if (role != null) {
return role;
}
}
// check virt... | static CmsRole function(CmsGroup group) { if (group.isRole()) { CmsRole role = valueOfGroupName(group.getName()); if (role != null) { return role; } } if (group.isVirtual()) { int index = (group.getFlags() & (I_CmsPrincipal.FLAG_CORE_LIMIT - 1)); index = index / (I_CmsPrincipal.FLAG_GROUP_VIRTUAL * 2); CmsRole role = (... | /**
* Returns the role for the given group.<p>
*
* @param group a group to check for role representation
*
* @return the role for the given group
*/ | Returns the role for the given group | valueOf | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/security/CmsRole.java",
"license": "lgpl-2.1",
"size": 23965
} | [
"org.opencms.file.CmsGroup"
] | import org.opencms.file.CmsGroup; | import org.opencms.file.*; | [
"org.opencms.file"
] | org.opencms.file; | 2,776,233 |
@Override
public void handle() throws FacesException {
final Iterator<ExceptionQueuedEvent> i = getUnhandledExceptionQueuedEvents().iterator();
while (i.hasNext()) {
ExceptionQueuedEvent event = i.next();
ExceptionQueuedEventContext context = (ExceptionQueuedEventContext... | void function() throws FacesException { final Iterator<ExceptionQueuedEvent> i = getUnhandledExceptionQueuedEvents().iterator(); while (i.hasNext()) { ExceptionQueuedEvent event = i.next(); ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource(); Throwable t = context.getException(); final... | /**
* Handles exception by logging it into log file and navigating on error page displaying
* exception message.
*/ | Handles exception by logging it into log file and navigating on error page displaying exception message | handle | {
"repo_name": "EEXCESS/cgwap",
"path": "src/java/util/exception_handler/CGWAPExceptionHandler.java",
"license": "mit",
"size": 2353
} | [
"java.util.Iterator",
"java.util.logging.Level",
"javax.faces.FacesException",
"javax.faces.application.NavigationHandler",
"javax.faces.context.FacesContext",
"javax.faces.event.ExceptionQueuedEvent",
"javax.faces.event.ExceptionQueuedEventContext"
] | import java.util.Iterator; import java.util.logging.Level; import javax.faces.FacesException; import javax.faces.application.NavigationHandler; import javax.faces.context.FacesContext; import javax.faces.event.ExceptionQueuedEvent; import javax.faces.event.ExceptionQueuedEventContext; | import java.util.*; import java.util.logging.*; import javax.faces.*; import javax.faces.application.*; import javax.faces.context.*; import javax.faces.event.*; | [
"java.util",
"javax.faces"
] | java.util; javax.faces; | 2,907,011 |
@Override public InputStream getErrorStream() {
try {
Response response = getResponse(true);
if (HttpHeaders.hasBody(response) && response.code() >= HTTP_BAD_REQUEST) {
return response.body().byteStream();
}
return null;
} catch (IOException e) {
return null;
}
} | @Override InputStream function() { try { Response response = getResponse(true); if (HttpHeaders.hasBody(response) && response.code() >= HTTP_BAD_REQUEST) { return response.body().byteStream(); } return null; } catch (IOException e) { return null; } } | /**
* Returns an input stream from the server in the case of error such as the requested file (txt,
* htm, html) is not found on the remote server.
*/ | Returns an input stream from the server in the case of error such as the requested file (txt, htm, html) is not found on the remote server | getErrorStream | {
"repo_name": "jrodbx/okhttp",
"path": "okhttp-urlconnection/src/main/java/okhttp3/internal/huc/OkHttpURLConnection.java",
"license": "apache-2.0",
"size": 22141
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 90,367 |
@SuppressWarnings("unchecked")
public static <T> T[] toArray(Iterable<? extends T> list, Class<T> c) {
int size = -1;
if(list instanceof Collection<?>){
@SuppressWarnings("rawtypes")
Collection coll = (Collection)list;
size = coll.size();
}
... | @SuppressWarnings(STR) static <T> T[] function(Iterable<? extends T> list, Class<T> c) { int size = -1; if(list instanceof Collection<?>){ @SuppressWarnings(STR) Collection coll = (Collection)list; size = coll.size(); } if(size < 0){ size = 0; for(@SuppressWarnings(STR) T element : list){ size++; } } T[] result = (T[])... | /**
* Converts an iterable element collection to an array of elements.
* The iteration order of the specified object will be used as the array element order.
* @param list The iterable of objects which will be converted to an array.
* @param c The type of the elements of the array.
* @return An... | Converts an iterable element collection to an array of elements. The iteration order of the specified object will be used as the array element order | toArray | {
"repo_name": "PiLogic/PlotSquared",
"path": "src/main/java/com/plotsquared/bukkit/chat/ArrayWrapper.java",
"license": "gpl-3.0",
"size": 2850
} | [
"java.lang.reflect.Array",
"java.util.Collection"
] | import java.lang.reflect.Array; import java.util.Collection; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 448,246 |
void sendRawLine(@Nonnull String message); | void sendRawLine(@Nonnull String message); | /**
* Sends a raw IRC message.
*
* @param message message to send
* @throws IllegalArgumentException if message is null
*/ | Sends a raw IRC message | sendRawLine | {
"repo_name": "ammaraskar/KittehIRCClientLib",
"path": "src/main/java/org/kitteh/irc/client/library/Client.java",
"license": "mit",
"size": 10050
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,037,067 |
return Optional.ofNullable(this.apiClientMetadata);
}
/**
* If the job request was sent via the Agent this field will be populated.
*
* @return The Agent client metadata wrapped in an {@link Optional} | return Optional.ofNullable(this.apiClientMetadata); } /** * If the job request was sent via the Agent this field will be populated. * * @return The Agent client metadata wrapped in an {@link Optional} | /**
* If the job request was sent via API this field will be populated.
*
* @return The API client metadata wrapped in an {@link Optional}
*/ | If the job request was sent via API this field will be populated | getApiClientMetadata | {
"repo_name": "tgianos/genie",
"path": "genie-common-external/src/main/java/com/netflix/genie/common/external/dtos/v4/JobRequestMetadata.java",
"license": "apache-2.0",
"size": 4428
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,823,944 |
protected RenderingDef getRenderingDef(
omero.client client, final long pixelsId)
throws ServerError {
ScopedSpan span = Tracing.currentTracer()
.startScopedSpan("get_rendering_def");
try {
ServiceFactoryPrx sf = client.getSession();
... | RenderingDef function( omero.client client, final long pixelsId) throws ServerError { ScopedSpan span = Tracing.currentTracer() .startScopedSpan(STR); try { ServiceFactoryPrx sf = client.getSession(); long userId = sf.getAdminService().getEventContext().userId; List<RenderingDef> renderingDefs = retrieveRenderingDefs( ... | /**
* Gets the correct rendering settings either from the user (preferred) or
* image owner corresponding to the specified pixels set.
* @param client OMERO client to use for querying.
* @param pixelsId The identifier of the pixels.
* @return See above.
*/ | Gets the correct rendering settings either from the user (preferred) or image owner corresponding to the specified pixels set | getRenderingDef | {
"repo_name": "glencoesoftware/omero-ms-image-region",
"path": "src/main/java/com/glencoesoftware/omero/ms/image/region/ImageRegionRequestHandler.java",
"license": "gpl-2.0",
"size": 28474
} | [
"java.util.Arrays",
"java.util.List"
] | import java.util.Arrays; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 43,947 |
EClass getVersionSpec();
| EClass getVersionSpec(); | /**
* Returns the meta object for class '{@link de.uni_hildesheim.sse.vil.expressions.expressionDsl.VersionSpec <em>Version Spec</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Version Spec</em>'.
* @see de.uni_hildesheim.sse.vil.expressions.express... | Returns the meta object for class '<code>de.uni_hildesheim.sse.vil.expressions.expressionDsl.VersionSpec Version Spec</code>'. | getVersionSpec | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/Instantiation/de.uni_hildesheim.sse.vil.expressions/src-gen/de/uni_hildesheim/sse/vil/expressions/expressionDsl/ExpressionDslPackage.java",
"license": "apache-2.0",
"size": 174129
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,226,250 |
public void pasteRndSettings()
{
if (model.getState() == DISCARDED)
throw new IllegalArgumentException("This method cannot be " +
"invoked in the DISCARDED state.");
if (model.getType() == DataBrowserModel.SEARCH) {
firePropertyChange(PASTE_RND_SETTINGS_PROPERTY, null,
getBrowser().getSelectedD... | void function() { if (model.getState() == DISCARDED) throw new IllegalArgumentException(STR + STR); if (model.getType() == DataBrowserModel.SEARCH) { firePropertyChange(PASTE_RND_SETTINGS_PROPERTY, null, getBrowser().getSelectedDataObjects()); } else { ImageDisplay d = getBrowser().getLastSelectedDisplay(); if (d insta... | /**
* Implemented as specified by the {@link DataBrowser} interface.
* @see DataBrowser#pasteRndSettings()
*/ | Implemented as specified by the <code>DataBrowser</code> interface | pasteRndSettings | {
"repo_name": "hflynn/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowserComponent.java",
"license": "gpl-2.0",
"size": 52375
} | [
"org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.WellSampleNode"
] | import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay; import org.openmicroscopy.shoola.agents.dataBrowser.browser.WellSampleNode; | import org.openmicroscopy.shoola.agents.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 294,222 |
@SuppressLint("DefaultLocale") public void setVolumeLevel(int newVolumeLevel, boolean fade) {
int oldVolumeLevel = mVolumeLevel;
mVolumeLevel = newVolumeLevel;
if (mVolumeLevel < mMinVolumeLevel) {
mVolumeLevel = mMinVolumeLevel;
} else if (mVolumeLevel > mMaxVolumeLevel)... | @SuppressLint(STR) void function(int newVolumeLevel, boolean fade) { int oldVolumeLevel = mVolumeLevel; mVolumeLevel = newVolumeLevel; if (mVolumeLevel < mMinVolumeLevel) { mVolumeLevel = mMinVolumeLevel; } else if (mVolumeLevel > mMaxVolumeLevel) { mVolumeLevel = mMaxVolumeLevel; } float oldVolume = calcVolumeScalar(o... | /**
* Sets a new volume level for the music player. The change in volume
* level can be made abruptly or through fading.
*
* @param newVolumeLevel for the music player
* @param fade change level by fading or not
*/ | Sets a new volume level for the music player. The change in volume level can be made abruptly or through fading | setVolumeLevel | {
"repo_name": "Sillson/roundware-android",
"path": "rwservice/src/main/java/org/roundware/service/RWService.java",
"license": "gpl-3.0",
"size": 83769
} | [
"android.annotation.SuppressLint",
"android.util.Log",
"java.util.Locale"
] | import android.annotation.SuppressLint; import android.util.Log; import java.util.Locale; | import android.annotation.*; import android.util.*; import java.util.*; | [
"android.annotation",
"android.util",
"java.util"
] | android.annotation; android.util; java.util; | 2,000,984 |
private void hideTextEditor() {
if (!mIsEditing || textEditorHidden || mEditText == null) {
return;
}
textEditorHidden = true;
final TextArea ta = mEditText.mTextArea;
| void function() { if (!mIsEditing textEditorHidden mEditText == null) { return; } textEditorHidden = true; final TextArea ta = mEditText.mTextArea; | /**
* Hides the native text editor while keeping the active async edit session going.
* This will effectively hide the native text editor, and show the light-weight text area
* with cursor still in the correct position.
*/ | Hides the native text editor while keeping the active async edit session going. This will effectively hide the native text editor, and show the light-weight text area with cursor still in the correct position | hideTextEditor | {
"repo_name": "saeder/CodenameOne",
"path": "Ports/Android/src/com/codename1/impl/android/InPlaceEditView.java",
"license": "gpl-2.0",
"size": 89582
} | [
"com.codename1.ui.TextArea"
] | import com.codename1.ui.TextArea; | import com.codename1.ui.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 1,846,730 |
public static Optional<ModelAndView> hasDelegationRequestFailed(final HttpServletRequest request, final int status) {
final Map<String, String[]> params = request.getParameterMap();
if (params.containsKey("error") || params.containsKey("error_code") || params.containsKey("error_description")
... | static Optional<ModelAndView> function(final HttpServletRequest request, final int status) { final Map<String, String[]> params = request.getParameterMap(); if (params.containsKey("error") params.containsKey(STR) params.containsKey(STR) params.containsKey(STR)) { final Map<String, Object> model = new HashMap<>(); if (p... | /**
* Determine if request has errors.
*
* @param request the request
* @param status the status
* @return the optional model and view, if request is an error.
*/ | Determine if request has errors | hasDelegationRequestFailed | {
"repo_name": "gabedwrds/cas",
"path": "support/cas-server-support-pac4j/src/main/java/org/apereo/cas/support/pac4j/web/flow/DelegatedClientAuthenticationAction.java",
"license": "apache-2.0",
"size": 13840
} | [
"java.io.Serializable",
"java.util.HashMap",
"java.util.Map",
"java.util.Optional",
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.lang3.StringEscapeUtils",
"org.apereo.cas.CasProtocolConstants",
"org.springframework.web.servlet.ModelAndView"
] | import java.io.Serializable; import java.util.HashMap; import java.util.Map; import java.util.Optional; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringEscapeUtils; import org.apereo.cas.CasProtocolConstants; import org.springframework.web.servlet.ModelAndView; | import java.io.*; import java.util.*; import javax.servlet.http.*; import org.apache.commons.lang3.*; import org.apereo.cas.*; import org.springframework.web.servlet.*; | [
"java.io",
"java.util",
"javax.servlet",
"org.apache.commons",
"org.apereo.cas",
"org.springframework.web"
] | java.io; java.util; javax.servlet; org.apache.commons; org.apereo.cas; org.springframework.web; | 1,744,768 |
protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj,
BindException errors) throws Exception {
HttpSession httpSession = request.getSession();
if (Context.isAuthenticated()) {
StringBuilder view = new StringBuilder(getSuccessView());
PatientSer... | ModelAndView function(HttpServletRequest request, HttpServletResponse response, Object obj, BindException errors) throws Exception { HttpSession httpSession = request.getSession(); if (Context.isAuthenticated()) { StringBuilder view = new StringBuilder(getSuccessView()); PatientService ps = Context.getPatientService();... | /**
* The onSubmit function receives the form/command object that was modified by the input form
* and saves it to the db
*
* @see org.springframework.web.servlet.mvc.SimpleFormController#onSubmit(javax.servlet.http.HttpServletRequest,
* javax.servlet.http.HttpServletResponse, java.lang.Object,
* ... | The onSubmit function receives the form/command object that was modified by the input form and saves it to the db | onSubmit | {
"repo_name": "Winbobob/openmrs-core",
"path": "web/src/main/java/org/openmrs/web/controller/patient/MergePatientsFormController.java",
"license": "mpl-2.0",
"size": 7808
} | [
"java.util.ArrayList",
"java.util.List",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.servlet.http.HttpSession",
"org.openmrs.Patient",
"org.openmrs.api.APIException",
"org.openmrs.api.PatientService",
"org.openmrs.api.context.Context",
"org.openmrs.web... | import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.openmrs.Patient; import org.openmrs.api.APIException; import org.openmrs.api.PatientService; import org.openmrs.api.context.Co... | import java.util.*; import javax.servlet.http.*; import org.openmrs.*; import org.openmrs.api.*; import org.openmrs.api.context.*; import org.openmrs.web.*; import org.springframework.validation.*; import org.springframework.web.servlet.*; import org.springframework.web.servlet.view.*; | [
"java.util",
"javax.servlet",
"org.openmrs",
"org.openmrs.api",
"org.openmrs.web",
"org.springframework.validation",
"org.springframework.web"
] | java.util; javax.servlet; org.openmrs; org.openmrs.api; org.openmrs.web; org.springframework.validation; org.springframework.web; | 2,191,690 |
@GET("/tracks")
Tracks getTracks(@Query("ids") String trackIds, @QueryMap Map<String, Object> options); | @GET(STR) Tracks getTracks(@Query("ids") String trackIds, @QueryMap Map<String, Object> options); | /**
* Get Several Tracks
*
* @param trackIds A comma-separated list of the Spotify IDs for the tracks
* @param options Optional parameters. For list of supported parameters see
* <a href="https://developer.spotify.com/web-api/get-several-tracks/">endpoint documentation</a>
... | Get Several Tracks | getTracks | {
"repo_name": "mattiamaestrini/spotify-web-api-android",
"path": "spotify-api/src/main/java/kaaes/spotify/webapi/android/SpotifyService.java",
"license": "mit",
"size": 84772
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 342,139 |
@SuppressFBWarnings(value="BC_UNCONFIRMED_CAST", justification="Only JMXConnectionNotification instances are used.")
public void handleNotification(Notification notification, Object handback) {
if (handback instanceof AgentImpl) {
AgentImpl agent = (AgentImpl) handback;
JMXConnectionNotification j... | @SuppressFBWarnings(value=STR, justification=STR) void function(Notification notification, Object handback) { if (handback instanceof AgentImpl) { AgentImpl agent = (AgentImpl) handback; JMXConnectionNotification jmxNotifn = (JMXConnectionNotification) notification; LogWriterI18n logWriter = agent.getLogWriterI18n(); l... | /**
* If the handback object passed is an AgentImpl, updates the JMX client count
*
* @param notification
* JMXConnectionNotification for change in client connection status
* @param handback
* An opaque object which helps the listener to associate information
* regarding ... | If the handback object passed is an AgentImpl, updates the JMX client count | handleNotification | {
"repo_name": "papicella/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java",
"license": "apache-2.0",
"size": 59041
} | [
"com.gemstone.gemfire.i18n.LogWriterI18n",
"edu.umd.cs.findbugs.annotations.SuppressFBWarnings",
"javax.management.Notification",
"javax.management.NotificationFilter",
"javax.management.remote.JMXConnectionNotification"
] | import com.gemstone.gemfire.i18n.LogWriterI18n; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import javax.management.Notification; import javax.management.NotificationFilter; import javax.management.remote.JMXConnectionNotification; | import com.gemstone.gemfire.i18n.*; import edu.umd.cs.findbugs.annotations.*; import javax.management.*; import javax.management.remote.*; | [
"com.gemstone.gemfire",
"edu.umd.cs",
"javax.management"
] | com.gemstone.gemfire; edu.umd.cs; javax.management; | 2,877,867 |
public int[][] createMDS16x16(byte[] key, boolean debug) {
int i;
int firstRow[] = new int[16]; //must be created cleverly - key byte not 0, pairwise different
Set<Integer> set = new LinkedHashSet<Integer>();
for(i = 0; i<16; i++) {
set.add((key[i] & 0x3f)); //NOTE smaller numbers (5 bits)? I think 6 b... | int[][] function(byte[] key, boolean debug) { int i; int firstRow[] = new int[16]; Set<Integer> set = new LinkedHashSet<Integer>(); for(i = 0; i<16; i++) { set.add((key[i] & 0x3f)); set.add(((key[i] >>> 2) & 0x3f)); } firstRow[15] = 0; int firstRow15tmp = 1; i = 0; for(Integer m : set){ firstRow[i] = m; firstRow15tmp ^... | /**
* Key-dependent MDS16x16 matrix.
*
* @param key
*/ | Key-dependent MDS16x16 matrix | createMDS16x16 | {
"repo_name": "xbacinsk/White-box_cipher_java",
"path": "src/main/java/cz/muni/fi/xklinec/whiteboxAES/generator/AEShelper.java",
"license": "bsd-3-clause",
"size": 39436
} | [
"java.util.LinkedHashSet",
"java.util.Set"
] | import java.util.LinkedHashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,503,502 |
public void setRangeAboutValue(double value, double length) {
setRange(new Range(value - length / 2, value + length / 2));
} | void function(double value, double length) { setRange(new Range(value - length / 2, value + length / 2)); } | /**
* Sets the axis range, where the new range is 'size' in length, and
* centered on 'value'.
*
* @param value the central value.
* @param length the range length.
*/ | Sets the axis range, where the new range is 'size' in length, and centered on 'value' | setRangeAboutValue | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/main/java/org/jfree/chart/axis/ValueAxis.java",
"license": "gpl-3.0",
"size": 58096
} | [
"org.jfree.data.Range"
] | import org.jfree.data.Range; | import org.jfree.data.*; | [
"org.jfree.data"
] | org.jfree.data; | 701,861 |
@Test
public void testLeastLoadedAssignment() throws Throwable {
// create a log manager with multiple data directories
final List<File> dirs = Lists.newArrayList(TestUtils.tempDir(),
TestUtils.tempDir(),
TestUtils.tempDir());
logManager.shutdown();
... | void function() throws Throwable { final List<File> dirs = Lists.newArrayList(TestUtils.tempDir(), TestUtils.tempDir(), TestUtils.tempDir()); logManager.shutdown(); logManager = createLogManager(dirs); for (int partition = 0; partition < 20; partition++) { logManager.createLog(new TopicAndPartition("test", partition), ... | /**
* Test that new logs that are created are assigned to the least loaded log directory
*/ | Test that new logs that are created are assigned to the least loaded log directory | testLeastLoadedAssignment | {
"repo_name": "bernd/samsa",
"path": "src/test/java/com/github/bernd/samsa/LogManagerTest.java",
"license": "apache-2.0",
"size": 12290
} | [
"com.google.common.collect.Lists",
"com.google.common.collect.Maps",
"java.io.File",
"java.util.Collection",
"java.util.Collections",
"java.util.List",
"java.util.Map",
"org.testng.Assert"
] | import com.google.common.collect.Lists; import com.google.common.collect.Maps; import java.io.File; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; import org.testng.Assert; | import com.google.common.collect.*; import java.io.*; import java.util.*; import org.testng.*; | [
"com.google.common",
"java.io",
"java.util",
"org.testng"
] | com.google.common; java.io; java.util; org.testng; | 1,283,339 |
public AomMap<String, WebParameter> getParameter() {
return parameter;
} | AomMap<String, WebParameter> function() { return parameter; } | /**
* Get value of property parameter
*
* @return - value of field parameter
*/ | Get value of property parameter | getParameter | {
"repo_name": "bdaum/zoraPD",
"path": "com.bdaum.zoom.model/src/com/bdaum/zoom/cat/model/group/webGallery/WebGalleryImpl.java",
"license": "gpl-2.0",
"size": 13348
} | [
"com.bdaum.aoModeling.runtime.AomMap"
] | import com.bdaum.aoModeling.runtime.AomMap; | import com.bdaum.*; | [
"com.bdaum"
] | com.bdaum; | 1,509,025 |
private void update() {
// BEGIN_INCLUDE(update_codec_state)
int index;
// Get valid input buffers from the codec to fill later in the same order they were
// made available by the codec.
while ((index = mDecoder.dequeueInputBuffer(0)) != MediaCodec.INFO_TRY_AGAIN_LATER) {
... | void function() { int index; while ((index = mDecoder.dequeueInputBuffer(0)) != MediaCodec.INFO_TRY_AGAIN_LATER) { mAvailableInputBuffers.add(index); } | /**
* Synchronize this object's state with the internal state of the wrapped
* MediaCodec.
*/ | Synchronize this object's state with the internal state of the wrapped MediaCodec | update | {
"repo_name": "lianzhao/learnningandroid",
"path": "MyApplication1/app/src/main/java/me/lianzhao/myapplication/MediaCodecWrapper.java",
"license": "mit",
"size": 15695
} | [
"android.media.MediaCodec"
] | import android.media.MediaCodec; | import android.media.*; | [
"android.media"
] | android.media; | 2,363,194 |
public static <T1, T2, T3, T4, T5, R> Function<T5, R> partial5(final T1 t1, final T2 t2, final T3 t3, final T4 t4,
final Function5<T1, T2, T3, T4, T5, R> quintFunc) {
return (t5) -> quintFunc.apply(t1, t2, t3, t4, t5);
} | static <T1, T2, T3, T4, T5, R> Function<T5, R> function(final T1 t1, final T2 t2, final T3 t3, final T4 t4, final Function5<T1, T2, T3, T4, T5, R> quintFunc) { return (t5) -> quintFunc.apply(t1, t2, t3, t4, t5); } | /**
* Returns a Function with 4 arguments applied to the supplied QuintFunction
* @param t1 Generic argument
* @param t2 Generic argument
* @param t3 Generic argument
* @param t4 Generic argument
* @param quintFunc Function that accepts 5 parameters
* @param <T1> Generic argument type... | Returns a Function with 4 arguments applied to the supplied QuintFunction | partial5 | {
"repo_name": "aol/cyclops-react",
"path": "cyclops/src/main/java/cyclops/function/PartialApplicator.java",
"license": "apache-2.0",
"size": 34207
} | [
"java.util.function.Function"
] | import java.util.function.Function; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,298,592 |
public static java.util.List extractOrderSpecimenList(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.OrderSpecimenPathologyVoCollection voCollection)
{
return extractOrderSpecimenList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.OrderSpecimenPathologyVoCollection voCollection) { return extractOrderSpecimenList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.ocrr.orderingresults.domain.objects.OrderSpecimen 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.ocrr.orderingresults.domain.objects.OrderSpecimen list from the value object collection | extractOrderSpecimenList | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/ocrr/vo/domain/OrderSpecimenPathologyVoAssembler.java",
"license": "agpl-3.0",
"size": 19542
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 276,487 |
private byte[] openBitmaskBytes(IFD ifd, int imageWidth, int imageHeight) throws FormatException {
final byte [] uncompressed = new byte[imageWidth * imageHeight];
final long [] stripByteCounts = ifd.getIFDLongArray(IFD.STRIP_BYTE_COUNTS);
final long [] stripOffsets = ifd.getIFDLongArray(IFD.STRIP_OFFSETS... | byte[] function(IFD ifd, int imageWidth, int imageHeight) throws FormatException { final byte [] uncompressed = new byte[imageWidth * imageHeight]; final long [] stripByteCounts = ifd.getIFDLongArray(IFD.STRIP_BYTE_COUNTS); final long [] stripOffsets = ifd.getIFDLongArray(IFD.STRIP_OFFSETS); int off = 0; for (int i=0; ... | /**
* Decode the whole IFD plane using bitmask compression
*
* @param ifd - the IFD to decode
* @param imageWidth the width of the IFD plane
* @param imageHeight the height of the IFD plane
* @return a byte array of length imageWidth * imageHeight
* containing the uncompressed data
* @t... | Decode the whole IFD plane using bitmask compression | openBitmaskBytes | {
"repo_name": "bjoernthiel/bioformats",
"path": "components/formats-bsd/src/loci/formats/in/FlowSightReader.java",
"license": "gpl-2.0",
"size": 16883
} | [
"java.io.IOException",
"java.util.Arrays"
] | import java.io.IOException; import java.util.Arrays; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,592,014 |
public List<DataNode> getOutlierNodes(List<DataNode> allNodes) {
List<DataNode> kdAndKnList = getKDAndKN(allNodes);
calReachDis(kdAndKnList);
calReachDensity(kdAndKnList);
calLof(kdAndKnList);
Collections.sort(kdAndKnList, new LofComparator());
return kdAndKnList;
} | List<DataNode> function(List<DataNode> allNodes) { List<DataNode> kdAndKnList = getKDAndKN(allNodes); calReachDis(kdAndKnList); calReachDensity(kdAndKnList); calLof(kdAndKnList); Collections.sort(kdAndKnList, new LofComparator()); return kdAndKnList; } | /**
* Computes LOF values for all nodes and returns a sorted set of the nodes.
*/ | Computes LOF values for all nodes and returns a sorted set of the nodes | getOutlierNodes | {
"repo_name": "matthiaszimmermann/ml_demo",
"path": "image_outlier/outlier-demo/src/main/java/org/ece16/lof/LocalOutlierFactor.java",
"license": "apache-2.0",
"size": 4762
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 2,155,082 |
protected void loadInputProperties() {
if (VERBOSE) {
System.out.println("Loading '" + getInputFilename() + "'...");
}
m_InputProperties = new Properties();
try {
File f = new File(getInputFilename());
if (getExplicitPropsFile() && f.exists()) {
m_InputProperties.load(new Fil... | void function() { if (VERBOSE) { System.out.println(STR + getInputFilename() + "'..."); } m_InputProperties = new Properties(); try { File f = new File(getInputFilename()); if (getExplicitPropsFile() && f.exists()) { m_InputProperties.load(new FileInputStream(getInputFilename())); } else { m_InputProperties = Utils.rea... | /**
* loads the property file containing the layout and the packages of the
* output-property-file. The exlcude property file is also read here.
*
* @see #m_InputProperties
* @see #m_InputFilename
*/ | loads the property file containing the layout and the packages of the output-property-file. The exlcude property file is also read here | loadInputProperties | {
"repo_name": "mydzigear/weka.kmeanspp.silhouette_score",
"path": "src/weka/gui/GenericPropertiesCreator.java",
"license": "gpl-3.0",
"size": 21024
} | [
"java.io.File",
"java.io.FileInputStream",
"java.util.Enumeration",
"java.util.Hashtable",
"java.util.Properties",
"java.util.StringTokenizer",
"java.util.Vector"
] | import java.io.File; import java.io.FileInputStream; import java.util.Enumeration; import java.util.Hashtable; import java.util.Properties; import java.util.StringTokenizer; import java.util.Vector; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 531,672 |
public @Nonnull Iterable<ResourceStatus> listImageStatus(@Nonnull ImageClass cls) throws CloudException, InternalException; | @Nonnull Iterable<ResourceStatus> function(@Nonnull ImageClass cls) throws CloudException, InternalException; | /**
* Lists the current status for all images in my library. The images returned should be the same list provided by
* {@link #listImages(ImageClass)}, except that this method returns a list of {@link ResourceStatus} objects.
* @param cls the image class of the target images
* @return a list of stat... | Lists the current status for all images in my library. The images returned should be the same list provided by <code>#listImages(ImageClass)</code>, except that this method returns a list of <code>ResourceStatus</code> objects | listImageStatus | {
"repo_name": "OSS-TheWeatherCompany/dasein-cloud-core",
"path": "src/main/java/org/dasein/cloud/compute/MachineImageSupport.java",
"license": "apache-2.0",
"size": 38337
} | [
"javax.annotation.Nonnull",
"org.dasein.cloud.CloudException",
"org.dasein.cloud.InternalException",
"org.dasein.cloud.ResourceStatus"
] | import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException; import org.dasein.cloud.ResourceStatus; | import javax.annotation.*; import org.dasein.cloud.*; | [
"javax.annotation",
"org.dasein.cloud"
] | javax.annotation; org.dasein.cloud; | 2,639,314 |
EList<GenClass> getGenClasses(); | EList<GenClass> getGenClasses(); | /**
* Returns the value of the '<em><b>Gen Classes</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.emf.codegen.ecore.genmodel.GenClass}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Gen Classes</em>' containment reference list.... | Returns the value of the 'Gen Classes' containment reference list. The list contents are of type <code>org.eclipse.emf.codegen.ecore.genmodel.GenClass</code>. | getGenClasses | {
"repo_name": "tfisher1226/ARIES",
"path": "nam/nam-engine/src/main/java/aries/reference/model/GenPackage.java",
"license": "apache-2.0",
"size": 38611
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,038,420 |
@Test
public void ignoreSeveralMetrics() {
// set properties
Properties props = EpaUtils.getProperties();
props.setProperty(METRICS_LOGS, TRUE);
props.setProperty(IGNORE_METRICS, "Repeat,Type,Alerts Per Interval,Download Time (ms)");
props.setProperty(DISPLAY_STATIONS, ... | void function() { Properties props = EpaUtils.getProperties(); props.setProperty(METRICS_LOGS, TRUE); props.setProperty(IGNORE_METRICS, STR); props.setProperty(DISPLAY_STATIONS, "true"); String[] expectedMetrics = { STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR }; String[] notExpectedMetrics = { STR, ... | /**
* Test asm.ignoreMetrics property handling.
*/ | Test asm.ignoreMetrics property handling | ignoreSeveralMetrics | {
"repo_name": "CA-APM/ca-apm-fieldpack-asm",
"path": "asm-monitor/src/test/java/com/ca/apm/swat/epaplugins/asm/IgnoreMetricsTest.java",
"license": "epl-1.0",
"size": 16065
} | [
"com.wily.introscope.epagent.EpaUtils",
"java.util.Properties"
] | import com.wily.introscope.epagent.EpaUtils; import java.util.Properties; | import com.wily.introscope.epagent.*; import java.util.*; | [
"com.wily.introscope",
"java.util"
] | com.wily.introscope; java.util; | 1,771,493 |
public String sql(ImmutableBitSet groupSet, boolean group,
List<Measure> aggCallList) {
final List<LatticeNode> usedNodes = new ArrayList<>();
if (group) {
final ImmutableBitSet.Builder columnSetBuilder = groupSet.rebuild();
for (Measure call : aggCallList) {
for (Column arg : call.a... | String function(ImmutableBitSet groupSet, boolean group, List<Measure> aggCallList) { final List<LatticeNode> usedNodes = new ArrayList<>(); if (group) { final ImmutableBitSet.Builder columnSetBuilder = groupSet.rebuild(); for (Measure call : aggCallList) { for (Column arg : call.args) { columnSetBuilder.set(arg.ordina... | /** Generates a SQL query to populate a tile of the lattice specified by a
* given set of columns and measures, optionally grouping. */ | Generates a SQL query to populate a tile of the lattice specified by a | sql | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/materialize/Lattice.java",
"license": "apache-2.0",
"size": 40493
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.apache.calcite.config.CalciteSystemProperty",
"org.apache.calcite.sql.SqlDialect",
"org.apache.calcite.util.ImmutableBitSet",
"org.apache.calcite.util.mapping.IntPair"
] | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.calcite.config.CalciteSystemProperty; import org.apache.calcite.sql.SqlDialect; import org.apache.calcite.util.ImmutableBitSet; import org.apache.calcite.util.mapping.IntPair; | import java.util.*; import org.apache.calcite.config.*; import org.apache.calcite.sql.*; import org.apache.calcite.util.*; import org.apache.calcite.util.mapping.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 403,621 |
public Asset getAsset(String path)
{
AssetService as = getAssetService();
AssetInfo item = as.getAsset(getSandboxRef(), path);
if (item != null)
{
Asset newAsset = new Asset(this, item);
return newAsset;
}
return null;
}
| Asset function(String path) { AssetService as = getAssetService(); AssetInfo item = as.getAsset(getSandboxRef(), path); if (item != null) { Asset newAsset = new Asset(this, item); return newAsset; } return null; } | /**
* Get the specified asset (Either folder or file)
* @param path the full path e.g. /www/web_apps/ROOT/index.html
* @return the asset or null if it does not exist
*/ | Get the specified asset (Either folder or file) | getAsset | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/repository/source/java/org/alfresco/wcm/sandbox/script/Sandbox.java",
"license": "lgpl-3.0",
"size": 8101
} | [
"org.alfresco.wcm.asset.AssetInfo",
"org.alfresco.wcm.asset.AssetService"
] | import org.alfresco.wcm.asset.AssetInfo; import org.alfresco.wcm.asset.AssetService; | import org.alfresco.wcm.asset.*; | [
"org.alfresco.wcm"
] | org.alfresco.wcm; | 608,764 |
public void validatePrefixExclusion(String prefix) {
properties.keySet().stream()
.filter(k -> k.startsWith(prefix))
.findFirst()
.ifPresent((k) -> {
throw new ValidationException(
"Properties with prefix '" + prefix + "' are not allowed in this context. " +
"But property '" + k + "' was fou... | void function(String prefix) { properties.keySet().stream() .filter(k -> k.startsWith(prefix)) .findFirst() .ifPresent((k) -> { throw new ValidationException( STR + prefix + STR + STR + k + STR); }); } | /**
* Validates that the given prefix is not included in these properties.
*/ | Validates that the given prefix is not included in these properties | validatePrefixExclusion | {
"repo_name": "ueshin/apache-flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/DescriptorProperties.java",
"license": "apache-2.0",
"size": 38931
} | [
"org.apache.flink.table.api.ValidationException"
] | import org.apache.flink.table.api.ValidationException; | import org.apache.flink.table.api.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,847,855 |
public static SocketOption<Integer> getTcpKeepIntervalSocketOptionOrNull() {
return getExtendedSocketOptionOrNull("TCP_KEEPINTERVAL");
} | static SocketOption<Integer> function() { return getExtendedSocketOptionOrNull(STR); } | /**
* Returns the extended TCP_KEEPINTERVAL socket option, if available on this JDK
*/ | Returns the extended TCP_KEEPINTERVAL socket option, if available on this JDK | getTcpKeepIntervalSocketOptionOrNull | {
"repo_name": "coding0011/elasticsearch",
"path": "libs/core/src/main/java/org/elasticsearch/core/internal/net/NetUtils.java",
"license": "apache-2.0",
"size": 2203
} | [
"java.net.SocketOption"
] | import java.net.SocketOption; | import java.net.*; | [
"java.net"
] | java.net; | 1,982,522 |
void configure(Project project, MavenPlugin plugin); | void configure(Project project, MavenPlugin plugin); | /**
* Configures the pom being executed, add or remove plugin properties.
* This method is automatically executed by Sonar. Plugins do NOT have to execute it.
*/ | Configures the pom being executed, add or remove plugin properties. This method is automatically executed by Sonar. Plugins do NOT have to execute it | configure | {
"repo_name": "jmecosta/sonar",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPluginHandler.java",
"license": "lgpl-3.0",
"size": 1963
} | [
"org.sonar.api.resources.Project"
] | import org.sonar.api.resources.Project; | import org.sonar.api.resources.*; | [
"org.sonar.api"
] | org.sonar.api; | 1,726,989 |
public void showSpecialEffects(LivingEntity entity);
| void function(LivingEntity entity); | /**
* Called every 20 ticks (1 second) to show any special effects for this entity.
* May be used for other things that require a constant repeating call, if necessary.
* @param entity entity special effects are being used on
*/ | Called every 20 ticks (1 second) to show any special effects for this entity. May be used for other things that require a constant repeating call, if necessary | showSpecialEffects | {
"repo_name": "AddstarMC/CustomEntityLibrary",
"path": "src/main/java/com/github/customentitylibrary/entities/EntityType.java",
"license": "gpl-3.0",
"size": 4821
} | [
"org.bukkit.entity.LivingEntity"
] | import org.bukkit.entity.LivingEntity; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 1,827,187 |
public void getVirtualViews(List<VirtualView> views) {
for (int i = mStripTabsToRender.length - 1; i >= 0; i--) {
StripLayoutTab tab = mStripTabsToRender[i];
tab.getVirtualViews(views);
}
if (mNewTabButton.isVisible()) views.add(mNewTabButton);
} | void function(List<VirtualView> views) { for (int i = mStripTabsToRender.length - 1; i >= 0; i--) { StripLayoutTab tab = mStripTabsToRender[i]; tab.getVirtualViews(views); } if (mNewTabButton.isVisible()) views.add(mNewTabButton); } | /**
* Get a list of virtual views for accessibility.
*
* @param views A List to populate with virtual views.
*/ | Get a list of virtual views for accessibility | getVirtualViews | {
"repo_name": "js0701/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java",
"license": "bsd-3-clause",
"size": 62865
} | [
"java.util.List",
"org.chromium.chrome.browser.compositor.layouts.components.VirtualView"
] | import java.util.List; import org.chromium.chrome.browser.compositor.layouts.components.VirtualView; | import java.util.*; import org.chromium.chrome.browser.compositor.layouts.components.*; | [
"java.util",
"org.chromium.chrome"
] | java.util; org.chromium.chrome; | 916,577 |
public ZonedDateTime getReferenceEndDate() {
return _referenceEndDate;
} | ZonedDateTime function() { return _referenceEndDate; } | /**
* Gets the reference date for the index at the coupon end.
* @return The reference date for the index at the coupon end.
*/ | Gets the reference date for the index at the coupon end | getReferenceEndDate | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/inflation/CouponInflationYearOnYearMonthlyWithMarginDefinition.java",
"license": "apache-2.0",
"size": 14218
} | [
"org.threeten.bp.ZonedDateTime"
] | import org.threeten.bp.ZonedDateTime; | import org.threeten.bp.*; | [
"org.threeten.bp"
] | org.threeten.bp; | 610,105 |
public void testRemoveFirst() {
LinkedBlockingDeque q = populatedDeque(SIZE);
for (int i = 0; i < SIZE; ++i) {
assertEquals(i, q.removeFirst());
}
try {
q.removeFirst();
shouldThrow();
} catch (NoSuchElementException success) {}
ass... | void function() { LinkedBlockingDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(i, q.removeFirst()); } try { q.removeFirst(); shouldThrow(); } catch (NoSuchElementException success) {} assertNull(q.peekFirst()); } | /**
* removeFirst() removes first element, or throws NSEE if empty
*/ | removeFirst() removes first element, or throws NSEE if empty | testRemoveFirst | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "jsr166-tests/src/test/java/jsr166/LinkedBlockingDequeTest.java",
"license": "gpl-2.0",
"size": 59941
} | [
"java.util.NoSuchElementException",
"java.util.concurrent.LinkedBlockingDeque"
] | import java.util.NoSuchElementException; import java.util.concurrent.LinkedBlockingDeque; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,607,459 |
@POST
@Path("linkrm")
@Produces(MediaType.APPLICATION_JSON)
boolean linkRm(@HeaderParam("sessionid")
final String sessionId, @FormParam("rmurl") String rmURL) throws RestException; | @Path(STR) @Produces(MediaType.APPLICATION_JSON) boolean linkRm(@HeaderParam(STR) final String sessionId, @FormParam("rmurl") String rmURL) throws RestException; | /**
* Reconnect a new Resource Manager to the scheduler. Can be used if the
* resource manager has crashed.
*
* @param sessionId
* a valid session id
* @param rmURL
* the url of the resource manager
* @return true if success, false otherwise.
*/ | Reconnect a new Resource Manager to the scheduler. Can be used if the resource manager has crashed | linkRm | {
"repo_name": "mbenguig/scheduling",
"path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java",
"license": "agpl-3.0",
"size": 98025
} | [
"javax.ws.rs.FormParam",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.RestException"
] | import javax.ws.rs.FormParam; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.RestException; | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*; | [
"javax.ws",
"org.ow2.proactive_grid_cloud_portal"
] | javax.ws; org.ow2.proactive_grid_cloud_portal; | 1,636,142 |
@Test
public void testSerialization5() throws IOException, ClassNotFoundException {
DefaultCategoryDataset dataset1 = new DefaultCategoryDataset();
CategoryAxis domainAxis1 = new CategoryAxis("Domain 1");
NumberAxis rangeAxis1 = new NumberAxis("Range 1");
BarRenderer renderer1 = ... | void function() throws IOException, ClassNotFoundException { DefaultCategoryDataset dataset1 = new DefaultCategoryDataset(); CategoryAxis domainAxis1 = new CategoryAxis(STR); NumberAxis rangeAxis1 = new NumberAxis(STR); BarRenderer renderer1 = new BarRenderer(); CategoryPlot p1 = new CategoryPlot(dataset1, domainAxis1,... | /**
* Tests a bug where the plot is no longer registered as a listener
* with the dataset(s) and axes after deserialization. See patch 1209475
* at SourceForge.
* @throws IOException
* @throws ClassNotFoundException
*/ | Tests a bug where the plot is no longer registered as a listener with the dataset(s) and axes after deserialization. See patch 1209475 at SourceForge | testSerialization5 | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/test/java/org/jfree/chart/plot/CategoryPlotTest.java",
"license": "gpl-3.0",
"size": 39297
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.ObjectInput",
"java.io.ObjectInputStream",
"java.io.ObjectOutput",
"java.io.ObjectOutputStream",
"org.jfree.chart.axis.CategoryAxis",
"org.jfree.chart.axis.NumberAxis",
"org.jfree.chart.renderer.catego... | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.NumberAxis; import or... | import java.io.*; import org.jfree.chart.axis.*; import org.jfree.chart.renderer.category.*; import org.jfree.data.category.*; import org.junit.*; | [
"java.io",
"org.jfree.chart",
"org.jfree.data",
"org.junit"
] | java.io; org.jfree.chart; org.jfree.data; org.junit; | 960,038 |
public Class<?> getTypeClass(Context context) {
return Object.class;
} | Class<?> function(Context context) { return Object.class; } | /** Returns <code>Object.class</code>.
*/ | Returns <code>Object.class</code> | getTypeClass | {
"repo_name": "FunDevelopment/funlang",
"path": "src/fun/lang/DefaultType.java",
"license": "mit",
"size": 1200
} | [
"fun.runtime.Context"
] | import fun.runtime.Context; | import fun.runtime.*; | [
"fun.runtime"
] | fun.runtime; | 667,992 |
public synchronized boolean remove(String fullPath) throws Exception {
boolean removed = false;
if (isHandledOnFileSystem()) {
UploadSessionFile uploadSessionFile = getUploadSessionFile(fullPath);
if (!currentFileWritings.containsKey(fullPath)) {
removed = FileUtils.deleteQuietly(uploadSes... | synchronized boolean function(String fullPath) throws Exception { boolean removed = false; if (isHandledOnFileSystem()) { UploadSessionFile uploadSessionFile = getUploadSessionFile(fullPath); if (!currentFileWritings.containsKey(fullPath)) { removed = FileUtils.deleteQuietly(uploadSessionFile.getServerFile()); } } retu... | /**
* Removes from the upload session the file identified by the given identifier.
* If the file path is currently in writing mode, nothing is removed.
* @param fullPath the path of the file into the session.
* @return true of removed has been effective, false otherwise.
* @throws Exception
*/ | Removes from the upload session the file identified by the given identifier. If the file path is currently in writing mode, nothing is removed | remove | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/io/upload/UploadSession.java",
"license": "agpl-3.0",
"size": 12425
} | [
"org.apache.commons.io.FileUtils"
] | import org.apache.commons.io.FileUtils; | import org.apache.commons.io.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,927,044 |
public JsonElement toJson() throws IOException {
Map<String, Object> options = Maps.newHashMap();
for (String key : experimentalOptions.keySet()) {
options.put(key, experimentalOptions.get(key));
}
if (binary != null) {
options.put("binary", binary);
}
options.put("args", Immuta... | JsonElement function() throws IOException { Map<String, Object> options = Maps.newHashMap(); for (String key : experimentalOptions.keySet()) { options.put(key, experimentalOptions.get(key)); } if (binary != null) { options.put(STR, binary); } options.put("args", ImmutableList.copyOf(args)); List<String> encoded_extensi... | /**
* Converts this instance to its JSON representation.
*
* @return The JSON representation of these options.
* @throws IOException If an error occurs while reading the
* {@link #addExtensions(java.util.List) extension files} from disk.
*/ | Converts this instance to its JSON representation | toJson | {
"repo_name": "alb-i986/selenium",
"path": "java/client/src/org/openqa/selenium/opera/OperaOptions.java",
"license": "apache-2.0",
"size": 8506
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Lists",
"com.google.common.collect.Maps",
"com.google.common.io.Files",
"com.google.gson.Gson",
"com.google.gson.JsonElement",
"java.io.File",
"java.io.IOException",
"java.util.Base64",
"java.util.List",
"java.util.Map"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.io.Files; import com.google.gson.Gson; import com.google.gson.JsonElement; import java.io.File; import java.io.IOException; import java.util.Base64; import java.util.Li... | import com.google.common.collect.*; import com.google.common.io.*; import com.google.gson.*; import java.io.*; import java.util.*; | [
"com.google.common",
"com.google.gson",
"java.io",
"java.util"
] | com.google.common; com.google.gson; java.io; java.util; | 1,378,550 |
@Override
public LongBitSet acceptedGlobalOrdinals(SortedSetDocValues globalOrdinals) throws IOException {
LongBitSet acceptedGlobalOrdinals = new LongBitSet(globalOrdinals.getValueCount());
TermsEnum globalTermsEnum;
Terms globalTerms = new DocValuesTerms(globalOrdin... | LongBitSet function(SortedSetDocValues globalOrdinals) throws IOException { LongBitSet acceptedGlobalOrdinals = new LongBitSet(globalOrdinals.getValueCount()); TermsEnum globalTermsEnum; Terms globalTerms = new DocValuesTerms(globalOrdinals); globalTermsEnum = compiled.getTermsEnum(globalTerms); for (BytesRef term = gl... | /**
* Computes which global ordinals are accepted by this IncludeExclude instance.
*
*/ | Computes which global ordinals are accepted by this IncludeExclude instance | acceptedGlobalOrdinals | {
"repo_name": "naveenhooda2000/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/support/IncludeExclude.java",
"license": "apache-2.0",
"size": 27981
} | [
"java.io.IOException",
"java.util.SortedSet",
"org.apache.lucene.index.SortedSetDocValues",
"org.apache.lucene.index.Terms",
"org.apache.lucene.index.TermsEnum",
"org.apache.lucene.util.BytesRef",
"org.apache.lucene.util.LongBitSet"
] | import java.io.IOException; import java.util.SortedSet; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.LongBitSet; | import java.io.*; import java.util.*; import org.apache.lucene.index.*; import org.apache.lucene.util.*; | [
"java.io",
"java.util",
"org.apache.lucene"
] | java.io; java.util; org.apache.lucene; | 21,786 |
public static BreakIterator getLineInstance ()
{
return getLineInstance (Locale.getDefault());
} | static BreakIterator function () { return getLineInstance (Locale.getDefault()); } | /**
* This method returns an instance of <code>BreakIterator</code> that will
* iterate over line breaks as defined in the default locale.
*
* @return A <code>BreakIterator</code> instance for the default locale.
*/ | This method returns an instance of <code>BreakIterator</code> that will iterate over line breaks as defined in the default locale | getLineInstance | {
"repo_name": "aosm/gcc3",
"path": "libjava/java/text/BreakIterator.java",
"license": "gpl-2.0",
"size": 10639
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 52,769 |
protected void constructHops() {
try {
dmlTranslator.constructHops(dmlProgram);
} catch (LanguageException e) {
throw new MLContextException("Exception occurred while constructing HOPS (high-level operators)", e);
} catch (ParseException e) {
throw new MLContextException("Exception occurred while cons... | void function() { try { dmlTranslator.constructHops(dmlProgram); } catch (LanguageException e) { throw new MLContextException(STR, e); } catch (ParseException e) { throw new MLContextException(STR, e); } } | /**
* Construct DAGs of high-level operators (HOPs) for each block of
* statements.
*/ | Construct DAGs of high-level operators (HOPs) for each block of statements | constructHops | {
"repo_name": "asurve/arvind-sysml",
"path": "src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java",
"license": "apache-2.0",
"size": 22312
} | [
"org.apache.sysml.parser.LanguageException",
"org.apache.sysml.parser.ParseException"
] | import org.apache.sysml.parser.LanguageException; import org.apache.sysml.parser.ParseException; | import org.apache.sysml.parser.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 289,097 |
private void destroySubcontext(LdapContext context, final String dn) {
try {
NamingEnumeration<Binding> enumeration = null;
try {
enumeration = context.listBindings(dn);
while (enumeration.hasMore()) {
Binding binding = enumeratio... | void function(LdapContext context, final String dn) { try { NamingEnumeration<Binding> enumeration = null; try { enumeration = context.listBindings(dn); while (enumeration.hasMore()) { Binding binding = enumeration.next(); String name = binding.getNameInNamespace(); destroySubcontext(context, name); } context.unbind(dn... | /**
* <p>
* Destroys a subcontext with the given DN from the LDAP tree.
* </p>
*
* @param dn
*/ | Destroys a subcontext with the given DN from the LDAP tree. | destroySubcontext | {
"repo_name": "cfsnyder/keycloak",
"path": "federation/ldap/src/main/java/org/keycloak/federation/ldap/idm/store/ldap/LDAPOperationManager.java",
"license": "apache-2.0",
"size": 20342
} | [
"javax.naming.Binding",
"javax.naming.NamingEnumeration",
"javax.naming.ldap.LdapContext",
"org.keycloak.models.ModelException"
] | import javax.naming.Binding; import javax.naming.NamingEnumeration; import javax.naming.ldap.LdapContext; import org.keycloak.models.ModelException; | import javax.naming.*; import javax.naming.ldap.*; import org.keycloak.models.*; | [
"javax.naming",
"org.keycloak.models"
] | javax.naming; org.keycloak.models; | 137,447 |
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
private void showProgress(final boolean show) {
// On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
// for very easy animations. If available, use these APIs to fade-in
// the progress spinner.
if (Build.VERSION.SDK... | @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) void function(final boolean show) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime); | /**
* Shows the progress UI and hides the login form.
*/ | Shows the progress UI and hides the login form | showProgress | {
"repo_name": "avenwu/yoyo",
"path": "app/src/main/java/net/avenwu/yoyogithub/activity/LoginActivity.java",
"license": "apache-2.0",
"size": 12287
} | [
"android.annotation.TargetApi",
"android.os.Build"
] | import android.annotation.TargetApi; import android.os.Build; | import android.annotation.*; import android.os.*; | [
"android.annotation",
"android.os"
] | android.annotation; android.os; | 26,374 |
public static List<org.apache.hadoop.hbase.client.RegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
if (proto == null) return Collections.EMPTY_LIST;
List<org.apache.hadoop.hbase.client.RegionInfo> regionInfos = new ArrayList<>(proto.getRegionInfoList().size());
for (RegionInfo regionInfo:... | static List<org.apache.hadoop.hbase.client.RegionInfo> function(final GetOnlineRegionResponse proto) { if (proto == null) return Collections.EMPTY_LIST; List<org.apache.hadoop.hbase.client.RegionInfo> regionInfos = new ArrayList<>(proto.getRegionInfoList().size()); for (RegionInfo regionInfo: proto.getRegionInfoList())... | /**
* Get the list of region info from a GetOnlineRegionResponse
*
* @param proto the GetOnlineRegionResponse
* @return the list of region info or empty if <code>proto</code> is null
*/ | Get the list of region info from a GetOnlineRegionResponse | getRegionInfos | {
"repo_name": "ultratendency/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java",
"license": "apache-2.0",
"size": 132790
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos",
"org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos; import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos; | import java.util.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,562,094 |
public ServiceFuture<AccessPolicyResourceInner> getAsync(String resourceGroupName, String environmentName, String accessPolicyName, final ServiceCallback<AccessPolicyResourceInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, environmentName, accessPoli... | ServiceFuture<AccessPolicyResourceInner> function(String resourceGroupName, String environmentName, String accessPolicyName, final ServiceCallback<AccessPolicyResourceInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, environmentName, accessPolicyName), serviceCal... | /**
* Gets the access policy with the specified name in the specified environment.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param environmentName The name of the Time Series Insights environment associated with the specified resource group.
* @param accessPolicyName The ... | Gets the access policy with the specified name in the specified environment | getAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/timeseriesinsights/mgmt-v2017_11_15/src/main/java/com/microsoft/azure/management/timeseriesinsights/v2017_11_15/implementation/AccessPoliciesInner.java",
"license": "mit",
"size": 37008
} | [
"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,805,374 |
private String makeStackString() {
FrameObject o = currentFrame.getLast();
if (o == null)
return "<last frame>";
DebugInformation dd = o.compiled.getDebugInformation(o.prevPc);
if (dd.lineno < 0)
return "<system-frame>";
return String.format("<at module %s, line %s, char %s>", dd.module, dd.lineno, d... | String function() { FrameObject o = currentFrame.getLast(); if (o == null) return STR; DebugInformation dd = o.compiled.getDebugInformation(o.prevPc); if (dd.lineno < 0) return STR; return String.format(STR, dd.module, dd.lineno, dd.charno); } | /**
* Creates new stack line element of the current stack
* @return
*/ | Creates new stack line element of the current stack | makeStackString | {
"repo_name": "kozec/SimplePython",
"path": "src/me/enerccio/sp/interpret/PythonInterpreter.java",
"license": "lgpl-3.0",
"size": 41788
} | [
"me.enerccio.sp.interpret.CompiledBlockObject"
] | import me.enerccio.sp.interpret.CompiledBlockObject; | import me.enerccio.sp.interpret.*; | [
"me.enerccio.sp"
] | me.enerccio.sp; | 2,160,407 |
SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_STR);
try {
return dateFormat.parse(dateStr);
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
| SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT_STR); try { return dateFormat.parse(dateStr); } catch (ParseException e) { throw new RuntimeException(e); } } | /**
* Parses a string value into a date vale
* @param dateStr - string value
* @return date
*/ | Parses a string value into a date vale | parseDate | {
"repo_name": "firejack-open/Firejack-Platform",
"path": "core/src/main/java/net/firejack/platform/core/utils/DateUtils.java",
"license": "apache-2.0",
"size": 8311
} | [
"java.text.ParseException",
"java.text.SimpleDateFormat"
] | import java.text.ParseException; import java.text.SimpleDateFormat; | import java.text.*; | [
"java.text"
] | java.text; | 564,505 |
public void evictAll() throws IOException {
cache.evictAll();
} | void function() throws IOException { cache.evictAll(); } | /**
* Deletes all values stored in the cache. In-flight writes to the cache will complete normally,
* but the corresponding responses will not be stored.
*/ | Deletes all values stored in the cache. In-flight writes to the cache will complete normally, but the corresponding responses will not be stored | evictAll | {
"repo_name": "yuandong1234/yuandong-demo",
"path": "okhttp/src/main/java/okhttp3/Cache.java",
"license": "mit",
"size": 24964
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,793,821 |
public static boolean consumeVisFromWand(ItemStack wand, EntityPlayer player,
AspectList cost, boolean doit, boolean crafting) {
return ThaumcraftApi.internalMethods.consumeVisFromWand(wand, player, cost, doit, crafting);
}
| static boolean function(ItemStack wand, EntityPlayer player, AspectList cost, boolean doit, boolean crafting) { return ThaumcraftApi.internalMethods.consumeVisFromWand(wand, player, cost, doit, crafting); } | /**
* Use to subtract vis from a wand for most operations
* Wands store vis differently so "real" vis costs need to be multiplied by 100 before calling this method
* @param wand the wand itemstack
* @param player the player using the wand
* @param cost the cost of the operation.
* @param doit actually subt... | Use to subtract vis from a wand for most operations Wands store vis differently so "real" vis costs need to be multiplied by 100 before calling this method | consumeVisFromWand | {
"repo_name": "dexman545/Technofirma-Mod",
"path": "src/thaumcraft/thaumcraft/api/ThaumcraftApiHelper.java",
"license": "lgpl-2.1",
"size": 15527
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; | import net.minecraft.entity.player.*; import net.minecraft.item.*; | [
"net.minecraft.entity",
"net.minecraft.item"
] | net.minecraft.entity; net.minecraft.item; | 1,805,222 |
@Test
public void testH10() {
// train TM on noisy sequences with orphan decay turned off
Parameters p = Parameters.empty();
p.setParameterByKey(KEY.CELLS_PER_COLUMN, 4);
p.setParameterByKey(KEY.ACTIVATION_THRESHOLD, 8);
init(p, PATTERN_MACHINE);
assertTr... | void function() { Parameters p = Parameters.empty(); p.setParameterByKey(KEY.CELLS_PER_COLUMN, 4); p.setParameterByKey(KEY.ACTIVATION_THRESHOLD, 8); init(p, PATTERN_MACHINE); assertTrue(tm.getConnections().getPredictedSegmentDecrement() == 0); Integer[] shuffledNums = new Integer[] { 0, 17, 15, 1, 8, 5, 11, 3, 18, 16, ... | /**
* Orphan Decay mechanism reduce predicted inactive cells (extra predictions).
* Test feeds in noisy sequences (X = 0.05) to TM with and without orphan decay.
* TM with orphan decay should has many fewer predicted inactive columns.
* Parameters the same as B11, and sequences like H9.
*/ | Orphan Decay mechanism reduce predicted inactive cells (extra predictions). Test feeds in noisy sequences (X = 0.05) to TM with and without orphan decay. TM with orphan decay should has many fewer predicted inactive columns. Parameters the same as B11, and sequences like H9 | testH10 | {
"repo_name": "antidata/htm.java",
"path": "src/test/java/org/numenta/nupic/integration/ExtensiveTemporalMemoryTest.java",
"license": "agpl-3.0",
"size": 56623
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"java.util.Set",
"org.junit.Assert",
"org.numenta.nupic.Parameters",
"org.numenta.nupic.monitor.mixin.IndicesTrace",
"org.numenta.nupic.monitor.mixin.Metric"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Set; import org.junit.Assert; import org.numenta.nupic.Parameters; import org.numenta.nupic.monitor.mixin.IndicesTrace; import org.numenta.nupic.monitor.mixin.Metric; | import java.util.*; import org.junit.*; import org.numenta.nupic.*; import org.numenta.nupic.monitor.mixin.*; | [
"java.util",
"org.junit",
"org.numenta.nupic"
] | java.util; org.junit; org.numenta.nupic; | 385,539 |
MethodFactory getMethodFactory();
interface Literals {
EClass METHOD = eINSTANCE.getMethod();
EReference METHOD__LINKS = eINSTANCE.getMethod_Links();
EReference METHOD__NODES = eINSTANCE.getMethod_Nodes();
EClass NODE = eINSTANCE.getNode();
EAttribute NODE__ID = eINSTANCE.getNode_Id(... | MethodFactory getMethodFactory(); interface Literals { EClass METHOD = eINSTANCE.getMethod(); EReference METHOD__LINKS = eINSTANCE.getMethod_Links(); EReference METHOD__NODES = eINSTANCE.getMethod_Nodes(); EClass NODE = eINSTANCE.getNode(); EAttribute NODE__ID = eINSTANCE.getNode_Id(); EAttribute NODE__SOURCE = eINSTAN... | /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/ | Returns the factory that creates the instances of the model. | getMethodFactory | {
"repo_name": "CloudScale-Project/Environment",
"path": "plugins/eu.cloudscaleproject.env.method.common/src/eu/cloudscaleproject/env/method/common/method/MethodPackage.java",
"license": "epl-1.0",
"size": 68718
} | [
"org.eclipse.emf.ecore.EAttribute",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,083,349 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.