method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public UpdateSerdeURIRetVal updateSerdeURI(URI oldLoc, URI newLoc, String serdeProp,
boolean isDryRun) {
boolean committed = false;
Map<String, String> updateLocations = new HashMap<String, String>();
List<String> badRecords = new ArrayList<String>();
UpdateSerdeURIRetVal retVal = null;
try {... | UpdateSerdeURIRetVal function(URI oldLoc, URI newLoc, String serdeProp, boolean isDryRun) { boolean committed = false; Map<String, String> updateLocations = new HashMap<String, String>(); List<String> badRecords = new ArrayList<String>(); UpdateSerdeURIRetVal retVal = null; try { openTransaction(); Query query = pm.new... | /** The following APIs
*
* - updateSerdeURI
*
* is used by HiveMetaTool. This API **shouldn't** be exposed via Thrift.
*
*/ | The following APIs - updateSerdeURI is used by HiveMetaTool. This API **shouldn't** be exposed via Thrift | updateSerdeURI | {
"repo_name": "wisgood/hive",
"path": "metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java",
"license": "apache-2.0",
"size": 265747
} | [
"java.net.URISyntaxException",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.jdo.Query",
"org.apache.hadoop.hive.metastore.model.MSerDeInfo"
] | import java.net.URISyntaxException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.jdo.Query; import org.apache.hadoop.hive.metastore.model.MSerDeInfo; | import java.net.*; import java.util.*; import javax.jdo.*; import org.apache.hadoop.hive.metastore.model.*; | [
"java.net",
"java.util",
"javax.jdo",
"org.apache.hadoop"
] | java.net; java.util; javax.jdo; org.apache.hadoop; | 1,114,309 |
@Override
protected void dropItemsOn(final Corpse corpse) {
final Food food = (Food) SingletonRepository.getEntityManager().getItem("meat");
food.setQuantity(getWeight() / 10 + 1);
corpse.add(food);
} | void function(final Corpse corpse) { final Food food = (Food) SingletonRepository.getEntityManager().getItem("meat"); food.setQuantity(getWeight() / 10 + 1); corpse.add(food); } | /**
* Can be called when the sheep dies. Puts meat onto its corpse; the amount
* of meat depends on the domestic animal's weight.
*
* @param corpse
* The corpse on which to put the meat
*/ | Can be called when the sheep dies. Puts meat onto its corpse; the amount of meat depends on the domestic animal's weight | dropItemsOn | {
"repo_name": "arianne/stendhal",
"path": "src/games/stendhal/server/entity/creature/DomesticAnimal.java",
"license": "gpl-2.0",
"size": 5705
} | [
"games.stendhal.server.core.engine.SingletonRepository",
"games.stendhal.server.entity.item.Corpse",
"games.stendhal.server.entity.item.Food"
] | import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.entity.item.Corpse; import games.stendhal.server.entity.item.Food; | import games.stendhal.server.core.engine.*; import games.stendhal.server.entity.item.*; | [
"games.stendhal.server"
] | games.stendhal.server; | 1,530,514 |
public static ILazyDataset[] getFirstAxes(IDataset slice) {
AxesMetadata am = slice.getFirstMetadata(AxesMetadata.class);
if (am == null)
return null;
return am.getAxes();
} | static ILazyDataset[] function(IDataset slice) { AxesMetadata am = slice.getFirstMetadata(AxesMetadata.class); if (am == null) return null; return am.getAxes(); } | /**
* Convenience method to get first set of axes from the Datasets metadata, can return null
* @param slice
* @return axes
*/ | Convenience method to get first set of axes from the Datasets metadata, can return null | getFirstAxes | {
"repo_name": "xen-0/dawnsci",
"path": "org.eclipse.dawnsci.analysis.dataset/src/org/eclipse/dawnsci/analysis/dataset/operations/AbstractOperationBase.java",
"license": "epl-1.0",
"size": 8215
} | [
"org.eclipse.january.dataset.IDataset",
"org.eclipse.january.dataset.ILazyDataset",
"org.eclipse.january.metadata.AxesMetadata"
] | import org.eclipse.january.dataset.IDataset; import org.eclipse.january.dataset.ILazyDataset; import org.eclipse.january.metadata.AxesMetadata; | import org.eclipse.january.dataset.*; import org.eclipse.january.metadata.*; | [
"org.eclipse.january"
] | org.eclipse.january; | 2,615,634 |
public void execute(LifecycleEvent evt)
{
initProperties();
PrintWriter mod_jk = null;
try {
mod_jk = getWriter();
} catch(IOException iex) {
log("Unable to open config file");
return;
}
Lifecycle who = evt.getLifecycle();
if( who instanceof Server ) {
executeServer((Server)who, mod_j... | void function(LifecycleEvent evt) { initProperties(); PrintWriter mod_jk = null; try { mod_jk = getWriter(); } catch(IOException iex) { log(STR); return; } Lifecycle who = evt.getLifecycle(); if( who instanceof Server ) { executeServer((Server)who, mod_jk); } else if ( who instanceof Host ) { executeHost((Host)who, mod... | /** Generate configuration files. Override with method to generate
web server specific configuration.
*/ | Generate configuration files. Override with method to generate | execute | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-connectors/jk/java/org/apache/jk/config/BaseJkConfig.java",
"license": "apache-2.0",
"size": 18598
} | [
"java.io.IOException",
"java.io.PrintWriter",
"org.apache.catalina.Context",
"org.apache.catalina.Host",
"org.apache.catalina.Lifecycle",
"org.apache.catalina.LifecycleEvent",
"org.apache.catalina.Server"
] | import java.io.IOException; import java.io.PrintWriter; import org.apache.catalina.Context; import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.Server; | import java.io.*; import org.apache.catalina.*; | [
"java.io",
"org.apache.catalina"
] | java.io; org.apache.catalina; | 2,649,423 |
@Bean
@Scope(PROTOTYPE)
public XSLTTransformer xsltTransformer() throws IntegrationException {
return new XSLTTransformer(xslTransformerFactory());
} | @Scope(PROTOTYPE) XSLTTransformer function() throws IntegrationException { return new XSLTTransformer(xslTransformerFactory()); } | /**
* XSLT Transformer
*
* @return xsltTransformer transformer
* @throws IntegrationException exception
*/ | XSLT Transformer | xsltTransformer | {
"repo_name": "NCIP/ihub",
"path": "software/projects/common/src/main/java/gov/nih/nci/integration/transformer/TransformerConfig.java",
"license": "bsd-3-clause",
"size": 1741
} | [
"gov.nih.nci.integration.exception.IntegrationException",
"org.springframework.context.annotation.Scope"
] | import gov.nih.nci.integration.exception.IntegrationException; import org.springframework.context.annotation.Scope; | import gov.nih.nci.integration.exception.*; import org.springframework.context.annotation.*; | [
"gov.nih.nci",
"org.springframework.context"
] | gov.nih.nci; org.springframework.context; | 756,394 |
public void testNameWithQuotation_03() throws Exception {
String dn = "CN=ABC\"DEF\"";
X500Principal principal = new X500Principal(dn);
assertEquals("CN=ABC\\\"DEF\\\"", principal
.getName(X500Principal.RFC2253));
} | void function() throws Exception { String dn = STRDEF\STRCN=ABC\\\STR", principal .getName(X500Principal.RFC2253)); } | /**
* Inits X500Principal with the string with special characters - ABC"DEF"
* Compatibility issue: according RFC 2253 such string is invalid
* but we accept it, not string char is escaped
*/ | Inits X500Principal with the string with special characters - ABC"DEF" Compatibility issue: according RFC 2253 such string is invalid but we accept it, not string char is escaped | testNameWithQuotation_03 | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java",
"license": "gpl-2.0",
"size": 127872
} | [
"javax.security.auth.x500.X500Principal"
] | import javax.security.auth.x500.X500Principal; | import javax.security.auth.x500.*; | [
"javax.security"
] | javax.security; | 1,320,156 |
@Override
public int getRotation(JMatrix3d aRotation) {
if (!mSystemReady) {
aRotation.identity();
return (-1);
}
aRotation.identity();
return (0);
}
| int function(JMatrix3d aRotation) { if (!mSystemReady) { aRotation.identity(); return (-1); } aRotation.identity(); return (0); } | /**
* Read the orientation frame of the device end-effector.
*
* @param aRotation
* - Return value.
* @return
*/ | Read the orientation frame of the device end-effector | getRotation | {
"repo_name": "jchai3d/jchai3d",
"path": "src/main/java/org/jchai3d/devices/JVirtualDevice.java",
"license": "gpl-2.0",
"size": 8158
} | [
"org.jchai3d.math.JMatrix3d"
] | import org.jchai3d.math.JMatrix3d; | import org.jchai3d.math.*; | [
"org.jchai3d.math"
] | org.jchai3d.math; | 1,199,882 |
public static void createProjects(
final Set<ProjectRecord> projectsToCreate,
final IWorkingSet[] selectedWorkingSets, IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
createProjects(projectsToCreate, false, selectedWorkingSets, monitor);
} | static void function( final Set<ProjectRecord> projectsToCreate, final IWorkingSet[] selectedWorkingSets, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { createProjects(projectsToCreate, false, selectedWorkingSets, monitor); } | /**
* Create (import) a set of existing projects. The projects are
* automatically connected to the repository they reside in.
*
* @param projectsToCreate
* the projects to create
* @param selectedWorkingSets
* the workings sets to add the created projects to, may be null
* ... | Create (import) a set of existing projects. The projects are automatically connected to the repository they reside in | createProjects | {
"repo_name": "blizzy78/egit",
"path": "org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/ProjectUtils.java",
"license": "epl-1.0",
"size": 6738
} | [
"java.lang.reflect.InvocationTargetException",
"java.util.Set",
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.ui.IWorkingSet"
] | import java.lang.reflect.InvocationTargetException; import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.ui.IWorkingSet; | import java.lang.reflect.*; import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.ui.*; | [
"java.lang",
"java.util",
"org.eclipse.core",
"org.eclipse.ui"
] | java.lang; java.util; org.eclipse.core; org.eclipse.ui; | 708,758 |
@UnstableApi
public Builder setAnalyticsCollector(AnalyticsCollector analyticsCollector) {
checkState(!buildCalled);
this.analyticsCollectorFunction = (clock) -> analyticsCollector;
return this;
} | Builder function(AnalyticsCollector analyticsCollector) { checkState(!buildCalled); this.analyticsCollectorFunction = (clock) -> analyticsCollector; return this; } | /**
* Sets the {@link AnalyticsCollector} that will collect and forward all player events.
*
* @param analyticsCollector An {@link AnalyticsCollector}.
* @return This builder.
* @throws IllegalStateException If {@link #build()} has already been called.
*/ | Sets the <code>AnalyticsCollector</code> that will collect and forward all player events | setAnalyticsCollector | {
"repo_name": "androidx/media",
"path": "libraries/exoplayer/src/main/java/androidx/media3/exoplayer/ExoPlayer.java",
"license": "apache-2.0",
"size": 63472
} | [
"androidx.media3.common.util.Assertions",
"androidx.media3.exoplayer.analytics.AnalyticsCollector"
] | import androidx.media3.common.util.Assertions; import androidx.media3.exoplayer.analytics.AnalyticsCollector; | import androidx.media3.common.util.*; import androidx.media3.exoplayer.analytics.*; | [
"androidx.media3"
] | androidx.media3; | 237,488 |
@Test()
public void testBasics()
throws Exception
{
// Create an intercepted SASL bind operation. We'll use a null connection,
// which shouldn't happen naturally but will be sufficient for this test.
final BindRequestProtocolOp requestOp =
new BindRequestProtocolOp(
n... | @Test() void function() throws Exception { final BindRequestProtocolOp requestOp = new BindRequestProtocolOp( new GenericSASLBindRequest(null, STR, null)); final InterceptedSASLBindOperation o = new InterceptedSASLBindOperation( null, 1, requestOp); assertNotNull(o.toString()); assertNull(o.getClientConnection()); asse... | /**
* Provides basic test coverage for an intercepted SASL bind operation.
*
* @throws Exception If an unexpected problem occurs.
*/ | Provides basic test coverage for an intercepted SASL bind operation | testBasics | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/listener/interceptor/InterceptedSASLBindOperationTestCase.java",
"license": "gpl-2.0",
"size": 3814
} | [
"com.unboundid.ldap.protocol.BindRequestProtocolOp",
"com.unboundid.ldap.sdk.BindResult",
"com.unboundid.ldap.sdk.GenericSASLBindRequest",
"com.unboundid.ldap.sdk.ResultCode",
"org.testng.annotations.Test"
] | import com.unboundid.ldap.protocol.BindRequestProtocolOp; import com.unboundid.ldap.sdk.BindResult; import com.unboundid.ldap.sdk.GenericSASLBindRequest; import com.unboundid.ldap.sdk.ResultCode; import org.testng.annotations.Test; | import com.unboundid.ldap.protocol.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*; | [
"com.unboundid.ldap",
"org.testng.annotations"
] | com.unboundid.ldap; org.testng.annotations; | 197,213 |
public ElementBox createBox(ElementBox parent, Element n, String display)
{
ElementBox root = null;
//New box style
NodeData style = decoder.getElementStyleInherited(n);
if (style == null)
style = createAnonymousStyle(display);
//Special ... | ElementBox function(ElementBox parent, Element n, String display) { ElementBox root = null; NodeData style = decoder.getElementStyleInherited(n); if (style == null) style = createAnonymousStyle(display); if (config.getUseHTML() && html.isTagSupported(n)) { root = html.createBox(parent, n, viewport, style); } if (root =... | /**
* Creates a single new box from an element.
* @param n The source DOM element
* @param display the display: property value that is used when the box style is not known (e.g. anonymous boxes)
* @return A new box of a subclass of {@link ElementBox} based on the value of the 'display' CSS property
... | Creates a single new box from an element | createBox | {
"repo_name": "philborlin/CSSBox",
"path": "src/main/java/org/fit/cssbox/layout/BoxFactory.java",
"license": "lgpl-3.0",
"size": 39693
} | [
"cz.vutbr.web.css.NodeData",
"org.w3c.dom.Element"
] | import cz.vutbr.web.css.NodeData; import org.w3c.dom.Element; | import cz.vutbr.web.css.*; import org.w3c.dom.*; | [
"cz.vutbr.web",
"org.w3c.dom"
] | cz.vutbr.web; org.w3c.dom; | 583,195 |
public java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeHLAPI> getInput_finiteIntRanges_FiniteIntRangeHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeHLAPI>();
... | java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().... | /**
* This accessor return a list of encapsulated subelement, only of FiniteIntRangeHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of FiniteIntRangeHLAPI kind. WARNING : this method can creates a lot of new object in memory | getInput_finiteIntRanges_FiniteIntRangeHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/SublistHLAPI.java",
"license": "epl-1.0",
"size": 111755
} | [
"fr.lip6.move.pnml.hlpn.terms.Sort",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 283,831 |
public synchronized void finalizeLogSegment(RequestInfo reqInfo, long startTxId,
long endTxId) throws IOException {
checkFormatted();
checkRequest(reqInfo);
boolean needsValidation = true;
// Finalizing the log that the writer was just writing.
if (startTxId == curSegmentTxId) {
if (... | synchronized void function(RequestInfo reqInfo, long startTxId, long endTxId) throws IOException { checkFormatted(); checkRequest(reqInfo); boolean needsValidation = true; if (startTxId == curSegmentTxId) { if (curSegment != null) { curSegment.close(); curSegment = null; curSegmentTxId = HdfsConstants.INVALID_TXID; } c... | /**
* Finalize the log segment at the given transaction ID.
*/ | Finalize the log segment at the given transaction ID | finalizeLogSegment | {
"repo_name": "oza/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java",
"license": "apache-2.0",
"size": 39466
} | [
"com.google.common.base.Preconditions",
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.HdfsConstants",
"org.apache.hadoop.hdfs.qjournal.protocol.JournalOutOfSyncException",
"org.apache.hadoop.hdfs.qjournal.protocol.RequestInfo",
"org.apache.hadoop.hdfs.server.namenode.FileJournalManager"
] | import com.google.common.base.Preconditions; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.qjournal.protocol.JournalOutOfSyncException; import org.apache.hadoop.hdfs.qjournal.protocol.RequestInfo; import org.apache.hadoop.hdfs.server.namenode.FileJournal... | import com.google.common.base.*; import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.qjournal.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"com.google.common",
"java.io",
"org.apache.hadoop"
] | com.google.common; java.io; org.apache.hadoop; | 2,569,387 |
public JApplet getApplet() {
return applet;
}
| JApplet function() { return applet; } | /**
* Returns the applet object, or null if running in an application.
*/ | Returns the applet object, or null if running in an application | getApplet | {
"repo_name": "ralph-irving/softsqueeze3",
"path": "src/org/titmuss/softsqueeze/Softsqueeze.java",
"license": "gpl-2.0",
"size": 13121
} | [
"javax.swing.JApplet"
] | import javax.swing.JApplet; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 856,572 |
@Pure
public AttributeValue getValue() {
return this.newValue;
} | AttributeValue function() { return this.newValue; } | /** Replies the new value of the attribute.
*
* @return the attribute value, never <code>null</code>
*/ | Replies the new value of the attribute | getValue | {
"repo_name": "tpiotrow/afc",
"path": "advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/AttributeChangeEvent.java",
"license": "apache-2.0",
"size": 3933
} | [
"org.arakhne.afc.attrs.attr.AttributeValue"
] | import org.arakhne.afc.attrs.attr.AttributeValue; | import org.arakhne.afc.attrs.attr.*; | [
"org.arakhne.afc"
] | org.arakhne.afc; | 2,799,199 |
public BusinessEntity getBusinessEntityByServiceName(GetBusinessEntityByServiceNameRequestType request) {
BusinessEntity bEntity = new BusinessEntity();
try {
bEntity = ConnectionManagerCache.getInstance().getBusinessEntityByServiceName(request.getHomeCommunityId(),
r... | BusinessEntity function(GetBusinessEntityByServiceNameRequestType request) { BusinessEntity bEntity = new BusinessEntity(); try { bEntity = ConnectionManagerCache.getInstance().getBusinessEntityByServiceName(request.getHomeCommunityId(), request.getServiceName()); } catch (ConnectionManagerException cme) { getLogger().... | /**
* This method retrieves the business entity that contains the specific home community and service name.
*
* @param request The request containing the home community ID and the service name
* @return The Business Entity information along with only the requested service. if the service is not fou... | This method retrieves the business entity that contains the specific home community and service name | getBusinessEntityByServiceName | {
"repo_name": "alameluchidambaram/CONNECT",
"path": "Product/Production/Common/CONNECTCommonWeb/src/main/java/gov/hhs/fha/nhinc/common/connectionmanager/NhincComponentConnectionManager.java",
"license": "bsd-3-clause",
"size": 19480
} | [
"gov.hhs.fha.nhinc.common.connectionmanagerinfo.GetBusinessEntityByServiceNameRequestType",
"gov.hhs.fha.nhinc.connectmgr.ConnectionManagerCache",
"gov.hhs.fha.nhinc.connectmgr.ConnectionManagerException",
"org.uddi.api_v3.BusinessEntity"
] | import gov.hhs.fha.nhinc.common.connectionmanagerinfo.GetBusinessEntityByServiceNameRequestType; import gov.hhs.fha.nhinc.connectmgr.ConnectionManagerCache; import gov.hhs.fha.nhinc.connectmgr.ConnectionManagerException; import org.uddi.api_v3.BusinessEntity; | import gov.hhs.fha.nhinc.common.connectionmanagerinfo.*; import gov.hhs.fha.nhinc.connectmgr.*; import org.uddi.api_v3.*; | [
"gov.hhs.fha",
"org.uddi.api_v3"
] | gov.hhs.fha; org.uddi.api_v3; | 1,498,919 |
public static <T> T getRandomElement(Collection<T> collection) {
int size = collection.size();
return Iterables.get(collection, Math.abs(Random.getInt()) % size);
} | static <T> T function(Collection<T> collection) { int size = collection.size(); return Iterables.get(collection, Math.abs(Random.getInt()) % size); } | /**
* Return a random element from the {@code collection}.
*
* @param collection
* @return a random element
*/ | Return a random element from the collection | getRandomElement | {
"repo_name": "dubex/concourse",
"path": "concourse-server/src/main/java/com/cinchapi/concourse/util/TCollections.java",
"license": "apache-2.0",
"size": 2743
} | [
"com.cinchapi.concourse.util.Random",
"com.google.common.collect.Iterables",
"java.util.Collection"
] | import com.cinchapi.concourse.util.Random; import com.google.common.collect.Iterables; import java.util.Collection; | import com.cinchapi.concourse.util.*; import com.google.common.collect.*; import java.util.*; | [
"com.cinchapi.concourse",
"com.google.common",
"java.util"
] | com.cinchapi.concourse; com.google.common; java.util; | 1,612,478 |
public static void setPreferredLaneCount(int count) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
if (count < 0) {
prefs.remove("LANE_COUNT"); //$NON-NLS-1$
} else {
prefs.putInt("LANE_COUNT", count); //$NON-NLS-1$
}
}
} | static void function(int count) { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class); if (prefs != null) { if (count < 0) { prefs.remove(STR); } else { prefs.putInt(STR, count); } } } | /** Set the preferred number of lanes for a road segment.
*
* @param count is the preferred number of lanes for a road segment.
* @see #DEFAULT_LANE_COUNT
*/ | Set the preferred number of lanes for a road segment | setPreferredLaneCount | {
"repo_name": "gallandarakhneorg/afc",
"path": "advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java",
"license": "apache-2.0",
"size": 26168
} | [
"java.util.prefs.Preferences"
] | import java.util.prefs.Preferences; | import java.util.prefs.*; | [
"java.util"
] | java.util; | 1,390,764 |
public ErrorHandler getErrorHandler() {
return null;
}
| ErrorHandler function() { return null; } | /**
* Not supported.
*
* @see org.xml.sax.XMLReader#getErrorHandler()
*/ | Not supported | getErrorHandler | {
"repo_name": "NCIP/cadsr-cgmdr-nci-uk",
"path": "src/org/exist/cocoon/XMLReaderWrapper.java",
"license": "bsd-3-clause",
"size": 4868
} | [
"org.xml.sax.ErrorHandler"
] | import org.xml.sax.ErrorHandler; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 798,989 |
private boolean refreshFunctionalityCheck(DashboardReportDataModel data) {
clickAddButton.click();
selectOrg.sendKeys(data.getOrganization());
resetButton.click();
if (selectOrg.getText().equals("Select Organisation")) {
log.info("reset functionality successful");
return true;
}
log.info("reset fun... | boolean function(DashboardReportDataModel data) { clickAddButton.click(); selectOrg.sendKeys(data.getOrganization()); resetButton.click(); if (selectOrg.getText().equals(STR)) { log.info(STR); return true; } log.info(STR); return false; } | /**
* checks if reset functionality is successful
*
* @param data
*
* @return true if reset functionality is successful o/w false
*/ | checks if reset functionality is successful | refreshFunctionalityCheck | {
"repo_name": "CognizantOneDevOps/Insights",
"path": "PlatformRegressionTest/src/main/java/com/cognizant/devops/platformregressiontest/test/ui/dashboardreportdownload/DashboardReportDownloadConfiguration.java",
"license": "apache-2.0",
"size": 11114
} | [
"com.cognizant.devops.platformregressiontest.test.ui.testdatamodel.DashboardReportDataModel"
] | import com.cognizant.devops.platformregressiontest.test.ui.testdatamodel.DashboardReportDataModel; | import com.cognizant.devops.platformregressiontest.test.ui.testdatamodel.*; | [
"com.cognizant.devops"
] | com.cognizant.devops; | 1,534,246 |
static HttpData wrap(byte[] data, int offset, int length) {
requireNonNull(data, "data");
if (offset < 0 || length < 0 || offset > data.length - length) {
throw new ArrayIndexOutOfBoundsException(
"offset: " + offset + ", length: " + length + ", data.length: " + data.... | static HttpData wrap(byte[] data, int offset, int length) { requireNonNull(data, "data"); if (offset < 0 length < 0 offset > data.length - length) { throw new ArrayIndexOutOfBoundsException( STR + offset + STR + length + STR + data.length); } if (length == 0) { return empty(); } if (data.length == length) { return wrap... | /**
* Creates a new instance from the specified byte array, {@code offset} and {@code length}.
* The array is not copied; any changes made in the array later will be visible to {@link HttpData}.
*
* @return a new {@link HttpData}. {@link #empty()} if {@code length} is 0.
*
* @throws ArrayI... | Creates a new instance from the specified byte array, offset and length. The array is not copied; any changes made in the array later will be visible to <code>HttpData</code> | wrap | {
"repo_name": "anuraaga/armeria",
"path": "core/src/main/java/com/linecorp/armeria/common/HttpData.java",
"license": "apache-2.0",
"size": 13337
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,381,254 |
public Path[] availableShardPaths(ShardId shardId) {
assert assertEnvIsLocked();
final NodePath[] nodePaths = nodePaths();
final Path[] shardLocations = new Path[nodePaths.length];
for (int i = 0; i < nodePaths.length; i++) {
shardLocations[i] = nodePaths[i].resolve(shard... | Path[] function(ShardId shardId) { assert assertEnvIsLocked(); final NodePath[] nodePaths = nodePaths(); final Path[] shardLocations = new Path[nodePaths.length]; for (int i = 0; i < nodePaths.length; i++) { shardLocations[i] = nodePaths[i].resolve(shardId); } return shardLocations; } | /**
* Returns all shard paths excluding custom shard path. Note: Shards are only allocated on one of the
* returned paths. The returned array may contain paths to non-existing directories.
*
* @see #hasCustomDataPath(org.elasticsearch.common.settings.Settings)
* @see #resolveCustomLocation(org.... | Returns all shard paths excluding custom shard path. Note: Shards are only allocated on one of the returned paths. The returned array may contain paths to non-existing directories | availableShardPaths | {
"repo_name": "jeteve/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/env/NodeEnvironment.java",
"license": "apache-2.0",
"size": 35374
} | [
"java.nio.file.Path",
"org.elasticsearch.index.shard.ShardId"
] | import java.nio.file.Path; import org.elasticsearch.index.shard.ShardId; | import java.nio.file.*; import org.elasticsearch.index.shard.*; | [
"java.nio",
"org.elasticsearch.index"
] | java.nio; org.elasticsearch.index; | 460,670 |
protected boolean isInputStreamNeeded(Exchange exchange) {
Object body = exchange.getIn().getBody();
if (body == null) {
return false;
}
if (body instanceof InputStream) {
return true;
} else if (body instanceof Source) {
return false;
... | boolean function(Exchange exchange) { Object body = exchange.getIn().getBody(); if (body == null) { return false; } if (body instanceof InputStream) { return true; } else if (body instanceof Source) { return false; } else if (body instanceof String) { return false; } else if (body instanceof byte[]) { return false; } e... | /**
* Checks whether we need an {@link InputStream} to access the message body.
* <p/>
* Depending on the content in the message body, we may not need to convert
* to {@link InputStream}.
*
* @param exchange the current exchange
* @return <tt>true</tt> to convert to {@link InputStream... | Checks whether we need an <code>InputStream</code> to access the message body. Depending on the content in the message body, we may not need to convert to <code>InputStream</code> | isInputStreamNeeded | {
"repo_name": "trohovsky/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java",
"license": "apache-2.0",
"size": 20481
} | [
"java.io.InputStream",
"javax.xml.transform.Source",
"org.apache.camel.Exchange",
"org.w3c.dom.Node"
] | import java.io.InputStream; import javax.xml.transform.Source; import org.apache.camel.Exchange; import org.w3c.dom.Node; | import java.io.*; import javax.xml.transform.*; import org.apache.camel.*; import org.w3c.dom.*; | [
"java.io",
"javax.xml",
"org.apache.camel",
"org.w3c.dom"
] | java.io; javax.xml; org.apache.camel; org.w3c.dom; | 2,227,657 |
private boolean fabricateTableInfo(FSTableDescriptors fstd, TableName tableName,
Set<String> columns) throws IOException {
if (columns ==null || columns.isEmpty()) return false;
HTableDescriptor htd = new HTableDescriptor(tableName);
for (String columnfamimly : columns) {
htd.addFamily(new HCo... | boolean function(FSTableDescriptors fstd, TableName tableName, Set<String> columns) throws IOException { if (columns ==null columns.isEmpty()) return false; HTableDescriptor htd = new HTableDescriptor(tableName); for (String columnfamimly : columns) { htd.addFamily(new HColumnDescriptor(columnfamimly)); } fstd.createTa... | /**
* To fabricate a .tableinfo file with following contents<br>
* 1. the correct tablename <br>
* 2. the correct colfamily list<br>
* 3. the default properties for both {@link HTableDescriptor} and {@link HColumnDescriptor}<br>
* @throws IOException
*/ | To fabricate a .tableinfo file with following contents 1. the correct tablename 2. the correct colfamily list 3. the default properties for both <code>HTableDescriptor</code> and <code>HColumnDescriptor</code> | fabricateTableInfo | {
"repo_name": "amyvmiwei/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java",
"license": "apache-2.0",
"size": 172249
} | [
"java.io.IOException",
"java.util.Set",
"org.apache.hadoop.hbase.HColumnDescriptor",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.TableDescriptor",
"org.apache.hadoop.hbase.TableName"
] | import java.io.IOException; import java.util.Set; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableDescriptor; import org.apache.hadoop.hbase.TableName; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 368,381 |
public Builder setEntityType(
@NonNull @EntityType String type,
@FloatRange(from = 0.0, to = 1.0) float confidenceScore) {
mEntityConfidence.put(type, confidenceScore);
return this;
} | Builder function( @NonNull @EntityType String type, @FloatRange(from = 0.0, to = 1.0) float confidenceScore) { mEntityConfidence.put(type, confidenceScore); return this; } | /**
* Sets an entity type for the classified text and assigns a confidence score.
*
* @param confidenceScore a value from 0 (low confidence) to 1 (high confidence).
* 0 implies the entity does not exist for the classified text.
* Values greater than 1 are clamped t... | Sets an entity type for the classified text and assigns a confidence score | setEntityType | {
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "textclassifier/src/main/java/androidx/textclassifier/TextSelection.java",
"license": "apache-2.0",
"size": 9395
} | [
"androidx.annotation.FloatRange",
"androidx.annotation.NonNull",
"androidx.textclassifier.TextClassifier"
] | import androidx.annotation.FloatRange; import androidx.annotation.NonNull; import androidx.textclassifier.TextClassifier; | import androidx.annotation.*; import androidx.textclassifier.*; | [
"androidx.annotation",
"androidx.textclassifier"
] | androidx.annotation; androidx.textclassifier; | 2,720,673 |
private void finalizeDelete(Map<String, HashSet<TableName>> tablesMap, BackupSystemTable table)
throws IOException {
for (String backupRoot : tablesMap.keySet()) {
Set<TableName> incrTableSet = table.getIncrementalBackupTableSet(backupRoot);
Map<TableName, ArrayList<BackupInfo>> tableMap =
... | void function(Map<String, HashSet<TableName>> tablesMap, BackupSystemTable table) throws IOException { for (String backupRoot : tablesMap.keySet()) { Set<TableName> incrTableSet = table.getIncrementalBackupTableSet(backupRoot); Map<TableName, ArrayList<BackupInfo>> tableMap = table.getBackupHistoryForTableSet(incrTable... | /**
* Updates incremental backup set for every backupRoot
* @param tablesMap map [backupRoot: {@code Set<TableName>}]
* @param table backup system table
* @throws IOException if a table operation fails
*/ | Updates incremental backup set for every backupRoot | finalizeDelete | {
"repo_name": "ultratendency/hbase",
"path": "hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java",
"license": "apache-2.0",
"size": 26692
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.backup.BackupInfo"
] | import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.backup.BackupInfo; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.backup.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 568,474 |
public String get(String key, List args)
{
return get(key, args.toArray());
} | String function(String key, List args) { return get(key, args.toArray()); } | /**
* Same as {@link #get(String key, Object[] args)}, but takes a
* <code>java.util.List</code> instead of an array. This is more
* Velocity friendly.
*
* @param key message key
* @param args replacement parameters for this message
*
* @return the localized message for the speci... | Same as <code>#get(String key, Object[] args)</code>, but takes a <code>java.util.List</code> instead of an array. This is more Velocity friendly | get | {
"repo_name": "ggonzales/ksl",
"path": "src/org/apache/velocity/tools/struts/MessageTool.java",
"license": "gpl-3.0",
"size": 6511
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,105,451 |
@NonNull
private final EGLSurface createOffscreenSurface(@IntRange(from=1) final int width, @IntRange(from=1) final int height)
throws IllegalArgumentException {
// if (DEBUG) Log.v(TAG, "createOffscreenSurface:");
final int[] surfaceAttribs = {
EGL10.EGL_WIDTH, width,
EGL10.EGL_HEIGHT, height... | final EGLSurface function(@IntRange(from=1) final int width, @IntRange(from=1) final int height) throws IllegalArgumentException { final int[] surfaceAttribs = { EGL10.EGL_WIDTH, width, EGL10.EGL_HEIGHT, height, EGL10.EGL_NONE }; mEgl.eglWaitGL(); EGLSurface result; try { result = mEgl.eglCreatePbufferSurface(mEglDispl... | /**
* Creates an EGL surface associated with an offscreen buffer.
* @param width
* @param height
*/ | Creates an EGL surface associated with an offscreen buffer | createOffscreenSurface | {
"repo_name": "saki4510t/libcommon",
"path": "common/src/main/java/com/serenegiant/glutils/EGLBase10.java",
"license": "apache-2.0",
"size": 29255
} | [
"android.util.Log",
"androidx.annotation.IntRange",
"javax.microedition.khronos.egl.EGLSurface"
] | import android.util.Log; import androidx.annotation.IntRange; import javax.microedition.khronos.egl.EGLSurface; | import android.util.*; import androidx.annotation.*; import javax.microedition.khronos.egl.*; | [
"android.util",
"androidx.annotation",
"javax.microedition"
] | android.util; androidx.annotation; javax.microedition; | 232,753 |
public AbstractFeature readAbstractFeature(XMLStreamReader reader) throws XMLStreamException
{
String localName = reader.getName().getLocalPart();
if (localName.equals("FeatureCollection"))
return readFeatureCollection(reader);
throw new XMLStreamException(E... | AbstractFeature function(XMLStreamReader reader) throws XMLStreamException { String localName = reader.getName().getLocalPart(); if (localName.equals(STR)) return readFeatureCollection(reader); throw new XMLStreamException(ERROR_INVALID_ELT + reader.getName() + errorLocationString(reader)); } | /**
* Dispatcher method for reading elements derived from AbstractFeature
*/ | Dispatcher method for reading elements derived from AbstractFeature | readAbstractFeature | {
"repo_name": "sensiasoft/lib-swe-common",
"path": "swe-common-om/src/main/java/net/opengis/gml/v32/bind/XMLStreamBindings.java",
"license": "mpl-2.0",
"size": 77403
} | [
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamReader",
"net.opengis.gml.v32.AbstractFeature"
] | import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import net.opengis.gml.v32.AbstractFeature; | import javax.xml.stream.*; import net.opengis.gml.v32.*; | [
"javax.xml",
"net.opengis.gml"
] | javax.xml; net.opengis.gml; | 563,980 |
public int article(String messageId) throws IOException
{
return sendCommand(NNTPCommand.ARTICLE, messageId);
} | int function(String messageId) throws IOException { return sendCommand(NNTPCommand.ARTICLE, messageId); } | /***
* A convenience method to send the NNTP ARTICLE command to the server,
* receive the initial reply, and return the reply code.
* <p>
* @param messageId The message identifier of the requested article,
* including the encapsulating < and > characters.
* @return T... | A convenience method to send the NNTP ARTICLE command to the server, receive the initial reply, and return the reply code. | article | {
"repo_name": "ductt-neo/commons-net-ssh",
"path": "src/main/java/org/apache/commons/net/nntp/NNTP.java",
"license": "apache-2.0",
"size": 43219
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,476,226 |
@Test
@FeatureRequirement(featureClass = GraphFeatures.class, feature = GraphFeatures.FEATURE_ORDERABILITY_SEMANTICS)
public void g_inject_order_with_unknown_type() {
final Object unknown = new Object();
final Object[] unordered = new Object[Constants.unordered.length+1];
unordered[0... | @FeatureRequirement(featureClass = GraphFeatures.class, feature = GraphFeatures.FEATURE_ORDERABILITY_SEMANTICS) void function() { final Object unknown = new Object(); final Object[] unordered = new Object[Constants.unordered.length+1]; unordered[0] = unknown; System.arraycopy(Constants.unordered, 0, unordered, 1, Const... | /**
* More mixed type values including a Java Object (unknown type).
*/ | More mixed type values including a Java Object (unknown type) | g_inject_order_with_unknown_type | {
"repo_name": "apache/incubator-tinkerpop",
"path": "gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/OrderabilityTest.java",
"license": "apache-2.0",
"size": 23585
} | [
"java.util.Arrays",
"org.apache.tinkerpop.gremlin.FeatureRequirement",
"org.apache.tinkerpop.gremlin.process.traversal.Traversal",
"org.apache.tinkerpop.gremlin.structure.Graph"
] | import java.util.Arrays; import org.apache.tinkerpop.gremlin.FeatureRequirement; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.structure.Graph; | import java.util.*; import org.apache.tinkerpop.gremlin.*; import org.apache.tinkerpop.gremlin.process.traversal.*; import org.apache.tinkerpop.gremlin.structure.*; | [
"java.util",
"org.apache.tinkerpop"
] | java.util; org.apache.tinkerpop; | 1,481,956 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(GmlPackage.eINSTANCE.getDirectedTopoSolidPropertyType_TopoSolid(),
GmlFactory.eI... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (GmlPackage.eINSTANCE.getDirectedTopoSolidPropertyType_TopoSolid(), GmlFactory.eINSTANCE.createTopoSolidType())); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/DirectedTopoSolidPropertyTypeItemProvider.java",
"license": "apache-2.0",
"size": 13457
} | [
"java.util.Collection",
"net.opengis.gml.GmlFactory",
"net.opengis.gml.GmlPackage"
] | import java.util.Collection; import net.opengis.gml.GmlFactory; import net.opengis.gml.GmlPackage; | import java.util.*; import net.opengis.gml.*; | [
"java.util",
"net.opengis.gml"
] | java.util; net.opengis.gml; | 1,278,644 |
private AdsAttribute.Type stringToAdsAttributeType(String typeStr) {
if (typeStr == null)
return null;
typeStr = typeStr.trim();
if (typeStr.equals(XmlConstants.XSD_AD_ATTRIBUTE_ATTR_TYPE_ADTEXT_VALUE)) {
return AdsAttribute.Type.ADTEXT;
} else if (typeStr.equals(XmlConstants.XSD_AD_ATTRIBUTE_ATTR_TY... | AdsAttribute.Type function(String typeStr) { if (typeStr == null) return null; typeStr = typeStr.trim(); if (typeStr.equals(XmlConstants.XSD_AD_ATTRIBUTE_ATTR_TYPE_ADTEXT_VALUE)) { return AdsAttribute.Type.ADTEXT; } else if (typeStr.equals(XmlConstants.XSD_AD_ATTRIBUTE_ATTR_TYPE_LOCATOR_VALUE)) { return AdsAttribute.Ty... | /**
* Return the ads attribute type from a string
*
* @param typeStr String that represents the ads attribute type
* @return AdsAttribute.Type. Values included: ADTEXT, LOCATOR, URL, CODEC
*/ | Return the ads attribute type from a string | stringToAdsAttributeType | {
"repo_name": "BlueVia/Official-Library-Android",
"path": "library/src/com/bluevia/android/ad/parser/xml/XmlAdResponseParser.java",
"license": "lgpl-3.0",
"size": 14203
} | [
"com.bluevia.android.ad.data.AdsAttribute",
"com.bluevia.android.commons.parser.xml.XmlConstants"
] | import com.bluevia.android.ad.data.AdsAttribute; import com.bluevia.android.commons.parser.xml.XmlConstants; | import com.bluevia.android.ad.data.*; import com.bluevia.android.commons.parser.xml.*; | [
"com.bluevia.android"
] | com.bluevia.android; | 388,555 |
EAttribute getBWRSteamSupply_RodPattern(); | EAttribute getBWRSteamSupply_RodPattern(); | /**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Generation.GenerationDynamics.BWRSteamSupply#getRodPattern <em>Rod Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Rod Pattern</em>'.
* @see CIM.IEC61970.Generation.Generatio... | Returns the meta object for the attribute '<code>CIM.IEC61970.Generation.GenerationDynamics.BWRSteamSupply#getRodPattern Rod Pattern</code>'. | getBWRSteamSupply_RodPattern | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Generation/GenerationDynamics/GenerationDynamicsPackage.java",
"license": "mit",
"size": 239957
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,752,009 |
@Override
protected Parser createParser(final File source) {
if (source != null) {
final String sourceName = source.getName();
final int lastDot = sourceName.lastIndexOf('.');
if (lastDot >= 0 && lastDot + 1 < sourceName.length()) {
final char afterDot = sourceName.charAt(lastDot + 1);... | Parser function(final File source) { if (source != null) { final String sourceName = source.getName(); final int lastDot = sourceName.lastIndexOf('.'); if (lastDot >= 0 && lastDot + 1 < sourceName.length()) { final char afterDot = sourceName.charAt(lastDot + 1); if (afterDot == 'f' afterDot == 'F') { return new Fortran... | /**
* Create parser to determine dependencies.
*
* Will create appropriate parser (C++, FORTRAN) based on file extension.
*
*/ | Create parser to determine dependencies. Will create appropriate parser (C++, FORTRAN) based on file extension | createParser | {
"repo_name": "manu4linux/nar-maven-plugin",
"path": "src/main/java/com/github/maven_nar/cpptasks/gcc/cross/sparc_sun_solaris2/GccCCompiler.java",
"license": "apache-2.0",
"size": 8905
} | [
"com.github.maven_nar.cpptasks.parser.CParser",
"com.github.maven_nar.cpptasks.parser.FortranParser",
"com.github.maven_nar.cpptasks.parser.Parser",
"java.io.File"
] | import com.github.maven_nar.cpptasks.parser.CParser; import com.github.maven_nar.cpptasks.parser.FortranParser; import com.github.maven_nar.cpptasks.parser.Parser; import java.io.File; | import com.github.maven_nar.cpptasks.parser.*; import java.io.*; | [
"com.github.maven_nar",
"java.io"
] | com.github.maven_nar; java.io; | 1,598,928 |
public UserPersistence getUserPersistence() {
return userPersistence;
} | UserPersistence function() { return userPersistence; } | /**
* Returns the user persistence.
*
* @return the user persistence
*/ | Returns the user persistence | getUserPersistence | {
"repo_name": "hltn/opencps",
"path": "portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/datamgt/service/base/DictCollectionServiceBaseImpl.java",
"license": "agpl-3.0",
"size": 13176
} | [
"com.liferay.portal.service.persistence.UserPersistence"
] | import com.liferay.portal.service.persistence.UserPersistence; | import com.liferay.portal.service.persistence.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 940,402 |
@LogMessage(level = INFO)
@Message(id = 24, value = "Stopping server %s")
void stoppingServer(String serverName);
//
// @LogMessage(level = Level.WARN)
// @Message(id = 25, value = "Server %s is not in the expected %s state: %s")
// void unexpectedServerState(String serverName, ServerState exp... | @LogMessage(level = INFO) @Message(id = 24, value = STR) void stoppingServer(String serverName); | /**
* Logs an informational message indicating the server is stopping.
*
* @param serverName the name of the server.
*/ | Logs an informational message indicating the server is stopping | stoppingServer | {
"repo_name": "luck3y/wildfly-core",
"path": "host-controller/src/main/java/org/jboss/as/host/controller/logging/HostControllerLogger.java",
"license": "lgpl-2.1",
"size": 65652
} | [
"org.jboss.logging.annotations.LogMessage",
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 1,956,959 |
Git git = new Git(repository);
EclipseGitProgressTransformer pm = new EclipseGitProgressTransformer(
monitor);
try {
git.gc().setProgressMonitor(pm).call();
} catch (GitAPIException e) {
throw new CoreException(new Status(IStatus.ERROR,
Activator.getPluginId(), e.getMessage(), e));
}
} | Git git = new Git(repository); EclipseGitProgressTransformer pm = new EclipseGitProgressTransformer( monitor); try { git.gc().setProgressMonitor(pm).call(); } catch (GitAPIException e) { throw new CoreException(new Status(IStatus.ERROR, Activator.getPluginId(), e.getMessage(), e)); } } | /**
* Execute garbage collection
*/ | Execute garbage collection | execute | {
"repo_name": "blizzy78/egit",
"path": "org.eclipse.egit.core/src/org/eclipse/egit/core/op/GarbageCollectOperation.java",
"license": "epl-1.0",
"size": 1866
} | [
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IStatus",
"org.eclipse.core.runtime.Status",
"org.eclipse.egit.core.Activator",
"org.eclipse.egit.core.EclipseGitProgressTransformer",
"org.eclipse.jgit.api.Git",
"org.eclipse.jgit.api.errors.GitAPIException"
] | import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.egit.core.Activator; import org.eclipse.egit.core.EclipseGitProgressTransformer; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.errors.GitAPIException; | import org.eclipse.core.runtime.*; import org.eclipse.egit.core.*; import org.eclipse.jgit.api.*; import org.eclipse.jgit.api.errors.*; | [
"org.eclipse.core",
"org.eclipse.egit",
"org.eclipse.jgit"
] | org.eclipse.core; org.eclipse.egit; org.eclipse.jgit; | 572,599 |
private void xtraDownloadRequest() {
if (DEBUG) Log.d(TAG, "xtraDownloadRequest");
sendMessage(DOWNLOAD_XTRA_DATA, 0, null);
} | void function() { if (DEBUG) Log.d(TAG, STR); sendMessage(DOWNLOAD_XTRA_DATA, 0, null); } | /**
* called from native code to request XTRA data
*/ | called from native code to request XTRA data | xtraDownloadRequest | {
"repo_name": "xorware/android_frameworks_base",
"path": "services/core/java/com/android/server/location/GnssLocationProvider.java",
"license": "apache-2.0",
"size": 97788
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 479,423 |
@Inject
public void setSettingsService(SettingsService settingsService) {
this.settingsService = settingsService;
} | void function(SettingsService settingsService) { this.settingsService = settingsService; } | /**
* Sets the {@code SettingsManager} used to configure the beans.
*
* @param settingsService the settings service
*/ | Sets the SettingsManager used to configure the beans | setSettingsService | {
"repo_name": "CarstenHollmann/iceland",
"path": "core/src/main/java/org/n52/iceland/config/spring/ConfiguringBeanPostProcessor.java",
"license": "apache-2.0",
"size": 2832
} | [
"org.n52.faroe.SettingsService"
] | import org.n52.faroe.SettingsService; | import org.n52.faroe.*; | [
"org.n52.faroe"
] | org.n52.faroe; | 444,077 |
@Test
public void testMissedTaskThresholdBelowMinimum() throws Exception {
server.setMarkToEndOfLog();
runInServlet("testMissedTaskThresholdBelowMinimum");
List<String> errorMessages = server.findStringsInLogsUsingMark("CWWKE0701E.*99s", server.getConsoleLogFile());
if (errorMe... | void function() throws Exception { server.setMarkToEndOfLog(); runInServlet(STR); List<String> errorMessages = server.findStringsInLogsUsingMark(STR, server.getConsoleLogFile()); if (errorMessages.isEmpty()) throw new Exception(STR); String errorMessage = errorMessages.get(0); if (!errorMessage.contains(STR) !errorMess... | /**
* testMissedTaskThresholdBelowMinimum - attempt to use a persistent executor where the missedTaskThreshold value is less than
* the minimum allowed. Expect IllegalArgumentException with a translatable message.
*/ | testMissedTaskThresholdBelowMinimum - attempt to use a persistent executor where the missedTaskThreshold value is less than the minimum allowed. Expect IllegalArgumentException with a translatable message | testMissedTaskThresholdBelowMinimum | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.concurrent.persistent_fat_errorpaths/fat/src/com/ibm/ws/concurrent/persistent/fat/errorpaths/PersistentExecutorErrorPathsTestWithFailoverAndPollingEnabled.java",
"license": "epl-1.0",
"size": 22650
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,084,673 |
public static void reExportSelected(boolean wiredPorts, boolean unwiredPorts)
{
// make sure there is a current cell
Cell cell = WindowFrame.needCurCell();
if (cell == null) return;
List<Geometric> nodeInsts = MenuCommands.getSelectedObjects(true, false);
if (nodeInsts.size() == 0) {
JOptionPane.showM... | static void function(boolean wiredPorts, boolean unwiredPorts) { Cell cell = WindowFrame.needCurCell(); if (cell == null) return; List<Geometric> nodeInsts = MenuCommands.getSelectedObjects(true, false); if (nodeInsts.size() == 0) { JOptionPane.showMessageDialog(Main.getCurrentJFrame(), STR, STR, JOptionPane.ERROR_MESS... | /**
* Method to re-export everything that is selected.
* @param wiredPorts true to re-export ports that are wired.
* @param unwiredPorts true to re-export ports that are unwired.
*/ | Method to re-export everything that is selected | reExportSelected | {
"repo_name": "imr/Electric8",
"path": "com/sun/electric/tool/user/ExportChanges.java",
"license": "gpl-3.0",
"size": 60558
} | [
"com.sun.electric.Main",
"com.sun.electric.database.hierarchy.Cell",
"com.sun.electric.database.topology.Geometric",
"com.sun.electric.tool.user.menus.MenuCommands",
"com.sun.electric.tool.user.ui.WindowFrame",
"java.util.List",
"javax.swing.JOptionPane"
] | import com.sun.electric.Main; import com.sun.electric.database.hierarchy.Cell; import com.sun.electric.database.topology.Geometric; import com.sun.electric.tool.user.menus.MenuCommands; import com.sun.electric.tool.user.ui.WindowFrame; import java.util.List; import javax.swing.JOptionPane; | import com.sun.electric.*; import com.sun.electric.database.hierarchy.*; import com.sun.electric.database.topology.*; import com.sun.electric.tool.user.menus.*; import com.sun.electric.tool.user.ui.*; import java.util.*; import javax.swing.*; | [
"com.sun.electric",
"java.util",
"javax.swing"
] | com.sun.electric; java.util; javax.swing; | 2,388,363 |
public static ShapeStyle retrieveShapeStyle(Element element) {
ShapeStyle style = new ShapeStyle();
// Check the "fill" child-element:
String filled = element.getAttribute("filled");
if ("true".equals(filled)) {
Element fill = element.getElementsByTagName("fill").getItem(0);
style.setFillColor(fill.ge... | static ShapeStyle function(Element element) { ShapeStyle style = new ShapeStyle(); String filled = element.getAttribute(STR); if ("true".equals(filled)) { Element fill = element.getElementsByTagName("fill").getItem(0); style.setFillColor(fill.getAttribute("color")); style.setFillOpacity(Float.parseFloat(fill.getAttribu... | /**
* Retrieve a ShapeStyle object from a DOM element. Note that this function will always return a shapestyle object,
* even if nothing is in it.
*
* @param element
* The element to retrieve the style from.
* @return The ShapeStyle object retrieved from the element.
*/ | Retrieve a ShapeStyle object from a DOM element. Note that this function will always return a shapestyle object, even if nothing is in it | retrieveShapeStyle | {
"repo_name": "geomajas/geomajas-project-client-gwt",
"path": "client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlStyleUtil.java",
"license": "agpl-3.0",
"size": 5335
} | [
"com.google.gwt.dom.client.Element",
"org.geomajas.gwt.client.gfx.style.ShapeStyle"
] | import com.google.gwt.dom.client.Element; import org.geomajas.gwt.client.gfx.style.ShapeStyle; | import com.google.gwt.dom.client.*; import org.geomajas.gwt.client.gfx.style.*; | [
"com.google.gwt",
"org.geomajas.gwt"
] | com.google.gwt; org.geomajas.gwt; | 1,502,679 |
public void addFormActionListener(ActionListener actionListener) {
jBSearch.addActionListener(actionListener);
} | void function(ActionListener actionListener) { jBSearch.addActionListener(actionListener); } | /**
* Add the listener received as parameter to the buttons of the panel
* @param actionListener: the listener of the action
*/ | Add the listener received as parameter to the buttons of the panel | addFormActionListener | {
"repo_name": "accesstest3/cfunambol",
"path": "modules/email/email-core/src/main/java/com/funambol/email/admin/FormSearchAccountPanel.java",
"license": "agpl-3.0",
"size": 13345
} | [
"java.awt.event.ActionListener"
] | import java.awt.event.ActionListener; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,488,956 |
protected static Map<String, String> getPrincipalPasswordMap(Map<String, Object> requestSharedDataContext) {
if (requestSharedDataContext == null) {
return null;
} else {
Object map = requestSharedDataContext.get(PRINCIPAL_PASSWORD_MAP);
if (map == null) {
map = new HashMap<String, ... | static Map<String, String> function(Map<String, Object> requestSharedDataContext) { if (requestSharedDataContext == null) { return null; } else { Object map = requestSharedDataContext.get(PRINCIPAL_PASSWORD_MAP); if (map == null) { map = new HashMap<String, String>(); requestSharedDataContext.put(PRINCIPAL_PASSWORD_MAP... | /**
* Gets the shared principal-to-password Map used to store principals and generated password for
* use within the current request context.
* <p/>
* If the requested Map is not found in requestSharedDataContext, one will be created and stored,
* ensuring that a Map will always be returned, assuming req... | Gets the shared principal-to-password Map used to store principals and generated password for use within the current request context. If the requested Map is not found in requestSharedDataContext, one will be created and stored, ensuring that a Map will always be returned, assuming requestSharedDataContext is not null | getPrincipalPasswordMap | {
"repo_name": "arenadata/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java",
"license": "apache-2.0",
"size": 23867
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,499,610 |
@Test
public void testModArpShaMethod() {
final Instruction instruction = Instructions.modArpSha(mac1);
final L3ModificationInstruction.ModArpEthInstruction modArpEthInstruction =
checkAndConvert(instruction,
Instruction.Type.L3MODIFICATION,
... | void function() { final Instruction instruction = Instructions.modArpSha(mac1); final L3ModificationInstruction.ModArpEthInstruction modArpEthInstruction = checkAndConvert(instruction, Instruction.Type.L3MODIFICATION, L3ModificationInstruction.ModArpEthInstruction.class); assertThat(modArpEthInstruction.subtype(), is(L... | /**
* Test the modArpSha() method.
*/ | Test the modArpSha() method | testModArpShaMethod | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java",
"license": "apache-2.0",
"size": 53514
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 2,252,412 |
public final void mouseClicked(final MouseEvent _event) {
//if to button or the top button do click event once.
if (_event.getSource().equals(view.getJbtn_toBottom())
|| _event.getSource().equals(view.getJbtn_toTop())) {
clickEvent(_event);
}
} | final void function(final MouseEvent _event) { if (_event.getSource().equals(view.getJbtn_toBottom()) _event.getSource().equals(view.getJbtn_toTop())) { clickEvent(_event); } } | /**
* if clicked at at or down button.
*
* @param _event the mouseEvent
*/ | if clicked at at or down button | mouseClicked | {
"repo_name": "juliusHuelsmann/paint",
"path": "PaintNotes/src/main/java/control/util/CScrollPane.java",
"license": "apache-2.0",
"size": 26323
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,573,151 |
@RequestMapping(
value = "/bookmarkWithScore",
method = RequestMethod.POST,
headers = { "Content-type=application/json" })
@ResponseStatus(HttpStatus.OK)
@Transactional
public void saveBookmarkWithScore(@RequestBody SaveBookmarkRequest bookmarkRequest) {
log(... | @RequestMapping( value = STR, method = RequestMethod.POST, headers = { STR }) @ResponseStatus(HttpStatus.OK) void function(@RequestBody SaveBookmarkRequest bookmarkRequest) { log(STR, LogHelper.nullOrString(bookmarkRequest)); if (bookmarkRequest == null) { throw new IllegalArgumentException(String.format(INVALID, STR))... | /**
* Save a bookmark for a user
* @param bookmarkRequest info about the user for bookmark save
* @return OK or exception
*/ | Save a bookmark for a user | saveBookmarkWithScore | {
"repo_name": "ngraczewski/mim",
"path": "api/src/main/java/org/motechproject/nms/api/web/MobileAcademyController.java",
"license": "bsd-3-clause",
"size": 9658
} | [
"org.motechproject.nms.api.web.contract.LogHelper",
"org.motechproject.nms.api.web.contract.mobileAcademy.SaveBookmarkRequest",
"org.motechproject.nms.api.web.converter.MobileAcademyConverter",
"org.motechproject.nms.mobileacademy.dto.MaBookmark",
"org.springframework.http.HttpStatus",
"org.springframewor... | import org.motechproject.nms.api.web.contract.LogHelper; import org.motechproject.nms.api.web.contract.mobileAcademy.SaveBookmarkRequest; import org.motechproject.nms.api.web.converter.MobileAcademyConverter; import org.motechproject.nms.mobileacademy.dto.MaBookmark; import org.springframework.http.HttpStatus; import o... | import org.motechproject.nms.api.web.contract.*; import org.motechproject.nms.api.web.converter.*; import org.motechproject.nms.mobileacademy.dto.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"org.motechproject.nms",
"org.springframework.http",
"org.springframework.web"
] | org.motechproject.nms; org.springframework.http; org.springframework.web; | 2,596,985 |
public void setConnectTimeout(final FileSystemOptions opts, final Integer connectTimeout) {
setParam(opts, CONNECT_TIMEOUT, connectTimeout);
} | void function(final FileSystemOptions opts, final Integer connectTimeout) { setParam(opts, CONNECT_TIMEOUT, connectTimeout); } | /**
* Sets the timeout for the initial control connection.
* <p>
* If you set the connectTimeout to {@code null} no connectTimeout will be set.
*
* @param opts The FileSystemOptions.
* @param connectTimeout the timeout value in milliseconds
* @since 2.1
*/ | Sets the timeout for the initial control connection. If you set the connectTimeout to null no connectTimeout will be set | setConnectTimeout | {
"repo_name": "svn2github/commons-vfs2",
"path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java",
"license": "apache-2.0",
"size": 15018
} | [
"org.apache.commons.vfs2.FileSystemOptions"
] | import org.apache.commons.vfs2.FileSystemOptions; | import org.apache.commons.vfs2.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,128,179 |
public void addIncomeConnectionListener(IgniteInClosure<Socket> lsnr) {
incomeConnLsnrs.add(lsnr);
} | void function(IgniteInClosure<Socket> lsnr) { incomeConnLsnrs.add(lsnr); } | /**
* <strong>FOR TEST ONLY!!!</strong>
*/ | FOR TEST ONLY!! | addIncomeConnectionListener | {
"repo_name": "a1vanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java",
"license": "apache-2.0",
"size": 76111
} | [
"java.net.Socket",
"org.apache.ignite.lang.IgniteInClosure"
] | import java.net.Socket; import org.apache.ignite.lang.IgniteInClosure; | import java.net.*; import org.apache.ignite.lang.*; | [
"java.net",
"org.apache.ignite"
] | java.net; org.apache.ignite; | 1,527,278 |
public Duration totalUsage() {
return this.innerProperties() == null ? null : this.innerProperties().totalUsage();
} | Duration function() { return this.innerProperties() == null ? null : this.innerProperties().totalUsage(); } | /**
* Get the totalUsage property: How long the user has used their virtual machines in this lab.
*
* @return the totalUsage value.
*/ | Get the totalUsage property: How long the user has used their virtual machines in this lab | totalUsage | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/models/UserInner.java",
"license": "mit",
"size": 5739
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 2,612,110 |
protected int parserNextChars(final boolean iUpperCase, final boolean iMandatory, final String... iCandidateWords) {
parserPreviousPos = parserCurrentPos;
parserSkipWhiteSpaces();
parserEscapeSequnceCount = 0;
parserLastWord.setLength(0);
final String[] processedWords = Arrays.copyOf(iCandidateW... | int function(final boolean iUpperCase, final boolean iMandatory, final String... iCandidateWords) { parserPreviousPos = parserCurrentPos; parserSkipWhiteSpaces(); parserEscapeSequnceCount = 0; parserLastWord.setLength(0); final String[] processedWords = Arrays.copyOf(iCandidateWords, iCandidateWords.length); final Stri... | /**
* Parses the next sequence of chars.
*
* @return The position of the word matched if any, otherwise -1 or an exception if iMandatory is true
*/ | Parses the next sequence of chars | parserNextChars | {
"repo_name": "jdillon/orientdb",
"path": "core/src/main/java/com/orientechnologies/common/parser/OBaseParser.java",
"license": "apache-2.0",
"size": 19632
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 228,491 |
protected boolean shouldExecuteReplication(Settings settings) {
return IndexMetaData.isIndexUsingShadowReplicas(settings) == false;
}
class PrimaryShardReference implements ReplicationOperation.Primary<Request, ReplicaRequest, Response>, Releasable {
private final IndexShard indexShard;
... | boolean function(Settings settings) { return IndexMetaData.isIndexUsingShadowReplicas(settings) == false; } class PrimaryShardReference implements ReplicationOperation.Primary<Request, ReplicaRequest, Response>, Releasable { private final IndexShard indexShard; private final Releasable operationLock; PrimaryShardRefere... | /**
* Indicated whether this operation should be replicated to shadow replicas or not. If this method returns true the replication phase
* will be skipped. For example writes such as index and delete don't need to be replicated on shadow replicas but refresh and flush do.
*/ | Indicated whether this operation should be replicated to shadow replicas or not. If this method returns true the replication phase will be skipped. For example writes such as index and delete don't need to be replicated on shadow replicas but refresh and flush do | shouldExecuteReplication | {
"repo_name": "myelin/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/support/replication/TransportReplicationAction.java",
"license": "apache-2.0",
"size": 38793
} | [
"org.elasticsearch.cluster.metadata.IndexMetaData",
"org.elasticsearch.common.lease.Releasable",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.index.shard.IndexShard"
] | import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.lease.Releasable; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.shard.IndexShard; | import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.lease.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.index.shard.*; | [
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; | 1,087,890 |
public void enqueueRegistryRecord(final ByteBuffer buffer) {
try {
this.queue.put(buffer);
} catch (final InterruptedException e) {
LOGGER.error("Record queue was interrupted", e);
}
} | void function(final ByteBuffer buffer) { try { this.queue.put(buffer); } catch (final InterruptedException e) { LOGGER.error(STR, e); } } | /**
* Enqueues an unparsed registry record for processing.
*
* @param buffer
* The unparsed data in an appropriately positioned byte buffer
*/ | Enqueues an unparsed registry record for processing | enqueueRegistryRecord | {
"repo_name": "kieker-monitoring/kieker",
"path": "kieker-analysis/src/kieker/analysis/source/amqp/RegistryRecordHandler.java",
"license": "apache-2.0",
"size": 2842
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,671,131 |
public Pointer GetEventDispatcherTarget(); | Pointer function(); | /**
* Obtains the event target reference for the standard toolbox dispatcher
*/ | Obtains the event target reference for the standard toolbox dispatcher | GetEventDispatcherTarget | {
"repo_name": "cpc26/jna",
"path": "contrib/platform/src/com/sun/jna/platform/mac/Carbon.java",
"license": "lgpl-2.1",
"size": 2887
} | [
"com.sun.jna.Pointer"
] | import com.sun.jna.Pointer; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 2,098,423 |
if (restService == null) {
return;
}
if (restServiceDescriptions.containsKey(fqn)) {
log.error("Duplicate REST service documentation for {}, merging values.", fqn);
final RestService savedRestService = restServiceDescriptions.get(fqn);
savedRestService.getOperations().putAll(restService.... | if (restService == null) { return; } if (restServiceDescriptions.containsKey(fqn)) { log.error(STR, fqn); final RestService savedRestService = restServiceDescriptions.get(fqn); savedRestService.getOperations().putAll(restService.getOperations()); if (savedRestService.getTags() != null && restService.getTags() != null &... | /**
* Supplies doc for given FQN.
*
* @param fqn full qualified name of the service interface.
* @param restService rest service documentation.
*/ | Supplies doc for given FQN | addService | {
"repo_name": "holisticon/camunda-bpm-swagger",
"path": "maven-plugin/generator/src/main/java/org/camunda/bpm/swagger/maven/model/ModelRepository.java",
"license": "apache-2.0",
"size": 3211
} | [
"org.camunda.bpm.swagger.docs.model.RestService"
] | import org.camunda.bpm.swagger.docs.model.RestService; | import org.camunda.bpm.swagger.docs.model.*; | [
"org.camunda.bpm"
] | org.camunda.bpm; | 358,252 |
@Test
public void testIsInternalNamespace_WithNull_ReturnsTrue() throws Exception {
FileBundleSourceLoader loader = new FileBundleSourceLoader(getWorkingDirectory(), null, null);
Assert.assertTrue("All namespaces loaded by FileBundleSourceLoader are to be intenal",
loader.isInter... | void function() throws Exception { FileBundleSourceLoader loader = new FileBundleSourceLoader(getWorkingDirectory(), null, null); Assert.assertTrue(STR, loader.isInternalNamespace(null)); } | /**
* All namespaces loaded by FileBundleSourceLoader are internal, verify that FileBundleSourceLoader says so.
*/ | All namespaces loaded by FileBundleSourceLoader are internal, verify that FileBundleSourceLoader says so | testIsInternalNamespace_WithNull_ReturnsTrue | {
"repo_name": "madmax983/aura",
"path": "aura-impl/src/test/java/org/auraframework/impl/source/file/FileBundleSourceLoaderTest.java",
"license": "apache-2.0",
"size": 17402
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,347,907 |
private UserDataReader buildUserDataReader(EsInfo esInfo) {
return new UserDataReader(getClosedCaptionFormats(esInfo));
} | UserDataReader function(EsInfo esInfo) { return new UserDataReader(getClosedCaptionFormats(esInfo)); } | /**
* If {@link #FLAG_OVERRIDE_CAPTION_DESCRIPTORS} is set, returns a {@link UserDataReader} for
* {@link #closedCaptionFormats}. If unset, parses the PMT descriptor information and returns a
* {@link UserDataReader} for the declared formats, or {@link #closedCaptionFormats} if the
* descriptor is not prese... | If <code>#FLAG_OVERRIDE_CAPTION_DESCRIPTORS</code> is set, returns a <code>UserDataReader</code> for <code>#closedCaptionFormats</code>. If unset, parses the PMT descriptor information and returns a <code>UserDataReader</code> for the declared formats, or <code>#closedCaptionFormats</code> if the descriptor is not pres... | buildUserDataReader | {
"repo_name": "superbderrick/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/DefaultTsPayloadReaderFactory.java",
"license": "apache-2.0",
"size": 12093
} | [
"com.google.android.exoplayer2.extractor.ts.TsPayloadReader"
] | import com.google.android.exoplayer2.extractor.ts.TsPayloadReader; | import com.google.android.exoplayer2.extractor.ts.*; | [
"com.google.android"
] | com.google.android; | 185,206 |
public ActivityBuilder setScaleType(@NonNull CropImageView.ScaleType scaleType) {
mOptions.scaleType = scaleType;
return this;
} | ActivityBuilder function(@NonNull CropImageView.ScaleType scaleType) { mOptions.scaleType = scaleType; return this; } | /**
* The initial scale type of the image in the crop image view<br>
* <i>Default: FIT_CENTER</i>
*/ | The initial scale type of the image in the crop image view Default: FIT_CENTER | setScaleType | {
"repo_name": "anuj7sharma/ImagePicker",
"path": "app/src/main/java/com/imagepicker/cropper/CropImage.java",
"license": "apache-2.0",
"size": 38087
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 401,570 |
public Double getDoubleEnvVar(String arg1) throws RemoteException, NamingException; | Double function(String arg1) throws RemoteException, NamingException; | /**
* get Double environment variable using java:comp/env
*/ | get Double environment variable using java:comp/env | getDoubleEnvVar | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XSFRemoteSpecEJB.jar/src/com/ibm/ejb2x/base/spec/sfr/ejb/SFRa.java",
"license": "epl-1.0",
"size": 10102
} | [
"java.rmi.RemoteException",
"javax.naming.NamingException"
] | import java.rmi.RemoteException; import javax.naming.NamingException; | import java.rmi.*; import javax.naming.*; | [
"java.rmi",
"javax.naming"
] | java.rmi; javax.naming; | 2,204,154 |
boolean isUpgradeRequired(String name)
{
ResourceBundle bundle = ResourceBundle.getBundle("omero");
String version = bundle.getString("omero.version");
String url = bundle.getString("omero.upgrades.url");
//Strip the "OMERO" part of the string
if (CommonsLangUtils.isBlank(name)) {
... | boolean isUpgradeRequired(String name) { ResourceBundle bundle = ResourceBundle.getBundle("omero"); String version = bundle.getString(STR); String url = bundle.getString(STR); if (CommonsLangUtils.isBlank(name)) { name = STR; } if (name.startsWith(STR)) { name = name.substring(STR.length()); } UpgradeCheck check = new ... | /**
* Returns <code>true</code> if an upgrade is required, <code>false</code>
* otherwise.
*
* @param name The name of the agent.
* @return See above.
*/ | Returns <code>true</code> if an upgrade is required, <code>false</code> otherwise | isUpgradeRequired | {
"repo_name": "dominikl/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java",
"license": "gpl-2.0",
"size": 262766
} | [
"java.util.ResourceBundle",
"org.openmicroscopy.shoola.util.CommonsLangUtils"
] | import java.util.ResourceBundle; import org.openmicroscopy.shoola.util.CommonsLangUtils; | import java.util.*; import org.openmicroscopy.shoola.util.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 165,031 |
static <T> T runWithRetries(Callable<T> callable) {
// Use same backoff setting as abort, somewhat arbitrarily.
ExponentialBackOff backOff = newBackOff();
Context context = Context.current();
while (true) {
try {
return callable.call();
} catch (SpannerException e) {
if (!e... | static <T> T runWithRetries(Callable<T> callable) { ExponentialBackOff backOff = newBackOff(); Context context = Context.current(); while (true) { try { return callable.call(); } catch (SpannerException e) { if (!e.isRetryable()) { throw e; } logger.log(Level.FINE, STR, e); backoffSleep(context, backOff); } catch (Exce... | /**
* Helper to execute some work, retrying with backoff on retryable errors.
*
* <p>TODO: Consider replacing with RetryHelper from gcloud-core.
*/ | Helper to execute some work, retrying with backoff on retryable errors | runWithRetries | {
"repo_name": "rborer/google-cloud-java",
"path": "google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java",
"license": "apache-2.0",
"size": 91146
} | [
"com.google.api.client.util.ExponentialBackOff",
"com.google.common.base.Throwables",
"io.grpc.Context",
"java.util.concurrent.Callable",
"java.util.logging.Level"
] | import com.google.api.client.util.ExponentialBackOff; import com.google.common.base.Throwables; import io.grpc.Context; import java.util.concurrent.Callable; import java.util.logging.Level; | import com.google.api.client.util.*; import com.google.common.base.*; import io.grpc.*; import java.util.concurrent.*; import java.util.logging.*; | [
"com.google.api",
"com.google.common",
"io.grpc",
"java.util"
] | com.google.api; com.google.common; io.grpc; java.util; | 624,478 |
private static List<ShortcutInfoCompat> sortAndFilterShortcuts(
List<ShortcutInfoCompat> shortcuts, @Nullable String shortcutIdToRemoveFirst) {
// Remove up to one specific shortcut before sorting and doing somewhat fancy filtering.
if (shortcutIdToRemoveFirst != null) {
Iter... | static List<ShortcutInfoCompat> function( List<ShortcutInfoCompat> shortcuts, @Nullable String shortcutIdToRemoveFirst) { if (shortcutIdToRemoveFirst != null) { Iterator<ShortcutInfoCompat> shortcutIterator = shortcuts.iterator(); while (shortcutIterator.hasNext()) { if (shortcutIterator.next().getId().equals(shortcutI... | /**
* Filters the shortcuts so that only MAX_ITEMS or fewer shortcuts are retained.
* We want the filter to include both static and dynamic shortcuts, so we always
* include NUM_DYNAMIC dynamic shortcuts, if at least that many are present.
*
* @param shortcutIdToRemoveFirst An id that should be... | Filters the shortcuts so that only MAX_ITEMS or fewer shortcuts are retained. We want the filter to include both static and dynamic shortcuts, so we always include NUM_DYNAMIC dynamic shortcuts, if at least that many are present | sortAndFilterShortcuts | {
"repo_name": "enricocid/LaunchEnr",
"path": "Launcher3-O-r12/src/main/java/com/enrico/launcher3/popup/PopupPopulator.java",
"license": "gpl-3.0",
"size": 14254
} | [
"android.support.annotation.Nullable",
"com.enrico.launcher3.shortcuts.ShortcutInfoCompat",
"java.util.ArrayList",
"java.util.Collections",
"java.util.Iterator",
"java.util.List"
] | import android.support.annotation.Nullable; import com.enrico.launcher3.shortcuts.ShortcutInfoCompat; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; | import android.support.annotation.*; import com.enrico.launcher3.shortcuts.*; import java.util.*; | [
"android.support",
"com.enrico.launcher3",
"java.util"
] | android.support; com.enrico.launcher3; java.util; | 1,599,666 |
if (args.length >= 2) {
Log4jEasyConfigurator.configLog4j();
try {
Converter.convertOldImportFile(args[0], args[1], args[2]);
} catch (IOException ex) {
ex.printStackTrace();
} catch (InvalidFormatFileException ex) {
ex.prin... | if (args.length >= 2) { Log4jEasyConfigurator.configLog4j(); try { Converter.convertOldImportFile(args[0], args[1], args[2]); } catch (IOException ex) { ex.printStackTrace(); } catch (InvalidFormatFileException ex) { ex.printStackTrace(); } } else { System.err.println(STR); } } | /**
* DOCUMENT ME!
*
* @param args DOCUMENT ME!
*/ | DOCUMENT ME | main | {
"repo_name": "cismet/jpresso",
"path": "jpresso-core/src/main/java/de/cismet/jpresso/core/starter/StartConvert.java",
"license": "lgpl-3.0",
"size": 1313
} | [
"de.cismet.jpresso.core.exceptions.InvalidFormatFileException",
"de.cismet.jpresso.core.io.Converter",
"de.cismet.jpresso.core.log4j.config.Log4jEasyConfigurator",
"java.io.IOException"
] | import de.cismet.jpresso.core.exceptions.InvalidFormatFileException; import de.cismet.jpresso.core.io.Converter; import de.cismet.jpresso.core.log4j.config.Log4jEasyConfigurator; import java.io.IOException; | import de.cismet.jpresso.core.exceptions.*; import de.cismet.jpresso.core.io.*; import de.cismet.jpresso.core.log4j.config.*; import java.io.*; | [
"de.cismet.jpresso",
"java.io"
] | de.cismet.jpresso; java.io; | 1,037,350 |
protected TrustManager[] getTrustManagers(String keystoreType, String algorithm)
throws Exception {
TrustManager[] tms = null;
String truststoreType = (String)attributes.get("truststoreType");
if(truststoreType == null) {
truststoreType = keystoreType;
}... | TrustManager[] function(String keystoreType, String algorithm) throws Exception { TrustManager[] tms = null; String truststoreType = (String)attributes.get(STR); if(truststoreType == null) { truststoreType = keystoreType; } KeyStore trustStore = getTrustStore(truststoreType); if (trustStore != null) { TrustManagerFacto... | /**
* Gets the intialized trust managers.
*/ | Gets the intialized trust managers | getTrustManagers | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE14SocketFactory.java",
"license": "apache-2.0",
"size": 10666
} | [
"java.security.KeyStore",
"javax.net.ssl.TrustManager",
"javax.net.ssl.TrustManagerFactory"
] | import java.security.KeyStore; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; | import java.security.*; import javax.net.ssl.*; | [
"java.security",
"javax.net"
] | java.security; javax.net; | 1,977,222 |
@Test
public void testValidSaslPlainOverSsl() throws Exception {
String node = "0";
SecurityProtocol securityProtocol = SecurityProtocol.SASL_SSL;
configureMechanisms("PLAIN", Arrays.asList("PLAIN"));
server = createEchoServer(securityProtocol);
createAndCheckClientConne... | void function() throws Exception { String node = "0"; SecurityProtocol securityProtocol = SecurityProtocol.SASL_SSL; configureMechanisms("PLAIN", Arrays.asList("PLAIN")); server = createEchoServer(securityProtocol); createAndCheckClientConnection(securityProtocol, node); } | /**
* Tests good path SASL/PLAIN client and server channels using SSL transport layer.
*/ | Tests good path SASL/PLAIN client and server channels using SSL transport layer | testValidSaslPlainOverSsl | {
"repo_name": "wangcy6/storm_app",
"path": "frame/kafka-0.11.0/kafka-0.11.0.1-src/clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorTest.java",
"license": "apache-2.0",
"size": 42351
} | [
"java.util.Arrays",
"org.apache.kafka.common.protocol.SecurityProtocol"
] | import java.util.Arrays; import org.apache.kafka.common.protocol.SecurityProtocol; | import java.util.*; import org.apache.kafka.common.protocol.*; | [
"java.util",
"org.apache.kafka"
] | java.util; org.apache.kafka; | 1,632,667 |
protected static void startMiniDfsCluster(
final String testClass, final boolean isImpersonationEnabled) throws Exception {
Preconditions.checkArgument(!Strings.isNullOrEmpty(testClass), "Expected a non-null and non-empty test class name");
dfsConf = new Configuration();
// Set the MiniDfs base dir... | static void function( final String testClass, final boolean isImpersonationEnabled) throws Exception { Preconditions.checkArgument(!Strings.isNullOrEmpty(testClass), STR); dfsConf = new Configuration(); miniDfsStoragePath = dirTestWatcher.makeRootSubDir(Paths.get(STR)); dfsConf.set(STR, miniDfsStoragePath.getCanonicalP... | /**
* Start a MiniDFS cluster backed Drillbit cluster
* @param testClass
* @param isImpersonationEnabled Enable impersonation in the cluster?
* @throws Exception
*/ | Start a MiniDFS cluster backed Drillbit cluster | startMiniDfsCluster | {
"repo_name": "ppadma/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/BaseTestImpersonation.java",
"license": "apache-2.0",
"size": 8756
} | [
"com.google.common.base.Preconditions",
"com.google.common.base.Strings",
"java.nio.file.Paths",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.MiniDFSCluster"
] | import com.google.common.base.Preconditions; import com.google.common.base.Strings; import java.nio.file.Paths; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.MiniDFSCluster; | import com.google.common.base.*; import java.nio.file.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; | [
"com.google.common",
"java.nio",
"org.apache.hadoop"
] | com.google.common; java.nio; org.apache.hadoop; | 1,620,926 |
private static String formatURIForQuery(String uri) {
try {
return URLEncoder.encode(uri.endsWith("/") ? uri.substring(0, uri.length() - 1) : uri, "UTF-8");
} catch (UnsupportedEncodingException e) {
Log.e(TAG, e.getMessage());
return "";
}
} | static String function(String uri) { try { return URLEncoder.encode(uri.endsWith("/") ? uri.substring(0, uri.length() - 1) : uri, "UTF-8"); } catch (UnsupportedEncodingException e) { Log.e(TAG, e.getMessage()); return ""; } } | /**
* format an url for querying the database
* (postfix a / and apply percent-encoding)
*/ | format an url for querying the database (postfix a / and apply percent-encoding) | formatURIForQuery | {
"repo_name": "volhol/AntennaPod",
"path": "core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java",
"license": "mit",
"size": 45090
} | [
"android.util.Log",
"java.io.UnsupportedEncodingException",
"java.net.URLEncoder"
] | import android.util.Log; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; | import android.util.*; import java.io.*; import java.net.*; | [
"android.util",
"java.io",
"java.net"
] | android.util; java.io; java.net; | 844,930 |
public void compress(DataOutputStream dos, int fieldType, String[] data)
throws IOException; | void function(DataOutputStream dos, int fieldType, String[] data) throws IOException; | /**
* Compress this field and deposit the output to the bitstream
*
* @param dos The stream to output the result
* @param fieldType The type of field to compress from FieldConstants.
* @param data The field data
*/ | Compress this field and deposit the output to the bitstream | compress | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/web3d/vrml/export/compressors/FieldCompressor.java",
"license": "gpl-2.0",
"size": 6205
} | [
"java.io.DataOutputStream",
"java.io.IOException"
] | import java.io.DataOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 686,975 |
List<API> searchAPIs(Set<String> roles, String user, String searchString, int offset, int limit)
throws APIMgtDAOException; | List<API> searchAPIs(Set<String> roles, String user, String searchString, int offset, int limit) throws APIMgtDAOException; | /**
* Retrieves summary of paginated data of all available APIs that match the given search criteria. This will use
* the full text search for API table
*
* @param roles List of the roles of the user.
* @param user Current user.
* @param searchString The search string provided
... | Retrieves summary of paginated data of all available APIs that match the given search criteria. This will use the full text search for API table | searchAPIs | {
"repo_name": "sambaheerathan/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/dao/ApiDAO.java",
"license": "apache-2.0",
"size": 28726
} | [
"java.util.List",
"java.util.Set",
"org.wso2.carbon.apimgt.core.exception.APIMgtDAOException"
] | import java.util.List; import java.util.Set; import org.wso2.carbon.apimgt.core.exception.APIMgtDAOException; | import java.util.*; import org.wso2.carbon.apimgt.core.exception.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,131,544 |
protected void setCreationDate(Date creationDate) {
m_creationDate = creationDate;
}
| void function(Date creationDate) { m_creationDate = creationDate; } | /**
* Sets the image creation date.
* @param creationDate the creation date to set
*/ | Sets the image creation date | setCreationDate | {
"repo_name": "geberle/PhotMan",
"path": "PhotMan/src/photman/PhotManImage.java",
"license": "apache-2.0",
"size": 3856
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,964,096 |
EList<ErpPerson> getErpPersons(); | EList<ErpPerson> getErpPersons(); | /**
* Returns the value of the '<em><b>Erp Persons</b></em>' reference list.
* The list contents are of type {@link CIM.IEC61970.Informative.InfERPSupport.ErpPerson}.
* It is bidirectional and its opposite is '{@link CIM.IEC61970.Informative.InfERPSupport.ErpPerson#getAppointments <em>Appointments</em>}'.
* <!-... | Returns the value of the 'Erp Persons' reference list. The list contents are of type <code>CIM.IEC61970.Informative.InfERPSupport.ErpPerson</code>. It is bidirectional and its opposite is '<code>CIM.IEC61970.Informative.InfERPSupport.ErpPerson#getAppointments Appointments</code>'. If the meaning of the 'Erp Persons' re... | getErpPersons | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/InfWork/Appointment.java",
"license": "mit",
"size": 8057
} | [
"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,723,924 |
public GameType getGameType()
{
return this.theGameType;
} | GameType function() { return this.theGameType; } | /**
* Gets the GameType.
*/ | Gets the GameType | getGameType | {
"repo_name": "MartyParty21/AwakenDreamsClient",
"path": "mcp/src/minecraft/net/minecraft/world/storage/WorldInfo.java",
"license": "gpl-3.0",
"size": 28541
} | [
"net.minecraft.world.GameType"
] | import net.minecraft.world.GameType; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 2,250,959 |
public static ColorStateList getTabSelectionToolbarIconTintList(
Context context, boolean isIncognito) {
if (!themeRefactorEnabled()) {
return AppCompatResources.getColorStateList(context,
isIncognito ? R.color.dark_text_color_list
... | static ColorStateList function( Context context, boolean isIncognito) { if (!themeRefactorEnabled()) { return AppCompatResources.getColorStateList(context, isIncognito ? R.color.dark_text_color_list : R.color.default_text_color_inverse_list); } return AppCompatResources.getColorStateList(context, isIncognito ? R.color.... | /**
* Returns the {@link ColorStateList} for icons on the tab UI toolbar in selection edit mode.
*
* @param context {@link Context} used to retrieve color.
* @param isIncognito Whether the color is used for incognito mode.
* @return The {@link ColorStateList} for icons on the toolbar when tab s... | Returns the <code>ColorStateList</code> for icons on the tab UI toolbar in selection edit mode | getTabSelectionToolbarIconTintList | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java",
"license": "bsd-3-clause",
"size": 30938
} | [
"android.content.Context",
"android.content.res.ColorStateList",
"androidx.appcompat.content.res.AppCompatResources"
] | import android.content.Context; import android.content.res.ColorStateList; import androidx.appcompat.content.res.AppCompatResources; | import android.content.*; import android.content.res.*; import androidx.appcompat.content.res.*; | [
"android.content",
"androidx.appcompat"
] | android.content; androidx.appcompat; | 864,998 |
public PortfolioNode getParentNode(final ComputationTarget position) {
ArgumentChecker.notNull(position, "position");
ArgumentChecker.isTrue(ComputationTargetType.PORTFOLIO_NODE.containing(ComputationTargetType.POSITION).isCompatible(position.getType()), "position");
return getPositionSource().getPortfoli... | PortfolioNode function(final ComputationTarget position) { ArgumentChecker.notNull(position, STR); ArgumentChecker.isTrue(ComputationTargetType.PORTFOLIO_NODE.containing(ComputationTargetType.POSITION).isCompatible(position.getType()), STR); return getPositionSource().getPortfolioNode(position.getContextSpecification()... | /**
* Returns the portfolio node that a position is underneath. The position must be in a {@link ComputationTarget} of type {@code PORTFOLIO_NODE/POSITION}.
*
* @param position the position to search for, not null
* @return the portfolio node, null if the node cannot be resolved
*/ | Returns the portfolio node that a position is underneath. The position must be in a <code>ComputationTarget</code> of type PORTFOLIO_NODE/POSITION | getParentNode | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Engine/src/main/java/com/opengamma/engine/function/PortfolioStructure.java",
"license": "apache-2.0",
"size": 5228
} | [
"com.opengamma.core.position.PortfolioNode",
"com.opengamma.engine.ComputationTarget",
"com.opengamma.engine.target.ComputationTargetType",
"com.opengamma.id.VersionCorrection",
"com.opengamma.util.ArgumentChecker"
] | import com.opengamma.core.position.PortfolioNode; import com.opengamma.engine.ComputationTarget; import com.opengamma.engine.target.ComputationTargetType; import com.opengamma.id.VersionCorrection; import com.opengamma.util.ArgumentChecker; | import com.opengamma.core.position.*; import com.opengamma.engine.*; import com.opengamma.engine.target.*; import com.opengamma.id.*; import com.opengamma.util.*; | [
"com.opengamma.core",
"com.opengamma.engine",
"com.opengamma.id",
"com.opengamma.util"
] | com.opengamma.core; com.opengamma.engine; com.opengamma.id; com.opengamma.util; | 2,164,334 |
boolean recoverTransitionRead(StartupOption startOpt, FSNamesystem target,
MetaRecoveryContext recovery)
throws IOException {
assert startOpt != StartupOption.FORMAT :
"NameNode formatting should be performed before reading the image";
Collection<URI> imageDirs = storage.getImageDirect... | boolean recoverTransitionRead(StartupOption startOpt, FSNamesystem target, MetaRecoveryContext recovery) throws IOException { assert startOpt != StartupOption.FORMAT : STR; Collection<URI> imageDirs = storage.getImageDirectories(); Collection<URI> editsDirs = editLog.getEditURIs(); if((imageDirs.size() == 0 editsDirs.s... | /**
* Analyze storage directories.
* Recover from previous transitions if required.
* Perform fs state transition if necessary depending on the namespace info.
* Read storage info.
*
* @throws IOException
* @return true if the image needs to be saved or false otherwise
*/ | Analyze storage directories. Recover from previous transitions if required. Perform fs state transition if necessary depending on the namespace info. Read storage info | recoverTransitionRead | {
"repo_name": "oza/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java",
"license": "apache-2.0",
"size": 54078
} | [
"com.google.common.base.Joiner",
"java.io.IOException",
"java.util.Collection",
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map",
"org.apache.hadoop.hdfs.protocol.HdfsConstants",
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants",
"org.apache.hadoop.hdfs.server.common.Storage"
] | import com.google.common.base.Joiner; import java.io.IOException; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.s... | import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.common.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop"
] | com.google.common; java.io; java.util; org.apache.hadoop; | 205,286 |
public List<CourseAttributes> getCoursesForInstructor(String googleId) {
return getCoursesForInstructor(googleId, false);
} | List<CourseAttributes> function(String googleId) { return getCoursesForInstructor(googleId, false); } | /**
* Preconditions: <br>
* * All parameters are non-null.
*
* @return Courses the instructor is in.
*/ | Preconditions: All parameters are non-null | getCoursesForInstructor | {
"repo_name": "thenaesh/teammates",
"path": "src/main/java/teammates/logic/api/Logic.java",
"license": "gpl-2.0",
"size": 87996
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 602,694 |
public ServiceFuture<ConfigurationInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters, final ServiceCallback<ConfigurationInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(r... | ServiceFuture<ConfigurationInner> function(String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters, final ServiceCallback<ConfigurationInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, confi... | /**
* Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param configurationName The name of the ... | Updates a configuration of a server | beginCreateOrUpdateAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/mariadb/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/mariadb/v2018_06_01/implementation/ConfigurationsInner.java",
"license": "mit",
"size": 27858
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,038,169 |
public boolean isSubscribed(MessageHandler<? super CommandMessage<?>> commandHandler) {
return subscriptions.containsValue(commandHandler);
} | boolean function(MessageHandler<? super CommandMessage<?>> commandHandler) { return subscriptions.containsValue(commandHandler); } | /**
* Indicates whether the given {@code commandHandler} is subscribed to this command bus.
*
* @param commandHandler The command handler to verify the subscription for
* @return {@code true} if the handler is subscribed, otherwise {@code false}.
*/ | Indicates whether the given commandHandler is subscribed to this command bus | isSubscribed | {
"repo_name": "bojanv55/AxonFramework",
"path": "test/src/main/java/org/axonframework/test/utils/RecordingCommandBus.java",
"license": "apache-2.0",
"size": 4966
} | [
"org.axonframework.commandhandling.CommandMessage",
"org.axonframework.messaging.MessageHandler"
] | import org.axonframework.commandhandling.CommandMessage; import org.axonframework.messaging.MessageHandler; | import org.axonframework.commandhandling.*; import org.axonframework.messaging.*; | [
"org.axonframework.commandhandling",
"org.axonframework.messaging"
] | org.axonframework.commandhandling; org.axonframework.messaging; | 1,265,617 |
@Override public MeasureColumnDataChunk[] readMeasureChunks(FileHolder fileReader,
int... blockIndexes) {
MeasureColumnDataChunk[] datChunk = new MeasureColumnDataChunk[values.length];
for (int i = 0; i < blockIndexes.length; i++) {
datChunk[blockIndexes[i]] = readMeasureChunk(fileReader, blockInd... | @Override MeasureColumnDataChunk[] function(FileHolder fileReader, int... blockIndexes) { MeasureColumnDataChunk[] datChunk = new MeasureColumnDataChunk[values.length]; for (int i = 0; i < blockIndexes.length; i++) { datChunk[blockIndexes[i]] = readMeasureChunk(fileReader, blockIndexes[i]); } return datChunk; } | /**
* Method to read the blocks data based on block indexes
*
* @param fileReader file reader to read the blocks
* @param blockIndexes blocks to be read
* @return measure data chunks
*/ | Method to read the blocks data based on block indexes | readMeasureChunks | {
"repo_name": "foryou2030/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/carbon/datastore/chunk/reader/measure/CompressedMeasureChunkFileBasedReader.java",
"license": "apache-2.0",
"size": 3931
} | [
"org.apache.carbondata.core.carbon.datastore.chunk.MeasureColumnDataChunk",
"org.apache.carbondata.core.datastorage.store.FileHolder"
] | import org.apache.carbondata.core.carbon.datastore.chunk.MeasureColumnDataChunk; import org.apache.carbondata.core.datastorage.store.FileHolder; | import org.apache.carbondata.core.carbon.datastore.chunk.*; import org.apache.carbondata.core.datastorage.store.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 442,692 |
protected void updateAITick()
{
if (--this.randomTickDivider <= 0)
{
this.worldObj.villageCollectionObj.addVillagerPosition(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
this.randomTickDivider = 70 + this.rand... | void function() { if (--this.randomTickDivider <= 0) { this.worldObj.villageCollectionObj.addVillagerPosition(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)); this.randomTickDivider = 70 + this.rand.nextInt(50); this.villageObj = this.worldObj.villageCollectio... | /**
* main AI tick function, replaces updateEntityActionState
*/ | main AI tick function, replaces updateEntityActionState | updateAITick | {
"repo_name": "herpingdo/Hakkit",
"path": "net/minecraft/src/EntityVillager.java",
"license": "gpl-3.0",
"size": 32846
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,515,943 |
public RadiusAttribute getSubAttribute(String type) throws RadiusException {
if (type == null || type.length() == 0)
throw new IllegalArgumentException("type name is empty");
AttributeType t = getDictionary().getAttributeTypeByName(type);
if (t == null)
throw new IllegalArgumentException("unknown ... | RadiusAttribute function(String type) throws RadiusException { if (type == null type.length() == 0) throw new IllegalArgumentException(STR); AttributeType t = getDictionary().getAttributeTypeByName(type); if (t == null) throw new IllegalArgumentException(STR + type + "'"); if (t.getVendorId() != getChildVendorId()) thr... | /**
* Returns a single sub-attribute of the given type name.
* @param type attribute type name
* @return RadiusAttribute object or null if there is no such attribute
* @throws RuntimeException if the attribute occurs multiple times
*/ | Returns a single sub-attribute of the given type name | getSubAttribute | {
"repo_name": "creary/company",
"path": "code/RADIUS/tinyradius/TinyRadius-1.0/src/org/tinyradius/attribute/VendorSpecificAttribute.java",
"license": "gpl-2.0",
"size": 10720
} | [
"org.tinyradius.dictionary.AttributeType",
"org.tinyradius.util.RadiusException"
] | import org.tinyradius.dictionary.AttributeType; import org.tinyradius.util.RadiusException; | import org.tinyradius.dictionary.*; import org.tinyradius.util.*; | [
"org.tinyradius.dictionary",
"org.tinyradius.util"
] | org.tinyradius.dictionary; org.tinyradius.util; | 1,713,047 |
private void removeImplicitJoins() {
Collection<ProcessNode> modelNodes = new HashSet<ProcessNode>(model.getNodes());
for (ProcessNode node : modelNodes) {
if (!Utils.isGateway(node) || Utils.isEventBasedGateway(node)) {
Collection<ProcessEdge> incomingEdges =
model.getIncomingEd... | void function() { Collection<ProcessNode> modelNodes = new HashSet<ProcessNode>(model.getNodes()); for (ProcessNode node : modelNodes) { if (!Utils.isGateway(node) Utils.isEventBasedGateway(node)) { Collection<ProcessEdge> incomingEdges = model.getIncomingEdges(SequenceFlow.class, node); if (incomingEdges.size() > 1) {... | /**
* removes implicit Joins and Joins at Event-based Gateways
*/ | removes implicit Joins and Joins at Event-based Gateways | removeImplicitJoins | {
"repo_name": "bptlab/processeditor",
"path": "src/com/inubit/research/gui/plugins/choreography/interfaceGenerator/Corrector.java",
"license": "apache-2.0",
"size": 22935
} | [
"com.inubit.research.gui.plugins.choreography.Utils",
"java.util.Collection",
"java.util.HashSet",
"net.frapu.code.visualization.ProcessEdge",
"net.frapu.code.visualization.ProcessNode",
"net.frapu.code.visualization.bpmn.SequenceFlow"
] | import com.inubit.research.gui.plugins.choreography.Utils; import java.util.Collection; import java.util.HashSet; import net.frapu.code.visualization.ProcessEdge; import net.frapu.code.visualization.ProcessNode; import net.frapu.code.visualization.bpmn.SequenceFlow; | import com.inubit.research.gui.plugins.choreography.*; import java.util.*; import net.frapu.code.visualization.*; import net.frapu.code.visualization.bpmn.*; | [
"com.inubit.research",
"java.util",
"net.frapu.code"
] | com.inubit.research; java.util; net.frapu.code; | 627,480 |
private RandomPasswordContainer getAndRemoveRandomPasswordContainer(String uniqueID) {
return RandomPasswordContainerCache.getInstance().getRandomPasswordContainerCache().getAndRemove(uniqueID);
} | RandomPasswordContainer function(String uniqueID) { return RandomPasswordContainerCache.getInstance().getRandomPasswordContainerCache().getAndRemove(uniqueID); } | /**
* Get the RandomPasswordContainer object from the cache for given unique id
*
* @param uniqueID Get and Remove the unique id for that particualr cache
* @return RandomPasswordContainer of particular unique ID
*/ | Get the RandomPasswordContainer object from the cache for given unique id | getAndRemoveRandomPasswordContainer | {
"repo_name": "pulasthi7/carbon-identity",
"path": "components/user-store/org.wso2.carbon.identity.user.store.configuration/src/main/java/org/wso2/carbon/identity/user/store/configuration/UserStoreConfigAdminService.java",
"license": "apache-2.0",
"size": 46162
} | [
"org.wso2.carbon.identity.user.store.configuration.beans.RandomPasswordContainer",
"org.wso2.carbon.identity.user.store.configuration.cache.RandomPasswordContainerCache"
] | import org.wso2.carbon.identity.user.store.configuration.beans.RandomPasswordContainer; import org.wso2.carbon.identity.user.store.configuration.cache.RandomPasswordContainerCache; | import org.wso2.carbon.identity.user.store.configuration.beans.*; import org.wso2.carbon.identity.user.store.configuration.cache.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,117,325 |
void freezeTruncatedTo(TemporalUnit unit); | void freezeTruncatedTo(TemporalUnit unit); | /**
* Freeze the clock at its current instant in time, which will be truncated
* to the given unit.
*
* @param unit the unit the freezed instant will be truncated to
*
* @see ChronoUnit
* @see Instant#truncatedTo(TemporalUnit)
*/ | Freeze the clock at its current instant in time, which will be truncated to the given unit | freezeTruncatedTo | {
"repo_name": "digipost/digg",
"path": "src/main/java/no/digipost/time/ClockAdjuster.java",
"license": "apache-2.0",
"size": 4174
} | [
"java.time.temporal.TemporalUnit"
] | import java.time.temporal.TemporalUnit; | import java.time.temporal.*; | [
"java.time"
] | java.time; | 2,804,098 |
@Deprecated
MorphPattern makeMorphPattern(); | MorphPattern makeMorphPattern(); | /**
* Create a morphological pattern
* @deprecated It is strongly advised that all elements in the lexicon have a name (URI).
*/ | Create a morphological pattern | makeMorphPattern | {
"repo_name": "monnetproject/lemon.api",
"path": "main/src/main/java/eu/monnetproject/lemon/LemonFactory.java",
"license": "bsd-3-clause",
"size": 7066
} | [
"eu.monnetproject.lemon.model.MorphPattern"
] | import eu.monnetproject.lemon.model.MorphPattern; | import eu.monnetproject.lemon.model.*; | [
"eu.monnetproject.lemon"
] | eu.monnetproject.lemon; | 1,217,049 |
public Shift getShift() {
return shift;
} // getShift() | Shift function() { return shift; } | /**
* Returns the shift corresponding to this control
*
* @return the shift corresponding to this control
*/ | Returns the shift corresponding to this control | getShift | {
"repo_name": "waynem77/BSCMail",
"path": "src/main/java/io/github/waynem77/bscmail/gui/util/ShiftControl.java",
"license": "gpl-3.0",
"size": 3586
} | [
"io.github.waynem77.bscmail.persistent.Shift"
] | import io.github.waynem77.bscmail.persistent.Shift; | import io.github.waynem77.bscmail.persistent.*; | [
"io.github.waynem77"
] | io.github.waynem77; | 1,174,224 |
public static Errata publish(Errata unpublished, Collection channelIds, User user) {
//pass on to the factory
Errata retval = ErrataFactory.publish(unpublished);
log.debug("publish - errata published");
retval = addChannelsToErrata(retval, channelIds, user);
log.debug("publi... | static Errata function(Errata unpublished, Collection channelIds, User user) { Errata retval = ErrataFactory.publish(unpublished); log.debug(STR); retval = addChannelsToErrata(retval, channelIds, user); log.debug(STR); updateSearchIndex(); return retval; } | /**
* Takes an unpublished errata and returns a published errata into the
* channels we pass in. NOTE: This method does NOT update the errata cache for
* the channels. That is done when packages are pushed as part of the errata
* publication process (which is not done here)
*
* @param un... | Takes an unpublished errata and returns a published errata into the the channels. That is done when packages are pushed as part of the errata publication process (which is not done here) | publish | {
"repo_name": "colloquium/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java",
"license": "gpl-2.0",
"size": 52839
} | [
"com.redhat.rhn.domain.errata.Errata",
"com.redhat.rhn.domain.errata.ErrataFactory",
"com.redhat.rhn.domain.user.User",
"java.util.Collection"
] | import com.redhat.rhn.domain.errata.Errata; import com.redhat.rhn.domain.errata.ErrataFactory; import com.redhat.rhn.domain.user.User; import java.util.Collection; | import com.redhat.rhn.domain.errata.*; import com.redhat.rhn.domain.user.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 2,683,790 |
public void playerChanged(PlayerChangeEvent pce) {
}
| void function(PlayerChangeEvent pce) { } | /**
* More advanced state detection - allows to detect track changes etc.
* However, the underlying MPD library does not seem to support this well
*/ | More advanced state detection - allows to detect track changes etc. However, the underlying MPD library does not seem to support this well | playerChanged | {
"repo_name": "magcode/openhab",
"path": "bundles/binding/org.openhab.binding.mpd/src/main/java/org/openhab/binding/mpd/internal/MpdBinding.java",
"license": "epl-1.0",
"size": 25254
} | [
"org.bff.javampd.events.PlayerChangeEvent"
] | import org.bff.javampd.events.PlayerChangeEvent; | import org.bff.javampd.events.*; | [
"org.bff.javampd"
] | org.bff.javampd; | 515,667 |
public Set<Integer> getActiveDataTypes() {
int[] activeDataTypes = nativeGetActiveDataTypes(mNativeProfileSyncServiceAndroid);
return modelTypeArrayToSet(activeDataTypes);
} | Set<Integer> function() { int[] activeDataTypes = nativeGetActiveDataTypes(mNativeProfileSyncServiceAndroid); return modelTypeArrayToSet(activeDataTypes); } | /**
* Gets the set of data types that are currently syncing.
*
* This is affected by whether sync is on.
*
* @return Set of active data types.
*/ | Gets the set of data types that are currently syncing. This is affected by whether sync is on | getActiveDataTypes | {
"repo_name": "Pluto-tv/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java",
"license": "bsd-3-clause",
"size": 24294
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 378,342 |
protected ProcessResult prepareDefiniteResult(
TestSolution testSolution,
SSPHandler sspHandler,
int elementCounter) {
DefiniteResult result = processResultDataService.getDefiniteResult(
test,
sspHandler.getSSP().getPage(),
... | ProcessResult function( TestSolution testSolution, SSPHandler sspHandler, int elementCounter) { DefiniteResult result = processResultDataService.getDefiniteResult( test, sspHandler.getSSP().getPage(), testSolution, elementCounter, sspHandler.getRemarkList()); return result; } /** * Prepares {link @DefiniteResult} insta... | /**
* Prepares and return a {link @DefiniteResult} instance that handles the
* test result and all the associated data (counter and remarkList).
*
* @param testSolution
* @param sspHandler
* @param elementCounter
* @return a Definite result that handles the result of the test
*... | Prepares and return a {link @DefiniteResult} instance that handles the test result and all the associated data (counter and remarkList) | prepareDefiniteResult | {
"repo_name": "dzc34/Asqatasun",
"path": "engine/asqatasun-api/src/main/java/org/asqatasun/ruleimplementation/AbstractPageRuleDefaultImplementation.java",
"license": "agpl-3.0",
"size": 6565
} | [
"org.asqatasun.entity.audit.DefiniteResult",
"org.asqatasun.entity.audit.ProcessResult",
"org.asqatasun.entity.audit.TestSolution",
"org.asqatasun.processor.SSPHandler"
] | import org.asqatasun.entity.audit.DefiniteResult; import org.asqatasun.entity.audit.ProcessResult; import org.asqatasun.entity.audit.TestSolution; import org.asqatasun.processor.SSPHandler; | import org.asqatasun.entity.audit.*; import org.asqatasun.processor.*; | [
"org.asqatasun.entity",
"org.asqatasun.processor"
] | org.asqatasun.entity; org.asqatasun.processor; | 1,767,223 |
private long getLiveSeekPosition() {
long liveEdgeTimestampUs = Long.MIN_VALUE;
for (int i = 0; i < currentManifest.streamElements.length; i++) {
StreamElement streamElement = currentManifest.streamElements[i];
if (streamElement.chunkCount > 0) {
long elementLiveEdgeTimestampUs =
... | long function() { long liveEdgeTimestampUs = Long.MIN_VALUE; for (int i = 0; i < currentManifest.streamElements.length; i++) { StreamElement streamElement = currentManifest.streamElements[i]; if (streamElement.chunkCount > 0) { long elementLiveEdgeTimestampUs = streamElement.getStartTimeUs(streamElement.chunkCount - 1)... | /**
* For live playbacks, determines the seek position that snaps playback to be
* {@link #liveEdgeLatencyUs} behind the live edge of the current manifest
*
* @return The seek position in microseconds.
*/ | For live playbacks, determines the seek position that snaps playback to be <code>#liveEdgeLatencyUs</code> behind the live edge of the current manifest | getLiveSeekPosition | {
"repo_name": "tyazid/Exoplayer_VLC",
"path": "Studio_Project/ExoPlayerLib/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingChunkSource.java",
"license": "apache-2.0",
"size": 18215
} | [
"com.google.android.exoplayer.smoothstreaming.SmoothStreamingManifest"
] | import com.google.android.exoplayer.smoothstreaming.SmoothStreamingManifest; | import com.google.android.exoplayer.smoothstreaming.*; | [
"com.google.android"
] | com.google.android; | 439,683 |
protected Command getDeleteDependantCommand(Request request) {
return null;
}
/**
* Returns the host's {@link GraphicalEditPart#getContentPane() contentPane} | Command function(Request request) { return null; } /** * Returns the host's {@link GraphicalEditPart#getContentPane() contentPane} | /**
* Returns the <code>Command</code> to delete a child. This method does not
* get called unless the child forwards an additional request to the
* container editpart.
*
* @param request
* the Request
* @return the Command to delete the child
*/ | Returns the <code>Command</code> to delete a child. This method does not get called unless the child forwards an additional request to the container editpart | getDeleteDependantCommand | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/gef/editpolicies/LayoutEditPolicy.java",
"license": "epl-1.0",
"size": 15300
} | [
"org.eclipse.gef.GraphicalEditPart",
"org.eclipse.gef.Request",
"org.eclipse.gef.commands.Command"
] | import org.eclipse.gef.GraphicalEditPart; import org.eclipse.gef.Request; import org.eclipse.gef.commands.Command; | import org.eclipse.gef.*; import org.eclipse.gef.commands.*; | [
"org.eclipse.gef"
] | org.eclipse.gef; | 2,308,326 |
public static Connection connect(String url) {
return HttpConnection.connect(url);
}
/**
Parse the contents of a file as HTML.
@param in file to load HTML from
@param charsetName (optional) character set of file contents. Set to {@code null} to determine from {@code http-eq... | static Connection function(String url) { return HttpConnection.connect(url); } /** Parse the contents of a file as HTML. @param in file to load HTML from @param charsetName (optional) character set of file contents. Set to {@code null} to determine from {@code http-equiv} meta tag, if present, or fall back to {@code UT... | /**
* Creates a new {@link Connection} to a URL. Use to fetch and parse a HTML page.
* <p>
* Use examples:
* <ul>
* <li><code>Document doc = Jsoup.connect("http://example.com").userAgent("Mozilla").data("name", "jsoup").get();</code></li>
* <li><code>Document doc = Jsoup.connect("http://... | Creates a new <code>Connection</code> to a URL. Use to fetch and parse a HTML page. Use examples: <code>Document doc = Jsoup.connect("HREF").userAgent("Mozilla").data("name", "jsoup").get();</code> <code>Document doc = Jsoup.connect("HREF").cookie("auth", "token").post();</code> | connect | {
"repo_name": "InfinityPhase/CARIS",
"path": "jsoup/org/jsoup/Jsoup.java",
"license": "mit",
"size": 10815
} | [
"org.jsoup.helper.HttpConnection"
] | import org.jsoup.helper.HttpConnection; | import org.jsoup.helper.*; | [
"org.jsoup.helper"
] | org.jsoup.helper; | 231,905 |
public java_cup.runtime.Symbol next_token() throws java.io.IOException {
int zzInput;
int zzAction;
// cached fields:
int zzCurrentPosL;
int zzMarkedPosL;
int zzEndReadL = zzEndRead;
char [] zzBufferL = zzBuffer;
char [] zzCMapL = ZZ_CMAP;
int [] zzTransL = ZZ_TRANS;
... | java_cup.runtime.Symbol function() throws java.io.IOException { int zzInput; int zzAction; int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzM... | /**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
*
* @return the next token
* @exception java.io.IOException if any I/O-Error occurs
*/ | Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs | next_token | {
"repo_name": "mayace/proem",
"path": "src/com/github/proem/compiler/Scanner.java",
"license": "gpl-2.0",
"size": 33549
} | [
"java_cup.runtime.Symbol"
] | import java_cup.runtime.Symbol; | import java_cup.runtime.*; | [
"java_cup.runtime"
] | java_cup.runtime; | 468,741 |
public long getLatestGraphSnapshotTime() {
Cursor cursor = null;
long latestTimestamp = 0;
try {
cursor = sqlConnection.rawQuery(SQL_LATEST_VALID_GRAPH_DATE, new String[]{});
if (cursor.moveToNext()) {
latestTimestamp = cursor.getLong(0);
... | long function() { Cursor cursor = null; long latestTimestamp = 0; try { cursor = sqlConnection.rawQuery(SQL_LATEST_VALID_GRAPH_DATE, new String[]{}); if (cursor.moveToNext()) { latestTimestamp = cursor.getLong(0); } } catch (Exception e) { Log.e(TAG, STR, e); throw new RuntimeException(e); } finally { if (cursor != nul... | /**
* Returns the latest timestamp that can be graphed. This is based on the timestamp
* having at least 3 distinct readings for the day
*/ | Returns the latest timestamp that can be graphed. This is based on the timestamp having at least 3 distinct readings for the day | getLatestGraphSnapshotTime | {
"repo_name": "balch/MockTrade",
"path": "MockTradeApp/src/main/java/com/balch/mocktrade/portfolio/SnapshotTotalsSqliteModel.java",
"license": "gpl-3.0",
"size": 11894
} | [
"android.database.Cursor",
"android.util.Log"
] | import android.database.Cursor; import android.util.Log; | import android.database.*; import android.util.*; | [
"android.database",
"android.util"
] | android.database; android.util; | 654,301 |
public Edit newResourceEdit(Entity container, Element element)
{
BaseMailArchiveMessageEdit rv = new BaseMailArchiveMessageEdit((MessageChannel) container, element);
rv.activate();
return rv;
} | Edit function(Entity container, Element element) { BaseMailArchiveMessageEdit rv = new BaseMailArchiveMessageEdit((MessageChannel) container, element); rv.activate(); return rv; } | /**
* Construct a new resource, from an XML element.
*
* @param container
* The Resource that is the container for the new resource (may be null).
* @param element
* The XML.
* @return The new resource from the XML.
*/ | Construct a new resource, from an XML element | newResourceEdit | {
"repo_name": "harfalm/Sakai-10.1",
"path": "mailarchive/mailarchive-impl/impl/src/java/org/sakaiproject/mailarchive/impl/BaseMailArchiveService.java",
"license": "apache-2.0",
"size": 41549
} | [
"org.sakaiproject.entity.api.Edit",
"org.sakaiproject.entity.api.Entity",
"org.sakaiproject.message.api.MessageChannel",
"org.w3c.dom.Element"
] | import org.sakaiproject.entity.api.Edit; import org.sakaiproject.entity.api.Entity; import org.sakaiproject.message.api.MessageChannel; import org.w3c.dom.Element; | import org.sakaiproject.entity.api.*; import org.sakaiproject.message.api.*; import org.w3c.dom.*; | [
"org.sakaiproject.entity",
"org.sakaiproject.message",
"org.w3c.dom"
] | org.sakaiproject.entity; org.sakaiproject.message; org.w3c.dom; | 1,386,186 |
@XmlElement(required = true)
public String getComment() {
return comment;
} | @XmlElement(required = true) String function() { return comment; } | /**
* free text for reference
*/ | free text for reference | getComment | {
"repo_name": "michelafrinic/WHOIS",
"path": "whois-api/src/main/java/net/ripe/db/whois/api/acl/Limit.java",
"license": "bsd-3-clause",
"size": 1999
} | [
"javax.xml.bind.annotation.XmlElement"
] | import javax.xml.bind.annotation.XmlElement; | import javax.xml.bind.annotation.*; | [
"javax.xml"
] | javax.xml; | 464,527 |
String getQueryId() throws SQLException;
/**
* {@inheritDoc} | String getQueryId() throws SQLException; /** * {@inheritDoc} | /**
* Gets the ID of the associated query (the query whose results this ResultSet
* presents).
*
* @throws SQLException if this method is called on a closed result set
*/ | Gets the ID of the associated query (the query whose results this ResultSet presents) | getQueryId | {
"repo_name": "dremio/dremio-oss",
"path": "client/jdbc/src/main/java/com/dremio/jdbc/DremioResultSet.java",
"license": "apache-2.0",
"size": 16289
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,233,511 |
Object obj = parameters.get(Names.state);
if (obj instanceof DriverDistractionState) {
return (DriverDistractionState)obj;
} else if(obj instanceof String) {
DriverDistractionState theCode = null;
try {
theCode = DriverDistractionState.valueForString((String) o... | Object obj = parameters.get(Names.state); if (obj instanceof DriverDistractionState) { return (DriverDistractionState)obj; } else if(obj instanceof String) { DriverDistractionState theCode = null; try { theCode = DriverDistractionState.valueForString((String) obj); } catch (Exception e) { DebugTool.logError(STR + getCl... | /**
* <p>Called to get the current driver distraction state(i.e. whether driver distraction rules are in effect, or not)</p>
* @return {@linkplain DriverDistractionState} the Current driver distraction state.
*/ | Called to get the current driver distraction state(i.e. whether driver distraction rules are in effect, or not) | getState | {
"repo_name": "Luxoft/SDLP2",
"path": "SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java",
"license": "lgpl-2.1",
"size": 2818
} | [
"com.smartdevicelink.proxy.constants.Names",
"com.smartdevicelink.proxy.rpc.enums.DriverDistractionState",
"com.smartdevicelink.util.DebugTool"
] | import com.smartdevicelink.proxy.constants.Names; import com.smartdevicelink.proxy.rpc.enums.DriverDistractionState; import com.smartdevicelink.util.DebugTool; | import com.smartdevicelink.proxy.constants.*; import com.smartdevicelink.proxy.rpc.enums.*; import com.smartdevicelink.util.*; | [
"com.smartdevicelink.proxy",
"com.smartdevicelink.util"
] | com.smartdevicelink.proxy; com.smartdevicelink.util; | 2,703,670 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.