method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public CssPropertyListAssertion isEquivalentTo(CssProperty... properties) { return isEquivalentTo(Lists.newArrayList(properties)); }
CssPropertyListAssertion function(CssProperty... properties) { return isEquivalentTo(Lists.newArrayList(properties)); }
/** * Asserts that the current message list is equivalent to the provided expected * message list. */
Asserts that the current message list is equivalent to the provided expected message list
isEquivalentTo
{ "repo_name": "carrotsearch/smartsprites", "path": "src/test/java/org/carrot2/labs/test/CssPropertyListAssertion.java", "license": "bsd-3-clause", "size": 1566 }
[ "com.google.common.collect.Lists", "org.carrot2.labs.smartsprites.css.CssProperty" ]
import com.google.common.collect.Lists; import org.carrot2.labs.smartsprites.css.CssProperty;
import com.google.common.collect.*; import org.carrot2.labs.smartsprites.css.*;
[ "com.google.common", "org.carrot2.labs" ]
com.google.common; org.carrot2.labs;
1,182,372
private static void assertLocalTimeParameterIsNotNull(LocalTime other) { if (other == null) throw new IllegalArgumentException("The LocalTime to compare actual with should not be null"); }
static void function(LocalTime other) { if (other == null) throw new IllegalArgumentException(STR); }
/** * Check that the {@link LocalTime} to compare actual {@link LocalTime} to is not null, in that case throws a * {@link IllegalArgumentException} with an explicit message * * @param other the {@link LocalTime} to check * @throws IllegalArgumentException with an explicit message if the given {@link Loc...
Check that the <code>LocalTime</code> to compare actual <code>LocalTime</code> to is not null, in that case throws a <code>IllegalArgumentException</code> with an explicit message
assertLocalTimeParameterIsNotNull
{ "repo_name": "dorzey/assertj-core", "path": "src/main/java/org/assertj/core/api/AbstractLocalTimeAssert.java", "license": "apache-2.0", "size": 23203 }
[ "java.time.LocalTime" ]
import java.time.LocalTime;
import java.time.*;
[ "java.time" ]
java.time;
2,664,629
@Test public void testAsyncCheckpointingConcurrentCloseBeforeAcknowledge() throws Exception { final TestingKeyedStateHandle managedKeyedStateHandle = new TestingKeyedStateHandle(); final TestingKeyedStateHandle rawKeyedStateHandle = new TestingKeyedStateHandle(); final TestingOperatorStateHandle managedOpera...
void function() throws Exception { final TestingKeyedStateHandle managedKeyedStateHandle = new TestingKeyedStateHandle(); final TestingKeyedStateHandle rawKeyedStateHandle = new TestingKeyedStateHandle(); final TestingOperatorStateHandle managedOperatorStateHandle = new TestingOperatorStateHandle(); final TestingOperat...
/** * FLINK-5667 * * <p>Tests that a concurrent cancel operation discards the state handles of a not yet * acknowledged checkpoint and prevents sending an acknowledge message to the * CheckpointCoordinator. The situation can only happen if the cancel call is executed * before Environment.acknowledgeCheckpoi...
FLINK-5667 Tests that a concurrent cancel operation discards the state handles of a not yet acknowledged checkpoint and prevents sending an acknowledge message to the CheckpointCoordinator. The situation can only happen if the cancel call is executed before Environment.acknowledgeCheckpoint()
testAsyncCheckpointingConcurrentCloseBeforeAcknowledge
{ "repo_name": "tzulitai/flink", "path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java", "license": "apache-2.0", "size": 72886 }
[ "java.util.Arrays", "java.util.concurrent.TimeUnit", "java.util.concurrent.TimeoutException", "org.apache.flink.runtime.checkpoint.CheckpointMetaData", "org.apache.flink.runtime.checkpoint.CheckpointOptions", "org.apache.flink.runtime.concurrent.FutureUtils", "org.apache.flink.runtime.state.DoneFuture",...
import java.util.Arrays; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.apache.flink.runtime.checkpoint.CheckpointMetaData; import org.apache.flink.runtime.checkpoint.CheckpointOptions; import org.apache.flink.runtime.concurrent.FutureUtils; import org.apache.flink.runtim...
import java.util.*; import java.util.concurrent.*; import org.apache.flink.runtime.checkpoint.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.state.*; import org.apache.flink.streaming.api.operators.*; import org.apache.flink.streaming.util.*; import org.junit.*;
[ "java.util", "org.apache.flink", "org.junit" ]
java.util; org.apache.flink; org.junit;
1,302,086
public final void set(final int value) { if (!isValidValue(value)) { throw new IllegalArgumentException("value not allowed"); } this.value = value; } /** * {@inheritDoc}
final void function(final int value) { if (!isValidValue(value)) { throw new IllegalArgumentException(STR); } this.value = value; } /** * {@inheritDoc}
/** * set the current value of this enumeration to the * value given. * * @throws IllegalArgumentException * if the value is not allowed * for this enumeration. * @param value to be set */
set the current value of this enumeration to the value given
set
{ "repo_name": "mksmbrtsh/LLRPexplorer", "path": "src/org/llrp/ltk/generated/enumerations/GPIPortState.java", "license": "apache-2.0", "size": 6985 }
[ "java.lang.IllegalArgumentException" ]
import java.lang.IllegalArgumentException;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,006,420
public boolean hasNext() { if (currentIterator == -1) { currentIterator = 0; } for (int i = currentIterator; i < allIterators.size(); i++) { Iterator iterator = allIterators.get(i); if (iterator.hasNext()) { currentIterator = i; ...
boolean function() { if (currentIterator == -1) { currentIterator = 0; } for (int i = currentIterator; i < allIterators.size(); i++) { Iterator iterator = allIterators.get(i); if (iterator.hasNext()) { currentIterator = i; return true; } } return false; } /** * {@inheritDoc}
/** * Returns <code>true</code> if next element is available. */
Returns <code>true</code> if next element is available
hasNext
{ "repo_name": "fivesmallq/web-data-extractor", "path": "src/main/java/jodd/util/collection/CompositeIterator.java", "license": "apache-2.0", "size": 3449 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
680,715
static CronExpression cronExpression(CrontabEntry entry, TimeZone timeZone) { String dayOfMonth; if (entry.hasWildcardDayOfMonth()) { dayOfMonth = "?"; // special quartz token meaning "don't care" } else { dayOfMonth = entry.getDayOfMonthAsString(); } String dayOfWeek; if (entry.ha...
static CronExpression cronExpression(CrontabEntry entry, TimeZone timeZone) { String dayOfMonth; if (entry.hasWildcardDayOfMonth()) { dayOfMonth = "?"; } else { dayOfMonth = entry.getDayOfMonthAsString(); } String dayOfWeek; if (entry.hasWildcardDayOfWeek() && !entry.hasWildcardDayOfMonth()) { dayOfWeek = "?"; } else {...
/** * Convert an Aurora CrontabEntry to a Quartz CronExpression. */
Convert an Aurora CrontabEntry to a Quartz CronExpression
cronExpression
{ "repo_name": "rosmo/aurora", "path": "src/main/java/org/apache/aurora/scheduler/cron/quartz/Quartz.java", "license": "apache-2.0", "size": 3859 }
[ "com.google.common.base.Joiner", "com.google.common.base.Throwables", "com.google.common.collect.ContiguousSet", "com.google.common.collect.DiscreteDomain", "com.google.common.collect.Lists", "com.google.common.collect.Range", "java.text.ParseException", "java.util.List", "java.util.TimeZone", "or...
import com.google.common.base.Joiner; import com.google.common.base.Throwables; import com.google.common.collect.ContiguousSet; import com.google.common.collect.DiscreteDomain; import com.google.common.collect.Lists; import com.google.common.collect.Range; import java.text.ParseException; import java.util.List; import ...
import com.google.common.base.*; import com.google.common.collect.*; import java.text.*; import java.util.*; import org.apache.aurora.scheduler.cron.*; import org.quartz.*;
[ "com.google.common", "java.text", "java.util", "org.apache.aurora", "org.quartz" ]
com.google.common; java.text; java.util; org.apache.aurora; org.quartz;
2,562,992
public static XMLOutputFactory getOutputFactory(Object... properties) { return StaxCachedOutputFactory.getFactory(properties); }
static XMLOutputFactory function(Object... properties) { return StaxCachedOutputFactory.getFactory(properties); }
/** * Get an output factory according to properties * @param properties properties * @return XMLInputFactory */
Get an output factory according to properties
getOutputFactory
{ "repo_name": "nithril/stax-css-matcher", "path": "src/main/java/org/nlab/xml/stream/factory/StaxCachedFactory.java", "license": "apache-2.0", "size": 828 }
[ "javax.xml.stream.XMLOutputFactory" ]
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.*;
[ "javax.xml" ]
javax.xml;
1,028,101
public DrawerBuilder withSliderBackgroundDrawableRes(@DrawableRes int sliderBackgroundDrawableRes) { this.mSliderBackgroundDrawableRes = sliderBackgroundDrawableRes; return this; } //the width of the drawer protected int mDrawerWidth = -1;
DrawerBuilder function(@DrawableRes int sliderBackgroundDrawableRes) { this.mSliderBackgroundDrawableRes = sliderBackgroundDrawableRes; return this; } protected int mDrawerWidth = -1;
/** * Set the background drawable for the Slider from a Resource. * This is the view containing the list. * * @param sliderBackgroundDrawableRes * @return */
Set the background drawable for the Slider from a Resource. This is the view containing the list
withSliderBackgroundDrawableRes
{ "repo_name": "amithub/Material-Drawer-Sample", "path": "library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java", "license": "apache-2.0", "size": 62341 }
[ "android.support.annotation.DrawableRes" ]
import android.support.annotation.DrawableRes;
import android.support.annotation.*;
[ "android.support" ]
android.support;
1,908,567
public void validateSearchParameters(Map fieldValues);
void function(Map fieldValues);
/** * Validates the values filled in as search criteria, also checks for required field values. * * @param fieldValues - Map of property/value pairs */
Validates the values filled in as search criteria, also checks for required field values
validateSearchParameters
{ "repo_name": "sbower/kuali-rice-1", "path": "kns/src/main/java/org/kuali/rice/kns/lookup/Lookupable.java", "license": "apache-2.0", "size": 7906 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,192,009
Processor create(Map<String, Processor.Factory> processorFactories, String tag, Map<String, Object> config) throws Exception; } class Parameters { public final Environment env; public final ScriptService scriptService; ...
Processor create(Map<String, Processor.Factory> processorFactories, String tag, Map<String, Object> config) throws Exception; } class Parameters { public final Environment env; public final ScriptService scriptService; public final AnalysisRegistry analysisRegistry; public final ThreadContext threadContext; public fina...
/** * Creates a processor based on the specified map of maps config. * * @param processorFactories Other processors which may be created inside this processor * @param tag The tag for the processor * @param config The configuration for the processor * * <b>...
Creates a processor based on the specified map of maps config
create
{ "repo_name": "coding0011/elasticsearch", "path": "server/src/main/java/org/elasticsearch/ingest/Processor.java", "license": "apache-2.0", "size": 5400 }
[ "java.util.Map", "java.util.function.BiFunction", "java.util.function.LongSupplier", "org.elasticsearch.client.Client", "org.elasticsearch.common.util.concurrent.ThreadContext", "org.elasticsearch.env.Environment", "org.elasticsearch.index.analysis.AnalysisRegistry", "org.elasticsearch.script.ScriptSe...
import java.util.Map; import java.util.function.BiFunction; import java.util.function.LongSupplier; import org.elasticsearch.client.Client; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.env.Environment; import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasti...
import java.util.*; import java.util.function.*; import org.elasticsearch.client.*; import org.elasticsearch.common.util.concurrent.*; import org.elasticsearch.env.*; import org.elasticsearch.index.analysis.*; import org.elasticsearch.script.*; import org.elasticsearch.threadpool.*;
[ "java.util", "org.elasticsearch.client", "org.elasticsearch.common", "org.elasticsearch.env", "org.elasticsearch.index", "org.elasticsearch.script", "org.elasticsearch.threadpool" ]
java.util; org.elasticsearch.client; org.elasticsearch.common; org.elasticsearch.env; org.elasticsearch.index; org.elasticsearch.script; org.elasticsearch.threadpool;
768,994
@SuppressWarnings("unchecked") public static List<RdsSnapshot> selectSnapshot(final Session sess, final long userID, final String snapshotID, final String instID, final String marker, final int maxRecords) throws BaseException { String markerSql = ""; String instanceSql ...
@SuppressWarnings(STR) static List<RdsSnapshot> function(final Session sess, final long userID, final String snapshotID, final String instID, final String marker, final int maxRecords) throws BaseException { String markerSql = STRSTRSTR and dbsnapshotId > 'STR'STRSTR and dbsnapshotId = 'STR'STRSTR and dbinstanceId = 'S...
/************************************************************************** * SelectSnapshot - returns a list of Snapshot records If * DBSnapshotIdentifier is specified select that DBSnapshots record If * DBInstanceIdentifier specified select all DBSnapshots records for that * DBInstance if neither ...
SelectSnapshot - returns a list of Snapshot records If DBSnapshotIdentifier is specified select that DBSnapshots record If DBInstanceIdentifier specified select all DBSnapshots records for that DBInstance if neither are specified then select all DBSnapshot records for that user
selectSnapshot
{ "repo_name": "TranscendComputing/TopStackCore", "path": "src/com/msi/tough/utils/RDSUtil.java", "license": "apache-2.0", "size": 9775 }
[ "com.msi.tough.core.BaseException", "com.msi.tough.model.rds.RdsSnapshot", "java.util.List", "org.hibernate.Query", "org.hibernate.Session" ]
import com.msi.tough.core.BaseException; import com.msi.tough.model.rds.RdsSnapshot; import java.util.List; import org.hibernate.Query; import org.hibernate.Session;
import com.msi.tough.core.*; import com.msi.tough.model.rds.*; import java.util.*; import org.hibernate.*;
[ "com.msi.tough", "java.util", "org.hibernate" ]
com.msi.tough; java.util; org.hibernate;
307,392
public void close() { synchronized (this) { if (closed) { return; } closed = true; } bytesIn.freeze(); bytesOut.freeze(); messagesIn.freeze(); messagesOut.freeze(); loop.removeStream(this); if (key ...
void function() { synchronized (this) { if (closed) { return; } closed = true; } bytesIn.freeze(); bytesOut.freeze(); messagesIn.freeze(); messagesOut.freeze(); loop.removeStream(this); if (key != null) { try { key.cancel(); key.channel().close(); } catch (IOException e) { log.warn(STR, e); } } }
/** * Closes the message buffer. */
Closes the message buffer
close
{ "repo_name": "jinlongliu/onos", "path": "utils/nio/src/main/java/org/onlab/nio/MessageStream.java", "license": "apache-2.0", "size": 12219 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
978,214
private void notifyGlobalPropertyChange(GlobalProperty gp) { for (GlobalPropertyListener listener : eventListeners.getGlobalPropertyListeners()) { if (listener.supportsPropertyName(gp.getProperty())) { listener.globalPropertyChanged(gp); } } }
void function(GlobalProperty gp) { for (GlobalPropertyListener listener : eventListeners.getGlobalPropertyListeners()) { if (listener.supportsPropertyName(gp.getProperty())) { listener.globalPropertyChanged(gp); } } }
/** * Calls global property listeners registered for this create/change * * @param gp */
Calls global property listeners registered for this create/change
notifyGlobalPropertyChange
{ "repo_name": "milankarunarathne/openmrs-core", "path": "api/src/main/java/org/openmrs/api/impl/AdministrationServiceImpl.java", "license": "mpl-2.0", "size": 41300 }
[ "org.openmrs.GlobalProperty", "org.openmrs.api.GlobalPropertyListener" ]
import org.openmrs.GlobalProperty; import org.openmrs.api.GlobalPropertyListener;
import org.openmrs.*; import org.openmrs.api.*;
[ "org.openmrs", "org.openmrs.api" ]
org.openmrs; org.openmrs.api;
834,884
public void setQuerierRobustnessVariable(final byte querierRobustnessVariable) { if (logger.isLoggable(Level.FINER)) { logger.finer(this.log.entry("MLDv2QueryMessage.setQuerierRobustnessVariable", querierRobustnessVariable)); } QuerierRobustnessVariable.set(getBufferInternal(),...
void function(final byte querierRobustnessVariable) { if (logger.isLoggable(Level.FINER)) { logger.finer(this.log.entry(STR, querierRobustnessVariable)); } QuerierRobustnessVariable.set(getBufferInternal(), querierRobustnessVariable); }
/** * Sets the "Querier's Robustness Variable" field value. * See {@link #getQuerierRobustnessVariable()}. * * @param querierRobustnessVariable */
Sets the "Querier's Robustness Variable" field value. See <code>#getQuerierRobustnessVariable()</code>
setQuerierRobustnessVariable
{ "repo_name": "chenxiuheng/js4ms", "path": "js4ms-jsdk/ip/src/main/java/org/js4ms/ip/protocol/mld/MLDv2QueryMessage.java", "license": "apache-2.0", "size": 30980 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,828,449
@Test public void testGetOptions() { assertNotNull(progressBar.getOptions()); assertEquals(progressBar.getOptions().getJavaScriptOptions().toString(), ""); progressBar.setValue(5); assertEquals(progressBar.getOptions().getJavaScriptOptions().toString(), "$('#anId').progressbar('option', 'value', 5);"); ...
void function() { assertNotNull(progressBar.getOptions()); assertEquals(progressBar.getOptions().getJavaScriptOptions().toString(), STR$('#anId').progressbar('option', 'value', 5);"); }
/** * Test method for {@link org.odlabs.wiquery.ui.progressbar.ProgressBar#getOptions()}. */
Test method for <code>org.odlabs.wiquery.ui.progressbar.ProgressBar#getOptions()</code>
testGetOptions
{ "repo_name": "WiQuery/wiquery", "path": "wiquery-jquery-ui/src/test/java/org/odlabs/wiquery/ui/progressbar/ProgressBarTestCase.java", "license": "mit", "size": 7820 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,652,743
public String getBrowseUrl() { return Utils.generateURL(FacesContext.getCurrentInstance(), getNode(), URLMode.BROWSE); }
String function() { return Utils.generateURL(FacesContext.getCurrentInstance(), getNode(), URLMode.BROWSE); }
/** * Returns the URL to access the browse page for the current node * * @return The bookmark URL */
Returns the URL to access the browse page for the current node
getBrowseUrl
{ "repo_name": "fxcebx/community-edition", "path": "projects/web-client/source/java/org/alfresco/web/bean/spaces/SpaceDetailsDialog.java", "license": "lgpl-3.0", "size": 16364 }
[ "javax.faces.context.FacesContext", "org.alfresco.web.ui.common.Utils" ]
import javax.faces.context.FacesContext; import org.alfresco.web.ui.common.Utils;
import javax.faces.context.*; import org.alfresco.web.ui.common.*;
[ "javax.faces", "org.alfresco.web" ]
javax.faces; org.alfresco.web;
1,156,793
KeyManagerConfigurationDTO getKeyManagerConfigurationByName(String tenantDomain, String name) throws APIManagementException;
KeyManagerConfigurationDTO getKeyManagerConfigurationByName(String tenantDomain, String name) throws APIManagementException;
/** * This method used to retrieve key manager from name * @param tenantDomain tenant domain requested * @param name name requested * @return keyManager data * @throws APIManagementException */
This method used to retrieve key manager from name
getKeyManagerConfigurationByName
{ "repo_name": "tharikaGitHub/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIAdmin.java", "license": "apache-2.0", "size": 16386 }
[ "org.wso2.carbon.apimgt.api.dto.KeyManagerConfigurationDTO" ]
import org.wso2.carbon.apimgt.api.dto.KeyManagerConfigurationDTO;
import org.wso2.carbon.apimgt.api.dto.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
823,287
public static IndexBenefitGraph construct( Optimizer delegate, SQLStatement sql, double emptyCost, Set<Index> conf) throws SQLException { return (new IndexBenefitGraphConstructor()).constructIBG(delegate, sql, emptyCost, conf); }
static IndexBenefitGraph function( Optimizer delegate, SQLStatement sql, double emptyCost, Set<Index> conf) throws SQLException { return (new IndexBenefitGraphConstructor()).constructIBG(delegate, sql, emptyCost, conf); }
/** * Construct an IBG from the given parameters. * * @param delegate * used to make what-if optimization calls * @param sql * statement being explained * @param emptyCost * select cost of statement without any indexes * @param conf * configuration to t...
Construct an IBG from the given parameters
construct
{ "repo_name": "dbgroup-at-ucsc/dbtune", "path": "src/edu/ucsc/dbtune/ibg/IndexBenefitGraphConstructor.java", "license": "bsd-3-clause", "size": 7644 }
[ "edu.ucsc.dbtune.metadata.Index", "edu.ucsc.dbtune.optimizer.Optimizer", "edu.ucsc.dbtune.workload.SQLStatement", "java.sql.SQLException", "java.util.Set" ]
import edu.ucsc.dbtune.metadata.Index; import edu.ucsc.dbtune.optimizer.Optimizer; import edu.ucsc.dbtune.workload.SQLStatement; import java.sql.SQLException; import java.util.Set;
import edu.ucsc.dbtune.metadata.*; import edu.ucsc.dbtune.optimizer.*; import edu.ucsc.dbtune.workload.*; import java.sql.*; import java.util.*;
[ "edu.ucsc.dbtune", "java.sql", "java.util" ]
edu.ucsc.dbtune; java.sql; java.util;
2,524,173
protected ICacheFactory getCacheFactory() { return cacheFactory; }
ICacheFactory function() { return cacheFactory; }
/** * Cache factory used to cache DAO data. * * @return */
Cache factory used to cache DAO data
getCacheFactory
{ "repo_name": "DDTH/ddth-dao", "path": "ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDao.java", "license": "mit", "size": 6275 }
[ "com.github.ddth.cacheadapter.ICacheFactory" ]
import com.github.ddth.cacheadapter.ICacheFactory;
import com.github.ddth.cacheadapter.*;
[ "com.github.ddth" ]
com.github.ddth;
242,924
protected Component getFilePanel() { return filePanel; }
Component function() { return filePanel; }
/** * Gets the file panel which allows the user to save results to a file. * Subclasses don't normally need to worry about this panel, because it is * automatically added to the GUI in {@link #makeTitlePanel()}, and the * behavior is handled in this base class. * * @return the file panel a...
Gets the file panel which allows the user to save results to a file. Subclasses don't normally need to worry about this panel, because it is automatically added to the GUI in <code>#makeTitlePanel()</code>, and the behavior is handled in this base class
getFilePanel
{ "repo_name": "apache/jmeter", "path": "src/core/src/main/java/org/apache/jmeter/visualizers/gui/AbstractVisualizer.java", "license": "apache-2.0", "size": 14433 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
808,880
public Builder addInputsToXcodegen(Iterable<Artifact> inputsToXcodegen) { this.inputsToXcodegen.addAll(inputsToXcodegen); return this; }
Builder function(Iterable<Artifact> inputsToXcodegen) { this.inputsToXcodegen.addAll(inputsToXcodegen); return this; }
/** * Adds inputs that are passed to Xcodegen when generating the project file. */
Adds inputs that are passed to Xcodegen when generating the project file
addInputsToXcodegen
{ "repo_name": "juhalindfors/bazel-patches", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/XcodeProvider.java", "license": "apache-2.0", "size": 38242 }
[ "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;
2,210,572
private boolean proxyTicketRequest(boolean serviceTicketRequest, HttpServletRequest request) { if (serviceTicketRequest) { return false; } boolean result = this.authenticateAllArtifacts && obtainArtifact(request) != null && !authenticated(); this.logger.debug(LogMessage.format("proxyTicketRequest = %s", r...
boolean function(boolean serviceTicketRequest, HttpServletRequest request) { if (serviceTicketRequest) { return false; } boolean result = this.authenticateAllArtifacts && obtainArtifact(request) != null && !authenticated(); this.logger.debug(LogMessage.format(STR, result)); return result; }
/** * Indicates if the request is elgible to process a proxy ticket. * @param request * @return */
Indicates if the request is elgible to process a proxy ticket
proxyTicketRequest
{ "repo_name": "fhanik/spring-security", "path": "cas/src/main/java/org/springframework/security/cas/web/CasAuthenticationFilter.java", "license": "apache-2.0", "size": 18512 }
[ "javax.servlet.http.HttpServletRequest", "org.springframework.core.log.LogMessage" ]
import javax.servlet.http.HttpServletRequest; import org.springframework.core.log.LogMessage;
import javax.servlet.http.*; import org.springframework.core.log.*;
[ "javax.servlet", "org.springframework.core" ]
javax.servlet; org.springframework.core;
2,892,131
public static Aspect newAspectForAll(Class<? extends IComponent>... types) { if (types == null || types.length == 0) { throw new IllegalArgumentException("Number of Aspect types must be greater than 0"); } final Aspect aspect = new Aspect(); final BitSet bitSet = aspect.getAllSet(); for (Class<? extends...
static Aspect function(Class<? extends IComponent>... types) { if (types == null types.length == 0) { throw new IllegalArgumentException(STR); } final Aspect aspect = new Aspect(); final BitSet bitSet = aspect.getAllSet(); for (Class<? extends IComponent> type : types) { bitSet.set(ComponentType.getIndexFor(type)); } r...
/** * Creates a new {@link Aspect} for all of the provided component classes. * <p> * @param types The types of classes * <p> * @return A new aspect */
Creates a new <code>Aspect</code> for all of the provided component classes.
newAspectForAll
{ "repo_name": "thehutch/Fusion", "path": "API/src/main/java/me/thehutch/fusion/api/component/Aspect.java", "license": "bsd-2-clause", "size": 3174 }
[ "java.util.BitSet" ]
import java.util.BitSet;
import java.util.*;
[ "java.util" ]
java.util;
1,445,933
public T parse(String jsonString) throws IOException { JsonParser jsonParser = LoganSquare.JSON_FACTORY.createParser(jsonString); jsonParser.nextToken(); return parse(jsonParser); }
T function(String jsonString) throws IOException { JsonParser jsonParser = LoganSquare.JSON_FACTORY.createParser(jsonString); jsonParser.nextToken(); return parse(jsonParser); }
/** * Parse an object from a String. Note: parsing from an InputStream should be preferred over parsing from a String if possible. * * @param jsonString The JSON string being parsed. */
Parse an object from a String. Note: parsing from an InputStream should be preferred over parsing from a String if possible
parse
{ "repo_name": "yungfan/LoganSquare", "path": "core/src/main/java/com/bluelinelabs/logansquare/JsonMapper.java", "license": "apache-2.0", "size": 11440 }
[ "com.fasterxml.jackson.core.JsonParser", "java.io.IOException" ]
import com.fasterxml.jackson.core.JsonParser; import java.io.IOException;
import com.fasterxml.jackson.core.*; import java.io.*;
[ "com.fasterxml.jackson", "java.io" ]
com.fasterxml.jackson; java.io;
2,465,596
public void setDatePicker(int index, int year, int monthOfYear, int dayOfMonth) { setDatePicker(waiter.waitForAndGetView(index, DatePicker.class), year, monthOfYear, dayOfMonth); }
void function(int index, int year, int monthOfYear, int dayOfMonth) { setDatePicker(waiter.waitForAndGetView(index, DatePicker.class), year, monthOfYear, dayOfMonth); }
/** * Sets the date in a DatePicker with a given index. * * @param index the index of the {@link DatePicker}. {@code 0} if only one is available * @param year the year e.g. 2011 * @param monthOfYear the month which starts from zero e.g. 0 for January * @param dayOfMonth the day e.g. 10 * */
Sets the date in a DatePicker with a given index
setDatePicker
{ "repo_name": "moizjv/robotium", "path": "robotium-solo/src/main/java/com/jayway/android/robotium/solo/Solo.java", "license": "apache-2.0", "size": 59557 }
[ "android.widget.DatePicker" ]
import android.widget.DatePicker;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,458,779
protected void writeInstVars () { stream.println (" private static String _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";"); if (entry instanceof ValueEntry) { stream.println (); stream.println (" private static " + helperClass + " helper = new " + help...
void function () { stream.println (STRSTR\";"); if (entry instanceof ValueEntry) { stream.println (); stream.println (STR + helperClass + STR + helperClass + STR); stream.println (); stream.println (STR); stream.print (STR); ValueEntry child = (ValueEntry) entry; while (child.isSafe ()) { stream.println(","); ValueEntr...
/** * Generate the instance variables. **/
Generate the instance variables
writeInstVars
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Helper.java", "license": "gpl-2.0", "size": 23028 }
[ "com.sun.tools.corba.se.idl.ValueEntry" ]
import com.sun.tools.corba.se.idl.ValueEntry;
import com.sun.tools.corba.se.idl.*;
[ "com.sun.tools" ]
com.sun.tools;
1,264,348
private void reloadTriggers() { triggerTable.removeAllItems(); ISchedulerManager manager = SchedulerManagement.getSchedulerManagement().getSchedulerManager(); String selectIndex = null; String selectedJobId = getIdField().getValue(); try { List<JobTrigger> trigger...
void function() { triggerTable.removeAllItems(); ISchedulerManager manager = SchedulerManagement.getSchedulerManagement().getSchedulerManager(); String selectIndex = null; String selectedJobId = getIdField().getValue(); try { List<JobTrigger> triggers = manager.getTriggersByScheduleId(selectedJobId); for (JobTrigger tr...
/** * Reload the trigger table. */
Reload the trigger table
reloadTriggers
{ "repo_name": "kit-data-manager/base", "path": "UserInterface/AdminUI/src/main/java/edu/kit/dama/ui/admin/schedule/SchedulerBasePropertiesLayout.java", "license": "apache-2.0", "size": 11852 }
[ "edu.kit.dama.authorization.exceptions.UnauthorizedAccessAttemptException", "edu.kit.dama.scheduler.SchedulerManagement", "edu.kit.dama.scheduler.api.trigger.JobTrigger", "edu.kit.dama.scheduler.manager.ISchedulerManager", "edu.kit.dama.ui.admin.workflow.DataWorkflowBasePropertiesLayout", "java.util.List"...
import edu.kit.dama.authorization.exceptions.UnauthorizedAccessAttemptException; import edu.kit.dama.scheduler.SchedulerManagement; import edu.kit.dama.scheduler.api.trigger.JobTrigger; import edu.kit.dama.scheduler.manager.ISchedulerManager; import edu.kit.dama.ui.admin.workflow.DataWorkflowBasePropertiesLayout; impor...
import edu.kit.dama.authorization.exceptions.*; import edu.kit.dama.scheduler.*; import edu.kit.dama.scheduler.api.trigger.*; import edu.kit.dama.scheduler.manager.*; import edu.kit.dama.ui.admin.workflow.*; import java.util.*;
[ "edu.kit.dama", "java.util" ]
edu.kit.dama; java.util;
1,823,099
private void readComponentConfiguration(ComponentContext context) { Dictionary<?, ?> properties = context.getProperties(); Boolean flag; flag = isPropertyEnabled(properties, "ipv6NeighborDiscovery"); if (flag == null) { log.info("IPv6 Neighbor Discovery is not configured...
void function(ComponentContext context) { Dictionary<?, ?> properties = context.getProperties(); Boolean flag; flag = isPropertyEnabled(properties, STR); if (flag == null) { log.info(STR + STR, ipv6NeighborDiscovery); } else { ipv6NeighborDiscovery = flag; log.info(STR, ipv6NeighborDiscovery ? STR : STR); } }
/** * Extracts properties from the component configuration context. * * @param context the component context */
Extracts properties from the component configuration context
readComponentConfiguration
{ "repo_name": "packet-tracker/onos", "path": "apps/proxyarp/src/main/java/org/onosproject/proxyarp/ProxyArp.java", "license": "apache-2.0", "size": 8950 }
[ "java.util.Dictionary", "org.osgi.service.component.ComponentContext" ]
import java.util.Dictionary; import org.osgi.service.component.ComponentContext;
import java.util.*; import org.osgi.service.component.*;
[ "java.util", "org.osgi.service" ]
java.util; org.osgi.service;
1,723,721
public void addToolBarComponent(Component component) { validateComponentNonNull(component); if (component instanceof JButton) { addButton((JButton) component); } else if (component instanceof JToggleButton) { addButton((JToggleButton) component); } else { ...
void function(Component component) { validateComponentNonNull(component); if (component instanceof JButton) { addButton((JButton) component); } else if (component instanceof JToggleButton) { addButton((JToggleButton) component); } else { getToolbar().add(component); } }
/** * Adds the given component to the tool bar. * * <p>The icons of the buttons ({@code JButton} and {@code JToggleButton}) added are * automatically scaled. * * @param component the component to add. * @throws IllegalArgumentException if the component is {@code null}. * @since 2...
Adds the given component to the tool bar. The icons of the buttons (JButton and JToggleButton) added are automatically scaled
addToolBarComponent
{ "repo_name": "zaproxy/zaproxy", "path": "zap/src/main/java/org/zaproxy/zap/view/MainToolbarPanel.java", "license": "apache-2.0", "size": 18946 }
[ "java.awt.Component", "javax.swing.JButton", "javax.swing.JToggleButton" ]
import java.awt.Component; import javax.swing.JButton; import javax.swing.JToggleButton;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,072,108
@Override public Adapter createRegulatorAdapter() { if (regulatorItemProvider == null) { regulatorItemProvider = new RegulatorItemProvider(this); } return regulatorItemProvider; } protected TransformerItemProvider transformerItemProvider;
Adapter function() { if (regulatorItemProvider == null) { regulatorItemProvider = new RegulatorItemProvider(this); } return regulatorItemProvider; } protected TransformerItemProvider transformerItemProvider;
/** * This creates an adapter for a {@link visGrid.Regulator}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>visGrid.Regulator</code>.
createRegulatorAdapter
{ "repo_name": "mikesligo/visGrid", "path": "ie.tcd.gmf.visGrid.edit/src/visGrid/provider/VisGridItemProviderAdapterFactory.java", "license": "gpl-3.0", "size": 57143 }
[ "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;
241,105
public void find(int index, float weightLoss, float moveCost, ArrayList<DbEntry> itemsPlaced) { if ((weightLoss >= lowestWeightLoss) || ((weightLoss == lowestWeightLoss) && (moveCost >= lowestMoveCost))) { // Abort, as we already have a better solu...
void function(int index, float weightLoss, float moveCost, ArrayList<DbEntry> itemsPlaced) { if ((weightLoss >= lowestWeightLoss) ((weightLoss == lowestWeightLoss) && (moveCost >= lowestMoveCost))) { return; } else if (index >= itemsToPlace.size()) { lowestWeightLoss = weightLoss; lowestMoveCost = moveCost; finalPlaced...
/** * Recursively finds a placement for the provided items. * @param index the position in {@link #itemsToPlace} to start looking at. * @param weightLoss total weight loss upto this point * @param moveCost total move cost upto this point * @param itemsPlaced all the items al...
Recursively finds a placement for the provided items
find
{ "repo_name": "YAJATapps/FlickLauncher", "path": "src/com/android/launcher3/model/GridSizeMigrationTask.java", "license": "apache-2.0", "size": 43629 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,320,904
public BigDecimal getCurrentCostPrice () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPrice); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPrice); if (bd == null) return Env.ZERO; return bd; }
/** Get Current Cost Price. @return The currently used cost price */
Get Current Cost Price
getCurrentCostPrice
{ "repo_name": "neuroidss/adempiere", "path": "base/src/org/compiere/model/X_T_BOM_Indented.java", "license": "gpl-2.0", "size": 11523 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
2,830,953
@CalledByNative void close() { if (mPort == null) { return; } try { mPort.close(); } catch (IOException e) { // We can do nothing here. Just ignore the error. } mPort = null; }
void close() { if (mPort == null) { return; } try { mPort.close(); } catch (IOException e) { } mPort = null; }
/** * Closes the port. */
Closes the port
close
{ "repo_name": "youtube/cobalt", "path": "third_party/chromium/media/midi/java/src/org/chromium/midi/MidiOutputPortAndroid.java", "license": "bsd-3-clause", "size": 2393 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,766,261
byte[] out; ByteArrayOutputStream baos = new ByteArrayOutputStream(); GZIPOutputStream gzip = new GZIPOutputStream(baos, 65536); gzip.write(str.getBytes()); gzip.close(); out = baos.toByteArray(); return out; }
byte[] out; ByteArrayOutputStream baos = new ByteArrayOutputStream(); GZIPOutputStream gzip = new GZIPOutputStream(baos, 65536); gzip.write(str.getBytes()); gzip.close(); out = baos.toByteArray(); return out; }
/** * Compress a string in gzip format * * @param String * @return ByteArrayOutputStream * @throws IOException */
Compress a string in gzip format
compress
{ "repo_name": "GBIF-Sweden/izeure", "path": "src/main/java/se/gbif/bourgogne/utilities/Gz.java", "license": "apache-2.0", "size": 1517 }
[ "java.util.zip.GZIPOutputStream", "org.apache.commons.io.output.ByteArrayOutputStream" ]
import java.util.zip.GZIPOutputStream; import org.apache.commons.io.output.ByteArrayOutputStream;
import java.util.zip.*; import org.apache.commons.io.output.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
1,753,570
public FilterFactory2 getFilterFactory() { return ff; }
FilterFactory2 function() { return ff; }
/** * getter for filterFactory * * @return the FilterFactory being used */
getter for filterFactory
getFilterFactory
{ "repo_name": "FUNCATE/TerraMobile", "path": "sldparser/src/main/geotools/styling/StyleBuilder.java", "license": "apache-2.0", "size": 60101 }
[ "org.opengis.filter.FilterFactory2" ]
import org.opengis.filter.FilterFactory2;
import org.opengis.filter.*;
[ "org.opengis.filter" ]
org.opengis.filter;
2,285,903
@Method(selector = "getInstanceWithTransactionId:transactionName:appEnvironment:duration:reason:andCompletedStatus:") public static native TrStop getInstance (String transactionId, String transactionName, MintAppEnvironment anAppEnvironment, NSNumber aDuration, String aReason, String aCompletedStatus);
@Method(selector = STR) static native TrStop function (String transactionId, String transactionName, MintAppEnvironment anAppEnvironment, NSNumber aDuration, String aReason, String aCompletedStatus);
/** Creates a new TrStop instance. * * @param transactionId The transaction ID of the TrStart instance, auto-generated when the TrStart instance is created. * @param transactionName The unique transaction name of the TrStart instance. * @param anAppEnvironment A MintAppEnvironment instance. * @...
Creates a new TrStop instance
getInstance
{ "repo_name": "mariamKh/robovm-ios-bindings", "path": "splunkmint/src/org/robovm/bindings/splunkmint/TrStop.java", "license": "apache-2.0", "size": 1641 }
[ "org.robovm.apple.foundation.NSNumber", "org.robovm.objc.annotation.Method" ]
import org.robovm.apple.foundation.NSNumber; import org.robovm.objc.annotation.Method;
import org.robovm.apple.foundation.*; import org.robovm.objc.annotation.*;
[ "org.robovm.apple", "org.robovm.objc" ]
org.robovm.apple; org.robovm.objc;
1,859,133
public void writeContainerPage(CmsObject cms, CmsContainerPageBean cntPage) throws CmsException { // keep unused containers CmsContainerPageBean savePage = addUnusedContainers(cms, cntPage); // Replace existing locales with master locale for (Locale locale : getLocales()) { ...
void function(CmsObject cms, CmsContainerPageBean cntPage) throws CmsException { CmsContainerPageBean savePage = addUnusedContainers(cms, cntPage); for (Locale locale : getLocales()) { removeLocale(locale); } Locale masterLocale = CmsLocaleManager.MASTER_LOCALE; addLocale(cms, masterLocale); Element parent = getLocaleN...
/** * Saves a container page in in-memory XML structure.<p> * * @param cms the current CMS context * @param cntPage the container page bean to save * * @throws CmsException if something goes wrong */
Saves a container page in in-memory XML structure
writeContainerPage
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/xml/containerpage/CmsXmlContainerPage.java", "license": "lgpl-2.1", "size": 24602 }
[ "java.util.Locale", "org.dom4j.Element", "org.opencms.file.CmsObject", "org.opencms.i18n.CmsLocaleManager", "org.opencms.main.CmsException" ]
import java.util.Locale; import org.dom4j.Element; import org.opencms.file.CmsObject; import org.opencms.i18n.CmsLocaleManager; import org.opencms.main.CmsException;
import java.util.*; import org.dom4j.*; import org.opencms.file.*; import org.opencms.i18n.*; import org.opencms.main.*;
[ "java.util", "org.dom4j", "org.opencms.file", "org.opencms.i18n", "org.opencms.main" ]
java.util; org.dom4j; org.opencms.file; org.opencms.i18n; org.opencms.main;
393,675
private void showBadChecksums() { if (badChecksumTests != null) { out.println("The following " + badChecksumTests.length + " tests had bad checksums."); for (int i = 0; i < badChecksumTests.length; i++) { TestResult tr = badChecksumTests[i]; out.printl...
void function() { if (badChecksumTests != null) { out.println(STR + badChecksumTests.length + STR); for (int i = 0; i < badChecksumTests.length; i++) { TestResult tr = badChecksumTests[i]; out.println(tr.getWorkRelativePath()); } } }
/** * Print out a short summary about any tests with bad checksums */
Print out a short summary about any tests with bad checksums
showBadChecksums
{ "repo_name": "otmarjr/jtreg-fork", "path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/audit/Audit.java", "license": "gpl-2.0", "size": 27296 }
[ "com.sun.javatest.TestResult" ]
import com.sun.javatest.TestResult;
import com.sun.javatest.*;
[ "com.sun.javatest" ]
com.sun.javatest;
1,599,557
AggregatedAccountStorageStats queryAggregatedAccountStorageStats() throws Exception;
AggregatedAccountStorageStats queryAggregatedAccountStorageStats() throws Exception;
/** * Returns the aggregated account storage stats in {@link AggregatedAccountStorageStats}. * @return An {@link AggregatedAccountStorageStats} represents the aggregated account stats. * @throws Exception */
Returns the aggregated account storage stats in <code>AggregatedAccountStorageStats</code>
queryAggregatedAccountStorageStats
{ "repo_name": "linkedin/ambry", "path": "ambry-api/src/main/java/com/github/ambry/accountstats/AccountStatsStore.java", "license": "apache-2.0", "size": 7693 }
[ "com.github.ambry.server.storagestats.AggregatedAccountStorageStats" ]
import com.github.ambry.server.storagestats.AggregatedAccountStorageStats;
import com.github.ambry.server.storagestats.*;
[ "com.github.ambry" ]
com.github.ambry;
2,769,749
public ChangeNotes notes() { checkState(maybeNotes() != null, "no ChangeNotes loaded; check error().isPresent() first"); return maybeNotes(); }
ChangeNotes function() { checkState(maybeNotes() != null, STR); return maybeNotes(); }
/** * Notes loaded for this change. * * @return notes. * @throws IllegalStateException if there was an error loading the change; callers must check * that {@link #error()} is absent before attempting to look up the notes. */
Notes loaded for this change
notes
{ "repo_name": "GerritCodeReview/gerrit", "path": "java/com/google/gerrit/server/notedb/ChangeNotes.java", "license": "apache-2.0", "size": 26212 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,372,945
public static boolean getAquaAffinityModifier(EntityLivingBase p_77510_0_) { return getMaxEnchantmentLevel(Enchantment.aquaAffinity.effectId, p_77510_0_.getInventory()) > 0; }
static boolean function(EntityLivingBase p_77510_0_) { return getMaxEnchantmentLevel(Enchantment.aquaAffinity.effectId, p_77510_0_.getInventory()) > 0; }
/** * Returns the aqua affinity status of enchantments on current equipped item of player. */
Returns the aqua affinity status of enchantments on current equipped item of player
getAquaAffinityModifier
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/enchantment/EnchantmentHelper.java", "license": "mit", "size": 20116 }
[ "net.minecraft.entity.EntityLivingBase" ]
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
1,027,107
public List<generated.classic.async.vertx.tables.pojos.Somethingwithoutjson> fetchBySomeid(Integer... values) { return fetch(Somethingwithoutjson.SOMETHINGWITHOUTJSON.SOMEID, values); }
List<generated.classic.async.vertx.tables.pojos.Somethingwithoutjson> function(Integer... values) { return fetch(Somethingwithoutjson.SOMETHINGWITHOUTJSON.SOMEID, values); }
/** * Fetch records that have <code>someId IN (values)</code> */
Fetch records that have <code>someId IN (values)</code>
fetchBySomeid
{ "repo_name": "jklingsporn/vertx-jooq-async", "path": "vertx-jooq-async-generate/src/test/java/generated/classic/async/vertx/tables/daos/SomethingwithoutjsonDao.java", "license": "mit", "size": 4499 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,764,374
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "salgado/javaweb2015_1", "path": "Semana6_CRUD/src/java/br/lasalle/controller/InserirServlet.java", "license": "mit", "size": 3818 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
227,361
void importData(CmsObject cms, I_CmsReport report) throws CmsXmlException, CmsImportExportException, CmsRoleViolationException, CmsException;
void importData(CmsObject cms, I_CmsReport report) throws CmsXmlException, CmsImportExportException, CmsRoleViolationException, CmsException;
/** * Imports the data into the Cms.<p> * * @param cms the current OpenCms context object * @param report a Cms report to print log messages * * @throws CmsImportExportException if operation was not successful * @throws CmsRoleViolationException if the current user has not t...
Imports the data into the Cms
importData
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/importexport/I_CmsImportExportHandler.java", "license": "lgpl-2.1", "size": 6414 }
[ "org.opencms.file.CmsObject", "org.opencms.main.CmsException", "org.opencms.security.CmsRoleViolationException", "org.opencms.xml.CmsXmlException" ]
import org.opencms.file.CmsObject; import org.opencms.main.CmsException; import org.opencms.security.CmsRoleViolationException; import org.opencms.xml.CmsXmlException;
import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*; import org.opencms.xml.*;
[ "org.opencms.file", "org.opencms.main", "org.opencms.security", "org.opencms.xml" ]
org.opencms.file; org.opencms.main; org.opencms.security; org.opencms.xml;
407,817
public FeatureCursor queryFeaturesForChunkIdOrder(String[] columns, GeometryEnvelope envelope, String where, int limit) { return queryFeaturesForChunk(columns, envelope, where, getPkColumnName(), limit); }
FeatureCursor function(String[] columns, GeometryEnvelope envelope, String where, int limit) { return queryFeaturesForChunk(columns, envelope, where, getPkColumnName(), limit); }
/** * Query for features within the geometry envelope ordered by id, starting * at the offset and returning no more than the limit * * @param columns columns * @param envelope geometry envelope * @param where where clause * @param limit chunk limit * @return feature cursor...
Query for features within the geometry envelope ordered by id, starting at the offset and returning no more than the limit
queryFeaturesForChunkIdOrder
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java", "license": "mit", "size": 276322 }
[ "mil.nga.geopackage.features.user.FeatureCursor", "mil.nga.sf.GeometryEnvelope" ]
import mil.nga.geopackage.features.user.FeatureCursor; import mil.nga.sf.GeometryEnvelope;
import mil.nga.geopackage.features.user.*; import mil.nga.sf.*;
[ "mil.nga.geopackage", "mil.nga.sf" ]
mil.nga.geopackage; mil.nga.sf;
347,396
public void setRecord( final MfRecord record ) { final int id = record.getParam( 0 ); setMapMode( id ); }
void function( final MfRecord record ) { final int id = record.getParam( 0 ); setMapMode( id ); }
/** * Reads the command data from the given record and adjusts the internal parameters according to the data parsed. * <p/> * After the raw record was read from the datasource, the record is parsed by the concrete implementation. * * @param record the raw data that makes up the record. */
Reads the command data from the given record and adjusts the internal parameters according to the data parsed. After the raw record was read from the datasource, the record is parsed by the concrete implementation
setRecord
{ "repo_name": "mbatchelor/pentaho-reporting", "path": "libraries/libpixie/src/main/java/org/pentaho/reporting/libraries/pixie/wmf/records/MfCmdSetMapMode.java", "license": "lgpl-2.1", "size": 3805 }
[ "org.pentaho.reporting.libraries.pixie.wmf.MfRecord" ]
import org.pentaho.reporting.libraries.pixie.wmf.MfRecord;
import org.pentaho.reporting.libraries.pixie.wmf.*;
[ "org.pentaho.reporting" ]
org.pentaho.reporting;
729,422
public static boolean postProcessResponse(MessageContext messageContext, String type) { ExtensionListener extensionListener = getExtensionListener(type); if (extensionListener != null) { ResponseContextDTO responseContextDTO = generateResponseContextDTO(messageContext); Exte...
static boolean function(MessageContext messageContext, String type) { ExtensionListener extensionListener = getExtensionListener(type); if (extensionListener != null) { ResponseContextDTO responseContextDTO = generateResponseContextDTO(messageContext); ExtensionResponseDTO responseDTO = extensionListener.postProcessRes...
/** * Handles post-process response by constructing the response context DTO, invoking the matching extension listener * implementation and processing the extension listener response. * * @param messageContext Synapse Message Context * @param type Extension type * @return boolean...
Handles post-process response by constructing the response context DTO, invoking the matching extension listener implementation and processing the extension listener response
postProcessResponse
{ "repo_name": "ruks/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/ext/listener/ExtensionListenerUtil.java", "license": "apache-2.0", "size": 19816 }
[ "org.apache.synapse.MessageContext", "org.wso2.carbon.apimgt.common.gateway.dto.ExtensionResponseDTO", "org.wso2.carbon.apimgt.common.gateway.dto.ResponseContextDTO", "org.wso2.carbon.apimgt.common.gateway.extensionlistener.ExtensionListener" ]
import org.apache.synapse.MessageContext; import org.wso2.carbon.apimgt.common.gateway.dto.ExtensionResponseDTO; import org.wso2.carbon.apimgt.common.gateway.dto.ResponseContextDTO; import org.wso2.carbon.apimgt.common.gateway.extensionlistener.ExtensionListener;
import org.apache.synapse.*; import org.wso2.carbon.apimgt.common.gateway.dto.*; import org.wso2.carbon.apimgt.common.gateway.extensionlistener.*;
[ "org.apache.synapse", "org.wso2.carbon" ]
org.apache.synapse; org.wso2.carbon;
1,336,155
@Generated @Selector("setSuggestedInvocationPhrase:") public native void setSuggestedInvocationPhrase(String value);
@Selector(STR) native void function(String value);
/** * A human-understandable string that can be used to suggest a voice shortcut phrase to the user */
A human-understandable string that can be used to suggest a voice shortcut phrase to the user
setSuggestedInvocationPhrase
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/foundation/NSUserActivity.java", "license": "apache-2.0", "size": 25953 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,113,117
public void testGetLocalRendererDefImplicit() throws QuickFixException { DefDescriptor<T> cmpDesc = addSourceAutoCleanup(getDefClass(), String.format(baseTag, "", "")); DefDescriptor<RendererDef> renderDesc = DefDescriptorImpl.getAssociateDescriptor(cmpDesc, RendererDef.class, DefDes...
void function() throws QuickFixException { DefDescriptor<T> cmpDesc = addSourceAutoCleanup(getDefClass(), String.format(baseTag, STRSTR({render:function(c){return this.superRender();}})"); RendererDef dd = cmpDesc.getDef().getLocalRendererDef(); assertNull(dd); }
/** * Test method for {@link BaseComponentDef#getLocalRendererDef()}. */
Test method for <code>BaseComponentDef#getLocalRendererDef()</code>
testGetLocalRendererDefImplicit
{ "repo_name": "igor-sfdc/aura", "path": "aura-impl/src/test/java/org/auraframework/def/BaseComponentDefTest.java", "license": "apache-2.0", "size": 93773 }
[ "org.auraframework.throwable.quickfix.QuickFixException" ]
import org.auraframework.throwable.quickfix.QuickFixException;
import org.auraframework.throwable.quickfix.*;
[ "org.auraframework.throwable" ]
org.auraframework.throwable;
2,024,205
ActionErrors errors = new ActionErrors(); DateFormat df = SimpleDateFormat.getDateInstance(DateFormat.SHORT); ParsePosition pp = new ParsePosition(0); if (this.projectID == 0) errors.add("upload", new ActionMessage("error.upload.noproject")); if (this.directory == null || directory.trim()....
ActionErrors errors = new ActionErrors(); DateFormat df = SimpleDateFormat.getDateInstance(DateFormat.SHORT); ParsePosition pp = new ParsePosition(0); if (this.projectID == 0) errors.add(STR, new ActionMessage(STR)); if (this.directory == null directory.trim().length() == 0) { errors.add(STR, new ActionMessage(STR)); }...
/** * Validate the properties that have been sent from the HTTP request, * and return an ActionErrors object that encapsulates any * validation errors that have been found. If no errors are found, return * an empty ActionErrors object. */
Validate the properties that have been sent from the HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found. If no errors are found, return an empty ActionErrors object
validate
{ "repo_name": "yeastrc/msdapl", "path": "MSDaPl_Web_App/src/org/yeastrc/www/yates/UploadDataForm.java", "license": "apache-2.0", "size": 4288 }
[ "java.text.DateFormat", "java.text.ParsePosition", "java.text.SimpleDateFormat", "org.apache.struts.action.ActionErrors", "org.apache.struts.action.ActionMessage", "org.yeastrc.bio.taxonomy.TaxonomySearcher" ]
import java.text.DateFormat; import java.text.ParsePosition; import java.text.SimpleDateFormat; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionMessage; import org.yeastrc.bio.taxonomy.TaxonomySearcher;
import java.text.*; import org.apache.struts.action.*; import org.yeastrc.bio.taxonomy.*;
[ "java.text", "org.apache.struts", "org.yeastrc.bio" ]
java.text; org.apache.struts; org.yeastrc.bio;
1,412,467
@Override public void processUpdate( ICacheElement<K, V> item, long requesterId ) throws IOException { CompositeCache<K, V> cache = getCacheManager().getCache( item.getCacheName() ); boolean keepLocal = !remoteHttpCacheServerAttributes.isLocalClusterConsistency(); if ...
void function( ICacheElement<K, V> item, long requesterId ) throws IOException { CompositeCache<K, V> cache = getCacheManager().getCache( item.getCacheName() ); boolean keepLocal = !remoteHttpCacheServerAttributes.isLocalClusterConsistency(); if ( keepLocal ) { cache.localUpdate( item ); } else { cache.update( item ); ...
/** * Processes an update request. * <p> * If isLocalClusterConsistency is enabled we will treat this as a normal request of non-remote * origination. * <p> * @param item * @param requesterId * @throws IOException */
Processes an update request. If isLocalClusterConsistency is enabled we will treat this as a normal request of non-remote origination.
processUpdate
{ "repo_name": "tikue/jcs2-snapshot", "path": "src/java/org/apache/commons/jcs/auxiliary/remote/http/server/RemoteHttpCacheService.java", "license": "apache-2.0", "size": 8106 }
[ "java.io.IOException", "org.apache.commons.jcs.engine.behavior.ICacheElement", "org.apache.commons.jcs.engine.control.CompositeCache" ]
import java.io.IOException; import org.apache.commons.jcs.engine.behavior.ICacheElement; import org.apache.commons.jcs.engine.control.CompositeCache;
import java.io.*; import org.apache.commons.jcs.engine.behavior.*; import org.apache.commons.jcs.engine.control.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,319,606
public static long size(Matcher self) { return getCount(self); }
static long function(Matcher self) { return getCount(self); }
/** * Provide the standard Groovy <code>size()</code> method for <code>Matcher</code>. * * @param self a matcher object * @return the matcher's size (count) * @since 1.5.0 */
Provide the standard Groovy <code>size()</code> method for <code>Matcher</code>
size
{ "repo_name": "bsideup/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java", "license": "apache-2.0", "size": 141076 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,264,740
void write(ByteCodeWriter out) throws IOException { out.write(ConstantPool.CP_DOUBLE); out.writeDouble(_value); }
void write(ByteCodeWriter out) throws IOException { out.write(ConstantPool.CP_DOUBLE); out.writeDouble(_value); }
/** * Writes the contents of the pool entry. */
Writes the contents of the pool entry
write
{ "repo_name": "CleverCloud/Quercus", "path": "resin/src/main/java/com/caucho/bytecode/DoubleConstant.java", "license": "gpl-2.0", "size": 1880 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
952,261
protected void processReport( HttpServletRequest request ) throws Exception { // if request is SOAP Post or servlet path is "/download" or "/extract", // don't delete document file if ( ParameterAccessor.HEADER_REQUEST_TYPE_SOAP.equalsIgnoreCase( this.requestType ) || IBirtConstants.SERVLET_PATH_DOWNLOAD....
void function( HttpServletRequest request ) throws Exception { if ( ParameterAccessor.HEADER_REQUEST_TYPE_SOAP.equalsIgnoreCase( this.requestType ) IBirtConstants.SERVLET_PATH_DOWNLOAD.equalsIgnoreCase( request.getServletPath( ) ) IBirtConstants.SERVLET_PATH_EXTRACT.equalsIgnoreCase( request.getServletPath( ) ) ) retur...
/** * Determine the report design and doc 's timestamp * * @param request * @throws Exception */
Determine the report design and doc 's timestamp
processReport
{ "repo_name": "Charling-Huang/birt", "path": "viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/context/ViewerAttributeBean.java", "license": "epl-1.0", "size": 33571 }
[ "java.io.File", "javax.servlet.http.HttpServletRequest", "org.eclipse.birt.report.IBirtConstants", "org.eclipse.birt.report.utility.ParameterAccessor" ]
import java.io.File; import javax.servlet.http.HttpServletRequest; import org.eclipse.birt.report.IBirtConstants; import org.eclipse.birt.report.utility.ParameterAccessor;
import java.io.*; import javax.servlet.http.*; import org.eclipse.birt.report.*; import org.eclipse.birt.report.utility.*;
[ "java.io", "javax.servlet", "org.eclipse.birt" ]
java.io; javax.servlet; org.eclipse.birt;
2,298,945
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) { int l = MathHelper.floor_double((double)(p_149689_5_.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3; p_149689_1_.setBlockMetadataWithNotify(p_149689_...
void function(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) { int l = MathHelper.floor_double((double)(p_149689_5_.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3; p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, l, 2); }
/** * Called when the block is placed in the world. */
Called when the block is placed in the world
onBlockPlacedBy
{ "repo_name": "jtrent238/jtrent238FoodMod", "path": "src/main/java/com/jtrent238/foodmod/Blockfrozenpumpkin.java", "license": "lgpl-2.1", "size": 8028 }
[ "net.minecraft.entity.EntityLivingBase", "net.minecraft.item.ItemStack", "net.minecraft.util.MathHelper", "net.minecraft.world.World" ]
import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.util.MathHelper; import net.minecraft.world.World;
import net.minecraft.entity.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.item", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world;
585,488
void getRevisions(final @NotNull String projectPath, final String path, final String revisionRange, final AsyncRequestCallback<GetRevisionsResponse> callback);
void getRevisions(final @NotNull String projectPath, final String path, final String revisionRange, final AsyncRequestCallback<GetRevisionsResponse> callback);
/** * Get the list of all revisions where a given path was modified * * @param projectPath * the project path * @param path * path to get the revisions for * @param revisionRange * the range of revisions to check * @param callback * the c...
Get the list of all revisions where a given path was modified
getRevisions
{ "repo_name": "evidolob/che", "path": "plugins/plugin-svn/che-plugin-svn-ext-ide/src/main/java/org/eclipse/che/plugin/svn/ide/SubversionClientService.java", "license": "epl-1.0", "size": 13463 }
[ "javax.validation.constraints.NotNull", "org.eclipse.che.ide.rest.AsyncRequestCallback", "org.eclipse.che.plugin.svn.shared.GetRevisionsResponse" ]
import javax.validation.constraints.NotNull; import org.eclipse.che.ide.rest.AsyncRequestCallback; import org.eclipse.che.plugin.svn.shared.GetRevisionsResponse;
import javax.validation.constraints.*; import org.eclipse.che.ide.rest.*; import org.eclipse.che.plugin.svn.shared.*;
[ "javax.validation", "org.eclipse.che" ]
javax.validation; org.eclipse.che;
1,607,795
public List<Criteria> getOredCriteria() { return oredCriteria; }
List<Criteria> function() { return oredCriteria; }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ACTPDC * * @mbggenerated Sun Nov 21 21:36:06 CST 2010 */
This method was generated by MyBatis Generator. This method corresponds to the database table ACTPDC
getOredCriteria
{ "repo_name": "rongshang/fbi-cbs2", "path": "common/main/java/cbs/repository/code/model/ActpdcExample.java", "license": "unlicense", "size": 27882 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,935,258
private RefactoringStatusEntry getEntryMatchingSeverity(int severity, List<RefactoringStatusEntry> entries) { for (RefactoringStatusEntry entry : entries) { if (entry.getSeverity() >= severity) return entry; } return null; }
RefactoringStatusEntry function(int severity, List<RefactoringStatusEntry> entries) { for (RefactoringStatusEntry entry : entries) { if (entry.getSeverity() >= severity) return entry; } return null; }
/** * Returns the first entry which severity is equal or greater than the * given severity. If more than one entry exists that matches the * criteria the first one is returned. Returns <code>null</code> if no * entry matches. * * @param severity * the severity to search for. M...
Returns the first entry which severity is equal or greater than the given severity. If more than one entry exists that matches the criteria the first one is returned. Returns <code>null</code> if no entry matches
getEntryMatchingSeverity
{ "repo_name": "ollie314/che-plugins", "path": "plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/move/wizard/MoveViewImpl.java", "license": "epl-1.0", "size": 10693 }
[ "java.util.List", "org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringStatusEntry" ]
import java.util.List; import org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringStatusEntry;
import java.util.*; import org.eclipse.che.ide.ext.java.shared.dto.refactoring.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
1,221,821
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS); mNavConf = getNavDrawerConfiguration(); setContentView(mNavConf.getMainLayout()); mDrawerLayout = (Drawer...
void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_INDETERMINATE_PROGRESS); mNavConf = getNavDrawerConfiguration(); setContentView(mNavConf.getMainLayout()); mDrawerLayout = (DrawerLayout) findViewById(mNavConf.getDrawerLayoutId()); mDrawerList = (Li...
/** * Called when the activity is first created. */
Called when the activity is first created
onCreate
{ "repo_name": "CCrashBandicot/Android-IMSI-Catcher-Detector", "path": "app/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java", "license": "gpl-3.0", "size": 27977 }
[ "android.os.Bundle", "android.support.v4.app.ActionBarDrawerToggle", "android.support.v4.widget.DrawerLayout", "android.view.Window", "android.widget.ListView" ]
import android.os.Bundle; import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.widget.DrawerLayout; import android.view.Window; import android.widget.ListView;
import android.os.*; import android.support.v4.app.*; import android.support.v4.widget.*; import android.view.*; import android.widget.*;
[ "android.os", "android.support", "android.view", "android.widget" ]
android.os; android.support; android.view; android.widget;
2,544,383
public void removeEmptyTrades() { Iterator<FactionTrade> it = tradeList.iterator(); FactionTrade t; boolean hasItems = false; while(it.hasNext() && (t=it.next())!=null) { hasItems = false; for(int i = 0; i < 9; i++) { if(t.getInput()[i]!=null || t.getOutput()[i]!=null) ...
void function() { Iterator<FactionTrade> it = tradeList.iterator(); FactionTrade t; boolean hasItems = false; while(it.hasNext() && (t=it.next())!=null) { hasItems = false; for(int i = 0; i < 9; i++) { if(t.getInput()[i]!=null t.getOutput()[i]!=null) { hasItems=true; break; } } if(!hasItems){it.remove();} } } public vo...
/** * removes any trades that have no input or output items.<br> * should be called before the changed list is sent from client->server from setup GUI. */
removes any trades that have no input or output items. should be called before the changed list is sent from client->server from setup GUI
removeEmptyTrades
{ "repo_name": "Mazdallier/AncientWarfare2", "path": "src/main/java/net/shadowmage/ancientwarfare/npc/trade/FactionTradeList.java", "license": "gpl-3.0", "size": 3511 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,089,126
@Subscribe public void startBrother(StartBrotherEvent event) { start(event.targetFragment); }
void function(StartBrotherEvent event) { start(event.targetFragment); }
/** * start other BrotherFragment */
start other BrotherFragment
startBrother
{ "repo_name": "arilpan/menu", "path": "src/main/java/com/xdkj/campus/menu/MainFragment.java", "license": "gpl-3.0", "size": 7294 }
[ "com.xdkj.campus.menu.event.StartBrotherEvent" ]
import com.xdkj.campus.menu.event.StartBrotherEvent;
import com.xdkj.campus.menu.event.*;
[ "com.xdkj.campus" ]
com.xdkj.campus;
329,066
@Override public ShardRouting routingEntry() { return this.shardRouting; }
ShardRouting function() { return this.shardRouting; }
/** * Returns the latest cluster routing entry received with this shard. */
Returns the latest cluster routing entry received with this shard
routingEntry
{ "repo_name": "mohit/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 118888 }
[ "org.elasticsearch.cluster.routing.ShardRouting" ]
import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
649,827
public void setTree(CmsTree<CmsTreeItem> tree) { m_tree = tree; for (Widget widget : m_children) { if (widget instanceof CmsTreeItem) { ((CmsTreeItem)widget).setTree(tree); } } }
void function(CmsTree<CmsTreeItem> tree) { m_tree = tree; for (Widget widget : m_children) { if (widget instanceof CmsTreeItem) { ((CmsTreeItem)widget).setTree(tree); } } }
/** * Sets the tree to which this tree item belongs.<p> * * This is automatically called when this tree item or one of its ancestors is inserted into a tree.<p> * * @param tree the tree into which the item has been inserted */
Sets the tree to which this tree item belongs. This is automatically called when this tree item or one of its ancestors is inserted into a tree
setTree
{ "repo_name": "ggiudetti/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/tree/CmsTreeItem.java", "license": "lgpl-2.1", "size": 27355 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
1,639,469
ServiceResponseWithHeaders<Void, LROSADsPost202RetryInvalidHeaderHeaders> post202RetryInvalidHeader() throws CloudException, IOException, InterruptedException;
ServiceResponseWithHeaders<Void, LROSADsPost202RetryInvalidHeaderHeaders> post202RetryInvalidHeader() throws CloudException, IOException, InterruptedException;
/** * Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers. * * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws InterruptedException e...
Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers
post202RetryInvalidHeader
{ "repo_name": "sharadagarwal/autorest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROSADsOperations.java", "license": "mit", "size": 104323 }
[ "com.microsoft.azure.CloudException", "com.microsoft.rest.ServiceResponseWithHeaders", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponseWithHeaders; import java.io.IOException;
import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.io" ]
com.microsoft.azure; com.microsoft.rest; java.io;
1,617,410
public static byte[] convertASN1toXMLDSIG(byte asn1Bytes[]) throws IOException { if (asn1Bytes.length < 8 || asn1Bytes[0] != 48) { throw new IOException("Invalid ASN.1 format of ECDSA signature"); } int offset; if (asn1Bytes[1] > 0) { offset = 2; } el...
static byte[] function(byte asn1Bytes[]) throws IOException { if (asn1Bytes.length < 8 asn1Bytes[0] != 48) { throw new IOException(STR); } int offset; if (asn1Bytes[1] > 0) { offset = 2; } else if (asn1Bytes[1] == (byte) 0x81) { offset = 3; } else { throw new IOException(STR); } byte rLength = asn1Bytes[offset + 1]; in...
/** * Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value. * * The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r,s) value * pairs; the XML Signature requires the core BigInteger values. * * @param asn1Bytes * @return the decode bytes * * @throws IOExce...
Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value. The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r,s) value pairs; the XML Signature requires the core BigInteger values
convertASN1toXMLDSIG
{ "repo_name": "mbshopM/openconcerto", "path": "Modules/Module EBICS/src/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java", "license": "gpl-3.0", "size": 14790 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,052,521
public boolean addGroup(Group group) { try { this.addGroup.setString(1, group.getOwner()); this.addGroup.setString(2, group.getName()); this.addGroup.setString(3, ListHelper.fromStringsToString(group.getPlayerList())); this.addGroup.executeUpdate(); ...
boolean function(Group group) { try { this.addGroup.setString(1, group.getOwner()); this.addGroup.setString(2, group.getName()); this.addGroup.setString(3, ListHelper.fromStringsToString(group.getPlayerList())); this.addGroup.executeUpdate(); return true; } catch (Exception e) { ConsoleUtils.printException(e, MoneyPitC...
/** * Add a group */
Add a group
addGroup
{ "repo_name": "Minestar/MoneyPit", "path": "src/main/java/de/minestar/moneypit/database/DatabaseManager.java", "license": "gpl-3.0", "size": 28765 }
[ "de.minestar.minestarlibrary.utils.ConsoleUtils", "de.minestar.moneypit.MoneyPitCore", "de.minestar.moneypit.data.guests.Group", "de.minestar.moneypit.utils.ListHelper" ]
import de.minestar.minestarlibrary.utils.ConsoleUtils; import de.minestar.moneypit.MoneyPitCore; import de.minestar.moneypit.data.guests.Group; import de.minestar.moneypit.utils.ListHelper;
import de.minestar.minestarlibrary.utils.*; import de.minestar.moneypit.*; import de.minestar.moneypit.data.guests.*; import de.minestar.moneypit.utils.*;
[ "de.minestar.minestarlibrary", "de.minestar.moneypit" ]
de.minestar.minestarlibrary; de.minestar.moneypit;
2,167,415
public static void testMavenRepo1() throws Exception { Maven maven = new Maven(null); MavenRemoteRepository mr = new MavenRemoteRepository(); mr.setMaven(maven); MavenEntry me = maven.getEntry("org.apache.commons", "com.springsource.org.apache.commons.beanutils", "1.6.1"); me.remove(); me = maven.getEn...
static void function() throws Exception { Maven maven = new Maven(null); MavenRemoteRepository mr = new MavenRemoteRepository(); mr.setMaven(maven); MavenEntry me = maven.getEntry(STR, STR, "1.6.1"); me.remove(); me = maven.getEntry(STR, STR, "2.1.1"); me.remove(); me = maven.getEntry(STR, STR, "1.0.4"); me.remove(); m...
/** * Test the maven remote repository */
Test the maven remote repository
testMavenRepo1
{ "repo_name": "mcculls/bnd", "path": "biz.aQute.bndlib.tests/src/test/MavenTest.java", "license": "apache-2.0", "size": 15904 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,702,226
String getWorkerManagerName(BSPJobID jobId, StaffAttemptID staffId);
String getWorkerManagerName(BSPJobID jobId, StaffAttemptID staffId);
/** * Get the name of workerManager. * @param jobId BSPJobID * @param staffId StaffAttemptID * @return The workerManagerName. */
Get the name of workerManager
getWorkerManagerName
{ "repo_name": "LiuJianan/Graduate-Graph", "path": "src/java/com/chinamobile/bcbsp/workermanager/WorkerAgentInterface.java", "license": "apache-2.0", "size": 3229 }
[ "com.chinamobile.bcbsp.util.BSPJobID", "com.chinamobile.bcbsp.util.StaffAttemptID" ]
import com.chinamobile.bcbsp.util.BSPJobID; import com.chinamobile.bcbsp.util.StaffAttemptID;
import com.chinamobile.bcbsp.util.*;
[ "com.chinamobile.bcbsp" ]
com.chinamobile.bcbsp;
625,146
protected void popMappingsFromAnnotsTypesAndFeats(Configuration job) { // get the annotations types and features // to store as SOLR fields // solr.f.name = AnnotationType.featureName // e.g. solr.f.person = Person.string will map the "string" feature of "Person" annotations onto the Solr field "perso...
void function(Configuration job) { Iterator<Entry<String, String>> iterator = job.iterator(); while (iterator.hasNext()) { Entry<String, String> entry = iterator.next(); if (entry.getKey().startsWith(STR) == false) { continue; } String solrFieldName = entry.getKey().substring(STR.length()); populateMapping(solrFieldNam...
/** * Load up the types and features * * @param job */
Load up the types and features
popMappingsFromAnnotsTypesAndFeats
{ "repo_name": "LucidWorks/solr-hadoop-common", "path": "solr-hadoop-io/src/main/java/com/lucidworks/hadoop/io/LucidWorksWriter.java", "license": "apache-2.0", "size": 10121 }
[ "java.util.Iterator", "java.util.Map", "org.apache.hadoop.conf.Configuration" ]
import java.util.Iterator; import java.util.Map; import org.apache.hadoop.conf.Configuration;
import java.util.*; import org.apache.hadoop.conf.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,860,943
protected void generateDocument(RtfDocumentArea rda, RtfSection sect) throws java.io.IOException { RtfAttributes attr = new RtfAttributes(); attr.set(RtfText.ALIGN_CENTER); RtfParagraph p = sect.newParagraph(attr); p.newLineBreak(); p.newLineBreak(); p.newText("Ce...
void function(RtfDocumentArea rda, RtfSection sect) throws java.io.IOException { RtfAttributes attr = new RtfAttributes(); attr.set(RtfText.ALIGN_CENTER); RtfParagraph p = sect.newParagraph(attr); p.newLineBreak(); p.newLineBreak(); p.newText(STR); p.newLineBreak(); p.close(); attr = new RtfAttributes(); attr.set(RtfTe...
/** * Generate the document. * @param rda RtfDocumentArea * @param sect RtfSection * @throws java.io.IOException for I/O errors */
Generate the document
generateDocument
{ "repo_name": "apache/fop", "path": "fop-core/src/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java", "license": "apache-2.0", "size": 2666 }
[ "org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAttributes", "org.apache.fop.render.rtf.rtflib.rtfdoc.RtfDocumentArea", "org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph", "org.apache.fop.render.rtf.rtflib.rtfdoc.RtfSection", "org.apache.fop.render.rtf.rtflib.rtfdoc.RtfText" ]
import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAttributes; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfDocumentArea; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfSection; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfText;
import org.apache.fop.render.rtf.rtflib.rtfdoc.*;
[ "org.apache.fop" ]
org.apache.fop;
1,450,810
@Test(expected = DoNotRetryIOException.class) public void testLoopedReplication() throws Exception { LOG.info("testLoopedReplication"); startMiniClusters(1); createTableOnClusters(table); addPeer("1", 0, 0); }
@Test(expected = DoNotRetryIOException.class) void function() throws Exception { LOG.info(STR); startMiniClusters(1); createTableOnClusters(table); addPeer("1", 0, 0); }
/** * Tests the replication scenario 0 -> 0. By default * {@link org.apache.hadoop.hbase.replication.regionserver.HBaseInterClusterReplicationEndpoint}, * the replication peer should not be added. */
Tests the replication scenario 0 -> 0. By default <code>org.apache.hadoop.hbase.replication.regionserver.HBaseInterClusterReplicationEndpoint</code>, the replication peer should not be added
testLoopedReplication
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestMasterReplication.java", "license": "apache-2.0", "size": 34164 }
[ "org.apache.hadoop.hbase.DoNotRetryIOException", "org.junit.Test" ]
import org.apache.hadoop.hbase.DoNotRetryIOException; import org.junit.Test;
import org.apache.hadoop.hbase.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
1,744,452
public ITraceManagerListener getListener() { return listener; }
ITraceManagerListener function() { return listener; }
/** * Returns the wrapped listener. * * @return The wrapped listener. */
Returns the wrapped listener
getListener
{ "repo_name": "juneJuly/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/debug/models/trace/ModuleTraceProvider.java", "license": "apache-2.0", "size": 5002 }
[ "com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceManagerListener" ]
import com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceManagerListener;
import com.google.security.zynamics.binnavi.debug.models.trace.interfaces.*;
[ "com.google.security" ]
com.google.security;
2,915,966
public DatabaseOwner getDatabaseOwner() { return m_databaseOwner; }
DatabaseOwner function() { return m_databaseOwner; }
/** * Get the databaseOwner. * @return The databaseOwner. */
Get the databaseOwner
getDatabaseOwner
{ "repo_name": "jbundle/jbundle", "path": "base/base/src/main/java/org/jbundle/base/db/BaseDatabase.java", "license": "gpl-3.0", "size": 31557 }
[ "org.jbundle.model.db.DatabaseOwner" ]
import org.jbundle.model.db.DatabaseOwner;
import org.jbundle.model.db.*;
[ "org.jbundle.model" ]
org.jbundle.model;
281,700
public static int[] decodeModQ(InputStream is, int N, int q) throws IOException { int qBits = 31 - Integer.numberOfLeadingZeros(q); int size = (N*qBits+7) / 8; byte[] arr = ArrayEncoder.readFullLength(is, size); return decodeModQ(arr, N, q); }
static int[] function(InputStream is, int N, int q) throws IOException { int qBits = 31 - Integer.numberOfLeadingZeros(q); int size = (N*qBits+7) / 8; byte[] arr = ArrayEncoder.readFullLength(is, size); return decodeModQ(arr, N, q); }
/** * Decodes data encoded with {@link #encodeModQ(int[], int)} back to an <code>int</code> array.<br/> * <code>N</code> is the number of coefficients. <code>q</code> must be a power of <code>2</code>.<br/> * Ignores any excess bytes. * @param is an encoded ternary polynomial * @param N number ...
Decodes data encoded with <code>#encodeModQ(int[], int)</code> back to an <code>int</code> array. <code>N</code> is the number of coefficients. <code>q</code> must be a power of <code>2</code>. Ignores any excess bytes
decodeModQ
{ "repo_name": "AdrianK7/Communicator-for-Android", "path": "app/src/main/java/com/forstudy/pc/communicator/NTRU/util/ArrayEncoder.java", "license": "gpl-3.0", "size": 14684 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,142,887
if (bbox != null) { setBboxConfiguration(BoundingBox.fromString(bbox)); } }
if (bbox != null) { setBboxConfiguration(BoundingBox.fromString(bbox)); } }
/** * Convenience method. * * @param bbox the bounding box specification in format minLat, minLon, maxLat, maxLon in exactly this order as * degrees */
Convenience method
addBboxConfiguration
{ "repo_name": "muZZkat/mapsforge", "path": "mapsforge-map-writer/src/main/java/org/mapsforge/map/writer/model/MapWriterConfiguration.java", "license": "lgpl-3.0", "size": 15131 }
[ "org.mapsforge.core.model.BoundingBox" ]
import org.mapsforge.core.model.BoundingBox;
import org.mapsforge.core.model.*;
[ "org.mapsforge.core" ]
org.mapsforge.core;
1,791,143
@Override public Adapter createLegendAdapter() { if (legendItemProvider == null) { legendItemProvider = new LegendItemProvider(this); } return legendItemProvider; } protected MarginsItemProvider marginsItemProvider;
Adapter function() { if (legendItemProvider == null) { legendItemProvider = new LegendItemProvider(this); } return legendItemProvider; } protected MarginsItemProvider marginsItemProvider;
/** * This creates an adapter for a {@link com.odcgroup.t24.enquiry.enquiry.Legend}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>com.odcgroup.t24.enquiry.enquiry.Legend</code>.
createLegendAdapter
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/t24/core/com.odcgroup.t24.enquiry.model.edit/src/com/odcgroup/t24/enquiry/enquiry/provider/EnquiryItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 78683 }
[ "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;
311,110
public HttpServerExchange addResponseWrapper(final ConduitWrapper<StreamSinkConduit> wrapper) { ConduitWrapper<StreamSinkConduit>[] wrappers = responseWrappers; if (responseChannel != null) { throw UndertowMessages.MESSAGES.responseChannelAlreadyProvided(); } if(wrappers ...
HttpServerExchange function(final ConduitWrapper<StreamSinkConduit> wrapper) { ConduitWrapper<StreamSinkConduit>[] wrappers = responseWrappers; if (responseChannel != null) { throw UndertowMessages.MESSAGES.responseChannelAlreadyProvided(); } if(wrappers == null) { this.responseWrappers = wrappers = new ConduitWrapper[...
/** * Adds a {@link ConduitWrapper} to the response wrapper chain. * * @param wrapper the wrapper */
Adds a <code>ConduitWrapper</code> to the response wrapper chain
addResponseWrapper
{ "repo_name": "aldaris/undertow", "path": "core/src/main/java/io/undertow/server/HttpServerExchange.java", "license": "apache-2.0", "size": 87777 }
[ "io.undertow.UndertowMessages", "org.xnio.conduits.StreamSinkConduit" ]
import io.undertow.UndertowMessages; import org.xnio.conduits.StreamSinkConduit;
import io.undertow.*; import org.xnio.conduits.*;
[ "io.undertow", "org.xnio.conduits" ]
io.undertow; org.xnio.conduits;
1,288,683
public UserRole[] getAllowedRoles() { return new UserRole[] { UserRole.MANAGER, UserRole.STUDY_PROGRAMME_LEADER, UserRole.ADMINISTRATOR }; }
UserRole[] function() { return new UserRole[] { UserRole.MANAGER, UserRole.STUDY_PROGRAMME_LEADER, UserRole.ADMINISTRATOR }; }
/** * Returns the roles allowed to access this page. * * @return The roles allowed to access this page */
Returns the roles allowed to access this page
getAllowedRoles
{ "repo_name": "otavanopisto/pyramus", "path": "pyramus/src/main/java/fi/otavanopisto/pyramus/views/settings/CreateGradingScaleViewController.java", "license": "gpl-3.0", "size": 1565 }
[ "fi.otavanopisto.pyramus.framework.UserRole" ]
import fi.otavanopisto.pyramus.framework.UserRole;
import fi.otavanopisto.pyramus.framework.*;
[ "fi.otavanopisto.pyramus" ]
fi.otavanopisto.pyramus;
2,180,295
private void mapValsToIDs() { attr_id = new HashMap<String,HashMap<String,String>>(); _remap_ids (attr_id, attr_val); wattr_id = new HashMap<String,HashMap<String,String>>(); _remap_ids (wattr_id, wattr_val); } private class prtRelation implements FeatureNodeCallback { public String outstr; pub...
void function() { attr_id = new HashMap<String,HashMap<String,String>>(); _remap_ids (attr_id, attr_val); wattr_id = new HashMap<String,HashMap<String,String>>(); _remap_ids (wattr_id, wattr_val); } private class prtRelation implements FeatureNodeCallback { public String outstr; public prtRelation() { outstr = ""; }
/** * Map attribute values to ID numbers. This allows for * a straight lookup from the "raw" value, via the * intermediate "pretty-looking" value, to a numeric id. */
Map attribute values to ID numbers. This allows for a straight lookup from the "raw" value, via the intermediate "pretty-looking" value, to a numeric id
mapValsToIDs
{ "repo_name": "keskival/2", "path": "relex/src/java/relex/output/ParseView.java", "license": "gpl-3.0", "size": 18437 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
316,265
@Test(expected = IllegalArgumentException.class) public void swapToTooLargeIndices() { swap(schedule, Swap.<String>create(A, 1, 0, asIntList(1, 8)), 0d); }
@Test(expected = IllegalArgumentException.class) void function() { swap(schedule, Swap.<String>create(A, 1, 0, asIntList(1, 8)), 0d); }
/** * Cannot move A to index 8 (does not exist). */
Cannot move A to index 8 (does not exist)
swapToTooLargeIndices
{ "repo_name": "rinde/RinLog", "path": "src/test/java/com/github/rinde/opt/localsearch/SwapsTest.java", "license": "apache-2.0", "size": 14148 }
[ "com.github.rinde.opt.localsearch.Swaps", "org.junit.Test" ]
import com.github.rinde.opt.localsearch.Swaps; import org.junit.Test;
import com.github.rinde.opt.localsearch.*; import org.junit.*;
[ "com.github.rinde", "org.junit" ]
com.github.rinde; org.junit;
2,785,955
public void importChampions(String path) throws ParserException, IOException, WriteException { logger.log(Level.FINER, "Import data from " + path); IImportParser p = ParserManager.getInstance().getImportParser(); p.parse(path); List<ImportData> datas = p.getImportData(); IWriter writer = ParserManager.getI...
void function(String path) throws ParserException, IOException, WriteException { logger.log(Level.FINER, STR + path); IImportParser p = ParserManager.getInstance().getImportParser(); p.parse(path); List<ImportData> datas = p.getImportData(); IWriter writer = ParserManager.getInstance().getWriter(); for (ImportData data...
/** * imports the champions and infos * * @param path * path to import file * * @throws ParserException * thrown if file couldn't be parsed * @throws IOException * thrown if a file couldn't be read * @throws WriteException * thrown if a file couldn'...
imports the champions and infos
importChampions
{ "repo_name": "cf86/LoLToolKit", "path": "src/main/java/model/MainModel.java", "license": "gpl-3.0", "size": 3207 }
[ "java.io.File", "java.io.IOException", "java.util.List", "java.util.logging.Level" ]
import java.io.File; import java.io.IOException; import java.util.List; import java.util.logging.Level;
import java.io.*; import java.util.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
223,120
public static Date getDelayTimestamp(Stanza packet) { DelayInformation delayInformation = getDelayInformation(packet); if (delayInformation == null) { return null; } return delayInformation.getStamp(); }
static Date function(Stanza packet) { DelayInformation delayInformation = getDelayInformation(packet); if (delayInformation == null) { return null; } return delayInformation.getStamp(); }
/** * Get the Delayed Delivery timestamp or <code>null</code>. * * @param packet TODO javadoc me please * @return the Delayed Delivery timestamp or <code>null</code> */
Get the Delayed Delivery timestamp or <code>null</code>
getDelayTimestamp
{ "repo_name": "igniterealtime/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/delay/DelayInformationManager.java", "license": "apache-2.0", "size": 3656 }
[ "java.util.Date", "org.jivesoftware.smack.packet.Stanza", "org.jivesoftware.smackx.delay.packet.DelayInformation" ]
import java.util.Date; import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smackx.delay.packet.DelayInformation;
import java.util.*; import org.jivesoftware.smack.packet.*; import org.jivesoftware.smackx.delay.packet.*;
[ "java.util", "org.jivesoftware.smack", "org.jivesoftware.smackx" ]
java.util; org.jivesoftware.smack; org.jivesoftware.smackx;
2,396,754
public static CollectionGroup getCollectionGroup() { return (CollectionGroup) getNewComponentInstance(COLLECTION_GROUP); }
static CollectionGroup function() { return (CollectionGroup) getNewComponentInstance(COLLECTION_GROUP); }
/** * Gets the collection group * * @return collection group */
Gets the collection group
getCollectionGroup
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/util/ComponentFactory.java", "license": "apache-2.0", "size": 43761 }
[ "org.kuali.rice.krad.uif.container.CollectionGroup" ]
import org.kuali.rice.krad.uif.container.CollectionGroup;
import org.kuali.rice.krad.uif.container.*;
[ "org.kuali.rice" ]
org.kuali.rice;
329,442
public List<GossipMember> getGossipMembers() { return gossipMembers; }
List<GossipMember> function() { return gossipMembers; }
/** * Get the list with gossip members. * * @return The gossip members. */
Get the list with gossip members
getGossipMembers
{ "repo_name": "edwardcapriolo/gossip", "path": "src/main/java/com/google/code/gossip/StartupSettings.java", "license": "apache-2.0", "size": 6097 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
291,250
public @Nonnull Iterable<MachineImage> searchPublicImages(@Nullable String keyword, @Nullable Platform platform, @Nullable Architecture architecture, @Nullable ImageClass ... imageClasses) throws CloudException, InternalException; /** * Adds or removes sharing for the specified image with the specified ac...
@Nonnull Iterable<MachineImage> function(@Nullable String keyword, @Nullable Platform platform, @Nullable Architecture architecture, @Nullable ImageClass ... imageClasses) throws CloudException, InternalException; /** * Adds or removes sharing for the specified image with the specified account or the public. This metho...
/** * Searches the public machine image library. It will match against the specified parameters. Any null parameter does * not constrain the search. * @param keyword a keyword on which to search * @param platform the platform to match * @param architecture the architecture to match * @para...
Searches the public machine image library. It will match against the specified parameters. Any null parameter does not constrain the search
searchPublicImages
{ "repo_name": "maksimov/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/compute/MachineImageSupport.java", "license": "apache-2.0", "size": 38481 }
[ "javax.annotation.Nonnull", "javax.annotation.Nullable", "org.dasein.cloud.CloudException", "org.dasein.cloud.InternalException", "org.dasein.cloud.OperationNotSupportedException" ]
import javax.annotation.Nonnull; import javax.annotation.Nullable; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException; import org.dasein.cloud.OperationNotSupportedException;
import javax.annotation.*; import org.dasein.cloud.*;
[ "javax.annotation", "org.dasein.cloud" ]
javax.annotation; org.dasein.cloud;
11,094
public void addPropertyChangeListener(PropertyChangeListener listener) { listeners.add(listener); }
void function(PropertyChangeListener listener) { listeners.add(listener); }
/** * Adds the passed listener. ButtonGroups use PropertyChangeListeners to * react to selection changes in the ButtonGroup. * * @param listener * Listener to be added to this group * @since 2.0 */
Adds the passed listener. ButtonGroups use PropertyChangeListeners to react to selection changes in the ButtonGroup
addPropertyChangeListener
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/draw2d/ButtonGroup.java", "license": "epl-1.0", "size": 6503 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
1,762,348
EReference getModel_Entities();
EReference getModel_Entities();
/** * Returns the meta object for the containment reference list '{@link org.example.xbase.entities.entities.Model#getEntities <em>Entities</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Entities</em>'. * @see org.example.xbase....
Returns the meta object for the containment reference list '<code>org.example.xbase.entities.entities.Model#getEntities Entities</code>'.
getModel_Entities
{ "repo_name": "LorenzoBettini/packtpub-xtext-book-examples", "path": "org.example.xbase.entities/src-gen/org/example/xbase/entities/entities/EntitiesPackage.java", "license": "epl-1.0", "size": 18910 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,887,029
private void exitButtonJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitButtonJMenuItemActionPerformed exitProgram(); }//GEN-LAST:event_exitButtonJMenuItemActionPerformed
void function(java.awt.event.ActionEvent evt) { exitProgram(); }
/** * A method to be executed when the user clicks the exit button in the File menu. * @param evt The ActionEvent passed to the method. */
A method to be executed when the user clicks the exit button in the File menu
exitButtonJMenuItemActionPerformed
{ "repo_name": "luigi1015/Lists-Java", "path": "src/net/codehobby/ListApp.java", "license": "mit", "size": 33178 }
[ "java.awt.event.ActionEvent" ]
import java.awt.event.ActionEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,599,099
@RequestMapping(value = "/edit", method = RequestMethod.POST) public String postEdit(@RequestParam("id") Integer personId, @ModelAttribute("personAttribute") Person person) { logger.debug("Received request to edit existing person"); // Assign id person.setId(personId); // Delegate t...
@RequestMapping(value = "/edit", method = RequestMethod.POST) String function(@RequestParam("id") Integer personId, @ModelAttribute(STR) Person person) { logger.debug(STR); person.setId(personId); personService.edit(person); return STR; }
/** * Edits an existing record */
Edits an existing record
postEdit
{ "repo_name": "auntaru/rokya-spring", "path": "spring-hibernate-one-to-many-CreditCards-krams915/src/main/java/org/krams/tutorial/controller/MainController.java", "license": "gpl-2.0", "size": 4245 }
[ "org.krams.tutorial.domain.Person", "org.springframework.web.bind.annotation.ModelAttribute", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframework.web.bind.annotation.RequestParam" ]
import org.krams.tutorial.domain.Person; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam;
import org.krams.tutorial.domain.*; import org.springframework.web.bind.annotation.*;
[ "org.krams.tutorial", "org.springframework.web" ]
org.krams.tutorial; org.springframework.web;
2,598,030
protected RelNode transform(PlannerType plannerType, PlannerPhase phase, RelNode input, RelTraitSet targetTraits, boolean log) { final Stopwatch watch = Stopwatch.createStarted(); final RuleSet rules = config.getRules(phase); final RelTraitSet toTraits = targetTraits.simplify(); final RelNode o...
RelNode function(PlannerType plannerType, PlannerPhase phase, RelNode input, RelTraitSet targetTraits, boolean log) { final Stopwatch watch = Stopwatch.createStarted(); final RuleSet rules = config.getRules(phase); final RelTraitSet toTraits = targetTraits.simplify(); final RelNode output; switch (plannerType) { case H...
/** * Transform RelNode to a new RelNode, targeting the provided set of traits. Also will log the outcome if asked. * * @param plannerType * The type of Planner to use. * @param phase * The transformation phase we're running. * @param input * The origianl RelNode * ...
Transform RelNode to a new RelNode, targeting the provided set of traits. Also will log the outcome if asked
transform
{ "repo_name": "KulykRoman/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/DefaultSqlHandler.java", "license": "apache-2.0", "size": 30876 }
[ "com.google.common.base.Preconditions", "com.google.common.base.Stopwatch", "com.google.common.collect.ImmutableList", "org.apache.calcite.plan.RelOptCostImpl", "org.apache.calcite.plan.RelOptLattice", "org.apache.calcite.plan.RelOptMaterialization", "org.apache.calcite.plan.RelOptPlanner", "org.apach...
import com.google.common.base.Preconditions; import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableList; import org.apache.calcite.plan.RelOptCostImpl; import org.apache.calcite.plan.RelOptLattice; import org.apache.calcite.plan.RelOptMaterialization; import org.apache.calcite.plan.RelOptPl...
import com.google.common.base.*; import com.google.common.collect.*; import org.apache.calcite.plan.*; import org.apache.calcite.plan.hep.*; import org.apache.calcite.plan.volcano.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.metadata.*; import org.apache.calcite.tools.*; import org.apache.drill.exe...
[ "com.google.common", "org.apache.calcite", "org.apache.drill" ]
com.google.common; org.apache.calcite; org.apache.drill;
421,806
@Override public void serviceAdded(ServiceEvent event) { synchronized (this) { ServiceInfo info = event.getInfo(); if ((info != null) && (info.hasData())) { _infos.put(event.getName(), info); } else { Str...
void function(ServiceEvent event) { synchronized (this) { ServiceInfo info = event.getInfo(); if ((info != null) && (info.hasData())) { _infos.put(event.getName(), info); } else { String subtype = (info != null ? info.getSubtype() : ""); info = ((JmDNSImpl) event.getDNS()).resolveServiceInfo(event.getType(), event.getN...
/** * A service has been added. * * @param event * service event */
A service has been added
serviceAdded
{ "repo_name": "BinChengfei/vavi-apps-shairport", "path": "src/javax/jmdns/impl/JmDNSImpl.java", "license": "gpl-2.0", "size": 78867 }
[ "javax.jmdns.ServiceEvent", "javax.jmdns.ServiceInfo" ]
import javax.jmdns.ServiceEvent; import javax.jmdns.ServiceInfo;
import javax.jmdns.*;
[ "javax.jmdns" ]
javax.jmdns;
2,581,792
@Override public double getItemMiddle(Comparable<?> rowKey, Comparable<?> columnKey, CategoryDataset<?, ?> dataset, CategoryAxis axis, Rectangle2D area, RectangleEdge edge) { return axis.getCategorySeriesMiddle(columnKey, rowKey, datase...
double function(Comparable<?> rowKey, Comparable<?> columnKey, CategoryDataset<?, ?> dataset, CategoryAxis axis, Rectangle2D area, RectangleEdge edge) { return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset, this.itemMargin, area, edge); }
/** * Returns the Java2D coordinate for the middle of the specified data item. * * @param rowKey the row key. * @param columnKey the column key. * @param dataset the dataset. * @param axis the axis. * @param area the drawing area. * @param edge the edge along which ...
Returns the Java2D coordinate for the middle of the specified data item
getItemMiddle
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/renderer/category/LevelRenderer.java", "license": "lgpl-2.1", "size": 16108 }
[ "java.awt.geom.Rectangle2D", "org.jfree.chart.api.RectangleEdge", "org.jfree.chart.axis.CategoryAxis", "org.jfree.data.category.CategoryDataset" ]
import java.awt.geom.Rectangle2D; import org.jfree.chart.api.RectangleEdge; import org.jfree.chart.axis.CategoryAxis; import org.jfree.data.category.CategoryDataset;
import java.awt.geom.*; import org.jfree.chart.api.*; import org.jfree.chart.axis.*; import org.jfree.data.category.*;
[ "java.awt", "org.jfree.chart", "org.jfree.data" ]
java.awt; org.jfree.chart; org.jfree.data;
2,218,831
public void testSetup() { JacobObject foo = new JacobObject(); assertNotNull(foo); }
void function() { JacobObject foo = new JacobObject(); assertNotNull(foo); }
/** * this test exists just to test the setup. */
this test exists just to test the setup
testSetup
{ "repo_name": "joval/jacob", "path": "unittest/com/jacob/test/BaseTestCase.java", "license": "lgpl-2.1", "size": 5618 }
[ "com.jacob.com.JacobObject" ]
import com.jacob.com.JacobObject;
import com.jacob.com.*;
[ "com.jacob.com" ]
com.jacob.com;
912,903
@Override public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { RemoveInfo info = (RemoveInfo) o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, info.getObjectId(), bs); return rc + 0; ...
int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { RemoveInfo info = (RemoveInfo) o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, info.getObjectId(), bs); return rc + 0; }
/** * Write the booleans that this object uses to a BooleanStream */
Write the booleans that this object uses to a BooleanStream
tightMarshal1
{ "repo_name": "apache/activemq-openwire", "path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v2/RemoveInfoMarshaller.java", "license": "apache-2.0", "size": 4123 }
[ "java.io.IOException", "org.apache.activemq.openwire.codec.BooleanStream", "org.apache.activemq.openwire.codec.OpenWireFormat", "org.apache.activemq.openwire.commands.RemoveInfo" ]
import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.RemoveInfo;
import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*;
[ "java.io", "org.apache.activemq" ]
java.io; org.apache.activemq;
412,865
@Override public void setTimes(Path p, long mtime, long atime) throws IOException { Map<String, String> params = new HashMap<String, String>(); params.put(OP_PARAM, Operation.SETTIMES.toString()); params.put(MODIFICATION_TIME_PARAM, Long.toString(mtime)); params.put(ACCESS_TIME_PARAM, Long.toString(...
void function(Path p, long mtime, long atime) throws IOException { Map<String, String> params = new HashMap<String, String>(); params.put(OP_PARAM, Operation.SETTIMES.toString()); params.put(MODIFICATION_TIME_PARAM, Long.toString(mtime)); params.put(ACCESS_TIME_PARAM, Long.toString(atime)); HttpURLConnection conn = get...
/** * Set access time of a file * * @param p The path * @param mtime Set the modification time of this file. * The number of milliseconds since Jan 1, 1970. * A value of -1 means that this call should not set modification time. * @param atime Set the access time of this file. * The number of mil...
Set access time of a file
setTimes
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java", "license": "apache-2.0", "size": 57804 }
[ "java.io.IOException", "java.net.HttpURLConnection", "java.util.HashMap", "java.util.Map", "org.apache.hadoop.fs.Path", "org.apache.hadoop.util.HttpExceptionUtils" ]
import java.io.IOException; import java.net.HttpURLConnection; import java.util.HashMap; import java.util.Map; import org.apache.hadoop.fs.Path; import org.apache.hadoop.util.HttpExceptionUtils;
import java.io.*; import java.net.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.util.*;
[ "java.io", "java.net", "java.util", "org.apache.hadoop" ]
java.io; java.net; java.util; org.apache.hadoop;
2,405,443
public void setThumbnailsFieldsFor(List list, int row, int column);
void function(List list, int row, int column);
/** * Sets the thumbnails for all the fields of the specified well. * * @param list The collection of thumbnails. * @param row The row identifying the well. * @param column The column identifying the well. */
Sets the thumbnails for all the fields of the specified well
setThumbnailsFieldsFor
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowser.java", "license": "gpl-2.0", "size": 21708 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,860,559
public Position getFirstPosition(IDocument document, String category) { try { Position[] positions = document.getPositions(category); if (positions.length > 0) { return positions[0]; } } catch (BadPositionCategoryException e) { } return null; }
Position function(IDocument document, String category) { try { Position[] positions = document.getPositions(category); if (positions.length > 0) { return positions[0]; } } catch (BadPositionCategoryException e) { } return null; }
/** * <p> * Returns the first position of a specific category of the given document. * </p> * * @param document the document to get the positions from * @param category the category of the position * * @return a position. If there is none return <code>null</code>. */
Returns the first position of a specific category of the given document.
getFirstPosition
{ "repo_name": "HyVar/DarwinSPL", "path": "plugins/eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui/src-gen/eu/hyvar/context/contextValidity/resource/hyvalidityformula/ui/HyvalidityformulaPositionHelper.java", "license": "apache-2.0", "size": 2680 }
[ "org.eclipse.jface.text.BadPositionCategoryException", "org.eclipse.jface.text.IDocument", "org.eclipse.jface.text.Position" ]
import org.eclipse.jface.text.BadPositionCategoryException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,745,445
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } Diff other = (Diff) obj; if (operation != other.operation) { retu...
boolean function(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } Diff other = (Diff) obj; if (operation != other.operation) { return false; } if (text == null) { if (other.text != null) { return false; } } else if (!text.equals(other...
/** * Is this Diff equivalent to another Diff? * * @param obj Another Diff to compare against. * @return true or false. */
Is this Diff equivalent to another Diff
equals
{ "repo_name": "Cognifide/AET", "path": "core/jobs/src/main/java/com/cognifide/aet/job/common/comparators/source/diff/DiffMatchPatch.java", "license": "apache-2.0", "size": 91233 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
1,144,206
void collectSettingChangesOnApply(@NotNull FusCollectSettingChangesRunConfiguration oldRunConfiguration);
void collectSettingChangesOnApply(@NotNull FusCollectSettingChangesRunConfiguration oldRunConfiguration);
/** * Allows collecting data on changes of Run Configuration settings when they are applied * * @param oldRunConfiguration run configuration without changes * @see SingleConfigurationConfigurable#apply() */
Allows collecting data on changes of Run Configuration settings when they are applied
collectSettingChangesOnApply
{ "repo_name": "jwren/intellij-community", "path": "platform/execution-impl/src/com/intellij/execution/impl/statistics/FusCollectSettingChangesRunConfiguration.java", "license": "apache-2.0", "size": 714 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
765,391
private void fixTime() { try { String[] columns = {COL_DATE}; // Only get the row with mRowId String selection = COL_ID + "=" + mRowId; String sort = COL_DATE + " DESC"; Cursor cursor = getContentResolver().query(mUri, columns, selection, ...
void function() { try { String[] columns = {COL_DATE}; String selection = COL_ID + "=" + mRowId; String sort = COL_DATE + STR; Cursor cursor = getContentResolver().query(mUri, columns, selection, null, sort); int indexDate = cursor.getColumnIndex(COL_DATE); boolean found = cursor.moveToFirst(); if (!found) { cursor.clo...
/** * Gets the current time from the database, prompts the user for a time * offset, and changes the time in the data base unless the user cancels. */
Gets the current time from the database, prompts the user for a time offset, and changes the time in the data base unless the user cancels
fixTime
{ "repo_name": "KennethEvans/Misc", "path": "app/src/main/java/net/kenevans/android/misc/DisplaySMSActivity.java", "license": "mit", "size": 25983 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
2,279,737