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
return new AutoValue_CassandraIO_Read.Builder<T>().build(); }
return new AutoValue_CassandraIO_Read.Builder<T>().build(); }
/** * Provide a {@link Read} {@link PTransform} to read data from a Cassandra database. */
Provide a <code>Read</code> <code>PTransform</code> to read data from a Cassandra database
read
{ "repo_name": "shakamunyi/beam", "path": "sdks/java/io/cassandra/src/main/java/org/apache/beam/sdk/io/cassandra/CassandraIO.java", "license": "apache-2.0", "size": 17622 }
[ "com.google.auto.value.AutoValue" ]
import com.google.auto.value.AutoValue;
import com.google.auto.value.*;
[ "com.google.auto" ]
com.google.auto;
2,105,329
private void updateWebMvcConfig() { LogicalPath webappPath = getWebProjectUtils().getWebappPath( getProjectOperations()); String webMvcXmlPath = getProjectOperations().getPathResolver() .getIdentifier(webappPath, "WEB-INF/spring/webmvc-config.xml"); Validate.i...
void function() { LogicalPath webappPath = getWebProjectUtils().getWebappPath( getProjectOperations()); String webMvcXmlPath = getProjectOperations().getPathResolver() .getIdentifier(webappPath, STR); Validate.isTrue(fileManager.exists(webMvcXmlPath), STR); MutableFile webMvcXmlMutableFile = null; Document webMvcXml; t...
/** * Update the webmvc-config.xml file in order to register * Jackson2RequestMappingHandlerAdapter * * @param targetPackage */
Update the webmvc-config.xml file in order to register Jackson2RequestMappingHandlerAdapter
updateWebMvcConfig
{ "repo_name": "osroca/gvnix", "path": "addon-web-mvc-geo/addon/src/main/java/org/gvnix/addon/geo/addon/GeoOperationsImpl.java", "license": "gpl-3.0", "size": 104282 }
[ "org.apache.commons.lang3.Validate", "org.springframework.roo.process.manager.MutableFile", "org.springframework.roo.project.LogicalPath", "org.springframework.roo.support.util.XmlUtils", "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.apache.commons.lang3.Validate; import org.springframework.roo.process.manager.MutableFile; import org.springframework.roo.project.LogicalPath; import org.springframework.roo.support.util.XmlUtils; import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.apache.commons.lang3.*; import org.springframework.roo.process.manager.*; import org.springframework.roo.project.*; import org.springframework.roo.support.util.*; import org.w3c.dom.*;
[ "org.apache.commons", "org.springframework.roo", "org.w3c.dom" ]
org.apache.commons; org.springframework.roo; org.w3c.dom;
2,059,472
public Annotation[] getAnnotations() { return this.annotations; } /** * Return a single associated annotations that could affect binding. * @param <A> the annotation type * @param type annotation type * @return the associated annotation or {@code null}
Annotation[] function() { return this.annotations; } /** * Return a single associated annotations that could affect binding. * @param <A> the annotation type * @param type annotation type * @return the associated annotation or {@code null}
/** * Return any associated annotations that could affect binding. * @return the associated annotations */
Return any associated annotations that could affect binding
getAnnotations
{ "repo_name": "aahlenst/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/Bindable.java", "license": "apache-2.0", "size": 9881 }
[ "java.lang.annotation.Annotation" ]
import java.lang.annotation.Annotation;
import java.lang.annotation.*;
[ "java.lang" ]
java.lang;
2,777,635
public Observable<ServiceResponse<Page<JobInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<JobInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * List Jobs. * Lists all of the Jobs for the Transform. * ServiceResponse<PageImpl<JobInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;Jo...
List Jobs. Lists all of the Jobs for the Transform
listNextSinglePageAsync
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "mediaservices/resource-manager/v2018_30_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_30_30_preview/implementation/JobsInner.java", "license": "mit", "size": 51506 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
484,525
public JSONArray put(Map value) { this.put(new JSONObject(value)); return this; }
JSONArray function(Map value) { this.put(new JSONObject(value)); return this; }
/** * Put a value in the JSONArray, where the value will be a JSONObject which * is produced from a Map. * * @param value * A Map value. * @return this. */
Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map
put
{ "repo_name": "tVoss/AdvancedSerialization", "path": "src/org/json/JSONArray.java", "license": "mit", "size": 27381 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,153,970
// mandatory call to parent super.construct(sysConfig); // Announce where we are in the test logger.log(Level.FINE, "MembershipDurationTest: In setup() method."); // instantiate a lease provider leaseProvider = new TestLeaseProvider(1); // create an owner to for test...
super.construct(sysConfig); logger.log(Level.FINE, STR); leaseProvider = new TestLeaseProvider(1); leaseOwner = new BasicLeaseOwner(Lease.FOREVER); return this; }
/** * Sets up the testing environment. */
Sets up the testing environment
construct
{ "repo_name": "pfirmstone/JGDMS", "path": "qa/src/org/apache/river/test/spec/renewalservice/MembershipDurationTest.java", "license": "apache-2.0", "size": 6908 }
[ "java.util.logging.Level", "net.jini.core.lease.Lease", "org.apache.river.test.share.BasicLeaseOwner", "org.apache.river.test.share.TestLeaseProvider" ]
import java.util.logging.Level; import net.jini.core.lease.Lease; import org.apache.river.test.share.BasicLeaseOwner; import org.apache.river.test.share.TestLeaseProvider;
import java.util.logging.*; import net.jini.core.lease.*; import org.apache.river.test.share.*;
[ "java.util", "net.jini.core", "org.apache.river" ]
java.util; net.jini.core; org.apache.river;
896,608
public static String formatTime12H(Date date) { if (date == null) { return ""; } Calendar c = Calendar.getInstance(); c.setTime(date); if (c.get(Calendar.HOUR_OF_DAY) == 12 && c.get(Calendar.MINUTE) == 0) { return new SimpleDateFormat("EEE, dd MMM yyyy...
static String function(Date date) { if (date == null) { return STREEE, dd MMM yyyy, hh:mmSTR NOONSTREEE, dd MMM yyyy, hh:mm a").format(date); }
/** * Formats a date in the format dd MMM yyyy, hh:mm a. Example: 05 May 2012, * 2:04 PM<br> */
Formats a date in the format dd MMM yyyy, hh:mm a. Example: 05 May 2012, 2:04 PM
formatTime12H
{ "repo_name": "karthikaacharya/teammates", "path": "src/main/java/teammates/common/util/TimeHelper.java", "license": "gpl-2.0", "size": 17599 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,085,482
public Location getSoundSource(String regionName) { PreCon.notNullOrEmpty(regionName, "regionName"); MusicRegion region = MusicalRegions.getRegionManager().get(regionName); PreCon.notNull(region); return region.getSoundSource(); }
Location function(String regionName) { PreCon.notNullOrEmpty(regionName, STR); MusicRegion region = MusicalRegions.getRegionManager().get(regionName); PreCon.notNull(region); return region.getSoundSource(); }
/** * Get a musical regions sound source location. * * @param regionName The name of the region to check. */
Get a musical regions sound source location
getSoundSource
{ "repo_name": "JCThePants/MusicalRegions", "path": "src/com/jcwhatever/musical/MusicScriptApi.java", "license": "mit", "size": 7373 }
[ "com.jcwhatever.musical.regions.MusicRegion", "com.jcwhatever.nucleus.utils.PreCon", "org.bukkit.Location" ]
import com.jcwhatever.musical.regions.MusicRegion; import com.jcwhatever.nucleus.utils.PreCon; import org.bukkit.Location;
import com.jcwhatever.musical.regions.*; import com.jcwhatever.nucleus.utils.*; import org.bukkit.*;
[ "com.jcwhatever.musical", "com.jcwhatever.nucleus", "org.bukkit" ]
com.jcwhatever.musical; com.jcwhatever.nucleus; org.bukkit;
941,966
@Test public void testInitializeRuntimeEx() { final ChildBackgroundInitializer child = new ChildBackgroundInitializer(); child.ex = new RuntimeException(); initializer.addInitializer(CHILD_INIT, child); initializer.start(); try { initializer.get(); ...
void function() { final ChildBackgroundInitializer child = new ChildBackgroundInitializer(); child.ex = new RuntimeException(); initializer.addInitializer(CHILD_INIT, child); initializer.start(); try { initializer.get(); fail(STR); } catch (final Exception ex) { assertEquals(STR, child.ex, ex); } }
/** * Tests the behavior of the initializer if one of the child initializers * throws a runtime exception. */
Tests the behavior of the initializer if one of the child initializers throws a runtime exception
testInitializeRuntimeEx
{ "repo_name": "mureinik/commons-lang", "path": "src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java", "license": "apache-2.0", "size": 14756 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,116,735
Observable<ServiceResponse<Void>> putBase64UrlEncodedWithServiceResponseAsync(byte[] stringBody);
Observable<ServiceResponse<Void>> putBase64UrlEncodedWithServiceResponseAsync(byte[] stringBody);
/** * Put value that is base64url encoded. * * @param stringBody the Base64Url value * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
Put value that is base64url encoded
putBase64UrlEncodedWithServiceResponseAsync
{ "repo_name": "veronicagg/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodystring/Strings.java", "license": "mit", "size": 24176 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,142,839
@Nullable public JSONArray optJSONArray(@Nullable String name) { Object object = opt(name); return object instanceof JSONArray ? (JSONArray) object : null; }
JSONArray function(@Nullable String name) { Object object = opt(name); return object instanceof JSONArray ? (JSONArray) object : null; }
/** * Returns the value mapped by {@code name} if it exists and is a {@code * JSONArray}, or null otherwise. */
Returns the value mapped by name if it exists and is a JSONArray, or null otherwise
optJSONArray
{ "repo_name": "smartdevicelink/sdl_android", "path": "javaSE/javaSE/src/main/java/org/json/JSONObject.java", "license": "bsd-3-clause", "size": 30612 }
[ "androidx.annotation.Nullable" ]
import androidx.annotation.Nullable;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
457,308
public Collection<TomcatConnectorCustomizer> getTomcatConnectorCustomizers() { return this.tomcatConnectorCustomizers; }
Collection<TomcatConnectorCustomizer> function() { return this.tomcatConnectorCustomizers; }
/** * Returns a mutable collection of the {@link TomcatConnectorCustomizer}s that will be * applied to the Tomcat {@link Connector}. * @return the customizers that will be applied */
Returns a mutable collection of the <code>TomcatConnectorCustomizer</code>s that will be applied to the Tomcat <code>Connector</code>
getTomcatConnectorCustomizers
{ "repo_name": "hello2009chen/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java", "license": "apache-2.0", "size": 12606 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,654,532
private void swapChoiceState(int position) { int lastCount = getCountSelected(); boolean lastChecked = checked.get(position); checked.set(position, !lastChecked); int count = lastChecked ? lastCount - 1 : lastCount + 1; if (lastCount == 0 && count == 1) { swipeLis...
void function(int position) { int lastCount = getCountSelected(); boolean lastChecked = checked.get(position); checked.set(position, !lastChecked); int count = lastChecked ? lastCount - 1 : lastCount + 1; if (lastCount == 0 && count == 1) { swipeListView.onChoiceStarted(); closeOpenedItems(); setActionsTo(SwipeListView...
/** * Swap choice state in item * * @param position position of list */
Swap choice state in item
swapChoiceState
{ "repo_name": "longluo/AndroidDemo", "path": "app/src/main/java/com/longluo/demo/widget/swipelistview/SwipeListViewTouchListener.java", "license": "mit", "size": 39507 }
[ "android.os.Build" ]
import android.os.Build;
import android.os.*;
[ "android.os" ]
android.os;
1,877,834
public Map<String, Double> getLogarithmMap(String executionKey, TemplateManager templateManager) { Map<String, Double> logarithmMap = new HashMap<String, Double>(); if (executionKey == null) { if (templateManager != null) { M...
Map<String, Double> function(String executionKey, TemplateManager templateManager) { Map<String, Double> logarithmMap = new HashMap<String, Double>(); if (executionKey == null) { if (templateManager != null) { Map<String, ApiTemplate> publicTemplates = templateManager.getValidGlobalTemplates(); for (String templateName...
/** * Return a map containing the logarithm's sum of the templates executions launched by * the same users or during the same sessions. If the user name is specified, we only * consider the templates executed by the user specified. * @param executionKey the user's name or the session identifier ...
Return a map containing the logarithm's sum of the templates executions launched by the same users or during the same sessions. If the user name is specified, we only consider the templates executed by the user specified
getLogarithmMap
{ "repo_name": "joshkh/intermine", "path": "intermine/api/main/src/org/intermine/api/tracker/TemplatesExecutionMap.java", "license": "lgpl-2.1", "size": 4112 }
[ "java.util.HashMap", "java.util.Map", "org.intermine.api.template.ApiTemplate", "org.intermine.api.template.TemplateManager" ]
import java.util.HashMap; import java.util.Map; import org.intermine.api.template.ApiTemplate; import org.intermine.api.template.TemplateManager;
import java.util.*; import org.intermine.api.template.*;
[ "java.util", "org.intermine.api" ]
java.util; org.intermine.api;
1,510,746
public void addLeafListener(ActionListener l) { leafListener.addListener(l); }
void function(ActionListener l) { leafListener.addListener(l); }
/** * A listener that fires when a leaf is clicked * * @param l listener to fire when the leaf is clicked */
A listener that fires when a leaf is clicked
addLeafListener
{ "repo_name": "skyHALud/codenameone", "path": "CodenameOne/src/com/codename1/ui/tree/Tree.java", "license": "gpl-2.0", "size": 18876 }
[ "com.codename1.ui.events.ActionListener" ]
import com.codename1.ui.events.ActionListener;
import com.codename1.ui.events.*;
[ "com.codename1.ui" ]
com.codename1.ui;
929,003
public LoadBalancerBackendAddress withIpAddress(String ipAddress) { if (this.innerProperties() == null) { this.innerProperties = new LoadBalancerBackendAddressPropertiesFormat(); } this.innerProperties().withIpAddress(ipAddress); return this; }
LoadBalancerBackendAddress function(String ipAddress) { if (this.innerProperties() == null) { this.innerProperties = new LoadBalancerBackendAddressPropertiesFormat(); } this.innerProperties().withIpAddress(ipAddress); return this; }
/** * Set the ipAddress property: IP Address belonging to the referenced virtual network. * * @param ipAddress the ipAddress value to set. * @return the LoadBalancerBackendAddress object itself. */
Set the ipAddress property: IP Address belonging to the referenced virtual network
withIpAddress
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/LoadBalancerBackendAddress.java", "license": "mit", "size": 6373 }
[ "com.azure.resourcemanager.network.fluent.models.LoadBalancerBackendAddressPropertiesFormat" ]
import com.azure.resourcemanager.network.fluent.models.LoadBalancerBackendAddressPropertiesFormat;
import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,176,089
long addLocation(String locationSetting, String cityName, double lat, double lon) { long locationId; // First, check if the location with this city name exists in the db Cursor locationCursor = getContext().getContentResolver().query( WeatherContract.LocationEntry.CONTENT_UR...
long addLocation(String locationSetting, String cityName, double lat, double lon) { long locationId; Cursor locationCursor = getContext().getContentResolver().query( WeatherContract.LocationEntry.CONTENT_URI, new String[]{WeatherContract.LocationEntry._ID}, WeatherContract.LocationEntry.COLUMN_LOCATION_SETTING + STR, n...
/** * Helper method to handle insertion of a new location in the weather database. * * @param locationSetting The location string used to request updates from the server. * @param cityName A human-readable city name, e.g "Mountain View" * @param lat the latitude of the city * @param lon th...
Helper method to handle insertion of a new location in the weather database
addLocation
{ "repo_name": "feorin94/project6watchface", "path": "app/src/main/java/com/example/android/sunshine/app/sync/SunshineSyncAdapter.java", "license": "apache-2.0", "size": 33397 }
[ "android.content.ContentUris", "android.content.ContentValues", "android.database.Cursor", "android.net.Uri", "com.example.android.sunshine.app.data.WeatherContract" ]
import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import com.example.android.sunshine.app.data.WeatherContract;
import android.content.*; import android.database.*; import android.net.*; import com.example.android.sunshine.app.data.*;
[ "android.content", "android.database", "android.net", "com.example.android" ]
android.content; android.database; android.net; com.example.android;
2,095,059
public static boolean isUserFacing(Authorizable auth, boolean includeCollections) { // we don't want to count certrain special users & groups if (auth == null || IGNORE_AUTHIDS.contains(auth.getId())) { return false; } if (auth.isGroup()) { boolean isContactGroup = isContactGroup(auth); ...
static boolean function(Authorizable auth, boolean includeCollections) { if (auth == null IGNORE_AUTHIDS.contains(auth.getId())) { return false; } if (auth.isGroup()) { boolean isContactGroup = isContactGroup(auth); boolean includeGroup = includeCollections && STR.equals(String.valueOf(auth.getProperty(SAKAI_CATEGORY))...
/** * Validates if an authorizable is a valid group * @param auth the authorizable * @param includeCollections Whether to include collections as user facing. * @return true if its an absolute group */
Validates if an authorizable is a valid group
isUserFacing
{ "repo_name": "dylanswartz/nakamura", "path": "bundles/user/api/src/main/java/org/sakaiproject/nakamura/api/user/AuthorizableUtil.java", "license": "apache-2.0", "size": 7013 }
[ "org.apache.commons.lang.StringUtils", "org.sakaiproject.nakamura.api.lite.authorizable.Authorizable" ]
import org.apache.commons.lang.StringUtils; import org.sakaiproject.nakamura.api.lite.authorizable.Authorizable;
import org.apache.commons.lang.*; import org.sakaiproject.nakamura.api.lite.authorizable.*;
[ "org.apache.commons", "org.sakaiproject.nakamura" ]
org.apache.commons; org.sakaiproject.nakamura;
2,524,523
@Test public void testMessageVersions() { for (ApiKeys apiKey : ApiKeys.values()) { Message message = null; try { message = ApiMessageType.fromApiKey(apiKey.id).newRequest(); } catch (UnsupportedVersionException e) { fail("No request me...
void function() { for (ApiKeys apiKey : ApiKeys.values()) { Message message = null; try { message = ApiMessageType.fromApiKey(apiKey.id).newRequest(); } catch (UnsupportedVersionException e) { fail(STR + apiKey); } assertTrue(apiKey.latestVersion() <= message.highestSupportedVersion(), STR + apiKey + STR + STR + messag...
/** * Verify that the JSON files support the same message versions as the * schemas accessible through the ApiKey class. */
Verify that the JSON files support the same message versions as the schemas accessible through the ApiKey class
testMessageVersions
{ "repo_name": "lindong28/kafka", "path": "clients/src/test/java/org/apache/kafka/common/message/MessageTest.java", "license": "apache-2.0", "size": 59023 }
[ "org.apache.kafka.common.errors.UnsupportedVersionException", "org.apache.kafka.common.protocol.ApiKeys", "org.apache.kafka.common.protocol.Message", "org.junit.jupiter.api.Assertions" ]
import org.apache.kafka.common.errors.UnsupportedVersionException; import org.apache.kafka.common.protocol.ApiKeys; import org.apache.kafka.common.protocol.Message; import org.junit.jupiter.api.Assertions;
import org.apache.kafka.common.errors.*; import org.apache.kafka.common.protocol.*; import org.junit.jupiter.api.*;
[ "org.apache.kafka", "org.junit.jupiter" ]
org.apache.kafka; org.junit.jupiter;
1,260,310
public Document find(Bson filter) { //TODO batch finding return collection.find(filter).first(); }
Document function(Bson filter) { return collection.find(filter).first(); }
/** * Finds a single document in the collection according to the specified arguments. * * @param filter */
Finds a single document in the collection according to the specified arguments
find
{ "repo_name": "dke-knu/i2am", "path": "rdma-based-storm/external/storm-mongodb/src/main/java/org/apache/storm/mongodb/common/MongoDBClient.java", "license": "apache-2.0", "size": 3513 }
[ "org.bson.Document", "org.bson.conversions.Bson" ]
import org.bson.Document; import org.bson.conversions.Bson;
import org.bson.*; import org.bson.conversions.*;
[ "org.bson", "org.bson.conversions" ]
org.bson; org.bson.conversions;
17,299
private void showList(List<LineItem> list) { lineitemList = new ArrayList<Map<String, String>>(); for(LineItem line : list) { lineitemList.add(line.toMap()); } SimpleAdapter sAdap = new SimpleAdapter(SaleDetailActivity.this, lineitemList, R.layout.listview_lineitem, new String[]{"name","quanti...
void function(List<LineItem> list) { lineitemList = new ArrayList<Map<String, String>>(); for(LineItem line : list) { lineitemList.add(line.toMap()); } SimpleAdapter sAdap = new SimpleAdapter(SaleDetailActivity.this, lineitemList, R.layout.listview_lineitem, new String[]{"name",STR,"price"}, new int[] {R.id.name,R.id.q...
/** * Show list. * @param list */
Show list
showList
{ "repo_name": "mapfap/pos", "path": "src/com/refresh/pos/ui/sale/SaleDetailActivity.java", "license": "epl-1.0", "size": 3235 }
[ "android.widget.SimpleAdapter", "com.refresh.pos.domain.inventory.LineItem", "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import android.widget.SimpleAdapter; import com.refresh.pos.domain.inventory.LineItem; import java.util.ArrayList; import java.util.List; import java.util.Map;
import android.widget.*; import com.refresh.pos.domain.inventory.*; import java.util.*;
[ "android.widget", "com.refresh.pos", "java.util" ]
android.widget; com.refresh.pos; java.util;
1,833,559
public static void setComment(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, String value) { Base.set(model, instanceResource, COMMENT, value); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, String value) { Base.set(model, instanceResource, COMMENT, value); }
/** * Sets a value of property Comment from an instance of String First, all * existing values are removed, then this value is added. Cardinality * constraints are not checked, but this method exists only for properties * with no minCardinality or minCardinality == 1. * * @param mod...
Sets a value of property Comment from an instance of String First, all existing values are removed, then this value is added. Cardinality constraints are not checked, but this method exists only for properties with no minCardinality or minCardinality == 1
setComment
{ "repo_name": "semweb4j/semweb4j", "path": "org.semweb4j.rdfreactor.generator/src/main/java/org/ontoware/rdfreactor/schema/bootstrap/Resource.java", "license": "bsd-2-clause", "size": 83665 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
1,541,630
public void setName(Name name) { this.name = name; }
void function(Name name) { this.name = name; }
/** * Missing description at method setName. * * @param name the Name. */
Missing description at method setName
setName
{ "repo_name": "NABUCCO/org.nabucco.testautomation.result", "path": "org.nabucco.testautomation.result.facade.datatype/src/main/gen/org/nabucco/testautomation/result/facade/datatype/TestConfigurationResult.java", "license": "epl-1.0", "size": 27102 }
[ "org.nabucco.framework.base.facade.datatype.Name" ]
import org.nabucco.framework.base.facade.datatype.Name;
import org.nabucco.framework.base.facade.datatype.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
238,554
private boolean isVisibleMasterDocumentSameAsDocument() { IDocument visibleDocument = getVisibleDocument(); return (visibleDocument instanceof ProjectionDocument) && ((ProjectionDocument) visibleDocument).getMasterDocument() == getDocument(); }
boolean function() { IDocument visibleDocument = getVisibleDocument(); return (visibleDocument instanceof ProjectionDocument) && ((ProjectionDocument) visibleDocument).getMasterDocument() == getDocument(); }
/** * Tests whether the visible document's master document is identical to this * viewer's document. * * @return <code>true</code> if the visible document's master is identical * to this viewer's document * @since 3.1 */
Tests whether the visible document's master document is identical to this viewer's document
isVisibleMasterDocumentSameAsDocument
{ "repo_name": "ckaestne/LEADT", "path": "CIDE2/src/de/ovgu/cide/editor/inlineprojection/InlineProjectionSourceViewer.java", "license": "gpl-3.0", "size": 61192 }
[ "org.eclipse.jface.text.IDocument", "org.eclipse.jface.text.projection.ProjectionDocument" ]
import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.projection.ProjectionDocument;
import org.eclipse.jface.text.*; import org.eclipse.jface.text.projection.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,694,619
public int updateEntitiesWithTracing(String userId, List<? extends EntityInstance> entities) { int changeSetNumber = this.generateLatestChangeSetNumber(userId); return updateEntities(changeSetNumber, entities); }
int function(String userId, List<? extends EntityInstance> entities) { int changeSetNumber = this.generateLatestChangeSetNumber(userId); return updateEntities(changeSetNumber, entities); }
/** * Update entities: This method updates a list of data rows to database. * * @param entities the list of entities that will be created in the database. * @param userId the id of current user * @return returns the changeSetNumber of this transaction */
Update entities: This method updates a list of data rows to database
updateEntitiesWithTracing
{ "repo_name": "unsw-cse-soc/CoreDB", "path": "src/CoreDB-Relational Pluggin/Library/src/coredb/controller/EntityControllerTracing.java", "license": "apache-2.0", "size": 20531 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
543,107
private void handleIntent(Intent intent) { // obtain the wake lock PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); //mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, Constants.getUpdateIntent(getApplicationContext())); //mWakeLock.acquire(); ...
void function(Intent intent) { PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE); boolean connected = false; try { connected = cm.getActiveNetworkInfo().isConnected(); } catch( Exception ex) { } if (!connected) { Progr...
/** * This is where we initialize. We call this when onStart/onStartCommand is * called by the system. We won't do anything with the intent here, and you * probably won't, either. */
This is where we initialize. We call this when onStart/onStartCommand is called by the system. We won't do anything with the intent here, and you probably won't, either
handleIntent
{ "repo_name": "atkjumedia/dcsync", "path": "src/android/service/SyncService.java", "license": "apache-2.0", "size": 6701 }
[ "android.content.Intent", "android.net.ConnectivityManager", "android.os.PowerManager", "at.kju.datacollector.client.Progress" ]
import android.content.Intent; import android.net.ConnectivityManager; import android.os.PowerManager; import at.kju.datacollector.client.Progress;
import android.content.*; import android.net.*; import android.os.*; import at.kju.datacollector.client.*;
[ "android.content", "android.net", "android.os", "at.kju.datacollector" ]
android.content; android.net; android.os; at.kju.datacollector;
2,332,512
@SuppressWarnings("unchecked") protected void buildLine(View view, Object model, CollectionGroup collectionGroup, String bindingPath, List<Action> actions, boolean bindToForm, Object currentLine, int lineIndex) { CollectionLayoutManager layoutManager = (CollectionLayoutManager) collection...
@SuppressWarnings(STR) void function(View view, Object model, CollectionGroup collectionGroup, String bindingPath, List<Action> actions, boolean bindToForm, Object currentLine, int lineIndex) { CollectionLayoutManager layoutManager = (CollectionLayoutManager) collectionGroup.getLayoutManager(); List<? extends Component...
/** * Builds the field instances for the collection line. A copy of the * configured items on the {@code CollectionGroup} is made and adjusted * for the line (id and binding). Then a call is made to the * {@code CollectionLayoutManager} to assemble the line as necessary * for the layout ...
Builds the field instances for the collection line. A copy of the configured items on the CollectionGroup is made and adjusted for the line (id and binding). Then a call is made to the CollectionLayoutManager to assemble the line as necessary for the layout
buildLine
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/container/CollectionGroupBuilder.java", "license": "apache-2.0", "size": 49957 }
[ "java.util.ArrayList", "java.util.List", "org.apache.commons.lang.StringUtils", "org.kuali.rice.krad.uif.UifConstants", "org.kuali.rice.krad.uif.UifPropertyPaths", "org.kuali.rice.krad.uif.component.Component", "org.kuali.rice.krad.uif.control.ControlBase", "org.kuali.rice.krad.uif.element.Action", ...
import java.util.ArrayList; import java.util.List; import org.apache.commons.lang.StringUtils; import org.kuali.rice.krad.uif.UifConstants; import org.kuali.rice.krad.uif.UifPropertyPaths; import org.kuali.rice.krad.uif.component.Component; import org.kuali.rice.krad.uif.control.ControlBase; import org.kuali.rice.krad....
import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.krad.uif.*; import org.kuali.rice.krad.uif.component.*; import org.kuali.rice.krad.uif.control.*; import org.kuali.rice.krad.uif.element.*; import org.kuali.rice.krad.uif.field.*; import org.kuali.rice.krad.uif.layout.*; import org.kuali.rice.k...
[ "java.util", "org.apache.commons", "org.kuali.rice" ]
java.util; org.apache.commons; org.kuali.rice;
1,160,507
static DetailAST getFirstToken(DetailAST ast) { DetailAST first = ast; DetailAST child = ast.getFirstChild(); while (child != null) { final DetailAST toTest = getFirstToken(child); if (toTest.getColumnNo() < first.getColumnNo()) { first = toTest; ...
static DetailAST getFirstToken(DetailAST ast) { DetailAST first = ast; DetailAST child = ast.getFirstChild(); while (child != null) { final DetailAST toTest = getFirstToken(child); if (toTest.getColumnNo() < first.getColumnNo()) { first = toTest; } child = child.getNextSibling(); } return first; }
/** * Searchs in given sub-tree (including given node) for the token * which represents first symbol for this sub-tree in file. * @param ast a root of sub-tree in which the search shoul be performed. * @return a token which occurs first in the file. */
Searchs in given sub-tree (including given node) for the token which represents first symbol for this sub-tree in file
getFirstToken
{ "repo_name": "universsky/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/AbstractExpressionHandler.java", "license": "lgpl-2.1", "size": 20639 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
326,921
public static int getSlotID( Object parent, Object child ) { assert parent instanceof DesignElementHandle; int slotID = -1; if ( child != null ) { slotID = findSlotID( parent, child ); } else { slotID = getDefaultSlotID( parent ); } return slotID; }
static int function( Object parent, Object child ) { assert parent instanceof DesignElementHandle; int slotID = -1; if ( child != null ) { slotID = findSlotID( parent, child ); } else { slotID = getDefaultSlotID( parent ); } return slotID; }
/** * Get the slot id of child If the slot id was not found, returns the * default slot id * * @param parent * @param child * @return slot id */
Get the slot id of child If the slot id was not found, returns the default slot id
getSlotID
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java", "license": "epl-1.0", "size": 91152 }
[ "org.eclipse.birt.report.model.api.DesignElementHandle" ]
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
1,870,394
@Test public final void testMainFileDoesNotExist() throws Exception { thrown.expect(FileNotFoundException.class); CSVSorter.main("--input", testDirectory.resolve("test-does-not-exist.csv").toString(), "--output", testOutput.toAbsolutePath().toString(), "--id-field-index", "0"); ...
final void function() throws Exception { thrown.expect(FileNotFoundException.class); CSVSorter.main(STR, testDirectory.resolve(STR).toString(), STR, testOutput.toAbsolutePath().toString(), STR, "0"); }
/** * Test method for * {@link com.github.ansell.csv.sort.CSVSorter#main(java.lang.String[])}. */
Test method for <code>com.github.ansell.csv.sort.CSVSorter#main(java.lang.String[])</code>
testMainFileDoesNotExist
{ "repo_name": "ansell/csvsum", "path": "src/test/java/com/github/ansell/csv/sort/CSVSorterTest.java", "license": "bsd-2-clause", "size": 11256 }
[ "java.io.FileNotFoundException" ]
import java.io.FileNotFoundException;
import java.io.*;
[ "java.io" ]
java.io;
2,314,312
public BigDecimal getCommittedQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CommittedQty); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CommittedQty); if (bd == null) return Env.ZERO; return bd; }
/** Get Committed Quantity. @return The (legal) commitment Quantity */
Get Committed Quantity
getCommittedQty
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/X_C_Project.java", "license": "gpl-2.0", "size": 24242 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
1,602,670
@ApiModelProperty(value = "Allow files to be edited in Office Online") public Boolean isAllowOfficeOnlineEdit() { return allowOfficeOnlineEdit; }
@ApiModelProperty(value = STR) Boolean function() { return allowOfficeOnlineEdit; }
/** * Allow files to be edited in Office Online * @return allowOfficeOnlineEdit **/
Allow files to be edited in Office Online
isAllowOfficeOnlineEdit
{ "repo_name": "iterate-ch/cyberduck", "path": "storegate/src/main/java/ch/cyberduck/core/storegate/io/swagger/client/model/FileShare.java", "license": "gpl-3.0", "size": 16095 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,132,823
protected Object convertStringToType(String value, String valueType) { if ("java.lang.String".equals(valueType)) return value; Object convertValue = value; if ("java.lang.Integer".equals(valueType) || "int".equals(valueType)) { try { convertValue = ne...
Object function(String value, String valueType) { if (STR.equals(valueType)) return value; Object convertValue = value; if (STR.equals(valueType) "int".equals(valueType)) { try { convertValue = new Integer(value); } catch (NumberFormatException ex) { if (isEcho()) handleErrorOutput(STR + value); } } else if (STR.equals...
/** * Convert string to datatype FIXME How we can transfer values from ant * project reference store (ref)? * * @param value The value * @param valueType The type * @return The converted object */
Convert string to datatype FIXME How we can transfer values from ant project reference store (ref)
convertStringToType
{ "repo_name": "WhiteBearSolutions/WBSAirback", "path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java", "license": "apache-2.0", "size": 22949 }
[ "java.net.InetAddress", "java.net.UnknownHostException", "javax.management.MalformedObjectNameException", "javax.management.ObjectName" ]
import java.net.InetAddress; import java.net.UnknownHostException; import javax.management.MalformedObjectNameException; import javax.management.ObjectName;
import java.net.*; import javax.management.*;
[ "java.net", "javax.management" ]
java.net; javax.management;
2,573,944
public final BigInteger getExponent() { return this.primeExponent; }
final BigInteger function() { return this.primeExponent; }
/** * Returns the prime's exponent. * * @return the primeExponent. */
Returns the prime's exponent
getExponent
{ "repo_name": "md-5/jdk10", "path": "src/java.base/share/classes/java/security/spec/RSAOtherPrimeInfo.java", "license": "gpl-2.0", "size": 3799 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,695,435
void setMetadata(ModuleComponentResolveMetadata metaData);
void setMetadata(ModuleComponentResolveMetadata metaData);
/** * Replaces the meta-data for this result. Must be resolved. */
Replaces the meta-data for this result. Must be resolved
setMetadata
{ "repo_name": "gstevey/gradle", "path": "subprojects/dependency-management/src/main/java/org/gradle/internal/resolve/result/BuildableModuleComponentMetaDataResolveResult.java", "license": "apache-2.0", "size": 2211 }
[ "org.gradle.internal.component.external.model.ModuleComponentResolveMetadata" ]
import org.gradle.internal.component.external.model.ModuleComponentResolveMetadata;
import org.gradle.internal.component.external.model.*;
[ "org.gradle.internal" ]
org.gradle.internal;
979,624
public static HashMap<String, String> buildAcContentDanMuUrl() { HashMap<String, String> map = buildBaseMap(); return map; }
static HashMap<String, String> function() { HashMap<String, String> map = buildBaseMap(); return map; }
/** * http://danmu.aixifan.com * /2522561 * ?app_version=118&sys_name=android&sys_version=5.1.1&market=m360&resolution=1080x1776 * * @return 弹幕信息地址 */
HREF 2522561 ?app_version=118&sys_name=android&sys_version=5.1.1&market=m360&resolution=1080x1776
buildAcContentDanMuUrl
{ "repo_name": "succlz123/BlueTube", "path": "app/src/main/java/org/succlz123/blueboard/model/api/acfun/AcApi.java", "license": "apache-2.0", "size": 11398 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,964,539
public CollectionInfo<ArtifactRest> getBuiltArtifactsForBuildRecord( int pageIndex, int pageSize, String sortingRsql, String query, int buildRecordId) { return queryForCollection(pageIndex, pageSize, sortingRsql, query, withBuildRecordId(buildRecor...
CollectionInfo<ArtifactRest> function( int pageIndex, int pageSize, String sortingRsql, String query, int buildRecordId) { return queryForCollection(pageIndex, pageSize, sortingRsql, query, withBuildRecordId(buildRecordId)); }
/** * Lookups built artifacts for the specified BuildRecord * * @return Returns requested artifacts or empty collection if BuildRecord with the specified ID doesn't exists */
Lookups built artifacts for the specified BuildRecord
getBuiltArtifactsForBuildRecord
{ "repo_name": "matedo1/pnc", "path": "rest/src/main/java/org/jboss/pnc/rest/provider/ArtifactProvider.java", "license": "apache-2.0", "size": 11778 }
[ "org.jboss.pnc.rest.provider.collection.CollectionInfo", "org.jboss.pnc.rest.restmodel.ArtifactRest", "org.jboss.pnc.spi.datastore.predicates.ArtifactPredicates" ]
import org.jboss.pnc.rest.provider.collection.CollectionInfo; import org.jboss.pnc.rest.restmodel.ArtifactRest; import org.jboss.pnc.spi.datastore.predicates.ArtifactPredicates;
import org.jboss.pnc.rest.provider.collection.*; import org.jboss.pnc.rest.restmodel.*; import org.jboss.pnc.spi.datastore.predicates.*;
[ "org.jboss.pnc" ]
org.jboss.pnc;
364,782
@MBeanAttribute(name="Name", description= TYPE + " Name") String getName() throws IOException;
@MBeanAttribute(name="Name", description= TYPE + STR) String getName() throws IOException;
/** * Returns the name of the managed virtualHost. * @return the name of the exchange. * @throws java.io.IOException */
Returns the name of the managed virtualHost
getName
{ "repo_name": "akalankapagoda/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/server/virtualhost/ManagedVirtualHost.java", "license": "apache-2.0", "size": 1458 }
[ "java.io.IOException", "org.wso2.andes.management.common.mbeans.annotations.MBeanAttribute" ]
import java.io.IOException; import org.wso2.andes.management.common.mbeans.annotations.MBeanAttribute;
import java.io.*; import org.wso2.andes.management.common.mbeans.annotations.*;
[ "java.io", "org.wso2.andes" ]
java.io; org.wso2.andes;
602,737
public ServiceCall getAllWithValuesAsync(String localStringPath, String pathItemStringPath, String localStringQuery, String pathItemStringQuery, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("Servi...
ServiceCall function(String localStringPath, String pathItemStringPath, String localStringQuery, String pathItemStringQuery, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } if (localStringPath == null) { serviceCall...
/** * send globalStringPath='globalStringPath', pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', globalStringQuery='globalStringQuery', pathItemStringQuery='pathItemStringQuery', localStringQuery='localStringQuery'. * * @param localStringPath should contain value 'localStringPa...
send globalStringPath='globalStringPath', pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', globalStringQuery='globalStringQuery', pathItemStringQuery='pathItemStringQuery', localStringQuery='localStringQuery'
getAllWithValuesAsync
{ "repo_name": "stankovski/AutoRest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/url/PathItemsOperationsImpl.java", "license": "mit", "size": 40701 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,324,894
private void calculateNormals(Vertex[] vertices, float[][] heightMap) { // Calculates the normal to each face. int idx = 0; for(int j = 0; j < SIZE; j++) { for(int i = 0; i < SIZE; i++) { Vector3f v = new Vector3f(i, heightMap[i][j], j); Vector3f v1 = new Vector3f(i + 1, heightMap[i + 1][j], j); ...
void function(Vertex[] vertices, float[][] heightMap) { int idx = 0; for(int j = 0; j < SIZE; j++) { for(int i = 0; i < SIZE; i++) { Vector3f v = new Vector3f(i, heightMap[i][j], j); Vector3f v1 = new Vector3f(i + 1, heightMap[i + 1][j], j); Vector3f v2 = new Vector3f(i, heightMap[i][j + 1], j + 1); calculateNormal(ver...
/** * Calculates the normals per face. * @param vertices */
Calculates the normals per face
calculateNormals
{ "repo_name": "camilne/open-world", "path": "src/com/camilne/world/Region.java", "license": "apache-2.0", "size": 7978 }
[ "com.camilne.rendering.Vertex", "org.lwjgl.util.vector.Vector3f" ]
import com.camilne.rendering.Vertex; import org.lwjgl.util.vector.Vector3f;
import com.camilne.rendering.*; import org.lwjgl.util.vector.*;
[ "com.camilne.rendering", "org.lwjgl.util" ]
com.camilne.rendering; org.lwjgl.util;
1,420,673
public JobStatus[] jobsToComplete() throws IOException { List<JobStatus> stats = new ArrayList<JobStatus>(); for (JobStatus stat : getAllJobs()) { if (!stat.isJobComplete()) { stats.add(stat); } } return stats.toArray(new JobStatus[0]); }
JobStatus[] function() throws IOException { List<JobStatus> stats = new ArrayList<JobStatus>(); for (JobStatus stat : getAllJobs()) { if (!stat.isJobComplete()) { stats.add(stat); } } return stats.toArray(new JobStatus[0]); }
/** * Get the jobs that are not completed and not failed. * * @return array of {@link JobStatus} for the running/to-be-run jobs. * @throws IOException */
Get the jobs that are not completed and not failed
jobsToComplete
{ "repo_name": "robzor92/hops", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobClient.java", "license": "apache-2.0", "size": 39958 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,049,689
public static JCGLTextureWrapS textureWrapSFromGL( final int wrap) { switch (wrap) { case GL.GL_CLAMP_TO_EDGE: return JCGLTextureWrapS.TEXTURE_WRAP_CLAMP_TO_EDGE; case GL.GL_REPEAT: return JCGLTextureWrapS.TEXTURE_WRAP_REPEAT; case GL.GL_MIRRORED_REPEAT: return JCGL...
static JCGLTextureWrapS function( final int wrap) { switch (wrap) { case GL.GL_CLAMP_TO_EDGE: return JCGLTextureWrapS.TEXTURE_WRAP_CLAMP_TO_EDGE; case GL.GL_REPEAT: return JCGLTextureWrapS.TEXTURE_WRAP_REPEAT; case GL.GL_MIRRORED_REPEAT: return JCGLTextureWrapS.TEXTURE_WRAP_REPEAT_MIRRORED; default: throw new Unreachab...
/** * Convert wrapping modes from GL constants. * * @param wrap The GL constant. * * @return The value. */
Convert wrapping modes from GL constants
textureWrapSFromGL
{ "repo_name": "io7m/jcanephora", "path": "com.io7m.jcanephora.jogl/src/main/java/com/io7m/jcanephora/jogl/JOGLTypeConversions.java", "license": "isc", "size": 42369 }
[ "com.io7m.jcanephora.core.JCGLTextureWrapS", "com.io7m.junreachable.UnreachableCodeException" ]
import com.io7m.jcanephora.core.JCGLTextureWrapS; import com.io7m.junreachable.UnreachableCodeException;
import com.io7m.jcanephora.core.*; import com.io7m.junreachable.*;
[ "com.io7m.jcanephora", "com.io7m.junreachable" ]
com.io7m.jcanephora; com.io7m.junreachable;
1,399,583
InstrumentedType withInitializer(LoadedTypeInitializer loadedTypeInitializer);
InstrumentedType withInitializer(LoadedTypeInitializer loadedTypeInitializer);
/** * Creates a new instrumented type that includes the given {@link net.bytebuddy.implementation.LoadedTypeInitializer}. * * @param loadedTypeInitializer The type initializer to include. * @return A new instrumented type that is equal to this instrumented type but with the additional type initializ...
Creates a new instrumented type that includes the given <code>net.bytebuddy.implementation.LoadedTypeInitializer</code>
withInitializer
{ "repo_name": "PascalSchumacher/byte-buddy", "path": "byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/InstrumentedType.java", "license": "apache-2.0", "size": 24014 }
[ "net.bytebuddy.implementation.LoadedTypeInitializer" ]
import net.bytebuddy.implementation.LoadedTypeInitializer;
import net.bytebuddy.implementation.*;
[ "net.bytebuddy.implementation" ]
net.bytebuddy.implementation;
47,110
public PutRepositoryRequest settings(Settings settings) { this.settings = settings; return this; }
PutRepositoryRequest function(Settings settings) { this.settings = settings; return this; }
/** * Sets the repository settings * * @param settings repository settings * @return this request */
Sets the repository settings
settings
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java", "license": "apache-2.0", "size": 6665 }
[ "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,436,341
private static byte[] ensureCapacity(byte[] bytes, int capacity) { if (bytes.length < capacity) { int newsize = Math.max(1, bytes.length) << 1; bytes = Arrays.copyOf(bytes, newsize); } return bytes; }
static byte[] function(byte[] bytes, int capacity) { if (bytes.length < capacity) { int newsize = Math.max(1, bytes.length) << 1; bytes = Arrays.copyOf(bytes, newsize); } return bytes; }
/** * Utility method used to ensure the capacity of byte array. * * @param bytes * @param size * @param factor * @return */
Utility method used to ensure the capacity of byte array
ensureCapacity
{ "repo_name": "kevinwang1975/NIOFileServer", "path": "src/common/AppUtil.java", "license": "apache-2.0", "size": 9023 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
666,718
public void onUpdate() { if (this.worldObj.isBlockLoaded(new BlockPos(this.posX, 0.0D, this.posZ))) { super.onUpdate(); if (this.isRiding()) { this.sendQueue.addToSendQueue(new C03PacketPlayer.C05PacketPlayerLook(this.rotationYaw, this.rotatio...
void function() { if (this.worldObj.isBlockLoaded(new BlockPos(this.posX, 0.0D, this.posZ))) { super.onUpdate(); if (this.isRiding()) { this.sendQueue.addToSendQueue(new C03PacketPlayer.C05PacketPlayerLook(this.rotationYaw, this.rotationPitch, this.onGround)); this.sendQueue.addToSendQueue(new C0CPacketInput(this.moveS...
/** * Called to update the entity's position/logic. */
Called to update the entity's position/logic
onUpdate
{ "repo_name": "kelthalorn/ConquestCraft", "path": "build/tmp/recompSrc/net/minecraft/client/entity/EntityPlayerSP.java", "license": "lgpl-2.1", "size": 30417 }
[ "net.minecraft.network.play.client.C03PacketPlayer", "net.minecraft.network.play.client.C0CPacketInput", "net.minecraft.util.BlockPos" ]
import net.minecraft.network.play.client.C03PacketPlayer; import net.minecraft.network.play.client.C0CPacketInput; import net.minecraft.util.BlockPos;
import net.minecraft.network.play.client.*; import net.minecraft.util.*;
[ "net.minecraft.network", "net.minecraft.util" ]
net.minecraft.network; net.minecraft.util;
696,132
public Point transformPositionToPixel(double x, double y, double z) { return new Point(transformToPixelX(x), transformToPixelY(y)); }
Point function(double x, double y, double z) { return new Point(transformToPixelX(x), transformToPixelY(y)); }
/** * Transforms real-world coordinates to a pixel which can be painted onto the * current sized canvas. * * @param x Real world X * @param y Real world Y * @param z Real world Z (ignored) * @return Pixel coordinates */
Transforms real-world coordinates to a pixel which can be painted onto the current sized canvas
transformPositionToPixel
{ "repo_name": "CaptFrank/Contiki-Sensor-Node", "path": "Contiki/contiki/tools/cooja/java/se/sics/cooja/plugins/Visualizer.java", "license": "gpl-2.0", "size": 49826 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,105,823
public static Mutation toMutation(Row row, int rowIdOrdinal, List<AccumuloColumnHandle> columns, AccumuloRowSerializer serializer) { // Set our value to the row ID Text value = new Text(); Field rowField = row.getField(rowIdOrdinal); if (rowField.isNull()) { throw new...
static Mutation function(Row row, int rowIdOrdinal, List<AccumuloColumnHandle> columns, AccumuloRowSerializer serializer) { Text value = new Text(); Field rowField = row.getField(rowIdOrdinal); if (rowField.isNull()) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, STR); } setText(rowField, value, serializer); Mu...
/** * Converts a {@link Row} to an Accumulo mutation. * * @param row Row object * @param rowIdOrdinal Ordinal in the list of columns that is the row ID. This isn't checked at all, so I hope you're right. Also, it is expected that the list of column handles is sorted in ordinal order. This is a very ...
Converts a <code>Row</code> to an Accumulo mutation
toMutation
{ "repo_name": "facebook/presto", "path": "presto-accumulo/src/main/java/com/facebook/presto/accumulo/io/AccumuloPageSink.java", "license": "apache-2.0", "size": 12469 }
[ "com.facebook.presto.accumulo.model.AccumuloColumnHandle", "com.facebook.presto.accumulo.model.Field", "com.facebook.presto.accumulo.model.Row", "com.facebook.presto.accumulo.serializers.AccumuloRowSerializer", "com.facebook.presto.spi.PrestoException", "java.util.List", "org.apache.accumulo.core.data.M...
import com.facebook.presto.accumulo.model.AccumuloColumnHandle; import com.facebook.presto.accumulo.model.Field; import com.facebook.presto.accumulo.model.Row; import com.facebook.presto.accumulo.serializers.AccumuloRowSerializer; import com.facebook.presto.spi.PrestoException; import java.util.List; import org.apache....
import com.facebook.presto.accumulo.model.*; import com.facebook.presto.accumulo.serializers.*; import com.facebook.presto.spi.*; import java.util.*; import org.apache.accumulo.core.data.*; import org.apache.hadoop.io.*;
[ "com.facebook.presto", "java.util", "org.apache.accumulo", "org.apache.hadoop" ]
com.facebook.presto; java.util; org.apache.accumulo; org.apache.hadoop;
1,916,751
@Override public Gson getObject() { return this.gson; }
Gson function() { return this.gson; }
/** * Return the created Gson instance. */
Return the created Gson instance
getObject
{ "repo_name": "adini121/molgenis", "path": "molgenis-core/src/main/java/org/molgenis/util/GsonFactoryBean.java", "license": "lgpl-3.0", "size": 3324 }
[ "com.google.gson.Gson" ]
import com.google.gson.Gson;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
872,519
@Override public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) o; info.setConnectionId((ConnectionId) tightUnmarsal...
void function(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) o; info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setSubcripti...
/** * Un-marshal an object instance from the data input stream * * @param o * the object to un-marshal * @param dataIn * the data input stream to build the object from * @throws IOException */
Un-marshal an object instance from the data input stream
tightUnmarshal
{ "repo_name": "tabish121/OpenWire", "path": "openwire-legacy/src/main/java/io/openwire/codec/v7/RemoveSubscriptionInfoMarshaller.java", "license": "apache-2.0", "size": 4922 }
[ "io.openwire.codec.BooleanStream", "io.openwire.codec.OpenWireFormat", "io.openwire.commands.ConnectionId", "io.openwire.commands.RemoveSubscriptionInfo", "java.io.DataInput", "java.io.IOException" ]
import io.openwire.codec.BooleanStream; import io.openwire.codec.OpenWireFormat; import io.openwire.commands.ConnectionId; import io.openwire.commands.RemoveSubscriptionInfo; import java.io.DataInput; import java.io.IOException;
import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*;
[ "io.openwire.codec", "io.openwire.commands", "java.io" ]
io.openwire.codec; io.openwire.commands; java.io;
209,323
private List<double[]> generateWeights(int divisions) { List<double[]> result = new ArrayList<double[]>(); double[] weight = new double[numObj]; generateRecursive(result, weight, numObj, divisions, divisions, 0); return result; }
List<double[]> function(int divisions) { List<double[]> result = new ArrayList<double[]>(); double[] weight = new double[numObj]; generateRecursive(result, weight, numObj, divisions, divisions, 0); return result; }
/** * Generates the reference points (weights) for the given number of * divisions. * * @param divisions the number of divisions * @return the list of reference points */
Generates the reference points (weights) for the given number of divisions
generateWeights
{ "repo_name": "UM-LPM/EARS", "path": "src/org/um/feri/ears/algorithms/moo/dbea/DBEA.java", "license": "gpl-3.0", "size": 31395 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
372,377
public void onFocus(Tab newFocusTab) { if (connector.hasEventListener(EventId.FOCUS)) { // Send the focus event only first time when we focus on any // tab. The focused tab will be reseted on the last blur. if (focusedTab == null) { ...
void function(Tab newFocusTab) { if (connector.hasEventListener(EventId.FOCUS)) { if (focusedTab == null) { connector.getRpcProxy(FocusAndBlurServerRpc.class).focus(); } } cancelLastBlurSchedule(); setFocusedTab(newFocusTab); }
/** * Delegate method for the onFocus event occurring on Tab. * * @since 7.2.6 * @param newFocusTab * the new focused tab. * @see #onBlur(Tab) */
Delegate method for the onFocus event occurring on Tab
onFocus
{ "repo_name": "Darsstar/framework", "path": "client/src/main/java/com/vaadin/client/ui/VTabsheet.java", "license": "apache-2.0", "size": 67081 }
[ "com.vaadin.shared.EventId", "com.vaadin.shared.communication.FieldRpc" ]
import com.vaadin.shared.EventId; import com.vaadin.shared.communication.FieldRpc;
import com.vaadin.shared.*; import com.vaadin.shared.communication.*;
[ "com.vaadin.shared" ]
com.vaadin.shared;
2,486,464
public boolean isConnected(String context) { AxonServerConnection channel = connections.get(context); return channel != null && channel.isConnected(); }
boolean function(String context) { AxonServerConnection channel = connections.get(context); return channel != null && channel.isConnected(); }
/** * Returns {@code true} if a gRPC channel for the specific context is opened between client and AxonServer. * * @param context the (Bounded) Context for for which is verified the AxonServer connection through the gRPC * channel * @return if the gRPC channel is opened, false ot...
Returns true if a gRPC channel for the specific context is opened between client and AxonServer
isConnected
{ "repo_name": "krosenvold/AxonFramework", "path": "axon-server-connector/src/main/java/org/axonframework/axonserver/connector/AxonServerConnectionManager.java", "license": "apache-2.0", "size": 12027 }
[ "io.axoniq.axonserver.connector.AxonServerConnection" ]
import io.axoniq.axonserver.connector.AxonServerConnection;
import io.axoniq.axonserver.connector.*;
[ "io.axoniq.axonserver" ]
io.axoniq.axonserver;
2,841,023
@Column(name = "attr_value", nullable = false) public String getAttrValue() { return this.attrValue; }
@Column(name = STR, nullable = false) String function() { return this.attrValue; }
/** * Get the attribute value * * @return The value */
Get the attribute value
getAttrValue
{ "repo_name": "anu-doi/metadata-stores", "path": "store/src/main/java/au/edu/anu/metadatastores/datamodel/store/ItemAttribute.java", "license": "gpl-3.0", "size": 7579 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,855,513
@Override public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { // Call the super method first. super.createControls(parent, aTabbedPropertySheetPage); // parent has a FillLayout! GridData gridData; // Get the background color. Color bg = parent....
void function(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { super.createControls(parent, aTabbedPropertySheetPage); GridData gridData; Color bg = parent.getBackground(); Composite composite = new Group(parent, SWT.NONE); disposableControls.add(composite); composite.setLayout(new GridLayout(1, fa...
/** * Creates the controls displayed in the section. */
Creates the controls displayed in the section
createControls
{ "repo_name": "gorindn/ice", "path": "src/org.eclipse.ice.viz.service.mesh/src/org/eclipse/ice/viz/service/mesh/properties/BoundaryConditionSection.java", "license": "epl-1.0", "size": 18572 }
[ "org.eclipse.ice.viz.service.mesh.datastructures.BoundaryConditionType", "org.eclipse.swt.graphics.Color", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Combo", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Group", "org.eclipse.swt.wid...
import org.eclipse.ice.viz.service.mesh.datastructures.BoundaryConditionType; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Group; imp...
import org.eclipse.ice.viz.service.mesh.datastructures.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.views.properties.tabbed.*;
[ "org.eclipse.ice", "org.eclipse.swt", "org.eclipse.ui" ]
org.eclipse.ice; org.eclipse.swt; org.eclipse.ui;
429,758
static void removeErasureCodingPolicy(final FSNamesystem fsn, String ecPolicyName, final boolean logRetryCache) throws IOException { Preconditions.checkNotNull(ecPolicyName); fsn.getErasureCodingPolicyManager().removePolicy(ecPolicyName); fsn.getEditLog().logRemoveErasureCodingPolicy(ecPolicyName, l...
static void removeErasureCodingPolicy(final FSNamesystem fsn, String ecPolicyName, final boolean logRetryCache) throws IOException { Preconditions.checkNotNull(ecPolicyName); fsn.getErasureCodingPolicyManager().removePolicy(ecPolicyName); fsn.getEditLog().logRemoveErasureCodingPolicy(ecPolicyName, logRetryCache); }
/** * Remove an erasure coding policy. * * @param fsn namespace * @param ecPolicyName the name of the policy to be removed * @param logRetryCache whether to record RPC ids in editlog for retry cache * rebuilding * @throws IOException */
Remove an erasure coding policy
removeErasureCodingPolicy
{ "repo_name": "wenxinhe/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirErasureCodingOp.java", "license": "apache-2.0", "size": 16510 }
[ "com.google.common.base.Preconditions", "java.io.IOException" ]
import com.google.common.base.Preconditions; import java.io.IOException;
import com.google.common.base.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
846,570
@Test public void testState() throws Exception { Ignite ignite = startGrids(1); assertFalse(ignite.cluster().active()); injectTestSystemOut(); assertEquals(EXIT_CODE_OK, execute("--state")); assertContains(log, testOut.toString(), "Cluster is inactive"); igni...
void function() throws Exception { Ignite ignite = startGrids(1); assertFalse(ignite.cluster().active()); injectTestSystemOut(); assertEquals(EXIT_CODE_OK, execute(STR)); assertContains(log, testOut.toString(), STR); ignite.cluster().active(true); assertTrue(ignite.cluster().active()); assertEquals(EXIT_CODE_OK, execut...
/** * Test cluster active state works via control.sh * * @throws Exception If failed. */
Test cluster active state works via control.sh
testState
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java", "license": "apache-2.0", "size": 67072 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.testframework.GridTestUtils" ]
import org.apache.ignite.Ignite; import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.*; import org.apache.ignite.testframework.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,718,172
public Point2DExpression intersectionWith(Line2DResult crossingLine) { return new Point2DExpression(new LineLineWithPoint2DResult(this, new Line2DExpression(crossingLine)) {
Point2DExpression function(Line2DResult crossingLine) { return new Point2DExpression(new LineLineWithPoint2DResult(this, new Line2DExpression(crossingLine)) {
/** * Find a point where this line and the other line cross. * * <p> * Multiple line segments means it may cross at several points, however this * method only reports the first point found. * * <p> * Use {@link #intersectionPoints(nz.co.gregs.dbvolution.results.Line2DResult) } to find the intersection ...
Find a point where this line and the other line cross. Multiple line segments means it may cross at several points, however this method only reports the first point found. Use <code>#intersectionPoints(nz.co.gregs.dbvolution.results.Line2DResult) </code> to find the intersection points of these lines
intersectionWith
{ "repo_name": "gregorydgraham/DBvolution", "path": "src/main/java/nz/co/gregs/dbvolution/expressions/Line2DExpression.java", "license": "apache-2.0", "size": 39742 }
[ "nz.co.gregs.dbvolution.results.Line2DResult" ]
import nz.co.gregs.dbvolution.results.Line2DResult;
import nz.co.gregs.dbvolution.results.*;
[ "nz.co.gregs" ]
nz.co.gregs;
1,043,056
public List<String> expandedMakeVariablesList(String attrName) { List<String> variables = new ArrayList<>(); for (String variable : attributes().get(attrName, Type.STRING_LIST)) { variables.add(expandMakeVariables(attrName, variable)); } return variables; }
List<String> function(String attrName) { List<String> variables = new ArrayList<>(); for (String variable : attributes().get(attrName, Type.STRING_LIST)) { variables.add(expandMakeVariables(attrName, variable)); } return variables; }
/** * Gets the value of the STRING_LIST attribute expanding all make variables. */
Gets the value of the STRING_LIST attribute expanding all make variables
expandedMakeVariablesList
{ "repo_name": "mrdomino/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java", "license": "apache-2.0", "size": 82752 }
[ "com.google.devtools.build.lib.syntax.Type", "java.util.ArrayList", "java.util.List" ]
import com.google.devtools.build.lib.syntax.Type; import java.util.ArrayList; import java.util.List;
import com.google.devtools.build.lib.syntax.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
1,018,847
public void requestRemoveFailedNode(int nodeId) { this.enqueue(new RemoveFailedNodeMessageClass().doRequest(nodeId)); }
void function(int nodeId) { this.enqueue(new RemoveFailedNodeMessageClass().doRequest(nodeId)); }
/** * Removes a failed node from the network. Note that this won't remove nodes * that have not failed. * * @param nodeId * The address of the node to remove */
Removes a failed node from the network. Note that this won't remove nodes that have not failed
requestRemoveFailedNode
{ "repo_name": "mickey4u/new_mart", "path": "addons/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java", "license": "epl-1.0", "size": 56021 }
[ "org.openhab.binding.zwave.internal.protocol.serialmessage.RemoveFailedNodeMessageClass" ]
import org.openhab.binding.zwave.internal.protocol.serialmessage.RemoveFailedNodeMessageClass;
import org.openhab.binding.zwave.internal.protocol.serialmessage.*;
[ "org.openhab.binding" ]
org.openhab.binding;
238,601
private void pushSuccessors(IBasicBlock b) { for (IBasicBlock succ_block : b.getSuccessors()) if (visitedEdges.add(new Edge(b, succ_block))) toDo.push(succ_block); }
void function(IBasicBlock b) { for (IBasicBlock succ_block : b.getSuccessors()) if (visitedEdges.add(new Edge(b, succ_block))) toDo.push(succ_block); }
/** * Traverse any previously-untraversed edges * by adding the destination block to the to-do stack. * @param b the current block. */
Traverse any previously-untraversed edges by adding the destination block to the to-do stack
pushSuccessors
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/abc/graph/algorithms/DepthFirstPreorderIterator.java", "license": "apache-2.0", "size": 4193 }
[ "org.apache.flex.abc.graph.IBasicBlock" ]
import org.apache.flex.abc.graph.IBasicBlock;
import org.apache.flex.abc.graph.*;
[ "org.apache.flex" ]
org.apache.flex;
2,044,177
public final Map<String, String> authenticationHeaders(String HTTPMethod, String queryString, Map<String,String>xHeaders) { String currentUTC=getCurrentUTC(); return authenticationHeaders(HTTPMethod, queryString, xHeaders, currentUTC); }
final Map<String, String> function(String HTTPMethod, String queryString, Map<String,String>xHeaders) { String currentUTC=getCurrentUTC(); return authenticationHeaders(HTTPMethod, queryString, xHeaders, currentUTC); }
/** * Calculate the authentication headers to be sent with a request to the API * @param HTTPMethod the HTTP Method, currently only GET is supported * @param queryString the urlencoded string including the path (from the first forward slash) and the parameters * @param xHeaders HTTP headers specific to the 11-p...
Calculate the authentication headers to be sent with a request to the API
authenticationHeaders
{ "repo_name": "ElevenPaths/latch-plugin-open-xchange", "path": "src/main/java/com/elevenpaths/latch/Latch.java", "license": "lgpl-2.1", "size": 9485 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,954,329
private List<BlacklistFilter> getEnabledFilters() { List<BlacklistFilter> filters = new LinkedList<BlacklistFilter>(); if (getBooleanParameter(PARAM_ENABLE_FILTER_USER_ID)) { filters.add(new UserIdFilter()); LOG.debug("UserIdFilter enabled"); } if (ge...
List<BlacklistFilter> function() { List<BlacklistFilter> filters = new LinkedList<BlacklistFilter>(); if (getBooleanParameter(PARAM_ENABLE_FILTER_USER_ID)) { filters.add(new UserIdFilter()); LOG.debug(STR); } if (getBooleanParameter(PARAM_ENABLE_FILTER_NAME)) { filters.add(new NameFilter()); LOG.debug(STR); } if (getBo...
/** * Returns a list of enabled blacklist filters */
Returns a list of enabled blacklist filters
getEnabledFilters
{ "repo_name": "PaloAlto/jbilling", "path": "classes/com/sapienter/jbilling/server/payment/tasks/PaymentFilterTask.java", "license": "agpl-3.0", "size": 8554 }
[ "com.sapienter.jbilling.server.payment.blacklist.AddressFilter", "com.sapienter.jbilling.server.payment.blacklist.BlacklistFilter", "com.sapienter.jbilling.server.payment.blacklist.CreditCardFilter", "com.sapienter.jbilling.server.payment.blacklist.IpAddressFilter", "com.sapienter.jbilling.server.payment.bl...
import com.sapienter.jbilling.server.payment.blacklist.AddressFilter; import com.sapienter.jbilling.server.payment.blacklist.BlacklistFilter; import com.sapienter.jbilling.server.payment.blacklist.CreditCardFilter; import com.sapienter.jbilling.server.payment.blacklist.IpAddressFilter; import com.sapienter.jbilling.ser...
import com.sapienter.jbilling.server.payment.blacklist.*; import java.util.*;
[ "com.sapienter.jbilling", "java.util" ]
com.sapienter.jbilling; java.util;
2,780,611
SpanKind getKind();
SpanKind getKind();
/** * Returns the kind of this {@code Span}. * * @return the kind of this {@code Span}. */
Returns the kind of this Span
getKind
{ "repo_name": "open-telemetry/opentelemetry-java", "path": "sdk/trace/src/main/java/io/opentelemetry/sdk/trace/data/SpanData.java", "license": "apache-2.0", "size": 4583 }
[ "io.opentelemetry.api.trace.SpanKind" ]
import io.opentelemetry.api.trace.SpanKind;
import io.opentelemetry.api.trace.*;
[ "io.opentelemetry.api" ]
io.opentelemetry.api;
530,809
public void fireNotifyChanged(Notification notification) { changeNotifier.fireNotifyChanged(notification); if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(notification); } }
void function(Notification notification) { changeNotifier.fireNotifyChanged(notification); if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(notification); } }
/** * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- * end-user-doc * --> * * @generated */
This delegates to <code>#changeNotifier</code> and to <code>#parentAdapterFactory</code>.
fireNotifyChanged
{ "repo_name": "edgarmueller/emfstore-rest", "path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/provider/VersioningItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 18587 }
[ "org.eclipse.emf.common.notify.Notification" ]
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,904,575
public long singletonLong() throws RpcException { RowSet rowSet = rowSet(); if (rowSet == null) { throw new IllegalStateException("No rows returned"); } RowSetReader reader = rowSet.reader(); reader.next(); long value = reader.column(0).getLong(); rowSet.clear(); return value; ...
long function() throws RpcException { RowSet rowSet = rowSet(); if (rowSet == null) { throw new IllegalStateException(STR); } RowSetReader reader = rowSet.reader(); reader.next(); long value = reader.column(0).getLong(); rowSet.clear(); return value; }
/** * Run the query that is expected to return (at least) one row * with the only (or first) column returning a long value. * The long value cannot be null. * * @return the value of the first column of the first row * @throws RpcException if anything goes wrong */
Run the query that is expected to return (at least) one row with the only (or first) column returning a long value. The long value cannot be null
singletonLong
{ "repo_name": "akumarb2010/incubator-drill", "path": "exec/java-exec/src/test/java/org/apache/drill/test/QueryBuilder.java", "license": "apache-2.0", "size": 18564 }
[ "org.apache.drill.exec.rpc.RpcException", "org.apache.drill.test.rowSet.RowSet" ]
import org.apache.drill.exec.rpc.RpcException; import org.apache.drill.test.rowSet.RowSet;
import org.apache.drill.exec.rpc.*; import org.apache.drill.test.*;
[ "org.apache.drill" ]
org.apache.drill;
1,609,034
@Test public void testMoveMessagesWithFilter() throws Exception { SimpleString key = new SimpleString("key"); long matchingValue = RandomUtil.randomLong(); long unmatchingValue = matchingValue + 1; SimpleString address = RandomUtil.randomSimpleString(); SimpleString queue = RandomUt...
void function() throws Exception { SimpleString key = new SimpleString("key"); long matchingValue = RandomUtil.randomLong(); long unmatchingValue = matchingValue + 1; SimpleString address = RandomUtil.randomSimpleString(); SimpleString queue = RandomUtil.randomSimpleString(); SimpleString otherAddress = RandomUtil.rand...
/** * <ol> * <li>send 2 message to queue</li> * <li>move messages from queue to otherQueue using management method <em>with filter</em></li> * <li>consume the message which <strong>did not</strong> matches the filter from queue</li> * <li>consume the message which <strong>did</strong> matches the fi...
send 2 message to queue move messages from queue to otherQueue using management method with filter consume the message which did not matches the filter from queue consume the message which did matches the filter from otherQueue
testMoveMessagesWithFilter
{ "repo_name": "l-dobrev/activemq-artemis", "path": "tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java", "license": "apache-2.0", "size": 79533 }
[ "org.apache.activemq.artemis.api.core.SimpleString", "org.apache.activemq.artemis.api.core.client.ClientConsumer", "org.apache.activemq.artemis.api.core.client.ClientMessage", "org.apache.activemq.artemis.api.core.client.ClientProducer", "org.apache.activemq.artemis.api.core.management.QueueControl", "org...
import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.client.ClientConsumer; import org.apache.activemq.artemis.api.core.client.ClientMessage; import org.apache.activemq.artemis.api.core.client.ClientProducer; import org.apache.activemq.artemis.api.core.management.QueueCo...
import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.api.core.client.*; import org.apache.activemq.artemis.api.core.management.*; import org.apache.activemq.artemis.utils.*; import org.junit.*;
[ "org.apache.activemq", "org.junit" ]
org.apache.activemq; org.junit;
585,836
@Nonnull public OrElse<T> on(@Nonnull Choice.WithWeight... choices) { return on(Arrays.asList(choices)); }
OrElse<T> function(@Nonnull Choice.WithWeight... choices) { return on(Arrays.asList(choices)); }
/** * Define the "choices" * * @param choices the choices * @return the DSL component for defining the "else" block */
Define the "choices"
on
{ "repo_name": "gatling/gatling", "path": "gatling-core-java/src/main/java/io/gatling/javaapi/core/condition/RandomSwitchOrElse.java", "license": "apache-2.0", "size": 3496 }
[ "io.gatling.javaapi.core.Choice", "java.util.Arrays", "javax.annotation.Nonnull" ]
import io.gatling.javaapi.core.Choice; import java.util.Arrays; import javax.annotation.Nonnull;
import io.gatling.javaapi.core.*; import java.util.*; import javax.annotation.*;
[ "io.gatling.javaapi", "java.util", "javax.annotation" ]
io.gatling.javaapi; java.util; javax.annotation;
1,547,539
public void testALF11964_part2() { IntegrityChecker integrityChecker = (IntegrityChecker) ctx.getBean("integrityChecker"); PropertyMap props = new PropertyMap(); // Need to create a potentially recursive node structure props.put(ContentModel.PROP_NODE_UUID, "nodeOn...
void function() { IntegrityChecker integrityChecker = (IntegrityChecker) ctx.getBean(STR); PropertyMap props = new PropertyMap(); props.put(ContentModel.PROP_NODE_UUID, STR); NodeRef nodeOne = nodeService.createNode( rootNodeRef, ContentModel.ASSOC_CHILDREN, ContentModel.ASSOC_CHILDREN, ContentModel.TYPE_CONTAINER, pro...
/** * Tests copying a folder that contains both a checked-out node and its working copy. */
Tests copying a folder that contains both a checked-out node and its working copy
testALF11964_part2
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/test/java/org/alfresco/repo/copy/CopyServiceImplTest.java", "license": "lgpl-3.0", "size": 72406 }
[ "org.alfresco.model.ContentModel", "org.alfresco.repo.node.integrity.IntegrityChecker", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.util.PropertyMap" ]
import org.alfresco.model.ContentModel; import org.alfresco.repo.node.integrity.IntegrityChecker; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.util.PropertyMap;
import org.alfresco.model.*; import org.alfresco.repo.node.integrity.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.util.*;
[ "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service", "org.alfresco.util" ]
org.alfresco.model; org.alfresco.repo; org.alfresco.service; org.alfresco.util;
85,542
private void getCol(List<String> rowList) { int colNo = 0; for (GobiiFileColumn column : processedInstruction.getColumnList()) { if(column.getGobiiColumnType().equals(GobiiColumnType.CSV_COLUMN)){ rowList.set(colNo, HelperFunctions.filter(rowList.get(colNo), column.getFilterFrom(), column.getFilterTo(), ...
void function(List<String> rowList) { int colNo = 0; for (GobiiFileColumn column : processedInstruction.getColumnList()) { if(column.getGobiiColumnType().equals(GobiiColumnType.CSV_COLUMN)){ rowList.set(colNo, HelperFunctions.filter(rowList.get(colNo), column.getFilterFrom(), column.getFilterTo(), column.getFindText(),...
/** * Applying filter on the column data. * Parses all the columns to identify CSV_COLUMN to identify the required columns. * @param rowList List of the required columns required. */
Applying filter on the column data. Parses all the columns to identify CSV_COLUMN to identify the required columns
getCol
{ "repo_name": "gobiiproject/GOBii-System", "path": "gobiiproject/gobii-process/src/main/java/org/gobiiproject/gobiiprocess/digester/csv/CSVFileReaderV2.java", "license": "mit", "size": 16886 }
[ "java.util.List", "org.gobiiproject.gobiimodel.dto.instructions.loader.GobiiFileColumn", "org.gobiiproject.gobiimodel.types.GobiiColumnType", "org.gobiiproject.gobiimodel.utils.HelperFunctions" ]
import java.util.List; import org.gobiiproject.gobiimodel.dto.instructions.loader.GobiiFileColumn; import org.gobiiproject.gobiimodel.types.GobiiColumnType; import org.gobiiproject.gobiimodel.utils.HelperFunctions;
import java.util.*; import org.gobiiproject.gobiimodel.dto.instructions.loader.*; import org.gobiiproject.gobiimodel.types.*; import org.gobiiproject.gobiimodel.utils.*;
[ "java.util", "org.gobiiproject.gobiimodel" ]
java.util; org.gobiiproject.gobiimodel;
2,609,533
List<GroupInfo> includedGroups() throws RestApiException; /** * Add groups to be included in this one. * * @param groups list of group identifiers, in any format accepted by * {@link Groups#id(String)}
List<GroupInfo> includedGroups() throws RestApiException; /** * Add groups to be included in this one. * * @param groups list of group identifiers, in any format accepted by * {@link Groups#id(String)}
/** * List included groups. * * @return included groups. * @throws RestApiException */
List included groups
includedGroups
{ "repo_name": "vogellacompany/gerrit-rest-java-client", "path": "src/main/java/com/google/gerrit/extensions/api/groups/GroupApi.java", "license": "apache-2.0", "size": 3851 }
[ "com.google.gerrit.extensions.common.GroupInfo", "com.google.gerrit.extensions.restapi.RestApiException", "java.util.List" ]
import com.google.gerrit.extensions.common.GroupInfo; import com.google.gerrit.extensions.restapi.RestApiException; import java.util.List;
import com.google.gerrit.extensions.common.*; import com.google.gerrit.extensions.restapi.*; import java.util.*;
[ "com.google.gerrit", "java.util" ]
com.google.gerrit; java.util;
45,430
@Override public Status insert(String table, String key, Map<String, ByteIterator> values) { return update(table, key, values); }
Status function(String table, String key, Map<String, ByteIterator> values) { return update(table, key, values); }
/** * Insert a record in the database. Any field/value pairs in the specified * values HashMap will be written into the record with the specified record * key. * * @param table * The name of the table * @param key * The record key of the record to insert. * @param values ...
Insert a record in the database. Any field/value pairs in the specified values HashMap will be written into the record with the specified record key
insert
{ "repo_name": "ChristianNavolskyi/YCSB", "path": "hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java", "license": "apache-2.0", "size": 17436 }
[ "com.yahoo.ycsb.ByteIterator", "com.yahoo.ycsb.Status", "java.util.Map" ]
import com.yahoo.ycsb.ByteIterator; import com.yahoo.ycsb.Status; import java.util.Map;
import com.yahoo.ycsb.*; import java.util.*;
[ "com.yahoo.ycsb", "java.util" ]
com.yahoo.ycsb; java.util;
801,144
public RoleAssignmentResourceFormatInner withViews(ResourceSetDescription views) { this.views = views; return this; }
RoleAssignmentResourceFormatInner function(ResourceSetDescription views) { this.views = views; return this; }
/** * Set the views value. * * @param views the views value to set * @return the RoleAssignmentResourceFormatInner object itself. */
Set the views value
withViews
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/RoleAssignmentResourceFormatInner.java", "license": "mit", "size": 13824 }
[ "com.microsoft.azure.management.customerinsights.ResourceSetDescription" ]
import com.microsoft.azure.management.customerinsights.ResourceSetDescription;
import com.microsoft.azure.management.customerinsights.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
725,393
public static final synchronized void removeRuntimeManager(QName serviceDomainName, QName serviceName) { putRuntimeManager(serviceDomainName, serviceName, null); } private KnowledgeRuntimeManagerRegistry() {}
static final synchronized void function(QName serviceDomainName, QName serviceName) { putRuntimeManager(serviceDomainName, serviceName, null); } private KnowledgeRuntimeManagerRegistry() {}
/** * Removes a runtime manager. * @param serviceDomainName the service domain name * @param serviceName the service name */
Removes a runtime manager
removeRuntimeManager
{ "repo_name": "mariofusco/fuse-bxms-integ", "path": "switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/runtime/KnowledgeRuntimeManagerRegistry.java", "license": "apache-2.0", "size": 3052 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
2,175,280
protected void begin () { if (applying) throw new GdxRuntimeException("You must call end() after each call to being()"); applying = true; }
void function () { if (applying) throw new GdxRuntimeException(STR); applying = true; }
/** Begin applying multiple animations to the instance, must followed by one or more calls to { * {@link #apply(Animation, float, float)} and finally {{@link #end()}. */
Begin applying multiple animations to the instance, must followed by one or more calls to {
begin
{ "repo_name": "gf11speed/libgdx", "path": "gdx/src/com/badlogic/gdx/graphics/g3d/utils/BaseAnimationController.java", "license": "apache-2.0", "size": 11808 }
[ "com.badlogic.gdx.utils.GdxRuntimeException" ]
import com.badlogic.gdx.utils.GdxRuntimeException;
import com.badlogic.gdx.utils.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,536,222
public ServiceFuture<PolicyDescriptionCollectionInner> listByServiceAsync(String resourceGroupName, String serviceName, PolicyScopeContract scope, final ServiceCallback<PolicyDescriptionCollectionInner> serviceCallback) { return ServiceFuture.fromResponse(listByServiceWithServiceResponseAsync(resourceGroupN...
ServiceFuture<PolicyDescriptionCollectionInner> function(String resourceGroupName, String serviceName, PolicyScopeContract scope, final ServiceCallback<PolicyDescriptionCollectionInner> serviceCallback) { return ServiceFuture.fromResponse(listByServiceWithServiceResponseAsync(resourceGroupName, serviceName, scope), ser...
/** * Lists all policy descriptions. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param scope Policy scope. Possible values include: 'Tenant', 'Product', 'Api', 'Operation', 'All' * @param serviceCallback the a...
Lists all policy descriptions
listByServiceAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_12_01/implementation/PolicyDescriptionsInner.java", "license": "mit", "size": 12637 }
[ "com.microsoft.azure.management.apimanagement.v2019_12_01.PolicyScopeContract", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.apimanagement.v2019_12_01.PolicyScopeContract; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.apimanagement.v2019_12_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,465,683
public final void leave(GoogleApiClient apiClient) { try { Log.d(TAG, "leave"); JSONObject payload = new JSONObject(); payload.put(KEY_COMMAND, KEY_LEAVE); sendMessage(apiClient, payload.toString()); } catch (JSONException e) { Log.e(TAG, "...
final void function(GoogleApiClient apiClient) { try { Log.d(TAG, "leave"); JSONObject payload = new JSONObject(); payload.put(KEY_COMMAND, KEY_LEAVE); sendMessage(apiClient, payload.toString()); } catch (JSONException e) { Log.e(TAG, STR, e); } }
/** * Sends a command to leave the current game. */
Sends a command to leave the current game
leave
{ "repo_name": "freecast/cast-android-tictactoe", "path": "src/com/google/cast/samples/tictactoe/GameChannel.java", "license": "apache-2.0", "size": 13234 }
[ "android.util.Log", "com.google.android.gms.common.api.GoogleApiClient", "org.json.JSONException", "org.json.JSONObject" ]
import android.util.Log; import com.google.android.gms.common.api.GoogleApiClient; import org.json.JSONException; import org.json.JSONObject;
import android.util.*; import com.google.android.gms.common.api.*; import org.json.*;
[ "android.util", "com.google.android", "org.json" ]
android.util; com.google.android; org.json;
1,467,179
void getClippingRect(Rect outClippingRect);
void getClippingRect(Rect outClippingRect);
/** * Get rectangular bounds to which view is currently clipped to. Called only on views that has set * {@code removeCLippedSubviews} property value to {@code true}. * * @param outClippingRect output clipping rect should be written to this object. */
Get rectangular bounds to which view is currently clipped to. Called only on views that has set removeCLippedSubviews property value to true
getClippingRect
{ "repo_name": "Ten-Wang/hackfoldr-android", "path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactClippingViewGroup.java", "license": "apache-2.0", "size": 2757 }
[ "android.graphics.Rect" ]
import android.graphics.Rect;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,046,296
Vector3d center();
Vector3d center();
/** * Returns the center of the box, halfway between each corner. * * @return The center */
Returns the center of the box, halfway between each corner
center
{ "repo_name": "SpongePowered/SpongeAPI", "path": "src/main/java/org/spongepowered/api/util/AABB.java", "license": "mit", "size": 8084 }
[ "org.spongepowered.math.vector.Vector3d" ]
import org.spongepowered.math.vector.Vector3d;
import org.spongepowered.math.vector.*;
[ "org.spongepowered.math" ]
org.spongepowered.math;
480,076
@Test public void testUrlMatchesPattern() { String expectedDescription = "With this awesome plugin, I control the description! Bwuhuhuhaha!"; String expectedKeywords = "Breathtaking! Riveting! Two Thumbs Up!"; String expectedAuthor = "Peter D. Ciuffetti"; String indexReplaceProperty = " urlmatch=.*....
void function() { String expectedDescription = STR; String expectedKeywords = STR; String expectedAuthor = STR; String indexReplaceProperty = STR + STR + STR + STR; Configuration conf = NutchConfiguration.create(); conf.set( STR, STR); conf.set(INDEX_REPLACE_PROPERTY, indexReplaceProperty); conf.set(STR, STR); conf.set...
/** * Test URL pattern matching */
Test URL pattern matching
testUrlMatchesPattern
{ "repo_name": "commoncrawl/nutch", "path": "src/plugin/index-replace/src/test/org/apache/nutch/indexer/replace/TestIndexReplace.java", "license": "apache-2.0", "size": 19391 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.nutch.indexer.NutchDocument", "org.apache.nutch.util.NutchConfiguration", "org.junit.Assert" ]
import org.apache.hadoop.conf.Configuration; import org.apache.nutch.indexer.NutchDocument; import org.apache.nutch.util.NutchConfiguration; import org.junit.Assert;
import org.apache.hadoop.conf.*; import org.apache.nutch.indexer.*; import org.apache.nutch.util.*; import org.junit.*;
[ "org.apache.hadoop", "org.apache.nutch", "org.junit" ]
org.apache.hadoop; org.apache.nutch; org.junit;
555,424
public void setLocale( Locale locale ) { _locale = locale; }
void function( Locale locale ) { _locale = locale; }
/** * Implements Localizable * * @param locale * The current locale */
Implements Localizable
setLocale
{ "repo_name": "rzara/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/rbac/Permission.java", "license": "bsd-3-clause", "size": 3148 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,632,092
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; }
void function(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; }
/** * This sets the composed adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This sets the composed adapter factory that contains this factory.
setParentAdapterFactory
{ "repo_name": "maybeec/oomph-task-download", "path": "task-download.edit/src/com/github/maybeec/oomph/task/download/provider/downloadItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 12854 }
[ "org.eclipse.emf.edit.provider.ComposedAdapterFactory" ]
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,690,099
List<Role> getRoles();
List<Role> getRoles();
/** * Returns all Roles ordered by name * @return populated list of roles */
Returns all Roles ordered by name
getRoles
{ "repo_name": "boip/YCSrch", "path": "YCSrch/src/com/yucheng/srch/dao/LookupDao.java", "license": "apache-2.0", "size": 532 }
[ "com.yucheng.srch.model.Role", "java.util.List" ]
import com.yucheng.srch.model.Role; import java.util.List;
import com.yucheng.srch.model.*; import java.util.*;
[ "com.yucheng.srch", "java.util" ]
com.yucheng.srch; java.util;
1,247,855
public static final boolean isNeverLink(RuleContext ruleContext) { return ruleContext.getRule().isAttrDefined("neverlink", Type.BOOLEAN) && ruleContext.attributes().get("neverlink", Type.BOOLEAN); }
static final boolean function(RuleContext ruleContext) { return ruleContext.getRule().isAttrDefined(STR, Type.BOOLEAN) && ruleContext.attributes().get(STR, Type.BOOLEAN); }
/** * Returns true if and only if this target has the neverlink attribute set to * 1, or false if the neverlink attribute does not exist (for example, on * *_binary targets) * * @return the value of the neverlink attribute. */
Returns true if and only if this target has the neverlink attribute set to 1, or false if the neverlink attribute does not exist (for example, on _binary targets)
isNeverLink
{ "repo_name": "UrbanCompass/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/java/JavaCommon.java", "license": "apache-2.0", "size": 34773 }
[ "com.google.devtools.build.lib.analysis.RuleContext", "com.google.devtools.build.lib.syntax.Type" ]
import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.syntax.Type;
import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.syntax.*;
[ "com.google.devtools" ]
com.google.devtools;
2,494,424
synchronized Map<Long, Task> getCurrentTasks() { Map<Long, Task> currentTasks = new HashMap<>(); eventIdsToAddDataSourceTasks.values().stream().forEach((task) -> { currentTasks.put(task.getId(), task); }); jobIdsTodataSourceAnalysisTasks.values().s...
synchronized Map<Long, Task> getCurrentTasks() { Map<Long, Task> currentTasks = new HashMap<>(); eventIdsToAddDataSourceTasks.values().stream().forEach((task) -> { currentTasks.put(task.getId(), task); }); jobIdsTodataSourceAnalysisTasks.values().stream().forEach((task) -> { currentTasks.put(task.getId(), task); }); re...
/** * Gets the current local tasks. * * @return A mapping of task IDs to tasks, may be empty. */
Gets the current local tasks
getCurrentTasks
{ "repo_name": "narfindustries/autopsy", "path": "Core/src/org/sleuthkit/autopsy/casemodule/CollaborationMonitor.java", "license": "apache-2.0", "size": 25212 }
[ "java.beans.PropertyChangeListener", "java.util.HashMap", "java.util.Map" ]
import java.beans.PropertyChangeListener; import java.util.HashMap; import java.util.Map;
import java.beans.*; import java.util.*;
[ "java.beans", "java.util" ]
java.beans; java.util;
2,757,746
public FedoraId pathToInternalId(final String externalPath) { return FedoraId.create(toInternalId(toDomain(externalPath))); }
FedoraId function(final String externalPath) { return FedoraId.create(toInternalId(toDomain(externalPath))); }
/** * Function to convert from the external path of a URI to an internal FedoraId. * @param externalPath the path part of the external URI. * @return the FedoraId. */
Function to convert from the external path of a URI to an internal FedoraId
pathToInternalId
{ "repo_name": "dbernstein/fcrepo4", "path": "fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/api/rdf/HttpIdentifierConverter.java", "license": "apache-2.0", "size": 7356 }
[ "org.fcrepo.kernel.api.identifiers.FedoraId" ]
import org.fcrepo.kernel.api.identifiers.FedoraId;
import org.fcrepo.kernel.api.identifiers.*;
[ "org.fcrepo.kernel" ]
org.fcrepo.kernel;
1,088,309
private boolean isConnectionDetailsLinkVisible() { return !mIsInternalPage && mSecurityLevel != ConnectionSecurityLevel.NONE; }
boolean function() { return !mIsInternalPage && mSecurityLevel != ConnectionSecurityLevel.NONE; }
/** * Whether to show a 'Details' link to the connection info popup. The link is only shown for * HTTPS connections. */
Whether to show a 'Details' link to the connection info popup. The link is only shown for HTTPS connections
isConnectionDetailsLinkVisible
{ "repo_name": "CapOM/ChromiumGStreamerBackend", "path": "chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java", "license": "bsd-3-clause", "size": 37464 }
[ "org.chromium.chrome.browser.ssl.ConnectionSecurityLevel" ]
import org.chromium.chrome.browser.ssl.ConnectionSecurityLevel;
import org.chromium.chrome.browser.ssl.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,154,564
String responseAsString = ""; if (response.getEntity() != null) { InputStream in = response.getEntity().getContent(); int length; byte[] tmp = new byte[2048]; StringBuilder buffer = new StringBuilder(); while ((length = in.read(tmp)) != -1) { ...
String responseAsString = ""; if (response.getEntity() != null) { InputStream in = response.getEntity().getContent(); int length; byte[] tmp = new byte[2048]; StringBuilder buffer = new StringBuilder(); while ((length = in.read(tmp)) != -1) { buffer.append(new String(tmp, 0, length)); } responseAsString = buffer.toStri...
/** * Extracts the payload from a HTTP response. For a given HttpResponse object, this method can be called only once. * * @param response HttpResponse instance to be extracted * @return Content payload * @throws IOException If an error occurs while reading from the response */
Extracts the payload from a HTTP response. For a given HttpResponse object, this method can be called only once
getResponsePayload
{ "repo_name": "wso2/product-ei", "path": "integration/mediation-tests/tests-platform/tests-sap/src/test/java/org/wso2/carbon/esb/sap/utils/Util.java", "license": "apache-2.0", "size": 1797 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
963,644
public List<String> getList(String key) { return getList(key, null); }
List<String> function(String key) { return getList(key, null); }
/** * Returns the List of Strings associated with the given parameter, * or an empty List in case there is no List of Strings for this parameter.<p> * * The list returned is a copy of the internal data of this object, and as * such you may alter it freely.<p> * * @param key t...
Returns the List of Strings associated with the given parameter, or an empty List in case there is no List of Strings for this parameter. The list returned is a copy of the internal data of this object, and as such you may alter it freely
getList
{ "repo_name": "PatidarWeb/opencms-core", "path": "src/org/opencms/configuration/CmsParameterConfiguration.java", "license": "lgpl-2.1", "size": 27394 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,486,480
@Override public void setTimes(Path p, long mtime, long atime) throws IOException { try { BasicFileAttributeView view = Files.getFileAttributeView( pathToFile(p).toPath(), BasicFileAttributeView.class); FileTime fmtime = (mtime >= 0) ? FileTime.fromMillis(mtime) : null; FileTime fati...
void function(Path p, long mtime, long atime) throws IOException { try { BasicFileAttributeView view = Files.getFileAttributeView( pathToFile(p).toPath(), BasicFileAttributeView.class); FileTime fmtime = (mtime >= 0) ? FileTime.fromMillis(mtime) : null; FileTime fatime = (atime >= 0) ? FileTime.fromMillis(atime) : null...
/** * Sets the {@link Path}'s last modified time and last access time to * the given valid times. * * @param mtime the modification time to set (only if no less than zero). * @param atime the access time to set (only if no less than zero). * @throws IOException if setting the times fails. */
Sets the <code>Path</code>'s last modified time and last access time to the given valid times
setTimes
{ "repo_name": "leechoongyon/HadoopSourceAnalyze", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java", "license": "apache-2.0", "size": 29986 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.nio.file.Files", "java.nio.file.NoSuchFileException", "java.nio.file.attribute.BasicFileAttributeView", "java.nio.file.attribute.FileTime" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; import java.nio.file.NoSuchFileException; import java.nio.file.attribute.BasicFileAttributeView; import java.nio.file.attribute.FileTime;
import java.io.*; import java.nio.file.*; import java.nio.file.attribute.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,802,117
Priority priority();
Priority priority();
/** * The {@link Priority} for this cluster state update task configuration. * * @return the priority */
The <code>Priority</code> for this cluster state update task configuration
priority
{ "repo_name": "strapdata/elassandra5-rc", "path": "core/src/main/java/org/elasticsearch/cluster/ClusterStateTaskConfig.java", "license": "apache-2.0", "size": 3439 }
[ "org.elasticsearch.common.Priority" ]
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,158,429
@Test public void setValueAndGetValue() throws Exception { System.out.println("public static void setValue(Object instance, String setter, Object value)"); SimplePojo pojo = new SimplePojo(); assertNull(pojo.getValueA()); assertNull(pojo.getValueB()); ReflectionHelper....
void function() throws Exception { System.out.println(STR); SimplePojo pojo = new SimplePojo(); assertNull(pojo.getValueA()); assertNull(pojo.getValueB()); ReflectionHelper.setValue(pojo, STR, "Alpha"); assertEquals("Alpha", pojo.getValueA()); ReflectionHelper.setValue(pojo, STR, "Beta"); assertEquals("Alpha", pojo.get...
/** * Test of 'public static void setValue(Object instance, String setter, Object value)' method, of class ReflectionHelper. */
Test of 'public static void setValue(Object instance, String setter, Object value)' method, of class ReflectionHelper
setValueAndGetValue
{ "repo_name": "tcmj/pugproductions", "path": "source/tcmj/commons/src/test/java/com/tcmj/common/reflection/ReflectionHelperTest.java", "license": "gpl-2.0", "size": 9020 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,657,323
private Script build(String defaultLang) { if (type == null) { throw new IllegalArgumentException("must specify either [source] for an inline script or [id] for a stored script"); } if (type == ScriptType.INLINE) { if (lang == null) { ...
Script function(String defaultLang) { if (type == null) { throw new IllegalArgumentException(STR); } if (type == ScriptType.INLINE) { if (lang == null) { lang = defaultLang; } if (idOrCode == null) { throw new IllegalArgumentException( STR); } if (options.size() > 1 options.size() == 1 && options.get(CONTENT_TYPE_OPTIO...
/** * Validates the parameters and creates an {@link Script}. * @param defaultLang The default lang is not a compile-time constant and must be provided * at run-time this way in case a legacy default language is used from * previously stored quer...
Validates the parameters and creates an <code>Script</code>
build
{ "repo_name": "qwerty4030/elasticsearch", "path": "server/src/main/java/org/elasticsearch/script/Script.java", "license": "apache-2.0", "size": 28759 }
[ "org.elasticsearch.common.xcontent.ObjectParser", "org.elasticsearch.common.xcontent.XContentParser" ]
import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,257,666
Chunk toChunk(World world) { return new Chunk(world, chunkPrimer, chunkCoord.getChunkX(), chunkCoord.getChunkZ()); }
Chunk toChunk(World world) { return new Chunk(world, chunkPrimer, chunkCoord.getChunkX(), chunkCoord.getChunkZ()); }
/** * Creates a Minecraft chunk of the data of this chunk buffer. * * @param world * The world the chunk will be in. * @return The chunk. */
Creates a Minecraft chunk of the data of this chunk buffer
toChunk
{ "repo_name": "whichonespink44/TerrainControl", "path": "platforms/forge/src/main/java/com/khorn/terraincontrol/forge/generator/ForgeChunkBuffer.java", "license": "mit", "size": 1856 }
[ "net.minecraft.world.World", "net.minecraft.world.chunk.Chunk" ]
import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.*; import net.minecraft.world.chunk.*;
[ "net.minecraft.world" ]
net.minecraft.world;
1,546,088
@Deprecated public Future<CommandResult> transferDataServerToClient(Integer tunnelId, ByteArray data) { TransferDataServerToClient command = new TransferDataServerToClient(); // Set the fields command.setTunnelId(tunnelId); command.setData(data); return sendCommand(comm...
Future<CommandResult> function(Integer tunnelId, ByteArray data) { TransferDataServerToClient command = new TransferDataServerToClient(); command.setTunnelId(tunnelId); command.setData(data); return sendCommand(command); }
/** * The Transfer Data Server To Client * <p> * Command that transfers data from server to the client. The data itself has to be placed * within the payload. * * @param tunnelId {@link Integer} Tunnel ID * @param data {@link ByteArray} Data * @return the {@link Future<CommandRes...
The Transfer Data Server To Client Command that transfers data from server to the client. The data itself has to be placed within the payload
transferDataServerToClient
{ "repo_name": "zsmartsystems/com.zsmartsystems.zigbee", "path": "com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclSmartEnergyTunnelingCluster.java", "license": "epl-1.0", "size": 33961 }
[ "com.zsmartsystems.zigbee.CommandResult", "com.zsmartsystems.zigbee.zcl.clusters.smartenergytunneling.TransferDataServerToClient", "com.zsmartsystems.zigbee.zcl.field.ByteArray", "java.util.concurrent.Future" ]
import com.zsmartsystems.zigbee.CommandResult; import com.zsmartsystems.zigbee.zcl.clusters.smartenergytunneling.TransferDataServerToClient; import com.zsmartsystems.zigbee.zcl.field.ByteArray; import java.util.concurrent.Future;
import com.zsmartsystems.zigbee.*; import com.zsmartsystems.zigbee.zcl.clusters.smartenergytunneling.*; import com.zsmartsystems.zigbee.zcl.field.*; import java.util.concurrent.*;
[ "com.zsmartsystems.zigbee", "java.util" ]
com.zsmartsystems.zigbee; java.util;
2,826,662
public double getAttributeWeight(String attribute) { // For backwards compatibility if (this.attributeWeights==null) { this.attributeWeights = new HashMap<String, Double>(); } Double value = this.attributeWeights.get(attribute); if (value == null) return ...
double function(String attribute) { if (this.attributeWeights==null) { this.attributeWeights = new HashMap<String, Double>(); } Double value = this.attributeWeights.get(attribute); if (value == null) return 0.5d; else return value; }
/** * Returns the weight for the given attribute. * * @param attribute * @return */
Returns the weight for the given attribute
getAttributeWeight
{ "repo_name": "fstahnke/arx", "path": "src/main/org/deidentifier/arx/ARXConfiguration.java", "license": "apache-2.0", "size": 38858 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
944,695
@Override public AnnuityCouponFixedDefinition trimBefore(final ZonedDateTime trimDate) { final List<CouponFixedDefinition> list = new ArrayList<>(); for (final CouponFixedDefinition payment : getPayments()) { if (payment.getPaymentDate().isAfter(trimDate)) { list.add(payment); } } ...
AnnuityCouponFixedDefinition function(final ZonedDateTime trimDate) { final List<CouponFixedDefinition> list = new ArrayList<>(); for (final CouponFixedDefinition payment : getPayments()) { if (payment.getPaymentDate().isAfter(trimDate)) { list.add(payment); } } return new AnnuityCouponFixedDefinition(list.toArray(new ...
/** * Creates a new annuity. The coupon is the new annuity are those with payment date strictly after the given date. * @param trimDate The date. * @return The trimmed annuity. */
Creates a new annuity. The coupon is the new annuity are those with payment date strictly after the given date
trimBefore
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/annuity/AnnuityCouponFixedDefinition.java", "license": "apache-2.0", "size": 21417 }
[ "com.opengamma.analytics.financial.instrument.payment.CouponFixedDefinition", "java.util.ArrayList", "java.util.List", "org.threeten.bp.ZonedDateTime" ]
import com.opengamma.analytics.financial.instrument.payment.CouponFixedDefinition; import java.util.ArrayList; import java.util.List; import org.threeten.bp.ZonedDateTime;
import com.opengamma.analytics.financial.instrument.payment.*; import java.util.*; import org.threeten.bp.*;
[ "com.opengamma.analytics", "java.util", "org.threeten.bp" ]
com.opengamma.analytics; java.util; org.threeten.bp;
1,944,014
@ApiModelProperty(example = "null", value = "") public DirectionEnum getDirection() { return direction; }
@ApiModelProperty(example = "null", value = "") DirectionEnum function() { return direction; }
/** * Get direction * @return direction **/
Get direction
getDirection
{ "repo_name": "leanix/leanix-sdk-java", "path": "src/main/java/net/leanix/api/models/MetaSubsection.java", "license": "mit", "size": 8779 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
778,535
@Override public EncryptionType getUnderstoodEncryptionType() { return EncryptionType.ENCRYPTED_SCRYPT_AES; }
EncryptionType function() { return EncryptionType.ENCRYPTED_SCRYPT_AES; }
/** * Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter * can understand. */
Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter can understand
getUnderstoodEncryptionType
{ "repo_name": "HashEngineering/myriadcoinj", "path": "core/src/main/java/com/google/bitcoin/crypto/KeyCrypterScrypt.java", "license": "apache-2.0", "size": 10691 }
[ "org.bitcoinj.wallet.Protos" ]
import org.bitcoinj.wallet.Protos;
import org.bitcoinj.wallet.*;
[ "org.bitcoinj.wallet" ]
org.bitcoinj.wallet;
1,053,086
public void insertFragmentInstance(int fragmentID, int instanceID) { DbDataObject dbDataObject = new DbDataObject(); String insert = "INSERT INTO fragmentinstance " + "(fragmentinstance.terminated, fragment_id, scenarioinstance_id) " + "VALUES (" + 0 + ", " + fragment...
void function(int fragmentID, int instanceID) { DbDataObject dbDataObject = new DbDataObject(); String insert = STR + STR + STR + 0 + STR + fragmentID + STR + instanceID + ")"; dbDataObject.executeUpdateStatement(insert); }
/** * Insert a running instance of a fragment in table "fragmentinstance". * * @param fragmentID specifies a fragment the instance is running on * @param instanceID specifies a scenarioinstance the fragmentinstance belongs to */
Insert a running instance of a fragment in table "fragmentinstance"
insertFragmentInstance
{ "repo_name": "BP2014W1/JEngine", "path": "src/main/java/de/uni_potsdam/hpi/bpt/bp2014/jcomparser/Connector.java", "license": "mit", "size": 31380 }
[ "de.uni_potsdam.hpi.bpt.bp2014.database.DbDataObject" ]
import de.uni_potsdam.hpi.bpt.bp2014.database.DbDataObject;
import de.uni_potsdam.hpi.bpt.bp2014.database.*;
[ "de.uni_potsdam.hpi" ]
de.uni_potsdam.hpi;
914,751