method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@Override public void setup(OperatorContext context) { queryQueueManager.setup(context); }
void function(OperatorContext context) { queryQueueManager.setup(context); }
/** * This method should be called from the {@link com.datatorrent.api.Operator#setup} method so that the QueryManagerSynchronous can correctly initialize its internal state. * @param context The operator context. */
This method should be called from the <code>com.datatorrent.api.Operator#setup</code> method so that the
setup
{ "repo_name": "ananthc/apex-malhar", "path": "library/src/main/java/org/apache/apex/malhar/lib/appdata/query/QueryManagerSynchronous.java", "license": "apache-2.0", "size": 7742 }
[ "com.datatorrent.api.Context" ]
import com.datatorrent.api.Context;
import com.datatorrent.api.*;
[ "com.datatorrent.api" ]
com.datatorrent.api;
2,459,187
public int[] pixelCoords(final Vector3d p) { int[] coords = new int[2]; pixelCoords(p, coords); return coords; }
int[] function(final Vector3d p) { int[] coords = new int[2]; pixelCoords(p, coords); return coords; }
/** * from position on detector, work out pixel coordinates * * @param p * position vector * @return integer array of pixel coordinates */
from position on detector, work out pixel coordinates
pixelCoords
{ "repo_name": "willrogers/dawnsci", "path": "org.eclipse.dawnsci.analysis.api/src/org/eclipse/dawnsci/analysis/api/diffraction/DetectorProperties.java", "license": "epl-1.0", "size": 35253 }
[ "javax.vecmath.Vector3d" ]
import javax.vecmath.Vector3d;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
2,659,067
@EventHandler(value = "click", target = "@btnNext") private void onClick$btnNext() { history.next(); }
@EventHandler(value = "click", target = STR) private void onClick$btnNext() { history.next(); }
/** * Moves to the next topic in the view history. */
Moves to the next topic in the view history
onClick$btnNext
{ "repo_name": "carewebframework/carewebframework-core", "path": "org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpViewer.java", "license": "apache-2.0", "size": 16114 }
[ "org.fujion.annotation.EventHandler" ]
import org.fujion.annotation.EventHandler;
import org.fujion.annotation.*;
[ "org.fujion.annotation" ]
org.fujion.annotation;
2,494,442
public Target2 getTarget() { return target; }
Target2 function() { return target; }
/** * Gets the associated target. */
Gets the associated target
getTarget
{ "repo_name": "shyTNT/BingAds-Java-SDK", "path": "src/main/java/com/microsoft/bingads/bulk/entities/BulkTarget.java", "license": "mit", "size": 22886 }
[ "com.microsoft.bingads.campaignmanagement.Target2" ]
import com.microsoft.bingads.campaignmanagement.Target2;
import com.microsoft.bingads.campaignmanagement.*;
[ "com.microsoft.bingads" ]
com.microsoft.bingads;
2,123,467
EDataType getDataTransmissionModeTypeObject();
EDataType getDataTransmissionModeTypeObject();
/** * Returns the meta object for data type '{@link net.opengis.wps20.DataTransmissionModeType <em>Data Transmission Mode Type Object</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for data type '<em>Data Transmission Mode Type Object</em>'. * @see net.opengis.wps20.DataTr...
Returns the meta object for data type '<code>net.opengis.wps20.DataTransmissionModeType Data Transmission Mode Type Object</code>'.
getDataTransmissionModeTypeObject
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wps/src/net/opengis/wps20/Wps20Package.java", "license": "lgpl-2.1", "size": 228745 }
[ "org.eclipse.emf.ecore.EDataType" ]
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
173,298
@ServiceMethod(returns = ReturnType.SINGLE) CustomDomainInner delete( String resourceGroupName, String profileName, String endpointName, String customDomainName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) CustomDomainInner delete( String resourceGroupName, String profileName, String endpointName, String customDomainName, Context context);
/** * Deletes an existing custom domain within an endpoint. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the CDN profile which is unique within the resource group. * @param endpointName Name of the endpoint under the profile...
Deletes an existing custom domain within an endpoint
delete
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CustomDomainsClient.java", "license": "mit", "size": 34863 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.cdn.fluent.models.CustomDomainInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.cdn.fluent.models.CustomDomainInner;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.cdn.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,011,894
private static Map<String, Annotation> buildAnnotationNames( Set<String> annotationWhitelist) { ImmutableMap.Builder<String, Annotation> annotationBuilder = ImmutableMap.builder(); annotationBuilder.putAll(Annotation.recognizedAnnotations); for (String unrecognizedAnnotation : annotationWhit...
static Map<String, Annotation> function( Set<String> annotationWhitelist) { ImmutableMap.Builder<String, Annotation> annotationBuilder = ImmutableMap.builder(); annotationBuilder.putAll(Annotation.recognizedAnnotations); for (String unrecognizedAnnotation : annotationWhitelist) { if (!unrecognizedAnnotation.isEmpty() &...
/** * Create the annotation names from the user-specified * annotation whitelist. */
Create the annotation names from the user-specified annotation whitelist
buildAnnotationNames
{ "repo_name": "superkonduktr/closure-compiler", "path": "src/com/google/javascript/jscomp/parsing/Config.java", "license": "apache-2.0", "size": 3295 }
[ "com.google.common.collect.ImmutableMap", "java.util.Map", "java.util.Set" ]
import com.google.common.collect.ImmutableMap; import java.util.Map; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,168,449
public List<TransMeta> generateDimensionTransformations() throws KettleException { DatabaseMeta databaseMeta = findTargetDatabaseMeta(); List<TransMeta> transMetas = new ArrayList<TransMeta>(); List<LogicalTable> logicalTables = getUniqueLogicalTables(); for (LogicalTable logicalTable : logicalTabl...
List<TransMeta> function() throws KettleException { DatabaseMeta databaseMeta = findTargetDatabaseMeta(); List<TransMeta> transMetas = new ArrayList<TransMeta>(); List<LogicalTable> logicalTables = getUniqueLogicalTables(); for (LogicalTable logicalTable : logicalTables) { TableType tableType = ConceptUtil.getTableType...
/** * This method generates a list of transformations: one for each dimension. * * @return the list of generated transformations */
This method generates a list of transformations: one for each dimension
generateDimensionTransformations
{ "repo_name": "TatsianaKasiankova/pentaho-kettle", "path": "plugins/star-modeler/src/org/pentaho/di/starmodeler/generator/JobGenerator.java", "license": "apache-2.0", "size": 28134 }
[ "java.util.ArrayList", "java.util.List", "org.pentaho.di.core.database.DatabaseMeta", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.starmodeler.ConceptUtil", "org.pentaho.di.starmodeler.DimensionType", "org.pentaho.di.trans.TransMeta", "org.pentaho.metadata.model.LogicalTable", "o...
import java.util.ArrayList; import java.util.List; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.starmodeler.ConceptUtil; import org.pentaho.di.starmodeler.DimensionType; import org.pentaho.di.trans.TransMeta; import org.pentaho.metadata.mo...
import java.util.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.starmodeler.*; import org.pentaho.di.trans.*; import org.pentaho.metadata.model.*; import org.pentaho.metadata.model.concept.types.*;
[ "java.util", "org.pentaho.di", "org.pentaho.metadata" ]
java.util; org.pentaho.di; org.pentaho.metadata;
269,884
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_details); }
void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_details); }
/** * Called when the activity is first created. */
Called when the activity is first created
onCreate
{ "repo_name": "groschovskiy/lerigos_music", "path": "Android/tv/src/main/java/com/lerigos/music/DetailsActivity.java", "license": "apache-2.0", "size": 1164 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
42,475
private void checkBody(JSONObject payload) throws JSONException { // Checks that body is present if (!payload.has("body")) throw new JSONException("No body specified, 'body' field is required"); // Check subject and body size if (payload.getString("body").length() > Int...
void function(JSONObject payload) throws JSONException { if (!payload.has("body")) throw new JSONException(STR); if (payload.getString("body").length() > Integer.parseInt(emailProxyMaxBodySize)) throw new IllegalArgumentException( STR + emailProxyMaxBodySize + STR); }
/** * Checks 'body' of request against configuration * * @param payload JSONObject to search body in */
Checks 'body' of request against configuration
checkBody
{ "repo_name": "landryb/georchestra", "path": "console/src/main/java/org/georchestra/console/ws/emails/EmailController.java", "license": "gpl-3.0", "size": 23756 }
[ "org.json.JSONException", "org.json.JSONObject" ]
import org.json.JSONException; import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
338,439
protected final void usage(JCommander jc, ParameterException t) { System.out.println(Constants.BORDER); System.out.println(Constants.getGitBlitVersion()); System.out.println(Constants.BORDER); System.out.println(); if (t != null) { System.out.println(t.getMessage()); System.out.println(); }...
final void function(JCommander jc, ParameterException t) { System.out.println(Constants.BORDER); System.out.println(Constants.getGitBlitVersion()); System.out.println(Constants.BORDER); System.out.println(); if (t != null) { System.out.println(t.getMessage()); System.out.println(); } if (jc != null) { jc.usage(); Syste...
/** * Display the command line usage of Gitblit GO. * * @param jc * @param t */
Display the command line usage of Gitblit GO
usage
{ "repo_name": "BullShark/IRCBlit", "path": "src/main/java/com/gitblit/GitBlitServer.java", "license": "apache-2.0", "size": 22734 }
[ "com.beust.jcommander.JCommander", "com.beust.jcommander.ParameterException" ]
import com.beust.jcommander.JCommander; import com.beust.jcommander.ParameterException;
import com.beust.jcommander.*;
[ "com.beust.jcommander" ]
com.beust.jcommander;
1,051,557
@FIXVersion(introduced = "5.0SP1") @TagNumRef(tagNum = TagNum.SecurityXMLSchema) public String getSecurityXMLSchema() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
@FIXVersion(introduced = STR) @TagNumRef(tagNum = TagNum.SecurityXMLSchema) String function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
/** * Message field getter. * @return field value */
Message field getter
getSecurityXMLSchema
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/SecurityXML.java", "license": "gpl-3.0", "size": 12632 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,615,953
@SuppressWarnings("deprecation") public void testConfigurableSitePublicGroup() throws Exception { AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName()); // We'll be configuring a JMX managed bean (in this test method only). ChildApplicatio...
@SuppressWarnings(STR) void function() throws Exception { AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName()); ChildApplicationContextFactory sysAdminSubsystem = (ChildApplicationContextFactory) applicationContext.getBean(STR); final String sitePublicGroupPropName = STR; final String ori...
/** * This method tests https://issues.alfresco.com/jira/browse/ALF-3785 which allows 'public' sites * to be only visible to members of a configured group, by default EVERYONE. * * @author Neil McErlean * @since 3.4 */
This method tests HREF which allows 'public' sites to be only visible to members of a configured group, by default EVERYONE
testConfigurableSitePublicGroup
{ "repo_name": "daniel-he/community-edition", "path": "projects/repository/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java", "license": "lgpl-3.0", "size": 126824 }
[ "org.alfresco.repo.management.subsystems.ChildApplicationContextFactory", "org.alfresco.repo.security.authentication.AuthenticationUtil", "org.alfresco.service.cmr.security.AuthorityType", "org.alfresco.service.cmr.security.PermissionService", "org.alfresco.service.cmr.site.SiteInfo", "org.alfresco.servic...
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.service.cmr.security.AuthorityType; import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.service.cmr.site.SiteInfo; import or...
import org.alfresco.repo.management.subsystems.*; import org.alfresco.repo.security.authentication.*; import org.alfresco.service.cmr.security.*; import org.alfresco.service.cmr.site.*;
[ "org.alfresco.repo", "org.alfresco.service" ]
org.alfresco.repo; org.alfresco.service;
26,152
public String toString () { return super.toString (Literals.EQ); }
String function () { return super.toString (Literals.EQ); }
/** * For debugging purpose. * * @return This expression as string * */
For debugging purpose
toString
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/share/org/apache/slide/search/basic/expression/EQExpression.java", "license": "apache-2.0", "size": 2557 }
[ "org.apache.slide.search.basic.Literals" ]
import org.apache.slide.search.basic.Literals;
import org.apache.slide.search.basic.*;
[ "org.apache.slide" ]
org.apache.slide;
1,335,481
public void removeAgedItems(long latest, boolean notify) { if (this.data.isEmpty()) { return; // nothing to do } // find the serial index of the period specified by 'latest' long index = Long.MAX_VALUE; try { Method m = RegularTimePeriod.class....
void function(long latest, boolean notify) { if (this.data.isEmpty()) { return; } long index = Long.MAX_VALUE; try { Method m = RegularTimePeriod.class.getDeclaredMethod( STR, new Class[] {Class.class, Date.class, TimeZone.class}); RegularTimePeriod newest = (RegularTimePeriod) m.invoke( this.timePeriodClass, new Objec...
/** * Age items in the series. Ensure that the timespan from the supplied * time to the oldest record in the series does not exceed history count. * oldest items will be removed if required. * * @param latest the time to be compared against when aging data * (specified in milli...
Age items in the series. Ensure that the timespan from the supplied time to the oldest record in the series does not exceed history count. oldest items will be removed if required
removeAgedItems
{ "repo_name": "Mr-Steve/LTSpice_Library_Manager", "path": "libs/jfreechart-1.0.16/source/org/jfree/data/time/TimeSeries.java", "license": "gpl-2.0", "size": 48310 }
[ "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "java.util.Date", "java.util.TimeZone" ]
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Date; import java.util.TimeZone;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,478,976
public boolean deleteApiForTenant(String apiProviderName, String apiName, String version, String tenantDomain) throws AxisFault { RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(tenantDomain); // Delete secure vault alias properties if exists deleteRegistryProperty(a...
boolean function(String apiProviderName, String apiName, String version, String tenantDomain) throws AxisFault { RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(tenantDomain); deleteRegistryProperty(apiProviderName, apiName, version, tenantDomain); String qualifiedName = GatewayUtils.getQualifiedApiName(api...
/** * Delete the API from Gateway * * @param tenantDomain * @throws AxisFault */
Delete the API from Gateway
deleteApiForTenant
{ "repo_name": "harsha89/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/service/APIGatewayAdmin.java", "license": "apache-2.0", "size": 41004 }
[ "org.apache.axis2.AxisFault", "org.wso2.carbon.apimgt.gateway.utils.GatewayUtils", "org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy" ]
import org.apache.axis2.AxisFault; import org.wso2.carbon.apimgt.gateway.utils.GatewayUtils; import org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy;
import org.apache.axis2.*; import org.wso2.carbon.apimgt.gateway.utils.*;
[ "org.apache.axis2", "org.wso2.carbon" ]
org.apache.axis2; org.wso2.carbon;
2,783,410
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { this.func_149797_b(p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_)); }
void function(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { this.func_149797_b(p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_)); }
/** * Updates the blocks bounds based on its current state. Args: world, x, y, z */
Updates the blocks bounds based on its current state. Args: world, x, y, z
setBlockBoundsBasedOnState
{ "repo_name": "kitsushadow/ForgeCraft", "path": "old_src/1.10.2/1-7-10Resources/src/main/java/com/kitsu/medievalcraft/block/wood/quartersplit/AcaciaSplitLog.java", "license": "lgpl-2.1", "size": 5708 }
[ "net.minecraft.world.IBlockAccess" ]
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.*;
[ "net.minecraft.world" ]
net.minecraft.world;
807,418
public void setProperties(Map<String,String> map) throws Exception { String matches = map.get(MATCH); if (matches != null) { for (String p : matches.split("\\s*,\\s*")) { matchers.add(new Glob(p)); } } }
void function(Map<String,String> map) throws Exception { String matches = map.get(MATCH); if (matches != null) { for (String p : matches.split(STR)) { matchers.add(new Glob(p)); } } }
/** * Set the properties for this plugin. Subclasses should call this method * before they handle their own properties. */
Set the properties for this plugin. Subclasses should call this method before they handle their own properties
setProperties
{ "repo_name": "joansmith/bnd", "path": "biz.aQute.bndlib/src/aQute/bnd/url/DefaultURLConnectionHandler.java", "license": "apache-2.0", "size": 3232 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,033,926
@Override protected Credential parseCredential(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { String userName = null; String password = null; String securityDomain = null; boolean elytronEnabled = false; String authent...
Credential function(XMLStreamReader reader) throws XMLStreamException, ParserException, ValidateException { String userName = null; String password = null; String securityDomain = null; boolean elytronEnabled = false; String authenticationContext = null; while (reader.hasNext()) { switch (reader.nextTag()) { case END_E...
/** * parse credential tag * * @param reader reader * @return the parse Object * @throws XMLStreamException in case of error * @throws ParserException in case of error * @throws ValidateException in case of error */
parse credential tag
parseCredential
{ "repo_name": "xasx/wildfly", "path": "connector/src/main/java/org/jboss/as/connector/deployers/ds/DsXmlParser.java", "license": "lgpl-2.1", "size": 10050 }
[ "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamReader", "org.jboss.as.connector.metadata.api.common.Credential", "org.jboss.as.connector.metadata.common.CredentialImpl", "org.jboss.jca.common.api.metadata.common.Recovery", "org.jboss.jca.common.api.metadata.ds.DataSource", "org.jboss....
import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.jboss.as.connector.metadata.api.common.Credential; import org.jboss.as.connector.metadata.common.CredentialImpl; import org.jboss.jca.common.api.metadata.common.Recovery; import org.jboss.jca.common.api.metadata.ds.DataSourc...
import javax.xml.stream.*; import org.jboss.as.connector.metadata.api.common.*; import org.jboss.as.connector.metadata.common.*; import org.jboss.jca.common.api.metadata.common.*; import org.jboss.jca.common.api.metadata.ds.*; import org.jboss.jca.common.api.validator.*; import org.jboss.jca.common.metadata.*;
[ "javax.xml", "org.jboss.as", "org.jboss.jca" ]
javax.xml; org.jboss.as; org.jboss.jca;
882,856
SiteVnetInfo.DefinitionStages.Blank defineVirtualNetworkConnection(String name);
SiteVnetInfo.DefinitionStages.Blank defineVirtualNetworkConnection(String name);
/** * Begins definition for a new VirtualNetworkConnection resource. * @param name resource name. * @return the first stage of the new VirtualNetworkConnection definition. */
Begins definition for a new VirtualNetworkConnection resource
defineVirtualNetworkConnection
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/WebApps.java", "license": "mit", "size": 204730 }
[ "com.microsoft.azure.management.appservice.v2018_02_01.SiteVnetInfo" ]
import com.microsoft.azure.management.appservice.v2018_02_01.SiteVnetInfo;
import com.microsoft.azure.management.appservice.v2018_02_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,026,908
private static void setStringValue(final JsonParser jp, final ExtendedBasicDMPJPAObject object, final String currentFieldName) throws IOException { if (TransformationDeserializer.NAME_KEY.equals(currentFieldName)) { object.setName(jp.getText()); } else if (TransformationDeserializer.DESCRIPTION_KEY.equal...
static void function(final JsonParser jp, final ExtendedBasicDMPJPAObject object, final String currentFieldName) throws IOException { if (TransformationDeserializer.NAME_KEY.equals(currentFieldName)) { object.setName(jp.getText()); } else if (TransformationDeserializer.DESCRIPTION_KEY.equals(currentFieldName)) { object...
/** * Set common string values (name, and description) for either a transformation or a component * * @param jp the current json parser * @param object either the transformation or the component * @param currentFieldName the json field name * @throws IOException */
Set common string values (name, and description) for either a transformation or a component
setStringValue
{ "repo_name": "dswarm/dswarm", "path": "persistence/src/main/java/org/dswarm/persistence/model/job/utils/TransformationDeserializer.java", "license": "apache-2.0", "size": 18701 }
[ "com.fasterxml.jackson.core.JsonParser", "java.io.IOException", "org.dswarm.persistence.model.ExtendedBasicDMPJPAObject", "org.dswarm.persistence.model.job.Transformation" ]
import com.fasterxml.jackson.core.JsonParser; import java.io.IOException; import org.dswarm.persistence.model.ExtendedBasicDMPJPAObject; import org.dswarm.persistence.model.job.Transformation;
import com.fasterxml.jackson.core.*; import java.io.*; import org.dswarm.persistence.model.*; import org.dswarm.persistence.model.job.*;
[ "com.fasterxml.jackson", "java.io", "org.dswarm.persistence" ]
com.fasterxml.jackson; java.io; org.dswarm.persistence;
1,725,552
public Result execStatementsFromFile( String filename, boolean sendSinglestatement ) throws KettleException { FileObject sqlFile = null; InputStream is = null; InputStreamReader bis = null; try { if ( Utils.isEmpty( filename ) ) { throw new KettleException( "Filename is missing!" ); ...
Result function( String filename, boolean sendSinglestatement ) throws KettleException { FileObject sqlFile = null; InputStream is = null; InputStreamReader bis = null; try { if ( Utils.isEmpty( filename ) ) { throw new KettleException( STR ); } sqlFile = KettleVFS.getFileObject( filename ); if ( !sqlFile.exists() ) { ...
/** * Execute an SQL statement inside a file on the database connection (has to be open) * * @param sql The file that contains SQL to execute * @return a Result object indicating the number of lines read, deleted, inserted, updated, ... * @throws KettleDatabaseException in case anything goes wrong. * ...
Execute an SQL statement inside a file on the database connection (has to be open)
execStatementsFromFile
{ "repo_name": "pedrofvteixeira/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/database/Database.java", "license": "apache-2.0", "size": 180346 }
[ "java.io.BufferedInputStream", "java.io.BufferedReader", "java.io.InputStream", "java.io.InputStreamReader", "org.apache.commons.vfs2.FileObject", "org.pentaho.di.core.Const", "org.pentaho.di.core.Result", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.util.Utils", "org.pent...
import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import org.apache.commons.vfs2.FileObject; import org.pentaho.di.core.Const; import org.pentaho.di.core.Result; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.cor...
import java.io.*; import org.apache.commons.vfs2.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.util.*; import org.pentaho.di.core.vfs.*;
[ "java.io", "org.apache.commons", "org.pentaho.di" ]
java.io; org.apache.commons; org.pentaho.di;
2,648,568
public void testJsonPlusBinary() throws Exception { // Create our test data, which has several binary streams in it final ByteArrayOutputStream baos = new ByteArrayOutputStream(512); baos.write("[{'freddy':'versus','json':'the-movie','my-binary䷴':`".getBytes(Charsets.UTF_8)); final ...
void function() throws Exception { final ByteArrayOutputStream baos = new ByteArrayOutputStream(512); baos.write(STR.getBytes(Charsets.UTF_8)); final byte[] stream1bytes = new byte[32]; new DataOutputStream(baos).writeLong(stream1bytes.length); for (int i = 0; i < stream1bytes.length; i++) { stream1bytes[i] = (byte) i;...
/** * Ensures that down-the-middle JSON+binary works properly */
Ensures that down-the-middle JSON+binary works properly
testJsonPlusBinary
{ "repo_name": "TribeMedia/aura", "path": "aura-util/src/test/java/org/auraframework/util/json/JsonStreamReaderTest.java", "license": "apache-2.0", "size": 53516 }
[ "com.google.common.base.Charsets", "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.DataOutputStream", "java.io.InputStream", "java.util.Arrays", "org.auraframework.util.IOUtil" ]
import com.google.common.base.Charsets; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.InputStream; import java.util.Arrays; import org.auraframework.util.IOUtil;
import com.google.common.base.*; import java.io.*; import java.util.*; import org.auraframework.util.*;
[ "com.google.common", "java.io", "java.util", "org.auraframework.util" ]
com.google.common; java.io; java.util; org.auraframework.util;
1,948,867
@POST @Path("/getLightweightMetaObjectsByQueryAndPattern") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response getLightweightMetaObjectsByQueryAndPattern(@Context final HttpServletRequest hsr, @FormParam(PARAM_CLASS_ID) final Str...
@Path(STR) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_OCTET_STREAM) Response function(@Context final HttpServletRequest hsr, @FormParam(PARAM_CLASS_ID) final String classIdBytes, @FormParam(PARAM_USER) final String userBytes, @FormParam(PARAM_QUERY) final String queryBytes, @FormPa...
/** * DOCUMENT ME! * * @param hsr DOCUMENT ME! * @param classIdBytes DOCUMENT ME! * @param userBytes user DOCUMENT ME! * @param queryBytes DOCUMENT ME! * @param representationFieldsBytes DOCUMENT ME!...
DOCUMENT ME
getLightweightMetaObjectsByQueryAndPattern
{ "repo_name": "cismet/cids-server", "path": "src/main/java/de/cismet/cids/server/ws/rest/RESTfulSerialInterface.java", "license": "lgpl-3.0", "size": 98607 }
[ "de.cismet.cids.server.connectioncontext.ConnectionContextBackend", "de.cismet.connectioncontext.ConnectionContext", "de.cismet.tools.Converter", "java.rmi.RemoteException", "javax.servlet.http.HttpServletRequest", "javax.ws.rs.Consumes", "javax.ws.rs.FormParam", "javax.ws.rs.Path", "javax.ws.rs.Pro...
import de.cismet.cids.server.connectioncontext.ConnectionContextBackend; import de.cismet.connectioncontext.ConnectionContext; import de.cismet.tools.Converter; import java.rmi.RemoteException; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.FormParam; import javax.ws.rs.Pa...
import de.cismet.cids.server.connectioncontext.*; import de.cismet.connectioncontext.*; import de.cismet.tools.*; import java.rmi.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "de.cismet.cids", "de.cismet.connectioncontext", "de.cismet.tools", "java.rmi", "javax.servlet", "javax.ws" ]
de.cismet.cids; de.cismet.connectioncontext; de.cismet.tools; java.rmi; javax.servlet; javax.ws;
2,296,798
List<Detail> findByBloodType(Integer bloodType);
List<Detail> findByBloodType(Integer bloodType);
/** * Method for search details in database by bloodType. * * @param bloodType Detail bloodType. * @return List of Detail objects with this bloodType. */
Method for search details in database by bloodType
findByBloodType
{ "repo_name": "solairerove/padlaboris", "path": "src/main/java/com/instinctools/padlaboris/domain/service/DetailService.java", "license": "mit", "size": 1590 }
[ "com.instinctools.padlaboris.domain.model.Detail", "java.util.List" ]
import com.instinctools.padlaboris.domain.model.Detail; import java.util.List;
import com.instinctools.padlaboris.domain.model.*; import java.util.*;
[ "com.instinctools.padlaboris", "java.util" ]
com.instinctools.padlaboris; java.util;
1,726,320
public void writeAtomic(T obj, BlobContainer blobContainer, String name) throws IOException { String blobName = blobName(name); String tempBlobName = tempBlobName(name); writeBlob(obj, blobContainer, tempBlobName); try { blobContainer.move(tempBlobName, blobName); ...
void function(T obj, BlobContainer blobContainer, String name) throws IOException { String blobName = blobName(name); String tempBlobName = tempBlobName(name); writeBlob(obj, blobContainer, tempBlobName); try { blobContainer.move(tempBlobName, blobName); } catch (IOException ex) { blobContainer.deleteBlob(tempBlobName)...
/** * Writes blob in atomic manner with resolving the blob name using {@link #blobName} and {@link #tempBlobName} methods. * <p> * The blob will be compressed and checksum will be written if required. * * Atomic move might be very inefficient on some repositories. It also cannot override existi...
Writes blob in atomic manner with resolving the blob name using <code>#blobName</code> and <code>#tempBlobName</code> methods. The blob will be compressed and checksum will be written if required. Atomic move might be very inefficient on some repositories. It also cannot override existing files
writeAtomic
{ "repo_name": "myelin/elasticsearch", "path": "core/src/main/java/org/elasticsearch/repositories/blobstore/ChecksumBlobStoreFormat.java", "license": "apache-2.0", "size": 9840 }
[ "java.io.IOException", "org.elasticsearch.common.blobstore.BlobContainer" ]
import java.io.IOException; import org.elasticsearch.common.blobstore.BlobContainer;
import java.io.*; import org.elasticsearch.common.blobstore.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
2,904,188
public static List<FeatureGroup> getFeatureGroupsList( ) { return _dao.selectFeatureGroupsList( ); }
static List<FeatureGroup> function( ) { return _dao.selectFeatureGroupsList( ); }
/** * Loads the data of all the feature groups and returns them in form of a collection * * @return the collection which contains the data of all the feature groups */
Loads the data of all the feature groups and returns them in form of a collection
getFeatureGroupsList
{ "repo_name": "lutece-platform/lutece-core", "path": "src/java/fr/paris/lutece/portal/business/right/FeatureGroupHome.java", "license": "bsd-3-clause", "size": 7910 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,400,868
PagedIterable<ComputePolicy> listByAccount(String resourceGroupName, String accountName);
PagedIterable<ComputePolicy> listByAccount(String resourceGroupName, String accountName);
/** * Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account * supports, at most, 50 policies. * * @param resourceGroupName The name of the Azure resource group. * @param accountName The name of the Data Lake Analytics account. * @throws...
Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies
listByAccount
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/src/main/java/com/azure/resourcemanager/datalakeanalytics/models/ComputePolicies.java", "license": "mit", "size": 7789 }
[ "com.azure.core.http.rest.PagedIterable" ]
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
1,651,756
public final void setInputExtras(final int xmlResId) throws XmlPullParserException, IOException { getView().setInputExtras(xmlResId); }
final void function(final int xmlResId) throws XmlPullParserException, IOException { getView().setInputExtras(xmlResId); }
/** * Set the extra input data of the text, which is the {@link EditorInfo#extras * TextBoxAttribute.extras} Bundle that will be filled in when creating an input connection. The * given integer is the resource ID of an XML resource holding an android.R.styleable#InputExtras * &lt;input-extras&gt; XM...
Set the extra input data of the text, which is the <code>EditorInfo#extras TextBoxAttribute.extras</code> Bundle that will be filled in when creating an input connection. The given integer is the resource ID of an XML resource holding an android.R.styleable#InputExtras &lt;input-extras&gt; XML tree
setInputExtras
{ "repo_name": "michael-rapp/AndroidMaterialValidation", "path": "library/src/main/java/de/mrapp/android/validation/EditText.java", "license": "apache-2.0", "size": 89149 }
[ "java.io.IOException", "org.xmlpull.v1.XmlPullParserException" ]
import java.io.IOException; import org.xmlpull.v1.XmlPullParserException;
import java.io.*; import org.xmlpull.v1.*;
[ "java.io", "org.xmlpull.v1" ]
java.io; org.xmlpull.v1;
2,803,959
public FeedbackResponseAttributes updateFeedbackResponse(FeedbackResponseAttributes.UpdateOptions updateOptions) throws EntityDoesNotExistException, InvalidParametersException, EntityAlreadyExistsException { Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, updateOptions); ...
FeedbackResponseAttributes function(FeedbackResponseAttributes.UpdateOptions updateOptions) throws EntityDoesNotExistException, InvalidParametersException, EntityAlreadyExistsException { Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, updateOptions); FeedbackResponse oldResponse = getFeedbackResponseEnti...
/** * Updates a feedback response with {@link FeedbackResponseAttributes.UpdateOptions}. * * <p>If the giver/recipient field is changed, the response is updated by recreating the response * as question-giver-recipient is the primary key. * * @return updated feedback response * @throws...
Updates a feedback response with <code>FeedbackResponseAttributes.UpdateOptions</code>. If the giver/recipient field is changed, the response is updated by recreating the response as question-giver-recipient is the primary key
updateFeedbackResponse
{ "repo_name": "xpdavid/teammates", "path": "src/main/java/teammates/storage/api/FeedbackResponsesDb.java", "license": "gpl-2.0", "size": 17753 }
[ "com.googlecode.objectify.Key" ]
import com.googlecode.objectify.Key;
import com.googlecode.objectify.*;
[ "com.googlecode.objectify" ]
com.googlecode.objectify;
206,273
public Object preemptDisplay(Displayable d, boolean waitForDisplay) throws InterruptedException;
Object function(Displayable d, boolean waitForDisplay) throws InterruptedException;
/** * Preempt the current displayable with * the given displayable until donePreempting is called. * * @param d displayable to show the user * @param waitForDisplay if true this method will wait if the * screen is being preempted by another thread. * * @return an preempt t...
Preempt the current displayable with the given displayable until donePreempting is called
preemptDisplay
{ "repo_name": "tommythorn/yari", "path": "shared/cacao-related/phoneme_feature/midp/src/highlevelui/lcdui/reference/classes/com/sun/midp/lcdui/DisplayEventHandler.java", "license": "gpl-2.0", "size": 3959 }
[ "javax.microedition.lcdui.Displayable" ]
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.*;
[ "javax.microedition" ]
javax.microedition;
304,355
public Response uploadImage(final String url, final String methodType, final Map<String, String> params, final Map<String, String> headerParams, final String fileName, final InputStream inputStream, final String fileParamName) throws Exception;
Response function(final String url, final String methodType, final Map<String, String> params, final Map<String, String> headerParams, final String fileName, final InputStream inputStream, final String fileParamName) throws Exception;
/** * Makes HTTP request to upload image and status. * * @param url * URL to make HTTP request. * @param methodType * Method type can be GET, POST or PUT * @param params * Parameters need to pass in request * @param headerParams * Parameters need to pass ...
Makes HTTP request to upload image and status
uploadImage
{ "repo_name": "gcolin/socialauth-4-glassfish", "path": "src/main/java/org/brickred/socialauth/oauthstrategy/OAuthStrategyBase.java", "license": "apache-2.0", "size": 5344 }
[ "java.io.InputStream", "java.util.Map", "org.brickred.socialauth.util.Response" ]
import java.io.InputStream; import java.util.Map; import org.brickred.socialauth.util.Response;
import java.io.*; import java.util.*; import org.brickred.socialauth.util.*;
[ "java.io", "java.util", "org.brickred.socialauth" ]
java.io; java.util; org.brickred.socialauth;
417,852
void gtk_places_sidebar_set_show_recent(GtkPlacesSidebar sidebar, boolean show_recent);
void gtk_places_sidebar_set_show_recent(GtkPlacesSidebar sidebar, boolean show_recent);
/** * Sets whether the sidebar should show an item for recent files. * The default value for this option is determined by the desktop environment, * but this function can be used to override it on a per-application basis. * * @param sidebar a places sidebar * @param show_recent whether...
Sets whether the sidebar should show an item for recent files. The default value for this option is determined by the desktop environment, but this function can be used to override it on a per-application basis
gtk_places_sidebar_set_show_recent
{ "repo_name": "Ccook/gtk-java-bindings", "path": "src/main/java/com/github/ccook/gtk/library/object/widget/container/bin/scrolledwindow/GtkPlacesSidebarLibrary.java", "license": "apache-2.0", "size": 11211 }
[ "com.github.ccook.gtk.model.object.widget.container.bin.scrolledwindow.GtkPlacesSidebar" ]
import com.github.ccook.gtk.model.object.widget.container.bin.scrolledwindow.GtkPlacesSidebar;
import com.github.ccook.gtk.model.object.widget.container.bin.scrolledwindow.*;
[ "com.github.ccook" ]
com.github.ccook;
1,958,646
VacationDaysLeft vacationDaysLeft = getVacationDaysLeft(account); // it's before April - the left remaining vacation days must be used if (DateUtil.isBeforeApril(nowService.now()) && account.getYear() == nowService.currentYear()) { return vacationDaysLeft.getVacationDays().add(vacat...
VacationDaysLeft vacationDaysLeft = getVacationDaysLeft(account); if (DateUtil.isBeforeApril(nowService.now()) && account.getYear() == nowService.currentYear()) { return vacationDaysLeft.getVacationDays().add(vacationDaysLeft.getRemainingVacationDays()); } else { return vacationDaysLeft.getVacationDays().add(vacationDa...
/** * Calculates the total number of days that are left to be used for applying for leave. * * <p>NOTE: The calculation depends on the current date. If it's before April, the left remaining vacation days are * relevant for calculation and if it's after April, only the not expiring remaining vacation...
Calculates the total number of days that are left to be used for applying for leave. relevant for calculation and if it's after April, only the not expiring remaining vacation days are relevant for calculation
calculateTotalLeftVacationDays
{ "repo_name": "pongo710/urlaubsverwaltung", "path": "src/main/java/org/synyx/urlaubsverwaltung/core/account/service/VacationDaysService.java", "license": "apache-2.0", "size": 5937 }
[ "org.synyx.urlaubsverwaltung.core.account.domain.VacationDaysLeft", "org.synyx.urlaubsverwaltung.core.util.DateUtil" ]
import org.synyx.urlaubsverwaltung.core.account.domain.VacationDaysLeft; import org.synyx.urlaubsverwaltung.core.util.DateUtil;
import org.synyx.urlaubsverwaltung.core.account.domain.*; import org.synyx.urlaubsverwaltung.core.util.*;
[ "org.synyx.urlaubsverwaltung" ]
org.synyx.urlaubsverwaltung;
888,751
public static long dpToPixels(@NonNull final Context context, final long dp) { Condition.INSTANCE.ensureNotNull(context, "The context may not be null"); DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); return Math.round(dp * (displayMetrics.densityDpi / PIXEL_DP_RA...
static long function(@NonNull final Context context, final long dp) { Condition.INSTANCE.ensureNotNull(context, STR); DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); return Math.round(dp * (displayMetrics.densityDpi / PIXEL_DP_RATIO)); }
/** * Converts an {@link Integer} value, which is measured in dp, into a value, which is measured * in pixels. * * @param context * The context, which should be used, as an instance of the class {@link Context}. The * context may not be null * @param dp * ...
Converts an <code>Integer</code> value, which is measured in dp, into a value, which is measured in pixels
dpToPixels
{ "repo_name": "michael-rapp/AndroidUtil", "path": "library/src/main/java/de/mrapp/android/util/DisplayUtil.java", "license": "apache-2.0", "size": 14322 }
[ "android.content.Context", "android.util.DisplayMetrics", "androidx.annotation.NonNull", "de.mrapp.util.Condition" ]
import android.content.Context; import android.util.DisplayMetrics; import androidx.annotation.NonNull; import de.mrapp.util.Condition;
import android.content.*; import android.util.*; import androidx.annotation.*; import de.mrapp.util.*;
[ "android.content", "android.util", "androidx.annotation", "de.mrapp.util" ]
android.content; android.util; androidx.annotation; de.mrapp.util;
958,484
public TranslogRecoveryPerformer getTranslogRecoveryPerformer() { return translogRecoveryPerformer; }
TranslogRecoveryPerformer function() { return translogRecoveryPerformer; }
/** * Returns the {@link org.elasticsearch.index.shard.TranslogRecoveryPerformer} for this engine. This class is used * to apply transaction log operations to the engine. It encapsulates all the logic to transfer the translog entry into * an indexing operation. */
Returns the <code>org.elasticsearch.index.shard.TranslogRecoveryPerformer</code> for this engine. This class is used to apply transaction log operations to the engine. It encapsulates all the logic to transfer the translog entry into an indexing operation
getTranslogRecoveryPerformer
{ "repo_name": "Kakakakakku/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/engine/EngineConfig.java", "license": "apache-2.0", "size": 17719 }
[ "org.elasticsearch.index.shard.TranslogRecoveryPerformer" ]
import org.elasticsearch.index.shard.TranslogRecoveryPerformer;
import org.elasticsearch.index.shard.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
1,582,552
@Override public Map getInterfaceClassesMap(){ return getIBOLookup().getInterfaceClassesMap(); }
Map function(){ return getIBOLookup().getInterfaceClassesMap(); }
/** * Overrided from IBOLookup to hold the same map between IDOLookup and IBOLookup */
Overrided from IBOLookup to hold the same map between IDOLookup and IBOLookup
getInterfaceClassesMap
{ "repo_name": "idega/com.idega.core", "path": "src/java/com/idega/data/IDOLookup.java", "license": "gpl-3.0", "size": 9607 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
668,305
@ApiModelProperty(value = "End date of the report") public LocalDate getEndDate() { return endDate; }
@ApiModelProperty(value = STR) LocalDate function() { return endDate; }
/** * End date of the report * * @return endDate */
End date of the report
getEndDate
{ "repo_name": "XeroAPI/Xero-Java", "path": "src/main/java/com/xero/models/finance/CashflowResponse.java", "license": "mit", "size": 5939 }
[ "io.swagger.annotations.ApiModelProperty", "org.threeten.bp.LocalDate" ]
import io.swagger.annotations.ApiModelProperty; import org.threeten.bp.LocalDate;
import io.swagger.annotations.*; import org.threeten.bp.*;
[ "io.swagger.annotations", "org.threeten.bp" ]
io.swagger.annotations; org.threeten.bp;
2,542,993
@Override public void cloneFields( Cloner cloner, Object original ) { super.cloneFields(cloner, original); this.terrain = cloner.clone(terrain); }
void function( Cloner cloner, Object original ) { super.cloneFields(cloner, original); this.terrain = cloner.clone(terrain); }
/** * Called internally by com.jme3.util.clone.Cloner. Do not call directly. */
Called internally by com.jme3.util.clone.Cloner. Do not call directly
cloneFields
{ "repo_name": "zzuegg/jmonkeyengine", "path": "jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/NormalRecalcControl.java", "license": "bsd-3-clause", "size": 3810 }
[ "com.jme3.util.clone.Cloner" ]
import com.jme3.util.clone.Cloner;
import com.jme3.util.clone.*;
[ "com.jme3.util" ]
com.jme3.util;
289,918
protected void openBitstream(String filename) throws JavaLayerException { try { bitstream = new Bitstream(new BufferedInputStream( new FileInputStream(filename))); } catch(java.io.IOException ex) { throw new JavaLayerException(ex.ge...
void function(String filename) throws JavaLayerException { try { bitstream = new Bitstream(new BufferedInputStream( new FileInputStream(filename))); } catch(java.io.IOException ex) { throw new JavaLayerException(ex.getMessage(), ex); } }
/** * Open a BitStream for the given file. * @param filename The file to be opened. * @throws IOException If the file cannot be opened. */
Open a BitStream for the given file
openBitstream
{ "repo_name": "peterhuerlimann/bluej-java-learning", "path": "Kapitel11/Musikplayer/MusicFilePlayer.java", "license": "gpl-3.0", "size": 11325 }
[ "java.io.BufferedInputStream", "java.io.FileInputStream", "javazoom.jl.decoder.Bitstream", "javazoom.jl.decoder.JavaLayerException" ]
import java.io.BufferedInputStream; import java.io.FileInputStream; import javazoom.jl.decoder.Bitstream; import javazoom.jl.decoder.JavaLayerException;
import java.io.*; import javazoom.jl.decoder.*;
[ "java.io", "javazoom.jl.decoder" ]
java.io; javazoom.jl.decoder;
1,846,897
public boolean train(Mat trainData, int tflag, Mat responses, Mat varIdx, Mat sampleIdx, Mat varType) { boolean retVal = train_3(nativeObj, trainData.nativeObj, tflag, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, varType.nativeObj); return retVal; }
boolean function(Mat trainData, int tflag, Mat responses, Mat varIdx, Mat sampleIdx, Mat varType) { boolean retVal = train_3(nativeObj, trainData.nativeObj, tflag, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, varType.nativeObj); return retVal; }
/** * Trains a boosted tree classifier. * * The train method follows the common template of "CvStatModel.train". The * responses must be categorical, which means that boosted trees cannot be built * for regression, and there should be two classes. * * @param trainData a trainData * @param tflag a tflag * @para...
Trains a boosted tree classifier. The train method follows the common template of "CvStatModel.train". The responses must be categorical, which means that boosted trees cannot be built for regression, and there should be two classes
train
{ "repo_name": "mattrubin/CameraAssist", "path": "external/opencv/src/org/opencv/ml/CvBoost.java", "license": "bsd-3-clause", "size": 21435 }
[ "org.opencv.core.Mat" ]
import org.opencv.core.Mat;
import org.opencv.core.*;
[ "org.opencv.core" ]
org.opencv.core;
2,641,806
public void testRemainderKnuth1() { byte aBytes[] = {-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1}; byte bBytes[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int aSign = 1; int bSign = 1; byte rBytes[] = {1, 2, 3, 4, 5, 6, 7, 7, 18, -89}; BigInteger aNumber = new BigInt...
void function() { byte aBytes[] = {-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1}; byte bBytes[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int aSign = 1; int bSign = 1; byte rBytes[] = {1, 2, 3, 4, 5, 6, 7, 7, 18, -89}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger bNumber = new BigInteger(bSign, bBytes); BigIn...
/** * Tests the step D6 from the Knuth algorithm */
Tests the step D6 from the Knuth algorithm
testRemainderKnuth1
{ "repo_name": "freeVM/freeVM", "path": "enhanced/archive/classlib/java6/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java", "license": "apache-2.0", "size": 25307 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
545,211
public static final void main(String[] args) { String propertiesFilename = null; int initialPort = ORBConstants.DEFAULT_INITIAL_PORT; // Process arguments for (int i=0;i<args.length;i++) { // Look for the filename if (args[i].equals("-InitialServicesFile"...
static final void function(String[] args) { String propertiesFilename = null; int initialPort = ORBConstants.DEFAULT_INITIAL_PORT; for (int i=0;i<args.length;i++) { if (args[i].equals(STR) && i < args.length -1) { propertiesFilename = args[i+1]; } if (args[i].equals(STR) && i < args.length-1) { initialPort = java.lang....
/** * Main startup routine for the bootstrap server. * It first determines the port on which to listen, checks that the * specified file is available, and then creates the resolver * that will be used to service the requests in the * BootstrapServerRequestDispatcher. * @param args the comm...
Main startup routine for the bootstrap server. It first determines the port on which to listen, checks that the specified file is available, and then creates the resolver that will be used to service the requests in the BootstrapServerRequestDispatcher
main
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/com/sun/corba/se/internal/CosNaming/BootstrapServer.java", "license": "apache-2.0", "size": 4094 }
[ "com.sun.corba.se.impl.orbutil.CorbaResourceUtil", "com.sun.corba.se.impl.orbutil.ORBConstants", "java.io.File", "java.util.Properties" ]
import com.sun.corba.se.impl.orbutil.CorbaResourceUtil; import com.sun.corba.se.impl.orbutil.ORBConstants; import java.io.File; import java.util.Properties;
import com.sun.corba.se.impl.orbutil.*; import java.io.*; import java.util.*;
[ "com.sun.corba", "java.io", "java.util" ]
com.sun.corba; java.io; java.util;
1,655,707
ChangeMessageVisibilityBatchResult changeMessageVisibilityBatch( ChangeMessageVisibilityBatchRequest request);
ChangeMessageVisibilityBatchResult changeMessageVisibilityBatch( ChangeMessageVisibilityBatchRequest request);
/** * Performs the <code>ChangeMessageVisibilityBatch</code> action. * * <p> * The following request parameters will be populated from the data of this * <code>Queue</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> ...
Performs the <code>ChangeMessageVisibilityBatch</code> action. The following request parameters will be populated from the data of this <code>Queue</code> resource, and any conflicting parameter value set in the request will be overridden: <code>QueueUrl</code> - mapped from the <code>Url</code> identifier.
changeMessageVisibilityBatch
{ "repo_name": "smartpcr/aws-sdk-java-resources", "path": "aws-resources-sqs/src/main/java/com/amazonaws/resources/sqs/Queue.java", "license": "apache-2.0", "size": 24210 }
[ "com.amazonaws.services.sqs.model.ChangeMessageVisibilityBatchRequest", "com.amazonaws.services.sqs.model.ChangeMessageVisibilityBatchResult" ]
import com.amazonaws.services.sqs.model.ChangeMessageVisibilityBatchRequest; import com.amazonaws.services.sqs.model.ChangeMessageVisibilityBatchResult;
import com.amazonaws.services.sqs.model.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
1,784,243
public final Property<ZonedDateTimeBean> settlementDate() { return metaBean().settlementDate().createProperty(this); }
final Property<ZonedDateTimeBean> function() { return metaBean().settlementDate().createProperty(this); }
/** * Gets the the {@code settlementDate} property. * @return the property, not null */
Gets the the settlementDate property
settlementDate
{ "repo_name": "McLeodMoores/starling", "path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/option/SwaptionSecurityBean.java", "license": "apache-2.0", "size": 18205 }
[ "com.opengamma.masterdb.security.hibernate.ZonedDateTimeBean", "org.joda.beans.Property" ]
import com.opengamma.masterdb.security.hibernate.ZonedDateTimeBean; import org.joda.beans.Property;
import com.opengamma.masterdb.security.hibernate.*; import org.joda.beans.*;
[ "com.opengamma.masterdb", "org.joda.beans" ]
com.opengamma.masterdb; org.joda.beans;
2,325,552
private static boolean doDynamicCloseTasks( ClientVmRecord vm, boolean disconnect, boolean stop ) { Vector tasks = TestConfig.getInstance().getDynamicCloseTasksClone(); TaskScheduler ts = new DynamicConcurrentTaskScheduler( "DynamicCloseTasks", ...
static boolean function( ClientVmRecord vm, boolean disconnect, boolean stop ) { Vector tasks = TestConfig.getInstance().getDynamicCloseTasksClone(); TaskScheduler ts = new DynamicConcurrentTaskScheduler( STR, tasks, null, vm, disconnect ); boolean passed = ts.executeTasks( tab().booleanAt( Prms.haltIfBadResult ), tab(...
/** * Runs closetasks for dynamic stops. */
Runs closetasks for dynamic stops
doDynamicCloseTasks
{ "repo_name": "papicella/snappy-store", "path": "tests/core/src/main/java/hydra/ClientMgr.java", "license": "apache-2.0", "size": 54591 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,915,717
final int getAddress() { if (address == -1) { throw new InconsistencyException("instruction not reached"); } return address; }
final int getAddress() { if (address == -1) { throw new InconsistencyException(STR); } return address; }
/** * Returns the offset in bytes of the instruction from the beginning * of the method code (ie classfile). */
Returns the offset in bytes of the instruction from the beginning of the method code (ie classfile)
getAddress
{ "repo_name": "tud-stg-lang/caesar-compiler", "path": "src/org/caesarj/classfile/Instruction.java", "license": "gpl-2.0", "size": 6399 }
[ "org.caesarj.util.InconsistencyException" ]
import org.caesarj.util.InconsistencyException;
import org.caesarj.util.*;
[ "org.caesarj.util" ]
org.caesarj.util;
935,369
@Test public void testSaveScript() throws Exception { final String jobId = "1"; final String sourceText = "print 'test'"; final Set<String> solutions = new HashSet<String>(); solutions.add("http://vhirl-dev.csiro.au/scm/solutions/1"); final ANVGLUser user = new ANVG...
void function() throws Exception { final String jobId = "1"; final String sourceText = STR; final Set<String> solutions = new HashSet<String>(); solutions.add(STRsuccess")); }
/** * Tests that the saving of script for a given job succeeds. * @throws Exception */
Tests that the saving of script for a given job succeeds
testSaveScript
{ "repo_name": "joshvote/ANVGL-Portal", "path": "src/test/java/org/auscope/portal/server/web/controllers/TestScriptBuilderController.java", "license": "gpl-3.0", "size": 5926 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,404,428
static void appendColumnValue(StringBuffer sb, int type) { switch(type) { case Types.BIGINT: case Types.DECIMAL: case Types.DOUBLE: case Types.FLOAT: case Types.INTEGER: case Types.NUMERIC: case Types.REAL: case Types.SMALLINT: ...
static void appendColumnValue(StringBuffer sb, int type) { switch(type) { case Types.BIGINT: case Types.DECIMAL: case Types.DOUBLE: case Types.FLOAT: case Types.INTEGER: case Types.NUMERIC: case Types.REAL: case Types.SMALLINT: case Types.TINYINT: sb.append("0"); break; case Types.CHAR: case Types.VARCHAR: sb.append(ST...
/** * Append a particular SQL datatype value to the given StringBuffer * * @param sb the StringBuffer to append the value * @param type the java.sql.Types value to append */
Append a particular SQL datatype value to the given StringBuffer
appendColumnValue
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/GrantRevokeTest.java", "license": "agpl-3.0", "size": 66677 }
[ "java.sql.Types" ]
import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,215,148
Set<Permission> getPermissions(ApplicationId appId);
Set<Permission> getPermissions(ApplicationId appId);
/** * Returns the permissions currently granted to the applications. * * @param appId application identifier * @return set of granted permissions */
Returns the permissions currently granted to the applications
getPermissions
{ "repo_name": "sdnwiselab/onos", "path": "core/api/src/main/java/org/onosproject/app/ApplicationService.java", "license": "apache-2.0", "size": 2298 }
[ "java.util.Set", "org.onosproject.core.ApplicationId", "org.onosproject.security.Permission" ]
import java.util.Set; import org.onosproject.core.ApplicationId; import org.onosproject.security.Permission;
import java.util.*; import org.onosproject.core.*; import org.onosproject.security.*;
[ "java.util", "org.onosproject.core", "org.onosproject.security" ]
java.util; org.onosproject.core; org.onosproject.security;
1,386,240
private TopicType topicTypeFactory(TopicTypeModel model) { // 1) store in DB createTopic(model, URI_PREFIX_TOPIC_TYPE); // store generic topic typeStorage.storeType(model); // store type-specific parts // // 2) instantiate TopicType topi...
TopicType function(TopicTypeModel model) { createTopic(model, URI_PREFIX_TOPIC_TYPE); typeStorage.storeType(model); TopicType topicType = new AttachedTopicType(model, this); typeCache.putTopicType(topicType); }
/** * Factory method: creates a new topic type in the DB according to the given model * and returns a topic type instance. */
Factory method: creates a new topic type in the DB according to the given model and returns a topic type instance
topicTypeFactory
{ "repo_name": "ascherer/deepamehta", "path": "modules/dm4-core/src/main/java/de/deepamehta/core/impl/EmbeddedService.java", "license": "gpl-3.0", "size": 37105 }
[ "de.deepamehta.core.TopicType", "de.deepamehta.core.model.TopicTypeModel" ]
import de.deepamehta.core.TopicType; import de.deepamehta.core.model.TopicTypeModel;
import de.deepamehta.core.*; import de.deepamehta.core.model.*;
[ "de.deepamehta.core" ]
de.deepamehta.core;
2,817,858
public InetAddress getNetworkAddress() { return networkAddress; }
InetAddress function() { return networkAddress; }
/** * getter method * * * @return the Network Address part of the subnet */
getter method
getNetworkAddress
{ "repo_name": "lbchen/odl-mod", "path": "opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/Subnet.java", "license": "epl-1.0", "size": 7044 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
229,035
@Test() public void testEqualsIdentity() throws Exception { ASN1Element e = new ASN1Element((byte) 0x04); assertTrue(e.equals(e)); }
@Test() void function() throws Exception { ASN1Element e = new ASN1Element((byte) 0x04); assertTrue(e.equals(e)); }
/** * Tests the {@code equals} method with the same object. * * @throws Exception If an unexpected problem occurs. */
Tests the equals method with the same object
testEqualsIdentity
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/asn1/ASN1ElementTestCase.java", "license": "gpl-2.0", "size": 23932 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
2,545,503
private JPanel createShowAsTabPanel() { createShowAsTabButton(); // create a panel that holds the buttons BorderLayout innerLayout = new BorderLayout(); JPanel innerPanel = new JPanel(innerLayout); innerPanel.add(closeFrameButton, BorderLayout.WEST); innerPanel.add(showAsTabButton, BorderLayout...
JPanel function() { createShowAsTabButton(); BorderLayout innerLayout = new BorderLayout(); JPanel innerPanel = new JPanel(innerLayout); innerPanel.add(closeFrameButton, BorderLayout.WEST); innerPanel.add(showAsTabButton, BorderLayout.EAST); return innerPanel; }
/** * Creates a "show as tab" button and puts in a JPanel. * * @return contains the "show as tab" button. */
Creates a "show as tab" button and puts in a JPanel
createShowAsTabPanel
{ "repo_name": "KEOpenSource/CAExplorer", "path": "cellularAutomata/analysis/Analysis.java", "license": "apache-2.0", "size": 47476 }
[ "java.awt.BorderLayout", "javax.swing.JPanel" ]
import java.awt.BorderLayout; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,264,815
public void updateApplicationRegistration(String state, String keyType, int appId) throws APIManagementException { Connection conn = null; PreparedStatement ps = null; String sqlStmt = SQLConstants.UPDATE_APPLICATION_KEY_MAPPING_SQL; try { conn = APIMgtDBUtil.getConnecti...
void function(String state, String keyType, int appId) throws APIManagementException { Connection conn = null; PreparedStatement ps = null; String sqlStmt = SQLConstants.UPDATE_APPLICATION_KEY_MAPPING_SQL; try { conn = APIMgtDBUtil.getConnection(); conn.setAutoCommit(false); ps = conn.prepareStatement(sqlStmt); ps.setS...
/** * Updates the state of the Application Registration. * * @param state State of the registration. * @param keyType PRODUCTION | SANDBOX * @param appId ID of the Application. * @throws APIManagementException if updating fails. */
Updates the state of the Application Registration
updateApplicationRegistration
{ "repo_name": "charithag/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java", "license": "apache-2.0", "size": 345861 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants", "org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants; import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil;
import java.sql.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.sql", "org.wso2.carbon" ]
java.sql; org.wso2.carbon;
2,010,624
public static Point getPhysicalDisplaySize(Context context) { WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); return getPhysicalDisplaySize(context, windowManager.getDefaultDisplay()); }
static Point function(Context context) { WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); return getPhysicalDisplaySize(context, windowManager.getDefaultDisplay()); }
/** * Gets the physical size of the default display, in pixels. * * @param context Any context. * @return The physical display size, in pixels. */
Gets the physical size of the default display, in pixels
getPhysicalDisplaySize
{ "repo_name": "michalliu/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/util/Util.java", "license": "apache-2.0", "size": 45263 }
[ "android.content.Context", "android.graphics.Point", "android.view.WindowManager" ]
import android.content.Context; import android.graphics.Point; import android.view.WindowManager;
import android.content.*; import android.graphics.*; import android.view.*;
[ "android.content", "android.graphics", "android.view" ]
android.content; android.graphics; android.view;
1,222,490
public List<CallAdapter.Factory> callAdapterFactories() { return adapterFactories; }
List<CallAdapter.Factory> function() { return adapterFactories; }
/** * Returns a list of the factories tried when creating a * {@linkplain #callAdapter(Type, Annotation[])} call adapter}. */
Returns a list of the factories tried when creating a #callAdapter(Type, Annotation[]) call adapter}
callAdapterFactories
{ "repo_name": "octaware/super-volley", "path": "super-volley-library/src/main/java/com/android/supervolley/SuperVolley.java", "license": "apache-2.0", "size": 31328 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,203,076
public M getModel(SectionInfo context) { return context.<M>getModelForId(id); }
M function(SectionInfo context) { return context.<M>getModelForId(id); }
/** * Return this {@code Section}'s model. * * @see SectionInfo#getModelForId(String) * @param info The current info * @return The model */
Return this Section's model
getModel
{ "repo_name": "equella/Equella", "path": "Platform/Plugins/com.tle.web.sections/src/com/tle/web/sections/generic/AbstractPrototypeSection.java", "license": "apache-2.0", "size": 3641 }
[ "com.tle.web.sections.SectionInfo" ]
import com.tle.web.sections.SectionInfo;
import com.tle.web.sections.*;
[ "com.tle.web" ]
com.tle.web;
221,620
public static Blog setCurrentBlogToLastActive() { List<Map<String, Object>> accounts = WordPress.wpDB.getVisibleBlogs(); int lastBlogId = WordPress.wpDB.getLastBlogId(); if (lastBlogId != -1) { for (Map<String, Object> account : accounts) { int id = Integer.value...
static Blog function() { List<Map<String, Object>> accounts = WordPress.wpDB.getVisibleBlogs(); int lastBlogId = WordPress.wpDB.getLastBlogId(); if (lastBlogId != -1) { for (Map<String, Object> account : accounts) { int id = Integer.valueOf(account.get("id").toString()); if (id == lastBlogId) { setCurrentBlog(id); retu...
/** * Set the last active blog as the current blog. * * @return the current blog */
Set the last active blog as the current blog
setCurrentBlogToLastActive
{ "repo_name": "wangkang0627/WordPress-Android", "path": "WordPress/src/main/java/org/wordpress/android/WordPress.java", "license": "gpl-2.0", "size": 30500 }
[ "java.util.List", "java.util.Map", "org.wordpress.android.models.Blog" ]
import java.util.List; import java.util.Map; import org.wordpress.android.models.Blog;
import java.util.*; import org.wordpress.android.models.*;
[ "java.util", "org.wordpress.android" ]
java.util; org.wordpress.android;
388,157
private void setupActionBar() { ActionBar actionBar = getSupportActionBar(); actionBar.setTitle(R.string.menu_highscore); if (actionBar != null) { // Show the Up button in the action bar. actionBar.setDisplayHomeAsUpEnabled(true); } } /** * {@i...
void function() { ActionBar actionBar = getSupportActionBar(); actionBar.setTitle(R.string.menu_highscore); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); } } /** * {@inheritDoc}
/** * Set up the {@link android.app.ActionBar}, if the API is available. */
Set up the <code>android.app.ActionBar</code>, if the API is available
setupActionBar
{ "repo_name": "SecUSo/privacy-friendly-memo-game", "path": "app/src/main/java/org/secuso/privacyfriendlymemory/ui/navigation/HighscoreActivity.java", "license": "gpl-3.0", "size": 7577 }
[ "android.support.v7.app.ActionBar" ]
import android.support.v7.app.ActionBar;
import android.support.v7.app.*;
[ "android.support" ]
android.support;
2,380,951
@Override public Collection<Resource> components() { return UnmodifiableArrayList.wrap(components); }
Collection<Resource> function() { return UnmodifiableArrayList.wrap(components); }
/** * Returns the resources for each Landsat band of this group. */
Returns the resources for each Landsat band of this group
components
{ "repo_name": "apache/sis", "path": "storage/sis-earth-observation/src/main/java/org/apache/sis/storage/landsat/BandGroup.java", "license": "apache-2.0", "size": 4651 }
[ "java.util.Collection", "org.apache.sis.internal.util.UnmodifiableArrayList", "org.apache.sis.storage.Resource" ]
import java.util.Collection; import org.apache.sis.internal.util.UnmodifiableArrayList; import org.apache.sis.storage.Resource;
import java.util.*; import org.apache.sis.internal.util.*; import org.apache.sis.storage.*;
[ "java.util", "org.apache.sis" ]
java.util; org.apache.sis;
2,374,864
@Nonnull SearchResult filter(@Nonnull String entityName, @Nullable Filter filters, @Nullable SortCriterion sortCriterion, int from, int size);
SearchResult filter(@Nonnull String entityName, @Nullable Filter filters, @Nullable SortCriterion sortCriterion, int from, int size);
/** * Gets a list of documents after applying the input filters. * * @param entityName name of the entity * @param filters the request map with fields and values to be applied as filters to the search query * @param sortCriterion {@link SortCriterion} to be applied to search results * @param from inde...
Gets a list of documents after applying the input filters
filter
{ "repo_name": "linkedin/WhereHows", "path": "metadata-io/src/main/java/com/linkedin/metadata/search/EntitySearchService.java", "license": "apache-2.0", "size": 4878 }
[ "com.linkedin.metadata.query.filter.Filter", "com.linkedin.metadata.query.filter.SortCriterion", "javax.annotation.Nonnull", "javax.annotation.Nullable" ]
import com.linkedin.metadata.query.filter.Filter; import com.linkedin.metadata.query.filter.SortCriterion; import javax.annotation.Nonnull; import javax.annotation.Nullable;
import com.linkedin.metadata.query.filter.*; import javax.annotation.*;
[ "com.linkedin.metadata", "javax.annotation" ]
com.linkedin.metadata; javax.annotation;
1,382,019
public SearchSourceBuilder postFilter(byte[] postFilterBinary, int postFilterBinaryOffset, int postFilterBinaryLength) { return postFilter(new BytesArray(postFilterBinary, postFilterBinaryOffset, postFilterBinaryLength)); }
SearchSourceBuilder function(byte[] postFilterBinary, int postFilterBinaryOffset, int postFilterBinaryLength) { return postFilter(new BytesArray(postFilterBinary, postFilterBinaryOffset, postFilterBinaryLength)); }
/** * Sets a filter on the query executed that only applies to the search query * (and not aggs for example). */
Sets a filter on the query executed that only applies to the search query (and not aggs for example)
postFilter
{ "repo_name": "0359xiaodong/elasticsearch", "path": "src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java", "license": "apache-2.0", "size": 29314 }
[ "org.elasticsearch.common.bytes.BytesArray" ]
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,324,744
@Override public int doRead(ByteChunk chunk, Request req) throws IOException { if (lastActiveFilter == -1) return inputStreamInputBuffer.doRead(chunk, req); else return activeFilters[lastActiveFilter].doRead(chunk,req); } // ---------------------------...
int function(ByteChunk chunk, Request req) throws IOException { if (lastActiveFilter == -1) return inputStreamInputBuffer.doRead(chunk, req); else return activeFilters[lastActiveFilter].doRead(chunk,req); }
/** * Read some bytes. */
Read some bytes
doRead
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.0/InternalAprInputBuffer.java", "license": "mit", "size": 19779 }
[ "java.io.IOException", "org.apache.coyote.Request", "org.apache.tomcat.util.buf.ByteChunk" ]
import java.io.IOException; import org.apache.coyote.Request; import org.apache.tomcat.util.buf.ByteChunk;
import java.io.*; import org.apache.coyote.*; import org.apache.tomcat.util.buf.*;
[ "java.io", "org.apache.coyote", "org.apache.tomcat" ]
java.io; org.apache.coyote; org.apache.tomcat;
1,580,326
void showStatus(@Nonnull String status);
void showStatus(@Nonnull String status);
/** * Displays the given status message. * * @param status the status to display. */
Displays the given status message
showStatus
{ "repo_name": "google/fest", "path": "third_party/fest-swing/src/main/java/org/fest/swing/applet/StatusDisplay.java", "license": "apache-2.0", "size": 963 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,420,463
public void testDescendingKeySet() { ConcurrentNavigableMap map = dmap5(); Set s = map.keySet(); assertEquals(5, s.size()); assertTrue(s.contains(m1)); assertTrue(s.contains(m2)); assertTrue(s.contains(m3)); assertTrue(s.contains(m4)); assertTrue(s.con...
void function() { ConcurrentNavigableMap map = dmap5(); Set s = map.keySet(); assertEquals(5, s.size()); assertTrue(s.contains(m1)); assertTrue(s.contains(m2)); assertTrue(s.contains(m3)); assertTrue(s.contains(m4)); assertTrue(s.contains(m5)); }
/** * keySet returns a Set containing all the keys */
keySet returns a Set containing all the keys
testDescendingKeySet
{ "repo_name": "life-beam/j2objc", "path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/ConcurrentSkipListSubMapTest.java", "license": "apache-2.0", "size": 42529 }
[ "java.util.Set", "java.util.concurrent.ConcurrentNavigableMap" ]
import java.util.Set; import java.util.concurrent.ConcurrentNavigableMap;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
150,710
public static TextBlock createTextBlock(String text, Font font, Paint paint, float maxWidth, int maxLines, TextMeasurer measurer) { TextBlock result = new TextBlock(); BreakIterator iterator = BreakIterator.getLineInstance(); iterator.setText(text); int current =...
static TextBlock function(String text, Font font, Paint paint, float maxWidth, int maxLines, TextMeasurer measurer) { TextBlock result = new TextBlock(); BreakIterator iterator = BreakIterator.getLineInstance(); iterator.setText(text); int current = 0; int lines = 0; int length = text.length(); while (current < length ...
/** * Creates a new text block from the given string, breaking the * text into lines so that the <code>maxWidth</code> value is * respected. * * @param text the text. * @param font the font. * @param paint the paint. * @param maxWidth the maximum width for each line. * ...
Creates a new text block from the given string, breaking the text into lines so that the <code>maxWidth</code> value is respected
createTextBlock
{ "repo_name": "SpoonLabs/astor", "path": "examples/chart_11/source/org/jfree/chart/text/TextUtilities.java", "license": "gpl-2.0", "size": 29943 }
[ "java.awt.Font", "java.awt.Paint", "java.text.BreakIterator" ]
import java.awt.Font; import java.awt.Paint; import java.text.BreakIterator;
import java.awt.*; import java.text.*;
[ "java.awt", "java.text" ]
java.awt; java.text;
2,894,587
@Test public void testGetters() { final TcpServerArguments arguments = new TcpServerArguments(startTcp, allowOthers, useDaemonThread, port, useSsl, shutdownUrl, shutdownPassword, forceShutdown); assertEquals(startTcp, arguments.getStartTcp()); assertEquals(of(allowOthers), arguments.getAllowOthers()); a...
void function() { final TcpServerArguments arguments = new TcpServerArguments(startTcp, allowOthers, useDaemonThread, port, useSsl, shutdownUrl, shutdownPassword, forceShutdown); assertEquals(startTcp, arguments.getStartTcp()); assertEquals(of(allowOthers), arguments.getAllowOthers()); assertEquals(of(useDaemonThread),...
/** * Tests the getter methods. */
Tests the getter methods
testGetters
{ "repo_name": "avojak/hydrogen", "path": "com.avojak.plugin.hydrogen.test/src/main/java/com/avojak/plugin/hydrogen/test/h2/model/arguments/TcpServerArgumentsTest.java", "license": "epl-1.0", "size": 8067 }
[ "com.avojak.plugin.hydrogen.core.h2.model.arguments.TcpServerArguments", "org.junit.Assert" ]
import com.avojak.plugin.hydrogen.core.h2.model.arguments.TcpServerArguments; import org.junit.Assert;
import com.avojak.plugin.hydrogen.core.h2.model.arguments.*; import org.junit.*;
[ "com.avojak.plugin", "org.junit" ]
com.avojak.plugin; org.junit;
2,878,573
private boolean addViewItem(int index, boolean first) { View view = getItemView(index); if (view != null) { if (first) { itemsLayout.addView(view, 0); } else { itemsLayout.addView(view); } return true; } return false; }
boolean function(int index, boolean first) { View view = getItemView(index); if (view != null) { if (first) { itemsLayout.addView(view, 0); } else { itemsLayout.addView(view); } return true; } return false; }
/** * Adds view for item to items layout * @param index the item index * @param first the flag indicates if view should be first * @return true if corresponding item exists and is added */
Adds view for item to items layout
addViewItem
{ "repo_name": "Dmanliang/CaiKePlan", "path": "app/src/main/java/com/example/caikeplan/logic/wheelview/WheelView.java", "license": "apache-2.0", "size": 23311 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,094,176
public static FQDN fromPerAligned(byte[] encodedBytes) { FQDN result = new FQDN(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static FQDN function(byte[] encodedBytes) { FQDN result = new FQDN(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new FQDN from encoded stream. */
Creates a new FQDN from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/ulp_components/FQDN.java", "license": "apache-2.0", "size": 2834 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
935,913
public void exit(KeyBase node) { exit((AnnotatedBase)node); }
void function(KeyBase node) { exit((AnnotatedBase)node); }
/** * Exit identity constraint element. * * @param node element being exited */
Exit identity constraint element
exit
{ "repo_name": "vkorbut/jibx", "path": "jibx/build/src/org/jibx/schema/SchemaVisitor.java", "license": "bsd-3-clause", "size": 28814 }
[ "org.jibx.schema.elements.AnnotatedBase", "org.jibx.schema.elements.KeyBase" ]
import org.jibx.schema.elements.AnnotatedBase; import org.jibx.schema.elements.KeyBase;
import org.jibx.schema.elements.*;
[ "org.jibx.schema" ]
org.jibx.schema;
2,826,026
public Map<String, Type> getKeywordParameters(Type onType) { if (!onType.isConstructor() && !onType.isAbstractData()) { return Collections.<String,Type>emptyMap(); } synchronized(fkeywordParameters) { synchronized (fImports) { Map<String, Type> result = new HashMap<>(); Map<String,...
Map<String, Type> function(Type onType) { if (!onType.isConstructor() && !onType.isAbstractData()) { return Collections.<String,Type>emptyMap(); } synchronized(fkeywordParameters) { synchronized (fImports) { Map<String, Type> result = new HashMap<>(); Map<String, Type> local = fkeywordParameters.get(onType); if (local ...
/** * Locates all declared keyword parameters for a constructor. * * @param onType * @return a map of all keyword parameters declared for the onType constructor */
Locates all declared keyword parameters for a constructor
getKeywordParameters
{ "repo_name": "msteindorfer/oopsla15-artifact", "path": "pdb.values/src/org/eclipse/imp/pdb/facts/type/TypeStore.java", "license": "epl-1.0", "size": 26178 }
[ "java.util.Collections", "java.util.HashMap", "java.util.Map" ]
import java.util.Collections; import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,878,061
public void appendToSubject(String text) { Objects.requireNonNull(text); String subj = mailer.getSubject(); mailer.setSubject(subj == null ? text : subj + text); }
void function(String text) { Objects.requireNonNull(text); String subj = mailer.getSubject(); mailer.setSubject(subj == null ? text : subj + text); }
/** * Appends the specified text to the email subject line. * @param text text to append */
Appends the specified text to the email subject line
appendToSubject
{ "repo_name": "gforghetti/jenkins-tomcat-wildbook", "path": "src/main/java/org/ecocean/NotificationMailer.java", "license": "gpl-2.0", "size": 30134 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,087,989
protected void appendRecord(Record xml, OpenmrsObject entity, Item parent, String property, String classname, String data) throws Exception { // if (data != null && data.length() > 0) { /...
void function(Record xml, OpenmrsObject entity, Item parent, String property, String classname, String data) throws Exception { if (data != null) { Item item = xml.createItem(parent, property); item.setAttribute("type", classname); data = transformItemForSyncRecord(item, entity, property, data); xml.createText(item, da...
/** * Adds a property value to the existing serialization record as a string. * <p> * If data is null it will be skipped, no empty serialization items are written. In case of xml * serialization, the data will be serialized as: &lt;property * type='classname'&gt;data&lt;/property&gt; * * @param xml...
Adds a property value to the existing serialization record as a string. If data is null it will be skipped, no empty serialization items are written. In case of xml serialization, the data will be serialized as: &lt;property type='classname'&gt;data&lt;/property&gt
appendRecord
{ "repo_name": "viniciusboson/buendia", "path": "third_party/openmrs-module-sync/api/src/main/java/org/openmrs/module/sync/api/db/hibernate/HibernateSyncInterceptor.java", "license": "apache-2.0", "size": 62117 }
[ "org.openmrs.Obs", "org.openmrs.OpenmrsObject", "org.openmrs.PersonAttribute", "org.openmrs.module.sync.SyncRecord", "org.openmrs.module.sync.serialization.Item", "org.openmrs.module.sync.serialization.Record" ]
import org.openmrs.Obs; import org.openmrs.OpenmrsObject; import org.openmrs.PersonAttribute; import org.openmrs.module.sync.SyncRecord; import org.openmrs.module.sync.serialization.Item; import org.openmrs.module.sync.serialization.Record;
import org.openmrs.*; import org.openmrs.module.sync.*; import org.openmrs.module.sync.serialization.*;
[ "org.openmrs", "org.openmrs.module" ]
org.openmrs; org.openmrs.module;
1,174,844
public static boolean hasUniqueObject(Collection<?> collection) { if (isEmpty(collection)) { return false; } boolean hasCandidate = false; Object candidate = null; for (Object elem : collection) { if (!hasCandidate) { hasCandidate = true; candidate = elem; } else if (candidate != elem) ...
static boolean function(Collection<?> collection) { if (isEmpty(collection)) { return false; } boolean hasCandidate = false; Object candidate = null; for (Object elem : collection) { if (!hasCandidate) { hasCandidate = true; candidate = elem; } else if (candidate != elem) { return false; } } return true; }
/** * Determine whether the given Collection only contains a single unique object. * @param collection the Collection to check * @return {@code true} if the collection contains a single reference or * multiple references to the same instance, {@code false} else */
Determine whether the given Collection only contains a single unique object
hasUniqueObject
{ "repo_name": "Arabidopsis-Information-Portal/intermine", "path": "bio/sources/araport/araport-chado-db/main/src/org/intermine/bio/dataloader/util/CollectionUtils.java", "license": "lgpl-2.1", "size": 14108 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,168,896
List<Attribute> setWritableTrue(PerunSession sess, List<Attribute> attributes) throws InternalErrorException;
List<Attribute> setWritableTrue(PerunSession sess, List<Attribute> attributes) throws InternalErrorException;
/** * Set all Attributes in list to "writable = true". * * @param sess * @param attributes * @return list of attributes * @throws InternalErrorException */
Set all Attributes in list to "writable = true"
setWritableTrue
{ "repo_name": "jirmauritz/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java", "license": "bsd-2-clause", "size": 193360 }
[ "cz.metacentrum.perun.core.api.Attribute", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "java.util.List" ]
import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,296,705
public static String timeMasterDataForTimeZnodeToString(byte[] data) { return new String(data, Charset.forName("UTF-8")); }
static String function(byte[] data) { return new String(data, Charset.forName("UTF-8")); }
/** * Method to encode data for TM's keep alive znode as String. * @param data byte array containing data to be encoded as String. * @return String representing data. */
Method to encode data for TM's keep alive znode as String
timeMasterDataForTimeZnodeToString
{ "repo_name": "jsoft88/DistributedProcessWatcher", "path": "src/org/jc/zk/util/Utils.java", "license": "mit", "size": 21392 }
[ "java.nio.charset.Charset" ]
import java.nio.charset.Charset;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,117,367
public void loadFromXML(File dataSource, String recordPath, DataSet<RecordType, SchemaElementType> dataset) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException { // initialise the dataset initialiseDataset(dataset); // create objects for reading t...
void function(File dataSource, String recordPath, DataSet<RecordType, SchemaElementType> dataset) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException { initialiseDataset(dataset); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder; builder...
/** * Loads a data set from an XML file * * @param dataSource * the XML file containing the data * @param recordPath * the XPath to the XML nodes representing the entries * @param dataset * the dataset to fill * @throws ParserConfigurationException * @throws IOE...
Loads a data set from an XML file
loadFromXML
{ "repo_name": "olehmberg/winter", "path": "winter-framework/src/main/java/de/uni_mannheim/informatik/dws/winter/model/io/XMLMatchableReader.java", "license": "apache-2.0", "size": 8307 }
[ "de.uni_mannheim.informatik.dws.winter.model.DataSet", "java.io.File", "java.io.IOException", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "javax.xml.parsers.ParserConfigurationException", "javax.xml.xpath.XPath", "javax.xml.xpath.XPathConstants", "javax.xml.xpath...
import de.uni_mannheim.informatik.dws.winter.model.DataSet; import java.io.File; import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstan...
import de.uni_mannheim.informatik.dws.winter.model.*; import java.io.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "de.uni_mannheim.informatik", "java.io", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
de.uni_mannheim.informatik; java.io; javax.xml; org.w3c.dom; org.xml.sax;
832,039
private void handleDSCAlarmEvent(DSCAlarmItemType dscAlarmItemType, DSCAlarmEvent dscAlarmEvent, APIMessage apiMessage) { logger.debug("handleDSCAlarmEvent(): Event received! Looking for item: {}", dscAlarmItemType); DSCAlarmBindingConfig config = null; APIMessage.APIMessageType apiMessageT...
void function(DSCAlarmItemType dscAlarmItemType, DSCAlarmEvent dscAlarmEvent, APIMessage apiMessage) { logger.debug(STR, dscAlarmItemType); DSCAlarmBindingConfig config = null; APIMessage.APIMessageType apiMessageType = apiMessage.getAPIMessageType(); Item item = null; String itemName = STR"); pollTimeStart = 0; return...
/** * Handle incoming DSC Alarm events * * @param dscAlarmItemType * @param dscAlarmEvent * @param apiMessage */
Handle incoming DSC Alarm events
handleDSCAlarmEvent
{ "repo_name": "TheNetStriker/openhab", "path": "bundles/binding/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm1/internal/DSCAlarmActiveBinding.java", "license": "epl-1.0", "size": 49190 }
[ "org.openhab.binding.dscalarm1.DSCAlarmBindingConfig", "org.openhab.binding.dscalarm1.internal.protocol.APIMessage", "org.openhab.core.items.Item" ]
import org.openhab.binding.dscalarm1.DSCAlarmBindingConfig; import org.openhab.binding.dscalarm1.internal.protocol.APIMessage; import org.openhab.core.items.Item;
import org.openhab.binding.dscalarm1.*; import org.openhab.binding.dscalarm1.internal.protocol.*; import org.openhab.core.items.*;
[ "org.openhab.binding", "org.openhab.core" ]
org.openhab.binding; org.openhab.core;
860,720
public TestResponse withStringBody(String body) { if (StringUtils.isNotBlank(body)) { this.body = BodyPublishers.ofString(body); } return this; }
TestResponse function(String body) { if (StringUtils.isNotBlank(body)) { this.body = BodyPublishers.ofString(body); } return this; }
/** * Sets a String body to the request * * @param body The request body to use * * @return TestResponse instance */
Sets a String body to the request
withStringBody
{ "repo_name": "svenkubiak/mangooio", "path": "mangooio-test/src/main/java/io/mangoo/test/http/TestResponse.java", "license": "apache-2.0", "size": 9917 }
[ "java.net.http.HttpRequest", "org.apache.commons.lang3.StringUtils" ]
import java.net.http.HttpRequest; import org.apache.commons.lang3.StringUtils;
import java.net.http.*; import org.apache.commons.lang3.*;
[ "java.net", "org.apache.commons" ]
java.net; org.apache.commons;
685,602
public Date getDateChanged() { return null; }
Date function() { return null; }
/** * Not currently used. Always returns null. * * @see org.openmrs.Auditable#getDateChanged() */
Not currently used. Always returns null
getDateChanged
{ "repo_name": "Bhamni/openmrs-core", "path": "api/src/main/java/org/openmrs/ConceptAnswer.java", "license": "mpl-2.0", "size": 5527 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
482,995
@TestTemplate public void testChunking() throws Exception { mockWebServer.enqueue(new MockResponse()); final int chunkSize = 1024 * 8; final int chunks = 50 * 4; CloudantClient client = CloudantClientHelper.newMockWebServerClientBuilder(mockWebServer) .build(); ...
void function() throws Exception { mockWebServer.enqueue(new MockResponse()); final int chunkSize = 1024 * 8; final int chunks = 50 * 4; CloudantClient client = CloudantClientHelper.newMockWebServerClientBuilder(mockWebServer) .build(); String response = client.executeRequest(Http.POST(mockWebServer.url("/").url(), STR...
/** * Test that chunking is used when input stream length is not known. * * @throws Exception */
Test that chunking is used when input stream length is not known
testChunking
{ "repo_name": "cloudant/java-cloudant", "path": "cloudant-client/src/test/java/com/cloudant/tests/HttpTest.java", "license": "apache-2.0", "size": 56294 }
[ "com.cloudant.client.api.CloudantClient", "com.cloudant.http.Http", "com.cloudant.http.HttpConnection", "com.cloudant.tests.util.MockWebServerResources", "org.junit.jupiter.api.Assertions" ]
import com.cloudant.client.api.CloudantClient; import com.cloudant.http.Http; import com.cloudant.http.HttpConnection; import com.cloudant.tests.util.MockWebServerResources; import org.junit.jupiter.api.Assertions;
import com.cloudant.client.api.*; import com.cloudant.http.*; import com.cloudant.tests.util.*; import org.junit.jupiter.api.*;
[ "com.cloudant.client", "com.cloudant.http", "com.cloudant.tests", "org.junit.jupiter" ]
com.cloudant.client; com.cloudant.http; com.cloudant.tests; org.junit.jupiter;
657,171
public Legend getLegend() { return mLegend; }
Legend function() { return mLegend; }
/** * Returns the Legend object of the chart. This method can be used to get an * instance of the legend in order to customize the automatically generated * Legend. * * @return */
Returns the Legend object of the chart. This method can be used to get an instance of the legend in order to customize the automatically generated Legend
getLegend
{ "repo_name": "Zhangbaowen13/greenhouse", "path": "MPChartLib/src/com/github/mikephil/charting/charts/Chart.java", "license": "apache-2.0", "size": 52532 }
[ "com.github.mikephil.charting.components.Legend" ]
import com.github.mikephil.charting.components.Legend;
import com.github.mikephil.charting.components.*;
[ "com.github.mikephil" ]
com.github.mikephil;
590,981
public boolean processReplaceProtocolNotificationTemplateRules(ProtocolNotificationTemplate notificationTemplate, int idx) throws IOException { boolean valid = true; valid &= validFile(notificationTemplate.getTemplateFile(), "notificationTemplates[" + idx + "]"); return valid; ...
boolean function(ProtocolNotificationTemplate notificationTemplate, int idx) throws IOException { boolean valid = true; valid &= validFile(notificationTemplate.getTemplateFile(), STR + idx + "]"); return valid; }
/** * * This method verifies the protocol notification template on replace. * * @param correspondenceType * @param newNotificationTemplate * @param index * @return true if the validation is successful, false otherwise * @throws IOException */
This method verifies the protocol notification template on replace
processReplaceProtocolNotificationTemplateRules
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/irb/actions/notification/ProtocolNotificationTemplateRule.java", "license": "apache-2.0", "size": 2932 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,718,801
protected View initialize(final View view) { return updater.initialize(view, children); }
View function(final View view) { return updater.initialize(view, children); }
/** * Initialize view * * @param view * @return view */
Initialize view
initialize
{ "repo_name": "soarcn/COCO-Accessory", "path": "adapter/src/main/java/com/cocosw/adapter/SingleTypeCursorAdapter.java", "license": "apache-2.0", "size": 4593 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,203,297
@VisibleForTesting public static void overrideAccountManagerHelperForTests( Context context, AccountManagerDelegate delegate) { synchronized (sLock) { sAccountManagerHelper = new AccountManagerHelper(context, delegate); } }
static void function( Context context, AccountManagerDelegate delegate) { synchronized (sLock) { sAccountManagerHelper = new AccountManagerHelper(context, delegate); } }
/** * Override AccountManagerHelper with a custom AccountManagerDelegate in tests. * Unlike initializeAccountManagerHelper, this will override the existing instance of * AccountManagerHelper if any. Only for use in Tests. * * @param context the applicationContext is retrieved from the context u...
Override AccountManagerHelper with a custom AccountManagerDelegate in tests. Unlike initializeAccountManagerHelper, this will override the existing instance of AccountManagerHelper if any. Only for use in Tests
overrideAccountManagerHelperForTests
{ "repo_name": "Pluto-tv/chromium-crosswalk", "path": "sync/android/java/src/org/chromium/sync/signin/AccountManagerHelper.java", "license": "bsd-3-clause", "size": 15088 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,536,659
public static InputStream cachedRead(ModuleData data) { if (data.isJavaClass()) return null; String pycname = data.getName() + "." + getCacheHash(data) + ".pyc"; long lastMod = data.getResolver().lastModified(data); for (File f : SimplePython.pycCaches) { File pyc = new File(f, pycname); if (pyc.ex...
static InputStream function(ModuleData data) { if (data.isJavaClass()) return null; String pycname = data.getName() + "." + getCacheHash(data) + ".pyc"; long lastMod = data.getResolver().lastModified(data); for (File f : SimplePython.pycCaches) { File pyc = new File(f, pycname); if (pyc.exists()) { if (lastMod < pyc.la...
/** * Provides default cache resolution. Used by ModuleResolver classes; Do not * use manually. */
Provides default cache resolution. Used by ModuleResolver classes; Do not use manually
cachedRead
{ "repo_name": "Enerccio/SimplePython", "path": "src/me/enerccio/sp/runtime/PythonRuntime.java", "license": "lgpl-3.0", "size": 53410 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.InputStream", "me.enerccio.sp.SimplePython", "me.enerccio.sp.types.ModuleObject" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import me.enerccio.sp.SimplePython; import me.enerccio.sp.types.ModuleObject;
import java.io.*; import me.enerccio.sp.*; import me.enerccio.sp.types.*;
[ "java.io", "me.enerccio.sp" ]
java.io; me.enerccio.sp;
2,330,074
static byte[] writePlanBytes(VoltCompiler compiler, PlanFragment fragment, AbstractPlanNode planGraph) throws VoltCompilerException { String json = null; // get the plan bytes PlanNodeList node_list = new PlanNodeList(planGraph); json = node_list.toJSONString(); compiler....
static byte[] writePlanBytes(VoltCompiler compiler, PlanFragment fragment, AbstractPlanNode planGraph) throws VoltCompilerException { String json = null; PlanNodeList node_list = new PlanNodeList(planGraph); json = node_list.toJSONString(); compiler.captureDiagnosticJsonFragment(json); byte[] jsonBytes = json.getBytes(...
/** * Update the plan fragment and return the bytes of the plan */
Update the plan fragment and return the bytes of the plan
writePlanBytes
{ "repo_name": "deerwalk/voltdb", "path": "src/frontend/org/voltdb/compiler/StatementCompiler.java", "license": "agpl-3.0", "size": 23303 }
[ "com.google_voltpatches.common.base.Charsets", "org.voltdb.catalog.PlanFragment", "org.voltdb.compiler.VoltCompiler", "org.voltdb.plannodes.AbstractPlanNode", "org.voltdb.plannodes.PlanNodeList", "org.voltdb.utils.CompressionService" ]
import com.google_voltpatches.common.base.Charsets; import org.voltdb.catalog.PlanFragment; import org.voltdb.compiler.VoltCompiler; import org.voltdb.plannodes.AbstractPlanNode; import org.voltdb.plannodes.PlanNodeList; import org.voltdb.utils.CompressionService;
import com.google_voltpatches.common.base.*; import org.voltdb.catalog.*; import org.voltdb.compiler.*; import org.voltdb.plannodes.*; import org.voltdb.utils.*;
[ "com.google_voltpatches.common", "org.voltdb.catalog", "org.voltdb.compiler", "org.voltdb.plannodes", "org.voltdb.utils" ]
com.google_voltpatches.common; org.voltdb.catalog; org.voltdb.compiler; org.voltdb.plannodes; org.voltdb.utils;
44,328
public boolean contains ( DataCollection dc ) { boolean contains = false; String query = "select * from APP.DATA_COLLECTION where DC_CODE = ?"; try (Connection con = DatabaseManager.getMainDBConnection(); PreparedStatement stmt = con.prepareStatement(query);) { stmt.setString( 1, dc.getCode()...
boolean function ( DataCollection dc ) { boolean contains = false; String query = STR; try (Connection con = DatabaseManager.getMainDBConnection(); PreparedStatement stmt = con.prepareStatement(query);) { stmt.setString( 1, dc.getCode() ); try(ResultSet rs = stmt.executeQuery();) { contains = rs.next(); rs.close(); } s...
/** * Check if the data collection was already downloaded or not * @param * @return */
Check if the data collection was already downloaded or not
contains
{ "repo_name": "openefsa/CatalogueBrowser", "path": "src/data_collection/DCDAO.java", "license": "lgpl-3.0", "size": 4702 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
661,443
// HIEOS (REWROTE): public void delete(ServerRequestContext context, List orefs) throws RegistryException { //Return if nothing specified to delete if (orefs.isEmpty()) { return; } try { //List refs = bu.getObjectRefsFromRegistryObjectI...
void function(ServerRequestContext context, List orefs) throws RegistryException { if (orefs.isEmpty()) { return; } try { Iterator iter = orefs.iterator(); while (iter.hasNext()) { ObjectRefType oref = (ObjectRefType) iter.next(); RegistryObjectType ro = getRegistryObjectForUpdate(context, oref); RegistryObjectDAO roDA...
/** * Does a bulk delete of a heterogeneous Collection of RegistrObjects. If * any RegistryObject cannot be found, it will make no change to the * database and throw RegistryException * */
Does a bulk delete of a heterogeneous Collection of RegistrObjects. If any RegistryObject cannot be found, it will make no change to the database and throw RegistryException
delete
{ "repo_name": "kef/hieos", "path": "src/omar/src/org/freebxml/omar/server/persistence/rdb/SQLPersistenceManagerImpl.java", "license": "apache-2.0", "size": 42960 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "javax.xml.registry.JAXRException", "javax.xml.registry.RegistryException", "org.freebxml.omar.server.common.ServerRequestContext", "org.oasis.ebxml.registry.bindings.rim.ObjectRefType", "org.oasis.ebxml.registry.bindings.rim.RegistryObjec...
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.xml.registry.JAXRException; import javax.xml.registry.RegistryException; import org.freebxml.omar.server.common.ServerRequestContext; import org.oasis.ebxml.registry.bindings.rim.ObjectRefType; import org.oasis.ebxml.registry.bin...
import java.util.*; import javax.xml.registry.*; import org.freebxml.omar.server.common.*; import org.oasis.ebxml.registry.bindings.rim.*;
[ "java.util", "javax.xml", "org.freebxml.omar", "org.oasis.ebxml" ]
java.util; javax.xml; org.freebxml.omar; org.oasis.ebxml;
816,753
public jsx3.gui.Image setSrc(String srcSrc) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setSrc", srcSrc); ScriptSessions.addScript(script); return this; }
jsx3.gui.Image function(String srcSrc) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + STR, srcSrc); ScriptSessions.addScript(script); return this; }
/** * Sets the URI of this image. The URI can be absolute or relative from the content base of the server that owns this object. * @param srcSrc * @return this object */
Sets the URI of this image. The URI can be absolute or relative from the content base of the server that
setSrc
{ "repo_name": "burris/dwr", "path": "ui/gi/generated/java/jsx3/gui/Image.java", "license": "apache-2.0", "size": 3641 }
[ "org.directwebremoting.ScriptBuffer", "org.directwebremoting.ScriptSessions" ]
import org.directwebremoting.ScriptBuffer; import org.directwebremoting.ScriptSessions;
import org.directwebremoting.*;
[ "org.directwebremoting" ]
org.directwebremoting;
1,579,703
@Override public void updateClob(int columnIndex, Reader x) throws SQLException { updateClob(columnIndex, x, -1); }
void function(int columnIndex, Reader x) throws SQLException { updateClob(columnIndex, x, -1); }
/** * Updates a column in the current or insert row. * * @param columnIndex (1,2,...) * @param x the value * @throws SQLException if the result set is closed or not updatable */
Updates a column in the current or insert row
updateClob
{ "repo_name": "wizardofos/Protozoo", "path": "extra/h2/src/main/java/org/h2/jdbc/JdbcResultSet.java", "license": "mit", "size": 120208 }
[ "java.io.Reader", "java.sql.SQLException" ]
import java.io.Reader; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
1,839,241
public List<Container> getContainers() throws Exception { List<Container> containers = new ArrayList<>(); for (Resource r : required.keySet()) { Container bundle = project.getBundle(r); containers.add(bundle); } return containers; }
List<Container> function() throws Exception { List<Container> containers = new ArrayList<>(); for (Resource r : required.keySet()) { Container bundle = project.getBundle(r); containers.add(bundle); } return containers; }
/** * Get a list of runbundles as containers */
Get a list of runbundles as containers
getContainers
{ "repo_name": "psoreide/bnd", "path": "biz.aQute.resolve/src/biz/aQute/resolve/RunResolution.java", "license": "apache-2.0", "size": 14377 }
[ "java.util.ArrayList", "java.util.List", "org.osgi.resource.Resource" ]
import java.util.ArrayList; import java.util.List; import org.osgi.resource.Resource;
import java.util.*; import org.osgi.resource.*;
[ "java.util", "org.osgi.resource" ]
java.util; org.osgi.resource;
2,564,834
@Override public Map<String, Number> status() { return null; }
Map<String, Number> function() { return null; }
/** * Returns the current status of this parameter server * updater * * @return */
Returns the current status of this parameter server updater
status
{ "repo_name": "deeplearning4j/nd4j", "path": "nd4j-parameter-server-parent/nd4j-parameter-server/src/main/java/org/nd4j/parameterserver/updater/SoftSyncParameterUpdater.java", "license": "apache-2.0", "size": 2525 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,826,177
private boolean applyBeforeEdgeWeightUpdateDirectedWeighted( DirectedWeightedEdge directedDoubleWeightedEdge, double weight) { applyEdgeWeightedUpdateDirectedWeighted(directedDoubleWeightedEdge, weight); return true; }
boolean function( DirectedWeightedEdge directedDoubleWeightedEdge, double weight) { applyEdgeWeightedUpdateDirectedWeighted(directedDoubleWeightedEdge, weight); return true; }
/** * Called before the edge weight update is applied to the graph. * * @param directedDoubleWeightedEdge * The {@link Edge} whose edge weight changes. * @param weight * The new weight of the Edge after the Update. * @return true, if successful; */
Called before the edge weight update is applied to the graph
applyBeforeEdgeWeightUpdateDirectedWeighted
{ "repo_name": "timgrube/DNA", "path": "src/dna/metrics/similarityMeasures/dice/DiceU.java", "license": "gpl-3.0", "size": 31464 }
[ "dna.graph.edges.DirectedWeightedEdge" ]
import dna.graph.edges.DirectedWeightedEdge;
import dna.graph.edges.*;
[ "dna.graph.edges" ]
dna.graph.edges;
326,705
private MapReduceOper startNew(FileSpec fSpec, MapReduceOper old) throws PlanException{ POLoad ld = getLoad(); ld.setLFile(fSpec); MapReduceOper ret = getMROp(); ret.mapPlan.add(ld); MRPlan.add(ret); MRPlan.connect(old, ret); return ret; }
MapReduceOper function(FileSpec fSpec, MapReduceOper old) throws PlanException{ POLoad ld = getLoad(); ld.setLFile(fSpec); MapReduceOper ret = getMROp(); ret.mapPlan.add(ld); MRPlan.add(ret); MRPlan.connect(old, ret); return ret; }
/** * Starts a new MRoper and connects it to the old * one by load-store. The assumption is that the * store is already inserted into the old MROper. * @param fSpec * @param old * @return * @throws IOException * @throws PlanException */
Starts a new MRoper and connects it to the old one by load-store. The assumption is that the store is already inserted into the old MROper
startNew
{ "repo_name": "miyakawataku/piggybank-ltsv", "path": "src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MRCompiler.java", "license": "apache-2.0", "size": 124633 }
[ "org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POLoad", "org.apache.pig.impl.io.FileSpec", "org.apache.pig.impl.plan.PlanException" ]
import org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POLoad; import org.apache.pig.impl.io.FileSpec; import org.apache.pig.impl.plan.PlanException;
import org.apache.pig.backend.hadoop.executionengine.*; import org.apache.pig.impl.io.*; import org.apache.pig.impl.plan.*;
[ "org.apache.pig" ]
org.apache.pig;
2,734,616
public void annotateEvaExFor(final InternalActionImpl internalAction, final ResourceDemandType type, final EvaluableExpression evaEx) { if (internalAction == null || evaEx == null) { throw new NullPointerException("No null arguments in annotateEvaExFor-method allowed!"); } // Other TYPES are not supported...
void function(final InternalActionImpl internalAction, final ResourceDemandType type, final EvaluableExpression evaEx) { if (internalAction == null evaEx == null) { throw new NullPointerException(STR); } if (!type.equals(ResourceDemandType.RESOURCE_TYPE_CPU_NS) && !type.equals(ResourceDemandType.RESOURCE_TYPE_HDD_NS)) ...
/** * Annotating the EvaluableExpression onto the given PCM element. * * @param internalAction The PCM element * @param type The ResourceDemandType of the InternalAction ( * {@link ResourceDemandType#RESOURCE_TYPE_CPU_NS} and * {@link ResourceDemandType#RESOURCE_TYPE_HDD_NS} are accept...
Annotating the EvaluableExpression onto the given PCM element
annotateEvaExFor
{ "repo_name": "Beagle-PSE/Beagle", "path": "Core/src/main/java/de/uka/ipd/sdq/beagle/core/pcmconnection/PcmRepositoryWriterAnnotatorEvaEx.java", "license": "epl-1.0", "size": 6469 }
[ "de.uka.ipd.sdq.beagle.core.ResourceDemandType", "de.uka.ipd.sdq.beagle.core.evaluableexpressions.EvaluableExpression", "java.util.LinkedList", "org.eclipse.emf.common.util.EList", "org.palladiosimulator.pcm.core.CoreFactory", "org.palladiosimulator.pcm.core.PCMRandomVariable", "org.palladiosimulator.pc...
import de.uka.ipd.sdq.beagle.core.ResourceDemandType; import de.uka.ipd.sdq.beagle.core.evaluableexpressions.EvaluableExpression; import java.util.LinkedList; import org.eclipse.emf.common.util.EList; import org.palladiosimulator.pcm.core.CoreFactory; import org.palladiosimulator.pcm.core.PCMRandomVariable; import org....
import de.uka.ipd.sdq.beagle.core.*; import de.uka.ipd.sdq.beagle.core.evaluableexpressions.*; import java.util.*; import org.eclipse.emf.common.util.*; import org.palladiosimulator.pcm.core.*; import org.palladiosimulator.pcm.resourcetype.*; import org.palladiosimulator.pcm.seff.impl.*; import org.palladiosimulator.pc...
[ "de.uka.ipd", "java.util", "org.eclipse.emf", "org.palladiosimulator.pcm" ]
de.uka.ipd; java.util; org.eclipse.emf; org.palladiosimulator.pcm;
2,162,546
public static User createUser(String alias, boolean isManager, boolean setOriginalAuth) { UserRole[] roles = isManager ? new UserRole[] { UserRole.ROLE_KENMEI_USER, UserRole.ROLE_KENMEI_CLIENT_MANAGER } : new UserRole[] { UserRole.ROLE_KENMEI_USER }; return crea...
static User function(String alias, boolean isManager, boolean setOriginalAuth) { UserRole[] roles = isManager ? new UserRole[] { UserRole.ROLE_KENMEI_USER, UserRole.ROLE_KENMEI_CLIENT_MANAGER } : new UserRole[] { UserRole.ROLE_KENMEI_USER }; return createRandomUser(alias, false, null, setOriginalAuth, roles); }
/** * Creates a new user with the given alias * * @param isManager * True, if this user should be a manager. * @param setOriginalAuth * true to keep the authentication * @return A new user. */
Creates a new user with the given alias
createUser
{ "repo_name": "Communote/communote-server", "path": "communote/tests/all-versions/integration/src/main/java/com/communote/server/test/util/TestUtils.java", "license": "apache-2.0", "size": 37663 }
[ "com.communote.server.model.user.User", "com.communote.server.model.user.UserRole" ]
import com.communote.server.model.user.User; import com.communote.server.model.user.UserRole;
import com.communote.server.model.user.*;
[ "com.communote.server" ]
com.communote.server;
2,048,845
private static TrustManager[] getInsecureTrustManager() { return new TrustManager[] { new X509TrustManager() { @Override public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { }
static TrustManager[] function() { return new TrustManager[] { new X509TrustManager() { public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { }
/** * This is generally not a good idea because it means * that the device will now trust all SSL * certificates leaving the device open to man * in the middle attacks. */
This is generally not a good idea because it means that the device will now trust all SSL certificates leaving the device open to man in the middle attacks
getInsecureTrustManager
{ "repo_name": "mrkcsc/android-mg-bootstrap", "path": "mg-bootstrap/lib/src/main/java/com/miguelgaeta/bootstrap/mg_ssl/MGSSLFactory.java", "license": "apache-2.0", "size": 4057 }
[ "java.security.cert.CertificateException", "java.security.cert.X509Certificate", "javax.net.ssl.TrustManager", "javax.net.ssl.X509TrustManager" ]
import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager;
import java.security.cert.*; import javax.net.ssl.*;
[ "java.security", "javax.net" ]
java.security; javax.net;
559,970
if (sIsBrowserInitialized) return true; Log.d(TAG, "Performing one-time browser initialization"); ChromecastConfigAndroid.initializeForBrowser(context); // Initializing the command line must occur before loading the library. if (!CommandLine.isInitialized()) { ContentAppli...
if (sIsBrowserInitialized) return true; Log.d(TAG, STR); ChromecastConfigAndroid.initializeForBrowser(context); if (!CommandLine.isInitialized()) { ContentApplication.initCommandLine(context); if (context instanceof Activity) { Intent launchingIntent = ((Activity) context).getIntent(); String[] commandLineParams = getC...
/** * Starts the browser process synchronously, returning success or failure. If the browser has * already started, immediately returns true without performing any more initialization. * This may only be called on the UI thread. * * @return whether or not the process started successfully *...
Starts the browser process synchronously, returning success or failure. If the browser has already started, immediately returns true without performing any more initialization. This may only be called on the UI thread
initializeBrowser
{ "repo_name": "Teamxrtc/webrtc-streaming-node", "path": "third_party/webrtc/src/chromium/src/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java", "license": "mit", "size": 3856 }
[ "android.app.Activity", "android.content.Intent", "android.util.Log", "org.chromium.base.CommandLine", "org.chromium.base.library_loader.LibraryLoader", "org.chromium.base.library_loader.LibraryProcessType", "org.chromium.base.library_loader.ProcessInitException", "org.chromium.chromecast.base.Chromec...
import android.app.Activity; import android.content.Intent; import android.util.Log; import org.chromium.base.CommandLine; import org.chromium.base.library_loader.LibraryLoader; import org.chromium.base.library_loader.LibraryProcessType; import org.chromium.base.library_loader.ProcessInitException; import org.chromium....
import android.app.*; import android.content.*; import android.util.*; import org.chromium.base.*; import org.chromium.base.library_loader.*; import org.chromium.chromecast.base.*; import org.chromium.content.app.*; import org.chromium.content.browser.*; import org.chromium.content.common.*; import org.chromium.net.*;
[ "android.app", "android.content", "android.util", "org.chromium.base", "org.chromium.chromecast", "org.chromium.content", "org.chromium.net" ]
android.app; android.content; android.util; org.chromium.base; org.chromium.chromecast; org.chromium.content; org.chromium.net;
2,032,204