method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<KpiResourceFormatInner> getAsync(String resourceGroupName, String hubName, String kpiName) { return getWithResponseAsync(resourceGroupName, hubName, kpiName) .flatMap( (Response<KpiResourceFormatInner> res) -> { ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<KpiResourceFormatInner> function(String resourceGroupName, String hubName, String kpiName) { return getWithResponseAsync(resourceGroupName, hubName, kpiName) .flatMap( (Response<KpiResourceFormatInner> res) -> { if (res.getValue() != null) { return Mono.just(res.getValue...
/** * Gets a KPI in the hub. * * @param resourceGroupName The name of the resource group. * @param hubName The name of the hub. * @param kpiName The name of the KPI. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if th...
Gets a KPI in the hub
getAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/customerinsights/azure-resourcemanager-customerinsights/src/main/java/com/azure/resourcemanager/customerinsights/implementation/KpisClientImpl.java", "license": "mit", "size": 58795 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.customerinsights.fluent.models.KpiResourceFormatInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.customerinsights.fluent.models.KpiResourceFormatInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.customerinsights.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,542,935
public List<Tuple3<FieldsRegulator, FieldsIsRegulatorFor, FieldsRegulog>> getRelationshipIsRegulatorFor(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); ...
List<Tuple3<FieldsRegulator, FieldsIsRegulatorFor, FieldsRegulog>> function(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); args.add(fromFields); args.add(relFields); args.add(...
/** * <p>Original spec-file function name: get_relationship_IsRegulatorFor</p> * <pre> * It has the following fields: * =over 4 * =back * </pre> * @param ids instance of list of String * @param fromFields instance of list of String * @param relFields instance of ...
Original spec-file function name: get_relationship_IsRegulatorFor <code> It has the following fields: =over 4 =back </code>
getRelationshipIsRegulatorFor
{ "repo_name": "kbase/trees", "path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java", "license": "mit", "size": 869221 }
[ "com.fasterxml.jackson.core.type.TypeReference", "java.io.IOException", "java.util.ArrayList", "java.util.List", "us.kbase.common.service.JsonClientException", "us.kbase.common.service.Tuple3" ]
import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3;
import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "us.kbase.common" ]
com.fasterxml.jackson; java.io; java.util; us.kbase.common;
1,967,694
@Test public void testCurrencyHolidayWithWeekends() { final WorkingDayCalendar calendar = new HolidaySourceWorkingDayCalendarAdapter(HOLIDAY_SOURCE, Currency.of("SAR")); LocalDate date = LocalDate.of(2015, 1, 1); while (!date.isAfter(LocalDate.of(2016, 1, 1))) { if (SAR_DATES.contains(date)) { ...
void function() { final WorkingDayCalendar calendar = new HolidaySourceWorkingDayCalendarAdapter(HOLIDAY_SOURCE, Currency.of("SAR")); LocalDate date = LocalDate.of(2015, 1, 1); while (!date.isAfter(LocalDate.of(2016, 1, 1))) { if (SAR_DATES.contains(date)) { assertTrue(calendar.isHoliday(date)); assertFalse(calendar.is...
/** * Tests that the correct holidays are retrieved when the reference is a currency and * explicit weekend days are used. */
Tests that the correct holidays are retrieved when the reference is a currency and explicit weekend days are used
testCurrencyHolidayWithWeekends
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial/src/test/java/com/opengamma/financial/calendar/HolidaySourceWorkingDayCalendarAdapterTest.java", "license": "apache-2.0", "size": 9713 }
[ "com.mcleodmoores.date.WorkingDayCalendar", "com.opengamma.util.money.Currency", "org.testng.Assert", "org.threeten.bp.DayOfWeek", "org.threeten.bp.LocalDate" ]
import com.mcleodmoores.date.WorkingDayCalendar; import com.opengamma.util.money.Currency; import org.testng.Assert; import org.threeten.bp.DayOfWeek; import org.threeten.bp.LocalDate;
import com.mcleodmoores.date.*; import com.opengamma.util.money.*; import org.testng.*; import org.threeten.bp.*;
[ "com.mcleodmoores.date", "com.opengamma.util", "org.testng", "org.threeten.bp" ]
com.mcleodmoores.date; com.opengamma.util; org.testng; org.threeten.bp;
831,630
@Override public int executeUpdate(String sql) throws SQLException { execute(sql, false, true, Statement.NO_GENERATED_KEYS, null, null); return (int) updateCounts[0]; }
int function(String sql) throws SQLException { execute(sql, false, true, Statement.NO_GENERATED_KEYS, null, null); return (int) updateCounts[0]; }
/** * Execute a SQL INSERT, UPDATE or DELETE statement. In addition, * SQL statements that return nothing such as SQL DDL statements * can be executed. * * @param sql a SQL INSERT, UPDATE or DELETE statement or a SQL * statement that returns nothing * @return either the row...
Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed
executeUpdate
{ "repo_name": "splicemachine/spliceengine", "path": "db-engine/src/main/java/com/splicemachine/db/impl/jdbc/EmbedStatement.java", "license": "agpl-3.0", "size": 67943 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
594,652
public void onAlarm(Alarm alarm) { // Check if the alarm is not documented String undoc=alarm.getStatus().getUserProperties().getProperty(ACSAlarmCacheImpl.alarmServerPropkey); if (ACSAlarmCacheImpl.undocumentedAlarmProp.equals(undoc)) { undocModel.onAlarm(alarm); return; } AlarmTableEntry tableEntry...
void function(Alarm alarm) { String undoc=alarm.getStatus().getUserProperties().getProperty(ACSAlarmCacheImpl.alarmServerPropkey); if (ACSAlarmCacheImpl.undocumentedAlarmProp.equals(undoc)) { undocModel.onAlarm(alarm); return; } AlarmTableEntry tableEntry = new AlarmTableEntry(alarm); if (waitIfQueueFull) { while (!ter...
/** * Add an alarm in the queue. * The thread will get the alarm from the queue and update the model (@see {@link #run()}). * * @param alarm The alarm to add to the table. * @see AlarmSelectionListener */
Add an alarm in the queue. The thread will get the alarm from the queue and update the model (@see <code>#run()</code>)
onAlarm
{ "repo_name": "jbarriosc/ACSUFRO", "path": "LGPL/CommonSoftware/acsGUIs/alarmPanel/src/alma/acsplugins/alarmsystem/gui/table/AlarmTableModel.java", "license": "lgpl-2.1", "size": 27545 }
[ "com.cosylab.acs.laser.dao.ACSAlarmCacheImpl" ]
import com.cosylab.acs.laser.dao.ACSAlarmCacheImpl;
import com.cosylab.acs.laser.dao.*;
[ "com.cosylab.acs" ]
com.cosylab.acs;
1,412,188
public void encode(OutputStream out, Object value) throws IOException { ReplaceOutputStream replace = new ReplaceOutputStream(out, // new String[] { "\\", "\n" }, // new String[] { "\\\\", "\\n" }); try { SerialUtils.write(replace, "custom^"); SerialUtils.write(replace, getType()); SerialUtils....
void function(OutputStream out, Object value) throws IOException { ReplaceOutputStream replace = new ReplaceOutputStream(out, new String[] { "\\\\", "\\n" }); try { SerialUtils.write(replace, STR); SerialUtils.write(replace, getType()); SerialUtils.write(replace, "^"); toStream(replace, value); } finally { replace.clos...
/** * Encode the object into the given {@link OutputStream}, i.e., generate the * <tt><i>ENCODED_VALUE</i></tt> part. * <p> * Use whatever scheme you wish, the system shall ensure that the content is * correctly encoded and that you will receive the same content at decode * time. * * @param out * ...
Encode the object into the given <code>OutputStream</code>, i.e., generate the ENCODED_VALUE part. Use whatever scheme you wish, the system shall ensure that the content is correctly encoded and that you will receive the same content at decode time
encode
{ "repo_name": "nikiroo/fanfix", "path": "src/be/nikiroo/utils/serial/CustomSerializer.java", "license": "gpl-3.0", "size": 4133 }
[ "be.nikiroo.utils.streams.ReplaceOutputStream", "java.io.IOException", "java.io.OutputStream" ]
import be.nikiroo.utils.streams.ReplaceOutputStream; import java.io.IOException; import java.io.OutputStream;
import be.nikiroo.utils.streams.*; import java.io.*;
[ "be.nikiroo.utils", "java.io" ]
be.nikiroo.utils; java.io;
1,098,162
@SuppressWarnings("ConstantConditions") @Nullable protected String toString(@Nullable ValueSequence sequence) { if(sequence == null || sequence.isNull()) return null; StringBuilder sb = new StringBuilder(); for(Value value : sequence.getValue()) { sb.append(value.isNull() ? "" : escapeAndQuoteIf...
@SuppressWarnings(STR) String function(@Nullable ValueSequence sequence) { if(sequence == null sequence.isNull()) return null; StringBuilder sb = new StringBuilder(); for(Value value : sequence.getValue()) { sb.append(value.isNull() ? "" : escapeAndQuoteIfRequired(value.toString())).append(SEPARATOR); } int length = sb...
/** * Returns a comma-separated string representation of the sequence. The resulting string can be passed to * {@code sequenceOf(String)} to obtain the original {@code ValueSequence}. * * @param sequence * @return */
Returns a comma-separated string representation of the sequence. The resulting string can be passed to sequenceOf(String) to obtain the original ValueSequence
toString
{ "repo_name": "apruden/magma", "path": "magma-api/src/main/java/org/obiba/magma/type/AbstractValueType.java", "license": "gpl-3.0", "size": 4524 }
[ "javax.annotation.Nullable", "org.obiba.magma.Value", "org.obiba.magma.ValueSequence" ]
import javax.annotation.Nullable; import org.obiba.magma.Value; import org.obiba.magma.ValueSequence;
import javax.annotation.*; import org.obiba.magma.*;
[ "javax.annotation", "org.obiba.magma" ]
javax.annotation; org.obiba.magma;
2,071,387
@RequestMapping(value = "/export/pdf", method = { RequestMethod.POST }) @ResponseBody public IRestResponse exportPdf(@RequestBody String requestBody, HttpServletRequest request) throws UnsupportedEncodingException { String requestBodyDecoded = ControllerUtils.decodeRequestBody(requestBody); logger.info("Req...
@RequestMapping(value = STR, method = { RequestMethod.POST }) IRestResponse function(@RequestBody String requestBody, HttpServletRequest request) throws UnsupportedEncodingException { String requestBodyDecoded = ControllerUtils.decodeRequestBody(requestBody); logger.info(STR, requestBodyDecoded.length() > ControllerUti...
/** * Export report PDF from provided view ID. * * @param requestBody * @param request * @return * @throws UnsupportedEncodingException */
Export report PDF from provided view ID
exportPdf
{ "repo_name": "Pardus-LiderAhenk/lider", "path": "lider-web/src/main/java/tr/org/liderahenk/web/controller/ReportController.java", "license": "lgpl-3.0", "size": 12551 }
[ "java.io.UnsupportedEncodingException", "javax.servlet.http.HttpServletRequest", "org.springframework.web.bind.annotation.RequestBody", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "tr.org.liderahenk.lider.core.api.rest.responses.IRestR...
import java.io.UnsupportedEncodingException; import javax.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import tr.org.liderahenk.lider.core.api.rest...
import java.io.*; import javax.servlet.http.*; import org.springframework.web.bind.annotation.*; import tr.org.liderahenk.lider.core.api.rest.responses.*; import tr.org.liderahenk.web.controller.utils.*;
[ "java.io", "javax.servlet", "org.springframework.web", "tr.org.liderahenk" ]
java.io; javax.servlet; org.springframework.web; tr.org.liderahenk;
678,039
public static Collection<InetSocketAddress> toSocketAddresses(Collection<String> addrs, Collection<String> hostNames, int port) { Set<InetSocketAddress> res = new HashSet<>(addrs.size()); Iterator<String> hostNamesIt = hostNames.iterator(); for (String addr : addrs) { S...
static Collection<InetSocketAddress> function(Collection<String> addrs, Collection<String> hostNames, int port) { Set<InetSocketAddress> res = new HashSet<>(addrs.size()); Iterator<String> hostNamesIt = hostNames.iterator(); for (String addr : addrs) { String hostName = hostNamesIt.hasNext() ? hostNamesIt.next() : null...
/** * Returns tha list of resolved socket addresses. First addresses are resolved by host names, * if this attempt fails then the addresses are resolved by ip addresses. * * @param addrs Addresses. * @param hostNames Host names. * @param port Port. * @return Socket addresses for given...
Returns tha list of resolved socket addresses. First addresses are resolved by host names, if this attempt fails then the addresses are resolved by ip addresses
toSocketAddresses
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 385578 }
[ "java.net.InetSocketAddress", "java.util.Collection", "java.util.HashSet", "java.util.Iterator", "java.util.Set", "org.apache.ignite.internal.util.typedef.F" ]
import java.net.InetSocketAddress; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.apache.ignite.internal.util.typedef.F;
import java.net.*; import java.util.*; import org.apache.ignite.internal.util.typedef.*;
[ "java.net", "java.util", "org.apache.ignite" ]
java.net; java.util; org.apache.ignite;
2,273,697
@Test @RunAsClient @OperateOnDeployment(DEP) @WrapThreadContextClassLoader public void testCustomClientConfigurationFromFile() throws Exception { assertTrue(getHelper().testCustomClientConfigurationFromFile()); }
@OperateOnDeployment(DEP) void function() throws Exception { assertTrue(getHelper().testCustomClientConfigurationFromFile()); }
/** * Verifies a custom client configuration can be read from conf file and set * * @throws Exception */
Verifies a custom client configuration can be read from conf file and set
testCustomClientConfigurationFromFile
{ "repo_name": "jbossws/jbossws-cxf", "path": "modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/clientConfig/CXFClientConfigurationTestCase.java", "license": "lgpl-2.1", "size": 8010 }
[ "org.jboss.arquillian.container.test.api.OperateOnDeployment" ]
import org.jboss.arquillian.container.test.api.OperateOnDeployment;
import org.jboss.arquillian.container.test.api.*;
[ "org.jboss.arquillian" ]
org.jboss.arquillian;
2,635,821
public void bind(LocalSocketAddress bindpoint) throws IOException { implCreateIfNeeded(); synchronized (this) { if (isBound) { throw new IOException("already bound"); } localAddress = bindpoint; impl.bind(localAddress); is...
void function(LocalSocketAddress bindpoint) throws IOException { implCreateIfNeeded(); synchronized (this) { if (isBound) { throw new IOException(STR); } localAddress = bindpoint; impl.bind(localAddress); isBound = true; } }
/** * Binds this socket to an endpoint name. May only be called on an instance * that has not yet been bound. * * @param bindpoint endpoint address * @throws IOException */
Binds this socket to an endpoint name. May only be called on an instance that has not yet been bound
bind
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/net/LocalSocket.java", "license": "apache-2.0", "size": 9482 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
681,404
public Stream<SourceFile> stream() { return this.files.stream(); }
Stream<SourceFile> function() { return this.files.stream(); }
/** * Stream the {@link SourceFile} instances contained in this collection. * @return a stream of file instances */
Stream the <code>SourceFile</code> instances contained in this collection
stream
{ "repo_name": "spring-projects/spring-framework", "path": "spring-core-test/src/main/java/org/springframework/aot/test/generator/file/SourceFiles.java", "license": "apache-2.0", "size": 3717 }
[ "java.util.stream.Stream" ]
import java.util.stream.Stream;
import java.util.stream.*;
[ "java.util" ]
java.util;
221,552
private void scheduleCronInterval(final String expression) throws SchedulerException { requireNonNull(expression, "Cron Expression cannot be null"); final Scheduler scheduler = getScheduler(); final int id = nextJobId.incrementAndGet(); if (nonNull(this.jobKey)) { schedu...
void function(final String expression) throws SchedulerException { requireNonNull(expression, STR); final Scheduler scheduler = getScheduler(); final int id = nextJobId.incrementAndGet(); if (nonNull(this.jobKey)) { scheduler.deleteJob(this.jobKey); } this.jobKey = new JobKey(STR + id, GROUP_ID); final Trigger trigger ...
/** * Creates a cron trigger based on the provided interval * * @param expression * the CRON expression * @throws SchedulerException * if scheduling fails * @throws NullPointerException * if the argument is null */
Creates a cron trigger based on the provided interval
scheduleCronInterval
{ "repo_name": "gavinying/kura", "path": "kura/org.eclipse.kura.wire.component.provider/src/main/java/org/eclipse/kura/internal/wire/timer/Timer.java", "license": "epl-1.0", "size": 9410 }
[ "java.util.Objects", "org.quartz.CronScheduleBuilder", "org.quartz.JobBuilder", "org.quartz.JobDetail", "org.quartz.JobKey", "org.quartz.Scheduler", "org.quartz.SchedulerException", "org.quartz.Trigger", "org.quartz.TriggerBuilder" ]
import java.util.Objects; import org.quartz.CronScheduleBuilder; import org.quartz.JobBuilder; import org.quartz.JobDetail; import org.quartz.JobKey; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.Trigger; import org.quartz.TriggerBuilder;
import java.util.*; import org.quartz.*;
[ "java.util", "org.quartz" ]
java.util; org.quartz;
2,252,996
public UpdateRequestBuilder setDoc(IndexRequest indexRequest) { request.doc(indexRequest); return this; }
UpdateRequestBuilder function(IndexRequest indexRequest) { request.doc(indexRequest); return this; }
/** * Sets the doc to use for updates when a script is not specified. */
Sets the doc to use for updates when a script is not specified
setDoc
{ "repo_name": "anti-social/elasticsearch", "path": "src/main/java/org/elasticsearch/action/update/UpdateRequestBuilder.java", "license": "apache-2.0", "size": 11206 }
[ "org.elasticsearch.action.index.IndexRequest" ]
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
1,594,316
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (...
Observable<ServiceResponse<Void>> function(String resourceGroupName, String accountName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (accountName == null) { throw new IllegalArgumentException(STR)...
/** * Delete a NetApp account. * Delete the specified NetApp account. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable f...
Delete a NetApp account. Delete the specified NetApp account
deleteWithServiceResponseAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/netapp/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/netapp/v2019_07_01/implementation/AccountsInner.java", "license": "mit", "size": 40539 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
2,732,503
@SuppressWarnings("unchecked") public AnnuityDefinition<CouponFixedAccruedCompoundingDefinition> getFixedLeg() { return (AnnuityDefinition<CouponFixedAccruedCompoundingDefinition>) getFirstLeg(); }
@SuppressWarnings(STR) AnnuityDefinition<CouponFixedAccruedCompoundingDefinition> function() { return (AnnuityDefinition<CouponFixedAccruedCompoundingDefinition>) getFirstLeg(); }
/** * The fixed leg of the swap. * * @return Fixed leg. */
The fixed leg of the swap
getFixedLeg
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/instrument/swap/SwapFixedCompoundedONCompoundedDefinition.java", "license": "apache-2.0", "size": 8232 }
[ "com.opengamma.analytics.financial.instrument.annuity.AnnuityDefinition", "com.opengamma.analytics.financial.instrument.payment.CouponFixedAccruedCompoundingDefinition" ]
import com.opengamma.analytics.financial.instrument.annuity.AnnuityDefinition; import com.opengamma.analytics.financial.instrument.payment.CouponFixedAccruedCompoundingDefinition;
import com.opengamma.analytics.financial.instrument.annuity.*; import com.opengamma.analytics.financial.instrument.payment.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
2,115,848
public OneResponse hold() { return action("hold"); }
OneResponse function() { return action("hold"); }
/** * Sets the VM to hold state. The VM will not be scheduled until it is * released. * @return If an error occurs the error message contains the reason. */
Sets the VM to hold state. The VM will not be scheduled until it is released
hold
{ "repo_name": "Terradue/one", "path": "src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java", "license": "apache-2.0", "size": 38638 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
2,424,495
public IndexShard getShard(int shardId) { IndexShard indexShard = getShardOrNull(shardId); if (indexShard == null) { throw new ShardNotFoundException(new ShardId(index(), shardId)); } return indexShard; }
IndexShard function(int shardId) { IndexShard indexShard = getShardOrNull(shardId); if (indexShard == null) { throw new ShardNotFoundException(new ShardId(index(), shardId)); } return indexShard; }
/** * Return the shard with the provided id, or throw an exception if it doesn't exist. */
Return the shard with the provided id, or throw an exception if it doesn't exist
getShard
{ "repo_name": "nezirus/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/IndexService.java", "license": "apache-2.0", "size": 33997 }
[ "org.elasticsearch.index.shard.IndexShard", "org.elasticsearch.index.shard.ShardId", "org.elasticsearch.index.shard.ShardNotFoundException" ]
import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.ShardNotFoundException;
import org.elasticsearch.index.shard.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
1,289,696
Observable<List<Flashcard>> getAllFlashcards();
Observable<List<Flashcard>> getAllFlashcards();
/** * Get an {@link Observable} which will emit a List of all {@link Flashcard} objects */
Get an <code>Observable</code> which will emit a List of all <code>Flashcard</code> objects
getAllFlashcards
{ "repo_name": "zwang1/words", "path": "domain/src/main/java/com/dbychkov/domain/repository/FlashcardRepository.java", "license": "apache-2.0", "size": 2492 }
[ "com.dbychkov.domain.Flashcard", "java.util.List" ]
import com.dbychkov.domain.Flashcard; import java.util.List;
import com.dbychkov.domain.*; import java.util.*;
[ "com.dbychkov.domain", "java.util" ]
com.dbychkov.domain; java.util;
1,054,589
public static boolean isZip( BufferedInputStream in ) { in.mark( 4 ); byte[] b = new byte[4]; byte[] zipSig = new byte[4]; zipSig[0] = 0x50; zipSig[1] = 0x4b; zipSig[2] = 0x03; zipSig[3] = 0x04; try { in.read( b, 0,...
static boolean function( BufferedInputStream in ) { in.mark( 4 ); byte[] b = new byte[4]; byte[] zipSig = new byte[4]; zipSig[0] = 0x50; zipSig[1] = 0x4b; zipSig[2] = 0x03; zipSig[3] = 0x04; try { in.read( b, 0, 4 ); } catch ( Exception ex ) { throw new RuntimeException( STR, ex ); } try { in.reset(); } catch ( Excepti...
/** * Test for ZIP stream signature. * * @param in the BufferedInputStream to test. * @return true if input stream is zip. */
Test for ZIP stream signature
isZip
{ "repo_name": "vmluan/dhis2-core", "path": "dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/StreamUtils.java", "license": "bsd-3-clause", "size": 8598 }
[ "java.io.BufferedInputStream", "java.util.Arrays" ]
import java.io.BufferedInputStream; import java.util.Arrays;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,775,690
@Test @Rollback( value = true ) @Transactional( propagation = Propagation.REQUIRES_NEW, isolation = Isolation.READ_UNCOMMITTED ) public void testDeleteAllTabWithErrorEnabled( ) throws Exception { logger.debug( "Starting test for DeleteAllTabWithErrorEnabled" ); requestParams.setIsError...
@Rollback( value = true ) @Transactional( propagation = Propagation.REQUIRES_NEW, isolation = Isolation.READ_UNCOMMITTED ) void function( ) throws Exception { logger.debug( STR ); requestParams.setIsError( TestConstants.IS_ERROR_TRUE ); requestParams.setIsDeleteAll( TestConstants.TEST_FALSE ); DAOResponse< Tab > tabDAO...
/** * Test delete all tab with error enabled. * * @throws Exception the exception */
Test delete all tab with error enabled
testDeleteAllTabWithErrorEnabled
{ "repo_name": "arkoghosh11/bloom-test", "path": "bloom-dao/src/test/java/com/mana/innovative/dao/common/WhenDeleteTabThenTestTabDAODeleteMethods.java", "license": "apache-2.0", "size": 16549 }
[ "com.mana.innovative.constants.TestConstants", "com.mana.innovative.dao.response.DAOResponse", "com.mana.innovative.domain.common.Tab", "junit.framework.Assert", "org.springframework.test.annotation.Rollback", "org.springframework.transaction.annotation.Isolation", "org.springframework.transaction.annot...
import com.mana.innovative.constants.TestConstants; import com.mana.innovative.dao.response.DAOResponse; import com.mana.innovative.domain.common.Tab; import junit.framework.Assert; import org.springframework.test.annotation.Rollback; import org.springframework.transaction.annotation.Isolation; import org.springframewo...
import com.mana.innovative.constants.*; import com.mana.innovative.dao.response.*; import com.mana.innovative.domain.common.*; import junit.framework.*; import org.springframework.test.annotation.*; import org.springframework.transaction.annotation.*;
[ "com.mana.innovative", "junit.framework", "org.springframework.test", "org.springframework.transaction" ]
com.mana.innovative; junit.framework; org.springframework.test; org.springframework.transaction;
2,881,446
public static Delete generateDelete(String table, String[] whereColumns, int whereColumnsMaxIndex, boolean ifExists) { DeleteSelection deleteSelection = QueryBuilder.deleteFrom(table); Delete delete = null; if (isWhereClause(whereColumns, whereColumnsMaxIndex)) { for (int i = 0;...
static Delete function(String table, String[] whereColumns, int whereColumnsMaxIndex, boolean ifExists) { DeleteSelection deleteSelection = QueryBuilder.deleteFrom(table); Delete delete = null; if (isWhereClause(whereColumns, whereColumnsMaxIndex)) { for (int i = 0; i < whereColumns.length && i < whereColumnsMaxIndex; ...
/** * Generate delete where columns = ? CQL. */
Generate delete where columns = ? CQL
generateDelete
{ "repo_name": "pmoerenhout/camel", "path": "components/camel-cassandraql/src/main/java/org/apache/camel/utils/cassandra/CassandraUtils.java", "license": "apache-2.0", "size": 7356 }
[ "com.datastax.oss.driver.api.querybuilder.QueryBuilder", "com.datastax.oss.driver.api.querybuilder.delete.Delete", "com.datastax.oss.driver.api.querybuilder.delete.DeleteSelection" ]
import com.datastax.oss.driver.api.querybuilder.QueryBuilder; import com.datastax.oss.driver.api.querybuilder.delete.Delete; import com.datastax.oss.driver.api.querybuilder.delete.DeleteSelection;
import com.datastax.oss.driver.api.querybuilder.*; import com.datastax.oss.driver.api.querybuilder.delete.*;
[ "com.datastax.oss" ]
com.datastax.oss;
2,868,839
private void writeObject(ObjectOutputStream out) throws IOException { maybeParse(); out.defaultWriteObject(); }
void function(ObjectOutputStream out) throws IOException { maybeParse(); out.defaultWriteObject(); }
/** * Ensure object is fully parsed before invoking java serialization. The backing byte array * is transient so if the object has parseLazy = true and hasn't invoked checkParse yet * then data will be lost during serialization. */
Ensure object is fully parsed before invoking java serialization. The backing byte array is transient so if the object has parseLazy = true and hasn't invoked checkParse yet then data will be lost during serialization
writeObject
{ "repo_name": "doged/dogecoindarkj", "path": "core/src/main/java/com/dogecoindark/dogecoindarkj/core/TransactionOutPoint.java", "license": "apache-2.0", "size": 9365 }
[ "java.io.IOException", "java.io.ObjectOutputStream" ]
import java.io.IOException; import java.io.ObjectOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,088,595
public void testEquals() { XYSplineRenderer r1 = new XYSplineRenderer(); XYSplineRenderer r2 = new XYSplineRenderer(); assertEquals(r1, r2); assertEquals(r2, r1); r1.setPrecision(9); assertFalse(r1.equals(r2)); r2.setPrecision(9); assertTrue(r1.equal...
void function() { XYSplineRenderer r1 = new XYSplineRenderer(); XYSplineRenderer r2 = new XYSplineRenderer(); assertEquals(r1, r2); assertEquals(r2, r1); r1.setPrecision(9); assertFalse(r1.equals(r2)); r2.setPrecision(9); assertTrue(r1.equals(r2)); }
/** * Test that the equals() method distinguishes all fields. */
Test that the equals() method distinguishes all fields
testEquals
{ "repo_name": "ilyessou/jfreechart", "path": "tests/org/jfree/chart/renderer/xy/junit/XYSplineRendererTests.java", "license": "lgpl-2.1", "size": 4872 }
[ "org.jfree.chart.renderer.xy.XYSplineRenderer" ]
import org.jfree.chart.renderer.xy.XYSplineRenderer;
import org.jfree.chart.renderer.xy.*;
[ "org.jfree.chart" ]
org.jfree.chart;
301,202
if (raw == null) { return null; } List<String> parts = new ArrayList<String>(); boolean digit = false; int startPart = 0; int pos = 0; int endBase = 0; int endBaseStr = 0; for (; pos < raw.length(); pos++) { char ch = raw.charAt(po...
if (raw == null) { return null; } List<String> parts = new ArrayList<String>(); boolean digit = false; int startPart = 0; int pos = 0; int endBase = 0; int endBaseStr = 0; for (; pos < raw.length(); pos++) { char ch = raw.charAt(pos); if (ch == '.' ch == '_' ch == '-' ch == '+' ch == ' ') { parts.add(raw.substring(star...
/** * Adapted from Gradle's VersionParser */
Adapted from Gradle's VersionParser
build
{ "repo_name": "martinlippert/sagan", "path": "sagan-common/src/main/java/sagan/projects/support/Version.java", "license": "bsd-3-clause", "size": 3746 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
209,822
public void writeBytes(byte[] b) throws IOException { writeBytes(b, 0, b.length); }
void function(byte[] b) throws IOException { writeBytes(b, 0, b.length); }
/** * Writes an array of bytes. * * @param b the bytes to write */
Writes an array of bytes
writeBytes
{ "repo_name": "baishuo/elasticsearch_v2.1.0-baishuo", "path": "core/src/main/java/org/elasticsearch/common/io/stream/StreamOutput.java", "license": "apache-2.0", "size": 19594 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,104,841
public static Application create(Group group, String name, Locale locale) { Application result = new Application(); result.setName(name); result.getPlatforms().add(createPlatform(locale, PlatformType.ANDROID)); result.getPlatforms().add(createPlatform(locale, PlatformType.IOS)); ...
static Application function(Group group, String name, Locale locale) { Application result = new Application(); result.setName(name); result.getPlatforms().add(createPlatform(locale, PlatformType.ANDROID)); result.getPlatforms().add(createPlatform(locale, PlatformType.IOS)); result.setGroup(group); Description title = c...
/** * Creates the application. * * @param group the group. * @param name the name. * @param locale the default locale. * @return the new created application. */
Creates the application
create
{ "repo_name": "lorislab/appky", "path": "appky-application/src/main/java/org/lorislab/appky/application/factory/ApplicationObjectFactory.java", "license": "apache-2.0", "size": 9591 }
[ "java.util.Locale", "org.lorislab.appky.application.model.Application", "org.lorislab.appky.application.model.Description", "org.lorislab.appky.application.model.Group", "org.lorislab.appky.application.model.enums.PlatformType" ]
import java.util.Locale; import org.lorislab.appky.application.model.Application; import org.lorislab.appky.application.model.Description; import org.lorislab.appky.application.model.Group; import org.lorislab.appky.application.model.enums.PlatformType;
import java.util.*; import org.lorislab.appky.application.model.*; import org.lorislab.appky.application.model.enums.*;
[ "java.util", "org.lorislab.appky" ]
java.util; org.lorislab.appky;
1,722,852
public static SecurityContext getAdminContext() { if (!isAdministrator()) return null; Collection<GroupData> groups = getAvailableUserGroups(); Iterator<GroupData> i = groups.iterator(); GroupData g; AdminService svc = registry.getAdminService(); while (i.hasNext()) { ...
static SecurityContext function() { if (!isAdministrator()) return null; Collection<GroupData> groups = getAvailableUserGroups(); Iterator<GroupData> i = groups.iterator(); GroupData g; AdminService svc = registry.getAdminService(); while (i.hasNext()) { g = i.next(); if (svc.isSecuritySystemGroup(g.getId(), GroupData....
/** * Returns the context for an administrator. * * @return See above. */
Returns the context for an administrator
getAdminContext
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/DataBrowserAgent.java", "license": "gpl-2.0", "size": 11482 }
[ "java.util.Collection", "java.util.Iterator", "org.openmicroscopy.shoola.env.data.AdminService", "org.openmicroscopy.shoola.env.data.util.SecurityContext" ]
import java.util.Collection; import java.util.Iterator; import org.openmicroscopy.shoola.env.data.AdminService; import org.openmicroscopy.shoola.env.data.util.SecurityContext;
import java.util.*; import org.openmicroscopy.shoola.env.data.*; import org.openmicroscopy.shoola.env.data.util.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
265,513
public Artifact objList() { return appendExtension(".objlist"); }
Artifact function() { return appendExtension(STR); }
/** * The .objlist file, which contains a list of paths of object files to archive and is read by * libtool in the archive action. */
The .objlist file, which contains a list of paths of object files to archive and is read by libtool in the archive action
objList
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java", "license": "apache-2.0", "size": 14045 }
[ "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
8,974
public static void setSlotValue(CCPClassMention ccpClassMention, String slotMentionName, Object slotValue) throws CASException { JCas jcas = ccpClassMention.getCAS().getJCas(); CCPSlotMention ccpSlotMention = UIMA_Util.getSlotMentionByName(ccpClassMention, slotMentionName); try { if (ccpSlotMention == nu...
static void function(CCPClassMention ccpClassMention, String slotMentionName, Object slotValue) throws CASException { JCas jcas = ccpClassMention.getCAS().getJCas(); CCPSlotMention ccpSlotMention = UIMA_Util.getSlotMentionByName(ccpClassMention, slotMentionName); try { if (ccpSlotMention == null) { CCPPrimitiveSlotMent...
/** * Sets a non-complex slot value (overwrites any previous slot values). Adds * a new slot if one was not there prior * * @param ccpClassMention * @param slotMentionName * @param slotValue * @throws CASException */
Sets a non-complex slot value (overwrites any previous slot values). Adds a new slot if one was not there prior
setSlotValue
{ "repo_name": "UCDenver-ccp/ccp-nlp", "path": "ccp-nlp-uima/src/main/java/edu/ucdenver/ccp/nlp/uima/util/UIMA_Util.java", "license": "bsd-3-clause", "size": 91302 }
[ "edu.ucdenver.ccp.nlp.core.annotation.impl.KnowledgeRepresentationWrapperException", "edu.ucdenver.ccp.nlp.core.mention.InvalidInputException", "edu.ucdenver.ccp.nlp.core.uima.mention.CCPBooleanSlotMention", "edu.ucdenver.ccp.nlp.core.uima.mention.CCPClassMention", "edu.ucdenver.ccp.nlp.core.uima.mention.CC...
import edu.ucdenver.ccp.nlp.core.annotation.impl.KnowledgeRepresentationWrapperException; import edu.ucdenver.ccp.nlp.core.mention.InvalidInputException; import edu.ucdenver.ccp.nlp.core.uima.mention.CCPBooleanSlotMention; import edu.ucdenver.ccp.nlp.core.uima.mention.CCPClassMention; import edu.ucdenver.ccp.nlp.core.u...
import edu.ucdenver.ccp.nlp.core.annotation.impl.*; import edu.ucdenver.ccp.nlp.core.mention.*; import edu.ucdenver.ccp.nlp.core.uima.mention.*; import edu.ucdenver.ccp.nlp.uima.mention.impl.*; import org.apache.uima.cas.*; import org.apache.uima.jcas.*;
[ "edu.ucdenver.ccp", "org.apache.uima" ]
edu.ucdenver.ccp; org.apache.uima;
1,783,917
public final double calcPhysDam(L2Character attacker, L2Character target, L2Skill skill, boolean shld, boolean crit, boolean dual, boolean ss) { if (attacker instanceof L2PcInstance) { L2PcInstance pcInst = (L2PcInstance) attacker; if (pcInst.isGM() && (pcInst.getAccessLevel() < Config.GM_CAN_GIVE_DA...
final double function(L2Character attacker, L2Character target, L2Skill skill, boolean shld, boolean crit, boolean dual, boolean ss) { if (attacker instanceof L2PcInstance) { L2PcInstance pcInst = (L2PcInstance) attacker; if (pcInst.isGM() && (pcInst.getAccessLevel() < Config.GM_CAN_GIVE_DAMAGE)) { return 0; } } double...
/** * Calculated damage caused by ATTACK of attacker on target, called separatly for each weapon, if dual-weapon is used. * @param attacker player or NPC that makes ATTACK * @param target player or NPC, target of ATTACK * @param skill * @param shld * @param crit if the ATTACK have critical success ...
Calculated damage caused by ATTACK of attacker on target, called separatly for each weapon, if dual-weapon is used
calcPhysDam
{ "repo_name": "oonym/l2InterludeServer", "path": "L2J_Server/java/net/sf/l2j/gameserver/skills/Formulas.java", "license": "gpl-2.0", "size": 57521 }
[ "net.sf.l2j.Config", "net.sf.l2j.gameserver.model.L2Character", "net.sf.l2j.gameserver.model.L2Skill", "net.sf.l2j.gameserver.model.L2Summon", "net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance", "net.sf.l2j.gameserver.model.actor.instance.L2PcInstance", "net.sf.l2j.gameserver.network.SystemMessa...
import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.L2Summon; import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver...
import net.sf.l2j.*; import net.sf.l2j.gameserver.model.*; import net.sf.l2j.gameserver.model.actor.instance.*; import net.sf.l2j.gameserver.network.*; import net.sf.l2j.gameserver.serverpackets.*; import net.sf.l2j.gameserver.templates.*; import net.sf.l2j.util.*;
[ "net.sf.l2j" ]
net.sf.l2j;
670,538
public Map<Integer, Map<Integer, Difference>> getElementDifferences() { return elementDifferences; }
Map<Integer, Map<Integer, Difference>> function() { return elementDifferences; }
/** * Gets all element differences per left index and right index. * A null difference means a match. * * @return The differences, not null */
Gets all element differences per left index and right index. A null difference means a match
getElementDifferences
{ "repo_name": "arteam/unitils", "path": "unitils-core/src/main/java/org/unitils/reflectionassert/difference/UnorderedCollectionDifference.java", "license": "apache-2.0", "size": 5548 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
784,486
public Node createParameters(JSType... parameterTypes) { return createParameters(false, parameterTypes); }
Node function(JSType... parameterTypes) { return createParameters(false, parameterTypes); }
/** * Creates a tree hierarchy representing a typed argument list. * * @param parameterTypes the parameter types. * @return a tree hierarchy representing a typed argument list. */
Creates a tree hierarchy representing a typed argument list
createParameters
{ "repo_name": "GerHobbelt/closure-compiler", "path": "src/com/google/javascript/rhino/jstype/JSTypeRegistry.java", "license": "apache-2.0", "size": 75000 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
532,987
String sSynset = source.getGloss(); String tSynset = target.getGloss(); StringTokenizer stSource = new StringTokenizer(sSynset, " ,.\"'();"); String lemmaS, lemmaT; int counter = 0; while (stSource.hasMoreTokens()) { StringTokenizer stTarget = new StringTokenizer(tSyn...
String sSynset = source.getGloss(); String tSynset = target.getGloss(); StringTokenizer stSource = new StringTokenizer(sSynset, STR'();"); String lemmaS, lemmaT; int counter = 0; while (stSource.hasMoreTokens()) { StringTokenizer stTarget = new StringTokenizer(tSynset, STR'();"); lemmaS = stSource.nextToken(); if (!mea...
/** * Computes the relations with WordNet gloss comparison matcher. * * @param source gloss of source * @param target gloss of target * @return synonym or IDK relation */
Computes the relations with WordNet gloss comparison matcher
match
{ "repo_name": "s-match/s-match-core", "path": "src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNGlossComparison.java", "license": "lgpl-2.1", "size": 2261 }
[ "it.unitn.disi.smatch.data.mappings.IMappingElement", "java.util.StringTokenizer" ]
import it.unitn.disi.smatch.data.mappings.IMappingElement; import java.util.StringTokenizer;
import it.unitn.disi.smatch.data.mappings.*; import java.util.*;
[ "it.unitn.disi", "java.util" ]
it.unitn.disi; java.util;
2,622,798
public static Properties toProperties(JSONObject jo) throws JSONException { Properties properties = new Properties(); if (jo != null) { Iterator<String> keys = jo.keys(); while (keys.hasNext()) { String name = keys.next(); properties.put(name,...
static Properties function(JSONObject jo) throws JSONException { Properties properties = new Properties(); if (jo != null) { Iterator<String> keys = jo.keys(); while (keys.hasNext()) { String name = keys.next(); properties.put(name, jo.getString(name)); } } return properties; }
/** * Converts the JSONObject into a property file object. * @param jo JSONObject * @return java.util.Properties * @throws org.json.JSONException */
Converts the JSONObject into a property file object
toProperties
{ "repo_name": "iclockwork/percy", "path": "wechat4j/src/main/java/com/iclockwork/percy/wechat4j/internal/json/Property.java", "license": "apache-2.0", "size": 2692 }
[ "java.util.Iterator", "java.util.Properties" ]
import java.util.Iterator; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,157,516
private SecurityDescriptor getSecurityDescriptor() { MutableCentralConfigDescriptor centralConfig = centralConfigService.getMutableDescriptor(); return centralConfig.getSecurity(); }
SecurityDescriptor function() { MutableCentralConfigDescriptor centralConfig = centralConfigService.getMutableDescriptor(); return centralConfig.getSecurity(); }
/** * get config descriptor * * @return config descriptor */
get config descriptor
getSecurityDescriptor
{ "repo_name": "alancnet/artifactory", "path": "web/rest-ui/src/main/java/org/artifactory/ui/rest/service/admin/security/httpsso/GetHttpSsoService.java", "license": "apache-2.0", "size": 2678 }
[ "org.artifactory.descriptor.config.MutableCentralConfigDescriptor", "org.artifactory.descriptor.security.SecurityDescriptor" ]
import org.artifactory.descriptor.config.MutableCentralConfigDescriptor; import org.artifactory.descriptor.security.SecurityDescriptor;
import org.artifactory.descriptor.config.*; import org.artifactory.descriptor.security.*;
[ "org.artifactory.descriptor" ]
org.artifactory.descriptor;
419,252
public String jsModuleDependencies() { List<String> moduleNames = sortModules(getAvailableModules().values()); StringBuffer jsCode = new StringBuffer(1024); jsCode.append("\t// an array holding the dependent modules for the n-th module\n"); jsCode.append("\tvar moduleDependencies =...
String function() { List<String> moduleNames = sortModules(getAvailableModules().values()); StringBuffer jsCode = new StringBuffer(1024); jsCode.append(STR\tvar moduleDependencies = new Array(STR);\nSTR\tmoduleDependencies[STR] = new Array(STR\STR\STR, STR);\nSTR\n\n"); return jsCode.toString(); }
/** * Returns js code with array definition for the available module dependencies.<p> * * @return js code */
Returns js code with array definition for the available module dependencies
jsModuleDependencies
{ "repo_name": "sbonoc/opencms-core", "path": "src-setup/org/opencms/setup/CmsSetupBean.java", "license": "lgpl-2.1", "size": 115614 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
654,491
@Override public void exitFactor_prefix(@NotNull MicroParser.Factor_prefixContext ctx) { }
@Override public void exitFactor_prefix(@NotNull MicroParser.Factor_prefixContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
enterFactor_prefix
{ "repo_name": "ssabpisa/compiler-468", "path": "ssabpisa/build/MicroBaseListener.java", "license": "agpl-3.0", "size": 15720 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,050,988
protected void addTlv(ByteBuffer buf, byte type, byte value) { buf.put(type); buf.put((byte) 1); buf.put(value); }
void function(ByteBuffer buf, byte type, byte value) { buf.put(type); buf.put((byte) 1); buf.put(value); }
/** * Adds an optional parameter containing a single byte value. */
Adds an optional parameter containing a single byte value
addTlv
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/core/java/android/net/dhcp/DhcpPacket.java", "license": "gpl-3.0", "size": 30293 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,834,593
public final Map getAspectMap() { return getOwner().getAspectMap(); }
final Map function() { return getOwner().getAspectMap(); }
/** * Gets the {@link SerializableMap} which an AspectOwner always has <p> This is merely a convenience method. * * @return Aspect Map of the owner */
Gets the <code>SerializableMap</code> which an AspectOwner always has This is merely a convenience method
getAspectMap
{ "repo_name": "raygun321/mapcraft", "path": "src/main/java/org/mapcraft/api/aspect/Aspect.java", "license": "mit", "size": 1596 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
804,390
@Test(expected = YMockException.class) public void testCallWithErrorResponse() throws Exception { final Connector connector = new HttpConnector( this.client("msg", HttpStatus.SC_BAD_REQUEST) ); connector.call("some request, ignored"); }
@Test(expected = YMockException.class) void function() throws Exception { final Connector connector = new HttpConnector( this.client("msg", HttpStatus.SC_BAD_REQUEST) ); connector.call(STR); }
/** * Simple call with error response. * @throws Exception If some problem inside */
Simple call with error response
testCallWithErrorResponse
{ "repo_name": "yegor256/ymock", "path": "ymock-client/src/test/java/com/ymock/client/HttpConnectorTest.java", "license": "bsd-3-clause", "size": 5848 }
[ "com.ymock.commons.YMockException", "org.apache.http.HttpStatus", "org.junit.Test" ]
import com.ymock.commons.YMockException; import org.apache.http.HttpStatus; import org.junit.Test;
import com.ymock.commons.*; import org.apache.http.*; import org.junit.*;
[ "com.ymock.commons", "org.apache.http", "org.junit" ]
com.ymock.commons; org.apache.http; org.junit;
934,245
public Digest compute(Message message) { return compute(message.toByteArray()); }
Digest function(Message message) { return compute(message.toByteArray()); }
/** * Computes a digest of the given proto message. Currently, we simply rely on message output as * bytes, but this implementation relies on the stability of the proto encoding, in particular * between different platforms and languages. */
Computes a digest of the given proto message. Currently, we simply rely on message output as bytes, but this implementation relies on the stability of the proto encoding, in particular between different platforms and languages
compute
{ "repo_name": "bazelbuild/tools_remote", "path": "src/main/java/com/google/devtools/build/remote/client/DigestUtil.java", "license": "apache-2.0", "size": 2399 }
[ "build.bazel.remote.execution.v2.Digest", "com.google.protobuf.Message" ]
import build.bazel.remote.execution.v2.Digest; import com.google.protobuf.Message;
import build.bazel.remote.execution.v2.*; import com.google.protobuf.*;
[ "build.bazel.remote", "com.google.protobuf" ]
build.bazel.remote; com.google.protobuf;
2,855,167
private void onTrigger( final ReduceFn<K, InputT, OutputT, W>.Context directContext, ReduceFn<K, InputT, OutputT, W>.Context renamedContext, boolean isFinished) throws Exception { // Prefetch necessary states ReadableState<Instant> outputTimestampFuture = watermarkHold.extr...
void function( final ReduceFn<K, InputT, OutputT, W>.Context directContext, ReduceFn<K, InputT, OutputT, W>.Context renamedContext, boolean isFinished) throws Exception { ReadableState<Instant> outputTimestampFuture = watermarkHold.extractAndRelease(renamedContext, isFinished).readLater(); ReadableState<PaneInfo> paneF...
/** * Run the {@link ReduceFn#onTrigger} method and produce any necessary output. */
Run the <code>ReduceFn#onTrigger</code> method and produce any necessary output
onTrigger
{ "repo_name": "shakamunyi/beam", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/util/ReduceFnRunner.java", "license": "apache-2.0", "size": 37408 }
[ "com.google.cloud.dataflow.sdk.transforms.windowing.PaneInfo", "com.google.cloud.dataflow.sdk.util.state.ReadableState", "org.joda.time.Instant" ]
import com.google.cloud.dataflow.sdk.transforms.windowing.PaneInfo; import com.google.cloud.dataflow.sdk.util.state.ReadableState; import org.joda.time.Instant;
import com.google.cloud.dataflow.sdk.transforms.windowing.*; import com.google.cloud.dataflow.sdk.util.state.*; import org.joda.time.*;
[ "com.google.cloud", "org.joda.time" ]
com.google.cloud; org.joda.time;
1,146,597
public void doFilter(PcGtsType pc);
void function(PcGtsType pc);
/** * Perform the filter operation on the PcGtsType argument. * @param pc the PcGtsType object to filter */
Perform the filter operation on the PcGtsType argument
doFilter
{ "repo_name": "Transkribus/TranskribusCore", "path": "src/main/java/eu/transkribus/core/model/beans/pagecontent/filter/IPageContentFilter.java", "license": "gpl-3.0", "size": 425 }
[ "eu.transkribus.core.model.beans.pagecontent.PcGtsType" ]
import eu.transkribus.core.model.beans.pagecontent.PcGtsType;
import eu.transkribus.core.model.beans.pagecontent.*;
[ "eu.transkribus.core" ]
eu.transkribus.core;
750,951
@Test public void testFlushNoBatchInsertCommand() throws InterruptedException, ExecutionException { final Document doc = BuilderFactory.start().build(); final Document replyDoc = BuilderFactory.start().addInteger("n", 2) .build(); final Insert message = new I...
void function() throws InterruptedException, ExecutionException { final Document doc = BuilderFactory.start().build(); final Document replyDoc = BuilderFactory.start().addInteger("n", 2) .build(); final Insert message = new Insert("test", "test", Collections.singletonList(doc), false); final GetLastError getLastError =...
/** * Test method for {@link BatchedAsyncMongoCollectionImpl#flush()}. * * @throws ExecutionException * On a test failure. * @throws InterruptedException * On a test failure. */
Test method for <code>BatchedAsyncMongoCollectionImpl#flush()</code>
testFlushNoBatchInsertCommand
{ "repo_name": "allanbank/mongodb-async-driver", "path": "src/test/java/com/allanbank/mongodb/client/BatchedAsyncMongoCollectionImplTest.java", "license": "apache-2.0", "size": 32570 }
[ "com.allanbank.mongodb.AnswerCallback", "com.allanbank.mongodb.Durability", "com.allanbank.mongodb.Version", "com.allanbank.mongodb.bson.Document", "com.allanbank.mongodb.bson.builder.BuilderFactory", "com.allanbank.mongodb.client.message.GetLastError", "com.allanbank.mongodb.client.message.Insert", "...
import com.allanbank.mongodb.AnswerCallback; import com.allanbank.mongodb.Durability; import com.allanbank.mongodb.Version; import com.allanbank.mongodb.bson.Document; import com.allanbank.mongodb.bson.builder.BuilderFactory; import com.allanbank.mongodb.client.message.GetLastError; import com.allanbank.mongodb.client....
import com.allanbank.mongodb.*; import com.allanbank.mongodb.bson.*; import com.allanbank.mongodb.bson.builder.*; import com.allanbank.mongodb.client.message.*; import java.util.*; import java.util.concurrent.*; import org.easymock.*; import org.hamcrest.*; import org.junit.*;
[ "com.allanbank.mongodb", "java.util", "org.easymock", "org.hamcrest", "org.junit" ]
com.allanbank.mongodb; java.util; org.easymock; org.hamcrest; org.junit;
1,652,353
public boolean isCut(Collection<C> conditions);
boolean function(Collection<C> conditions);
/** * Check if a given collection of conditions is a cut in this branching process. * @param conditions Collection of conditions. * @return <tt>true</tt> if the given collection of conditions is a cut of this branching process; otherwise <tt>false</tt>. */
Check if a given collection of conditions is a cut in this branching process
isCut
{ "repo_name": "jbpt/codebase", "path": "jbpt-petri/src/main/java/org/jbpt/petri/unfolding/IBranchingProcess.java", "license": "lgpl-3.0", "size": 7152 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
329,342
public boolean isFromParser(AtnParseResult parseResult, String compoundParserId, String parserId) { boolean result = false; if (parseResult != null) { result = (compoundParserId == null || "".equals(compoundParserId) || compoundParserId.equals(parseResult.getCompoundParserId())) && ...
boolean function(AtnParseResult parseResult, String compoundParserId, String parserId) { boolean result = false; if (parseResult != null) { result = (compoundParserId == null STR".equals(parserId) parserId.equals(parseResult.getParserId())); } return result; } }
/** * Determine whether the given interp is a direct result from the identified * parser. */
Determine whether the given interp is a direct result from the identified parser
isFromParser
{ "repo_name": "KoehlerSB747/sd-tools", "path": "src/main/java/org/sd/atn/testbed/ParseRunnerSandboxHeadless.java", "license": "apache-2.0", "size": 5377 }
[ "org.sd.atn.AtnParseResult" ]
import org.sd.atn.AtnParseResult;
import org.sd.atn.*;
[ "org.sd.atn" ]
org.sd.atn;
2,099,795
public Object mapInterfaceFrom(Object oId, Type type) { checkDisposed(); // TODO What happens if an exception is thrown after the call to // acquire, but before it is guaranteed that a pairing release will be // called eventually? acquire(); String oid = (String) oId...
Object function(Object oId, Type type) { checkDisposed(); acquire(); String oid = (String) oId; Object object = _java_environment.getRegisteredInterface(oid, type); if (object == null) { object = _java_environment.registerInterface( proxyFactory.create(oid, type), new String[] { oid }, type); } else if (!hasRefHolder(o...
/** * Maps an object from destination environment to the source environment. * <p> * @return the object in the source environment * @param oId the object to map * @param type the interface under which is to be mapped * @see com.sun.star.uno.IBri...
Maps an object from destination environment to the source environment.
mapInterfaceFrom
{ "repo_name": "qt-haiku/LibreOffice", "path": "jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java", "license": "gpl-3.0", "size": 25088 }
[ "com.sun.star.uno.Type" ]
import com.sun.star.uno.Type;
import com.sun.star.uno.*;
[ "com.sun.star" ]
com.sun.star;
2,265,905
return new TransistorTransferExperiment(); } private static final float K = 1000; private LineChart outputChart; private float initialVoltage; private float finalVoltage; private float collectorVoltage; private float stepVoltage; private float totalSteps; private ScienceLab scienceL...
return new TransistorTransferExperiment(); } private static final float K = 1000; private LineChart outputChart; private float initialVoltage; private float finalVoltage; private float collectorVoltage; private float stepVoltage; private float totalSteps; private ScienceLab scienceLab = ScienceLabCommon.scienceLab; pri...
/*********************************************************************************************** * Experiment is to provide voltages to Collector and Base of a BJT and measure collector and * base currents and plot the relationship in a graph **************************************************************...
Experiment is to provide voltages to Collector and Base of a BJT and measure collector and base currents and plot the relationship in a graph
newInstance
{ "repo_name": "viveksb007/pslab-android", "path": "app/src/main/java/org/fossasia/pslab/experimentsetup/electronicexperiments/TransistorTransferExperiment.java", "license": "apache-2.0", "size": 12823 }
[ "android.support.design.widget.TextInputEditText", "android.support.design.widget.TextInputLayout", "com.github.mikephil.charting.charts.LineChart", "java.util.ArrayList", "org.fossasia.pslab.communication.ScienceLab", "org.fossasia.pslab.others.ScienceLabCommon" ]
import android.support.design.widget.TextInputEditText; import android.support.design.widget.TextInputLayout; import com.github.mikephil.charting.charts.LineChart; import java.util.ArrayList; import org.fossasia.pslab.communication.ScienceLab; import org.fossasia.pslab.others.ScienceLabCommon;
import android.support.design.widget.*; import com.github.mikephil.charting.charts.*; import java.util.*; import org.fossasia.pslab.communication.*; import org.fossasia.pslab.others.*;
[ "android.support", "com.github.mikephil", "java.util", "org.fossasia.pslab" ]
android.support; com.github.mikephil; java.util; org.fossasia.pslab;
1,365,736
private static CachingCounters internalCache(DataSpec dataSpec, Cache cache, CacheDataSource dataSource, byte[] buffer, PriorityTaskManager priorityTaskManager, int priority, CachingCounters counters) throws IOException, InterruptedException { long start = dataSpec.position; long left = dataSpec.l...
static CachingCounters function(DataSpec dataSpec, Cache cache, CacheDataSource dataSource, byte[] buffer, PriorityTaskManager priorityTaskManager, int priority, CachingCounters counters) throws IOException, InterruptedException { long start = dataSpec.position; long left = dataSpec.length; String key = getKey(dataSpec...
/** * Caches the data defined by {@code dataSpec} while skipping already cached data. If {@code * dataSource} or {@code buffer} is null performs a dry run. * * @param dataSpec Defines the data to be cached. * @param cache A {@link Cache} to store the data. * @param dataSource A {@link CacheDataSource}...
Caches the data defined by dataSpec while skipping already cached data. If dataSource or buffer is null performs a dry run
internalCache
{ "repo_name": "YouKim/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheUtil.java", "license": "apache-2.0", "size": 9501 }
[ "com.google.android.exoplayer2.upstream.DataSpec", "com.google.android.exoplayer2.util.PriorityTaskManager", "java.io.IOException" ]
import com.google.android.exoplayer2.upstream.DataSpec; import com.google.android.exoplayer2.util.PriorityTaskManager; import java.io.IOException;
import com.google.android.exoplayer2.upstream.*; import com.google.android.exoplayer2.util.*; import java.io.*;
[ "com.google.android", "java.io" ]
com.google.android; java.io;
2,725,463
public CreateSnapshotRequest settings(Settings.Builder settings) { this.settings = settings.build(); return this; }
CreateSnapshotRequest function(Settings.Builder settings) { this.settings = settings.build(); return this; }
/** * Sets repository-specific snapshot settings. * <p/> * See repository documentation for more information. * * @param settings repository-specific snapshot settings * @return this request */
Sets repository-specific snapshot settings. See repository documentation for more information
settings
{ "repo_name": "zuoyebushiwo/elasticsearch1.7-study", "path": "src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java", "license": "apache-2.0", "size": 17384 }
[ "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,479,655
public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper) { this.authoritiesMapper = authoritiesMapper; }
void function(GrantedAuthoritiesMapper authoritiesMapper) { this.authoritiesMapper = authoritiesMapper; }
/** * Sets the {@link GrantedAuthoritiesMapper} used for converting the authorities * loaded from storage to a new set of authorities which will be associated to the * {@link UsernamePasswordAuthenticationToken}. * @param authoritiesMapper the {@link GrantedAuthoritiesMapper} used for mapping the * user's aut...
Sets the <code>GrantedAuthoritiesMapper</code> used for converting the authorities loaded from storage to a new set of authorities which will be associated to the <code>UsernamePasswordAuthenticationToken</code>
setAuthoritiesMapper
{ "repo_name": "spring-projects/spring-security", "path": "config/src/main/java/org/springframework/security/config/ldap/AbstractLdapAuthenticationManagerFactory.java", "license": "apache-2.0", "size": 7084 }
[ "org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper" ]
import org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper;
import org.springframework.security.core.authority.mapping.*;
[ "org.springframework.security" ]
org.springframework.security;
956,538
public Builder idleExpiration(final long timeout, final TimeUnit unit) { this.idleExpirationNanos = unit.toNanos(timeout); return this; }
Builder function(final long timeout, final TimeUnit unit) { this.idleExpirationNanos = unit.toNanos(timeout); return this; }
/** * Specifies the amount of time that a connection can remain idle in the * connection pool before it is "expired" and shutdown. The default * value is 30 seconds. * * @param timeout to use when interacting with remote instances * @param unit unit of time over whi...
Specifies the amount of time that a connection can remain idle in the connection pool before it is "expired" and shutdown. The default value is 30 seconds
idleExpiration
{ "repo_name": "MikeThomsen/nifi", "path": "nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/SiteToSiteClient.java", "license": "apache-2.0", "size": 40695 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
793,050
public ColorMap generateColorMap(double min, double max) { final int numEntries = entries.length; final double range = max - min; boolean intervals = false; // Preliminar check on intervals vs ramp for (int i = 0; i < numEntries - 2; i += 2) { if (Double.compare(...
ColorMap function(double min, double max) { final int numEntries = entries.length; final double range = max - min; boolean intervals = false; for (int i = 0; i < numEntries - 2; i += 2) { if (Double.compare(entries[i + 1].percentage, entries[i + 2].percentage) == 0) { intervals = true; } else { intervals = false; } } C...
/** * Generate a {@link ColorMap} object, by updating the ColorMapEntries quantities on top of the * min and max values reported here. */
Generate a <code>ColorMap</code> object, by updating the ColorMapEntries quantities on top of the min and max values reported here
generateColorMap
{ "repo_name": "geotools/geotools", "path": "modules/library/render/src/main/java/org/geotools/renderer/lite/gridcoverage2d/GradientColorMapGenerator.java", "license": "lgpl-2.1", "size": 14635 }
[ "org.geotools.styling.ColorMap", "org.geotools.styling.ColorMapEntry", "org.geotools.styling.ColorMapImpl" ]
import org.geotools.styling.ColorMap; import org.geotools.styling.ColorMapEntry; import org.geotools.styling.ColorMapImpl;
import org.geotools.styling.*;
[ "org.geotools.styling" ]
org.geotools.styling;
2,536,380
final WorkQueue registerWorker(ForkJoinWorkerThread wt) { UncaughtExceptionHandler handler; WorkQueue[] ws; int s, ps; wt.setDaemon(true); if ((handler = ueh) != null) wt.setUncaughtExceptionHandler(handler); do {} while (!U.compareAndSwapInt(this, INDEXSEED, s = indexSee...
final WorkQueue registerWorker(ForkJoinWorkerThread wt) { UncaughtExceptionHandler handler; WorkQueue[] ws; int s, ps; wt.setDaemon(true); if ((handler = ueh) != null) wt.setUncaughtExceptionHandler(handler); do {} while (!U.compareAndSwapInt(this, INDEXSEED, s = indexSeed, s += SEED_INCREMENT) s == 0); WorkQueue w = n...
/** * Callback from ForkJoinWorkerThread to establish and record its * WorkQueue. To avoid scanning bias due to packing entries in * front of the workQueues array, we treat the array as a simple * power-of-two hash table using per-thread seed as hash, * expanding as needed. * * @param...
Callback from ForkJoinWorkerThread to establish and record its WorkQueue. To avoid scanning bias due to packing entries in front of the workQueues array, we treat the array as a simple power-of-two hash table using per-thread seed as hash, expanding as needed
registerWorker
{ "repo_name": "haitaomei/SPRY", "path": "src/java/util/concurrent/ForkJoinPool.java", "license": "mit", "size": 153312 }
[ "java.lang.Thread", "java.util.Arrays" ]
import java.lang.Thread; import java.util.Arrays;
import java.lang.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,299,255
private void deleteRow(Scanner scanner, BatchWriter bw) throws MutationsRejectedException { Mutation deleter = null; // iterate through the keys final Text row = new Text(); final Text cf = new Text(); final Text cq = new Text(); for (Entry<Key, Value> entry : scanner) { // create a muta...
void function(Scanner scanner, BatchWriter bw) throws MutationsRejectedException { Mutation deleter = null; final Text row = new Text(); final Text cf = new Text(); final Text cq = new Text(); for (Entry<Key, Value> entry : scanner) { if (deleter == null) { entry.getKey().getRow(row); deleter = new Mutation(row); } ent...
/** * Deletes a row, given a Scanner of JUST that row. */
Deletes a row, given a Scanner of JUST that row
deleteRow
{ "repo_name": "leschekhomann/YCSB", "path": "accumulo1.8/src/main/java/com/yahoo/ycsb/db/accumulo/AccumuloClient.java", "license": "apache-2.0", "size": 12969 }
[ "java.util.Map", "org.apache.accumulo.core.client.BatchWriter", "org.apache.accumulo.core.client.MutationsRejectedException", "org.apache.accumulo.core.client.Scanner", "org.apache.accumulo.core.data.Key", "org.apache.accumulo.core.data.Mutation", "org.apache.accumulo.core.data.Value", "org.apache.had...
import java.util.Map; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.MutationsRejectedException; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value...
import java.util.*; import org.apache.accumulo.core.client.*; import org.apache.accumulo.core.data.*; import org.apache.hadoop.io.*;
[ "java.util", "org.apache.accumulo", "org.apache.hadoop" ]
java.util; org.apache.accumulo; org.apache.hadoop;
1,548,487
private void handleMotionEventStateDragging(MotionEvent event, int policyFlags) { final int pointerIdBits = (1 << mDraggingPointerId); switch (event.getActionMasked()) { case MotionEvent.ACTION_DOWN: { throw new IllegalStateException("Dragging state can be reached only if...
void function(MotionEvent event, int policyFlags) { final int pointerIdBits = (1 << mDraggingPointerId); switch (event.getActionMasked()) { case MotionEvent.ACTION_DOWN: { throw new IllegalStateException(STR + STR); } case MotionEvent.ACTION_POINTER_DOWN: { mCurrentState = STATE_DELEGATING; if (mDraggingPointerId != IN...
/** * Handles a motion event in dragging state. * * @param event The event to be handled. * @param policyFlags The policy flags associated with the event. */
Handles a motion event in dragging state
handleMotionEventStateDragging
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/base/services/java/com/android/server/accessibility/TouchExplorer.java", "license": "gpl-2.0", "size": 93961 }
[ "android.view.MotionEvent", "android.view.accessibility.AccessibilityEvent" ]
import android.view.MotionEvent; import android.view.accessibility.AccessibilityEvent;
import android.view.*; import android.view.accessibility.*;
[ "android.view" ]
android.view;
691,277
@Override public void startDocument() throws SAXException { super.startDocument(); project = null; currentSource = null; }
void function() throws SAXException { super.startDocument(); project = null; currentSource = null; }
/** * Called at the start of the document, this implementation simply resets the * state of this handler. * * @throws SAXException if there is a problem with the parsing. */
Called at the start of the document, this implementation simply resets the state of this handler
startDocument
{ "repo_name": "drhee/toxoMine", "path": "intermine/MineManager/modelviewer/src/main/java/org/intermine/modelviewer/jaxb/ProjectHandler.java", "license": "lgpl-2.1", "size": 5624 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
252,838
ReleaseBundlingSupport addXcodeSettings(XcodeProvider.Builder xcodeProviderBuilder) { bundleSupport.addXcodeSettings(xcodeProviderBuilder); // Add application-related Xcode build settings to the main target only. The companion library // target does not need them. xcodeProviderBuilder.addMainTargetXco...
ReleaseBundlingSupport addXcodeSettings(XcodeProvider.Builder xcodeProviderBuilder) { bundleSupport.addXcodeSettings(xcodeProviderBuilder); xcodeProviderBuilder.addMainTargetXcodeprojBuildSettings(buildSettings()); return this; }
/** * Adds bundle- and application-related settings to the given Xcode provider builder. * * @return this application support */
Adds bundle- and application-related settings to the given Xcode provider builder
addXcodeSettings
{ "repo_name": "kamalmarhubi/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java", "license": "apache-2.0", "size": 48045 }
[ "com.google.devtools.build.lib.rules.objc.Bundling" ]
import com.google.devtools.build.lib.rules.objc.Bundling;
import com.google.devtools.build.lib.rules.objc.*;
[ "com.google.devtools" ]
com.google.devtools;
2,262,780
protected ModelAndView handleConversionNotSupported(ConversionNotSupportedException ex, HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException { if (logger.isWarnEnabled()) { logger.warn("Failed to convert request element: " + ex); } sendServerError(ex, request, res...
ModelAndView function(ConversionNotSupportedException ex, HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException { if (logger.isWarnEnabled()) { logger.warn(STR + ex); } sendServerError(ex, request, response); return new ModelAndView(); }
/** * Handle the case when a {@link org.springframework.web.bind.WebDataBinder} conversion cannot occur. * <p>The default implementation sends an HTTP 500 error, and returns an empty {@code ModelAndView}. * Alternatively, a fallback view could be chosen, or the TypeMismatchException could be rethrown as-is. * @...
Handle the case when a <code>org.springframework.web.bind.WebDataBinder</code> conversion cannot occur. The default implementation sends an HTTP 500 error, and returns an empty ModelAndView. Alternatively, a fallback view could be chosen, or the TypeMismatchException could be rethrown as-is
handleConversionNotSupported
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/spring/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java", "license": "gpl-2.0", "size": 24420 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.springframework.beans.ConversionNotSupportedException", "org.springframework.web.servlet.ModelAndView" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.ConversionNotSupportedException; import org.springframework.web.servlet.ModelAndView;
import java.io.*; import javax.servlet.http.*; import org.springframework.beans.*; import org.springframework.web.servlet.*;
[ "java.io", "javax.servlet", "org.springframework.beans", "org.springframework.web" ]
java.io; javax.servlet; org.springframework.beans; org.springframework.web;
118,552
public final BigDecimal taxValue(Region region, double taxfrac,int protect, Currency curren) { return this.taxValue(region, taxfrac, protect, this.getAdditionalCost(curren),this.taxedrate, curren); }
final BigDecimal function(Region region, double taxfrac,int protect, Currency curren) { return this.taxValue(region, taxfrac, protect, this.getAdditionalCost(curren),this.taxedrate, curren); }
/** * Returns the amount of money that the the parameters would * cost. * @param region * @param curren * @return */
Returns the amount of money that the the parameters would cost
taxValue
{ "repo_name": "InspiredOne/Inspired-Nations-v1.0", "path": "Inspired Nations v1.0/src/com/github/InspiredOne/InspiredNations/Governments/InspiredGov.java", "license": "gpl-3.0", "size": 35278 }
[ "com.github.InspiredOne", "java.math.BigDecimal" ]
import com.github.InspiredOne; import java.math.BigDecimal;
import com.github.*; import java.math.*;
[ "com.github", "java.math" ]
com.github; java.math;
1,594,976
public OutErr getOutErr() { return outErrToReporter; }
OutErr function() { return outErrToReporter; }
/** * Returns an OutErr that sends all of its output to this Reporter. * Each write to the OutErr will cause an EventKind.STDOUT or EventKind.STDERR event. */
Returns an OutErr that sends all of its output to this Reporter. Each write to the OutErr will cause an EventKind.STDOUT or EventKind.STDERR event
getOutErr
{ "repo_name": "hermione521/bazel", "path": "src/main/java/com/google/devtools/build/lib/events/Reporter.java", "license": "apache-2.0", "size": 6347 }
[ "com.google.devtools.build.lib.util.io.OutErr" ]
import com.google.devtools.build.lib.util.io.OutErr;
import com.google.devtools.build.lib.util.io.*;
[ "com.google.devtools" ]
com.google.devtools;
298,915
public void promptRenameTab(int index) { // Prompt the user to enter a link name String input = (String) JOptionPane.showInputDialog(LinkManager.getFrame(), "Please enter a new name for this tab.", "Enter Tab Name", JOptionPane.PLAIN_MESSAGE, null, null, tabs.get(index).getLinkList().getName()); // ...
void function(int index) { String input = (String) JOptionPane.showInputDialog(LinkManager.getFrame(), STR, STR, JOptionPane.PLAIN_MESSAGE, null, null, tabs.get(index).getLinkList().getName()); if (input == null) { return; } else if (input.equals("")) { promptRenameTab(index); } else { this.setTitleAt(index, input); } ...
/** * This function will prompt the user to rename the tab at the specified index. * It will return the original name if the user does not enter a name. * * @param index - the integer position of the tab in the tab list. */
This function will prompt the user to rename the tab at the specified index. It will return the original name if the user does not enter a name
promptRenameTab
{ "repo_name": "ian-gardea/link_manager", "path": "LinkManager/src/CustomTabList.java", "license": "gpl-3.0", "size": 13234 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,074,297
private static void unknownPacket(State state, int id) { log.warn(String.format("Unknown packet recived from Game Server: 0x%02X state=%s", id, state.toString())); }
static void function(State state, int id) { log.warn(String.format(STR, id, state.toString())); }
/** * Logs unknown packet. * * @param state * @param id */
Logs unknown packet
unknownPacket
{ "repo_name": "Estada1401/anuwhscript", "path": "ChatServer/src/com/aionemu/chatserver/network/factories/GsPacketHandlerFactory.java", "license": "gpl-3.0", "size": 3384 }
[ "com.aionemu.chatserver.network.gameserver.GsConnection" ]
import com.aionemu.chatserver.network.gameserver.GsConnection;
import com.aionemu.chatserver.network.gameserver.*;
[ "com.aionemu.chatserver" ]
com.aionemu.chatserver;
449,348
@Override public void onPointerTouchEnd(PointerTouchEndEvent event) { onMapTouchEnd(event); }
void function(PointerTouchEndEvent event) { onMapTouchEnd(event); }
/** * Don't override this method, override {@link #onMapTouchEnd(TouchEvent)} instead. * @since 2.4.0 */
Don't override this method, override <code>#onMapTouchEnd(TouchEvent)</code> instead
onPointerTouchEnd
{ "repo_name": "geomajas/geomajas-project-client-gwt2", "path": "common-gwt/common-gwt/src/main/java/org/geomajas/gwt/client/controller/AbstractController.java", "license": "agpl-3.0", "size": 9694 }
[ "org.geomajas.gwt.client.event.PointerTouchEndEvent" ]
import org.geomajas.gwt.client.event.PointerTouchEndEvent;
import org.geomajas.gwt.client.event.*;
[ "org.geomajas.gwt" ]
org.geomajas.gwt;
451,884
return new Builder(measurement); } public static final class Builder { private final String measurement; private final Map<String, String> tags = Maps.newTreeMap(Ordering.natural()); private Long time; private TimeUnit precision = TimeUnit.NANOSECONDS; private final Map<String, Object> fields = Maps.ne...
return new Builder(measurement); } static final class Builder { private final String function; final Map<String, String> tags = Maps.newTreeMap(Ordering.natural()); private Long time; private TimeUnit precision = TimeUnit.NANOSECONDS; private final Map<String, Object> fields = Maps.newTreeMap(Ordering.natural()); Build...
/** * Create a new Point Build build to create a new Point in a fluent manner- * * @param measurement * the name of the measurement. * @return the Builder to be able to add further Builder calls. */
Create a new Point Build build to create a new Point in a fluent manner-
measurement
{ "repo_name": "mistsys/influxdb-java", "path": "src/main/java/org/influxdb/dto/Point.java", "license": "mit", "size": 7249 }
[ "com.google.common.collect.Maps", "com.google.common.collect.Ordering", "java.util.Map", "java.util.concurrent.TimeUnit" ]
import com.google.common.collect.Maps; import com.google.common.collect.Ordering; import java.util.Map; import java.util.concurrent.TimeUnit;
import com.google.common.collect.*; import java.util.*; import java.util.concurrent.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
433,506
public ServiceResponseWithHeaders<Void, LROsPost202Retry200Headers> post202Retry200(Product product) throws CloudException, IOException, InterruptedException { Response<ResponseBody> result = service.post202Retry200(product, this.client.getAcceptLanguage()).execute(); return client.getAzureClient()....
ServiceResponseWithHeaders<Void, LROsPost202Retry200Headers> function(Product product) throws CloudException, IOException, InterruptedException { Response<ResponseBody> result = service.post202Retry200(product, this.client.getAcceptLanguage()).execute(); return client.getAzureClient().getPostOrDeleteResultWithHeaders(r...
/** * Long running post request, service returns a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. * * @param product Product to put * @throws CloudException exception thrown from REST call * @throws IOException excep...
Long running post request, service returns a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success
post202Retry200
{ "repo_name": "vulcansteel/autorest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROsOperationsImpl.java", "license": "mit", "size": 77838 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.azure.CloudException", "com.microsoft.rest.ServiceResponseWithHeaders", "com.squareup.okhttp.ResponseBody", "java.io.IOException" ]
import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponseWithHeaders; import com.squareup.okhttp.ResponseBody; import java.io.IOException;
import com.google.common.reflect.*; import com.microsoft.azure.*; import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.io.*;
[ "com.google.common", "com.microsoft.azure", "com.microsoft.rest", "com.squareup.okhttp", "java.io" ]
com.google.common; com.microsoft.azure; com.microsoft.rest; com.squareup.okhttp; java.io;
1,178,512
@Test @SuppressWarnings("unchecked") public void testPointSessions() throws Exception { closeCalled.set(0); WindowOperator operator = WindowOperatorBuilder .builder() .withInputFields(inputFieldTypes) .assigner(new PointSessionWindowAssigner(3000)) .withEventTime(2) .aggregateAndBuild(getT...
@SuppressWarnings(STR) void function() throws Exception { closeCalled.set(0); WindowOperator operator = WindowOperatorBuilder .builder() .withInputFields(inputFieldTypes) .assigner(new PointSessionWindowAssigner(3000)) .withEventTime(2) .aggregateAndBuild(getTimeWindowAggFunction(), equaliser, accTypes, aggResultTypes,...
/** * This tests a custom Session window assigner that assigns some elements to "point windows", * windows that have the same timestamp for start and end. * * <p>In this test, elements that have 33 as the second tuple field will be put into a point * window. */
This tests a custom Session window assigner that assigns some elements to "point windows", windows that have the same timestamp for start and end. In this test, elements that have 33 as the second tuple field will be put into a point window
testPointSessions
{ "repo_name": "hequn8128/flink", "path": "flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/operators/window/WindowOperatorTest.java", "license": "apache-2.0", "size": 55223 }
[ "java.util.concurrent.ConcurrentLinkedQueue", "org.apache.flink.runtime.checkpoint.OperatorSubtaskState", "org.apache.flink.streaming.api.watermark.Watermark", "org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness", "org.apache.flink.table.data.RowData", "org.apache.flink.table.runtime.util.S...
import java.util.concurrent.ConcurrentLinkedQueue; import org.apache.flink.runtime.checkpoint.OperatorSubtaskState; import org.apache.flink.streaming.api.watermark.Watermark; import org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness; import org.apache.flink.table.data.RowData; import org.apache.flink.tab...
import java.util.concurrent.*; import org.apache.flink.runtime.checkpoint.*; import org.apache.flink.streaming.api.watermark.*; import org.apache.flink.streaming.util.*; import org.apache.flink.table.data.*; import org.apache.flink.table.runtime.util.*; import org.junit.*;
[ "java.util", "org.apache.flink", "org.junit" ]
java.util; org.apache.flink; org.junit;
4,760
@Override public DeviceDataInterface getInitialDriver(String functionality) throws BadFunctionalityRequestException, UnknownDriverRequest, InvalidConfigurationFileException { List<String> drivers = getDevices(functionality); // TODO check into get(0) -> underflow exception possible? return inflateDriver...
DeviceDataInterface function(String functionality) throws BadFunctionalityRequestException, UnknownDriverRequest, InvalidConfigurationFileException { List<String> drivers = getDevices(functionality); return inflateDriver(drivers.get(0), functionality); }
/** * Allows the user to get an instance of the first available driver * supporting the specified functionality. * * @param functionality * @return An instance of a driver capable of supporting that functionality * @throws BadFunctionalityRequestException * no devices support that functionali...
Allows the user to get an instance of the first available driver supporting the specified functionality
getInitialDriver
{ "repo_name": "ColoradoSchoolOfMines/interface_sdk", "path": "src/main/java/edu/mines/acmX/exhibit/input_services/hardware/HardwareManager.java", "license": "gpl-3.0", "size": 20925 }
[ "edu.mines.acmX.exhibit.input_services.hardware.devicedata.DeviceDataInterface", "edu.mines.acmX.exhibit.input_services.hardware.drivers.InvalidConfigurationFileException", "java.util.List" ]
import edu.mines.acmX.exhibit.input_services.hardware.devicedata.DeviceDataInterface; import edu.mines.acmX.exhibit.input_services.hardware.drivers.InvalidConfigurationFileException; import java.util.List;
import edu.mines.*; import java.util.*;
[ "edu.mines", "java.util" ]
edu.mines; java.util;
334,258
public Field getField(String fieldName) throws FormException { if (fieldName.startsWith("folder.") || fieldName.startsWith("instance.")) { int pos = fieldName.indexOf("."); return getFolderField(fieldName.substring(pos + 1, fieldName.length())); } if (fieldName.startsWith("action.")) { ...
Field function(String fieldName) throws FormException { if (fieldName.startsWith(STR) fieldName.startsWith(STR)) { int pos = fieldName.indexOf("."); return getFolderField(fieldName.substring(pos + 1, fieldName.length())); } if (fieldName.startsWith(STR)) { int pos = fieldName.indexOf("."); return getActionField(fieldNa...
/** * Returns the named field. * @throw FormException when the fieldName is unknown. */
Returns the named field
getField
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "ejb-core/formtemplate/src/main/java/com/silverpeas/workflow/engine/dataRecord/LazyProcessInstanceDataRecord.java", "license": "agpl-3.0", "size": 9007 }
[ "com.silverpeas.form.Field", "com.silverpeas.form.FormException" ]
import com.silverpeas.form.Field; import com.silverpeas.form.FormException;
import com.silverpeas.form.*;
[ "com.silverpeas.form" ]
com.silverpeas.form;
958,177
public EmbeddedActiveMQ setSecurityManager(ActiveMQSecurityManager securityManager) { this.securityManager = securityManager; return this; }
EmbeddedActiveMQ function(ActiveMQSecurityManager securityManager) { this.securityManager = securityManager; return this; }
/** * Set the activemq security manager. This defaults to org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl * * @param securityManager */
Set the activemq security manager. This defaults to org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl
setSecurityManager
{ "repo_name": "tabish121/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/embedded/EmbeddedActiveMQ.java", "license": "apache-2.0", "size": 6354 }
[ "org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager" ]
import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
import org.apache.activemq.artemis.spi.core.security.*;
[ "org.apache.activemq" ]
org.apache.activemq;
2,883,815
public void backToClaimList(MenuItem menu) { Intent intent = new Intent(EditExpenseActivity.this, AddClaimActivity.class); startActivity(intent); }
void function(MenuItem menu) { Intent intent = new Intent(EditExpenseActivity.this, AddClaimActivity.class); startActivity(intent); }
/** * Function that is called when "Return to claim list" menu item clicked * * @param menu menu item that was clicked */
Function that is called when "Return to claim list" menu item clicked
backToClaimList
{ "repo_name": "CMPUT301W15T15/TravelClaimsApp", "path": "TravelClaimsApp/src/com/cmput301w15t15/travelclaimsapp/activitys/EditExpenseActivity.java", "license": "gpl-3.0", "size": 16424 }
[ "android.content.Intent", "android.view.MenuItem" ]
import android.content.Intent; import android.view.MenuItem;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
951,148
@Test public void test_toPattern_allLocales() { for (int formatStyle = DateFormat.FULL; formatStyle <= DateFormat.SHORT; formatStyle++) { try { assertSupportedSymbols(DateFormat.getDateInstance(formatStyle, locale), locale); assertSupportedSymb...
void function() { for (int formatStyle = DateFormat.FULL; formatStyle <= DateFormat.SHORT; formatStyle++) { try { assertSupportedSymbols(DateFormat.getDateInstance(formatStyle, locale), locale); assertSupportedSymbols(DateFormat.getTimeInstance(formatStyle, locale), locale); assertSupportedSymbols(DateFormat.getDateTim...
/** * Test {@link SimpleDateFormat#toPattern()} contains only supported symbols. */
Test <code>SimpleDateFormat#toPattern()</code> contains only supported symbols
test_toPattern_allLocales
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/luni/src/test/java/libcore/highmemorytest/java/text/DateFormatTest.java", "license": "gpl-2.0", "size": 4554 }
[ "java.text.DateFormat", "java.util.Set", "java.util.stream.Collectors" ]
import java.text.DateFormat; import java.util.Set; import java.util.stream.Collectors;
import java.text.*; import java.util.*; import java.util.stream.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,660,142
// given BigInteger infoHash = new BigInteger("123123"); // when Collection<DHTPeer> result = this.rt.findPeers(infoHash.toByteArray()); // then assertNull(result); }
BigInteger infoHash = new BigInteger(STR); Collection<DHTPeer> result = this.rt.findPeers(infoHash.toByteArray()); assertNull(result); }
/** * testFindPeers01() - peer cannot be found. */
testFindPeers01() - peer cannot be found
testFindPeers01
{ "repo_name": "mfriesen/cthulhu-dht", "path": "src/test/java/ca/gobits/test/dht/DHTInfoHashRoutingTableBasicUnitTest.java", "license": "apache-2.0", "size": 4563 }
[ "ca.gobits.dht.DHTPeer", "java.math.BigInteger", "java.util.Collection", "org.junit.Assert" ]
import ca.gobits.dht.DHTPeer; import java.math.BigInteger; import java.util.Collection; import org.junit.Assert;
import ca.gobits.dht.*; import java.math.*; import java.util.*; import org.junit.*;
[ "ca.gobits.dht", "java.math", "java.util", "org.junit" ]
ca.gobits.dht; java.math; java.util; org.junit;
2,648,816
@InterfaceAudience.Public public Document getDocument(String documentId) { if (documentId == null || documentId.length() == 0) { return null; } Document doc = docCache.get(documentId); if (doc == null) { doc = new Document(this, documentId); i...
@InterfaceAudience.Public Document function(String documentId) { if (documentId == null documentId.length() == 0) { return null; } Document doc = docCache.get(documentId); if (doc == null) { doc = new Document(this, documentId); if (doc == null) { return null; } docCache.put(documentId, doc); } return doc; }
/** * Instantiates a Document object with the given ID. * Doesn't touch the on-disk sqliteDb; a document with that ID doesn't * even need to exist yet. CBLDocuments are cached, so there will * never be more than one instance (in this sqliteDb) at a time with * the same documentID. * *...
Instantiates a Document object with the given ID. Doesn't touch the on-disk sqliteDb; a document with that ID doesn't even need to exist yet. CBLDocuments are cached, so there will never be more than one instance (in this sqliteDb) at a time with the same documentID
getDocument
{ "repo_name": "netsense-sas/couchbase-lite-java-core", "path": "src/main/java/com/couchbase/lite/Database.java", "license": "apache-2.0", "size": 203426 }
[ "com.couchbase.lite.internal.InterfaceAudience" ]
import com.couchbase.lite.internal.InterfaceAudience;
import com.couchbase.lite.internal.*;
[ "com.couchbase.lite" ]
com.couchbase.lite;
507,494
@Nonnull public OrgContactCollectionRequest skipToken(@Nonnull final String skipToken) { addSkipTokenOption(skipToken); return this; }
OrgContactCollectionRequest function(@Nonnull final String skipToken) { addSkipTokenOption(skipToken); return this; }
/** * Add Skip token for pagination * @param skipToken - Token for pagination * @return the updated request */
Add Skip token for pagination
skipToken
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/OrgContactCollectionRequest.java", "license": "mit", "size": 5733 }
[ "com.microsoft.graph.requests.OrgContactCollectionRequest", "javax.annotation.Nonnull" ]
import com.microsoft.graph.requests.OrgContactCollectionRequest; import javax.annotation.Nonnull;
import com.microsoft.graph.requests.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
1,798,356
public ClusterUpdateSettingsRequestBuilder setPersistentSettings(Settings settings) { request.persistentSettings(settings); return this; }
ClusterUpdateSettingsRequestBuilder function(Settings settings) { request.persistentSettings(settings); return this; }
/** * Sets the persistent settings to be updated. They will get applied cross restarts */
Sets the persistent settings to be updated. They will get applied cross restarts
setPersistentSettings
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java", "license": "apache-2.0", "size": 3421 }
[ "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,279,478
protected DefaultListableBeanFactory buildInternalBeanFactory(ConfigurableBeanFactory containingFactory) { // Set parent so that references (up container hierarchies) are correctly resolved. DefaultListableBeanFactory internalBeanFactory = new DefaultListableBeanFactory(containingFactory); // Required so that...
DefaultListableBeanFactory function(ConfigurableBeanFactory containingFactory) { DefaultListableBeanFactory internalBeanFactory = new DefaultListableBeanFactory(containingFactory); internalBeanFactory.copyConfigurationFrom(containingFactory); for (Iterator<BeanPostProcessor> it = internalBeanFactory.getBeanPostProcesso...
/** * Build an internal BeanFactory for resolving target beans. * @param containingFactory the containing BeanFactory that originally defines the beans * @return an independent internal BeanFactory to hold copies of some target beans */
Build an internal BeanFactory for resolving target beans
buildInternalBeanFactory
{ "repo_name": "shivpun/spring-framework", "path": "spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java", "license": "apache-2.0", "size": 8070 }
[ "java.util.Iterator", "org.springframework.aop.framework.AopInfrastructureBean", "org.springframework.beans.factory.config.BeanPostProcessor", "org.springframework.beans.factory.config.ConfigurableBeanFactory", "org.springframework.beans.factory.support.DefaultListableBeanFactory" ]
import java.util.Iterator; import org.springframework.aop.framework.AopInfrastructureBean; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import java.util.*; import org.springframework.aop.framework.*; import org.springframework.beans.factory.config.*; import org.springframework.beans.factory.support.*;
[ "java.util", "org.springframework.aop", "org.springframework.beans" ]
java.util; org.springframework.aop; org.springframework.beans;
863,042
@Nullable public String getWorkJson(String networkName, String snapshotName, String workId) throws IOException { Optional<NetworkId> networkIdOpt = _idManager.getNetworkId(networkName); if (!networkIdOpt.isPresent()) { return null; } NetworkId networkId = networkIdOpt.get(); Optional...
String function(String networkName, String snapshotName, String workId) throws IOException { Optional<NetworkId> networkIdOpt = _idManager.getNetworkId(networkName); if (!networkIdOpt.isPresent()) { return null; } NetworkId networkId = networkIdOpt.get(); Optional<SnapshotId> snapshotIdOpt = _idManager.getSnapshotId(sn...
/** * Load and return the answer JSON file for a given work item ID in a given snapshot. * * @throws IOException if the JSON could not be read successfully. * @return Content of the JSON file as a string; {@code null} if the network, snapshot or log file * is not available */
Load and return the answer JSON file for a given work item ID in a given snapshot
getWorkJson
{ "repo_name": "dhalperi/batfish", "path": "projects/coordinator/src/main/java/org/batfish/coordinator/WorkMgr.java", "license": "apache-2.0", "size": 108269 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.util.Optional", "org.batfish.identifiers.NetworkId", "org.batfish.identifiers.SnapshotId" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.util.Optional; import org.batfish.identifiers.NetworkId; import org.batfish.identifiers.SnapshotId;
import java.io.*; import java.util.*; import org.batfish.identifiers.*;
[ "java.io", "java.util", "org.batfish.identifiers" ]
java.io; java.util; org.batfish.identifiers;
2,576,047
Future<VoltCacheProcBase.Result> asyncIncrDecr(String key, long by, boolean increment);
Future<VoltCacheProcBase.Result> asyncIncrDecr(String key, long by, boolean increment);
/** * Asynchronously Increments or Decrements an Int64 value to a given cache item representing an Int64 value. * @param key Key of the cache item to increment/decrement. * @param by Long amount by which to increment/decrement. * @param increment Flag indicating true for increment, false for decreme...
Asynchronously Increments or Decrements an Int64 value to a given cache item representing an Int64 value
asyncIncrDecr
{ "repo_name": "zheguang/voltdb", "path": "examples/voltcache/src/voltcache/api/IVoltCache.java", "license": "agpl-3.0", "size": 12838 }
[ "java.util.concurrent.Future" ]
import java.util.concurrent.Future;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,579,500
public void nextRound() { if (PhraseCrazeApplication.DEBUG) { Log.d(TAG, "NextRound()"); } // The same team who was buzzed will start the next round mCurrentCards.clear(); mCardPosition = -1; setTurnTime(); dealNextCard(); // Clear round scores Iterator<Team> itr =...
void function() { if (PhraseCrazeApplication.DEBUG) { Log.d(TAG, STR); } mCurrentCards.clear(); mCardPosition = -1; setTurnTime(); dealNextCard(); Iterator<Team> itr = mTeams.iterator(); for (itr = mTeams.iterator(); itr.hasNext();) { itr.next().setRoundScore(0); } mBuzzedTeam = null; mCurrentRound++; }
/** * Starts a new round. A round is defined as a sequence of turns for a random time limit. */
Starts a new round. A round is defined as a sequence of turns for a random time limit
nextRound
{ "repo_name": "siramix/phrasecraze", "path": "src/com/siramix/phrasecraze/GameManager.java", "license": "gpl-3.0", "size": 17994 }
[ "android.util.Log", "java.util.Iterator" ]
import android.util.Log; import java.util.Iterator;
import android.util.*; import java.util.*;
[ "android.util", "java.util" ]
android.util; java.util;
150,249
public static PoxPayloadOut createCitationAuthorityInstance( String displayName, String shortIdentifier, String headerLabel ) { CitationauthoritiesCommon citationAuthority = new CitationauthoritiesCommon(); citationAuthority.setDisplayName(displayName); citationAuthority.setShortIdenti...
static PoxPayloadOut function( String displayName, String shortIdentifier, String headerLabel ) { CitationauthoritiesCommon citationAuthority = new CitationauthoritiesCommon(); citationAuthority.setDisplayName(displayName); citationAuthority.setShortIdentifier(shortIdentifier); citationAuthority.setVocabType(CITATION_V...
/** * Creates a new Citation Authority * @param displayName The displayName used in UI, etc. * @param refName The proper refName for this authority * @param headerLabel The common part label * @return The PoxPayloadOut payload for the create call */
Creates a new Citation Authority
createCitationAuthorityInstance
{ "repo_name": "cherryhill/collectionspace-services", "path": "services/citation/client/src/main/java/org/collectionspace/services/client/CitationAuthorityClientUtils.java", "license": "apache-2.0", "size": 6686 }
[ "javax.ws.rs.core.MediaType", "org.collectionspace.services.citation.CitationauthoritiesCommon" ]
import javax.ws.rs.core.MediaType; import org.collectionspace.services.citation.CitationauthoritiesCommon;
import javax.ws.rs.core.*; import org.collectionspace.services.citation.*;
[ "javax.ws", "org.collectionspace.services" ]
javax.ws; org.collectionspace.services;
1,281,060
public boolean isBroken() { final ReentrantLock lock = this.lock; lock.lock(); try { return generation.broken; } finally { lock.unlock(); } }
boolean function() { final ReentrantLock lock = this.lock; lock.lock(); try { return generation.broken; } finally { lock.unlock(); } }
/** * Queries if this barrier is in a broken state. * * @return {@code true} if one or more parties broke out of this * barrier due to interruption or timeout since * construction or the last reset, or a barrier action * failed due to an exception; {@code false} oth...
Queries if this barrier is in a broken state
isBroken
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CyclicBarrier.java", "license": "apache-2.0", "size": 19339 }
[ "java.util.concurrent.locks.ReentrantLock" ]
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.*;
[ "java.util" ]
java.util;
712,441
File file = new File("./BBcfg"); if (file.exists() && !file.isDirectory()) { BufferedReader reader; try { reader = new BufferedReader(new InputStreamReader(new FileInputStream(file))); String line = new String(); while ((line = reader.readLine()) != null) { if (!line.startsWith("#") &&...
File file = new File(STR); if (file.exists() && !file.isDirectory()) { BufferedReader reader; try { reader = new BufferedReader(new InputStreamReader(new FileInputStream(file))); String line = new String(); while ((line = reader.readLine()) != null) { if (!line.startsWith("#") && !line.isEmpty()) { if ((line.split("\\s...
/** * Reads the configuration file BBcfg and sets the parameters for the * connection. */
Reads the configuration file BBcfg and sets the parameters for the connection
setVars
{ "repo_name": "aledani/BBAlarm", "path": "EncBBAlarm/src/packageBB/BBserver.java", "license": "gpl-3.0", "size": 3886 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStreamReader" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader;
import java.io.*;
[ "java.io" ]
java.io;
921,622
public void setDocumentLocator(XMLLocator locator) { fLocator = locator; } // setDocumentLocator(XMLLocator)
void function(XMLLocator locator) { fLocator = locator; }
/** * Sets the document locator. * * @param locator The locator. */
Sets the document locator
setDocumentLocator
{ "repo_name": "AaronZhangL/SplitCharater", "path": "xerces-2_11_0/src/org/apache/xerces/impl/XMLErrorReporter.java", "license": "gpl-2.0", "size": 22355 }
[ "org.apache.xerces.xni.XMLLocator" ]
import org.apache.xerces.xni.XMLLocator;
import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
2,012,150
public static boolean setMethod(PluginManager manager) { if (hasMethod()) { return true; } if (self) { self = false; return false; } int count = 0; boolean match = false; Plugin plugin = null; for (String name : getDependencies()) { if (hasMethod()) { break; } plug...
static boolean function(PluginManager manager) { if (hasMethod()) { return true; } if (self) { self = false; return false; } int count = 0; boolean match = false; Plugin plugin = null; for (String name : getDependencies()) { if (hasMethod()) { break; } plugin = manager.getPlugin(name); if (plugin == null !plugin.isEnab...
/** * Checks Plugin Class against a multitude of checks to verify it's usability as a payment method. * * @param <code>PluginManager</code> the plugin manager for the server * @return <code>boolean</code> True on success, False on failure. */
Checks Plugin Class against a multitude of checks to verify it's usability as a payment method
setMethod
{ "repo_name": "TotalFreedom/TF-Essentials", "path": "Essentials/src/com/earth2me/essentials/register/payment/Methods.java", "license": "gpl-3.0", "size": 5814 }
[ "org.bukkit.plugin.Plugin", "org.bukkit.plugin.PluginManager" ]
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.*;
[ "org.bukkit.plugin" ]
org.bukkit.plugin;
322,182
@Override public synchronized String toString() { if (sslConfigMap.size() > 0) { StringBuilder sb = new StringBuilder(128); sb.append("SSLConfigManager configuration: \n"); for (Entry<String, SSLConfig> current : sslConfigMap.entrySet()) { sb.append(cu...
synchronized String function() { if (sslConfigMap.size() > 0) { StringBuilder sb = new StringBuilder(128); sb.append(STR); for (Entry<String, SSLConfig> current : sslConfigMap.entrySet()) { sb.append(current.getKey()); sb.append("==="); sb.append(current.getValue().toString()); } return sb.toString(); } return STR; }
/*** * This method prints all of the SSLConfigs held by the SSLConfigManager. The * SSLConfig toString() method does not print passwords. ***/
This method prints all of the SSLConfigs held by the SSLConfigManager. The SSLConfig toString() method does not print passwords
toString
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/SSLConfigManager.java", "license": "epl-1.0", "size": 62575 }
[ "com.ibm.websphere.ssl.SSLConfig", "java.util.Map" ]
import com.ibm.websphere.ssl.SSLConfig; import java.util.Map;
import com.ibm.websphere.ssl.*; import java.util.*;
[ "com.ibm.websphere", "java.util" ]
com.ibm.websphere; java.util;
1,100,413
public Set<Segment> getAllValuesOfS2(final Segment pS1) { return rawStreamAllValuesOfS2(new Object[]{pS1, null}).collect(Collectors.toSet()); }
Set<Segment> function(final Segment pS1) { return rawStreamAllValuesOfS2(new Object[]{pS1, null}).collect(Collectors.toSet()); }
/** * Retrieve the set of values that occur in matches for S2. * @return the Set of all values or empty set if there are no matches * */
Retrieve the set of values that occur in matches for S2
getAllValuesOfS2
{ "repo_name": "viatra/VIATRA-Generator", "path": "Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Output.java", "license": "epl-1.0", "size": 28212 }
[ "java.util.Set", "java.util.stream.Collectors" ]
import java.util.Set; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
633,101
public void add(final Subscription s) { Subscription unsubscribe = null; synchronized (this) { if (unsubscribed) { unsubscribe = s; } else { if (subscriptions == null) { subscriptions = new LinkedList<Subscription>(); ...
void function(final Subscription s) { Subscription unsubscribe = null; synchronized (this) { if (unsubscribed) { unsubscribe = s; } else { if (subscriptions == null) { subscriptions = new LinkedList<Subscription>(); } subscriptions.add(s); } } if (unsubscribe != null) { unsubscribe.unsubscribe(); } }
/** * Adds a new {@link Subscription} to this {@code SubscriptionList} if the {@code SubscriptionList} is * not yet unsubscribed. If the {@code SubscriptionList} <em>is</em> unsubscribed, {@code add} will * indicate this by explicitly unsubscribing the new {@code Subscription} as well. * * @par...
Adds a new <code>Subscription</code> to this SubscriptionList if the SubscriptionList is not yet unsubscribed. If the SubscriptionList is unsubscribed, add will indicate this by explicitly unsubscribing the new Subscription as well
add
{ "repo_name": "loganj/RxJava", "path": "src/main/java/rx/internal/util/SubscriptionList.java", "license": "apache-2.0", "size": 4030 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
381,072
public static SynthDef[] readDefFile(URL path) throws IOException { final InputStream is = path.openStream(); try { return SynthDef.readDefFile(is); } finally { is.close(); } }
static SynthDef[] function(URL path) throws IOException { final InputStream is = path.openStream(); try { return SynthDef.readDefFile(is); } finally { is.close(); } }
/** * Reads definitions from a synth def file. * * @param path * the location of the synth def file such as a local harddisk or * remote server file * @return an array of all definitions found in the file * * @throws IOException * if a read error occurs, if the file h...
Reads definitions from a synth def file
readDefFile
{ "repo_name": "sudosci/JavaCollider", "path": "src/main/java/de/sciss/jcollider/SynthDef.java", "license": "lgpl-2.1", "size": 34910 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,025,123
public static void createQueue(AMQQueue queue) throws AMQException { if (log.isDebugEnabled()) { log.debug("AMQP BRIDGE: create queue: " + queue.getName()); } try { List<StorageQueue> queues = AndesContext.getInstance().getStorageQueueRegistry().getAllStorageQueues();...
static void function(AMQQueue queue) throws AMQException { if (log.isDebugEnabled()) { log.debug(STR + queue.getName()); } try { List<StorageQueue> queues = AndesContext.getInstance().getStorageQueueRegistry().getAllStorageQueues(); for (StorageQueue storageQueue : queues) { if (storageQueue.getName().equalsIgnoreCase(...
/** * Create queue in andes kernel * * @param queue qpid queue * @throws AMQException */
Create queue in andes kernel
createQueue
{ "repo_name": "pumudu88/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/amqp/QpidAndesBridge.java", "license": "apache-2.0", "size": 29520 }
[ "java.util.List", "org.wso2.andes.AMQException", "org.wso2.andes.kernel.Andes", "org.wso2.andes.kernel.AndesContext", "org.wso2.andes.kernel.AndesException", "org.wso2.andes.kernel.subscription.StorageQueue", "org.wso2.andes.protocol.AMQConstant", "org.wso2.andes.server.queue.AMQQueue" ]
import java.util.List; import org.wso2.andes.AMQException; import org.wso2.andes.kernel.Andes; import org.wso2.andes.kernel.AndesContext; import org.wso2.andes.kernel.AndesException; import org.wso2.andes.kernel.subscription.StorageQueue; import org.wso2.andes.protocol.AMQConstant; import org.wso2.andes.server.queue.AM...
import java.util.*; import org.wso2.andes.*; import org.wso2.andes.kernel.*; import org.wso2.andes.kernel.subscription.*; import org.wso2.andes.protocol.*; import org.wso2.andes.server.queue.*;
[ "java.util", "org.wso2.andes" ]
java.util; org.wso2.andes;
1,890,731
protected int getStartingColumn(Sheet sheet, Range selection){ return sheet.equals(selection.getSheet()) ? selection.getColumn()+1 : 0; }
int function(Sheet sheet, Range selection){ return sheet.equals(selection.getSheet()) ? selection.getColumn()+1 : 0; }
/** * Start from the next cell by rows in the same sheet * @param sheet * @param selection * @return */
Start from the next cell by rows in the same sheet
getStartingColumn
{ "repo_name": "zkoss/zssessentials", "path": "src/main/java/org/zkoss/zss/essential/advanced/customization/FindDialogComposer.java", "license": "apache-2.0", "size": 4545 }
[ "org.zkoss.zss.api.Range", "org.zkoss.zss.api.model.Sheet" ]
import org.zkoss.zss.api.Range; import org.zkoss.zss.api.model.Sheet;
import org.zkoss.zss.api.*; import org.zkoss.zss.api.model.*;
[ "org.zkoss.zss" ]
org.zkoss.zss;
225,818
protected IFigure setupContentPane(IFigure nodeShape) { return nodeShape; // use nodeShape itself as contentPane }
IFigure function(IFigure nodeShape) { return nodeShape; }
/** * Default implementation treats passed figure as content pane. * Respects layout one may have set for generated figure. * * @param nodeShape instance of generated figure class * @generated */
Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure
setupContentPane
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/parts/ValidateMediatorInputConnectorEditPart.java", "license": "apache-2.0", "size": 11641 }
[ "org.eclipse.draw2d.IFigure" ]
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
531,345
protected void metaPublishFail(Throwable e, Message[] messages) { Log.warn(this.toString()+": "+e); Log.debug(e); } /** Called to extend outbound string messages. * Some messages are sent as preformatted JSON strings (eg handshake * and connect messages). This exten...
void function(Throwable e, Message[] messages) { Log.warn(this.toString()+STR+e); Log.debug(e); } /** Called to extend outbound string messages. * Some messages are sent as preformatted JSON strings (eg handshake * and connect messages). This extendOut method is a variation of the * {@link #extendOut(Message)} method t...
/** * Called with the results of a failed publish */
Called with the results of a failed publish
metaPublishFail
{ "repo_name": "napcs/qedserver", "path": "jetty/contrib/cometd/client/src/main/java/org/mortbay/cometd/client/BayeuxClient.java", "license": "mit", "size": 53611 }
[ "org.cometd.Extension", "org.cometd.Message", "org.mortbay.log.Log" ]
import org.cometd.Extension; import org.cometd.Message; import org.mortbay.log.Log;
import org.cometd.*; import org.mortbay.log.*;
[ "org.cometd", "org.mortbay.log" ]
org.cometd; org.mortbay.log;
961,968
@Override public Adapter createSubscriptionAdapter() { if (subscriptionItemProvider == null) { subscriptionItemProvider = new SubscriptionItemProvider(this); } return subscriptionItemProvider; } protected TargetTopicItemProvider targetTopicItemProvider;
Adapter function() { if (subscriptionItemProvider == null) { subscriptionItemProvider = new SubscriptionItemProvider(this); } return subscriptionItemProvider; } protected TargetTopicItemProvider targetTopicItemProvider;
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.ds.Subscription}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.ds.Subscription</code>.
createSubscriptionAdapter
{ "repo_name": "harsha1979/developer-studio", "path": "data-services/org.wso2.developerstudio.eclipse.ds.edit/src/org/wso2/developerstudio/eclipse/ds/provider/DsItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 32352 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
894,368
void writeTo(PDPageContentStream contents, float zeroFontSize) throws IOException { float fontSize = getFontSize(); if (fontSize == 0) { fontSize = zeroFontSize; } contents.setFont(getFont(), fontSize); // todo: set more state... }
void writeTo(PDPageContentStream contents, float zeroFontSize) throws IOException { float fontSize = getFontSize(); if (fontSize == 0) { fontSize = zeroFontSize; } contents.setFont(getFont(), fontSize); }
/** * Writes the DA string to the given content stream. */
Writes the DA string to the given content stream
writeTo
{ "repo_name": "ChunghwaTelecom/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAppearanceString.java", "license": "apache-2.0", "size": 5957 }
[ "java.io.IOException", "org.apache.pdfbox.pdmodel.PDPageContentStream" ]
import java.io.IOException; import org.apache.pdfbox.pdmodel.PDPageContentStream;
import java.io.*; import org.apache.pdfbox.pdmodel.*;
[ "java.io", "org.apache.pdfbox" ]
java.io; org.apache.pdfbox;
2,317,271
public static ChangeObjectModifier fromQNameURI( URI qname ) { return EnumUtil.fromURIValue( qname.toString(), ChangeObjectModifier.class ); }
static ChangeObjectModifier function( URI qname ) { return EnumUtil.fromURIValue( qname.toString(), ChangeObjectModifier.class ); }
/** * Get the enumeration from the QName. * * @param qname The qname. * @return The enumeration. */
Get the enumeration from the QName
fromQNameURI
{ "repo_name": "FamilySearch/fs-platform-android", "path": "fs-android/src/main/java/org/familysearch/platform/ct/ChangeObjectModifier.java", "license": "apache-2.0", "size": 1076 }
[ "org.gedcomx.rt.EnumUtil" ]
import org.gedcomx.rt.EnumUtil;
import org.gedcomx.rt.*;
[ "org.gedcomx.rt" ]
org.gedcomx.rt;
1,176,739
Node parseInputs() { boolean devMode = options.devMode != DevMode.OFF; // If old roots exist (we are parsing a second time), detach each of the // individual file parse trees. if (externsRoot != null) { externsRoot.detachChildren(); } if (jsRoot != null) { jsRoot.detachChildren();...
Node parseInputs() { boolean devMode = options.devMode != DevMode.OFF; if (externsRoot != null) { externsRoot.detachChildren(); } if (jsRoot != null) { jsRoot.detachChildren(); } jsRoot = IR.block(); jsRoot.setIsSyntheticBlock(true); externsRoot = IR.block(); externsRoot.setIsSyntheticBlock(true); externAndJsRoot = IR....
/** * Parses the externs and main inputs. * * @return A synthetic root node whose two children are the externs root * and the main root */
Parses the externs and main inputs
parseInputs
{ "repo_name": "nicupavel/google-closure-compiler", "path": "src/com/google/javascript/jscomp/Compiler.java", "license": "apache-2.0", "size": 78825 }
[ "com.google.javascript.jscomp.CompilerOptions", "com.google.javascript.jscomp.deps.SortedDependencies", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node" ]
import com.google.javascript.jscomp.CompilerOptions; import com.google.javascript.jscomp.deps.SortedDependencies; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node;
import com.google.javascript.jscomp.*; import com.google.javascript.jscomp.deps.*; import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,850,142
public Configurable withRetryPolicy(RetryPolicy retryPolicy) { this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); return this; }
Configurable function(RetryPolicy retryPolicy) { this.retryPolicy = Objects.requireNonNull(retryPolicy, STR); return this; }
/** * Sets the retry policy to the HTTP pipeline. * * @param retryPolicy the HTTP pipeline retry policy. * @return the configurable object itself. */
Sets the retry policy to the HTTP pipeline
withRetryPolicy
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java", "license": "mit", "size": 13250 }
[ "com.azure.core.http.policy.RetryPolicy", "java.util.Objects" ]
import com.azure.core.http.policy.RetryPolicy; import java.util.Objects;
import com.azure.core.http.policy.*; import java.util.*;
[ "com.azure.core", "java.util" ]
com.azure.core; java.util;
359,289
public void setOutlineStroke(Stroke stroke) { ParamChecks.nullNotPermitted(stroke, "stroke"); this.outlineStroke = stroke; notifyListeners(new DialLayerChangeEvent(this)); }
void function(Stroke stroke) { ParamChecks.nullNotPermitted(stroke, STR); this.outlineStroke = stroke; notifyListeners(new DialLayerChangeEvent(this)); }
/** * Sets the stroke used to draw the outline of the cap and sends a * {@link DialLayerChangeEvent} to all registered listeners. * * @param stroke the stroke ({@code null} not permitted). * * @see #getOutlineStroke() */
Sets the stroke used to draw the outline of the cap and sends a <code>DialLayerChangeEvent</code> to all registered listeners
setOutlineStroke
{ "repo_name": "simon04/jfreechart", "path": "src/main/java/org/jfree/chart/plot/dial/DialCap.java", "license": "lgpl-2.1", "size": 10265 }
[ "java.awt.Stroke", "org.jfree.chart.util.ParamChecks" ]
import java.awt.Stroke; import org.jfree.chart.util.ParamChecks;
import java.awt.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,049,622