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
@ServiceMethod(returns = ReturnType.SINGLE) public void activateRevision(String resourceGroupName, String containerAppName, String name) { activateRevisionAsync(resourceGroupName, containerAppName, name).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) void function(String resourceGroupName, String containerAppName, String name) { activateRevisionAsync(resourceGroupName, containerAppName, name).block(); }
/** * Activates a revision for a Container App. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param containerAppName Name of the Container App. * @param name Name of the Container App Revision to activate. * @throws IllegalArgumentException throw...
Activates a revision for a Container App
activateRevision
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/ContainerAppsRevisionsClientImpl.java", "license": "mit", "size": 51756 }
[ "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;
527,294
public boolean isCheckBoxChecked(int index) { return checker.isButtonChecked(CheckBox.class, index); }
boolean function(int index) { return checker.isButtonChecked(CheckBox.class, index); }
/** * Checks if a CheckBox with a given index is checked. * * @param index of the {@link CheckBox} to check. {@code 0} if only one is available * @return {@code true} if {@link CheckBox} is checked and {@code false} if it is not checked * */
Checks if a CheckBox with a given index is checked
isCheckBoxChecked
{ "repo_name": "moizjv/robotium", "path": "robotium-solo/src/main/java/com/jayway/android/robotium/solo/Solo.java", "license": "apache-2.0", "size": 59557 }
[ "android.widget.CheckBox" ]
import android.widget.CheckBox;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,458,821
private static List<Pattern> toPatterns(final List<String> data) { final List<Pattern> patterns = new ArrayList<Pattern>(); for (final String item : data) { patterns.add(Pattern.compile(item)); } if (log.isDebugEnabled()) { for (final Pattern pattern : patte...
static List<Pattern> function(final List<String> data) { final List<Pattern> patterns = new ArrayList<Pattern>(); for (final String item : data) { patterns.add(Pattern.compile(item)); } if (log.isDebugEnabled()) { for (final Pattern pattern : patterns) { log.debug(STR, pattern.toString()); } } return patterns; }
/** * Compiles a list of string patterns into a list of Pattern objects. * * @param data List of strings to compile into patterns * @return a list of patterns */
Compiles a list of string patterns into a list of Pattern objects
toPatterns
{ "repo_name": "dlh3/acs-aem-commons", "path": "bundle/src/main/java/com/adobe/acs/commons/packaging/impl/ACLPackagerServletImpl.java", "license": "apache-2.0", "size": 17087 }
[ "java.util.ArrayList", "java.util.List", "java.util.regex.Pattern" ]
import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
1,165,529
public double getRunningAverageRssi(){ int sum = 0; int count = 0; synchronized (mRssiLog) { final Iterator<Long> it1 = mRssiLog.keySet().iterator(); while(it1.hasNext()){ count ++; sum += mRssiLog.get(it1.next()); } } // for(final Map.Entry<Long,Integer> e : mRssiLog.entrySet()){ // ...
double function(){ int sum = 0; int count = 0; synchronized (mRssiLog) { final Iterator<Long> it1 = mRssiLog.keySet().iterator(); while(it1.hasNext()){ count ++; sum += mRssiLog.get(it1.next()); } } if(count > 0){ return sum/count; } else { return 0; } }
/** * Gets the running average rssi. * * @return the running average rssi */
Gets the running average rssi
getRunningAverageRssi
{ "repo_name": "marianmoldovan/wheresmycardude", "path": "beacons/src/main/java/uk/co/alt236/bluetoothlelib/device/BluetoothLeDevice.java", "license": "gpl-3.0", "size": 10909 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
85,426
public DefaultComboBoxModel<String> getCommentIndicators() { return commentIndicators; }
DefaultComboBoxModel<String> function() { return commentIndicators; }
/** * <p>Getter for the field <code>commentIndicators</code>.</p> * * @return a {@link javax.swing.DefaultComboBoxModel} object. */
Getter for the field <code>commentIndicators</code>
getCommentIndicators
{ "repo_name": "EHJ-52n/sos-importer", "path": "wizard/src/main/java/org/n52/sos/importer/view/combobox/EditableComboBoxItems.java", "license": "gpl-2.0", "size": 14178 }
[ "javax.swing.DefaultComboBoxModel" ]
import javax.swing.DefaultComboBoxModel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,135,815
public static void unregisterPreference(LiveView v, String pref) { synchronized (sPrefsMap) { Set<String> prefs = sPrefsMap.get(v); // WeakHashSet: the value might have been removed. if (prefs != null) { prefs.remove(pref); } } }
static void function(LiveView v, String pref) { synchronized (sPrefsMap) { Set<String> prefs = sPrefsMap.get(v); if (prefs != null) { prefs.remove(pref); } } }
/** * Register a LiveView to be notified when this preference is updated. * * @param v * @param pref */
Register a LiveView to be notified when this preference is updated
unregisterPreference
{ "repo_name": "uahengojr/qksms", "path": "QKSMS/src/main/java/com/moez/QKSMS/common/LiveViewManager.java", "license": "gpl-3.0", "size": 4833 }
[ "com.moez.QKSMS", "java.util.Set" ]
import com.moez.QKSMS; import java.util.Set;
import com.moez.*; import java.util.*;
[ "com.moez", "java.util" ]
com.moez; java.util;
1,592,215
public UserLocalService getUserLocalService() { return userLocalService; }
UserLocalService function() { return userLocalService; }
/** * Returns the user local service. * * @return the user local service */
Returns the user local service
getUserLocalService
{ "repo_name": "p-gebhard/QuickAnswer", "path": "docroot/WEB-INF/src/it/gebhard/qa/service/base/NotificationLocalServiceBaseImpl.java", "license": "gpl-3.0", "size": 24421 }
[ "com.liferay.portal.service.UserLocalService" ]
import com.liferay.portal.service.UserLocalService;
import com.liferay.portal.service.*;
[ "com.liferay.portal" ]
com.liferay.portal;
1,711,035
private void refreshParametersString() { if (parameters != null) { parametersJSON = new ArrayNode(DMPPersistenceUtil.getJSONFactory()); for (final String parameter : parameters) { parametersJSON.add(parameter); } } if (null != parametersJSON && parametersJSON.size() > 0) { parametersStrin...
void function() { if (parameters != null) { parametersJSON = new ArrayNode(DMPPersistenceUtil.getJSONFactory()); for (final String parameter : parameters) { parametersJSON.add(parameter); } } if (null != parametersJSON && parametersJSON.size() > 0) { parametersString = parametersJSON.toString().getBytes(Charsets.UTF_8)...
/** * Refreshs the string that holds the serialised JSON object of the parameters list. This method should be called after every * manipulation of the parameters list (to keep the states consistent). */
Refreshs the string that holds the serialised JSON object of the parameters list. This method should be called after every manipulation of the parameters list (to keep the states consistent)
refreshParametersString
{ "repo_name": "janpolowinski/dswarm", "path": "persistence/src/main/java/org/dswarm/persistence/model/job/Function.java", "license": "apache-2.0", "size": 11170 }
[ "com.fasterxml.jackson.databind.node.ArrayNode", "com.google.common.base.Charsets", "org.dswarm.persistence.util.DMPPersistenceUtil" ]
import com.fasterxml.jackson.databind.node.ArrayNode; import com.google.common.base.Charsets; import org.dswarm.persistence.util.DMPPersistenceUtil;
import com.fasterxml.jackson.databind.node.*; import com.google.common.base.*; import org.dswarm.persistence.util.*;
[ "com.fasterxml.jackson", "com.google.common", "org.dswarm.persistence" ]
com.fasterxml.jackson; com.google.common; org.dswarm.persistence;
337,730
interface PollCompletionListener { void onPollResponse(EndpointResponse response);
interface PollCompletionListener { void onPollResponse(EndpointResponse response);
/** * Notified when a response from an endpoint is received. * * @param response the response from the endpoint */
Notified when a response from an endpoint is received
onPollResponse
{ "repo_name": "pushtechnology/diffusion-rest-adapter", "path": "metrics/metrics-listeners/src/main/java/com/pushtechnology/adapters/rest/metrics/listeners/PollListener.java", "license": "apache-2.0", "size": 2023 }
[ "com.pushtechnology.adapters.rest.polling.EndpointResponse" ]
import com.pushtechnology.adapters.rest.polling.EndpointResponse;
import com.pushtechnology.adapters.rest.polling.*;
[ "com.pushtechnology.adapters" ]
com.pushtechnology.adapters;
2,462,635
@Override @SuppressWarnings( "unused" ) public @Nullable Object resolveObject( final @Nullable Object obj ) throws IOException { return obj; }
@SuppressWarnings( STR ) @Nullable Object function( final @Nullable Object obj ) throws IOException { return obj; }
/** * This implementation does not attempt to resolve the object and returns * the same instance without modification. * * @see org.gamegineer.common.persistence.serializable.IPersistenceDelegate#resolveObject(java.lang.Object) */
This implementation does not attempt to resolve the object and returns the same instance without modification
resolveObject
{ "repo_name": "gamegineer/dev", "path": "main/common/org.gamegineer.common.persistence/src/org/gamegineer/common/persistence/serializable/AbstractPersistenceDelegate.java", "license": "gpl-3.0", "size": 3889 }
[ "java.io.IOException", "org.eclipse.jdt.annotation.Nullable" ]
import java.io.IOException; import org.eclipse.jdt.annotation.Nullable;
import java.io.*; import org.eclipse.jdt.annotation.*;
[ "java.io", "org.eclipse.jdt" ]
java.io; org.eclipse.jdt;
1,924,485
public String[] getRoles(HttpServletRequest request) { return new String[]{Constants.BLOG_ADMIN_ROLE, Constants.BLOG_OWNER_ROLE, Constants.BLOG_PUBLISHER_ROLE, Constants.BLOG_CONTRIBUTOR_ROLE}; }
String[] function(HttpServletRequest request) { return new String[]{Constants.BLOG_ADMIN_ROLE, Constants.BLOG_OWNER_ROLE, Constants.BLOG_PUBLISHER_ROLE, Constants.BLOG_CONTRIBUTOR_ROLE}; }
/** * Gets a list of all roles that are allowed to access this action. * * @return an array of Strings representing role names * @param request */
Gets a list of all roles that are allowed to access this action
getRoles
{ "repo_name": "arshadalisoomro/pebble", "path": "src/main/java/net/sourceforge/pebble/web/action/RemoveRefererFiltersAction.java", "license": "bsd-3-clause", "size": 3328 }
[ "javax.servlet.http.HttpServletRequest", "net.sourceforge.pebble.Constants" ]
import javax.servlet.http.HttpServletRequest; import net.sourceforge.pebble.Constants;
import javax.servlet.http.*; import net.sourceforge.pebble.*;
[ "javax.servlet", "net.sourceforge.pebble" ]
javax.servlet; net.sourceforge.pebble;
1,248,970
protected MimeMessage loadMessage() throws Exception { return null; }
MimeMessage function() throws Exception { return null; }
/** * mandatory override to make the message available */
mandatory override to make the message available
loadMessage
{ "repo_name": "apache/james-postage", "path": "src/main/java/org/apache/james/postage/mail/MailAnalyzeStrategy.java", "license": "apache-2.0", "size": 3809 }
[ "javax.mail.internet.MimeMessage" ]
import javax.mail.internet.MimeMessage;
import javax.mail.internet.*;
[ "javax.mail" ]
javax.mail;
1,291,696
public void setMaxShare(Resource resource) { maxShareMB.set(resource.getMemorySize()); maxShareVCores.set(resource.getVirtualCores()); if (customResources != null) { customResources.setMaxShare(resource); } }
void function(Resource resource) { maxShareMB.set(resource.getMemorySize()); maxShareVCores.set(resource.getVirtualCores()); if (customResources != null) { customResources.setMaxShare(resource); } }
/** * Set maximum allowed resource share for queue. * * @param resource the passed {@link Resource} object may also contain custom * resource types */
Set maximum allowed resource share for queue
setMaxShare
{ "repo_name": "steveloughran/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueueMetrics.java", "license": "apache-2.0", "size": 12127 }
[ "org.apache.hadoop.yarn.api.records.Resource" ]
import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
399,800
private ZabbixRequest assertZabbixRequestBasic(int inx, ZabbixProtocolType protocolType) { Assert.assertNotNull(requests); Assert.assertTrue(requests.size() > inx); ZabbixRequest request = (ZabbixRequest) requests.get(inx); Assert.assertEquals(protocolType, request.getType()); ...
ZabbixRequest function(int inx, ZabbixProtocolType protocolType) { Assert.assertNotNull(requests); Assert.assertTrue(requests.size() > inx); ZabbixRequest request = (ZabbixRequest) requests.get(inx); Assert.assertEquals(protocolType, request.getType()); return request; }
/** * Verify zabbix request basic info */
Verify zabbix request basic info
assertZabbixRequestBasic
{ "repo_name": "ascrutae/sky-walking", "path": "oap-server/server-receiver-plugin/skywalking-zabbix-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/zabbix/provider/ZabbixBaseTest.java", "license": "apache-2.0", "size": 12613 }
[ "org.apache.skywalking.oap.server.receiver.zabbix.provider.protocol.bean.ZabbixProtocolType", "org.apache.skywalking.oap.server.receiver.zabbix.provider.protocol.bean.ZabbixRequest", "org.junit.Assert" ]
import org.apache.skywalking.oap.server.receiver.zabbix.provider.protocol.bean.ZabbixProtocolType; import org.apache.skywalking.oap.server.receiver.zabbix.provider.protocol.bean.ZabbixRequest; import org.junit.Assert;
import org.apache.skywalking.oap.server.receiver.zabbix.provider.protocol.bean.*; import org.junit.*;
[ "org.apache.skywalking", "org.junit" ]
org.apache.skywalking; org.junit;
545,381
//----------------------------------------------------------------------- private static void innerListFiles(Collection<File> files, File directory, IOFileFilter filter, boolean includeSubDirectories) { File[] found = directory.listFiles((FileFilter) filter); if (found != null...
static void function(Collection<File> files, File directory, IOFileFilter filter, boolean includeSubDirectories) { File[] found = directory.listFiles((FileFilter) filter); if (found != null) { for (File file : found) { if (file.isDirectory()) { if (includeSubDirectories) { files.add(file); } innerListFiles(files, file,...
/** * Finds files within a given directory (and optionally its * subdirectories). All files found are filtered by an IOFileFilter. * * @param files the collection of files found. * @param directory the directory to search in. * @param filter the filter to apply to files and directori...
Finds files within a given directory (and optionally its subdirectories). All files found are filtered by an IOFileFilter
innerListFiles
{ "repo_name": "0x90sled/droidtowers", "path": "main/source/org/apach3/commons/io/FileUtils.java", "license": "mit", "size": 112889 }
[ "java.io.File", "java.io.FileFilter", "java.util.Collection", "org.apach3.commons.io.filefilter.IOFileFilter" ]
import java.io.File; import java.io.FileFilter; import java.util.Collection; import org.apach3.commons.io.filefilter.IOFileFilter;
import java.io.*; import java.util.*; import org.apach3.commons.io.filefilter.*;
[ "java.io", "java.util", "org.apach3.commons" ]
java.io; java.util; org.apach3.commons;
1,637,066
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jvmArgs = new javax.swing.JLabel(); myJvmArgs = new javax.swing.JTextField(); styleLbl = new javax.swing.JLabel(); myStyle...
@SuppressWarnings(STR) void function() { jvmArgs = new javax.swing.JLabel(); myJvmArgs = new javax.swing.JTextField(); styleLbl = new javax.swing.JLabel(); myStyle = new javax.swing.JComboBox(); threadsLbl = new javax.swing.JLabel(); myThreads = new NumericSpinner(1); logLbl = new javax.swing.JLabel(); myLogLevel = new...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "vaadin/netbeans-plugin", "path": "src/org/vaadin/netbeans/maven/project/GwtCompilerOptionsPanel.java", "license": "apache-2.0", "size": 23538 }
[ "javax.swing.JCheckBox", "org.netbeans.modules.maven.model.ModelOperation", "org.netbeans.modules.maven.model.pom.POMModel", "org.openide.util.NbBundle", "org.vaadin.netbeans.customizer.NumericSpinner" ]
import javax.swing.JCheckBox; import org.netbeans.modules.maven.model.ModelOperation; import org.netbeans.modules.maven.model.pom.POMModel; import org.openide.util.NbBundle; import org.vaadin.netbeans.customizer.NumericSpinner;
import javax.swing.*; import org.netbeans.modules.maven.model.*; import org.netbeans.modules.maven.model.pom.*; import org.openide.util.*; import org.vaadin.netbeans.customizer.*;
[ "javax.swing", "org.netbeans.modules", "org.openide.util", "org.vaadin.netbeans" ]
javax.swing; org.netbeans.modules; org.openide.util; org.vaadin.netbeans;
2,165,964
private void printByIndex(SecondaryDatabase secDb) throws DatabaseException { DatabaseEntry secKey = new DatabaseEntry(); DatabaseEntry priKey = new DatabaseEntry(); DatabaseEntry priData = new DatabaseEntry(); SecondaryCursor cursor = secDb.openSecondaryCursor(null, null);...
void function(SecondaryDatabase secDb) throws DatabaseException { DatabaseEntry secKey = new DatabaseEntry(); DatabaseEntry priKey = new DatabaseEntry(); DatabaseEntry priData = new DatabaseEntry(); SecondaryCursor cursor = secDb.openSecondaryCursor(null, null); try { while (cursor.getNext(secKey, priKey, priData, null...
/** * Prints all person records by a given secondary index. */
Prints all person records by a given secondary index
printByIndex
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/examples/je/ToManyExample.java", "license": "apache-2.0", "size": 15921 }
[ "com.sleepycat.je.DatabaseEntry", "com.sleepycat.je.DatabaseException", "com.sleepycat.je.OperationStatus", "com.sleepycat.je.SecondaryCursor", "com.sleepycat.je.SecondaryDatabase" ]
import com.sleepycat.je.DatabaseEntry; import com.sleepycat.je.DatabaseException; import com.sleepycat.je.OperationStatus; import com.sleepycat.je.SecondaryCursor; import com.sleepycat.je.SecondaryDatabase;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
1,581,305
@Test public void testCancelQueryWithPartitions() throws Exception { Affinity<Object> aff = ignite.affinity(DEFAULT_CACHE_NAME); int halfOfNodeParts = PARTS_CNT / 4; int[] firstParts = stream(aff.primaryPartitions(grid(0).localNode())).limit(halfOfNodeParts).toArray(); int[] se...
void function() throws Exception { Affinity<Object> aff = ignite.affinity(DEFAULT_CACHE_NAME); int halfOfNodeParts = PARTS_CNT / 4; int[] firstParts = stream(aff.primaryPartitions(grid(0).localNode())).limit(halfOfNodeParts).toArray(); int[] secondParts = stream(aff.primaryPartitions(grid(1).localNode())).limit(halfOfN...
/** * Test if user specified partitions for query explicitly, such query is cancealble. * * We check 3 scenarious in which partitions are belong to: 1) only first node <br/> 2) only second node <br/> 3) * some to first, the others to second <br/> */
Test if user specified partitions for query explicitly, such query is cancealble. We check 3 scenarious in which partitions are belong to: 1) only first node 2) only second node 3) some to first, the others to second
testCancelQueryWithPartitions
{ "repo_name": "SomeFire/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/KillQueryTest.java", "license": "apache-2.0", "size": 56085 }
[ "java.util.Arrays", "java.util.stream.IntStream", "org.apache.ignite.cache.affinity.Affinity" ]
import java.util.Arrays; import java.util.stream.IntStream; import org.apache.ignite.cache.affinity.Affinity;
import java.util.*; import java.util.stream.*; import org.apache.ignite.cache.affinity.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
792,409
public int delete(Long uuid, Long versionId) throws FileException;
int function(Long uuid, Long versionId) throws FileException;
/** * Delete a file from the repository. If this makes the directory * empty, then the directory should be deleted. * * @return 1 if deleted okay, 0 if file not found, -1 if file found but a delete error occured. */
Delete a file from the repository. If this makes the directory empty, then the directory should be deleted
delete
{ "repo_name": "lamsfoundation/lams", "path": "lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/IFileDAO.java", "license": "gpl-2.0", "size": 2393 }
[ "org.lamsfoundation.lams.contentrepository.exception.FileException" ]
import org.lamsfoundation.lams.contentrepository.exception.FileException;
import org.lamsfoundation.lams.contentrepository.exception.*;
[ "org.lamsfoundation.lams" ]
org.lamsfoundation.lams;
306,485
public ContentSource updateRepoUrl(User loggedInUser, String label, String url) { ContentSource repo = lookupContentSourceByLabel(label, loggedInUser.getOrg()); setRepoUrl(repo, url); ChannelFactory.save(repo); return repo; }
ContentSource function(User loggedInUser, String label, String url) { ContentSource repo = lookupContentSourceByLabel(label, loggedInUser.getOrg()); setRepoUrl(repo, url); ChannelFactory.save(repo); return repo; }
/** * Updates repository source URL * @param loggedInUser The current user * @param label of the repo to use * @param url new URL to use * @return the updated repo * * @xmlrpc.doc Updates repository source URL * @xmlrpc.param #session_key() * @xmlrpc.param #param_desc("string", "labe...
Updates repository source URL
updateRepoUrl
{ "repo_name": "PaulWay/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java", "license": "gpl-2.0", "size": 127025 }
[ "com.redhat.rhn.domain.channel.ChannelFactory", "com.redhat.rhn.domain.channel.ContentSource", "com.redhat.rhn.domain.user.User" ]
import com.redhat.rhn.domain.channel.ChannelFactory; import com.redhat.rhn.domain.channel.ContentSource; import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.user.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
2,650,384
protected void emit_aAirStat_WSTerminalRuleCall_15_0_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
/** * Syntax: * WS? */
Syntax: WS
emit_aAirStat_WSTerminalRuleCall_15_0_q
{ "repo_name": "cooked/NDT", "path": "sc.ndt.editor.fast.adn/src-gen/sc/ndt/editor/fast/serializer/FastadnSyntacticSequencer.java", "license": "gpl-3.0", "size": 49272 }
[ "java.util.List", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.nodemodel.INode", "org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider" ]
import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider;
import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.xtext" ]
java.util; org.eclipse.emf; org.eclipse.xtext;
290,649
private static ImmutableSortedMap<String, ResourceRecordSet> defaultRecords(ManagedZone zone) { ResourceRecordSet soa = new ResourceRecordSet(); soa.setTtl(21600); soa.setName(zone.getDnsName()); soa.setRrdatas(ImmutableList.of( // taken from the service "ns-cloud-c1.googledomains.com....
static ImmutableSortedMap<String, ResourceRecordSet> function(ManagedZone zone) { ResourceRecordSet soa = new ResourceRecordSet(); soa.setTtl(21600); soa.setName(zone.getDnsName()); soa.setRrdatas(ImmutableList.of( STR )); soa.setType("SOA"); ResourceRecordSet ns = new ResourceRecordSet(); ns.setTtl(21600); ns.setName(...
/** * Prepares record sets that are created by default for each zone. */
Prepares record sets that are created by default for each zone
defaultRecords
{ "repo_name": "aozarov/gcloud-java", "path": "gcloud-java-dns/src/main/java/com/google/cloud/dns/testing/LocalDnsHelper.java", "license": "apache-2.0", "size": 50076 }
[ "com.google.api.services.dns.model.ManagedZone", "com.google.api.services.dns.model.ResourceRecordSet", "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableSet", "com.google.common.collect.ImmutableSortedMap" ]
import com.google.api.services.dns.model.ManagedZone; import com.google.api.services.dns.model.ResourceRecordSet; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedMap;
import com.google.api.services.dns.model.*; import com.google.common.collect.*;
[ "com.google.api", "com.google.common" ]
com.google.api; com.google.common;
1,792,759
public void prepare() { synchronized (this.preparationMonitor) { if (this.server != null) { this.serverToUse = this.server; } else { this.serverToUse = null; this.serverToUse = this.connector.connect(this.serviceUrl, this.environment, this.agentId); } this.invocationHandler = null; if...
void function() { synchronized (this.preparationMonitor) { if (this.server != null) { this.serverToUse = this.server; } else { this.serverToUse = null; this.serverToUse = this.connector.connect(this.serviceUrl, this.environment, this.agentId); } this.invocationHandler = null; if (this.useStrictCasing) { if (JmxUtils.is...
/** * Ensures that an {@code MBeanServerConnection} is configured and attempts * to detect a local connection if one is not supplied. */
Ensures that an MBeanServerConnection is configured and attempts to detect a local connection if one is not supplied
prepare
{ "repo_name": "kingtang/spring-learn", "path": "spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java", "license": "gpl-3.0", "size": 23100 }
[ "javax.management.JMX", "javax.management.MBeanServerInvocationHandler", "org.springframework.jmx.support.JmxUtils" ]
import javax.management.JMX; import javax.management.MBeanServerInvocationHandler; import org.springframework.jmx.support.JmxUtils;
import javax.management.*; import org.springframework.jmx.support.*;
[ "javax.management", "org.springframework.jmx" ]
javax.management; org.springframework.jmx;
1,195,873
@Generated @Selector("requestImageForAsset:targetSize:contentMode:options:resultHandler:") public native int requestImageForAssetTargetSizeContentModeOptionsResultHandler(PHAsset asset, @ByValue CGSize targetSize, @NInt long contentMode, PHImageRequestOptions options, @ObjCBlock(name...
@Selector(STR) native int function(PHAsset asset, @ByValue CGSize targetSize, @NInt long contentMode, PHImageRequestOptions options, @ObjCBlock(name = STR) Block_requestImageForAssetTargetSizeContentModeOptionsResultHandler resultHandler);
/** * Request an image representation for the specified asset. * * @param asset The asset whose image data is to be loaded. * @param targetSize The target size of image to be returned. * @param contentMode An option for how to fit the image to the aspect ratio of the requested size...
Request an image representation for the specified asset
requestImageForAssetTargetSizeContentModeOptionsResultHandler
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/photos/PHImageManager.java", "license": "apache-2.0", "size": 15483 }
[ "org.moe.natj.general.ann.ByValue", "org.moe.natj.general.ann.NInt", "org.moe.natj.objc.ann.ObjCBlock", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.ByValue; import org.moe.natj.general.ann.NInt; import org.moe.natj.objc.ann.ObjCBlock; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,126,952
@Deprecated @Override public Future<Integer> write(ByteBuffer src) { return this.channel.write(src); }
Future<Integer> function(ByteBuffer src) { return this.channel.write(src); }
/** * Write a sequence of bytes to this channel from the given buffer. * * @param src * The buffer from which bytes are to be retrieved * @return an instance of {@link java.util.concurrent.Future} containing the * number of bytes written * @see java.nio.channels.AsynchronousByteChannel...
Write a sequence of bytes to this channel from the given buffer
write
{ "repo_name": "benothman/jboss-web-nio2", "path": "java/org/apache/tomcat/util/net/NioChannel.java", "license": "lgpl-3.0", "size": 42382 }
[ "java.nio.ByteBuffer", "java.util.concurrent.Future" ]
import java.nio.ByteBuffer; import java.util.concurrent.Future;
import java.nio.*; import java.util.concurrent.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
2,643,747
public Root getCoverageMetadataDirectory() { return outputRoots.coverageMetadataDirectory; }
Root function() { return outputRoots.coverageMetadataDirectory; }
/** * Returns the directory where coverage-related artifacts and metadata files * should be stored. This includes for example uninstrumented class files * needed for Jacoco's coverage reporting tools. */
Returns the directory where coverage-related artifacts and metadata files should be stored. This includes for example uninstrumented class files needed for Jacoco's coverage reporting tools
getCoverageMetadataDirectory
{ "repo_name": "rohitsaboo/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java", "license": "apache-2.0", "size": 95388 }
[ "com.google.devtools.build.lib.actions.Root" ]
import com.google.devtools.build.lib.actions.Root;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
1,940,450
public void testTimedInvokeAny1() throws Throwable { ExecutorService e = new ForkJoinPool(1); PoolCleaner cleaner = null; try { cleaner = cleaner(e); try { e.invokeAny(null, randomTimeout(), randomTimeUnit()); shouldThrow(); ...
void function() throws Throwable { ExecutorService e = new ForkJoinPool(1); PoolCleaner cleaner = null; try { cleaner = cleaner(e); try { e.invokeAny(null, randomTimeout(), randomTimeUnit()); shouldThrow(); } catch (NullPointerException success) {} } finally { if (cleaner != null) { cleaner.close(); } } }
/** * timed invokeAny(null) throws NullPointerException */
timed invokeAny(null) throws NullPointerException
testTimedInvokeAny1
{ "repo_name": "streamsupport/streamsupport", "path": "src/tests/java/org/openjdk/tests/tck/ForkJoinPoolTest.java", "license": "gpl-2.0", "size": 41090 }
[ "java.util.concurrent.ExecutorService" ]
import java.util.concurrent.ExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,055,683
protected static Configuration createConfiguration(MutableContext context) { Map<String, MutableInstance> instances = context.getInstances(); return new MutableConfiguration(instances); }
static Configuration function(MutableContext context) { Map<String, MutableInstance> instances = context.getInstances(); return new MutableConfiguration(instances); }
/** * Returns a {@link Configuration} from the instances passed in. * * @param instances * The root instances for which we need a {@link Configuration}. * @return The {@link Configuration} from the instances passed in. */
Returns a <code>Configuration</code> from the instances passed in
createConfiguration
{ "repo_name": "wspringer/spring-me", "path": "spring-me-core/src/main/java/me/springframework/di/spring/SpringConfigurationLoader.java", "license": "gpl-2.0", "size": 19518 }
[ "java.util.Map", "me.springframework.di.Configuration", "me.springframework.di.base.MutableConfiguration", "me.springframework.di.base.MutableContext", "me.springframework.di.base.MutableInstance" ]
import java.util.Map; import me.springframework.di.Configuration; import me.springframework.di.base.MutableConfiguration; import me.springframework.di.base.MutableContext; import me.springframework.di.base.MutableInstance;
import java.util.*; import me.springframework.di.*; import me.springframework.di.base.*;
[ "java.util", "me.springframework.di" ]
java.util; me.springframework.di;
1,308,672
@Test public void testDeletePackets_OutPacket() throws Exception { PacketQueue queue = new OutPacketQueue(); queue.enqueuePacket(new OutPacket()); Response result = Whitebox.invokeMethod(target, "deletePackets", queue); assertThat(result.statusCode, is(Response.OK)); PacketSta...
void function() throws Exception { PacketQueue queue = new OutPacketQueue(); queue.enqueuePacket(new OutPacket()); Response result = Whitebox.invokeMethod(target, STR, queue); assertThat(result.statusCode, is(Response.OK)); PacketStatus status = queue.getPacketStatus(); assertThat(status.getOutStatus().packetQueueCount...
/** * Test method for {@link org.o3project.odenos.core.component.network.Network#deletePackets(PacketQueue)}. * * @throws Exception */
Test method for <code>org.o3project.odenos.core.component.network.Network#deletePackets(PacketQueue)</code>
testDeletePackets_OutPacket
{ "repo_name": "y-higuchi/odenos", "path": "src/test/java/org/o3project/odenos/core/component/network/NetworkTest.java", "license": "apache-2.0", "size": 116642 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert", "org.o3project.odenos.core.component.network.packet.OutPacket", "org.o3project.odenos.core.component.network.packet.OutPacketQueue", "org.o3project.odenos.core.component.network.packet.PacketQueue", "org.o3project.odenos.core.component.network.packet.Packet...
import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.o3project.odenos.core.component.network.packet.OutPacket; import org.o3project.odenos.core.component.network.packet.OutPacketQueue; import org.o3project.odenos.core.component.network.packet.PacketQueue; import org.o3project.odenos.core.component.netw...
import org.hamcrest.*; import org.junit.*; import org.o3project.odenos.core.component.network.packet.*; import org.o3project.odenos.remoteobject.message.*; import org.powermock.reflect.*;
[ "org.hamcrest", "org.junit", "org.o3project.odenos", "org.powermock.reflect" ]
org.hamcrest; org.junit; org.o3project.odenos; org.powermock.reflect;
1,632,219
public static String getOCSPURL(X509Certificate certificate) throws CertificateParsingException { try { DERObject obj = getExtensionValue(certificate, X509Extensions.AuthorityInfoAccess.getId()); if (obj == null) { return null; } A...
static String function(X509Certificate certificate) throws CertificateParsingException { try { DERObject obj = getExtensionValue(certificate, X509Extensions.AuthorityInfoAccess.getId()); if (obj == null) { return null; } ASN1Sequence AccessDescriptions = (ASN1Sequence) obj; for (int i = 0; i < AccessDescriptions.size()...
/** * Retrieves the OCSP URL from the given certificate. * @param certificate the certificate * @return the URL or null * @throws CertificateParsingException on error * @since 2.1.6 */
Retrieves the OCSP URL from the given certificate
getOCSPURL
{ "repo_name": "bullda/DroidText", "path": "src/core/com/lowagie/text/pdf/PdfPKCS7.java", "license": "lgpl-3.0", "size": 68093 }
[ "java.security.cert.CertificateParsingException", "java.security.cert.X509Certificate" ]
import java.security.cert.CertificateParsingException; import java.security.cert.X509Certificate;
import java.security.cert.*;
[ "java.security" ]
java.security;
2,785,575
public Operator getUnaryOperator() { return unaryOperator; }
Operator function() { return unaryOperator; }
/** * Returns the unary operator for this tree. * * @return The unary operator of this tree. */
Returns the unary operator for this tree
getUnaryOperator
{ "repo_name": "yvbbrjdr/yv3A-android", "path": "yv3DAudio/src/net/sourceforge/jeval/ExpressionTree.java", "license": "gpl-2.0", "size": 11828 }
[ "net.sourceforge.jeval.operator.Operator" ]
import net.sourceforge.jeval.operator.Operator;
import net.sourceforge.jeval.operator.*;
[ "net.sourceforge.jeval" ]
net.sourceforge.jeval;
184,978
public WFSTransformedResponse getWfsResponseAsKml(String wfsUrl, String featureType, String filterString, Integer maxFeatures, String srs) throws PortalServiceException, URISyntaxException { HttpRequestBase method = generateWFSRequest(wfsUrl, featureType, null, filterString, maxFeatures, srs, ResultType.Re...
WFSTransformedResponse function(String wfsUrl, String featureType, String filterString, Integer maxFeatures, String srs) throws PortalServiceException, URISyntaxException { HttpRequestBase method = generateWFSRequest(wfsUrl, featureType, null, filterString, maxFeatures, srs, ResultType.Results); return doRequestAndKmlT...
/** * Makes a WFS GetFeature request constrained by the specified parameters * * The response is returned as a String in both GML and KML forms. * @param wfsUrl the web feature service url * @param featureType the type name * @param filterString A OGC filter string to constrain the r...
Makes a WFS GetFeature request constrained by the specified parameters The response is returned as a String in both GML and KML forms
getWfsResponseAsKml
{ "repo_name": "Adam-Brown/AuScope-Portal", "path": "src/main/java/org/auscope/portal/server/web/service/WFSService.java", "license": "gpl-3.0", "size": 7215 }
[ "java.net.URISyntaxException", "org.apache.http.client.methods.HttpRequestBase", "org.auscope.portal.core.services.PortalServiceException", "org.auscope.portal.core.services.methodmakers.WFSGetFeatureMethodMaker", "org.auscope.portal.core.services.responses.wfs.WFSTransformedResponse" ]
import java.net.URISyntaxException; import org.apache.http.client.methods.HttpRequestBase; import org.auscope.portal.core.services.PortalServiceException; import org.auscope.portal.core.services.methodmakers.WFSGetFeatureMethodMaker; import org.auscope.portal.core.services.responses.wfs.WFSTransformedResponse;
import java.net.*; import org.apache.http.client.methods.*; import org.auscope.portal.core.services.*; import org.auscope.portal.core.services.methodmakers.*; import org.auscope.portal.core.services.responses.wfs.*;
[ "java.net", "org.apache.http", "org.auscope.portal" ]
java.net; org.apache.http; org.auscope.portal;
856,822
private void updateControlBackground( Control control, String expression ) { String bindingName = exprCodec.getBindingName( expression ); ColorPalette.getInstance( ).putColor( bindingName ); control.setBackground( ColorPalette.getInstance( ) .getColor( bindingName ) ); }
void function( Control control, String expression ) { String bindingName = exprCodec.getBindingName( expression ); ColorPalette.getInstance( ).putColor( bindingName ); control.setBackground( ColorPalette.getInstance( ) .getColor( bindingName ) ); }
/** * Binding color to specified control. * * @param control * @param expression * @since 2.5 */
Binding color to specified control
updateControlBackground
{ "repo_name": "sguan-actuate/birt", "path": "chart/org.eclipse.birt.chart.ui/src/org/eclipse/birt/chart/ui/swt/DataDefinitionTextManager.java", "license": "epl-1.0", "size": 10423 }
[ "org.eclipse.swt.widgets.Control" ]
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,728,327
private void handleCacheStreamException(Exception e) { if (Throwables.getRootCause(e) instanceof AlreadyExistsException) { // This can happen if there are two readers trying to cache the same block. The first one // created the block (either as temp block or committed block). The second sees this ...
void function(Exception e) { if (Throwables.getRootCause(e) instanceof AlreadyExistsException) { LOG.info( STR + STR, getCurrentBlockId()); } else { LOG.warn(STR, getCurrentBlockId()); } closeOrCancelCacheStream(); }
/** * Handles IO exceptions thrown in response to the worker cache request. Cache stream is closed * or cancelled after logging some messages about the exceptions. * * @param e the exception to handle */
Handles IO exceptions thrown in response to the worker cache request. Cache stream is closed or cancelled after logging some messages about the exceptions
handleCacheStreamException
{ "repo_name": "WilliamZapata/alluxio", "path": "core/client/fs/src/main/java/alluxio/client/file/FileInStream.java", "license": "apache-2.0", "size": 26008 }
[ "com.google.common.base.Throwables" ]
import com.google.common.base.Throwables;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,910,150
protected void addHolderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Token_holder_feature"), getString("_UI_PropertyDescriptor_descriptio...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ActivitydiagramPackage.Literals.TOKEN__HOLDER, true, false, true, null, null, null)); }
/** * This adds a property descriptor for the Holder feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Holder feature.
addHolderPropertyDescriptor
{ "repo_name": "gemoc/activitydiagram", "path": "dev/gemoc_concurrent/language_workbench/org.gemoc.activitydiagram.concurrent.xactivitydiagram.edit/src/org/gemoc/activitydiagram/concurrent/xactivitydiagram/activitydiagram/provider/TokenItemProvider.java", "license": "epl-1.0", "size": 4126 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.gemoc.activitydiagram.concurrent.xactivitydiagram.activitydiagram.ActivitydiagramPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.gemoc.activitydiagram.concurrent.xactivitydiagram.activitydiagram.ActivitydiagramPackage;
import org.eclipse.emf.edit.provider.*; import org.gemoc.activitydiagram.concurrent.xactivitydiagram.activitydiagram.*;
[ "org.eclipse.emf", "org.gemoc.activitydiagram" ]
org.eclipse.emf; org.gemoc.activitydiagram;
1,522,522
@Override public Adapter createParamVariableAdapter() { if (paramVariableItemProvider == null) { paramVariableItemProvider = new ParamVariableItemProvider(this); } return paramVariableItemProvider; }
Adapter function() { if (paramVariableItemProvider == null) { paramVariableItemProvider = new ParamVariableItemProvider(this); } return paramVariableItemProvider; }
/** * This creates an adapter for a {@link klaper.core.ParamVariable}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>klaper.core.ParamVariable</code>.
createParamVariableAdapter
{ "repo_name": "aciancone/klapersuite", "path": "klapersuite.metamodel.klaper.edit/src/klaper/core/provider/CoreItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 20915 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,190,979
public void testApexComponentTemplate() { final TemplateRegistry templateRegistry = IdeTestUtil.getTemplateRegistry(); // There should be 0 apex component template. assertEquals(Constants.APEX_COMPONENT + " template count should be " + NUM_OF_APEX_COMPONENT_TEMPLATES, NUM_OF_APEX...
void function() { final TemplateRegistry templateRegistry = IdeTestUtil.getTemplateRegistry(); assertEquals(Constants.APEX_COMPONENT + STR + NUM_OF_APEX_COMPONENT_TEMPLATES, NUM_OF_APEX_COMPONENT_TEMPLATES, templateRegistry.componentTemplateCount(Constants.APEX_COMPONENT)); final String apexComponentTemplate = template...
/** * Test for apex component template */
Test for apex component template
testApexComponentTemplate
{ "repo_name": "PatrickSHYee/idecore", "path": "com.salesforce.ide.core.test/src/com/salesforce/ide/core/internal/templates/TemplateRegistryTest_unit.java", "license": "epl-1.0", "size": 6629 }
[ "com.salesforce.ide.core.internal.utils.Constants", "com.salesforce.ide.test.common.utils.IdeTestUtil" ]
import com.salesforce.ide.core.internal.utils.Constants; import com.salesforce.ide.test.common.utils.IdeTestUtil;
import com.salesforce.ide.core.internal.utils.*; import com.salesforce.ide.test.common.utils.*;
[ "com.salesforce.ide" ]
com.salesforce.ide;
116,060
public static String uniquify(String name, Set<String> usedNames, Suggester suggester) { if (name != null) { if (usedNames.add(name)) { return name; } } final String originalName = name; for (int j = 0;; j++) { name = suggester.apply(originalName, j, usedNames.size()); ...
static String function(String name, Set<String> usedNames, Suggester suggester) { if (name != null) { if (usedNames.add(name)) { return name; } } final String originalName = name; for (int j = 0;; j++) { name = suggester.apply(originalName, j, usedNames.size()); if (usedNames.add(name)) { return name; } } }
/** * Makes a name distinct from other names which have already been used, adds * it to the list, and returns it. * * @param name Suggested name, may not be unique * @param usedNames Collection of names already used * @param suggester Base for name when input name is null * @return Unique nam...
Makes a name distinct from other names which have already been used, adds it to the list, and returns it
uniquify
{ "repo_name": "dindin5258/calcite", "path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java", "license": "apache-2.0", "size": 42385 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
255,241
public T jacksonxml(Class<?> unmarshalType) { JacksonXMLDataFormat jacksonXMLDataFormat = new JacksonXMLDataFormat(); jacksonXMLDataFormat.setUnmarshalType(unmarshalType); return dataFormat(jacksonXMLDataFormat); }
T function(Class<?> unmarshalType) { JacksonXMLDataFormat jacksonXMLDataFormat = new JacksonXMLDataFormat(); jacksonXMLDataFormat.setUnmarshalType(unmarshalType); return dataFormat(jacksonXMLDataFormat); }
/** * Uses the Jackson XML data format * * @param unmarshalType * unmarshal type for xml jackson type */
Uses the Jackson XML data format
jacksonxml
{ "repo_name": "sebi-hgdata/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 38206 }
[ "org.apache.camel.model.dataformat.JacksonXMLDataFormat" ]
import org.apache.camel.model.dataformat.JacksonXMLDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
1,009,155
private static void createAndShowGUI() { try { for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (Exception e) { // If Nimbus is not available, you can set the GUI...
static void function() { try { for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if (STR.equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (Exception e) { } JFrame frame = new JFrame(STR); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ConfigurationPane...
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. */
Create the GUI and show it. For thread safety, this method should be invoked from the event-dispatching thread
createAndShowGUI
{ "repo_name": "hiepst/TrendingDemo", "path": "TrendingApp/src/main/java/com/cs/client/ConfigurationPanel.java", "license": "lgpl-3.0", "size": 7280 }
[ "com.cs.client.util.ui.UiUtil", "java.awt.BorderLayout", "javax.swing.JFrame", "javax.swing.UIManager" ]
import com.cs.client.util.ui.UiUtil; import java.awt.BorderLayout; import javax.swing.JFrame; import javax.swing.UIManager;
import com.cs.client.util.ui.*; import java.awt.*; import javax.swing.*;
[ "com.cs.client", "java.awt", "javax.swing" ]
com.cs.client; java.awt; javax.swing;
2,057,292
public Packet pollResult() { return resultQueue.poll(); }
Packet function() { return resultQueue.poll(); }
/** * Polls to see if a packet is currently available and returns it, or * immediately returns <tt>null</tt> if no packets are currently in the * result queue. * * @return the next packet result, or <tt>null</tt> if there are no more * results. */
Polls to see if a packet is currently available and returns it, or immediately returns null if no packets are currently in the result queue
pollResult
{ "repo_name": "micorochio/SVN", "path": "workspace/MobilePlatform/asmack/org/jivesoftware/smack/PacketCollector.java", "license": "apache-2.0", "size": 5186 }
[ "org.jivesoftware.smack.packet.Packet" ]
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
1,302,470
private static File findJaxbApiJar() { String url = Which.which(JAXBContext.class); if(url==null) return null; // impossible, but hey, let's be defensive if(!url.startsWith("jar:") || url.lastIndexOf('!')==-1) // no jar file return null; String jarF...
static File function() { String url = Which.which(JAXBContext.class); if(url==null) return null; if(!url.startsWith("jar:") url.lastIndexOf('!')==-1) return null; String jarFileUrl = url.substring(4,url.lastIndexOf('!')); if(!jarFileUrl.startsWith("file:")) return null; try { File f = new File(new URL(jarFileUrl).getFi...
/** * Computes the file system path of <tt>jaxb-api.jar</tt> so that * APT will see them in the <tt>-cp</tt> option. * * <p> * In Java, you can't do this reliably (for that matter there's no guarantee * that such a jar file exists, such as in Glassfish), so we do the best we can. * ...
Computes the file system path of jaxb-api.jar so that APT will see them in the -cp option. In Java, you can't do this reliably (for that matter there's no guarantee that such a jar file exists, such as in Glassfish), so we do the best we can
findJaxbApiJar
{ "repo_name": "samskivert/ikvm-openjdk", "path": "build/linux-amd64/impsrc/com/sun/tools/internal/jxc/SchemaGenerator.java", "license": "gpl-2.0", "size": 7531 }
[ "com.sun.xml.internal.bind.util.Which", "java.io.File", "java.net.MalformedURLException", "javax.xml.bind.JAXBContext" ]
import com.sun.xml.internal.bind.util.Which; import java.io.File; import java.net.MalformedURLException; import javax.xml.bind.JAXBContext;
import com.sun.xml.internal.bind.util.*; import java.io.*; import java.net.*; import javax.xml.bind.*;
[ "com.sun.xml", "java.io", "java.net", "javax.xml" ]
com.sun.xml; java.io; java.net; javax.xml;
129,657
protected void registerClusterValve() throws Exception { if(container != null ) { for (Iterator<Valve> iter = valves.iterator(); iter.hasNext();) { ClusterValve valve = (ClusterValve) iter.next(); if (log.isDebugEnabled()) log.debug("Invoking a...
void function() throws Exception { if(container != null ) { for (Iterator<Valve> iter = valves.iterator(); iter.hasNext();) { ClusterValve valve = (ClusterValve) iter.next(); if (log.isDebugEnabled()) log.debug(STR + getContainer() + STR + valve.getClass().getName()); if (valve != null) { IntrospectionUtils.callMethodN...
/** * register all cluster valve to host or engine * @throws Exception * @throws ClassNotFoundException */
register all cluster valve to host or engine
registerClusterValve
{ "repo_name": "deathspeeder/class-guard", "path": "apache-tomcat-7.0.53-src/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java", "license": "gpl-2.0", "size": 34524 }
[ "java.util.Iterator", "org.apache.catalina.Valve", "org.apache.catalina.ha.ClusterValve", "org.apache.tomcat.util.IntrospectionUtils" ]
import java.util.Iterator; import org.apache.catalina.Valve; import org.apache.catalina.ha.ClusterValve; import org.apache.tomcat.util.IntrospectionUtils;
import java.util.*; import org.apache.catalina.*; import org.apache.catalina.ha.*; import org.apache.tomcat.util.*;
[ "java.util", "org.apache.catalina", "org.apache.tomcat" ]
java.util; org.apache.catalina; org.apache.tomcat;
1,273,491
private void updatePrefSummary(Preference preference) { if (preference.getKey().equals(Settings.ROBOT_TRANSFER_RATE) && preference instanceof ListPreference) { preference.setSummary(((ListPreference) preference).getEntry() + " " + getString(R.string.settings_transfer_rate_sum...
void function(Preference preference) { if (preference.getKey().equals(Settings.ROBOT_TRANSFER_RATE) && preference instanceof ListPreference) { preference.setSummary(((ListPreference) preference).getEntry() + " " + getString(R.string.settings_transfer_rate_summary)); } else if (preference.getKey().equals(Settings.ROBOT_...
/** * Update preference summary. * * @param preference */
Update preference summary
updatePrefSummary
{ "repo_name": "ArduWellBeingBot/awbb-droid", "path": "src/awbb/droid/main/SettingsFragment.java", "license": "gpl-3.0", "size": 3927 }
[ "android.preference.EditTextPreference", "android.preference.ListPreference", "android.preference.Preference" ]
import android.preference.EditTextPreference; import android.preference.ListPreference; import android.preference.Preference;
import android.preference.*;
[ "android.preference" ]
android.preference;
2,591,767
@Test(groups = { "DataPrepCloudSync2", "DataPrepCloudSync" }) public void dataPrep_AONE_15276() throws Exception { String testName = getTestName(); String testUser1 = getUserNameForDomain(testName + "-1", hybridDomainPremium); String testUser2 = getUserNameForDomain(testName + "...
@Test(groups = { STR, STR }) void function() throws Exception { String testName = getTestName(); String testUser1 = getUserNameForDomain(testName + "-1", hybridDomainPremium); String testUser2 = getUserNameForDomain(testName + "-2", hybridDomainPremium); String siteName = getSiteName(testName + "-1"); String[] userInfo...
/** * Test Case 2038- Sync a folder & file without edit options to it */
Test Case 2038- Sync a folder & file without edit options to it
dataPrep_AONE_15276
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/qa-share/src/test/java/org/alfresco/share/cloudsync/CloudSyncAccessTest2.java", "license": "lgpl-3.0", "size": 114509 }
[ "org.alfresco.share.util.ShareUser", "org.alfresco.share.util.ShareUserMembers", "org.alfresco.share.util.api.CreateUserAPI", "org.testng.annotations.Test" ]
import org.alfresco.share.util.ShareUser; import org.alfresco.share.util.ShareUserMembers; import org.alfresco.share.util.api.CreateUserAPI; import org.testng.annotations.Test;
import org.alfresco.share.util.*; import org.alfresco.share.util.api.*; import org.testng.annotations.*;
[ "org.alfresco.share", "org.testng.annotations" ]
org.alfresco.share; org.testng.annotations;
2,547,347
private void addAttribute() { String name = newAttributeName.getText(); String value = newAttributeValue.getText(); if( name.length() == 0 || value.length() == 0 ) { return; } Attributes attrs = currentGraphic.getAttributes(); if( attrs == null ) attrs = (Attributes) JavaScriptObject.createObject()...
void function() { String name = newAttributeName.getText(); String value = newAttributeValue.getText(); if( name.length() == 0 value.length() == 0 ) { return; } Attributes attrs = currentGraphic.getAttributes(); if( attrs == null ) attrs = (Attributes) JavaScriptObject.createObject(); attrs.setString(name, value); curr...
/** * Add a user provided attribute to a feature */
Add a user provided attribute to a feature
addAttribute
{ "repo_name": "CSTARS/gwt-gis", "path": "src/edu/ucdavis/gwt/gis/client/draw/EditFeaturePanel.java", "license": "lgpl-3.0", "size": 26309 }
[ "com.google.gwt.core.client.JavaScriptObject", "edu.ucdavis.cstars.client.Graphic" ]
import com.google.gwt.core.client.JavaScriptObject; import edu.ucdavis.cstars.client.Graphic;
import com.google.gwt.core.client.*; import edu.ucdavis.cstars.client.*;
[ "com.google.gwt", "edu.ucdavis.cstars" ]
com.google.gwt; edu.ucdavis.cstars;
2,294,581
@Deprecated public static Serializer getSerializer() { return new Persister(new OpenmrsCycleStrategy()); }
static Serializer function() { return new Persister(new OpenmrsCycleStrategy()); }
/** * Get a serializer that will do the common type of serialization and deserialization. Cycles of * objects are taken into account * * @return Serializer to do the (de)serialization * @deprecated - Use OpenmrsSerializer from * Context.getSerializationService.getDefaultSerializer() Note, this ...
Get a serializer that will do the common type of serialization and deserialization. Cycles of objects are taken into account
getSerializer
{ "repo_name": "milankarunarathne/openmrs-core", "path": "api/src/main/java/org/openmrs/util/OpenmrsUtil.java", "license": "mpl-2.0", "size": 78790 }
[ "org.openmrs.xml.OpenmrsCycleStrategy", "org.simpleframework.xml.Serializer", "org.simpleframework.xml.load.Persister" ]
import org.openmrs.xml.OpenmrsCycleStrategy; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.load.Persister;
import org.openmrs.xml.*; import org.simpleframework.xml.*; import org.simpleframework.xml.load.*;
[ "org.openmrs.xml", "org.simpleframework.xml" ]
org.openmrs.xml; org.simpleframework.xml;
2,170,842
public boolean isLocalDcAndMatchingCompatiblityVersion() { if (storagePool.getstorage_pool_type() == StorageType.LOCALFS && !this.<Boolean> getConfigValue(ConfigValues.LocalStorageEnabled, storagePool.getcompatibility_version() .toString())) { ...
boolean function() { if (storagePool.getstorage_pool_type() == StorageType.LOCALFS && !this.<Boolean> getConfigValue(ConfigValues.LocalStorageEnabled, storagePool.getcompatibility_version() .toString())) { canDoActionMessages.add(VdcBllMessages.DATA_CENTER_LOCAL_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION.toString()); ret...
/** * Checks in case the DC is of local type that the compatibility version matches. In case there is mismatch, a * proper canDoAction message will be added * * @return true if the version matches */
Checks in case the DC is of local type that the compatibility version matches. In case there is mismatch, a proper canDoAction message will be added
isLocalDcAndMatchingCompatiblityVersion
{ "repo_name": "derekhiggins/ovirt-engine", "path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StoragePoolValidator.java", "license": "apache-2.0", "size": 3514 }
[ "org.ovirt.engine.core.common.businessentities.StorageType", "org.ovirt.engine.core.common.config.ConfigValues", "org.ovirt.engine.core.dal.VdcBllMessages" ]
import org.ovirt.engine.core.common.businessentities.StorageType; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.dal.VdcBllMessages;
import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.common.config.*; import org.ovirt.engine.core.dal.*;
[ "org.ovirt.engine" ]
org.ovirt.engine;
1,283,241
MouseMotionListener getMouseMotionListener();
MouseMotionListener getMouseMotionListener();
/** * This method returns MouseListener that listen's to mouse events occuring * in the combo box. * * @return MouseMotionListener */
This method returns MouseListener that listen's to mouse events occuring in the combo box
getMouseMotionListener
{ "repo_name": "aosm/gcc_40", "path": "libjava/javax/swing/plaf/basic/ComboPopup.java", "license": "gpl-2.0", "size": 3291 }
[ "java.awt.event.MouseMotionListener" ]
import java.awt.event.MouseMotionListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,538,569
@SuppressWarnings("unchecked") private void executeGetChannelWithError(Object[] params, String errorMsg) throws MalformedURLException { try { @SuppressWarnings("unused") Map<String, Object> result = (Map<String, Object>) execute( GET_CHANNEL_METHOD, params); fail(ErrorMessage.METHOD_EXECUTED_SUCCES...
@SuppressWarnings(STR) void function(Object[] params, String errorMsg) throws MalformedURLException { try { @SuppressWarnings(STR) Map<String, Object> result = (Map<String, Object>) execute( GET_CHANNEL_METHOD, params); fail(ErrorMessage.METHOD_EXECUTED_SUCCESSFULLY_BUT_SHOULD_NOT_HAVE); } catch (XmlRpcException e) { a...
/** * Execute test method with error * * @param params - * parameters for test method * @param errorMsg - * true error messages * @throws MalformedURLException */
Execute test method with error
executeGetChannelWithError
{ "repo_name": "Tate-ad/revive-adserver", "path": "www/api/v2/xmlrpc/tests/unit/src/test/java/org/openx/channel/TestGetChannel.java", "license": "gpl-2.0", "size": 3709 }
[ "java.net.MalformedURLException", "java.util.Map", "org.apache.xmlrpc.XmlRpcException", "org.openx.utils.ErrorMessage" ]
import java.net.MalformedURLException; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; import org.openx.utils.ErrorMessage;
import java.net.*; import java.util.*; import org.apache.xmlrpc.*; import org.openx.utils.*;
[ "java.net", "java.util", "org.apache.xmlrpc", "org.openx.utils" ]
java.net; java.util; org.apache.xmlrpc; org.openx.utils;
2,882,582
public void setGenericsPins(ArrayList<VhdlGeneric> vhdlGenerics, ArrayList<VhdlPin> vhdlPins){ this.vhdlGenerics = vhdlGenerics; this.vhdlPins = vhdlPins; }//end setFieldsPins()
void function(ArrayList<VhdlGeneric> vhdlGenerics, ArrayList<VhdlPin> vhdlPins){ this.vhdlGenerics = vhdlGenerics; this.vhdlPins = vhdlPins; }
/** * Set fields and vhdlPin lists of this component. All array entries will be overwritten * @param fields * @param vhdlPins */
Set fields and vhdlPin lists of this component. All array entries will be overwritten
setGenericsPins
{ "repo_name": "thkinder/ProgLogicJLib", "path": "src/proglogicjlib/vhdl/VhdlComponent.java", "license": "bsd-3-clause", "size": 14679 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
650,189
public UrlStringBuilder setParameter(String name, String... values) { this.setParameter(name, values != null ? Arrays.asList(values) : null); return this; }
UrlStringBuilder function(String name, String... values) { this.setParameter(name, values != null ? Arrays.asList(values) : null); return this; }
/** * Sets a URL parameter, replacing any existing parameter with the same name. * * @param name Parameter name, can not be null * @param values Values for the parameter, null is valid * @return this */
Sets a URL parameter, replacing any existing parameter with the same name
setParameter
{ "repo_name": "ASU-Capstone/uPortal-Forked", "path": "uportal-war/src/main/java/org/jasig/portal/url/UrlStringBuilder.java", "license": "apache-2.0", "size": 12519 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,630,570
public String getURI() { return this._constructionElement.getAttributeNS (null, Constants._ATT_ALGORITHM); }
String function() { return this._constructionElement.getAttributeNS (null, Constants._ATT_ALGORITHM); }
/** * Returns the URI representation of Transformation algorithm * * @return the URI representation of Transformation algorithm */
Returns the URI representation of Transformation algorithm
getURI
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transform.java", "license": "mit", "size": 14082 }
[ "com.sun.org.apache.xml.internal.security.utils.Constants" ]
import com.sun.org.apache.xml.internal.security.utils.Constants;
import com.sun.org.apache.xml.internal.security.utils.*;
[ "com.sun.org" ]
com.sun.org;
2,815,069
public Observable<ServiceResponse<Page<DataSourceInner>>> listByWorkspaceSinglePageAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is ...
Observable<ServiceResponse<Page<DataSourceInner>>> function(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (workspaceName == null) { throw new IllegalArgumentException(STR); } if (t...
/** * Gets the first page of data source instances in a workspace with the link to the next page. * ServiceResponse<PageImpl1<DataSourceInner>> * @param resourceGroupName The name of the resource group. The name is case insensitive. ServiceResponse<PageImpl1<DataSourceInner>> * @param workspaceName Th...
Gets the first page of data source instances in a workspace with the link to the next page
listByWorkspaceSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/DataSourcesInner.java", "license": "mit", "size": 44118 }
[ "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,807,908
desktop = new javax.swing.JDesktopPane(); moncompte = new javax.swing.JButton(); utilisateurs = new javax.swing.JButton(); photo = new javax.swing.JLabel(); deconnexion = new javax.swing.JLabel(); acceuilBG = new javax.swing.JLabel(); setDefaultCloseOperation(jav...
desktop = new javax.swing.JDesktopPane(); moncompte = new javax.swing.JButton(); utilisateurs = new javax.swing.JButton(); photo = new javax.swing.JLabel(); deconnexion = new javax.swing.JLabel(); acceuilBG = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setMinimumSize(n...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "wilofice/planning", "path": "planning/src/com/planning/view/AdminSyst/AcceuilAdminSyst.java", "license": "gpl-3.0", "size": 9234 }
[ "java.beans.PropertyVetoException", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.beans.PropertyVetoException; import java.util.logging.Level; import java.util.logging.Logger;
import java.beans.*; import java.util.logging.*;
[ "java.beans", "java.util" ]
java.beans; java.util;
386,367
public Map<String, Object> getAsStructuredMap() { Map<String, Object> map = new HashMap<>(2); for (Map.Entry<String, String> entry : settings.entrySet()) { processSetting(map, "", entry.getKey(), entry.getValue()); } for (Map.Entry<String, Object> entry : map.entrySet()) ...
Map<String, Object> function() { Map<String, Object> map = new HashMap<>(2); for (Map.Entry<String, String> entry : settings.entrySet()) { processSetting(map, STRunchecked") Map<String, Object> valMap = (Map<String, Object>) entry.getValue(); entry.setValue(convertMapsToArrays(valMap)); } } return map; }
/** * The settings as a structured {@link java.util.Map}. */
The settings as a structured <code>java.util.Map</code>
getAsStructuredMap
{ "repo_name": "strahanjen/strahanjen.github.io", "path": "elasticsearch-master/core/src/main/java/org/elasticsearch/common/settings/Settings.java", "license": "bsd-3-clause", "size": 39113 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,408,668
JSDocInfo getFileOverviewJSDocInfo() { return fileOverviewJSDocInfo; }
JSDocInfo getFileOverviewJSDocInfo() { return fileOverviewJSDocInfo; }
/** * Gets the fileoverview JSDocInfo, if any. */
Gets the fileoverview JSDocInfo, if any
getFileOverviewJSDocInfo
{ "repo_name": "selkhateeb/closure-compiler", "path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java", "license": "apache-2.0", "size": 84556 }
[ "com.google.javascript.rhino.JSDocInfo" ]
import com.google.javascript.rhino.JSDocInfo;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,854,145
@Path("available") @GET @Produces(MediaType.APPLICATION_JSON) @NoCache public List<RoleRepresentation> getAvailableClientScopeMappings() { auth.requireView(); if (scopeContainer == null) { throw new NotFoundException("Could not find client"); } Set<RoleM...
@Path(STR) @Produces(MediaType.APPLICATION_JSON) List<RoleRepresentation> function() { auth.requireView(); if (scopeContainer == null) { throw new NotFoundException(STR); } Set<RoleModel> roles = scopedClient.getRoles(); return ScopeMappedResource.getAvailable(scopeContainer, roles); }
/** * The available client-level roles * * Returns the roles for the client that can be associated with the client's scope * * @return */
The available client-level roles Returns the roles for the client that can be associated with the client's scope
getAvailableClientScopeMappings
{ "repo_name": "dbarentine/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/ScopeMappedClientResource.java", "license": "apache-2.0", "size": 6491 }
[ "java.util.List", "java.util.Set", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "org.jboss.resteasy.spi.NotFoundException", "org.keycloak.models.RoleModel", "org.keycloak.representations.idm.RoleRepresentation" ]
import java.util.List; import java.util.Set; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.jboss.resteasy.spi.NotFoundException; import org.keycloak.models.RoleModel; import org.keycloak.representations.idm.RoleRepresentation;
import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.spi.*; import org.keycloak.models.*; import org.keycloak.representations.idm.*;
[ "java.util", "javax.ws", "org.jboss.resteasy", "org.keycloak.models", "org.keycloak.representations" ]
java.util; javax.ws; org.jboss.resteasy; org.keycloak.models; org.keycloak.representations;
2,573,507
try { return Jwts.parser().setSigningKey(signingKey).parseClaimsJws(this.token); } catch (UnsupportedJwtException | MalformedJwtException | IllegalArgumentException | SignatureException ex) { logger.error("Invalid JWT Token", ex); throw new BadCredentialsException(...
try { return Jwts.parser().setSigningKey(signingKey).parseClaimsJws(this.token); } catch (UnsupportedJwtException MalformedJwtException IllegalArgumentException SignatureException ex) { logger.error(STR, ex); throw new BadCredentialsException(STR, ex); } catch (ExpiredJwtException expiredEx) { logger.info(STR, expiredE...
/** * Parses and validates JWT Token signature. * @throws BadCredentialsException * @throws JwtExpiredTokenException */
Parses and validates JWT Token signature
parseClaims
{ "repo_name": "yaseminalpay/Living-History-API", "path": "src/main/java/com/zenith/livinghistory/api/zenithlivinghistoryapi/security/model/RawAccessJwtToken.java", "license": "mit", "size": 1966 }
[ "com.zenith.livinghistory.api.zenithlivinghistoryapi.security.model.exception.JwtExpiredTokenException", "io.jsonwebtoken.ExpiredJwtException", "io.jsonwebtoken.Jwts", "io.jsonwebtoken.MalformedJwtException", "io.jsonwebtoken.SignatureException", "io.jsonwebtoken.UnsupportedJwtException", "org.springfra...
import com.zenith.livinghistory.api.zenithlivinghistoryapi.security.model.exception.JwtExpiredTokenException; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.MalformedJwtException; import io.jsonwebtoken.SignatureException; import io.jsonwebtoken.UnsupportedJwtException; ...
import com.zenith.livinghistory.api.zenithlivinghistoryapi.security.model.exception.*; import io.jsonwebtoken.*; import org.springframework.security.authentication.*;
[ "com.zenith.livinghistory", "io.jsonwebtoken", "org.springframework.security" ]
com.zenith.livinghistory; io.jsonwebtoken; org.springframework.security;
2,033,841
static void exportKeytab(File keytabFile, List<KrbIdentity> identities) throws KrbException { Keytab keytab = createOrLoadKeytab(keytabFile); for (KrbIdentity identity : identities) { exportToKeytab(keytab, identity); } storeKeytab(keytab, keytabFile); ...
static void exportKeytab(File keytabFile, List<KrbIdentity> identities) throws KrbException { Keytab keytab = createOrLoadKeytab(keytabFile); for (KrbIdentity identity : identities) { exportToKeytab(keytab, identity); } storeKeytab(keytab, keytabFile); }
/** * Export all the keys of the specified principal into the specified keytab * file. * * @param keytabFile The keytab file * @param identities Identities to export to keytabFile * @throws KrbException */
Export all the keys of the specified principal into the specified keytab file
exportKeytab
{ "repo_name": "josegom/training", "path": "kerby/kerby-download/kerby-all-1.0.0-RC1/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/AdminHelper.java", "license": "apache-2.0", "size": 8926 }
[ "java.io.File", "java.util.List", "org.apache.kerby.kerberos.kerb.KrbException", "org.apache.kerby.kerberos.kerb.identity.KrbIdentity", "org.apache.kerby.kerberos.kerb.keytab.Keytab" ]
import java.io.File; import java.util.List; import org.apache.kerby.kerberos.kerb.KrbException; import org.apache.kerby.kerberos.kerb.identity.KrbIdentity; import org.apache.kerby.kerberos.kerb.keytab.Keytab;
import java.io.*; import java.util.*; import org.apache.kerby.kerberos.kerb.*; import org.apache.kerby.kerberos.kerb.identity.*; import org.apache.kerby.kerberos.kerb.keytab.*;
[ "java.io", "java.util", "org.apache.kerby" ]
java.io; java.util; org.apache.kerby;
2,764,000
public static ParseResult parseFileForSkylark( ParserInputSource input, EventHandler eventHandler, @Nullable ValidationEnvironment validationEnvironment) { Lexer lexer = new Lexer(input, eventHandler, false); Parser parser = new Parser(lexer, eventHandler, SKYLARK); List<Statement> state...
static ParseResult function( ParserInputSource input, EventHandler eventHandler, @Nullable ValidationEnvironment validationEnvironment) { Lexer lexer = new Lexer(input, eventHandler, false); Parser parser = new Parser(lexer, eventHandler, SKYLARK); List<Statement> statements = parser.parseFileInput(); boolean hasSemant...
/** * Entry-point to parser that parses a build file with comments. All errors * encountered during parsing are reported via "reporter". Enable Skylark extensions * that are not part of the core BUILD language. */
Entry-point to parser that parses a build file with comments. All errors encountered during parsing are reported via "reporter". Enable Skylark extensions that are not part of the core BUILD language
parseFileForSkylark
{ "repo_name": "asarazan/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/Parser.java", "license": "apache-2.0", "size": 54247 }
[ "com.google.devtools.build.lib.events.Event", "com.google.devtools.build.lib.events.EventHandler", "java.util.List", "javax.annotation.Nullable" ]
import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.events.EventHandler; import java.util.List; import javax.annotation.Nullable;
import com.google.devtools.build.lib.events.*; import java.util.*; import javax.annotation.*;
[ "com.google.devtools", "java.util", "javax.annotation" ]
com.google.devtools; java.util; javax.annotation;
47,682
public Builder get(BlobId blob, BlobSourceOption... options) { toGet.put(blob, Lists.newArrayList(options)); return this; }
Builder function(BlobId blob, BlobSourceOption... options) { toGet.put(blob, Lists.newArrayList(options)); return this; }
/** * Retrieve metadata for the given blob. */
Retrieve metadata for the given blob
get
{ "repo_name": "ajkannan/gcloud-java", "path": "gcloud-java-storage/src/main/java/com/google/gcloud/storage/BatchRequest.java", "license": "apache-2.0", "size": 3765 }
[ "com.google.common.collect.Lists", "com.google.gcloud.storage.Storage" ]
import com.google.common.collect.Lists; import com.google.gcloud.storage.Storage;
import com.google.common.collect.*; import com.google.gcloud.storage.*;
[ "com.google.common", "com.google.gcloud" ]
com.google.common; com.google.gcloud;
654,959
public Entity getEntityHandle();
Entity function();
/** * Gets the bukkit's entity. * * @return The bukkit's entity. */
Gets the bukkit's entity
getEntityHandle
{ "repo_name": "ImmaFreedom-Dev/MineAPI", "path": "src/main/java/com/w67clement/mineapi/entity/MC_Entity.java", "license": "gpl-3.0", "size": 2428 }
[ "org.bukkit.entity.Entity" ]
import org.bukkit.entity.Entity;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
498,282
for (IKeyEnum val : pClass.getEnumConstants()) { if (val.getKey() == pKey) { return (T) val; } } LOGGER.error("Unknow value:" + pKey + " for Enum:" + pClass.getName()); return null; } private EnumUtils() { }
for (IKeyEnum val : pClass.getEnumConstants()) { if (val.getKey() == pKey) { return (T) val; } } LOGGER.error(STR + pKey + STR + pClass.getName()); return null; } private EnumUtils() { }
/** * Get the value of and enum from his key * * @param pKey * key to find * @param pClass * Enum class * @return Enum instance of the specified key or null otherwise */
Get the value of and enum from his key
getValue
{ "repo_name": "TapCard/TapCard", "path": "tapcard/src/main/java/io/github/tapcard/emvnfccard/utils/EnumUtils.java", "license": "apache-2.0", "size": 1640 }
[ "io.github.tapcard.emvnfccard.model.enums.IKeyEnum" ]
import io.github.tapcard.emvnfccard.model.enums.IKeyEnum;
import io.github.tapcard.emvnfccard.model.enums.*;
[ "io.github.tapcard" ]
io.github.tapcard;
1,205,187
protected synchronized void notifyListenersFoundURI(String uri, String method, FetchStatus status) { for (SpiderListener l : listeners) { l.foundURI(uri, method, status); } }
synchronized void function(String uri, String method, FetchStatus status) { for (SpiderListener l : listeners) { l.foundURI(uri, method, status); } }
/** * Notifies the listeners regarding a found uri. * * @param uri the uri * @param method the method used for fetching the resource * @param status the {@link FetchStatus} stating if this uri will be processed, and, if not, * stating the reason of the filtering */
Notifies the listeners regarding a found uri
notifyListenersFoundURI
{ "repo_name": "profjrr/zaproxy", "path": "src/org/zaproxy/zap/spider/Spider.java", "license": "apache-2.0", "size": 20698 }
[ "org.zaproxy.zap.spider.filters.FetchFilter" ]
import org.zaproxy.zap.spider.filters.FetchFilter;
import org.zaproxy.zap.spider.filters.*;
[ "org.zaproxy.zap" ]
org.zaproxy.zap;
431,863
public int getDataActivity() { try { ITelephony telephony = getITelephony(); if (telephony == null) return DATA_ACTIVITY_NONE; return telephony.getDataActivity(); } catch (RemoteException ex) { // the phone process is restarting. ...
int function() { try { ITelephony telephony = getITelephony(); if (telephony == null) return DATA_ACTIVITY_NONE; return telephony.getDataActivity(); } catch (RemoteException ex) { return DATA_ACTIVITY_NONE; } catch (NullPointerException ex) { return DATA_ACTIVITY_NONE; } } public static final int DATA_UNKNOWN = -1; pub...
/** * Returns a constant indicating the type of activity on a data connection * (cellular). * * @see #DATA_ACTIVITY_NONE * @see #DATA_ACTIVITY_IN * @see #DATA_ACTIVITY_OUT * @see #DATA_ACTIVITY_INOUT * @see #DATA_ACTIVITY_DORMANT */
Returns a constant indicating the type of activity on a data connection (cellular)
getDataActivity
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/telephony/TelephonyManager.java", "license": "gpl-3.0", "size": 165169 }
[ "android.os.RemoteException", "com.android.internal.telephony.ITelephony" ]
import android.os.RemoteException; import com.android.internal.telephony.ITelephony;
import android.os.*; import com.android.internal.telephony.*;
[ "android.os", "com.android.internal" ]
android.os; com.android.internal;
228,140
public void addFunction(ContinuousFunction function) { functions.add(function); }
void function(ContinuousFunction function) { functions.add(function); }
/** * Adds a function to the hybrid function. * @param function */
Adds a function to the hybrid function
addFunction
{ "repo_name": "filinep/cilib", "path": "library/src/main/java/net/sourceforge/cilib/functions/continuous/hybrid/SimpleHybridFunction.java", "license": "gpl-3.0", "size": 1278 }
[ "net.sourceforge.cilib.functions.ContinuousFunction" ]
import net.sourceforge.cilib.functions.ContinuousFunction;
import net.sourceforge.cilib.functions.*;
[ "net.sourceforge.cilib" ]
net.sourceforge.cilib;
882,743
public Category getLogger() { return logger; } /** Return the message for this logging event. <p>Before serialization, the returned object is the message passed by the user to generate the logging event. After serialization, the returned value equals the String form of the mes...
Category function() { return logger; } /** Return the message for this logging event. <p>Before serialization, the returned object is the message passed by the user to generate the logging event. After serialization, the returned value equals the String form of the message possibly after object rendering.
/** * Gets the logger of the event. * Use should be restricted to cloning events. * @since 1.2.15 */
Gets the logger of the event. Use should be restricted to cloning events
getLogger
{ "repo_name": "smathieu/librarian_sample_repo_java", "path": "src/main/java/org/apache/log4j/spi/LoggingEvent.java", "license": "apache-2.0", "size": 19848 }
[ "org.apache.log4j.Category" ]
import org.apache.log4j.Category;
import org.apache.log4j.*;
[ "org.apache.log4j" ]
org.apache.log4j;
2,464,723
public void setSelectedGraph(Graph graph) { if (!graphsToScores.keySet().contains(graph)) { throw new IllegalArgumentException("Not a graph in this set."); } this.selectedGraph = graph; }
void function(Graph graph) { if (!graphsToScores.keySet().contains(graph)) { throw new IllegalArgumentException(STR); } this.selectedGraph = graph; }
/** * Sets a selected graph. Must be one of the graphs in <code>getGraphToScore().keySet</code>. */
Sets a selected graph. Must be one of the graphs in <code>getGraphToScore().keySet</code>
setSelectedGraph
{ "repo_name": "amurrayw/tetrad", "path": "tetrad-gui/src/main/java/edu/cmu/tetradapp/model/ScoredGraphsWrapper.java", "license": "gpl-2.0", "size": 7521 }
[ "edu.cmu.tetrad.graph.Graph" ]
import edu.cmu.tetrad.graph.Graph;
import edu.cmu.tetrad.graph.*;
[ "edu.cmu.tetrad" ]
edu.cmu.tetrad;
602,567
public LanguageFile loadLanguageFile( String bundlePath, String language ) throws IOException { LanguageFile langFile = fileCache.get( LanguageFile.getFilename( bundlePath, language ) ); if (langFile != null) return langFile; langFile = new Langua...
LanguageFile function( String bundlePath, String language ) throws IOException { LanguageFile langFile = fileCache.get( LanguageFile.getFilename( bundlePath, language ) ); if (langFile != null) return langFile; langFile = new LanguageFile( bundlePath, language ); Properties prop = new CustomProperties(); File file = ne...
/** * Creates a LanguageFile from a file. * * @param bundlePath the relative logical path to the bundle, e.g. * bla/bla/mybundle * @param language the language of the file * @return * @throws java.io.IOException */
Creates a LanguageFile from a file
loadLanguageFile
{ "repo_name": "marcokrikke/excelbundle", "path": "src/main/java/senselogic/excelbundle/LanguageTreeIO.java", "license": "apache-2.0", "size": 11956 }
[ "java.io.BufferedInputStream", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.util.Map", "java.util.Properties" ]
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Map; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,482,279
public static void addAccountAuthentication( Model model, Resource instanceResource, AuthenticationMechanism value ) { Base.add( model, instanceResource, ACCOUNTAUTHENTICATION, value ); }
static void function( Model model, Resource instanceResource, AuthenticationMechanism value ) { Base.add( model, instanceResource, ACCOUNTAUTHENTICATION, value ); }
/** * Adds a value to property {@code AccountAuthentication} from an instance of * {@linkplain AuthenticationMechanism}. * * @param model * an RDF2Go model * @param instanceResource * an RDF2Go resource * @param value * * [Generated fr...
Adds a value to property AccountAuthentication from an instance of AuthenticationMechanism
addAccountAuthentication
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-sioc-services-auth/src/main/java/de/m0ep/sioc/services/auth/UserAccount.java", "license": "mit", "size": 21163 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdf2go.model.node.Resource", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdf2go.model.node.Resource; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdf2go.model.node.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
331,113
public static void queueCubeLoad(World world, ICubeIO loader, CubeProviderServer cache, int x, int y, int z, Consumer<Cube> runnable) { QueuedCube key = new QueuedCube(x, y, z, world); QueuedColumn columnKey = new QueuedColumn(x, z, world); AsyncCubeIOProvider task = cubeTasks.get(key); ...
static void function(World world, ICubeIO loader, CubeProviderServer cache, int x, int y, int z, Consumer<Cube> runnable) { QueuedCube key = new QueuedCube(x, y, z, world); QueuedColumn columnKey = new QueuedColumn(x, z, world); AsyncCubeIOProvider task = cubeTasks.get(key); loadingCubesColumnMap.put(columnKey, key); i...
/** * Queue a cube load, running the specified callback when the load has finished. This may cause a two tick delay * if the column has to be loaded, too! If you need it faster, consider sync loading either column or both * cube and column. * * @param world The world of the cube * @param l...
Queue a cube load, running the specified callback when the load has finished. This may cause a two tick delay if the column has to be loaded, too! If you need it faster, consider sync loading either column or both cube and column
queueCubeLoad
{ "repo_name": "OpenCubicChunks/CubicChunks", "path": "src/main/java/io/github/opencubicchunks/cubicchunks/core/server/chunkio/async/forge/AsyncWorldIOExecutor.java", "license": "mit", "size": 15360 }
[ "io.github.opencubicchunks.cubicchunks.api.world.ICubeProviderServer", "io.github.opencubicchunks.cubicchunks.core.server.CubeProviderServer", "io.github.opencubicchunks.cubicchunks.core.server.chunkio.ICubeIO", "io.github.opencubicchunks.cubicchunks.core.world.cube.Cube", "java.util.function.Consumer", "...
import io.github.opencubicchunks.cubicchunks.api.world.ICubeProviderServer; import io.github.opencubicchunks.cubicchunks.core.server.CubeProviderServer; import io.github.opencubicchunks.cubicchunks.core.server.chunkio.ICubeIO; import io.github.opencubicchunks.cubicchunks.core.world.cube.Cube; import java.util.function....
import io.github.opencubicchunks.cubicchunks.api.world.*; import io.github.opencubicchunks.cubicchunks.core.server.*; import io.github.opencubicchunks.cubicchunks.core.server.chunkio.*; import io.github.opencubicchunks.cubicchunks.core.world.cube.*; import java.util.function.*; import net.minecraft.world.*; import net....
[ "io.github.opencubicchunks", "java.util", "net.minecraft.world" ]
io.github.opencubicchunks; java.util; net.minecraft.world;
823,829
private void closeAccessory() { try { if (mFileDescriptor != null) { mFileDescriptor.close(); } } catch (IOException e) { } finally { mFileDescriptor = null; mAccessory = null; } } private AutoLockTest(){ ...
void function() { try { if (mFileDescriptor != null) { mFileDescriptor.close(); } } catch (IOException e) { } finally { mFileDescriptor = null; mAccessory = null; } } private AutoLockTest(){ super(); }
/** * Closes the ADK and detaches the output stream from it. */
Closes the ADK and detaches the output stream from it
closeAccessory
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/analyzer/AutoLockTest.java", "license": "gpl-3.0", "size": 36785 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,367,825
public static TintedDrawable constructTintedDrawable(Resources res, Bitmap icon) { return new TintedDrawable(res, icon); }
static TintedDrawable function(Resources res, Bitmap icon) { return new TintedDrawable(res, icon); }
/** * Factory method for creating a {@link TintedDrawable} with a {@link Bitmap} icon. */
Factory method for creating a <code>TintedDrawable</code> with a <code>Bitmap</code> icon
constructTintedDrawable
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/widget/TintedDrawable.java", "license": "apache-2.0", "size": 2734 }
[ "android.content.res.Resources", "android.graphics.Bitmap" ]
import android.content.res.Resources; import android.graphics.Bitmap;
import android.content.res.*; import android.graphics.*;
[ "android.content", "android.graphics" ]
android.content; android.graphics;
485,415
public static void loadScreen() throws LWJGLException { ScaledResolution var1 = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight); GL11.glClear(16640); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0.0D, var1.getScaledWi...
static void function() throws LWJGLException { ScaledResolution var1 = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight); GL11.glClear(16640); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0.0D, var1.getScaledWidth_double(), var1.getScaledHeight_double(), 0.0D, 1000.0...
/** * Displays a new screen. */
Displays a new screen
loadScreen
{ "repo_name": "zsawyer/Stereoscopic3D-for-Minecraft", "path": "src/minecraft/zsawyer/mods/stereoscopic3d/MinecraftCopy.java", "license": "lgpl-3.0", "size": 3688 }
[ "net.minecraft.client.gui.ScaledResolution", "net.minecraft.client.renderer.Tessellator", "org.lwjgl.LWJGLException", "org.lwjgl.opengl.Display" ]
import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.Tessellator; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Display;
import net.minecraft.client.gui.*; import net.minecraft.client.renderer.*; import org.lwjgl.*; import org.lwjgl.opengl.*;
[ "net.minecraft.client", "org.lwjgl", "org.lwjgl.opengl" ]
net.minecraft.client; org.lwjgl; org.lwjgl.opengl;
879,106
EList<Reading> getReadings();
EList<Reading> getReadings();
/** * Returns the value of the '<em><b>Readings</b></em>' reference list. * The list contents are of type {@link CIM.IEC61968.Metering.Reading}. * It is bidirectional and its opposite is '{@link CIM.IEC61968.Metering.Reading#getMeterReadings <em>Meter Readings</em>}'. * <!-- begin-user-doc --> * <p> * If th...
Returns the value of the 'Readings' reference list. The list contents are of type <code>CIM.IEC61968.Metering.Reading</code>. It is bidirectional and its opposite is '<code>CIM.IEC61968.Metering.Reading#getMeterReadings Meter Readings</code>'. If the meaning of the 'Readings' reference list isn't clear, there really sh...
getReadings
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Metering/MeterReading.java", "license": "mit", "size": 10524 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,764,291
public Point isometricToCartesian(Point point){ Point returnPoint = new Point(0,0); returnPoint.x = (2 * point.y + point.x) / 2; returnPoint.y = (2 * point.y - point.x) / 2; return(returnPoint); }
Point function(Point point){ Point returnPoint = new Point(0,0); returnPoint.x = (2 * point.y + point.x) / 2; returnPoint.y = (2 * point.y - point.x) / 2; return(returnPoint); }
/** * Converts cartesian coordinates to isometric coordinates. * @param point The point in isometric space. * @return point The point in cartesian space. */
Converts cartesian coordinates to isometric coordinates
isometricToCartesian
{ "repo_name": "jcooper1994/ArtificialWorld", "path": "src/uk/ac/reading/xj008217/World.java", "license": "gpl-2.0", "size": 21072 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
591,990
@Test @PrepareForTest(OBSOutputStream.class) public void testFlush() throws Exception { PowerMockito.whenNew(BufferedOutputStream.class) .withArguments(Mockito.any(DigestOutputStream.class)).thenReturn(mLocalOutputStream); OBSOutputStream stream = new OBSOutputStream("testBucketName", "testKey", m...
@PrepareForTest(OBSOutputStream.class) void function() throws Exception { PowerMockito.whenNew(BufferedOutputStream.class) .withArguments(Mockito.any(DigestOutputStream.class)).thenReturn(mLocalOutputStream); OBSOutputStream stream = new OBSOutputStream(STR, STR, mObsClient, sConf.getList(PropertyKey.TMP_DIRS, ",")); s...
/** * Tests to ensure {@link OBSOutputStream#flush()} calls {@link OutputStream#flush()}. */
Tests to ensure <code>OBSOutputStream#flush()</code> calls <code>OutputStream#flush()</code>
testFlush
{ "repo_name": "wwjiang007/alluxio", "path": "underfs/obs/src/test/java/alluxio/underfs/obs/OBSOutputStreamTest.java", "license": "apache-2.0", "size": 7653 }
[ "java.io.BufferedOutputStream", "java.security.DigestOutputStream", "org.mockito.Mockito", "org.powermock.api.mockito.PowerMockito", "org.powermock.core.classloader.annotations.PrepareForTest" ]
import java.io.BufferedOutputStream; import java.security.DigestOutputStream; import org.mockito.Mockito; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest;
import java.io.*; import java.security.*; import org.mockito.*; import org.powermock.api.mockito.*; import org.powermock.core.classloader.annotations.*;
[ "java.io", "java.security", "org.mockito", "org.powermock.api", "org.powermock.core" ]
java.io; java.security; org.mockito; org.powermock.api; org.powermock.core;
703,128
protected Template getTemplate(ValueStack stack, VelocityEngine velocity, ActionInvocation invocation, String location, String encoding) throws Exception { if (!location.startsWith("/")) { location = invocation.getProxy().getNamespace() + "/" + location; } Template template...
Template function(ValueStack stack, VelocityEngine velocity, ActionInvocation invocation, String location, String encoding) throws Exception { if (!location.startsWith("/")) { location = invocation.getProxy().getNamespace() + "/" + location; } Template template = velocity.getTemplate(location, encoding); return templat...
/** * Given a value stack, a Velocity engine, and an action invocation, this method returns the appropriate * Velocity template to render. * * @param stack the value stack to resolve the location again (when parse equals true) * @param velocity the velocity engine to process the req...
Given a value stack, a Velocity engine, and an action invocation, this method returns the appropriate Velocity template to render
getTemplate
{ "repo_name": "xiaguangme/struts2-src-study", "path": "src/org/apache/struts2/dispatcher/VelocityResult.java", "license": "apache-2.0", "size": 9204 }
[ "com.opensymphony.xwork2.ActionInvocation", "com.opensymphony.xwork2.util.ValueStack", "org.apache.velocity.Template", "org.apache.velocity.app.VelocityEngine" ]
import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.util.ValueStack; import org.apache.velocity.Template; import org.apache.velocity.app.VelocityEngine;
import com.opensymphony.xwork2.*; import com.opensymphony.xwork2.util.*; import org.apache.velocity.*; import org.apache.velocity.app.*;
[ "com.opensymphony.xwork2", "org.apache.velocity" ]
com.opensymphony.xwork2; org.apache.velocity;
1,153,704
public void removePlayer(Session playerSession) { players.remove(playerSession); System.out.println("Player left the game. # of players: " + players.size()); }
void function(Session playerSession) { players.remove(playerSession); System.out.println(STR + players.size()); }
/** * A player has left the game * @param playerSession The session for the exiting player */
A player has left the game
removePlayer
{ "repo_name": "rogerskw/CoDLaserTag", "path": "CoDLaserTag/src/main/java/edu/miamioh/ece/codlasertag/game/Game.java", "license": "gpl-2.0", "size": 6716 }
[ "javax.websocket.Session" ]
import javax.websocket.Session;
import javax.websocket.*;
[ "javax.websocket" ]
javax.websocket;
1,752,222
public void testShiftLeft1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; int number = 0; byte rBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger result = aNumber.shiftL...
void function() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; int number = 0; byte rBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger result = aNumber.shiftLeft(number); byte resBytes[] = new byte...
/** * shiftLeft(int n), n = 0. */
shiftLeft(int n), n = 0
testShiftLeft1
{ "repo_name": "google/j2cl", "path": "jre/javatests/com/google/gwt/emultest/java/math/BigIntegerOperateBitsTest.java", "license": "apache-2.0", "size": 47597 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
936,685
@Test public void checkDataSource() { // Create a fake Viz Connection VizConnection<FakeClient> connection = new FakeVizConnection(); // Create the TestConnectionPlot for a FakeClient TestConnectionPlot<FakeClient> testPlot = new TestConnectionPlot( connection); // Create two URIs URI fi...
void function() { VizConnection<FakeClient> connection = new FakeVizConnection(); TestConnectionPlot<FakeClient> testPlot = new TestConnectionPlot( connection); URI filepath = null; URI filepath2 = null; try { filepath = new URI(STR); filepath2 = new URI(STR); } catch (URISyntaxException e) { e.printStackTrace(); } try...
/** * Tests {@code ConnectionPlot}'s response to updating the plot's data * source URI. */
Tests ConnectionPlot's response to updating the plot's data source URI
checkDataSource
{ "repo_name": "jarrah42/eavp", "path": "org.eclipse.eavp.viz.service.test/src/org/eclipse/eavp/viz/service/connections/test/ConnectionPlotTester.java", "license": "epl-1.0", "size": 6499 }
[ "java.net.URISyntaxException", "org.eclipse.eavp.viz.service.connections.ConnectionPlot", "org.eclipse.eavp.viz.service.connections.IVizConnection", "org.eclipse.eavp.viz.service.connections.VizConnection", "org.junit.Assert" ]
import java.net.URISyntaxException; import org.eclipse.eavp.viz.service.connections.ConnectionPlot; import org.eclipse.eavp.viz.service.connections.IVizConnection; import org.eclipse.eavp.viz.service.connections.VizConnection; import org.junit.Assert;
import java.net.*; import org.eclipse.eavp.viz.service.connections.*; import org.junit.*;
[ "java.net", "org.eclipse.eavp", "org.junit" ]
java.net; org.eclipse.eavp; org.junit;
695,770
List<OFPortDesc> getPorts();
List<OFPortDesc> getPorts();
/** * Fetches the ports of this switch. * @return unmodifiable list of the ports. */
Fetches the ports of this switch
getPorts
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/OpenFlowSwitch.java", "license": "apache-2.0", "size": 4300 }
[ "java.util.List", "org.projectfloodlight.openflow.protocol.OFPortDesc" ]
import java.util.List; import org.projectfloodlight.openflow.protocol.OFPortDesc;
import java.util.*; import org.projectfloodlight.openflow.protocol.*;
[ "java.util", "org.projectfloodlight.openflow" ]
java.util; org.projectfloodlight.openflow;
2,653,885
public static Class resolveClass(BinaryContext ctx, int typeId, @Nullable String clsName, @Nullable ClassLoader ldr, boolean deserialize) { Class cls; if (typeId == GridBinaryMarshaller.OBJECT_TYPE_ID) return Object.class; if (typeId != GridBinaryMarshaller.UNREGISTERED...
static Class function(BinaryContext ctx, int typeId, @Nullable String clsName, @Nullable ClassLoader ldr, boolean deserialize) { Class cls; if (typeId == GridBinaryMarshaller.OBJECT_TYPE_ID) return Object.class; if (typeId != GridBinaryMarshaller.UNREGISTERED_TYPE_ID) cls = ctx.descriptorForTypeId(true, typeId, ldr, de...
/** * Resolve the class. * * @param ctx Binary context. * @param typeId Type ID. * @param clsName Class name. * @param ldr Class loaded. * @return Resovled class. */
Resolve the class
resolveClass
{ "repo_name": "ryanzz/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java", "license": "apache-2.0", "size": 66305 }
[ "org.apache.ignite.binary.BinaryInvalidTypeException", "org.apache.ignite.internal.util.typedef.internal.U", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.binary.BinaryInvalidTypeException; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.binary.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
1,428,547
public synchronized FileSystem getFs() throws IOException { if (this.fs == null) { Path sysDir = getSystemDir(); this.fs = sysDir.getFileSystem(getConf()); } return fs; }
synchronized FileSystem function() throws IOException { if (this.fs == null) { Path sysDir = getSystemDir(); this.fs = sysDir.getFileSystem(getConf()); } return fs; }
/** * Get a filesystem handle. We need this to prepare jobs * for submission to the MapReduce system. * * @return the filesystem handle. */
Get a filesystem handle. We need this to prepare jobs for submission to the MapReduce system
getFs
{ "repo_name": "shakamunyi/hadoop-20", "path": "src/mapred/org/apache/hadoop/mapred/JobClient.java", "license": "apache-2.0", "size": 86240 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
966,269
public Filter getFilter(Filter filter) { synchronized(cache) { FilterItem fi = null; fi = cache.get(Integer.valueOf(filter.hashCode())); if (fi != null) { fi.timestamp = new Date().getTime(); return fi.filter; } cache.put(Integer.valueOf(filter.hashCode()), new Filter...
Filter function(Filter filter) { synchronized(cache) { FilterItem fi = null; fi = cache.get(Integer.valueOf(filter.hashCode())); if (fi != null) { fi.timestamp = new Date().getTime(); return fi.filter; } cache.put(Integer.valueOf(filter.hashCode()), new FilterItem(filter)); return filter; } } protected class FilterItem...
/** * Returns the cached version of the filter. Allows the caller to pass up * a small filter but this will keep a persistent version around and allow * the caching filter to do its job. * * @param filter The input filter * @return The cached version of the filter */
Returns the cached version of the filter. Allows the caller to pass up a small filter but this will keep a persistent version around and allow the caching filter to do its job
getFilter
{ "repo_name": "fnp/pylucene", "path": "lucene-java-3.5.0/lucene/src/java/org/apache/lucene/search/FilterManager.java", "license": "apache-2.0", "size": 7206 }
[ "java.util.Date", "java.util.Map", "java.util.TreeSet" ]
import java.util.Date; import java.util.Map; import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
1,589,903
protected void setDataForNotification(Calendar dateandtime, int hour, int minute) { String checkSettting = "0"; if (radioAdvanced.isChecked() || radioOneDay.isChecked() || radioOneWeek.isChecked() || radioThreeDay.isChecked()) { checkSettting = "1"; } // Calendar dateandtime = Calendar.getInstance(...
void function(Calendar dateandtime, int hour, int minute) { String checkSettting = "0"; if (radioAdvanced.isChecked() radioOneDay.isChecked() radioOneWeek.isChecked() radioThreeDay.isChecked()) { checkSettting = "1"; } String fDate = new SimpleDateFormat(STR) .format(dateandtime.getTime()); fDate = previewDay(fDate, ho...
/** * Set data notification */
Set data notification
setDataForNotification
{ "repo_name": "NhamPhanDinh/smmatest", "path": "SMMA/src/jp/ne/smma/aboutsmma/dialog/SettingDialog.java", "license": "apache-2.0", "size": 23792 }
[ "java.text.SimpleDateFormat", "java.util.Calendar", "jp.ne.smma.Ultis", "jp.ne.smma.aboutsmma.DAO" ]
import java.text.SimpleDateFormat; import java.util.Calendar; import jp.ne.smma.Ultis; import jp.ne.smma.aboutsmma.DAO;
import java.text.*; import java.util.*; import jp.ne.smma.*; import jp.ne.smma.aboutsmma.*;
[ "java.text", "java.util", "jp.ne.smma" ]
java.text; java.util; jp.ne.smma;
134,171
SSOIdentityManager getIdentityManager();
SSOIdentityManager getIdentityManager();
/** * Getter for this domain's Identity Manager instance. */
Getter for this domain's Identity Manager instance
getIdentityManager
{ "repo_name": "atricore/josso1", "path": "core/josso-core/src/main/java/org/josso/SecurityDomain.java", "license": "lgpl-2.1", "size": 3931 }
[ "org.josso.gateway.identity.service.SSOIdentityManager" ]
import org.josso.gateway.identity.service.SSOIdentityManager;
import org.josso.gateway.identity.service.*;
[ "org.josso.gateway" ]
org.josso.gateway;
678,828
public @NotNull JBCefBrowserBuilder setUrl(@Nullable String url) { myUrl = url; return this; }
@NotNull JBCefBrowserBuilder function(@Nullable String url) { myUrl = url; return this; }
/** * Sets the initial URL to load. * <p></p> * When not set no initial URL is loaded. * * @see JBCefBrowserBase#loadURL(String) */
Sets the initial URL to load. When not set no initial URL is loaded
setUrl
{ "repo_name": "smmribeiro/intellij-community", "path": "platform/platform-api/src/com/intellij/ui/jcef/JBCefBrowserBuilder.java", "license": "apache-2.0", "size": 3563 }
[ "org.jetbrains.annotations.NotNull", "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,911,184
boolean load(@NonNull Context context) { SharedPreferences prefs = context.getSharedPreferences(APPLICATION_PREF_FILE, Context.MODE_PRIVATE); boolean needToSave = timeCounter.load(prefs); mainActivityIsVisible = prefs.getBoolean(PREF_MAIN_ACTIVITY_IS_VISIBLE, false); ...
boolean load(@NonNull Context context) { SharedPreferences prefs = context.getSharedPreferences(APPLICATION_PREF_FILE, Context.MODE_PRIVATE); boolean needToSave = timeCounter.load(prefs); mainActivityIsVisible = prefs.getBoolean(PREF_MAIN_ACTIVITY_IS_VISIBLE, false); enableReminders = prefs.getBoolean(PREF_ENABLE_REMIN...
/** * Loads and normalizes persistent state using context. Overridable for tests. * Normalization matters if the device rebooted while the timer was running or if the app was * replaced with a version that doesn't support the current choice of secondsPerReminder. * * @return true if the caller ...
Loads and normalizes persistent state using context. Overridable for tests. Normalization matters if the device rebooted while the timer was running or if the app was replaced with a version that doesn't support the current choice of secondsPerReminder
load
{ "repo_name": "1fish2/BBQTimer", "path": "app/src/main/java/com/onefishtwo/bbqtimer/state/ApplicationState.java", "license": "mit", "size": 7315 }
[ "android.content.Context", "android.content.SharedPreferences", "androidx.annotation.NonNull", "com.onefishtwo.bbqtimer.MinutesChoices" ]
import android.content.Context; import android.content.SharedPreferences; import androidx.annotation.NonNull; import com.onefishtwo.bbqtimer.MinutesChoices;
import android.content.*; import androidx.annotation.*; import com.onefishtwo.bbqtimer.*;
[ "android.content", "androidx.annotation", "com.onefishtwo.bbqtimer" ]
android.content; androidx.annotation; com.onefishtwo.bbqtimer;
2,782,538
public final Site getTargetSite() { return targetSite; }
final Site function() { return targetSite; }
/** * This method returns site from the right handside of the rule, which this * action should be applied to. */
This method returns site from the right handside of the rule, which this action should be applied to
getTargetSite
{ "repo_name": "kappamodeler/jkappa", "path": "src/main/com/plectix/simulator/simulationclasses/action/Action.java", "license": "lgpl-3.0", "size": 7790 }
[ "com.plectix.simulator.staticanalysis.Site" ]
import com.plectix.simulator.staticanalysis.Site;
import com.plectix.simulator.staticanalysis.*;
[ "com.plectix.simulator" ]
com.plectix.simulator;
868,401
public static ProfileInfo loadProfileVerbosely(Path profileFile, InfoListener reporter) throws IOException { reporter.info("Loading " + profileFile.getPathString()); ProfileInfo profileInfo = ProfileInfo.loadProfile(profileFile); if (profileInfo.isCorruptedOrIncomplete()) { reporter.warn("Prof...
static ProfileInfo function(Path profileFile, InfoListener reporter) throws IOException { reporter.info(STR + profileFile.getPathString()); ProfileInfo profileInfo = ProfileInfo.loadProfile(profileFile); if (profileInfo.isCorruptedOrIncomplete()) { reporter.warn(STR); } reporter.info(profileInfo.comment + STR + profile...
/** * Loads and parses Blaze profile file, and reports what it is doing. * * @param profileFile profile file path * @param reporter for progress messages and warnings * * @return ProfileInfo object with most fields populated * (call analyzeRelationships() to populate the remaining fields) ...
Loads and parses Blaze profile file, and reports what it is doing
loadProfileVerbosely
{ "repo_name": "damienmg/bazel", "path": "src/main/java/com/google/devtools/build/lib/profiler/analysis/ProfileInfo.java", "license": "apache-2.0", "size": 39424 }
[ "com.google.devtools.build.lib.vfs.Path", "java.io.IOException" ]
import com.google.devtools.build.lib.vfs.Path; import java.io.IOException;
import com.google.devtools.build.lib.vfs.*; import java.io.*;
[ "com.google.devtools", "java.io" ]
com.google.devtools; java.io;
1,234,435
@ApiMethod(name = "listDevices") public Collection<RegistrationRecord> listDevices(@Named("count") int count) { List<RegistrationRecord> records = ofy().load().type(RegistrationRecord.class).limit(count).list(); Collection<RegistrationRecord> col = new LinkedList<RegistrationRecord>(); c...
@ApiMethod(name = STR) Collection<RegistrationRecord> function(@Named("count") int count) { List<RegistrationRecord> records = ofy().load().type(RegistrationRecord.class).limit(count).list(); Collection<RegistrationRecord> col = new LinkedList<RegistrationRecord>(); col.addAll(records); return col; }
/** * Return a collection of registered devices * * @param count The number of devices to list * @return a list of Google Cloud Messaging registration Ids */
Return a collection of registered devices
listDevices
{ "repo_name": "vaektor/Loqale", "path": "backend/src/main/java/net/nfiniteloop/loqale/backend/RegistrationEndpoint.java", "license": "apache-2.0", "size": 3164 }
[ "com.google.api.server.spi.config.ApiMethod", "java.util.Collection", "java.util.LinkedList", "java.util.List", "javax.inject.Named", "net.nfiniteloop.loqale.backend.OfyService" ]
import com.google.api.server.spi.config.ApiMethod; import java.util.Collection; import java.util.LinkedList; import java.util.List; import javax.inject.Named; import net.nfiniteloop.loqale.backend.OfyService;
import com.google.api.server.spi.config.*; import java.util.*; import javax.inject.*; import net.nfiniteloop.loqale.backend.*;
[ "com.google.api", "java.util", "javax.inject", "net.nfiniteloop.loqale" ]
com.google.api; java.util; javax.inject; net.nfiniteloop.loqale;
1,484,355
protected void skipCommaSpaces() throws IOException { wsp1: for (;;) { switch (current) { default: break wsp1; case 0x20: case 0x9: case 0xD: case 0xA: } current = reader.read(); } if (current == ',') { wsp2: for (;;) { switch (current = reader.read()) { ...
void function() throws IOException { wsp1: for (;;) { switch (current) { default: break wsp1; case 0x20: case 0x9: case 0xD: case 0xA: } current = reader.read(); } if (current == ',') { wsp2: for (;;) { switch (current = reader.read()) { default: break wsp2; case 0x20: case 0x9: case 0xD: case 0xA: } } } }
/** * Skips the whitespaces and an optional comma. */
Skips the whitespaces and an optional comma
skipCommaSpaces
{ "repo_name": "md-k-sarker/OWLAx", "path": "src/main/java/com/mxgraph/util/svg/AbstractParser.java", "license": "bsd-2-clause", "size": 4977 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
328,571
IStatus activate(IProgressMonitor monitor);
IStatus activate(IProgressMonitor monitor);
/** * Activates this remote command service discoverer. * * @param monitor * the progress monitor * @return the status of the activation */
Activates this remote command service discoverer
activate
{ "repo_name": "nickmain/xmind", "path": "bundles/org.xmind.core.command.remote/src/org/xmind/core/command/remote/IRemoteCommandServiceDiscoverer.java", "license": "epl-1.0", "size": 3657 }
[ "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.core.runtime.IStatus" ]
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
2,286,850
public static LocalService auxiliaryService( Set<String> names, int port, Command shutdownCommand) { MorePreconditions.checkNotBlank(names); return new LocalService(false, names, port, shutdownCommand); } }
static LocalService function( Set<String> names, int port, Command shutdownCommand) { MorePreconditions.checkNotBlank(names); return new LocalService(false, names, port, shutdownCommand); } }
/** * Creates an auxiliary service identified by multiple names. * * @param names Service names. * @param port Service port. * @param shutdownCommand A command that will shut down the service. * @return A new auxiliary local service. */
Creates an auxiliary service identified by multiple names
auxiliaryService
{ "repo_name": "wfarner/aurora", "path": "commons/src/main/java/org/apache/aurora/common/application/modules/LocalServiceRegistry.java", "license": "apache-2.0", "size": 8627 }
[ "java.util.Set", "org.apache.aurora.common.base.Command", "org.apache.aurora.common.base.MorePreconditions" ]
import java.util.Set; import org.apache.aurora.common.base.Command; import org.apache.aurora.common.base.MorePreconditions;
import java.util.*; import org.apache.aurora.common.base.*;
[ "java.util", "org.apache.aurora" ]
java.util; org.apache.aurora;
1,823,504
private Breadcrumb useExistingCrumbIfPossible(Breadcrumb newCrumb) { Breadcrumb crumb = crumbsByPageIdClass.get(newCrumb.getStableId()); if (crumb != null) { crumb.updateWith(newCrumb); } else { crumb = newCrumb; crumbsByPageIdClass.put(crumb.getStableId()...
Breadcrumb function(Breadcrumb newCrumb) { Breadcrumb crumb = crumbsByPageIdClass.get(newCrumb.getStableId()); if (crumb != null) { crumb.updateWith(newCrumb); } else { crumb = newCrumb; crumbsByPageIdClass.put(crumb.getStableId(), crumb); } return crumb; } private static class PersistentList implements Serializable { ...
/** * This allows us to update breadcrumb titles in the existing trails. We * also share breadcrumb objects across trails instead of always storing new * ones on each render. */
This allows us to update breadcrumb titles in the existing trails. We also share breadcrumb objects across trails instead of always storing new ones on each render
useExistingCrumbIfPossible
{ "repo_name": "inventiLT/inventi-wicket", "path": "inventi-wicket-breadcrumbs/src/main/java/lt/inventi/wicket/component/breadcrumb/BreadcrumbTrailHistory.java", "license": "apache-2.0", "size": 4686 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,677,745
public final Transaction getTransactionByXID(byte[] XID) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass , "getTransactionByXID" , "XIDe=" + XID + "(byte[...
final Transaction function(byte[] XID) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass , STR , "XIDe=" + XID + STR ); Transaction transaction = objectManagerState.getTransactionByXID(XID); if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) ...
/** * Locate a transaction registered with this ObjectManager. * with the same XID as the one passed. * If a null XID is passed this will return any registered transaction with a null XID. * * @param XID Xopen identifier. * @return Transaction identified by the XID. * @throws ObjectM...
Locate a transaction registered with this ObjectManager. with the same XID as the one passed. If a null XID is passed this will return any registered transaction with a null XID
getTransactionByXID
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/ObjectManager.java", "license": "epl-1.0", "size": 48169 }
[ "com.ibm.ws.objectManager.utils.Tracing" ]
import com.ibm.ws.objectManager.utils.Tracing;
import com.ibm.ws.*;
[ "com.ibm.ws" ]
com.ibm.ws;
1,517,128
java.util.Date now = dateTimeService.getCurrentDate(); return SpringContext.getBean(BusinessObjectService.class).findBySinglePrimaryKey(UniversityDate.class, new java.sql.Date( KfsDateUtils.clearTimeFields(now).getTime() )); }
java.util.Date now = dateTimeService.getCurrentDate(); return SpringContext.getBean(BusinessObjectService.class).findBySinglePrimaryKey(UniversityDate.class, new java.sql.Date( KfsDateUtils.clearTimeFields(now).getTime() )); }
/** * This method retrieves a UniversityDate object using today's date to create the instance. * * @return A UniversityDate instance representing today's date. * * @see org.kuali.kfs.sys.service.UniversityDateService#getCurrentUniversityDate() */
This method retrieves a UniversityDate object using today's date to create the instance
getCurrentUniversityDate
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/sys/service/impl/UniversityDateServiceImpl.java", "license": "agpl-3.0", "size": 5433 }
[ "org.kuali.kfs.sys.businessobject.UniversityDate", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.kfs.sys.util.KfsDateUtils", "org.kuali.rice.krad.service.BusinessObjectService" ]
import org.kuali.kfs.sys.businessobject.UniversityDate; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.kfs.sys.util.KfsDateUtils; import org.kuali.rice.krad.service.BusinessObjectService;
import org.kuali.kfs.sys.businessobject.*; import org.kuali.kfs.sys.context.*; import org.kuali.kfs.sys.util.*; import org.kuali.rice.krad.service.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
640,921
@SideOnly(Side.CLIENT) public String format(int number) { return StatBase.numberFormat.format((long)number); }
@SideOnly(Side.CLIENT) String function(int number) { return StatBase.numberFormat.format((long)number); }
/** * Formats a given stat for human consumption. */
Formats a given stat for human consumption
format
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraft/stats/StatBase.java", "license": "gpl-3.0", "size": 6328 }
[ "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.*;
[ "net.minecraftforge.fml" ]
net.minecraftforge.fml;
2,217,986