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 static int[] safeGetIntArrayExtra(Intent intent, String name) {
try {
return intent.getIntArrayExtra(name);
} catch (Throwable t) {
// Catches un-parceling exceptions.
Log.e(TAG, "getIntArrayExtra failed on intent " + intent);
return null;
... | static int[] function(Intent intent, String name) { try { return intent.getIntArrayExtra(name); } catch (Throwable t) { Log.e(TAG, STR + intent); return null; } } | /**
* Just like {@link Intent#getIntArrayExtra(String)} but doesn't throw exceptions.
*/ | Just like <code>Intent#getIntArrayExtra(String)</code> but doesn't throw exceptions | safeGetIntArrayExtra | {
"repo_name": "chromium/chromium",
"path": "base/android/java/src/org/chromium/base/IntentUtils.java",
"license": "bsd-3-clause",
"size": 22694
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 2,895,111 |
@Test
public void testCheckedExceptionViaExecute() {
TestCircuitBreaker circuitBreaker = new TestCircuitBreaker();
CommandWithCheckedException command = new CommandWithCheckedException(circuitBreaker);
try {
command.execute();
fail("we expect to receive a " + Exce... | void function() { TestCircuitBreaker circuitBreaker = new TestCircuitBreaker(); CommandWithCheckedException command = new CommandWithCheckedException(circuitBreaker); try { command.execute(); fail(STR + Exception.class.getSimpleName()); } catch (Exception e) { assertEquals(STR, e.getCause().getMessage()); } assertEqual... | /**
* Test a checked Exception being thrown
*/ | Test a checked Exception being thrown | testCheckedExceptionViaExecute | {
"repo_name": "daveray/Hystrix",
"path": "hystrix-core/src/test/java/com/netflix/hystrix/HystrixObservableCommandTest.java",
"license": "apache-2.0",
"size": 357869
} | [
"com.netflix.hystrix.HystrixCircuitBreakerTest",
"com.netflix.hystrix.util.HystrixRollingNumberEvent",
"org.junit.Assert"
] | import com.netflix.hystrix.HystrixCircuitBreakerTest; import com.netflix.hystrix.util.HystrixRollingNumberEvent; import org.junit.Assert; | import com.netflix.hystrix.*; import com.netflix.hystrix.util.*; import org.junit.*; | [
"com.netflix.hystrix",
"org.junit"
] | com.netflix.hystrix; org.junit; | 2,004,364 |
List<QualifiedObjectName> listViews(Session session, QualifiedTablePrefix prefix); | List<QualifiedObjectName> listViews(Session session, QualifiedTablePrefix prefix); | /**
* Get the names that match the specified table prefix (never null).
*/ | Get the names that match the specified table prefix (never null) | listViews | {
"repo_name": "Yaliang/presto",
"path": "presto-main/src/main/java/com/facebook/presto/metadata/Metadata.java",
"license": "apache-2.0",
"size": 12623
} | [
"com.facebook.presto.Session",
"java.util.List"
] | import com.facebook.presto.Session; import java.util.List; | import com.facebook.presto.*; import java.util.*; | [
"com.facebook.presto",
"java.util"
] | com.facebook.presto; java.util; | 136,883 |
protected void postProcessEntity( T entity, WebOptions options, Map<String, String> parameters ) throws Exception
{
} | void function( T entity, WebOptions options, Map<String, String> parameters ) throws Exception { } | /**
* Override to process a single entity after it has been retrieved from
* storage and before it is returned to the view. Entity is null-safe.
*/ | Override to process a single entity after it has been retrieved from storage and before it is returned to the view. Entity is null-safe | postProcessEntity | {
"repo_name": "HRHR-project/palestine",
"path": "dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java",
"license": "bsd-3-clause",
"size": 55571
} | [
"java.util.Map",
"org.hisp.dhis.webapi.webdomain.WebOptions"
] | import java.util.Map; import org.hisp.dhis.webapi.webdomain.WebOptions; | import java.util.*; import org.hisp.dhis.webapi.webdomain.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 2,486,034 |
public void writeEntityToNBT(NBTTagCompound tagCompound)
{
super.writeEntityToNBT(tagCompound);
tagCompound.setBoolean("PlayerCreated", this.isPlayerCreated());
} | void function(NBTTagCompound tagCompound) { super.writeEntityToNBT(tagCompound); tagCompound.setBoolean(STR, this.isPlayerCreated()); } | /**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/ | (abstract) Protected helper method to write subclass entity data to NBT | writeEntityToNBT | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/entity/monster/EntityIronGolem.java",
"license": "gpl-3.0",
"size": 12260
} | [
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.nbt.*; | [
"net.minecraft.nbt"
] | net.minecraft.nbt; | 1,709,773 |
void start(int numThreads) throws IOException; | void start(int numThreads) throws IOException; | /**
* Start/Open the procedure store
* @param numThreads number of threads to be used by the procedure store
*/ | Start/Open the procedure store | start | {
"repo_name": "HubSpot/hbase",
"path": "hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/ProcedureStore.java",
"license": "apache-2.0",
"size": 10139
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,286,417 |
public KualiDecimal getDetailTotal() {
return detailTotal;
}
| KualiDecimal function() { return detailTotal; } | /**
* Gets the detailTotal attribute.
*
* @return Returns the detailTotal.
*/ | Gets the detailTotal attribute | getDetailTotal | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/pdp/businessobject/LoadPaymentStatus.java",
"license": "agpl-3.0",
"size": 6177
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,973,685 |
default String singleCommandLineArg(SourcePathResolverAdapter pathResolverAdapter) {
String[] args = new String[1];
appendToCommandLine(
arg -> {
Preconditions.checkState(
args[0] == null, "arg must resolve to exactly one argument: %s", this);
args[0] = arg;
}... | default String singleCommandLineArg(SourcePathResolverAdapter pathResolverAdapter) { String[] args = new String[1]; appendToCommandLine( arg -> { Preconditions.checkState( args[0] == null, STR, this); args[0] = arg; }, pathResolverAdapter); Preconditions.checkState(args[0] != null, STR, this); return args[0]; } | /**
* Resolve this argument to single string, fail if this arg corresponds to none or more than one
* argument.
*/ | Resolve this argument to single string, fail if this arg corresponds to none or more than one argument | singleCommandLineArg | {
"repo_name": "facebook/buck",
"path": "src/com/facebook/buck/rules/args/Arg.java",
"license": "apache-2.0",
"size": 4275
} | [
"com.facebook.buck.core.sourcepath.resolver.SourcePathResolverAdapter",
"com.google.common.base.Preconditions"
] | import com.facebook.buck.core.sourcepath.resolver.SourcePathResolverAdapter; import com.google.common.base.Preconditions; | import com.facebook.buck.core.sourcepath.resolver.*; import com.google.common.base.*; | [
"com.facebook.buck",
"com.google.common"
] | com.facebook.buck; com.google.common; | 587,129 |
public String getQueryString(MultiValueMap<String, String> params) {
if (params.isEmpty()) {
return "";
}
StringBuilder query = new StringBuilder();
Map<String, Object> singles = new HashMap<>();
for (String param : params.keySet()) {
int i = 0;
for (String value : params.get(param)) {
query.a... | String function(MultiValueMap<String, String> params) { if (params.isEmpty()) { return STR&STRSTR\fSTR\fSTR\f\fSTR:STR:STR\fSTR={STR}STR?" + query.toString().substring(1)); return template.expand(singles).toString(); } | /**
* Get url encoded query string. Pay special attention to single parameters with no values
* and parameter names with colon (:) from use of UriTemplate.
* @param params Un-encoded request parameters
* @return
*/ | Get url encoded query string. Pay special attention to single parameters with no values and parameter names with colon (:) from use of UriTemplate | getQueryString | {
"repo_name": "elgohr/spring-cloud-netflix",
"path": "spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ProxyRequestHelper.java",
"license": "apache-2.0",
"size": 9125
} | [
"org.springframework.util.MultiValueMap"
] | import org.springframework.util.MultiValueMap; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 401,545 |
protected synchronized void listen(int count) throws IOException {
socketListen(count);
} | synchronized void function(int count) throws IOException { socketListen(count); } | /**
* Listens, for a specified amount of time, for connections.
* @param count the amount of time to listen for connections
*/ | Listens, for a specified amount of time, for connections | listen | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/libcore/ojluni/src/main/java/java/net/AbstractPlainSocketImpl.java",
"license": "gpl-2.0",
"size": 27012
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,501,255 |
public void setPostTablificationTransformations(List<AccountingLineTableTransformation> postTablificationTransformations) {
this.postTablificationTransformations = postTablificationTransformations;
}
| void function(List<AccountingLineTableTransformation> postTablificationTransformations) { this.postTablificationTransformations = postTablificationTransformations; } | /**
* Sets the postTablificationTransformations attribute value.
*
* @param postTablificationTransformations The
* postTablificationTransformations to set.
*/ | Sets the postTablificationTransformations attribute value | setPostTablificationTransformations | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/sys/document/service/impl/AccountingLineRenderingServiceImpl.java",
"license": "apache-2.0",
"size": 20557
} | [
"java.util.List",
"org.kuali.kfs.sys.document.service.AccountingLineTableTransformation"
] | import java.util.List; import org.kuali.kfs.sys.document.service.AccountingLineTableTransformation; | import java.util.*; import org.kuali.kfs.sys.document.service.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 2,575,672 |
public Color getRichTextAreaBackgroundColor();
| Color function(); | /**
* Gets the background color to use for the Rich Text Area.
*
* @return Color The background color to use for the Rich Text Area
*/ | Gets the background color to use for the Rich Text Area | getRichTextAreaBackgroundColor | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/page/ui/com.odcgroup.page.ui/src/main/java/com/odcgroup/page/ui/figure/FigureConstants.java",
"license": "epl-1.0",
"size": 6931
} | [
"org.eclipse.swt.graphics.Color"
] | import org.eclipse.swt.graphics.Color; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,458,021 |
@Test
public void testBrowseFilterByInvalidRole() {
Map<String, String> params = new HashMap<>();
params.put("role", IdUtil.toString(IdUtil.next()));
Response r = browse(params, getAdminToken());
if (isLimitedByClientCredentials()) {
assertErrorResponse(r, new Invali... | void function() { Map<String, String> params = new HashMap<>(); params.put("role", IdUtil.toString(IdUtil.next())); Response r = browse(params, getAdminToken()); if (isLimitedByClientCredentials()) { assertErrorResponse(r, new InvalidScopeException()); } else { assertErrorResponse(r, new MalformedIdException()); } } | /**
* Ensure that we cannot filter by an invalid application.
*/ | Ensure that we cannot filter by an invalid application | testBrowseFilterByInvalidRole | {
"repo_name": "kangaroo-server/kangaroo",
"path": "kangaroo-server-authz/src/test/java/net/krotscheck/kangaroo/authz/admin/v1/resource/UserServiceBrowseTest.java",
"license": "apache-2.0",
"size": 10801
} | [
"java.util.HashMap",
"java.util.Map",
"javax.ws.rs.core.Response",
"net.krotscheck.kangaroo.authz.oauth2.exception.RFC6749",
"net.krotscheck.kangaroo.common.hibernate.id.IdUtil",
"net.krotscheck.kangaroo.common.hibernate.id.MalformedIdException"
] | import java.util.HashMap; import java.util.Map; import javax.ws.rs.core.Response; import net.krotscheck.kangaroo.authz.oauth2.exception.RFC6749; import net.krotscheck.kangaroo.common.hibernate.id.IdUtil; import net.krotscheck.kangaroo.common.hibernate.id.MalformedIdException; | import java.util.*; import javax.ws.rs.core.*; import net.krotscheck.kangaroo.authz.oauth2.exception.*; import net.krotscheck.kangaroo.common.hibernate.id.*; | [
"java.util",
"javax.ws",
"net.krotscheck.kangaroo"
] | java.util; javax.ws; net.krotscheck.kangaroo; | 2,800,733 |
protected String stripCommentsAndTrim(String line) {
int commentIndex = line.indexOf(GeneralLedgerConstants.Reconciliation.COMMENT_STRING);
if (commentIndex > -1) {
// chop off comments
line = line.substring(0, commentIndex);
}
line = line.trim();
ret... | String function(String line) { int commentIndex = line.indexOf(GeneralLedgerConstants.Reconciliation.COMMENT_STRING); if (commentIndex > -1) { line = line.substring(0, commentIndex); } line = line.trim(); return line; } | /**
* Removes comments and trims whitespace
*
* @param line the line
* @return stripped and trimmed line
*/ | Removes comments and trims whitespace | stripCommentsAndTrim | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/gl/batch/service/impl/ReconciliationParserServiceImpl.java",
"license": "agpl-3.0",
"size": 9245
} | [
"org.kuali.kfs.gl.GeneralLedgerConstants"
] | import org.kuali.kfs.gl.GeneralLedgerConstants; | import org.kuali.kfs.gl.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,324,590 |
try {
if (input == null || input.size() != 2)
return null;
String source = (String) input.get(0);
if (input.get(1) == null)
return source;
Map<String, String> searchReplacementMap = (Map<String, String>) input
.get(1... | try { if (input == null input.size() != 2) return null; String source = (String) input.get(0); if (input.get(1) == null) return source; Map<String, String> searchReplacementMap = (Map<String, String>) input .get(1); if (source == null source.trim().equalsIgnoreCase(STRFailed to process input; error - " + e.getMessage()... | /**
* Method invoked on every tuple during FOREACH evaluation. If source string
* or search replacement map is empty or null, source string is returned.
*
* @param input
* tuple; First field value is the source string and second field
* is a map having search - repla... | Method invoked on every tuple during FOREACH evaluation. If source string or search replacement map is empty or null, source string is returned | exec | {
"repo_name": "ljl1988com/pig",
"path": "contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/string/REPLACE_MULTI.java",
"license": "apache-2.0",
"size": 3825
} | [
"java.util.Map",
"org.apache.pig.PigWarning"
] | import java.util.Map; import org.apache.pig.PigWarning; | import java.util.*; import org.apache.pig.*; | [
"java.util",
"org.apache.pig"
] | java.util; org.apache.pig; | 860,769 |
public java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI> getInput_dots_DotHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI>();
for (Sort elemnt : getInput()) {
if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.... | java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.dots.impl.DotImpl.class)){ retour.ad... | /**
* This accessor return a list of encapsulated subelement, only of DotHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of DotHLAPI kind. WARNING : this method can creates a lot of new object in memory | getInput_dots_DotHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/multisets/hlapi/EmptyHLAPI.java",
"license": "epl-1.0",
"size": 113920
} | [
"fr.lip6.move.pnml.hlpn.terms.Sort",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 1,442,535 |
public int getFileStageInCount() {
if (!this.containsKey(FILESTAGEIN)) {
return 0;
}
Map stageIn = (Map) get(FILESTAGEIN);
int count = 0;
Set set = stageIn.entrySet();
Iterator iter = set.iterator();
while (iter.hasNext()) {
Entry me = (Entry) iter.next();
String target... | int function() { if (!this.containsKey(FILESTAGEIN)) { return 0; } Map stageIn = (Map) get(FILESTAGEIN); int count = 0; Set set = stageIn.entrySet(); Iterator iter = set.iterator(); while (iter.hasNext()) { Entry me = (Entry) iter.next(); String targetKey = me.getKey().toString(); if (targetKey.startsWith(transferPrefi... | /**
* Returns number of files for staging in
* @return int - number of files for staging in
*/ | Returns number of files for staging in | getFileStageInCount | {
"repo_name": "SciGaP/seagrid-rich-client",
"path": "src/main/java/cct/grid/JobDescription.java",
"license": "apache-2.0",
"size": 24235
} | [
"java.util.Iterator",
"java.util.Map",
"java.util.Set"
] | import java.util.Iterator; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 295,394 |
private void setHandshakeFailure(ChannelHandlerContext ctx, Throwable cause) {
// Release all resources such as internal buffers that SSLEngine
// is managing.
engine.closeOutbound();
try {
engine.closeInbound();
} catch (SSLException e) {
// only log... | void function(ChannelHandlerContext ctx, Throwable cause) { engine.closeOutbound(); try { engine.closeInbound(); } catch (SSLException e) { String msg = e.getMessage(); if (msg == null !msg.contains(STR)) { logger.debug(STR, ctx.channel(), e); } } notifyHandshakeFailure(cause); pendingUnencryptedWrites.removeAndFailAll... | /**
* Notify all the handshake futures about the failure during the handshake.
*/ | Notify all the handshake futures about the failure during the handshake | setHandshakeFailure | {
"repo_name": "balaprasanna/netty",
"path": "handler/src/main/java/io/netty/handler/ssl/SslHandler.java",
"license": "apache-2.0",
"size": 56172
} | [
"io.netty.channel.ChannelHandlerContext",
"javax.net.ssl.SSLException"
] | import io.netty.channel.ChannelHandlerContext; import javax.net.ssl.SSLException; | import io.netty.channel.*; import javax.net.ssl.*; | [
"io.netty.channel",
"javax.net"
] | io.netty.channel; javax.net; | 961,552 |
@ApiMethod(
name = "RemoveSessionFromWishlist",
path = "conference/session/{websafeSessionKey}/wishlist",
httpMethod = HttpMethod.DELETE
)
public WrappedBoolean RemoveSessionFromWishlist(final User user,
@Named("websafeSessionKe... | @ApiMethod( name = STR, path = STR, httpMethod = HttpMethod.DELETE ) WrappedBoolean function(final User user, @Named(STR) final String websafeSessionKey) throws UnauthorizedException, NotFoundException, ForbiddenException, ConflictException { if (user == null) { throw new UnauthorizedException(STR); } | /**
* Remove the specified session from the user's wishlist.
*
* @param user An user who invokes this method, null when the user is not signed in.
* @param websafeSessionKey The String representation of the Session Key to remove
* from user's wishlist.
* @return... | Remove the specified session from the user's wishlist | RemoveSessionFromWishlist | {
"repo_name": "DawoonC/dw-scalable",
"path": "src/main/java/com/google/devrel/training/conference/spi/ConferenceApi.java",
"license": "apache-2.0",
"size": 31165
} | [
"com.google.api.server.spi.config.ApiMethod",
"com.google.api.server.spi.response.ConflictException",
"com.google.api.server.spi.response.ForbiddenException",
"com.google.api.server.spi.response.NotFoundException",
"com.google.api.server.spi.response.UnauthorizedException",
"com.google.appengine.api.users... | import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.response.ConflictException; import com.google.api.server.spi.response.ForbiddenException; import com.google.api.server.spi.response.NotFoundException; import com.google.api.server.spi.response.UnauthorizedException; import com.google.ap... | import com.google.api.server.spi.config.*; import com.google.api.server.spi.response.*; import com.google.appengine.api.users.*; import javax.inject.*; | [
"com.google.api",
"com.google.appengine",
"javax.inject"
] | com.google.api; com.google.appengine; javax.inject; | 2,169,951 |
public static TriggerWrapper toTriggerWrapper(OperableTrigger trigger, int state)
{
TriggerWrapper triggerWrapper = new TriggerWrapper();
triggerWrapper.setName(trigger.getKey().getName());
triggerWrapper.setGroup(trigger.getKey().getGroup());
triggerWrapper.setJobName(trigger.getJobKey().getName());
trig... | static TriggerWrapper function(OperableTrigger trigger, int state) { TriggerWrapper triggerWrapper = new TriggerWrapper(); triggerWrapper.setName(trigger.getKey().getName()); triggerWrapper.setGroup(trigger.getKey().getGroup()); triggerWrapper.setJobName(trigger.getJobKey().getName()); triggerWrapper.setJobGroup(trigge... | /**
* Creates a {@link TriggerWrapper} from a real {@link OperableTrigger}.
*
* @param trigger Trigger to create wrapper for.
* @param state The state to use.
* @return Returns the created {@link TriggerWrapper}.
*/ | Creates a <code>TriggerWrapper</code> from a real <code>OperableTrigger</code> | toTriggerWrapper | {
"repo_name": "Viskan/quartz-elasticsearch-jobstore",
"path": "src/main/java/com/viskan/quartz/elasticsearch/utils/TriggerUtils.java",
"license": "apache-2.0",
"size": 5602
} | [
"com.viskan.quartz.elasticsearch.domain.TriggerWrapper",
"org.quartz.impl.triggers.CronTriggerImpl",
"org.quartz.impl.triggers.SimpleTriggerImpl",
"org.quartz.spi.OperableTrigger"
] | import com.viskan.quartz.elasticsearch.domain.TriggerWrapper; import org.quartz.impl.triggers.CronTriggerImpl; import org.quartz.impl.triggers.SimpleTriggerImpl; import org.quartz.spi.OperableTrigger; | import com.viskan.quartz.elasticsearch.domain.*; import org.quartz.impl.triggers.*; import org.quartz.spi.*; | [
"com.viskan.quartz",
"org.quartz.impl",
"org.quartz.spi"
] | com.viskan.quartz; org.quartz.impl; org.quartz.spi; | 2,912,436 |
public void testSetScaleRoundUp() {
String a = "1231212478987482988429808779810457634781384756794987";
String b = "123121247898748298842980877981045763478139";
int aScale = 28;
int newScale = 18;
BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale);
BigDecimal bNumber = aNumber.setSc... | void function() { String a = STR; String b = STR; int aScale = 28; int newScale = 18; BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); BigDecimal bNumber = aNumber.setScale(newScale, BigDecimal.ROUND_UP); assertTrue(STR, bNumber.scale() == newScale); assertTrue(STR, bNumber.unscaledValue().toString().equ... | /**
* Set a new scale.
*/ | Set a new scale | testSetScaleRoundUp | {
"repo_name": "google/j2cl",
"path": "jre/javatests/com/google/gwt/emultest/java/math/BigDecimalScaleOperationsTest.java",
"license": "apache-2.0",
"size": 13490
} | [
"java.math.BigDecimal",
"java.math.BigInteger"
] | import java.math.BigDecimal; import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,503,815 |
protected StringBuffer applyRules(final Calendar calendar, final StringBuffer buf) {
for (final Rule rule : mRules) {
rule.appendTo(buf, calendar);
}
return buf;
} | StringBuffer function(final Calendar calendar, final StringBuffer buf) { for (final Rule rule : mRules) { rule.appendTo(buf, calendar); } return buf; } | /**
* <p>Performs the formatting by applying the rules to the
* specified calendar.</p>
*
* @param calendar the calendar to format
* @param buf the buffer to format into
* @return the specified string buffer
*/ | Performs the formatting by applying the rules to the specified calendar | applyRules | {
"repo_name": "ur0/hermes",
"path": "TMessagesProj/src/main/java/org/hermes/android/time/FastDatePrinter.java",
"license": "gpl-2.0",
"size": 40234
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 553,734 |
public void addPointer(Pointer pointer) {
Debug.info("Adding new pointer \"" + pointer.getPointer() + "\" / " + pointer
.getTimestamp() + " to journal for player " + playerID);
pointers.add(pointer);
generateTexts();
} | void function(Pointer pointer) { Debug.info(STRSTR\STR + pointer .getTimestamp() + STR + playerID); pointers.add(pointer); generateTexts(); } | /**
* Adds pointer to the journal and regenerates the texts
*
* @param pointer
* the pointer to be added
* @param timestamp
* Timestamp object containing the date of aquiring the entry
*/ | Adds pointer to the journal and regenerates the texts | addPointer | {
"repo_name": "fastlockel/BetonQuest",
"path": "src/main/java/pl/betoncraft/betonquest/core/Journal.java",
"license": "gpl-3.0",
"size": 9769
} | [
"pl.betoncraft.betonquest.utils.Debug"
] | import pl.betoncraft.betonquest.utils.Debug; | import pl.betoncraft.betonquest.utils.*; | [
"pl.betoncraft.betonquest"
] | pl.betoncraft.betonquest; | 1,771,696 |
public static String nameByColor(final Color color, final String defaultName) throws NullPointerException {
if (color == null) {
throw new NullPointerException("Color name can't be null or empty");
}
else if (COLOR2NAME.containsKey(color)) {
return COLOR2NAME.get(color);
}
else {
return de... | static String function(final Color color, final String defaultName) throws NullPointerException { if (color == null) { throw new NullPointerException(STR); } else if (COLOR2NAME.containsKey(color)) { return COLOR2NAME.get(color); } else { return defaultName; } } | /**
* <p>Convert {@linkplain Color} instance to it's symbolic name</p>
* @param color color to convert
* @param defaultName default name if color can't be converted
* @return Color name or default name
* @throws NullPointerException if color instance to convert is null
*/ | Convert Color instance to it's symbolic name | nameByColor | {
"repo_name": "chav1961/purelib",
"path": "src/main/java/chav1961/purelib/basic/PureLibSettings.java",
"license": "mit",
"size": 27154
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 224,967 |
public List<VirtualNetworkTapInner> virtualNetworkTaps() {
return this.virtualNetworkTaps;
} | List<VirtualNetworkTapInner> function() { return this.virtualNetworkTaps; } | /**
* Get the virtualNetworkTaps property: The reference to Virtual Network Taps.
*
* @return the virtualNetworkTaps value.
*/ | Get the virtualNetworkTaps property: The reference to Virtual Network Taps | virtualNetworkTaps | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/NetworkInterfaceIpConfigurationInner.java",
"license": "mit",
"size": 15381
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,826,623 |
// properties ==================================================================
public String getScheme() {
return Utils.chkStr(scheme);
} | String function() { return Utils.chkStr(scheme); } | /**
* Gets the scheme.
*
* @return the scheme (trimmed, never null)
*/ | Gets the scheme | getScheme | {
"repo_name": "GeoinformationSystems/GeoprocessingAppstore",
"path": "src/com/esri/gpt/framework/search/DcList.java",
"license": "apache-2.0",
"size": 5285
} | [
"com.esri.gpt.server.csw.client.Utils"
] | import com.esri.gpt.server.csw.client.Utils; | import com.esri.gpt.server.csw.client.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 344,693 |
@Override
public boolean considerAsSame(ISerializableLabelBean serializableLabelBean,
Map<String, Map<Integer, Integer>> matchesMap) {
if (serializableLabelBean==null) {
return false;
}
TAccountBean accountBean = (TAccountBean) serializableLabelBean;
String externalAccountNumber = getAccountNumber();
... | boolean function(ISerializableLabelBean serializableLabelBean, Map<String, Map<Integer, Integer>> matchesMap) { if (serializableLabelBean==null) { return false; } TAccountBean accountBean = (TAccountBean) serializableLabelBean; String externalAccountNumber = getAccountNumber(); String internalAccountNumber = accountBea... | /**
* Whether two label beans are equivalent
* @param serializableLabelBean
* @param matchesMap key: fieldID_paramaterCode
* value: map of already mapped external vs. internal objectIDs
* @return
*/ | Whether two label beans are equivalent | considerAsSame | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/beans/TAccountBean.java",
"license": "gpl-3.0",
"size": 6321
} | [
"com.aurel.track.exchange.track.ExchangeFieldNames",
"java.util.Map"
] | import com.aurel.track.exchange.track.ExchangeFieldNames; import java.util.Map; | import com.aurel.track.exchange.track.*; import java.util.*; | [
"com.aurel.track",
"java.util"
] | com.aurel.track; java.util; | 2,531,726 |
List<Future<?>> future = new ArrayList<>();
future.add(tcpExecutor.submit(tcpHandler));
future.add(udpExecutor.submit(udpHandler));
future.add(connectionWrapperExecutor.submit(connectionWrapper));
future.add(dispatcherExecutor.submit(dispatcher));
final long checkingRateMilliseconds = 1000;
whil... | List<Future<?>> future = new ArrayList<>(); future.add(tcpExecutor.submit(tcpHandler)); future.add(udpExecutor.submit(udpHandler)); future.add(connectionWrapperExecutor.submit(connectionWrapper)); future.add(dispatcherExecutor.submit(dispatcher)); final long checkingRateMilliseconds = 1000; while (state.get()) { try { ... | /**
* Start handling incoming connections.
*
* <p>Network ports are opened, and tasks are passed to executors.
*
* @throws ExecutionException if an exception occurs during execution.
* @throws InterruptedException if the service is interrupted prior to shutdown.
* @throws RejectedExecutionException... | Start handling incoming connections. Network ports are opened, and tasks are passed to executors | call | {
"repo_name": "apetenchea/SpaceInvaders",
"path": "src/main/java/spaceinvaders/server/network/ConnectionManager.java",
"license": "mit",
"size": 5821
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.CancellationException",
"java.util.concurrent.Future"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.CancellationException; import java.util.concurrent.Future; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,728,877 |
public static SecretKey decryptCEK(final RSAPrivateKey priv,
final byte[] encryptedCEK,
final int keyLength)
throws RuntimeException {
try {
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.DECRYPT_MODE, priv);
byt... | static SecretKey function(final RSAPrivateKey priv, final byte[] encryptedCEK, final int keyLength) throws RuntimeException { try { Cipher cipher = Cipher.getInstance(STR); cipher.init(Cipher.DECRYPT_MODE, priv); byte[] secretKeyBytes = cipher.doFinal(encryptedCEK); if (8 * secretKeyBytes.length != keyLength) { throw n... | /**
* Decrypts the specified encrypted Content Encryption Key (CEK).
*
* @param priv The private RSA key. Must not be {@code null}.
* @param encryptedCEK The encrypted Content Encryption Key (CEK) to
* decrypt. Must not be {@code null}.
*
* @return The decrypted Content Encrypt... | Decrypts the specified encrypted Content Encryption Key (CEK) | decryptCEK | {
"repo_name": "raphaelning/resteasy-client-android",
"path": "jaxrs/security/jose-jwt/src/main/java/org/jboss/resteasy/jose/jwe/crypto/RSA1_5.java",
"license": "apache-2.0",
"size": 2644
} | [
"java.security.interfaces.RSAPrivateKey",
"javax.crypto.Cipher",
"javax.crypto.SecretKey",
"javax.crypto.spec.SecretKeySpec"
] | import java.security.interfaces.RSAPrivateKey; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; | import java.security.interfaces.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 1,883,556 |
protected void encryptBlock(byte[] in, int pos, int length) {
byte[] encryptedIn = new byte[blockSize];
byte[] ivBytes = ByteArrayHelper.toByteArray(nonce++, 16);
ParametersWithIV ivParams = new ParametersWithIV(cipherParameters, ivBytes);
aesCipher.init(true, ivParams);
... | void function(byte[] in, int pos, int length) { byte[] encryptedIn = new byte[blockSize]; byte[] ivBytes = ByteArrayHelper.toByteArray(nonce++, 16); ParametersWithIV ivParams = new ParametersWithIV(cipherParameters, ivBytes); aesCipher.init(true, ivParams); int remainingCount = length - pos; if (remainingCount >= block... | /**
* encrypt 16 bytes (AES standard block size) or less
* starting at "pos" within "in" byte[]
*/ | encrypt 16 bytes (AES standard block size) or less starting at "pos" within "in" byte[] | encryptBlock | {
"repo_name": "android-plugin/uexZip",
"path": "src/org/zywx/wbpalmstar/plugin/uexzip/de/idyl/winzipaes/impl/AESEncrypterBC.java",
"license": "lgpl-3.0",
"size": 6054
} | [
"org.bouncycastle.crypto.params.ParametersWithIV"
] | import org.bouncycastle.crypto.params.ParametersWithIV; | import org.bouncycastle.crypto.params.*; | [
"org.bouncycastle.crypto"
] | org.bouncycastle.crypto; | 1,794,472 |
private void writeSlice(ByteBuffer from, ByteBuffer to, int length) {
int oldLimit = from.limit();
from.limit(from.position() + length);
try {
to.put(from);
} finally {
from.limit(oldLimit);
}
} | void function(ByteBuffer from, ByteBuffer to, int length) { int oldLimit = from.limit(); from.limit(from.position() + length); try { to.put(from); } finally { from.limit(oldLimit); } } | /**
* Utility method used by read(ByteBuffer) to partially copy a ByteBuffer into
* another.
*/ | Utility method used by read(ByteBuffer) to partially copy a ByteBuffer into another | writeSlice | {
"repo_name": "ict-carch/hadoop-plus",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReaderLocal.java",
"license": "apache-2.0",
"size": 19056
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,839,941 |
@SuppressWarnings("unchecked")
public void setSpeaker(Speaker speaker) {
if (speaker == null) {
logger.error("Cannot set Speaker 'null'.");
this.speaker = new Speaker();
} else {
this.speaker = speaker;
}
this.loadConferences();
this.initBreadCrump();
} | @SuppressWarnings(STR) void function(Speaker speaker) { if (speaker == null) { logger.error(STR); this.speaker = new Speaker(); } else { this.speaker = speaker; } this.loadConferences(); this.initBreadCrump(); } | /**
* Setter for the displayed speaker entity.
*
* @param speaker
* the speaker to set
*/ | Setter for the displayed speaker entity | setSpeaker | {
"repo_name": "pd-nmoser/Conference",
"path": "com.prodyna.pac.conference/com.prodyna.pac.conference.jsf/com.prodyna.pac.conference.jsf.beans/src/main/java/com/prodyna/pac/conference/jsf/SpeakerBean.java",
"license": "mit",
"size": 4206
} | [
"com.prodyna.pac.conference.ejb.api.datatype.Speaker"
] | import com.prodyna.pac.conference.ejb.api.datatype.Speaker; | import com.prodyna.pac.conference.ejb.api.datatype.*; | [
"com.prodyna.pac"
] | com.prodyna.pac; | 1,710,467 |
private TimeRange getFullDayTimeRangeFromYMD(int year, int month, int day)
{
return timeService.newTimeRange(timeService.newTimeLocal(year, month, day, 0, 0, 0, 0), timeService.newTimeLocal(year,
month, day, 23, 59, 59, 999));
} | TimeRange function(int year, int month, int day) { return timeService.newTimeRange(timeService.newTimeLocal(year, month, day, 0, 0, 0, 0), timeService.newTimeLocal(year, month, day, 23, 59, 59, 999)); } | /**
* Make a full-day time range given a year, month, and day
* @param year
* @param month
* @param day
*/ | Make a full-day time range given a year, month, and day | getFullDayTimeRangeFromYMD | {
"repo_name": "OpenCollabZA/sakai",
"path": "calendar/calendar-impl/impl/src/java/org/sakaiproject/calendar/impl/PDFExportService.java",
"license": "apache-2.0",
"size": 61583
} | [
"org.sakaiproject.time.api.TimeRange"
] | import org.sakaiproject.time.api.TimeRange; | import org.sakaiproject.time.api.*; | [
"org.sakaiproject.time"
] | org.sakaiproject.time; | 2,053,801 |
public static int getDistance(WorldLocation l1, WorldLocation l2) {
return (int) Math.ceil(Math.sqrt(Math.pow(l1.x - l2.x, 2) + Math.pow(l1.y - l2.y, 2)));
}
| static int function(WorldLocation l1, WorldLocation l2) { return (int) Math.ceil(Math.sqrt(Math.pow(l1.x - l2.x, 2) + Math.pow(l1.y - l2.y, 2))); } | /**
* Gets the distance between two locations.
*
* @param l1 The first location to check
* @param l2 The second location to check
*/ | Gets the distance between two locations | getDistance | {
"repo_name": "bendude56/Dungeonman",
"path": "src/main/java/com/bendude56/dungeonman/entity/AIController.java",
"license": "gpl-3.0",
"size": 7556
} | [
"com.bendude56.dungeonman.world.WorldLocation"
] | import com.bendude56.dungeonman.world.WorldLocation; | import com.bendude56.dungeonman.world.*; | [
"com.bendude56.dungeonman"
] | com.bendude56.dungeonman; | 2,001,165 |
@Override
@UiThread
public void send(
@NonNull String channel,
@Nullable ByteBuffer message,
@Nullable BinaryMessenger.BinaryReply callback) {
messenger.send(channel, message, callback);
} | void function( @NonNull String channel, @Nullable ByteBuffer message, @Nullable BinaryMessenger.BinaryReply callback) { messenger.send(channel, message, callback); } | /**
* Sends the given {@code messages} from Android to Dart over the given {@code channel} and then
* has the provided {@code callback} invoked when the Dart side responds.
*
* @param channel the name of the logical channel used for the message.
* @param message the message payload, a direct-al... | Sends the given messages from Android to Dart over the given channel and then has the provided callback invoked when the Dart side responds | send | {
"repo_name": "mikejurka/engine",
"path": "shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java",
"license": "bsd-3-clause",
"size": 13827
} | [
"android.support.annotation.NonNull",
"android.support.annotation.Nullable",
"io.flutter.plugin.common.BinaryMessenger",
"java.nio.ByteBuffer"
] | import android.support.annotation.NonNull; import android.support.annotation.Nullable; import io.flutter.plugin.common.BinaryMessenger; import java.nio.ByteBuffer; | import android.support.annotation.*; import io.flutter.plugin.common.*; import java.nio.*; | [
"android.support",
"io.flutter.plugin",
"java.nio"
] | android.support; io.flutter.plugin; java.nio; | 406,469 |
protected void search() throws IOException, OBStorageException,
OBException, DatabaseException, InstantiationException,
IllegalAccessException {
openIndex();
searchAux();
closeIndex();
} | void function() throws IOException, OBStorageException, OBException, DatabaseException, InstantiationException, IllegalAccessException { openIndex(); searchAux(); closeIndex(); } | /**
* Perform one search for a given k and r.
*
* @throws IOException
* @throws OBStorageException
* @throws OBException
* @throws DatabaseException
* @throws InstantiationException
* @throws IllegalAccessException
*/ | Perform one search for a given k and r | search | {
"repo_name": "amuller/obsearch",
"path": "src/main/java/net/obsearch/index/utils/AbstractCommandLine.java",
"license": "gpl-3.0",
"size": 19160
} | [
"com.sleepycat.je.DatabaseException",
"java.io.IOException",
"net.obsearch.exception.OBException",
"net.obsearch.exception.OBStorageException"
] | import com.sleepycat.je.DatabaseException; import java.io.IOException; import net.obsearch.exception.OBException; import net.obsearch.exception.OBStorageException; | import com.sleepycat.je.*; import java.io.*; import net.obsearch.exception.*; | [
"com.sleepycat.je",
"java.io",
"net.obsearch.exception"
] | com.sleepycat.je; java.io; net.obsearch.exception; | 295,000 |
List<Node> select(Node parent, long input, int count, int type, Predicate<Node> pred); | List<Node> select(Node parent, long input, int count, int type, Predicate<Node> pred); | /**
* Returns a list of nodes that have the matching type and pass the predicate. If the count is
* more than the number of available nodes, an exception is thrown.
*
* @return a list of nodes
*/ | Returns a list of nodes that have the matching type and pass the predicate. If the count is more than the number of available nodes, an exception is thrown | select | {
"repo_name": "jq/libcrunch",
"path": "src/main/java/com/twitter/crunch/PlacementAlgorithm.java",
"license": "apache-2.0",
"size": 1626
} | [
"com.google.common.base.Predicate",
"java.util.List"
] | import com.google.common.base.Predicate; import java.util.List; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 718,958 |
public void loadPackage() {
if (isLoaded)
return;
isLoaded = true;
URL url = getClass().getResource(packageFilename);
if (url == null) {
throw new RuntimeException("Missing serialized package: " + packageFilename);
}
URI uri = URI.createURI(url.toString());
Resource resource = new EcoreResourceF... | void function() { if (isLoaded) return; isLoaded = true; URL url = getClass().getResource(packageFilename); if (url == null) { throw new RuntimeException(STR + packageFilename); } URI uri = URI.createURI(url.toString()); Resource resource = new EcoreResourceFactoryImpl().createResource(uri); try { resource.load(null); ... | /**
* Laods the package and any sub-packages from their serialized form.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Laods the package and any sub-packages from their serialized form. | loadPackage | {
"repo_name": "shenan4321/BIMplatform",
"path": "generated/cn/dlb/bim/models/store/impl/StorePackageImpl.java",
"license": "agpl-3.0",
"size": 163608
} | [
"java.io.IOException",
"org.eclipse.emf.common.util.URI",
"org.eclipse.emf.common.util.WrappedException",
"org.eclipse.emf.ecore.EPackage",
"org.eclipse.emf.ecore.resource.Resource",
"org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl"
] | import java.io.IOException; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.common.util.WrappedException; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl; | import java.io.*; import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.ecore.xmi.impl.*; | [
"java.io",
"org.eclipse.emf"
] | java.io; org.eclipse.emf; | 1,155,611 |
@Test(expected = PropertyNotWritableException.class)
public void testSetValue02() {
StaticFieldELResolver resolver = new StaticFieldELResolver();
ELContext context = new StandardELContext(
ELManager.getExpressionFactory());
resolver.setValue(context, new ELClass(TesterCl... | @Test(expected = PropertyNotWritableException.class) void function() { StaticFieldELResolver resolver = new StaticFieldELResolver(); ELContext context = new StandardELContext( ELManager.getExpressionFactory()); resolver.setValue(context, new ELClass(TesterClass.class), PROPERTY01_NAME, PROPERTY01_VALUE); } | /**
* Tests that cannot write to a static field.
*/ | Tests that cannot write to a static field | testSetValue02 | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.0/TestStaticFieldELResolver.java",
"license": "mit",
"size": 15572
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 500,002 |
@ApiModelProperty(value = "OPTIONAL Number of workflows to return at once. Defaults to 256, and max is 2048.")
public Long getPageSize() {
return pageSize;
} | @ApiModelProperty(value = STR) Long function() { return pageSize; } | /**
* OPTIONAL Number of workflows to return at once. Defaults to 256, and max is 2048.
* @return pageSize
**/ | OPTIONAL Number of workflows to return at once. Defaults to 256, and max is 2048 | getPageSize | {
"repo_name": "Consonance/consonance",
"path": "swagger-ga4gh-client/src/main/java/io/swagger/client/model/Ga4ghWesWorkflowListRequest.java",
"license": "gpl-3.0",
"size": 4016
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,543,687 |
@GET
@PermitAll
@Path("/random/{count}")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Get A Random Number of Masterminds", response = Mastermind.class, responseContainer = "List")
@ApiResponses(value = { @ApiResponse(code = 500, message = "Error Retrieving Data"),
@Ap... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = STR, response = Mastermind.class, responseContainer = "List") @ApiResponses(value = { @ApiResponse(code = 500, message = STR), @ApiResponse(code = 400, message = STR), @ApiResponse(code = 200, message = STR) }) Response getRandomMasterminds(@PathPar... | /**
* Returns a random number of Masterminds.
*
* @param count
* Mastermind count.
*
* @return JSON String
*/ | Returns a random number of Masterminds | getRandomMasterminds | {
"repo_name": "bsaunder/legendary_randomizer",
"path": "src/main/java/net/bryansaunders/legendary/rest/IMastermindEndpoint.java",
"license": "lgpl-3.0",
"size": 4765
} | [
"com.wordnik.swagger.annotations.ApiOperation",
"com.wordnik.swagger.annotations.ApiResponse",
"com.wordnik.swagger.annotations.ApiResponses",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"net.bryansaunders.legendary.... | import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiResponse; import com.wordnik.swagger.annotations.ApiResponses; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import ne... | import com.wordnik.swagger.annotations.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import net.bryansaunders.legendary.model.*; | [
"com.wordnik.swagger",
"javax.ws",
"net.bryansaunders.legendary"
] | com.wordnik.swagger; javax.ws; net.bryansaunders.legendary; | 2,203,318 |
public JSDocInfo build(boolean always) {
if (populated || always) {
checkState(currentInfo != null);
JSDocInfo built = currentInfo;
currentInfo = null;
populateDefaults(built);
populated = false;
return built;
} else {
return null;
}
} | JSDocInfo function(boolean always) { if (populated always) { checkState(currentInfo != null); JSDocInfo built = currentInfo; currentInfo = null; populateDefaults(built); populated = false; return built; } else { return null; } } | /**
* Builds a {@link JSDocInfo} object based on the populated information and
* returns it.
*
* @param always Return an default JSDoc object.
* @return a {@link JSDocInfo} object populated with the values given to this
* builder. If no value was populated and {@code always} is false, returns
*... | Builds a <code>JSDocInfo</code> object based on the populated information and returns it | build | {
"repo_name": "GerHobbelt/closure-compiler",
"path": "src/com/google/javascript/rhino/JSDocInfoBuilder.java",
"license": "apache-2.0",
"size": 39124
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 994,889 |
public static Operation createAppUninstallOperation(MobileApp application) throws UnknownApplicationTypeException {
ProfileOperation operation = new ProfileOperation();
operation.setCode(MDMAppConstants.AndroidConstants.OPCODE_UNINSTALL_APPLICATION);
operation.setType(Operation.Type.PROFILE);
switch (appli... | static Operation function(MobileApp application) throws UnknownApplicationTypeException { ProfileOperation operation = new ProfileOperation(); operation.setCode(MDMAppConstants.AndroidConstants.OPCODE_UNINSTALL_APPLICATION); operation.setType(Operation.Type.PROFILE); switch (application.getType()) { case ENTERPRISE: En... | /**
* This method is used to create Uninstall Authentication operation.
* @param application MobileApp application
* @return operation
*/ | This method is used to create Uninstall Authentication operation | createAppUninstallOperation | {
"repo_name": "Kamidu/carbon-device-mgt",
"path": "components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/util/MDMAndroidOperationUtil.java",
"license": "apache-2.0",
"size": 4514
} | [
"org.wso2.carbon.device.mgt.common.operation.mgt.Operation",
"org.wso2.carbon.device.mgt.core.operation.mgt.ProfileOperation",
"org.wso2.carbon.device.mgt.jaxrs.beans.MobileApp",
"org.wso2.carbon.device.mgt.jaxrs.beans.android.AppStoreApplication",
"org.wso2.carbon.device.mgt.jaxrs.beans.android.EnterpriseA... | import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.core.operation.mgt.ProfileOperation; import org.wso2.carbon.device.mgt.jaxrs.beans.MobileApp; import org.wso2.carbon.device.mgt.jaxrs.beans.android.AppStoreApplication; import org.wso2.carbon.device.mgt.jaxrs.beans.andro... | import org.wso2.carbon.device.mgt.common.operation.mgt.*; import org.wso2.carbon.device.mgt.core.operation.mgt.*; import org.wso2.carbon.device.mgt.jaxrs.beans.*; import org.wso2.carbon.device.mgt.jaxrs.beans.android.*; import org.wso2.carbon.device.mgt.jaxrs.exception.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,401,517 |
@Override
public Response tiersTierLevelTierNameGet(String tierName, String tierLevel, String xWSO2Tenant, String accept,
String ifNoneMatch, String ifModifiedSince) {
String requestedTenantDomain = RestApiUtil.getRequestedTenantDomain(xWSO2Tenant);
try {
if (!RestApiU... | Response function(String tierName, String tierLevel, String xWSO2Tenant, String accept, String ifNoneMatch, String ifModifiedSince) { String requestedTenantDomain = RestApiUtil.getRequestedTenantDomain(xWSO2Tenant); try { if (!RestApiUtil.isTenantAvailable(requestedTenantDomain)) { throw RestApiUtil.buildBadRequestExce... | /** Returns the matched tier to the given name
*
* @param tierLevel tier level (api/application or resource)
* @param tierName name of the tier
* @param accept accepted media type of the client
* @param ifNoneMatch If-None-Match header value
* @param ifModifiedSince If-Modified-Since he... | Returns the matched tier to the given name | tiersTierLevelTierNameGet | {
"repo_name": "rnavagamuwa/custom-carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/java/org/wso2/carbon/apimgt/rest/api/store/impl/TiersApiServiceImpl.java",
"license": "apache-2.0",
"size": 7875
} | [
"java.util.Arrays",
"java.util.Map",
"javax.ws.rs.core.Response",
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.Tier",
"org.wso2.carbon.apimgt.impl.APIConstants",
"org.wso2.carbon.apimgt.impl.utils.APIUtil",
"org.wso2.ca... | import java.util.Arrays; import java.util.Map; import javax.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Tier; import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.apimgt.impl.utils.A... | import java.util.*; import javax.ws.rs.core.*; import org.apache.commons.lang.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.apimgt.rest.api.store.dto.*; import org.wso2.carbon.ap... | [
"java.util",
"javax.ws",
"org.apache.commons",
"org.wso2.carbon"
] | java.util; javax.ws; org.apache.commons; org.wso2.carbon; | 2,532,809 |
SoyFileSet.Builder templates = new SoyFileSet.Builder()
.setCompileTimeGlobals(getGlobalTemplateDataBindings());
for (URL templateResource : getTemplateResources()) {
templates.add(templateResource);
}
return templates.build().compileToTofu();
} | SoyFileSet.Builder templates = new SoyFileSet.Builder() .setCompileTimeGlobals(getGlobalTemplateDataBindings()); for (URL templateResource : getTemplateResources()) { templates.add(templateResource); } return templates.build().compileToTofu(); } | /**
* Compiles all the templates (soy) into objects ready for rendering (tofu).
*
* @return The compiled templates.
* @throws IOException If the templtes cannot be loaded.
*/ | Compiles all the templates (soy) into objects ready for rendering (tofu) | compileTemplates | {
"repo_name": "gwu/soy-template-view",
"path": "src/main/java/com/garrettwu/spring/view/soy/SoyTemplateManager.java",
"license": "apache-2.0",
"size": 1936
} | [
"com.google.template.soy.SoyFileSet"
] | import com.google.template.soy.SoyFileSet; | import com.google.template.soy.*; | [
"com.google.template"
] | com.google.template; | 1,457,017 |
public static String addDescription(Dependency dependency, String description, String source, String key) {
if (dependency.getDescription() == null) {
dependency.setDescription(description);
}
String desc;
if (HTML_DETECTION_PATTERN.matcher(description).find()) {
... | static String function(Dependency dependency, String description, String source, String key) { if (dependency.getDescription() == null) { dependency.setDescription(description); } String desc; if (HTML_DETECTION_PATTERN.matcher(description).find()) { desc = Jsoup.parse(description).text(); } else { desc = description; ... | /**
* Adds a description to the given dependency. If the description contains one of the following strings beyond 100 characters,
* then the description used will be trimmed to that position:
* <ul><li>"such as"</li><li>"like "</li><li>"will use "</li><li>"* uses "</li></ul>
*
* @param dependen... | Adds a description to the given dependency. If the description contains one of the following strings beyond 100 characters, then the description used will be trimmed to that position: "such as""like ""will use ""* uses " | addDescription | {
"repo_name": "sirkkalap/DependencyCheck",
"path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/JarAnalyzer.java",
"license": "apache-2.0",
"size": 51579
} | [
"org.jsoup.Jsoup",
"org.owasp.dependencycheck.dependency.Confidence",
"org.owasp.dependencycheck.dependency.Dependency"
] | import org.jsoup.Jsoup; import org.owasp.dependencycheck.dependency.Confidence; import org.owasp.dependencycheck.dependency.Dependency; | import org.jsoup.*; import org.owasp.dependencycheck.dependency.*; | [
"org.jsoup",
"org.owasp.dependencycheck"
] | org.jsoup; org.owasp.dependencycheck; | 148,578 |
public void populateDocumentData() {
docName = "name" + ZimbraSeleniumProperties.getUniqueString();
docText = "text" + ZimbraSeleniumProperties.getUniqueString();
} | void function() { docName = "name" + ZimbraSeleniumProperties.getUniqueString(); docText = "text" + ZimbraSeleniumProperties.getUniqueString(); } | /**
* Populate DocumentItem data
*
*/ | Populate DocumentItem data | populateDocumentData | {
"repo_name": "nico01f/z-pec",
"path": "ZimbraSelenium/src/java/com/zimbra/qa/selenium/framework/items/DocumentItem.java",
"license": "mit",
"size": 7444
} | [
"com.zimbra.qa.selenium.framework.util.ZimbraSeleniumProperties"
] | import com.zimbra.qa.selenium.framework.util.ZimbraSeleniumProperties; | import com.zimbra.qa.selenium.framework.util.*; | [
"com.zimbra.qa"
] | com.zimbra.qa; | 1,427,054 |
public void setLocale(Locale locale) {
this.locale = locale;
} | void function(Locale locale) { this.locale = locale; } | /**
* Set the Locale that the source provider should use for loading the list.
* This can either be populated programmatically (e.g. with the request locale),
* or via binding (using Locale's toString syntax, e.g. "locale=en_US").
* @param locale the current Locale, or <code>null</code>
*/ | Set the Locale that the source provider should use for loading the list. This can either be populated programmatically (e.g. with the request locale), or via binding (using Locale's toString syntax, e.g. "locale=en_US") | setLocale | {
"repo_name": "mattxia/spring-2.5-analysis",
"path": "src/org/springframework/beans/support/RefreshablePagedListHolder.java",
"license": "apache-2.0",
"size": 5874
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 45,294 |
public String toString() {
DecimalFormat formatter = new DecimalFormat(" 0.000E0; -"); //$NON-NLS-1$
return toString(formatter).replaceAll("E(\\d+)", "E+$1"); //$NON-NLS-1$ //$NON-NLS-2$
} | String function() { DecimalFormat formatter = new DecimalFormat(STR); return toString(formatter).replaceAll(STR, "E+$1"); } | /**
* Return a string representation of this matrix.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<tt> 0.000E0; -</tt>".
*
* @return the string representation
*/ | Return a string representation of this matrix. This method creates a new <code>DecimalFormat</code> on every invocation with the format string " 0.000E0; -" | toString | {
"repo_name": "Tek256/beyond-the-void",
"path": "src/org/joml/Matrix3f.java",
"license": "apache-2.0",
"size": 91235
} | [
"java.text.DecimalFormat"
] | import java.text.DecimalFormat; | import java.text.*; | [
"java.text"
] | java.text; | 947,665 |
StructuredResponse responseText = new StructuredResponse();
MasterClock clock = context.getSim().getMasterClock();
EarthClock earthClock = clock.getEarthClock();
MarsClock marsClock = clock.getMarsClock();
responseText.appendLabelledDigit("Mission Sol", marsClock.getMissionSol());
responseText.appendLabele... | StructuredResponse responseText = new StructuredResponse(); MasterClock clock = context.getSim().getMasterClock(); EarthClock earthClock = clock.getEarthClock(); MarsClock marsClock = clock.getMarsClock(); responseText.appendLabelledDigit(STR, marsClock.getMissionSol()); responseText.appendLabeledString(STR, MarsClockF... | /**
* Output the current simulation date time.
*/ | Output the current simulation date time | execute | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-console/src/main/java/org/mars/sim/console/chat/simcommand/DateCommand.java",
"license": "gpl-3.0",
"size": 2128
} | [
"org.mars.sim.console.chat.ConversationRole",
"org.mars_sim.msp.core.time.EarthClock",
"org.mars_sim.msp.core.time.MarsClock",
"org.mars_sim.msp.core.time.MarsClockFormat",
"org.mars_sim.msp.core.time.MasterClock"
] | import org.mars.sim.console.chat.ConversationRole; import org.mars_sim.msp.core.time.EarthClock; import org.mars_sim.msp.core.time.MarsClock; import org.mars_sim.msp.core.time.MarsClockFormat; import org.mars_sim.msp.core.time.MasterClock; | import org.mars.sim.console.chat.*; import org.mars_sim.msp.core.time.*; | [
"org.mars.sim",
"org.mars_sim.msp"
] | org.mars.sim; org.mars_sim.msp; | 987,993 |
public static void writerGauss(IOFile f, Gaussian g) throws IOException, DiarizationException {
f.writeString(ModelIO.keyGauss);
int dim = g.getDim();
int kind = g.getKind();
f.writeInt(g.getName().hashCode()); // Compatibility with old models
String name = g.getName();
int l = name.length();
f.write... | static void function(IOFile f, Gaussian g) throws IOException, DiarizationException { f.writeString(ModelIO.keyGauss); int dim = g.getDim(); int kind = g.getKind(); f.writeInt(g.getName().hashCode()); String name = g.getName(); int l = name.length(); f.writeInt(l); f.writeString(name); f.writeString(g.getGender()); f.w... | /**
* Writer of Gaussian.
*
* @param f the file
* @param g the gaussian
*
* @throws java.io.IOException Signals that an I/O exception has occurred.
* @throws fr.lium.spkDiarization.lib.DiarizationException the diarization exception
*/ | Writer of Gaussian | writerGauss | {
"repo_name": "ArtemMy/CallRec",
"path": "app/src/main/java/fr/lium/spkDiarization/libModel/ModelIO.java",
"license": "gpl-3.0",
"size": 10484
} | [
"fr.lium.spkDiarization.lib.DiarizationException",
"fr.lium.spkDiarization.lib.IOFile",
"java.io.IOException"
] | import fr.lium.spkDiarization.lib.DiarizationException; import fr.lium.spkDiarization.lib.IOFile; import java.io.IOException; | import fr.lium.*; import java.io.*; | [
"fr.lium",
"java.io"
] | fr.lium; java.io; | 355,558 |
public List<String> getRolesByUser(String token, String user) throws PrincipalAdapterException; | List<String> function(String token, String user) throws PrincipalAdapterException; | /**
* Retrieves a list of roles by user.
*
* @return A repository user.
* @throws RepositoryException If there is any error retrieving the roles list.
*/ | Retrieves a list of roles by user | getRolesByUser | {
"repo_name": "openkm/document-management-system",
"path": "src/main/java/com/openkm/module/AuthModule.java",
"license": "gpl-2.0",
"size": 10459
} | [
"com.openkm.principal.PrincipalAdapterException",
"java.util.List"
] | import com.openkm.principal.PrincipalAdapterException; import java.util.List; | import com.openkm.principal.*; import java.util.*; | [
"com.openkm.principal",
"java.util"
] | com.openkm.principal; java.util; | 2,912,963 |
public void voidAlways() {
// nothing to do
}
}
@Loggable(Loggable.INFO)
private static final class ConstructorValidation {
@SuppressWarnings("PMD.UnusedFormalParameter")
public ConstructorValidation(@NotNull final String first,
@NotNull... | void function() { } } @Loggable(Loggable.INFO) private static final class ConstructorValidation { @SuppressWarnings(STR) public ConstructorValidation(@NotNull final String first, @NotNull final String second) { } public ConstructorValidation(@NotNull final String param) { this(param, "foo"); } } | /**
* Ignores when void.
*/ | Ignores when void | voidAlways | {
"repo_name": "54uso/jcabi-aspects",
"path": "src/test/java/com/jcabi/aspects/JSR303Test.java",
"license": "bsd-3-clause",
"size": 7035
} | [
"javax.validation.constraints.NotNull"
] | import javax.validation.constraints.NotNull; | import javax.validation.constraints.*; | [
"javax.validation"
] | javax.validation; | 1,258,037 |
public void startCDATA(Augmentations augs) throws XNIException {
// REVISIT: what should we do here if schema normalization is on??
fInCDATA = true;
// call handlers
if (fDocumentHandler != null) {
fDocumentHandler.startCDATA(augs);
}
} // startCDATA() | void function(Augmentations augs) throws XNIException { fInCDATA = true; if (fDocumentHandler != null) { fDocumentHandler.startCDATA(augs); } } | /**
* The start of a CDATA section.
*
* @param augs Additional information that may include infoset augmentations
*
* @throws XNIException Thrown by handler to signal an error.
*/ | The start of a CDATA section | startCDATA | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java",
"license": "mit",
"size": 178126
} | [
"com.sun.org.apache.xerces.internal.xni.Augmentations",
"com.sun.org.apache.xerces.internal.xni.XNIException"
] | import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XNIException; | import com.sun.org.apache.xerces.internal.xni.*; | [
"com.sun.org"
] | com.sun.org; | 89,230 |
private void checkIfValidScriptOperation(Instance instance, boolean isBefore,
Operation operation, Map<String, Object> context) {
if (operation != null && operation.isUserOperation()) {
processScript(instance, operation.getUserOperationId(), isBefore, context);
}
} | void function(Instance instance, boolean isBefore, Operation operation, Map<String, Object> context) { if (operation != null && operation.isUserOperation()) { processScript(instance, operation.getUserOperationId(), isBefore, context); } } | /**
* Checks if it is a valid script operation and calls script processing if so.
*
* @param instance
* the instance
* @param isBefore
* true - the before operation execution event, false otherwise.
* @param operation
* the operation
* @param context
* the... | Checks if it is a valid script operation and calls script processing if so | checkIfValidScriptOperation | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/platform/domain-model/instance-core/src/main/java/com/sirma/itt/seip/instance/actions/UserActionObserver.java",
"license": "lgpl-3.0",
"size": 3550
} | [
"com.sirma.itt.seip.domain.instance.Instance",
"com.sirma.itt.seip.instance.state.Operation",
"java.util.Map"
] | import com.sirma.itt.seip.domain.instance.Instance; import com.sirma.itt.seip.instance.state.Operation; import java.util.Map; | import com.sirma.itt.seip.domain.instance.*; import com.sirma.itt.seip.instance.state.*; import java.util.*; | [
"com.sirma.itt",
"java.util"
] | com.sirma.itt; java.util; | 1,851,334 |
public TeamMember getSimpleByMemberId(Integer memberId) {
logger.debug("getSimpleByMemberId - START ");
DetachedCriteria dc = DetachedCriteria.forEntityName(IModelConstant.teamMemberForDeleteEntity);
List<TeamMember> result = null;
dc.add(Restrictions.eq("memberId", memberId));
dc.add(Restrictions... | TeamMember function(Integer memberId) { logger.debug(STR); DetachedCriteria dc = DetachedCriteria.forEntityName(IModelConstant.teamMemberForDeleteEntity); List<TeamMember> result = null; dc.add(Restrictions.eq(STR, memberId)); dc.add(Restrictions.ne(STR, IConstant.NOM_TEAM_MEMBER_STATUS_DELETED)); result = getHibernate... | /**
* Get team member item identified by it's id with id and status if it is not delete
*
* @author Adelina
*
* @param memberId
* @return
*/ | Get team member item identified by it's id with id and status if it is not delete | getSimpleByMemberId | {
"repo_name": "CodeSphere/termitaria",
"path": "TermitariaCM/src/ro/cs/cm/model/dao/impl/DaoTeamMemberImpl.java",
"license": "agpl-3.0",
"size": 21893
} | [
"java.util.List",
"org.hibernate.criterion.DetachedCriteria",
"org.hibernate.criterion.Restrictions",
"ro.cs.cm.common.IConstant",
"ro.cs.cm.common.IModelConstant",
"ro.cs.cm.entity.TeamMember"
] | import java.util.List; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import ro.cs.cm.common.IConstant; import ro.cs.cm.common.IModelConstant; import ro.cs.cm.entity.TeamMember; | import java.util.*; import org.hibernate.criterion.*; import ro.cs.cm.common.*; import ro.cs.cm.entity.*; | [
"java.util",
"org.hibernate.criterion",
"ro.cs.cm"
] | java.util; org.hibernate.criterion; ro.cs.cm; | 1,983,362 |
public java.util.Iterator getEntities() throws GroupsException
{
return getEmptyIterator();
} | java.util.Iterator function() throws GroupsException { return getEmptyIterator(); } | /**
* Default implementation, overridden on EntityGroupImpl.
* @return java.util.Iterator
*/ | Default implementation, overridden on EntityGroupImpl | getEntities | {
"repo_name": "drewwills/uPortal",
"path": "uportal-war/src/main/java/org/jasig/portal/groups/GroupMemberImpl.java",
"license": "apache-2.0",
"size": 10381
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 453,478 |
public boolean isFileTooLarge(File f);
| boolean function(File f); | /**
* Determines if this file is too large to process.
*
* @param f - file to process
* @return true if the file is too large to process.
*/ | Determines if this file is too large to process | isFileTooLarge | {
"repo_name": "nate-rcl/irplus",
"path": "ir_core/src/edu/ur/ir/index/FileTextExtractor.java",
"license": "apache-2.0",
"size": 2360
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,837,410 |
public static JsonArray getJsonArray(JsonObject json, String memberName)
{
if (json.has(memberName))
{
return getJsonArray(json.get(memberName), memberName);
}
else
{
throw new JsonSyntaxException("Missing " + memberName + ", expected to find a Jso... | static JsonArray function(JsonObject json, String memberName) { if (json.has(memberName)) { return getJsonArray(json.get(memberName), memberName); } else { throw new JsonSyntaxException(STR + memberName + STR); } } | /**
* Gets the JsonArray field on the JsonObject with the given name.
*/ | Gets the JsonArray field on the JsonObject with the given name | getJsonArray | {
"repo_name": "TheGreatAndPowerfulWeegee/wipunknown",
"path": "build/tmp/recompileMc/sources/net/minecraft/util/JsonUtils.java",
"license": "gpl-3.0",
"size": 15647
} | [
"com.google.gson.JsonArray",
"com.google.gson.JsonObject",
"com.google.gson.JsonSyntaxException"
] | import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonSyntaxException; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 519,557 |
private void getComputerMove(final String boardString) {
Board board = new Board();
board.setState(boardString);
new GetComputerMoveTask().execute(board);
} | void function(final String boardString) { Board board = new Board(); board.setState(boardString); new GetComputerMoveTask().execute(board); } | /**
* Gets the computer's move, spawning an AsyncTask to make the request.
*
* @param boardString state of the board
*/ | Gets the computer's move, spawning an AsyncTask to make the request | getComputerMove | {
"repo_name": "GDGSerraGauchaOficial/appengine-endpoints-tictactoe-android",
"path": "src/com/google/devrel/samples/ttt/TictactoeActivity.java",
"license": "apache-2.0",
"size": 13431
} | [
"com.google.api.services.tictactoe.model.Board"
] | import com.google.api.services.tictactoe.model.Board; | import com.google.api.services.tictactoe.model.*; | [
"com.google.api"
] | com.google.api; | 1,533,165 |
protected ProxyOAuthRequest createProxyRequest(final String url) {
return new ProxyOAuthRequest(Verb.GET, url, this.connectTimeout, this.readTimeout, this.proxyHost,
this.proxyPort);
} | ProxyOAuthRequest function(final String url) { return new ProxyOAuthRequest(Verb.GET, url, this.connectTimeout, this.readTimeout, this.proxyHost, this.proxyPort); } | /**
* Create a proxy request.
*
* @param url url of the data
* @return a proxy request
*/ | Create a proxy request | createProxyRequest | {
"repo_name": "CRDNicolasBourbaki/pac4j",
"path": "pac4j-oauth/src/main/java/org/pac4j/oauth/client/BaseOAuthClient.java",
"license": "apache-2.0",
"size": 11560
} | [
"org.scribe.model.ProxyOAuthRequest",
"org.scribe.model.Verb"
] | import org.scribe.model.ProxyOAuthRequest; import org.scribe.model.Verb; | import org.scribe.model.*; | [
"org.scribe.model"
] | org.scribe.model; | 1,375,924 |
public void addNonLazyCollection(PersistentCollection collection); | void function(PersistentCollection collection); | /**
* Register a collection for non-lazy loading at the end of the
* two-phase load
*/ | Register a collection for non-lazy loading at the end of the two-phase load | addNonLazyCollection | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/engine/spi/PersistenceContext.java",
"license": "lgpl-2.1",
"size": 31321
} | [
"org.hibernate.collection.spi.PersistentCollection"
] | import org.hibernate.collection.spi.PersistentCollection; | import org.hibernate.collection.spi.*; | [
"org.hibernate.collection"
] | org.hibernate.collection; | 92,561 |
boolean isRegistered(Game game, GameClass gameClass); | boolean isRegistered(Game game, GameClass gameClass); | /**
* Checks if a GameClass is registered.
*
* @param game The game.
* @param gameClass The GameClass.
* @return True if the GameClass is registered, else false.
*/ | Checks if a GameClass is registered | isRegistered | {
"repo_name": "UltimateGames/UltimateGames",
"path": "api/src/main/java/me/ampayne2/ultimategames/api/players/classes/GameClassManager.java",
"license": "lgpl-3.0",
"size": 2910
} | [
"me.ampayne2.ultimategames.api.games.Game"
] | import me.ampayne2.ultimategames.api.games.Game; | import me.ampayne2.ultimategames.api.games.*; | [
"me.ampayne2.ultimategames"
] | me.ampayne2.ultimategames; | 2,147,896 |
protected Chunk checkedReadChunkFromNBT(World p_75822_1_, int p_75822_2_, int p_75822_3_, NBTTagCompound p_75822_4_)
{
Object[] data = this.checkedReadChunkFromNBT__Async(p_75822_1_, p_75822_2_, p_75822_3_, p_75822_4_);
if (data != null)
{
Chunk chunk = (Chunk) data[0];
... | Chunk function(World p_75822_1_, int p_75822_2_, int p_75822_3_, NBTTagCompound p_75822_4_) { Object[] data = this.checkedReadChunkFromNBT__Async(p_75822_1_, p_75822_2_, p_75822_3_, p_75822_4_); if (data != null) { Chunk chunk = (Chunk) data[0]; return chunk; } return null; } | /**
* Wraps readChunkFromNBT. Checks the coordinates and several NBT tags.
*/ | Wraps readChunkFromNBT. Checks the coordinates and several NBT tags | checkedReadChunkFromNBT | {
"repo_name": "CheeseL0ver/Ore-TTM",
"path": "build/tmp/recompSrc/net/minecraft/world/chunk/storage/AnvilChunkLoader.java",
"license": "lgpl-2.1",
"size": 21770
} | [
"net.minecraft.nbt.NBTTagCompound",
"net.minecraft.world.World",
"net.minecraft.world.chunk.Chunk"
] | import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; | import net.minecraft.nbt.*; import net.minecraft.world.*; import net.minecraft.world.chunk.*; | [
"net.minecraft.nbt",
"net.minecraft.world"
] | net.minecraft.nbt; net.minecraft.world; | 1,376,850 |
private RouteResponse getTransitResponse(String routeJson) {
JSONObject jsonObject = new JSONObject(routeJson);
JSONObject firstRoute = jsonObject.getJSONArray("routes").getJSONObject(0);
JSONObject firstLeg = firstRoute.getJSONArray("legs").getJSONObject(0);
RouteR... | RouteResponse function(String routeJson) { JSONObject jsonObject = new JSONObject(routeJson); JSONObject firstRoute = jsonObject.getJSONArray(STR).getJSONObject(0); JSONObject firstLeg = firstRoute.getJSONArray("legs").getJSONObject(0); RouteResponse routeResponse = new RouteResponse(); Route route = new Route(); route... | /**
* Returns RouteResponse object from routeJson.
*
* @param routeJson
* @return
*/ | Returns RouteResponse object from routeJson | getTransitResponse | {
"repo_name": "Kajo0/SPDB",
"path": "server/src/main/java/pl/edu/pw/elka/spdb/servlet/TransitRouteServlet.java",
"license": "mit",
"size": 6032
} | [
"java.sql.Timestamp",
"org.json.JSONObject",
"pl.edu.pw.elka.spdb.route.Route",
"pl.edu.pw.elka.spdb.route.RouteResponse"
] | import java.sql.Timestamp; import org.json.JSONObject; import pl.edu.pw.elka.spdb.route.Route; import pl.edu.pw.elka.spdb.route.RouteResponse; | import java.sql.*; import org.json.*; import pl.edu.pw.elka.spdb.route.*; | [
"java.sql",
"org.json",
"pl.edu.pw"
] | java.sql; org.json; pl.edu.pw; | 1,905,666 |
private static void sendUpdateCommand() {
IServiceLocator serviceLocator = PlatformUI.getWorkbench();
ICommandService commandService = (ICommandService) serviceLocator.getService(ICommandService.class);
try {
Command command = commandService.getCommand(OPI_SHELLS_CHANGED_ID);
... | static void function() { IServiceLocator serviceLocator = PlatformUI.getWorkbench(); ICommandService commandService = (ICommandService) serviceLocator.getService(ICommandService.class); try { Command command = commandService.getCommand(OPI_SHELLS_CHANGED_ID); command.executeWithChecks(new ExecutionEvent()); } catch (Ex... | /**
* Alert whoever is listening that a new OPIShell has been created.
*/ | Alert whoever is listening that a new OPIShell has been created | sendUpdateCommand | {
"repo_name": "ESSICS/cs-studio",
"path": "applications/opibuilder/opibuilder-plugins/org.csstudio.opibuilder.rcp/src/org/csstudio/opibuilder/runmode/OPIShell.java",
"license": "epl-1.0",
"size": 17130
} | [
"java.util.logging.Level",
"org.eclipse.core.commands.Command",
"org.eclipse.core.commands.ExecutionEvent",
"org.eclipse.core.commands.ExecutionException",
"org.eclipse.core.commands.NotEnabledException",
"org.eclipse.core.commands.NotHandledException",
"org.eclipse.core.commands.common.NotDefinedExcept... | import java.util.logging.Level; import org.eclipse.core.commands.Command; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.commands.NotEnabledException; import org.eclipse.core.commands.NotHandledException; import org.eclipse.core.commands.com... | import java.util.logging.*; import org.eclipse.core.commands.*; import org.eclipse.core.commands.common.*; import org.eclipse.ui.*; import org.eclipse.ui.commands.*; import org.eclipse.ui.services.*; | [
"java.util",
"org.eclipse.core",
"org.eclipse.ui"
] | java.util; org.eclipse.core; org.eclipse.ui; | 1,405,303 |
private void stopUpdateThread() {
shutdown = true;
Thread threadToWaitFor = updateThread.getAndSet(null);
if (threadToWaitFor != null) {
threadToWaitFor.interrupt();
Uninterruptibles.joinUninterruptibly(threadToWaitFor);
}
} | void function() { shutdown = true; Thread threadToWaitFor = updateThread.getAndSet(null); if (threadToWaitFor != null) { threadToWaitFor.interrupt(); Uninterruptibles.joinUninterruptibly(threadToWaitFor); } } | /**
* Stop the update thread and wait for it to terminate. As the update thread, which is a separate
* thread, might have to call a synchronized method between being interrupted and terminating, DO
* NOT CALL from a SYNCHRONIZED block, as this will give the opportunity for dead locks.
*/ | Stop the update thread and wait for it to terminate. As the update thread, which is a separate thread, might have to call a synchronized method between being interrupted and terminating, DO NOT CALL from a SYNCHRONIZED block, as this will give the opportunity for dead locks | stopUpdateThread | {
"repo_name": "perezd/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/UiEventHandler.java",
"license": "apache-2.0",
"size": 35685
} | [
"com.google.common.util.concurrent.Uninterruptibles"
] | import com.google.common.util.concurrent.Uninterruptibles; | import com.google.common.util.concurrent.*; | [
"com.google.common"
] | com.google.common; | 253,326 |
public ArrayList<RCDevice> listDevices()
{
//ArrayList<RCDevice> list = new ArrayList<RCDevice>();
return list;
}
/*
public static void setLogLevel(int level)
{
}
public static String getVersion()
{
return "";
} | ArrayList<RCDevice> function() { return list; } /* public static void setLogLevel(int level) { } public static String getVersion() { return ""; } | /**
* Retrieve a list of active Devices
* @return List of Devices
*/ | Retrieve a list of active Devices | listDevices | {
"repo_name": "tdevinda/restcomm-android-sdk",
"path": "restcomm.android.client.sdk/src/main/java/org/mobicents/restcomm/android/client/sdk/RCClient.java",
"license": "agpl-3.0",
"size": 5078
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,627,392 |
public Query addFilter(String filter)
{
if (!StringUtils.isBlank(filter)) {
try {
QueryFilter queryFilter = this.componentManager.getInstance(QueryFilter.class, filter);
addFilter(queryFilter);
} catch (ComponentLookupException e) {
... | Query function(String filter) { if (!StringUtils.isBlank(filter)) { try { QueryFilter queryFilter = this.componentManager.getInstance(QueryFilter.class, filter); addFilter(queryFilter); } catch (ComponentLookupException e) { LOGGER.warn(STR, filter); } } return this; } | /**
* Set a filter in the wrapped query from the filter component hint.
*
* @param filter the hint of the component filter to set in the wrapped query.
* @return this query object.
*/ | Set a filter in the wrapped query from the filter component hint | addFilter | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-query/xwiki-platform-query-manager/src/main/java/org/xwiki/query/internal/ScriptQuery.java",
"license": "lgpl-2.1",
"size": 7548
} | [
"org.apache.commons.lang3.StringUtils",
"org.xwiki.component.manager.ComponentLookupException",
"org.xwiki.query.Query",
"org.xwiki.query.QueryFilter"
] | import org.apache.commons.lang3.StringUtils; import org.xwiki.component.manager.ComponentLookupException; import org.xwiki.query.Query; import org.xwiki.query.QueryFilter; | import org.apache.commons.lang3.*; import org.xwiki.component.manager.*; import org.xwiki.query.*; | [
"org.apache.commons",
"org.xwiki.component",
"org.xwiki.query"
] | org.apache.commons; org.xwiki.component; org.xwiki.query; | 883,593 |
public void setUserPersistence(UserPersistence userPersistence) {
this.userPersistence = userPersistence;
} | void function(UserPersistence userPersistence) { this.userPersistence = userPersistence; } | /**
* Sets the user persistence.
*
* @param userPersistence the user persistence
*/ | Sets the user persistence | setUserPersistence | {
"repo_name": "jdrossl/liferay-tip-of-the-day",
"path": "portlets/tip-of-the-day-portlet/docroot/WEB-INF/src/com/rivetlogic/service/base/TipsOfTheDayUsersServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 15374
} | [
"com.liferay.portal.service.persistence.UserPersistence"
] | import com.liferay.portal.service.persistence.UserPersistence; | import com.liferay.portal.service.persistence.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,847,023 |
public static Bitmap makeRoundUserPicture(Bitmap bitmap) {
if (bitmap == null) return null;
Bitmap output = Bitmap.createBitmap(
bitmap.getWidth(), bitmap.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final Paint paint = new Paint();
fi... | static Bitmap function(Bitmap bitmap) { if (bitmap == null) return null; Bitmap output = Bitmap.createBitmap( bitmap.getWidth(), bitmap.getHeight(), Config.ARGB_8888); Canvas canvas = new Canvas(output); final Paint paint = new Paint(); final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); canvas.dra... | /**
* Converts a square user picture to a round user picture.
* @param bitmap A bitmap to convert.
* @return A rounded picture bitmap.
*/ | Converts a square user picture to a round user picture | makeRoundUserPicture | {
"repo_name": "sgraham/nope",
"path": "chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java",
"license": "bsd-3-clause",
"size": 30485
} | [
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.graphics.Paint",
"android.graphics.PorterDuff",
"android.graphics.PorterDuffXfermode",
"android.graphics.Rect"
] | import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,616,845 |
public void testCertificateEncodingException08() {
CertificateEncodingException tE = new CertificateEncodingException(
null, tCause);
if (tE.getMessage() != null) {
String toS = tCause.toString();
String getM = tE.getMessage();
assertTrue("getMessa... | void function() { CertificateEncodingException tE = new CertificateEncodingException( null, tCause); if (tE.getMessage() != null) { String toS = tCause.toString(); String getM = tE.getMessage(); assertTrue(STR.concat(toS), (getM .indexOf(toS) != -1)); } assertNotNull(STR, tE.getCause()); assertEquals(STR.concat(tCause.... | /**
* Test for <code>CertificateEncodingException(String, Throwable)</code>
* constructor Assertion: constructs CertificateEncodingException when
* <code>cause</code> is not null <code>msg</code> is null
*/ | Test for <code>CertificateEncodingException(String, Throwable)</code> constructor Assertion: constructs CertificateEncodingException when <code>cause</code> is not null <code>msg</code> is null | testCertificateEncodingException08 | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateEncodingExceptionTest.java",
"license": "apache-2.0",
"size": 7754
} | [
"java.security.cert.CertificateEncodingException"
] | import java.security.cert.CertificateEncodingException; | import java.security.cert.*; | [
"java.security"
] | java.security; | 702,299 |
public DirectoryListing getListing(String src, byte[] startAfter)
throws IOException {
if (isPermissionEnabled) {
if (dir.isDir(src)) {
checkPathAccess(src, FsAction.READ_EXECUTE);
}
else {
checkTraverse(src);
}
}
if (auditLog.isInfoEnabled() && isExternalInvocati... | DirectoryListing function(String src, byte[] startAfter) throws IOException { if (isPermissionEnabled) { if (dir.isDir(src)) { checkPathAccess(src, FsAction.READ_EXECUTE); } else { checkTraverse(src); } } if (auditLog.isInfoEnabled() && isExternalInvocation()) { logAuditEvent(UserGroupInformation.getCurrentUser(), Serv... | /**
* Get a partial listing of the indicated directory
*
* @param src the directory name
* @param startAfter the name to start after
* @return a partial listing starting after startAfter
*/ | Get a partial listing of the indicated directory | getListing | {
"repo_name": "zhaobj/MyHadoop",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 214078
} | [
"java.io.IOException",
"org.apache.hadoop.fs.permission.FsAction",
"org.apache.hadoop.hdfs.protocol.DirectoryListing",
"org.apache.hadoop.ipc.Server",
"org.apache.hadoop.security.UserGroupInformation"
] | import java.io.IOException; import org.apache.hadoop.fs.permission.FsAction; import org.apache.hadoop.hdfs.protocol.DirectoryListing; import org.apache.hadoop.ipc.Server; import org.apache.hadoop.security.UserGroupInformation; | import java.io.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,347,977 |
private void connectionLost() {
// Send a failure message back to the Activity
Message msg = mHandler.obtainMessage(Coffee2ohActivity.MESSAGE_TOAST);
Bundle bundle = new Bundle();
bundle.putString(Coffee2ohActivity.TOAST, "Device connection was lost");
msg.setData(bundle... | void function() { Message msg = mHandler.obtainMessage(Coffee2ohActivity.MESSAGE_TOAST); Bundle bundle = new Bundle(); bundle.putString(Coffee2ohActivity.TOAST, STR); msg.setData(bundle); mHandler.sendMessage(msg); BluetoothChatService.this.start(); } private class AcceptThread extends Thread { private final BluetoothS... | /**
* Indicate that the connection was lost and notify the UI Activity.
*/ | Indicate that the connection was lost and notify the UI Activity | connectionLost | {
"repo_name": "hamBank/coffeeRoastAndroid",
"path": "Coffee2oh/src/net/hups/my/BluetoothChatService.java",
"license": "gpl-3.0",
"size": 18571
} | [
"android.bluetooth.BluetoothServerSocket",
"android.os.Bundle",
"android.os.Message",
"android.util.Log",
"java.io.IOException"
] | import android.bluetooth.BluetoothServerSocket; import android.os.Bundle; import android.os.Message; import android.util.Log; import java.io.IOException; | import android.bluetooth.*; import android.os.*; import android.util.*; import java.io.*; | [
"android.bluetooth",
"android.os",
"android.util",
"java.io"
] | android.bluetooth; android.os; android.util; java.io; | 2,627,313 |
@Override
public List<String> deleteAttribute() throws SQLException
{
if (this.entityNameList == null || this.entityNameList.size() == 0)
{
this.entityNameList.add("edu.wustl.catissuecore.domain.Participant");
//Added by geeta : Attribute delete for Edinburgh
final List<String> attributeToDel... | List<String> function() throws SQLException { if (this.entityNameList == null this.entityNameList.size() == 0) { this.entityNameList.add(STR); final List<String> attributeToDelete = new ArrayList<String>(); attributeToDelete.add(STR); attributeToDelete.add(STR); attributeToDelete.add(STR); this.entityAttributesToDelete... | /**
* This method deletes Attribute.
* @throws SQLException SQL Exception.
* @return deleteSQL
*/ | This method deletes Attribute | deleteAttribute | {
"repo_name": "NCIP/catissue-core",
"path": "software/caTissue/modules/core/src/main/java/edu/wustl/catissuecore/querysuite/metadata/DeleteAttributeForEDIN.java",
"license": "bsd-3-clause",
"size": 6639
} | [
"edu.common.dynamicextensions.domaininterface.AttributeInterface",
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List",
"java.util.Set"
] | import edu.common.dynamicextensions.domaininterface.AttributeInterface; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Set; | import edu.common.dynamicextensions.domaininterface.*; import java.sql.*; import java.util.*; | [
"edu.common.dynamicextensions",
"java.sql",
"java.util"
] | edu.common.dynamicextensions; java.sql; java.util; | 1,584,047 |
@Test(timeout = 300000)
public void testHFileReplicationForConfiguredTableCfs() throws Exception {
LOG.info("testHFileReplicationForConfiguredTableCfs");
int numClusters = 2;
Table[] htables = null;
try {
startMiniClusters(numClusters);
createTableOnClusters(table);
htables = getH... | @Test(timeout = 300000) void function() throws Exception { LOG.info(STR); int numClusters = 2; Table[] htables = null; try { startMiniClusters(numClusters); createTableOnClusters(table); htables = getHTablesOnClusters(tableName); addPeer("1", 0, 1, tableName.getNameAsString() + ":" + Bytes.toString(famName)); byte[][][... | /**
* It tests the bulk loaded hfile replication scenario to only explicitly specified table column
* families. It does it by bulk loading a set of HFiles belonging to both the CFs of table and set
* only one CF data to replicate.
*/ | It tests the bulk loaded hfile replication scenario to only explicitly specified table column families. It does it by bulk loading a set of HFiles belonging to both the CFs of table and set only one CF data to replicate | testHFileReplicationForConfiguredTableCfs | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestMasterReplication.java",
"license": "apache-2.0",
"size": 29140
} | [
"org.apache.hadoop.hbase.client.Table",
"org.apache.hadoop.hbase.util.Bytes",
"org.junit.Test"
] | import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.util.Bytes; import org.junit.Test; | import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 1,410,811 |
final FakeStore realStore = new FakeStore(Collections.<String, String>emptyMap());
this.store = spy(realStore);
final Ehcache<String, String> ehcache = this.getEhcache();
try {
ehcache.containsKey(null);
fail();
} catch (NullPointerException e) {
// Expected
}
verifyZeroIntera... | final FakeStore realStore = new FakeStore(Collections.<String, String>emptyMap()); this.store = spy(realStore); final Ehcache<String, String> ehcache = this.getEhcache(); try { ehcache.containsKey(null); fail(); } catch (NullPointerException e) { } verifyZeroInteractions(this.cacheLoaderWriter); verifyZeroInteractions(... | /**
* Tests {@link org.ehcache.Ehcache#containsKey(Object) Ehcache.containsKey} with a {@code null} key.
*/ | Tests <code>org.ehcache.Ehcache#containsKey(Object) Ehcache.containsKey</code> with a null key | testContainsKeyNull | {
"repo_name": "mingyaaaa/ehcache3",
"path": "core/src/test/java/org/ehcache/EhcacheBasicContainsKeyTest.java",
"license": "apache-2.0",
"size": 7312
} | [
"java.util.Collections",
"org.junit.Assert",
"org.mockito.Mockito"
] | import java.util.Collections; import org.junit.Assert; import org.mockito.Mockito; | import java.util.*; import org.junit.*; import org.mockito.*; | [
"java.util",
"org.junit",
"org.mockito"
] | java.util; org.junit; org.mockito; | 513,361 |
public Builder listener(@NonNull OnClickListener listener) {
this.listener = listener;
return this;
} | Builder function(@NonNull OnClickListener listener) { this.listener = listener; return this; } | /**
* Set OnclickListener for BottomSheet
*
* @param listener OnclickListener for BottomSheet
* @return This Builder object to allow for chaining of calls to set methods
*/ | Set OnclickListener for BottomSheet | listener | {
"repo_name": "goblinr/omim",
"path": "android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/BottomSheet.java",
"license": "apache-2.0",
"size": 30635
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 22,829 |
private int filterActivity(ArrayList<Integer> activities) {
Map<Integer, Integer> counterMap = new HashMap<>();
for (Integer activity : activities) {
if (counterMap.containsKey(activity)) {
counterMap.put(activity, counterMap.get(activity) + 1);
} else {
... | int function(ArrayList<Integer> activities) { Map<Integer, Integer> counterMap = new HashMap<>(); for (Integer activity : activities) { if (counterMap.containsKey(activity)) { counterMap.put(activity, counterMap.get(activity) + 1); } else { counterMap.put(activity, 1); } } Log.i(TAG, STR + counterMap); int maxValue = 0... | /**
* This method to filter the activities to provide the confidence level
* @param activities Number of activity instances
* @return activityType activityType Type of the activity
*/ | This method to filter the activities to provide the confidence level | filterActivity | {
"repo_name": "COPELABS-SITI/USENSE",
"path": "app/src/main/java/cs/usense/pipelines/motion/MotionPipeline.java",
"license": "gpl-2.0",
"size": 11451
} | [
"android.util.Log",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.Map"
] | import android.util.Log; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 2,219,984 |
protected void resolveMetadataDynamically(final SamlRegisteredService service, final List<MetadataResolver> metadataResolvers)
throws Exception {
LOGGER.info("Loading metadata dynamically for [{}]", service.getName());
final SamlIdPProperties.Metadata md = casProperties.getAuthn().getSa... | void function(final SamlRegisteredService service, final List<MetadataResolver> metadataResolvers) throws Exception { LOGGER.info(STR, service.getName()); final SamlIdPProperties.Metadata md = casProperties.getAuthn().getSamlIdp().getMetadata(); final FunctionDrivenDynamicHTTPMetadataResolver resolver = new FunctionDri... | /**
* Resolve metadata dynamically.
*
* @param service the service
* @param metadataResolvers the metadata resolvers
* @throws Exception the exception
*/ | Resolve metadata dynamically | resolveMetadataDynamically | {
"repo_name": "creamer/cas",
"path": "support/cas-server-support-saml-idp/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/ChainingMetadataResolverCacheLoader.java",
"license": "apache-2.0",
"size": 19397
} | [
"java.util.List",
"java.util.concurrent.TimeUnit",
"org.apache.commons.lang3.StringUtils",
"org.apache.http.auth.UsernamePasswordCredentials",
"org.apereo.cas.configuration.model.support.saml.idp.SamlIdPProperties",
"org.apereo.cas.support.saml.services.SamlRegisteredService",
"org.opensaml.saml.metadat... | import java.util.List; import java.util.concurrent.TimeUnit; import org.apache.commons.lang3.StringUtils; import org.apache.http.auth.UsernamePasswordCredentials; import org.apereo.cas.configuration.model.support.saml.idp.SamlIdPProperties; import org.apereo.cas.support.saml.services.SamlRegisteredService; import org.o... | import java.util.*; import java.util.concurrent.*; import org.apache.commons.lang3.*; import org.apache.http.auth.*; import org.apereo.cas.configuration.model.support.saml.idp.*; import org.apereo.cas.support.saml.services.*; import org.opensaml.saml.metadata.resolver.*; import org.opensaml.saml.metadata.resolver.impl.... | [
"java.util",
"org.apache.commons",
"org.apache.http",
"org.apereo.cas",
"org.opensaml.saml"
] | java.util; org.apache.commons; org.apache.http; org.apereo.cas; org.opensaml.saml; | 2,578,834 |
protected void load() {
// Validate the existence of our configuration file
File file = new File(pathname);
if (!file.isAbsolute())
file = new File(System.getProperty("catalina.base"), pathname);
if (!file.exists() || !file.canRead()) {
log("Cannot load confi... | void function() { File file = new File(pathname); if (!file.isAbsolute()) file = new File(System.getProperty(STR), pathname); if (!file.exists() !file.canRead()) { log(STR + file.getAbsolutePath()); return; } Digester digester = new Digester(); digester.setValidating(false); digester.addRuleSet(new MemoryRuleSet()); tr... | /**
* Load the contents of our configuration file.
*/ | Load the contents of our configuration file | load | {
"repo_name": "eclipsky/HowTomcatWorks",
"path": "src/org/apache/catalina/realm/JAASMemoryLoginModule.java",
"license": "apache-2.0",
"size": 17679
} | [
"java.io.File",
"org.apache.commons.digester.Digester"
] | import java.io.File; import org.apache.commons.digester.Digester; | import java.io.*; import org.apache.commons.digester.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 744,154 |
public static ARGTrace loadARGTrace(Reader r) throws IOException, Importer.ImportException {
BufferedReader reader = new BufferedReader(r);
ARGTrace trace = new ARGTrace();
dr.evolution.util.TaxonList taxonList = null;
int minState = -1;
int stepSize = 0;
String line;
ARGModel nullARG = new ARGMod... | static ARGTrace function(Reader r) throws IOException, Importer.ImportException { BufferedReader reader = new BufferedReader(r); ARGTrace trace = new ARGTrace(); dr.evolution.util.TaxonList taxonList = null; int minState = -1; int stepSize = 0; String line; ARGModel nullARG = new ARGModel(null, null, 0, 0); ArrayList<S... | /**
* Loads the trace for with trees from a reader
*
* @return the TreeTrace
*/ | Loads the trace for with trees from a reader | loadARGTrace | {
"repo_name": "adamallo/beast-mcmc",
"path": "src/dr/evomodel/arg/ARGTrace.java",
"license": "lgpl-2.1",
"size": 5444
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.Reader",
"java.util.ArrayList",
"java.util.StringTokenizer"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.StringTokenizer; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,848,199 |
public boolean sameAs(RegionVersionVector<T> other) {
//Compare the version version vectors
Map<T, RegionVersionHolder<T>> myMemberToVersion = getMemberToVersion();
Map<T, RegionVersionHolder<T>> otherMemberToVersion = other.getMemberToVersion();
if (!myMemberToVersion.keySet().equals(otherMember... | boolean function(RegionVersionVector<T> other) { Map<T, RegionVersionHolder<T>> myMemberToVersion = getMemberToVersion(); Map<T, RegionVersionHolder<T>> otherMemberToVersion = other.getMemberToVersion(); if (!myMemberToVersion.keySet().equals(otherMemberToVersion.keySet())) { return false; } for (Iterator<T> it = myMem... | /**
* For test purposes, see if two RVVs have seen the same events
* and GC version vectors
* @return true if the RVVs are the same.
*/ | For test purposes, see if two RVVs have seen the same events and GC version vectors | sameAs | {
"repo_name": "ameybarve15/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java",
"license": "apache-2.0",
"size": 54508
} | [
"java.util.Iterator",
"java.util.Map"
] | import java.util.Iterator; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,235,458 |
void refreshStats(long timeout) throws HyracksDataException; | void refreshStats(long timeout) throws HyracksDataException; | /**
* refresh the stats
*
* @param timeout
* @throws HyracksDataException
*/ | refresh the stats | refreshStats | {
"repo_name": "ecarm002/incubator-asterixdb",
"path": "asterixdb/asterix-active/src/main/java/org/apache/asterix/active/IActiveEntityEventsListener.java",
"license": "apache-2.0",
"size": 2949
} | [
"org.apache.hyracks.api.exceptions.HyracksDataException"
] | import org.apache.hyracks.api.exceptions.HyracksDataException; | import org.apache.hyracks.api.exceptions.*; | [
"org.apache.hyracks"
] | org.apache.hyracks; | 74,746 |
static void processServerConfig(final Resource root, final RequiredConfigurationHolder requiredConfigurationHolder, final IgnoredNonAffectedServerGroupsUtil.ServerConfigInfo serverConfig, final ExtensionRegistry extensionRegistry) {
final Set<String> serverGroups = requiredConfigurationHolder.serverGroups;... | static void processServerConfig(final Resource root, final RequiredConfigurationHolder requiredConfigurationHolder, final IgnoredNonAffectedServerGroupsUtil.ServerConfigInfo serverConfig, final ExtensionRegistry extensionRegistry) { final Set<String> serverGroups = requiredConfigurationHolder.serverGroups; final Set<St... | /**
* Determine the relevant pieces of configuration which need to be included when processing the domain model.
*
* @param root the resource root
* @param requiredConfigurationHolder the resolution context
* @param serverConfig the server config
* @param extensi... | Determine the relevant pieces of configuration which need to be included when processing the domain model | processServerConfig | {
"repo_name": "aloubyansky/wildfly-core",
"path": "host-controller/src/main/java/org/jboss/as/domain/controller/operations/ReadMasterDomainModelUtil.java",
"license": "lgpl-2.1",
"size": 23492
} | [
"java.util.Set",
"org.jboss.as.controller.PathElement",
"org.jboss.as.controller.extension.ExtensionRegistry",
"org.jboss.as.controller.registry.Resource",
"org.jboss.as.host.controller.IgnoredNonAffectedServerGroupsUtil",
"org.jboss.dmr.ModelNode"
] | import java.util.Set; import org.jboss.as.controller.PathElement; import org.jboss.as.controller.extension.ExtensionRegistry; import org.jboss.as.controller.registry.Resource; import org.jboss.as.host.controller.IgnoredNonAffectedServerGroupsUtil; import org.jboss.dmr.ModelNode; | import java.util.*; import org.jboss.as.controller.*; import org.jboss.as.controller.extension.*; import org.jboss.as.controller.registry.*; import org.jboss.as.host.controller.*; import org.jboss.dmr.*; | [
"java.util",
"org.jboss.as",
"org.jboss.dmr"
] | java.util; org.jboss.as; org.jboss.dmr; | 741,525 |
public static Map<String, String> findServices(JarFile jarFile, ClassLoader ucl) throws IOException {
Map<String, String> serviceMap = new HashMap<String, String>();
Enumeration<JarEntry> entries = jarFile.entries();
while (entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
if (entry... | static Map<String, String> function(JarFile jarFile, ClassLoader ucl) throws IOException { Map<String, String> serviceMap = new HashMap<String, String>(); Enumeration<JarEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); if (entry.getName().matches(JAR_SERVIC... | /**
* Uses a URLClassLoader to introspect a jar file for defined services. Return
* a map of providers and services.
*
* @param jarFile the jar file to introspect
* @param ucl the URLClassLoader
* @return a map of providers and services
* @throws IOException when an error occurs during introspection
*... | Uses a URLClassLoader to introspect a jar file for defined services. Return a map of providers and services | findServices | {
"repo_name": "deleidos/digitaledge-platform",
"path": "webapp-ingestapi/src/main/java/com/deleidos/rtws/webapp/ingestapi/commons/JarUtil.java",
"license": "apache-2.0",
"size": 19623
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.util.Enumeration",
"java.util.HashMap",
"java.util.Map",
"java.util.jar.JarEntry",
"java.util.jar.JarFile"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import java.util.jar.JarEntry; import java.util.jar.JarFile; | import java.io.*; import java.util.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,174,814 |
int[] generateNumbers(int[] pair) {
// This code shows the usage of assertions to check preconditions and postconditions.
assert pair != null;
assert pair.length == 2;
assert pair[0] > 0 && pair[1] > 0;
int numCount = pair[0];
int range = pair[1];
int... | int[] generateNumbers(int[] pair) { assert pair != null; assert pair.length == 2; assert pair[0] > 0 && pair[1] > 0; int numCount = pair[0]; int range = pair[1]; int[] result = new int[numCount]; for (int i = 0; i < numCount; i++) { result[i] = rnd.nextInt(range) + 1; assert 1 <= result[i] && result[i] <= range; } asse... | /**
* Generates the random numbers.
*
* @param pair the first element is the total number of numbers to produce and the second one
* is the upper range.
* @return an array of random numbers all in the given range.
*/ | Generates the random numbers | generateNumbers | {
"repo_name": "evarga/se-tutorials",
"path": "jta_distributed_transactions/example/src/main/java/rs/exproit/jta_distributed_transactions/RNGService.java",
"license": "mit",
"size": 8958
} | [
"com.atomikos.jms.AtomikosConnectionFactoryBean",
"com.atomikos.jms.extra.MessageDrivenContainer",
"javax.jms.Queue"
] | import com.atomikos.jms.AtomikosConnectionFactoryBean; import com.atomikos.jms.extra.MessageDrivenContainer; import javax.jms.Queue; | import com.atomikos.jms.*; import com.atomikos.jms.extra.*; import javax.jms.*; | [
"com.atomikos.jms",
"javax.jms"
] | com.atomikos.jms; javax.jms; | 1,866,035 |
protected void resetAttribute(SVGItem item) {
} | void function(SVGItem item) { } | /**
* Resets the value of the associated attribute. Does nothing, since
* there is no attribute for an animated value.
*/ | Resets the value of the associated attribute. Does nothing, since there is no attribute for an animated value | resetAttribute | {
"repo_name": "apache/batik",
"path": "batik-anim/src/main/java/org/apache/batik/anim/dom/SVGOMAnimatedPathData.java",
"license": "apache-2.0",
"size": 29318
} | [
"org.apache.batik.dom.svg.SVGItem"
] | import org.apache.batik.dom.svg.SVGItem; | import org.apache.batik.dom.svg.*; | [
"org.apache.batik"
] | org.apache.batik; | 2,801,456 |
public void setUnitAuthorizationService(UnitAuthorizationService unitAuthorizationService) {
this.unitAuthorizationService = unitAuthorizationService;
} | void function(UnitAuthorizationService unitAuthorizationService) { this.unitAuthorizationService = unitAuthorizationService; } | /**
*
* This method inject UnitAuthorizationService
* @param unitAuthorizationService
*/ | This method inject UnitAuthorizationService | setUnitAuthorizationService | {
"repo_name": "vivantech/kc_fixes",
"path": "src/main/java/org/kuali/kra/irb/correspondence/ProtocolCorrespondenceTemplateAuthorizationServiceImpl.java",
"license": "apache-2.0",
"size": 2239
} | [
"org.kuali.kra.service.UnitAuthorizationService"
] | import org.kuali.kra.service.UnitAuthorizationService; | import org.kuali.kra.service.*; | [
"org.kuali.kra"
] | org.kuali.kra; | 2,460,602 |
@Override
public boolean onInterceptTouchEvent(@NonNull RecyclerView rv, @NonNull MotionEvent e) {
if (e.getAction() == MotionEvent.ACTION_DOWN) {
if (isFabOpen) {
animateFAB(isFabOpen);
}
}
return false;
} | boolean function(@NonNull RecyclerView rv, @NonNull MotionEvent e) { if (e.getAction() == MotionEvent.ACTION_DOWN) { if (isFabOpen) { animateFAB(isFabOpen); } } return false; } | /**
* Silently observe and/or take over touch events sent to the RecyclerView before
* they are handled by either the RecyclerView itself or its child views.
*/ | Silently observe and/or take over touch events sent to the RecyclerView before they are handled by either the RecyclerView itself or its child views | onInterceptTouchEvent | {
"repo_name": "nicolas-raoul/apps-android-commons",
"path": "app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListFragment.java",
"license": "apache-2.0",
"size": 14295
} | [
"android.view.MotionEvent",
"androidx.annotation.NonNull",
"androidx.recyclerview.widget.RecyclerView"
] | import android.view.MotionEvent; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; | import android.view.*; import androidx.annotation.*; import androidx.recyclerview.widget.*; | [
"android.view",
"androidx.annotation",
"androidx.recyclerview"
] | android.view; androidx.annotation; androidx.recyclerview; | 455,054 |
private static String readColumnSpecifier(final Reader reader,
final int initialCharacter) {
StringBuilder columnBuilder = new StringBuilder();
// Read the initial character
int cur = initialCharacter;
// Read the column specifier
do {
if (cur == -1 ... | static String function(final Reader reader, final int initialCharacter) { StringBuilder columnBuilder = new StringBuilder(); int cur = initialCharacter; do { if (cur == -1 cur == '{') { throw new IllegalArgumentException( STR); } else if (cur == '}') { break; } else { columnBuilder.append((char) cur); } cur = read(read... | /**
* Reads a column specifier from the given reader with the specified initial
* character.
*
* @param reader
* the reader to read from.
* @param initialCharacter
* the first character inside the column specifier.
* @return the name of the column.
*/ | Reads a column specifier from the given reader with the specified initial character | readColumnSpecifier | {
"repo_name": "adamIqbal/Health",
"path": "health/src/main/java/com/health/output/Output.java",
"license": "mit",
"size": 14136
} | [
"java.io.Reader"
] | import java.io.Reader; | import java.io.*; | [
"java.io"
] | java.io; | 2,105,554 |
protected File getFile(String fileUrl) {
URL contextURL = getGraph().getRuntimeContext().getContextURL();
File file = FileUtils.getJavaFile(contextURL, fileUrl);
return file;
}
| File function(String fileUrl) { URL contextURL = getGraph().getRuntimeContext().getContextURL(); File file = FileUtils.getJavaFile(contextURL, fileUrl); return file; } | /**
* Returns {@link File} for given FileURL.
* @param fileUrl e.g. "data-in/myInput.txt"
* @return {@link File} instance
*/ | Returns <code>File</code> for given FileURL | getFile | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/src/org/jetel/component/AbstractGenericTransform.java",
"license": "lgpl-2.1",
"size": 8097
} | [
"java.io.File",
"org.jetel.util.file.FileUtils"
] | import java.io.File; import org.jetel.util.file.FileUtils; | import java.io.*; import org.jetel.util.file.*; | [
"java.io",
"org.jetel.util"
] | java.io; org.jetel.util; | 812,012 |
GetInfoValue getInfo(GetInfoType getInfoType) throws HiveSQLException; | GetInfoValue getInfo(GetInfoType getInfoType) throws HiveSQLException; | /**
* getInfo operation handler
* @param getInfoType
* @return
* @throws HiveSQLException
*/ | getInfo operation handler | getInfo | {
"repo_name": "BUPTAnderson/apache-hive-2.1.1-src",
"path": "service/src/java/org/apache/hive/service/cli/session/HiveSession.java",
"license": "apache-2.0",
"size": 6281
} | [
"org.apache.hive.service.cli.GetInfoType",
"org.apache.hive.service.cli.GetInfoValue",
"org.apache.hive.service.cli.HiveSQLException"
] | import org.apache.hive.service.cli.GetInfoType; import org.apache.hive.service.cli.GetInfoValue; import org.apache.hive.service.cli.HiveSQLException; | import org.apache.hive.service.cli.*; | [
"org.apache.hive"
] | org.apache.hive; | 2,883,440 |
@Schema(example = "1", description = "Required Clickwrap id")
public Integer getClickwrapId() {
return clickwrapId;
} | @Schema(example = "1", description = STR) Integer function() { return clickwrapId; } | /**
* Required Clickwrap id
* @return clickwrapId
**/ | Required Clickwrap id | getClickwrapId | {
"repo_name": "iterate-ch/cyberduck",
"path": "brick/src/main/java/ch/cyberduck/core/brick/io/swagger/client/model/StatusEntity.java",
"license": "gpl-3.0",
"size": 5701
} | [
"io.swagger.v3.oas.annotations.media.Schema"
] | import io.swagger.v3.oas.annotations.media.Schema; | import io.swagger.v3.oas.annotations.media.*; | [
"io.swagger.v3"
] | io.swagger.v3; | 434,803 |
private GitUri buildProjectUri(final String username,
final String path) {
final Matcher pathMatcher = GITHUB_PAGES_PATH_PATTERN.matcher(path);
pathMatcher.matches();
final String resource = pathMatcher.group(2);
return new GitUri("ssh://git@github.com/" + username + "/" + p... | GitUri function(final String username, final String path) { final Matcher pathMatcher = GITHUB_PAGES_PATH_PATTERN.matcher(path); pathMatcher.matches(); final String resource = pathMatcher.group(2); return new GitUri("ssh: resource); } | /**
* Builds the project Github URI.
*
* @param username
* user name
* @param path
* path
* @return URI
*/ | Builds the project Github URI | buildProjectUri | {
"repo_name": "hazendaz/wagon-git",
"path": "src/main/java/net/trajano/wagon/git/GitHubPagesWagon.java",
"license": "epl-1.0",
"size": 6329
} | [
"java.util.regex.Matcher",
"net.trajano.wagon.git.internal.GitUri"
] | import java.util.regex.Matcher; import net.trajano.wagon.git.internal.GitUri; | import java.util.regex.*; import net.trajano.wagon.git.internal.*; | [
"java.util",
"net.trajano.wagon"
] | java.util; net.trajano.wagon; | 2,321,413 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String workspaceName, String sqlPoolName, String workloadGroupName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String workspaceName, String sqlPoolName, String workloadGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getS... | /**
* Remove Sql pool's workload group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param sqlPoolName SQL pool name.
* @param workloadGroupName The name of the workload group.
* @param ... | Remove Sql pool's workload group | deleteWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadGroupsClientImpl.java",
"license": "mit",
"size": 60806
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"java.nio.ByteBuffer"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import java.nio.ByteBuffer; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*; | [
"com.azure.core",
"java.nio"
] | com.azure.core; java.nio; | 30,506 |
public String getIdentifier()
{
return ID3v24Frames.FRAME_ID_GROUP_ID_REG;
} | String function() { return ID3v24Frames.FRAME_ID_GROUP_ID_REG; } | /**
* The ID3v2 frame identifier
*
* @return the ID3v2 frame identifier for this frame type
*/ | The ID3v2 frame identifier | getIdentifier | {
"repo_name": "Talckrer/BlocksForUse",
"path": "org/jaudiotagger/tag/id3/framebody/FrameBodyGRID.java",
"license": "gpl-2.0",
"size": 5534
} | [
"org.jaudiotagger.tag.id3.ID3v24Frames"
] | import org.jaudiotagger.tag.id3.ID3v24Frames; | import org.jaudiotagger.tag.id3.*; | [
"org.jaudiotagger.tag"
] | org.jaudiotagger.tag; | 2,597,686 |
EClass getMappableElement(); | EClass getMappableElement(); | /**
* Returns the meta object for class '{@link ca.mcgill.cs.sel.ram.MappableElement <em>Mappable Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Mappable Element</em>'.
* @see ca.mcgill.cs.sel.ram.MappableElement
* @generated
*/ | Returns the meta object for class '<code>ca.mcgill.cs.sel.ram.MappableElement Mappable Element</code>'. | getMappableElement | {
"repo_name": "mjorod/textram",
"path": "tool/ca.mcgill.sel.ram/src/ca/mcgill/cs/sel/ram/RamPackage.java",
"license": "mit",
"size": 271132
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,065,258 |
catalogs.clear();
if (databaseMetaData != null) {
final ResultSet rs = databaseMetaData.getCatalogs();
try {
while (rs.next()) {
try {
catalogs.add(new CatalogTreeNode(rs.getString(1)));
} catch (final SQLExc... | catalogs.clear(); if (databaseMetaData != null) { final ResultSet rs = databaseMetaData.getCatalogs(); try { while (rs.next()) { try { catalogs.add(new CatalogTreeNode(rs.getString(1))); } catch (final SQLException e) { System.err.println(e); } } } finally { rs.close(); } } fireTreeStructureChanged(); } | /** Refresh the data of this model from the database.
* @throws SQLException in case of database problems
*/ | Refresh the data of this model from the database | refresh | {
"repo_name": "christianhujer/japi",
"path": "historic2/src/prj/net/sf/japi/sql/DatabaseTreeModel.java",
"license": "lgpl-3.0",
"size": 8311
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,462,941 |
public FenceTopBlock getFenceTopBlock() {
return Refs.ItemsBlocks.FenceTop;
} | FenceTopBlock function() { return Refs.ItemsBlocks.FenceTop; } | /**
* Return the fence top block.
* @return The fence top block.
*/ | Return the fence top block | getFenceTopBlock | {
"repo_name": "tyrope/fencing",
"path": "src/main/java/nl/tyrope/fencing/blocks/FenceBlock.java",
"license": "gpl-3.0",
"size": 11300
} | [
"nl.tyrope.fencing.Refs"
] | import nl.tyrope.fencing.Refs; | import nl.tyrope.fencing.*; | [
"nl.tyrope.fencing"
] | nl.tyrope.fencing; | 2,145,289 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.