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
private ModelNode createSubsystemRoot() { ModelNode subsystemAddress = new ModelNode(); subsystemAddress.add(ModelDescriptionConstants.SUBSYSTEM, IDMExtension.SUBSYSTEM_NAME); subsystemAddress.protect(); return Util.getEmptyOperation(ADD, subsystemAddress); }
ModelNode function() { ModelNode subsystemAddress = new ModelNode(); subsystemAddress.add(ModelDescriptionConstants.SUBSYSTEM, IDMExtension.SUBSYSTEM_NAME); subsystemAddress.protect(); return Util.getEmptyOperation(ADD, subsystemAddress); }
/** * Creates the root subsystem's root address. * * @return */
Creates the root subsystem's root address
createSubsystemRoot
{ "repo_name": "arcivanov/wildfly8-picketlink", "path": "subsystem/src/main/java/org/wildfly/extension/picketlink/idm/model/parser/AbstractIDMSubsystemReader.java", "license": "lgpl-2.1", "size": 19426 }
[ "org.jboss.as.controller.descriptions.ModelDescriptionConstants", "org.jboss.as.controller.operations.common.Util", "org.jboss.dmr.ModelNode", "org.wildfly.extension.picketlink.idm.IDMExtension" ]
import org.jboss.as.controller.descriptions.ModelDescriptionConstants; import org.jboss.as.controller.operations.common.Util; import org.jboss.dmr.ModelNode; import org.wildfly.extension.picketlink.idm.IDMExtension;
import org.jboss.as.controller.descriptions.*; import org.jboss.as.controller.operations.common.*; import org.jboss.dmr.*; import org.wildfly.extension.picketlink.idm.*;
[ "org.jboss.as", "org.jboss.dmr", "org.wildfly.extension" ]
org.jboss.as; org.jboss.dmr; org.wildfly.extension;
304,661
@FIXVersion(introduced="5.0SP1") @TagNumRef(tagNum=TagNum.UnderlyingLegSymbolSfx) public String getUnderlyingLegSymbolSfx() { return underlyingLegSymbolSfx; }
@FIXVersion(introduced=STR) @TagNumRef(tagNum=TagNum.UnderlyingLegSymbolSfx) String function() { return underlyingLegSymbolSfx; }
/** * Message field getter. * @return field value */
Message field getter
getUnderlyingLegSymbolSfx
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/UnderlyingLegInstrument.java", "license": "gpl-3.0", "size": 27982 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,046,772
public static void sendTempFile(String filename, HttpServletResponse response) throws IOException { File file = new File(System.getProperty("java.io.tmpdir"), filename); ServletUtilities.sendTempFile(file, response); }
static void function(String filename, HttpServletResponse response) throws IOException { File file = new File(System.getProperty(STR), filename); ServletUtilities.sendTempFile(file, response); }
/** * Binary streams the specified file in the temporary directory to the * HTTP response in 1KB chunks. * * @param filename the name of the file in the temporary directory. * @param response the HTTP response object. * * @throws IOException if there is an I/O problem. ...
Binary streams the specified file in the temporary directory to the HTTP response in 1KB chunks
sendTempFile
{ "repo_name": "GitoMat/jfreechart", "path": "src/main/java/org/jfree/chart/servlet/ServletUtilities.java", "license": "lgpl-2.1", "size": 17116 }
[ "java.io.File", "java.io.IOException", "javax.servlet.http.HttpServletResponse" ]
import java.io.File; import java.io.IOException; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,240,630
public static Optional<String> imports(Configurer configurer) { Check.notNull(configurer); return imports(configurer.getRoot()); }
static Optional<String> function(Configurer configurer) { Check.notNull(configurer); return imports(configurer.getRoot()); }
/** * Create the data from configurer. * * @param configurer The configurer reference (must not be <code>null</code>). * @return The data. * @throws LionEngineException If unable to read node. */
Create the data from configurer
imports
{ "repo_name": "b3dgs/lionengine", "path": "lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/state/StateConfig.java", "license": "gpl-3.0", "size": 2861 }
[ "com.b3dgs.lionengine.Check", "com.b3dgs.lionengine.game.Configurer", "java.util.Optional" ]
import com.b3dgs.lionengine.Check; import com.b3dgs.lionengine.game.Configurer; import java.util.Optional;
import com.b3dgs.lionengine.*; import com.b3dgs.lionengine.game.*; import java.util.*;
[ "com.b3dgs.lionengine", "java.util" ]
com.b3dgs.lionengine; java.util;
263,926
protected void doStartPrefixMapping(String prefix, String uri) throws SAXException { }
void function(String prefix, String uri) throws SAXException { }
/** * By default do nothing. * * @param prefix String * @param uri String * @throws SAXException API told me so */
By default do nothing
doStartPrefixMapping
{ "repo_name": "apache/ant-ivy", "path": "src/java/org/apache/ivy/osgi/util/DelegatingHandler.java", "license": "apache-2.0", "size": 21219 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
269,639
public SimpleBinaryTypes getDataType() { if (datatype.equals("byte")) { return SimpleBinaryTypes.BYTE; } if (datatype.equals("word")) { return SimpleBinaryTypes.WORD; } if (datatype.equals("dword")) { ret...
SimpleBinaryTypes function() { if (datatype.equals("byte")) { return SimpleBinaryTypes.BYTE; } if (datatype.equals("word")) { return SimpleBinaryTypes.WORD; } if (datatype.equals("dword")) { return SimpleBinaryTypes.DWORD; } if (datatype.equals("float")) { return SimpleBinaryTypes.FLOAT; } if (datatype.equals("hsb")) {...
/** * Return item data type * * @return */
Return item data type
getDataType
{ "repo_name": "docbender/openhab", "path": "bundles/binding/org.openhab.binding.simplebinary/src/main/java/org/openhab/binding/simplebinary/internal/SimpleBinaryGenericBindingProvider.java", "license": "epl-1.0", "size": 19254 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,344,761
public static PGPPublicKey removeCertification( PGPPublicKey key, String id, PGPSignature certification) { return removeCert(key, new UserIDPacket(id), certification); }
static PGPPublicKey function( PGPPublicKey key, String id, PGPSignature certification) { return removeCert(key, new UserIDPacket(id), certification); }
/** * Remove a certification associated with a given id on a key. * * @param key the key the certifications are to be removed from. * @param id the id that the certification is to be removed from. * @param certification the certification to be removed. * @return the re-certified key, null...
Remove a certification associated with a given id on a key
removeCertification
{ "repo_name": "sergeypayu/bc-java", "path": "pg/src/main/java/org/bouncycastle/openpgp/PGPPublicKey.java", "license": "mit", "size": 29755 }
[ "org.bouncycastle.bcpg.UserIDPacket" ]
import org.bouncycastle.bcpg.UserIDPacket;
import org.bouncycastle.bcpg.*;
[ "org.bouncycastle.bcpg" ]
org.bouncycastle.bcpg;
1,237,826
@SuppressWarnings("unchecked") @Test public void testSimpleAsyncConcat() { Observer<String> observer = mock(Observer.class); TestObservable<String> o1 = new TestObservable<String>("one", "two", "three"); TestObservable<String> o2 = new TestObservable<String>("four", "five", "six"); ...
@SuppressWarnings(STR) void function() { Observer<String> observer = mock(Observer.class); TestObservable<String> o1 = new TestObservable<String>("one", "two", "three"); TestObservable<String> o2 = new TestObservable<String>("four", "five", "six"); Observable.concat(Observable.create(o1), Observable.create(o2)).subscri...
/** * Simple concat of 2 asynchronous observables ensuring it emits in correct order. */
Simple concat of 2 asynchronous observables ensuring it emits in correct order
testSimpleAsyncConcat
{ "repo_name": "mattrjacobs/RxJava", "path": "rxjava-core/src/test/java/rx/internal/operators/OperatorConcatTest.java", "license": "apache-2.0", "size": 26944 }
[ "org.mockito.InOrder", "org.mockito.Mockito" ]
import org.mockito.InOrder; import org.mockito.Mockito;
import org.mockito.*;
[ "org.mockito" ]
org.mockito;
2,299,877
public void onCriticalHit(Entity entityHit) { this.mc.effectRenderer.func_178926_a(entityHit, EnumParticleTypes.CRIT); }
void function(Entity entityHit) { this.mc.effectRenderer.func_178926_a(entityHit, EnumParticleTypes.CRIT); }
/** * Called when the player performs a critical hit on the Entity. Args: entity that was hit critically */
Called when the player performs a critical hit on the Entity. Args: entity that was hit critically
onCriticalHit
{ "repo_name": "kelthalorn/ConquestCraft", "path": "build/tmp/recompSrc/net/minecraft/client/entity/EntityPlayerSP.java", "license": "lgpl-2.1", "size": 30417 }
[ "net.minecraft.entity.Entity", "net.minecraft.util.EnumParticleTypes" ]
import net.minecraft.entity.Entity; import net.minecraft.util.EnumParticleTypes;
import net.minecraft.entity.*; import net.minecraft.util.*;
[ "net.minecraft.entity", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.util;
696,145
@Override public boolean storesLowerCaseQuotedIdentifiers() throws SQLException { return true; }
boolean function() throws SQLException { return true; }
/** * <p> * <h1>Implementation Details:</h1><br> * Returns true * </p> */
Implementation Details: Returns true
storesLowerCaseQuotedIdentifiers
{ "repo_name": "jonathanswenson/starschema-bigquery-jdbc", "path": "src/main/java/net/starschema/clouddb/jdbc/BQDatabaseMetadata.java", "license": "bsd-2-clause", "size": 92438 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,012,221
@Override public String[] toStringArray() { // auto-detect additional namespaces List<AdditionalNamespace> additionalNamespaces = new ArrayList<>(); boolean hasImages = urls.values().stream() .anyMatch(webPage -> webPage.getImages() != null); if (hasImages) { ...
String[] function() { List<AdditionalNamespace> additionalNamespaces = new ArrayList<>(); boolean hasImages = urls.values().stream() .anyMatch(webPage -> webPage.getImages() != null); if (hasImages) { additionalNamespaces.add(AdditionalNamespace.IMAGE); } boolean hasAlternateNames = urls.values().stream() .anyMatch(web...
/** * Construct sitemap into array of Strings. The URLs will be ordered using * priority in descending order (URLs with higher priority will be at the * top). * * @return sitemap */
Construct sitemap into array of Strings. The URLs will be ordered using priority in descending order (URLs with higher priority will be at the top)
toStringArray
{ "repo_name": "jirkapinkas/jsitemapgenerator", "path": "src/main/java/cz/jiripinkas/jsitemapgenerator/generator/SitemapGenerator.java", "license": "mit", "size": 6047 }
[ "cz.jiripinkas.jsitemapgenerator.Image", "cz.jiripinkas.jsitemapgenerator.WebPage", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import cz.jiripinkas.jsitemapgenerator.Image; import cz.jiripinkas.jsitemapgenerator.WebPage; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import cz.jiripinkas.jsitemapgenerator.*; import java.util.*;
[ "cz.jiripinkas.jsitemapgenerator", "java.util" ]
cz.jiripinkas.jsitemapgenerator; java.util;
2,650,206
AssetManager getAssets() { return mAssets; }
AssetManager getAssets() { return mAssets; }
/** * Gets the Assets manager object. * * @return the asset manager object. */
Gets the Assets manager object
getAssets
{ "repo_name": "luizgmassa/arquiteturaafe2017", "path": "ArquiteturaAfe2017/app/src/main/java/org/motorola/eldorado/arquiteturaafe2017/view/DishesActivity.java", "license": "gpl-3.0", "size": 9952 }
[ "android.content.res.AssetManager" ]
import android.content.res.AssetManager;
import android.content.res.*;
[ "android.content" ]
android.content;
761,674
@Path("/paas/host/{host_id}" + "/history_filtered/{history_filtered}" + "/server/{server}") @POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response getServerFilteredEvents( @DefaultValue("zabbix") @PathParam("adapterType") String adapterType, @PathParam("host_...
@Path(STR + STR + STR) @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) Response function( @DefaultValue(STR) @PathParam(STR) String adapterType, @PathParam(STR) String host_id, @PathParam(STR) String history_filtered, @PathParam(STR) String server, String requestTime);
/** * Method useful for having Events happening into the monitoring platform. * They can be filtered by period of time as much as the history */
Method useful for having Events happening into the monitoring platform. They can be filtered by period of time as much as the history
getServerFilteredEvents
{ "repo_name": "pon-prisma/PrismaDemo", "path": "MonitoringPillar/src/main/java/it/monitoringpillar/MonitoringPillarWS.java", "license": "apache-2.0", "size": 10956 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.DefaultValue", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response" ]
import javax.ws.rs.Consumes; import javax.ws.rs.DefaultValue; 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 javax.ws.rs.*; import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,466,790
private void repeatReadINs(long rollForwardLsn, Set targetLogEntryTypes, Set targetDbs) throws IOException, DatabaseException { // don't need to track NodeIds INFileReader reader = new INFileReader(env, ...
void function(long rollForwardLsn, Set targetLogEntryTypes, Set targetDbs) throws IOException, DatabaseException { INFileReader reader = new INFileReader(env, readBufferSize, rollForwardLsn, info.nextAvailableLsn, false, false, info.partialCheckpointStartLsn, fileSummaryLsns); Iterator iter = targetLogEntryTypes.iterat...
/** * Read INs and process. */
Read INs and process
repeatReadINs
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.44/src/com/sleepycat/je/recovery/RecoveryManager.java", "license": "gpl-2.0", "size": 90067 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.je.dbi.DatabaseId", "com.sleepycat.je.dbi.DatabaseImpl", "com.sleepycat.je.dbi.DbTree", "com.sleepycat.je.log.INFileReader", "com.sleepycat.je.log.LogEntryType", "java.io.IOException", "java.util.Iterator", "java.util.Set" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.je.dbi.DatabaseId; import com.sleepycat.je.dbi.DatabaseImpl; import com.sleepycat.je.dbi.DbTree; import com.sleepycat.je.log.INFileReader; import com.sleepycat.je.log.LogEntryType; import java.io.IOException; import java.util.Iterator; import java.util.Set...
import com.sleepycat.je.*; import com.sleepycat.je.dbi.*; import com.sleepycat.je.log.*; import java.io.*; import java.util.*;
[ "com.sleepycat.je", "java.io", "java.util" ]
com.sleepycat.je; java.io; java.util;
2,849,321
Date date= new Date(); System.out.println("BAMWorker is processing " + m_bamFile); ConfigLoader loader = new ConfigLoader(); loader.parsePathFile(m_configFile); String workspace = loader.get("work.space", "/scratch/workspace"); String logPath = loader.get("home.dirctory", "/shared/workspace/WGSPipeli...
Date date= new Date(); System.out.println(STR + m_bamFile); ConfigLoader loader = new ConfigLoader(); loader.parsePathFile(m_configFile); String workspace = loader.get(STR, STR); String logPath = loader.get(STR, STR) + STR; File dir = new File(logPath); if (!dir.exists()) dir.mkdirs(); String outputFile = m_bamFile.sub...
/** * Processes commands. * First, download files from S3. Then perform post- alignment. Next, * print reads for variants calling. Then, uploads files to S3. Last, delete * the workspace. * If S3.delete.enable is true, then delete files on S3 * @throws Exception */
Processes commands. First, download files from S3. Then perform post- alignment. Next, print reads for variants calling. Then, uploads files to S3. Last, delete the workspace. If S3.delete.enable is true, then delete files on S3
processCommand
{ "repo_name": "ucsd-ccbb/jupyter-genomics", "path": "src/awsCluster/server/WGSPipeline/src/WGSPipelineAWS/src/org/ucsd/ccbb/PostAlignmentWorker.java", "license": "mit", "size": 5564 }
[ "java.io.File", "java.sql.Timestamp", "java.util.Date" ]
import java.io.File; import java.sql.Timestamp; import java.util.Date;
import java.io.*; import java.sql.*; import java.util.*;
[ "java.io", "java.sql", "java.util" ]
java.io; java.sql; java.util;
1,736,079
@ApiModelProperty(required = true, value = "The id of the notification type") public String getNotificationTypeId() { return notificationTypeId; }
@ApiModelProperty(required = true, value = STR) String function() { return notificationTypeId; }
/** * The id of the notification type * @return notificationTypeId **/
The id of the notification type
getNotificationTypeId
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/model/UserNotificationResource.java", "license": "apache-2.0", "size": 8949 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
733,966
@NonNull public static List<String> getAppSignaturesMD5() { return getAppSignaturesMD5(Utils.getApp().getPackageName()); }
static List<String> function() { return getAppSignaturesMD5(Utils.getApp().getPackageName()); }
/** * Return the application's signature for MD5 value. * * @return the application's signature for MD5 value */
Return the application's signature for MD5 value
getAppSignaturesMD5
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/AppUtils.java", "license": "apache-2.0", "size": 28606 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
720,654
public void add(Duration duration) { boolean fieldUndefined[] = { false, false, false, false, false, false }; int signum = duration.getSign(); int startMonth = getMonth(); ...
void function(Duration duration) { boolean fieldUndefined[] = { false, false, false, false, false, false }; int signum = duration.getSign(); int startMonth = getMonth(); if (startMonth == DatatypeConstants.FIELD_UNDEFINED) { startMonth = DatatypeConstants.JANUARY; fieldUndefined[MONTH] = true; } BigInteger dMonths = sa...
/** * <p>Add <code>duration</code> to this instance.<\p> * * <p>The computation is specified in * <a href="http://www.w3.org/TR/xmlschema-2/#adding-durations-to-dateTimes">XML Schema 1.0 Part 2, Appendix E, * <i>Adding durations to dateTimes</i>></a>. * <a href="#datetimefieldsmapping">dat...
Add <code>duration</code> to this instance. The computation is specified in XML Schema 1.0 Part 2, Appendix E, Adding durations to dateTimes>. date/time field mapping table defines the mapping from XML Schema 1.0 <code>dateTime</code> fields to this class' representation of those fields
add
{ "repo_name": "openjdk/jdk8u", "path": "jaxp/src/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java", "license": "gpl-2.0", "size": 118225 }
[ "java.math.BigDecimal", "java.math.BigInteger", "javax.xml.datatype.DatatypeConstants", "javax.xml.datatype.Duration" ]
import java.math.BigDecimal; import java.math.BigInteger; import javax.xml.datatype.DatatypeConstants; import javax.xml.datatype.Duration;
import java.math.*; import javax.xml.datatype.*;
[ "java.math", "javax.xml" ]
java.math; javax.xml;
2,211,992
@Test public void testJiraTest861() throws Exception { byte [] TABLE = Bytes.toBytes("testJiraTest861"); byte [][] VALUES = makeNAscii(VALUE, 7); long [] STAMPS = makeStamps(7); HTable ht = TEST_UTIL.createTable(TABLE, FAMILY, 10); // Insert three versions Put put = new Put(ROW); put...
void function() throws Exception { byte [] TABLE = Bytes.toBytes(STR); byte [][] VALUES = makeNAscii(VALUE, 7); long [] STAMPS = makeStamps(7); HTable ht = TEST_UTIL.createTable(TABLE, FAMILY, 10); Put put = new Put(ROW); put.add(FAMILY, QUALIFIER, STAMPS[3], VALUES[3]); put.add(FAMILY, QUALIFIER, STAMPS[2], VALUES[2])...
/** * HBASE-861 * get with timestamp will return a value if there is a version with an * earlier timestamp */
HBASE-861 get with timestamp will return a value if there is a version with an earlier timestamp
testJiraTest861
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java", "license": "apache-2.0", "size": 182180 }
[ "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
271,503
@JsProperty(name = "rectangle") public native Rectangle rectangle();
@JsProperty(name = STR) native Rectangle function();
/** * Gets the rectangle of this layer. If this rectangle is smaller than the * rectangle of the ImageryProvider, only a portion of the imagery provider is * shown. */
Gets the rectangle of this layer. If this rectangle is smaller than the rectangle of the ImageryProvider, only a portion of the imagery provider is shown
rectangle
{ "repo_name": "iSergio/gwt-cs", "path": "cesiumjs4gwt-main/src/main/java/org/cesiumjs/cs/scene/ImageryLayer.java", "license": "apache-2.0", "size": 9803 }
[ "org.cesiumjs.cs.core.Rectangle" ]
import org.cesiumjs.cs.core.Rectangle;
import org.cesiumjs.cs.core.*;
[ "org.cesiumjs.cs" ]
org.cesiumjs.cs;
747,692
public void choixRechercheGA(String gareArrivee, int heure, int minute) throws SQLException;
void function(String gareArrivee, int heure, int minute) throws SQLException;
/** * Communique le fait qu'il faille lancer une recherche des gares de depart arrivant * avant heure:minute * @param gareArrivee une gare d'arrivee * @param heure heure de l'heure maximale a afficher * @param minute minute de l'heure maximale a afficher * @throws SQLException (peut generer une excep...
Communique le fait qu'il faille lancer une recherche des gares de depart arrivant avant heure:minute
choixRechercheGA
{ "repo_name": "AllanDubrulle/distributeur_tickets", "path": "Implementation/ML-TheoDaix,AllanDubrulle,VictorVerhoye-implementation/Code et executable/Distributeur/src/main/java/coeur/GraphiqueACoeur.java", "license": "mit", "size": 14943 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
365,293
Resource copyResource(ExecutionContext context, String sourceURI, String destinationURI);
Resource copyResource(ExecutionContext context, String sourceURI, String destinationURI);
/** * Copies a resource to a new location. * * <p> * If the copy path already exists in the repository, a new name will be * automatically generated for the copied resource. * </p> * * @param context the caller execution context * @param sourceURI the path of the resource to copy * @param desti...
Copies a resource to a new location. If the copy path already exists in the repository, a new name will be automatically generated for the copied resource.
copyResource
{ "repo_name": "leocockroach/JasperServer5.6", "path": "jasperserver-api/metadata/src/main/java/com/jaspersoft/jasperserver/api/metadata/common/service/RepositoryService.java", "license": "gpl-2.0", "size": 27135 }
[ "com.jaspersoft.jasperserver.api.common.domain.ExecutionContext", "com.jaspersoft.jasperserver.api.metadata.common.domain.Resource" ]
import com.jaspersoft.jasperserver.api.common.domain.ExecutionContext; import com.jaspersoft.jasperserver.api.metadata.common.domain.Resource;
import com.jaspersoft.jasperserver.api.common.domain.*; import com.jaspersoft.jasperserver.api.metadata.common.domain.*;
[ "com.jaspersoft.jasperserver" ]
com.jaspersoft.jasperserver;
1,998,630
@Override public InteractiveState process_logfile_point(FloatPoint p_point) { this.circle_radius = circle_center.distance(p_point); return this; }
InteractiveState function(FloatPoint p_point) { this.circle_radius = circle_center.distance(p_point); return this; }
/** * Used when reading the next point from a logfile. Calls complete, because * only 1 additional point is stored in the logfile. */
Used when reading the next point from a logfile. Calls complete, because only 1 additional point is stored in the logfile
process_logfile_point
{ "repo_name": "rbuj/FreeRouting", "path": "src/main/java/net/freerouting/freeroute/interactive/CircleConstructionState.java", "license": "gpl-3.0", "size": 6031 }
[ "net.freerouting.freeroute.geometry.planar.FloatPoint" ]
import net.freerouting.freeroute.geometry.planar.FloatPoint;
import net.freerouting.freeroute.geometry.planar.*;
[ "net.freerouting.freeroute" ]
net.freerouting.freeroute;
148,186
public void setPersistenceStructureService(PersistenceStructureService persistenceStructureService) { this.persistenceStructureService = persistenceStructureService; }
void function(PersistenceStructureService persistenceStructureService) { this.persistenceStructureService = persistenceStructureService; }
/** * Sets the persistenceStructureService attribute value. * * @param persistenceStructureService * The persistenceStructureService to set. */
Sets the persistenceStructureService attribute value
setPersistenceStructureService
{ "repo_name": "ua-eas/ua-rice-2.1.9", "path": "impl/src/main/java/org/kuali/rice/krad/dao/impl/BusinessObjectDaoJpa.java", "license": "apache-2.0", "size": 17728 }
[ "org.kuali.rice.krad.service.PersistenceStructureService" ]
import org.kuali.rice.krad.service.PersistenceStructureService;
import org.kuali.rice.krad.service.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,072,592
public String getCurrentTimezone() { // TODO need to get this from the session return DateTimeZone.getDefault().getID(); }
String function() { return DateTimeZone.getDefault().getID(); }
/** * Some functions need to get the current timezone (session/global), not the JVM's timezone. * @return the server's timezone. */
Some functions need to get the current timezone (session/global), not the JVM's timezone
getCurrentTimezone
{ "repo_name": "wfxiang08/sql-layer-1", "path": "fdb-sql-layer-core/src/main/java/com/foundationdb/server/types/TExecutionContext.java", "license": "agpl-3.0", "size": 8195 }
[ "org.joda.time.DateTimeZone" ]
import org.joda.time.DateTimeZone;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,766,419
void registerForCallWaiting(Handler h, int what, Object obj);
void registerForCallWaiting(Handler h, int what, Object obj);
/** * Register for notifications when CDMA call waiting comes * * @param h Handler that receives the notification message. * @param what User-defined message code. * @param obj User object. */
Register for notifications when CDMA call waiting comes
registerForCallWaiting
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/telephony/java/com/android/internal/telephony/Phone.java", "license": "gpl-3.0", "size": 61641 }
[ "android.os.Handler" ]
import android.os.Handler;
import android.os.*;
[ "android.os" ]
android.os;
440,914
@Test public void testGetDocumentStatistics() { System.out.println("GetDocumentStatistics"); String name = "test_multi_pages.docx"; String storage = ""; String folder = ""; try { StatDataResponse result = wordsApi.GetDocumentStatistics(name, storage, folder); } catch (ApiException apiException) {...
void function() { System.out.println(STR); String name = STR; String storage = STRSTRexp:" + apiException.getMessage()); assertNull(apiException); } }
/** * Test of GetDocumentStatistics method, of class WordsApi. */
Test of GetDocumentStatistics method, of class WordsApi
testGetDocumentStatistics
{ "repo_name": "asposewordscloud/Aspose.Words_Cloud_SDK_For_Java", "path": "src/test/java/com/aspose/words/api/WordsApiTest.java", "license": "mit", "size": 42592 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,104,563
private void createPublicResource(String partialPath, String contents) throws UnableToCompleteException { try { OutputStream outStream = context.tryCreateResource(logger, partialPath); if (outStream == null) { String message = "Attempting to generate duplicate public resource: " ...
void function(String partialPath, String contents) throws UnableToCompleteException { try { OutputStream outStream = context.tryCreateResource(logger, partialPath); if (outStream == null) { String message = STR + partialPath + STR; logger.log(TreeLogger.ERROR, message); throw new UnableToCompleteException(); } outStrea...
/** * Set the full contents of a resource in the public directory. * * @param partialPath the path to the file relative to the public directory * @param contents the file contents */
Set the full contents of a resource in the public directory
createPublicResource
{ "repo_name": "dougkoellmer/swarm", "path": "tools/gwt/samples/Showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java", "license": "mit", "size": 13577 }
[ "com.google.gwt.core.ext.TreeLogger", "com.google.gwt.core.ext.UnableToCompleteException", "java.io.IOException", "java.io.OutputStream" ]
import com.google.gwt.core.ext.TreeLogger; import com.google.gwt.core.ext.UnableToCompleteException; import java.io.IOException; import java.io.OutputStream;
import com.google.gwt.core.ext.*; import java.io.*;
[ "com.google.gwt", "java.io" ]
com.google.gwt; java.io;
2,248,405
private Date getFirstDate(MeetingBO meeting, Date accountActivationDate) throws MeetingException { Date date = null; for (date = meeting.getNextScheduleDateAfterRecurrence(getFiscalStartDate()); date .compareTo(accountActivationDate) <= 0; date = meeting.getNextScheduleDateAfterRecur...
Date function(MeetingBO meeting, Date accountActivationDate) throws MeetingException { Date date = null; for (date = meeting.getNextScheduleDateAfterRecurrence(getFiscalStartDate()); date .compareTo(accountActivationDate) <= 0; date = meeting.getNextScheduleDateAfterRecurrence(date)) { ; } return date; }
/** * start from getting a next schedule date after fiscal start date and loop till get a meeting date after account * activation date */
start from getting a next schedule date after fiscal start date and loop till get a meeting date after account activation date
getFirstDate
{ "repo_name": "mifos/1.5.x", "path": "application/src/main/java/org/mifos/accounts/savings/util/helpers/SavingsHelper.java", "license": "apache-2.0", "size": 9187 }
[ "java.util.Date", "org.mifos.application.meeting.business.MeetingBO", "org.mifos.application.meeting.exceptions.MeetingException" ]
import java.util.Date; import org.mifos.application.meeting.business.MeetingBO; import org.mifos.application.meeting.exceptions.MeetingException;
import java.util.*; import org.mifos.application.meeting.business.*; import org.mifos.application.meeting.exceptions.*;
[ "java.util", "org.mifos.application" ]
java.util; org.mifos.application;
300,233
LocatedBlocks getBlockLocations(String clientMachine, String src, long offset, long length) throws IOException { LocatedBlocks blocks = getBlockLocations(src, offset, length, true, true); if (blocks != null) { //sort the blocks DatanodeDescriptor client = host2DataNodeMap.getDatanodeByHost( ...
LocatedBlocks getBlockLocations(String clientMachine, String src, long offset, long length) throws IOException { LocatedBlocks blocks = getBlockLocations(src, offset, length, true, true); if (blocks != null) { DatanodeDescriptor client = host2DataNodeMap.getDatanodeByHost( clientMachine); for (LocatedBlock b : blocks.g...
/** * Get block locations within the specified range. * * @see #getBlockLocations(String, long, long) */
Get block locations within the specified range
getBlockLocations
{ "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.hdfs.protocol.LocatedBlock", "org.apache.hadoop.hdfs.protocol.LocatedBlocks" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.LocatedBlock; import org.apache.hadoop.hdfs.protocol.LocatedBlocks;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,347,947
@ServiceMethod(returns = ReturnType.SINGLE) Mono<WhatIfOperationResultInner> whatIfAsync( String resourceGroupName, String deploymentName, DeploymentWhatIf parameters);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<WhatIfOperationResultInner> whatIfAsync( String resourceGroupName, String deploymentName, DeploymentWhatIf parameters);
/** * Returns changes that will be made by the deployment if executed at the scope of the resource group. * * @param resourceGroupName The name of the resource group the template will be deployed to. The name is case * insensitive. * @param deploymentName The name of the deployment. * ...
Returns changes that will be made by the deployment if executed at the scope of the resource group
whatIfAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java", "license": "mit", "size": 209954 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner", "com.azure.resourcemanager.resources.models.DeploymentWhatIf" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner; import com.azure.resourcemanager.resources.models.DeploymentWhatIf;
import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*; import com.azure.resourcemanager.resources.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,429,696
public ImmutableMap<Integer, List<TextBlock>> getCComments() { return ImmutableMap.copyOf(mCComments); }
ImmutableMap<Integer, List<TextBlock>> function() { return ImmutableMap.copyOf(mCComments); }
/** * Returns a map of all C style comments. The key is the line number, the * value is a {@link List} of C style comment {@link TextBlock}s * that start at that line. * @return the map of comments */
Returns a map of all C style comments. The key is the line number, the value is a <code>List</code> of C style comment <code>TextBlock</code>s that start at that line
getCComments
{ "repo_name": "jdoyle65/checkstyle", "path": "src/checkstyle/com/puppycrawl/tools/checkstyle/api/FileContents.java", "license": "lgpl-2.1", "size": 11181 }
[ "com.google.common.collect.ImmutableMap", "java.util.List" ]
import com.google.common.collect.ImmutableMap; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
169,176
public static Paint newBackgroundPaint(Context context) { final Paint paint = new Paint(); paint.setColor(Color.parseColor(DEFAULT_BACKGROUND_COLOR_ID)); paint.setAntiAlias(true); return paint; }
static Paint function(Context context) { final Paint paint = new Paint(); paint.setColor(Color.parseColor(DEFAULT_BACKGROUND_COLOR_ID)); paint.setAntiAlias(true); return paint; }
/** * Creates the Paint object for drawing the translucent overlay outside the * crop window. * * @param context the Context * @return the new Paint object */
Creates the Paint object for drawing the translucent overlay outside the crop window
newBackgroundPaint
{ "repo_name": "voltazor/cropper", "path": "cropper/src/main/java/com/edmodo/cropper/util/PaintUtil.java", "license": "apache-2.0", "size": 4403 }
[ "android.content.Context", "android.graphics.Color", "android.graphics.Paint" ]
import android.content.Context; import android.graphics.Color; import android.graphics.Paint;
import android.content.*; import android.graphics.*;
[ "android.content", "android.graphics" ]
android.content; android.graphics;
930,845
public final void set(Matrix3d m1) { double ww = 0.25*(m1.m00 + m1.m11 + m1.m22 + 1.0f); if (ww >= 0) { if (ww >= EPS2) { this.w = (float) Math.sqrt(ww); ww = 0.25/this.w; this.x = (float) ((m1.m21 - m1.m12)*ww); this.y = (float) ((m1.m02 - m1.m20)*ww); this.z = (float) ((m1.m10 - m1.m01)*ww);...
final void function(Matrix3d m1) { double ww = 0.25*(m1.m00 + m1.m11 + m1.m22 + 1.0f); if (ww >= 0) { if (ww >= EPS2) { this.w = (float) Math.sqrt(ww); ww = 0.25/this.w; this.x = (float) ((m1.m21 - m1.m12)*ww); this.y = (float) ((m1.m02 - m1.m20)*ww); this.z = (float) ((m1.m10 - m1.m01)*ww); return; } } else { this.w =...
/** * Sets the value of this quaternion to the rotational component of * the passed matrix. * @param m1 the Matrix3d */
Sets the value of this quaternion to the rotational component of the passed matrix
set
{ "repo_name": "nfloersch/wpgis", "path": "javax/vecmath/Quat4f.java", "license": "gpl-3.0", "size": 16864 }
[ "java.lang.Math" ]
import java.lang.Math;
import java.lang.*;
[ "java.lang" ]
java.lang;
178,959
public void updateEmployee(Account account) throws OPMException;
void function(Account account) throws OPMException;
/** * Updates the employee data of the account. * * @param account * the account to update. * * @throws IllegalArgumentException * if account is null. * @throws EntityNotFoundException * if there is no such account to update. * @throws...
Updates the employee data of the account
updateEmployee
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/Data_Migration/src/java/core/gov/opm/scrd/services/AccountService.java", "license": "apache-2.0", "size": 14458 }
[ "gov.opm.scrd.entities.application.Account" ]
import gov.opm.scrd.entities.application.Account;
import gov.opm.scrd.entities.application.*;
[ "gov.opm.scrd" ]
gov.opm.scrd;
1,706,959
public FeedbackResponseCommentAttributes getFeedbackResponseComment( String feedbackResponseId, String giverEmail, Date createdAt) { Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, feedbackResponseId); Assumption.assertNotNull(Const...
FeedbackResponseCommentAttributes function( String feedbackResponseId, String giverEmail, Date createdAt) { Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, feedbackResponseId); Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_NULL_INPUT, giverEmail); Assumption.assertNotNull(Const.StatusCodes.DBLEVEL_N...
/** * Preconditions: <br> * * All parameters are non-null. * @return Null if not found. */
Preconditions: All parameters are non-null
getFeedbackResponseComment
{ "repo_name": "karthikaacharya/teammates", "path": "src/main/java/teammates/storage/api/FeedbackResponseCommentsDb.java", "license": "gpl-2.0", "size": 30141 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,060,454
public void beforeUpload() { try { for (JSONObject d : all()) { d.put("usn", 0); } for (JSONObject c : allConf()) { c.put("usn", 0); } } catch (JSONException e) { throw new RuntimeException(e); } ...
void function() { try { for (JSONObject d : all()) { d.put("usn", 0); } for (JSONObject c : allConf()) { c.put("usn", 0); } } catch (JSONException e) { throw new RuntimeException(e); } save(); }
/** * Sync handling ************************************************************ *********************************** */
Sync handling ************************************************************
beforeUpload
{ "repo_name": "mikeAopeneng/joyo-kanji", "path": "KanjiDroid/src/main/java/website/openeng/libanki/Decks.java", "license": "gpl-2.0", "size": 30644 }
[ "org.json.JSONException", "org.json.JSONObject" ]
import org.json.JSONException; import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
2,552,249
public void setFilters(List<AjaxFilter> filters) { this.filters = filters; } private Map<String, String> creatorTypes; private Map<String, String> converterTypes; private Map<String, CreatorConfig> creators; private Map<String, ConverterConfig> converters; ...
void function(List<AjaxFilter> filters) { this.filters = filters; } private Map<String, String> creatorTypes; private Map<String, String> converterTypes; private Map<String, CreatorConfig> creators; private Map<String, ConverterConfig> converters; private String signatures; private List<AjaxFilter> filters;
/** * Sets the global AJAX filters. * @param filters the filters to set */
Sets the global AJAX filters
setFilters
{ "repo_name": "TheOpenCloudEngine/metaworks", "path": "metaworks-dwr/serverside/spring/main/java/org/directwebremoting/spring/SpringConfigurator.java", "license": "mit", "size": 9968 }
[ "java.util.List", "java.util.Map", "org.directwebremoting.AjaxFilter" ]
import java.util.List; import java.util.Map; import org.directwebremoting.AjaxFilter;
import java.util.*; import org.directwebremoting.*;
[ "java.util", "org.directwebremoting" ]
java.util; org.directwebremoting;
2,370,850
private boolean handleNewData(HttpOutboundServiceContextImpl sc, VirtualConnection vc) { if (!sc.headersParsed()) { try { return sc.parseMessage(); } catch (Exception e) { FFDCFilter.processException(e, getClass().getName() + ".handleNewData", "73", th...
boolean function(HttpOutboundServiceContextImpl sc, VirtualConnection vc) { if (!sc.headersParsed()) { try { return sc.parseMessage(); } catch (Exception e) { FFDCFilter.processException(e, getClass().getName() + STR, "73", this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, STR + e.g...
/** * Helper method to handle when new work is around and we need to parse it * and watch for errors/check for headersParsed being true. * * @param sc * @param vc * @return boolean (have headers been fully parsed yet?) */
Helper method to handle when new work is around and we need to parse it and watch for errors/check for headersParsed being true
handleNewData
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/outbound/HttpOSC100ReadCallback.java", "license": "epl-1.0", "size": 5762 }
[ "com.ibm.websphere.ras.Tr", "com.ibm.websphere.ras.TraceComponent", "com.ibm.ws.ffdc.FFDCFilter", "com.ibm.wsspi.channelfw.VirtualConnection" ]
import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.ffdc.FFDCFilter; import com.ibm.wsspi.channelfw.VirtualConnection;
import com.ibm.websphere.ras.*; import com.ibm.ws.ffdc.*; import com.ibm.wsspi.channelfw.*;
[ "com.ibm.websphere", "com.ibm.ws", "com.ibm.wsspi" ]
com.ibm.websphere; com.ibm.ws; com.ibm.wsspi;
700,670
public List<String> getTypes() { return Collections.unmodifiableList(types); }
List<String> function() { return Collections.unmodifiableList(types); }
/** * Returns an unmodifiable list of this components types. * * @return types */
Returns an unmodifiable list of this components types
getTypes
{ "repo_name": "abouzek/google-places-api-java", "path": "src/main/java/se/walkercrou/places/AddressComponent.java", "license": "mit", "size": 1922 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,403,775
public void testAllTermsRelevantOnlyOneDocument() throws IOException { BasicStats stats = createStats(); stats.setNumberOfDocuments(10); stats.setNumberOfFieldTokens(50); stats.setAvgFieldLength(5); stats.setDocFreq(1); stats.setTotalTermFreq(50); unitTestCore(stats, 50, 50); }
void function() throws IOException { BasicStats stats = createStats(); stats.setNumberOfDocuments(10); stats.setNumberOfFieldTokens(50); stats.setAvgFieldLength(5); stats.setDocFreq(1); stats.setTotalTermFreq(50); unitTestCore(stats, 50, 50); }
/** * Tests correct behavior when {@code numberOfFieldTokens = freq}. */
Tests correct behavior when numberOfFieldTokens = freq
testAllTermsRelevantOnlyOneDocument
{ "repo_name": "PATRIC3/p3_solr", "path": "lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java", "license": "apache-2.0", "size": 24195 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,439,677
private void init() { long base = region.address(); lastAllocatedIdxPtr = base; base += 8; // Align by 8 bytes. pagesBase = (base + 7) & ~0x7; GridUnsafe.putLong(lastAllocatedIdxPtr, 0); long limit = region.address() + regi...
void function() { long base = region.address(); lastAllocatedIdxPtr = base; base += 8; pagesBase = (base + 7) & ~0x7; GridUnsafe.putLong(lastAllocatedIdxPtr, 0); long limit = region.address() + region.size(); maxPages = (int)((limit - pagesBase) / sysPageSize); }
/** * Initializes page memory segment. */
Initializes page memory segment
init
{ "repo_name": "ptupitsyn/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java", "license": "apache-2.0", "size": 27224 }
[ "org.apache.ignite.internal.util.GridUnsafe" ]
import org.apache.ignite.internal.util.GridUnsafe;
import org.apache.ignite.internal.util.*;
[ "org.apache.ignite" ]
org.apache.ignite;
8,772
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) public ItemChoicesEntity save(ItemChoicesEntity entity) { ItemChoicesEntity db = selectOnKey(entity.getChoiceNo(), entity.getItemNo(), entity.getTypeId()); if (db == null) { return insert(entity); }...
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) ItemChoicesEntity function(ItemChoicesEntity entity) { ItemChoicesEntity db = selectOnKey(entity.getChoiceNo(), entity.getItemNo(), entity.getTypeId()); if (db == null) { return insert(entity); } else { return update(entity); } }
/** * Save. * if same key data is exists, the data is update. otherwise the data is insert. * @param entity entity * @return saved entity */
Save. if same key data is exists, the data is update. otherwise the data is insert
save
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/knowledge/dao/gen/GenItemChoicesDao.java", "license": "apache-2.0", "size": 20583 }
[ "org.support.project.aop.Aspect", "org.support.project.knowledge.entity.ItemChoicesEntity" ]
import org.support.project.aop.Aspect; import org.support.project.knowledge.entity.ItemChoicesEntity;
import org.support.project.aop.*; import org.support.project.knowledge.entity.*;
[ "org.support.project" ]
org.support.project;
592,518
public Activity getActivity() { return activity; }
Activity function() { return activity; }
/** * Gets the activity. * * @return the activity */
Gets the activity
getActivity
{ "repo_name": "uol-cs-multiot/em4so-java", "path": "core/src/main/java/org/mp/em4so/model/reasoning/Step.java", "license": "apache-2.0", "size": 854 }
[ "org.mp.em4so.model.actuating.Activity" ]
import org.mp.em4so.model.actuating.Activity;
import org.mp.em4so.model.actuating.*;
[ "org.mp.em4so" ]
org.mp.em4so;
547,670
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) { super.updateTick(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_); if (p_149674_1_.provider.isSurfaceWorld() && p_149674_1_.getGameRules().getGameRuleBooleanValue("...
void function(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) { super.updateTick(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_); if (p_149674_1_.provider.isSurfaceWorld() && p_149674_1_.getGameRules().getGameRuleBooleanValue(STR) && p_149674_5_.nextInt(2000) <...
/** * Ticks the block if it's been scheduled */
Ticks the block if it's been scheduled
updateTick
{ "repo_name": "Sgtgamer/MinecraftExpansion", "path": "src/main/java/com/raoul/minecraftexpension/blocks/BlockMEPortal.java", "license": "gpl-3.0", "size": 19037 }
[ "java.util.Random", "net.minecraft.entity.Entity", "net.minecraft.item.ItemMonsterPlacer", "net.minecraft.world.World" ]
import java.util.Random; import net.minecraft.entity.Entity; import net.minecraft.item.ItemMonsterPlacer; import net.minecraft.world.World;
import java.util.*; import net.minecraft.entity.*; import net.minecraft.item.*; import net.minecraft.world.*;
[ "java.util", "net.minecraft.entity", "net.minecraft.item", "net.minecraft.world" ]
java.util; net.minecraft.entity; net.minecraft.item; net.minecraft.world;
2,275,442
public void setSpacing(boolean spacing) { if (spacing && spacer == null) { spacer = DOM.createDiv(); spacer.addClassName("v-spacing"); getElement().getParentElement().insertBefore(spacer, getElement()); } else if (!spacing && spacer != null) { ...
void function(boolean spacing) { if (spacing && spacer == null) { spacer = DOM.createDiv(); spacer.addClassName(STR); getElement().getParentElement().insertBefore(spacer, getElement()); } else if (!spacing && spacer != null) { LayoutManager lm = layout.getLayoutManager(); if (lm != null && spacingResizeListener != null...
/** * Set the spacing for the slot. The spacing determines if there should be * empty space around the slot when the slot. * * @param spacing * Should spacing be enabled */
Set the spacing for the slot. The spacing determines if there should be empty space around the slot when the slot
setSpacing
{ "repo_name": "udayinfy/vaadin", "path": "client/src/com/vaadin/client/ui/orderedlayout/Slot.java", "license": "apache-2.0", "size": 26499 }
[ "com.google.gwt.user.client.DOM", "com.vaadin.client.LayoutManager" ]
import com.google.gwt.user.client.DOM; import com.vaadin.client.LayoutManager;
import com.google.gwt.user.client.*; import com.vaadin.client.*;
[ "com.google.gwt", "com.vaadin.client" ]
com.google.gwt; com.vaadin.client;
1,679,132
private void processingWarning(File processedFile, Exception e) { filesClusteredWithWarnings++; final String message = "Failed to process " + (processedFile.isDirectory() ? "directory" : "file") + ": " + processedFile.getAbsolutePath(); if (verbose) { ...
void function(File processedFile, Exception e) { filesClusteredWithWarnings++; final String message = STR + (processedFile.isDirectory() ? STR : "file") + STR + processedFile.getAbsolutePath(); if (verbose) { log.warn(message, e); } else { log.warn(message); } }
/** * Files a processing warning. */
Files a processing warning
processingWarning
{ "repo_name": "arnaudsj/carrot2", "path": "applications/carrot2-cli/src/org/carrot2/cli/batch/BatchApp.java", "license": "bsd-3-clause", "size": 10265 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,079,381
protected String getDistinguishedName(DirContext context, String base, SearchResult result) throws NamingException { // Get the entry's distinguished name. For relative results, this means // we need to composite a name with the base name, the context name, and // the result name. For non-...
String function(DirContext context, String base, SearchResult result) throws NamingException { String resultName = result.getName(); Name name; if (result.isRelative()) { if (containerLog.isTraceEnabled()) { containerLog.trace(STR + resultName); } NameParser parser = context.getNameParser(STR search returned absolute n...
/** * Returns the distinguished name of a search result. * * @param context Our DirContext * @param base The base DN * @param result The search result * @return String containing the distinguished name * @exception NamingException if a directory server error occurs */
Returns the distinguished name of a search result
getDistinguishedName
{ "repo_name": "apache/tomcat", "path": "java/org/apache/catalina/realm/JNDIRealm.java", "license": "apache-2.0", "size": 110599 }
[ "javax.naming.Name", "javax.naming.NameParser", "javax.naming.NamingException", "javax.naming.directory.DirContext", "javax.naming.directory.SearchResult" ]
import javax.naming.Name; import javax.naming.NameParser; import javax.naming.NamingException; import javax.naming.directory.DirContext; import javax.naming.directory.SearchResult;
import javax.naming.*; import javax.naming.directory.*;
[ "javax.naming" ]
javax.naming;
149,373
public boolean addCategory(final String groupname, final Category cat) { getWriteLock().lock(); try { Enumeration<Categorygroup> enumCG = m_config.enumerateCategorygroup(); while (enumCG.hasMoreElements()) { Categorygroup cg = enumCG.nextElement(); ...
boolean function(final String groupname, final Category cat) { getWriteLock().lock(); try { Enumeration<Categorygroup> enumCG = m_config.enumerateCategorygroup(); while (enumCG.hasMoreElements()) { Categorygroup cg = enumCG.nextElement(); if (cg.getName().equals(groupname)) { Categories cats = cg.getCategories(); cats....
/** * Add category to a categorygroup. * * @param groupname * category group to which category is to be added * @param cat * category to be added * @return true if category is successfully added to the specified category * group */
Add category to a categorygroup
addCategory
{ "repo_name": "vishwaAbhinav/OpenNMS", "path": "opennms-services/src/main/java/org/opennms/netmgt/config/CategoryFactory.java", "license": "gpl-2.0", "size": 17309 }
[ "java.util.Enumeration", "org.opennms.netmgt.config.categories.Categories", "org.opennms.netmgt.config.categories.Category", "org.opennms.netmgt.config.categories.Categorygroup" ]
import java.util.Enumeration; import org.opennms.netmgt.config.categories.Categories; import org.opennms.netmgt.config.categories.Category; import org.opennms.netmgt.config.categories.Categorygroup;
import java.util.*; import org.opennms.netmgt.config.categories.*;
[ "java.util", "org.opennms.netmgt" ]
java.util; org.opennms.netmgt;
1,798,731
public String getValue(String fieldName) { String xpath = String.format(FIELD_XPATH_FORMAT, fieldName.length(), fieldName); return new FormElement(getForm()).getFieldValue(By.xpath(xpath)); }
String function(String fieldName) { String xpath = String.format(FIELD_XPATH_FORMAT, fieldName.length(), fieldName); return new FormElement(getForm()).getFieldValue(By.xpath(xpath)); }
/** * Retrieves the value of the specified form field * * @param fieldName the name of a form field * @return the value of the specified form field * @since 7.0RC1 */
Retrieves the value of the specified form field
getValue
{ "repo_name": "pbondoer/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/po/InlinePage.java", "license": "lgpl-2.1", "size": 6301 }
[ "org.openqa.selenium.By" ]
import org.openqa.selenium.By;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,427,954
public SourceLocator getSourceLocatorFor(int node) { return null; }
SourceLocator function(int node) { return null; }
/** * No source information is available for DOM2DTM, so return * <code>null</code> here. * * @param node an <code>int</code> value * @return null */
No source information is available for DOM2DTM, so return <code>null</code> here
getSourceLocatorFor
{ "repo_name": "bandcampdotcom/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java", "license": "apache-2.0", "size": 57772 }
[ "javax.xml.transform.SourceLocator" ]
import javax.xml.transform.SourceLocator;
import javax.xml.transform.*;
[ "javax.xml" ]
javax.xml;
378,794
public Collection<PaymentRequestDocument> getImmediatePaymentRequestsToExtract(String chartCode);
Collection<PaymentRequestDocument> function(String chartCode);
/** * Get all the payment requests that are immediate and need to be extracted to PDP. * * @param chartCode The chart code to be used as one of the criterias to retrieve the payment request documents. * @return The iterator of the list of the resulting payment request documents returned by the payme...
Get all the payment requests that are immediate and need to be extracted to PDP
getImmediatePaymentRequestsToExtract
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/document/service/PaymentRequestService.java", "license": "agpl-3.0", "size": 19090 }
[ "java.util.Collection", "org.kuali.kfs.module.purap.document.PaymentRequestDocument" ]
import java.util.Collection; import org.kuali.kfs.module.purap.document.PaymentRequestDocument;
import java.util.*; import org.kuali.kfs.module.purap.document.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
1,162,651
List<Asset> getPreExportDefineTimeDependentAssets(BundlableNode bundlableNode) throws ModelOperationException;
List<Asset> getPreExportDefineTimeDependentAssets(BundlableNode bundlableNode) throws ModelOperationException;
/** * Returns the list of all dependencies required by the source-module before it's able to define itself. * * @param bundlableNode The bundlable node for which a bundle-set is being generated. */
Returns the list of all dependencies required by the source-module before it's able to define itself
getPreExportDefineTimeDependentAssets
{ "repo_name": "andreoid/testing", "path": "brjs-core/src/main/java/org/bladerunnerjs/model/SourceModule.java", "license": "lgpl-3.0", "size": 1388 }
[ "java.util.List", "org.bladerunnerjs.model.exception.ModelOperationException" ]
import java.util.List; import org.bladerunnerjs.model.exception.ModelOperationException;
import java.util.*; import org.bladerunnerjs.model.exception.*;
[ "java.util", "org.bladerunnerjs.model" ]
java.util; org.bladerunnerjs.model;
2,568,559
public LocalDateTime getCreatedAt() { return createdAt; }
LocalDateTime function() { return createdAt; }
/** * This method was generated by MyBatis Generator. * This method returns the value of the database column USER.CREATED_AT * * @return the value of USER.CREATED_AT * * @mbggenerated */
This method was generated by MyBatis Generator. This method returns the value of the database column USER.CREATED_AT
getCreatedAt
{ "repo_name": "agwlvssainokuni/springapp", "path": "common/src/generated/java/cherry/common/db/gen/dto/User.java", "license": "apache-2.0", "size": 12511 }
[ "org.joda.time.LocalDateTime" ]
import org.joda.time.LocalDateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
552,399
public static LinkedHashMap<String, List<String>> extractComboValuesMap(JSONObject formItem) throws JSONException { LinkedHashMap<String, List<String>> valuesMap = new LinkedHashMap<String, List<String>>(); if (formItem.has(TAG_VALUES)) { JSONObject valuesObj = formItem.getJSONObject(T...
static LinkedHashMap<String, List<String>> function(JSONObject formItem) throws JSONException { LinkedHashMap<String, List<String>> valuesMap = new LinkedHashMap<String, List<String>>(); if (formItem.has(TAG_VALUES)) { JSONObject valuesObj = formItem.getJSONObject(TAG_VALUES); JSONArray names = valuesObj.names(); int l...
/** * Extract the combo values map. * * @param formItem the json object. * @return the map of combo items. * @throws JSONException if something goes wrong. */
Extract the combo values map
extractComboValuesMap
{ "repo_name": "kristina-hager/geopaparazzi", "path": "geopaparazzilibrary/src/eu/geopaparazzi/library/forms/TagsManager.java", "license": "gpl-3.0", "size": 12239 }
[ "java.util.ArrayList", "java.util.LinkedHashMap", "java.util.List", "org.json.JSONArray", "org.json.JSONException", "org.json.JSONObject" ]
import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;
import java.util.*; import org.json.*;
[ "java.util", "org.json" ]
java.util; org.json;
417,914
public synchronized void waitOnRegionToClearRegionsInTransition( final HRegionInfo hri) throws InterruptedException { if (!isRegionInTransition(hri)) return; while(!server.isStopped() && isRegionInTransition(hri)) { RegionState rs = getRegionState(hri); LOG.info("Waiting on " + rs + " to cl...
synchronized void function( final HRegionInfo hri) throws InterruptedException { if (!isRegionInTransition(hri)) return; while(!server.isStopped() && isRegionInTransition(hri)) { RegionState rs = getRegionState(hri); LOG.info(STR + rs + STR); waitForUpdate(100); } if (server.isStopped()) { LOG.info(STR + STR); } }
/** * Wait on region to clear regions-in-transition. * <p> * If the region isn't in transition, returns immediately. Otherwise, method * blocks until the region is out of transition. */
Wait on region to clear regions-in-transition. If the region isn't in transition, returns immediately. Otherwise, method blocks until the region is out of transition
waitOnRegionToClearRegionsInTransition
{ "repo_name": "drewpope/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java", "license": "apache-2.0", "size": 39472 }
[ "org.apache.hadoop.hbase.HRegionInfo" ]
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,340,556
public static Expression relate(Expression geom1, Object geom2, SpatialParameters params) { String stringParameters = params == null ? null : params.getParameterString(); return getSpatialExpression(SDO_RELATE, geom1, geom2, stringParameters); }
static Expression function(Expression geom1, Object geom2, SpatialParameters params) { String stringParameters = params == null ? null : params.getParameterString(); return getSpatialExpression(SDO_RELATE, geom1, geom2, stringParameters); }
/** * PUBLIC: * Return an Expression for the MDSYS.MDSYS.SDO_RELATE Spatial Operator on the Oracle Database * Use of this operator requires the Java spatial classes * * <pre><blockquote> * SpatialParameters parameters = new SpatialParameters(); * parameters..setMask(Mask.ANYIN...
Return an Expression for the MDSYS.MDSYS.SDO_RELATE Spatial Operator on the Oracle Database Use of this operator requires the Java spatial classes <code> SpatialParameters parameters = new SpatialParameters(); parameters..setMask(Mask.ANYINTERACT).setQueryType(QueryType.WINDOW); Expression selectCriteria = SpatialExpre...
relate
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/expressions/spatial/SpatialExpressionFactory.java", "license": "epl-1.0", "size": 7036 }
[ "org.eclipse.persistence.expressions.Expression" ]
import org.eclipse.persistence.expressions.Expression;
import org.eclipse.persistence.expressions.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,270,394
public DefaultCurveMetadataBuilder parameterMetadata(ParameterMetadata... parameterMetadata) { this.parameterMetadata = ImmutableList.copyOf(parameterMetadata); return this; }
DefaultCurveMetadataBuilder function(ParameterMetadata... parameterMetadata) { this.parameterMetadata = ImmutableList.copyOf(parameterMetadata); return this; }
/** * Sets the parameter-level metadata. * <p> * The parameter metadata must match the number of parameters on the curve. * This will replace the existing parameter-level metadata. * * @param parameterMetadata the parameter metadata * @return this, for chaining */
Sets the parameter-level metadata. The parameter metadata must match the number of parameters on the curve. This will replace the existing parameter-level metadata
parameterMetadata
{ "repo_name": "jmptrader/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/curve/DefaultCurveMetadataBuilder.java", "license": "apache-2.0", "size": 8024 }
[ "com.google.common.collect.ImmutableList", "com.opengamma.strata.market.param.ParameterMetadata" ]
import com.google.common.collect.ImmutableList; import com.opengamma.strata.market.param.ParameterMetadata;
import com.google.common.collect.*; import com.opengamma.strata.market.param.*;
[ "com.google.common", "com.opengamma.strata" ]
com.google.common; com.opengamma.strata;
2,246,025
protected void createBlob() { Random r = new Random(); int blobSize = r.nextInt(averageInitialBlobSize * 2); byte[] blobContent = createRandomContent(blobSize); transactionPropagator.required(() -> { long[] blobIds = new long[blobstores.length]; for (int i = 0; i < blobstores.length; i++) ...
void function() { Random r = new Random(); int blobSize = r.nextInt(averageInitialBlobSize * 2); byte[] blobContent = createRandomContent(blobSize); transactionPropagator.required(() -> { long[] blobIds = new long[blobstores.length]; for (int i = 0; i < blobstores.length; i++) { Blobstore blobstore = blobstores[i]; Blo...
/** * Creates a blob with random content. */
Creates a blob with random content
createBlob
{ "repo_name": "everit-org/blobstore-testbase", "path": "src/main/java/org/everit/blobstore/testbase/BlobstoreStressAndConsistencyTester.java", "license": "apache-2.0", "size": 24129 }
[ "java.util.Random", "org.everit.blobstore.BlobAccessor", "org.everit.blobstore.Blobstore" ]
import java.util.Random; import org.everit.blobstore.BlobAccessor; import org.everit.blobstore.Blobstore;
import java.util.*; import org.everit.blobstore.*;
[ "java.util", "org.everit.blobstore" ]
java.util; org.everit.blobstore;
1,643,457
public Observable<ServiceResponse<EventSubscriptionInner>> getWithServiceResponseAsync(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is requi...
Observable<ServiceResponse<EventSubscriptionInner>> function(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (systemTopi...
/** * Get an event subscription of a system topic. * Get an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be...
Get an event subscription of a system topic. Get an event subscription
getWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/eventgrid/mgmt-v2020_04_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_04_01_preview/implementation/SystemTopicEventSubscriptionsInner.java", "license": "mit", "size": 87650 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
470,606
public OperationsClient getOperations() { return this.operations; } private final TagRulesClient tagRules;
OperationsClient function() { return this.operations; } private final TagRulesClient tagRules;
/** * Gets the OperationsClient object to access its operations. * * @return the OperationsClient object. */
Gets the OperationsClient object to access its operations
getOperations
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientImpl.java", "license": "mit", "size": 12266 }
[ "com.azure.resourcemanager.datadog.fluent.OperationsClient", "com.azure.resourcemanager.datadog.fluent.TagRulesClient" ]
import com.azure.resourcemanager.datadog.fluent.OperationsClient; import com.azure.resourcemanager.datadog.fluent.TagRulesClient;
import com.azure.resourcemanager.datadog.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,209,809
private void obtainWriteLocksForClear(RegionEventImpl regionEvent, Set<InternalDistributedMember> participants) { lockLocallyForClear(getDistributionManager(), getMyId()); DistributedClearOperation.lockAndFlushToOthers(regionEvent, participants); }
void function(RegionEventImpl regionEvent, Set<InternalDistributedMember> participants) { lockLocallyForClear(getDistributionManager(), getMyId()); DistributedClearOperation.lockAndFlushToOthers(regionEvent, participants); }
/** obtain locks preventing generation of new versions in other members * @param participants **/
obtain locks preventing generation of new versions in other members
obtainWriteLocksForClear
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java", "license": "apache-2.0", "size": 162027 }
[ "com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember", "java.util.Set" ]
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; import java.util.Set;
import com.gemstone.gemfire.distributed.internal.membership.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
1,289,468
void addWindow(@Param("window") PointerDetectorWindowMediaParam window, Continuation<Void> cont);
void addWindow(@Param(STR) PointerDetectorWindowMediaParam window, Continuation<Void> cont);
/** * * Asynchronous version of addWindow: {@link Continuation#onSuccess} is * called when the action is done. If an error occurs, * {@link Continuation#onError} is called. * * @see PointerDetectorAdvFilter#addWindow * * @param window * The window to be added * **/
Asynchronous version of addWindow: <code>Continuation#onSuccess</code> is called when the action is done. If an error occurs, <code>Continuation#onError</code> is called
addWindow
{ "repo_name": "KurentoLegacy/kmf-media-api", "path": "src/main/java/com/kurento/kmf/media/PointerDetectorAdvFilter.java", "license": "lgpl-2.1", "size": 5705 }
[ "com.kurento.tool.rom.server.Param" ]
import com.kurento.tool.rom.server.Param;
import com.kurento.tool.rom.server.*;
[ "com.kurento.tool" ]
com.kurento.tool;
1,401,027
void getAllBookmarkRefs(Collection<Object> listToFill);
void getAllBookmarkRefs(Collection<Object> listToFill);
/** * Retrieves all the bookmarks at this location, adding them to * the specified collection. Bookmarks held by weak references are * added to this collection as Weak referenced objects pointing to the * bookmark. * * @param listToFill The collection that will contain bookmarks * ...
Retrieves all the bookmarks at this location, adding them to the specified collection. Bookmarks held by weak references are added to this collection as Weak referenced objects pointing to the bookmark
getAllBookmarkRefs
{ "repo_name": "apache/xmlbeans", "path": "src/main/java/org/apache/xmlbeans/XmlCursor.java", "license": "apache-2.0", "size": 71317 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,217,658
public Element create(String prefix, Document doc) { return new BatikHistogramNormalizationElement (prefix, (AbstractDocument)doc); } } protected static class ColorSwitchElementFactory implements ExtensibleDOMImplementation.ElementFactory { publi...
Element function(String prefix, Document doc) { return new BatikHistogramNormalizationElement (prefix, (AbstractDocument)doc); } } protected static class ColorSwitchElementFactory implements ExtensibleDOMImplementation.ElementFactory { public ColorSwitchElementFactory() { }
/** * Creates an instance of the associated element type. */
Creates an instance of the associated element type
create
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/extension/svg/BatikDomExtension.java", "license": "apache-2.0", "size": 10009 }
[ "org.apache.batik.dom.AbstractDocument", "org.apache.batik.dom.ExtensibleDOMImplementation", "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.apache.batik.dom.AbstractDocument; import org.apache.batik.dom.ExtensibleDOMImplementation; import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.apache.batik.dom.*; import org.w3c.dom.*;
[ "org.apache.batik", "org.w3c.dom" ]
org.apache.batik; org.w3c.dom;
115,639
public static List<CompilerAdviceAttribute> readCompilerAdviceFile(String file) { List<CompilerAdviceAttribute> compilerAdviceInfo = new ArrayList<CompilerAdviceAttribute>(); BufferedReader fileIn = null; if (file == null) return null; try { fileIn = new BufferedReader(new InputStreamReader(ne...
static List<CompilerAdviceAttribute> function(String file) { List<CompilerAdviceAttribute> compilerAdviceInfo = new ArrayList<CompilerAdviceAttribute>(); BufferedReader fileIn = null; if (file == null) return null; try { fileIn = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8")); try { for (...
/** * Read annoations from a specified file. Reads all annotations at * once and returns a collection of compiler advice attributes. * * @param file The annoation file to be read * @return A list of compileration advice attributes */
Read annoations from a specified file. Reads all annotations at once and returns a collection of compiler advice attributes
readCompilerAdviceFile
{ "repo_name": "ut-osa/laminar", "path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/adaptive/util/CompilerAdviceInfoReader.java", "license": "bsd-3-clause", "size": 4542 }
[ "java.io.BufferedReader", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStreamReader", "java.util.ArrayList", "java.util.List", "java.util.StringTokenizer", "org.jikesrvm.VM" ]
import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.jikesrvm.VM;
import java.io.*; import java.util.*; import org.jikesrvm.*;
[ "java.io", "java.util", "org.jikesrvm" ]
java.io; java.util; org.jikesrvm;
2,852,831
public static String getCountryNameFromSim(Context context) { // try to get it from sim TelephonyManager tm = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); String countryCode = tm.getSimCountryIso(); return countryCode; }
static String function(Context context) { TelephonyManager tm = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); String countryCode = tm.getSimCountryIso(); return countryCode; }
/** * get country ISO name for the user using the SIM card * * @param Context * * @return ISO name for the country */
get country ISO name for the user using the SIM card
getCountryNameFromSim
{ "repo_name": "Barqawiz/AndroidUtility", "path": "Android Utilities/src/com/iaraby/utility/Utility.java", "license": "gpl-2.0", "size": 9966 }
[ "android.content.Context", "android.telephony.TelephonyManager" ]
import android.content.Context; import android.telephony.TelephonyManager;
import android.content.*; import android.telephony.*;
[ "android.content", "android.telephony" ]
android.content; android.telephony;
2,607,141
ServiceCall<Void> deleteAsyncRelativeRetryInvalidHeaderAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
ServiceCall<Void> deleteAsyncRelativeRetryInvalidHeaderAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
/** * Long running delete request, service returns a 202 to the initial request. The endpoint indicated in the Azure-AsyncOperation header is invalid. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback...
Long running delete request, service returns a 202 to the initial request. The endpoint indicated in the Azure-AsyncOperation header is invalid
deleteAsyncRelativeRetryInvalidHeaderAsync
{ "repo_name": "yaqiyang/autorest", "path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/LROSADs.java", "license": "mit", "size": 104951 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,216,172
public static Object createObject(String filePath, String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException { if (StringUtils.isBlank(className)) { throw new IllegalArgumentException("className cannot be null"); } ClassLoaderUtility.addFile(f...
static Object function(String filePath, String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException { if (StringUtils.isBlank(className)) { throw new IllegalArgumentException(STR); } ClassLoaderUtility.addFile(filePath); String path = STRLoading class {} with ClassLoader...
/** * Adds the given file path to the classpath and creates an instance of the * given class name. * * @param filePath * the path of the file to add to the classpath. * @param className * the name of the class for which to create an instance. * @return the instance created. ...
Adds the given file path to the classpath and creates an instance of the given class name
createObject
{ "repo_name": "rui-castro/roda", "path": "roda-common/roda-common-utils/src/main/java/org/roda/core/util/ClassLoaderUtility.java", "license": "lgpl-3.0", "size": 5034 }
[ "java.io.IOException", "org.apache.commons.lang3.StringUtils" ]
import java.io.IOException; import org.apache.commons.lang3.StringUtils;
import java.io.*; import org.apache.commons.lang3.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
999,270
// Config final int parallelism = 32; final int producerBufferPoolSize = parallelism + 1; final int numberOfBuffersPerChannel = 1024; checkArgument(parallelism >= 1); checkArgument(producerBufferPoolSize >= parallelism); checkArgument(numberOfBuffersPerChannel >= 1); // Setup // One thread per produ...
final int parallelism = 32; final int producerBufferPoolSize = parallelism + 1; final int numberOfBuffersPerChannel = 1024; checkArgument(parallelism >= 1); checkArgument(producerBufferPoolSize >= parallelism); checkArgument(numberOfBuffersPerChannel >= 1); final ExecutorService executor = Executors.newFixedThreadPool(...
/** * Tests the consumption of multiple subpartitions via local input channels. * * <p>Multiple producer tasks produce pipelined partitions, which are consumed by multiple * tasks via local input channels. */
Tests the consumption of multiple subpartitions via local input channels. Multiple producer tasks produce pipelined partitions, which are consumed by multiple tasks via local input channels
testConcurrentConsumeMultiplePartitions
{ "repo_name": "gyfora/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannelTest.java", "license": "apache-2.0", "size": 21369 }
[ "java.util.List", "java.util.concurrent.CompletableFuture", "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "java.util.concurrent.TimeUnit", "org.apache.flink.runtime.concurrent.FutureUtils", "org.apache.flink.runtime.io.network.TaskEventDispatcher", "org.apache.flink.runtime...
import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.apache.flink.runtime.concurrent.FutureUtils; import org.apache.flink.runtime.io.network.TaskEventDispatcher; import o...
import java.util.*; import java.util.concurrent.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.io.network.*; import org.apache.flink.runtime.io.network.buffer.*; import org.apache.flink.runtime.io.network.partition.*; import org.apache.flink.runtime.io.network.util.*; import org.apache...
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
514,575
@Test public void RelativeAssemblyDefined_ExpectNotNull() { File projectFile = new File("C:/Development/Jewel.Release.Oahu/BasicControls/Controls/ControlsProj.csproj"); String outputType = "library"; String assemblyName="myproject"; String path="bin/Debug"; when(settings....
void function() { File projectFile = new File(STR); String outputType = STR; String assemblyName=STR; String path=STR; when(settings.getString(STR)).thenReturn(path); File locatedAssembly = whenLocatingAssembly(projectFile, outputType, assemblyName); assertNotNull(locatedAssembly); assertEquals(STR,locatedAssembly.getA...
/** * Project it setup ok * When Relative output path defined * Then assembly should be in relative dir below project */
Project it setup ok When Relative output path defined Then assembly should be in relative dir below project
RelativeAssemblyDefined_ExpectNotNull
{ "repo_name": "peterstevens130561/vstowrapper", "path": "src/test/java/com/stevpet/sonar/plugins/dotnet/utils/vstowrapper/implementation/VisualStudioAssemblyLocatorTest.java", "license": "lgpl-3.0", "size": 5490 }
[ "java.io.File", "org.junit.Assert", "org.mockito.Mockito" ]
import java.io.File; import org.junit.Assert; import org.mockito.Mockito;
import java.io.*; import org.junit.*; import org.mockito.*;
[ "java.io", "org.junit", "org.mockito" ]
java.io; org.junit; org.mockito;
604,001
public static void closeQuietly(OutputStream output) { try { if (output != null) { output.close(); } } catch (IOException ioe) { // ignore } }
static void function(OutputStream output) { try { if (output != null) { output.close(); } } catch (IOException ioe) { } }
/** * Unconditionally close an <code>OutputStream</code>. * <p> * Equivalent to {@link OutputStream#close()}, except any exceptions will be ignored. * This is typically used in finally blocks. * * @param output the OutputStream to close, may be null or already closed */
Unconditionally close an <code>OutputStream</code>. Equivalent to <code>OutputStream#close()</code>, except any exceptions will be ignored. This is typically used in finally blocks
closeQuietly
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Email/src/org/apache/commons/io/IOUtils.java", "license": "gpl-2.0", "size": 48056 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,422,117
@PostConstruct public void validate() { Validate.notNull(serviceAdapter); }
void function() { Validate.notNull(serviceAdapter); }
/** * Validates this object. * * @throws IllegalArgumentException if a validation error occurs */
Validates this object
validate
{ "repo_name": "nagyist/marketcetera", "path": "trunk/modules/marketdata/marketdata-core/src/main/java/org/marketcetera/marketdata/core/rpc/MarketDataRpcService.java", "license": "apache-2.0", "size": 18506 }
[ "org.apache.commons.lang.Validate" ]
import org.apache.commons.lang.Validate;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
2,165,452
public static List getAltNames(X509Certificate certificate, Integer[] nameTypes) { Logger log = getLogger(); if (certificate == null) { return null; } List<Object> names = new LinkedList<Object>(); Collection<List<?>> altNames = null; try { al...
static List function(X509Certificate certificate, Integer[] nameTypes) { Logger log = getLogger(); if (certificate == null) { return null; } List<Object> names = new LinkedList<Object>(); Collection<List<?>> altNames = null; try { altNames = X509ExtensionUtil.getSubjectAlternativeNames(certificate); } catch (Certificat...
/** * Gets the list of alternative names of a given name type. * * @param certificate the certificate to extract the alternative names from * @param nameTypes the name types * * @return the alt names, of the given type, within the cert */
Gets the list of alternative names of a given name type
getAltNames
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/xmltooling/org/opensaml/xml/security/x509/X509Util.java", "license": "gpl-2.0", "size": 18825 }
[ "java.security.cert.CertificateParsingException", "java.security.cert.X509Certificate", "java.util.Collection", "java.util.LinkedList", "java.util.List", "org.bouncycastle.x509.extension.X509ExtensionUtil", "org.slf4j.Logger" ]
import java.security.cert.CertificateParsingException; import java.security.cert.X509Certificate; import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.bouncycastle.x509.extension.X509ExtensionUtil; import org.slf4j.Logger;
import java.security.cert.*; import java.util.*; import org.bouncycastle.x509.extension.*; import org.slf4j.*;
[ "java.security", "java.util", "org.bouncycastle.x509", "org.slf4j" ]
java.security; java.util; org.bouncycastle.x509; org.slf4j;
2,289,259
protected void _postEdit(UndoableEdit edit) { UndoableEditEvent event; Iterator iter; // Do nothing if we have no listeners. if (listeners.isEmpty()) return; event = new UndoableEditEvent(realSource, edit); // We clone the vector because this allows listeners to register // or u...
void function(UndoableEdit edit) { UndoableEditEvent event; Iterator iter; if (listeners.isEmpty()) return; event = new UndoableEditEvent(realSource, edit); iter = ((Vector) listeners.clone()).iterator(); while (iter.hasNext()) ((UndoableEditListener) iter.next()).undoableEditHappened(event); }
/** * Notifies all registered listeners that an {@link * UndoableEditEvent} has occured. * * <p><b>Lack of Thread Safety:</b> It is <em>not</em> safe to call * this method from concurrent threads, unless the call is protected * by a synchronization on this <code>UndoableEditSupport</code> * instanc...
Notifies all registered listeners that an <code>UndoableEditEvent</code> has occured. Lack of Thread Safety: It is not safe to call this method from concurrent threads, unless the call is protected by a synchronization on this <code>UndoableEditSupport</code> instance
_postEdit
{ "repo_name": "aosm/gcc_40", "path": "libjava/javax/swing/undo/UndoableEditSupport.java", "license": "gpl-2.0", "size": 8008 }
[ "java.util.Iterator", "java.util.Vector", "javax.swing.event.UndoableEditEvent", "javax.swing.event.UndoableEditListener" ]
import java.util.Iterator; import java.util.Vector; import javax.swing.event.UndoableEditEvent; import javax.swing.event.UndoableEditListener;
import java.util.*; import javax.swing.event.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
927,874
FeatureMap getAnyAttribute();
FeatureMap getAnyAttribute();
/** * Returns the value of the '<em><b>Any Attribute</b></em>' attribute list. * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the value of the '<em>Any Attribute</em>' attribute list. * @see org.liquibase...
Returns the value of the 'Any Attribute' attribute list. The list contents are of type <code>org.eclipse.emf.ecore.util.FeatureMap.Entry</code>.
getAnyAttribute
{ "repo_name": "Treehopper/EclipseAugments", "path": "liquibase-editor/eu.hohenegger.xsd.liquibase/src-gen/org/liquibase/xml/ns/dbchangelog/AddLookupTableType.java", "license": "epl-1.0", "size": 12207 }
[ "org.eclipse.emf.ecore.util.FeatureMap" ]
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,599,296
void checkMoveValidity(INodesInPath srcIIP, INodesInPath dstIIP, String src) throws IOException { assert dir.hasReadLock(); final EncryptionZoneInt srcEZI = getEncryptionZoneForPath(srcIIP); final EncryptionZoneInt dstEZI = getEncryptionZoneForPath(dstIIP); final boolean srcInEZ = (srcEZI != nul...
void checkMoveValidity(INodesInPath srcIIP, INodesInPath dstIIP, String src) throws IOException { assert dir.hasReadLock(); final EncryptionZoneInt srcEZI = getEncryptionZoneForPath(srcIIP); final EncryptionZoneInt dstEZI = getEncryptionZoneForPath(dstIIP); final boolean srcInEZ = (srcEZI != null); final boolean dstInE...
/** * Throws an exception if the provided path cannot be renamed into the * destination because of differing encryption zones. * <p/> * Called while holding the FSDirectory lock. * * @param srcIIP source IIP * @param dstIIP destination IIP * @param src source path, used for debugging * @th...
Throws an exception if the provided path cannot be renamed into the destination because of differing encryption zones. Called while holding the FSDirectory lock
checkMoveValidity
{ "repo_name": "messi49/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EncryptionZoneManager.java", "license": "apache-2.0", "size": 12282 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,123,349
public final void setYear(int year) { if (year == DatatypeConstants.FIELD_UNDEFINED) { this.year = DatatypeConstants.FIELD_UNDEFINED; this.eon = null; } else if (Math.abs(year) < BILLION_I) { this.year = year; this.eon = null; } else { ...
final void function(int year) { if (year == DatatypeConstants.FIELD_UNDEFINED) { this.year = DatatypeConstants.FIELD_UNDEFINED; this.eon = null; } else if (Math.abs(year) < BILLION_I) { this.year = year; this.eon = null; } else { BigInteger theYear = BigInteger.valueOf((long) year); BigInteger remainder = theYear.remai...
/** * <p>Set year of XSD <code>dateTime</code> year field.</p> * * <p>Unset this field by invoking the setter with a parameter value of * {@link DatatypeConstants#FIELD_UNDEFINED}.</p> * * <p>Note: if the absolute value of the <code>year</code> parameter * is less than 10^9, the eon c...
Set year of XSD <code>dateTime</code> year field. Unset this field by invoking the setter with a parameter value of <code>DatatypeConstants#FIELD_UNDEFINED</code>. Note: if the absolute value of the <code>year</code> parameter is less than 10^9, the eon component of the XSD year field is set to <code>null</code> by thi...
setYear
{ "repo_name": "md-5/jdk10", "path": "src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java", "license": "gpl-2.0", "size": 116736 }
[ "java.math.BigInteger", "javax.xml.datatype.DatatypeConstants" ]
import java.math.BigInteger; import javax.xml.datatype.DatatypeConstants;
import java.math.*; import javax.xml.datatype.*;
[ "java.math", "javax.xml" ]
java.math; javax.xml;
2,060,974
public E appendXml(XmlStringBuilder xml);
E function(XmlStringBuilder xml);
/** * Appends xml markup to end of document. * * @param xml * @return the first inserted element, or null if text is * at that point. */
Appends xml markup to end of document
appendXml
{ "repo_name": "vega113/incubator-wave", "path": "wave/src/main/java/org/waveprotocol/wave/model/document/MutableDocument.java", "license": "apache-2.0", "size": 6362 }
[ "org.waveprotocol.wave.model.document.util.XmlStringBuilder" ]
import org.waveprotocol.wave.model.document.util.XmlStringBuilder;
import org.waveprotocol.wave.model.document.util.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
2,484,299
public Element create(String prefix, Document doc) { return new SVGOMSetElement(prefix, (AbstractDocument)doc); } } protected static class StopElementFactory implements ElementFactory { public StopElementFactory() {}
Element function(String prefix, Document doc) { return new SVGOMSetElement(prefix, (AbstractDocument)doc); } } protected static class StopElementFactory implements ElementFactory { public StopElementFactory() {}
/** * Creates an instance of the associated element type. */
Creates an instance of the associated element type
create
{ "repo_name": "SlavaRa/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/svg/SVGDOMImplementation.java", "license": "apache-2.0", "size": 54290 }
[ "org.apache.flex.forks.batik.dom.AbstractDocument", "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.apache.flex.forks.batik.dom.AbstractDocument; import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.apache.flex.forks.batik.dom.*; import org.w3c.dom.*;
[ "org.apache.flex", "org.w3c.dom" ]
org.apache.flex; org.w3c.dom;
1,787,010
@Override public int compareTo(@NotNull IdentifierMatch o) { return new CompareToBuilder() .append(identifierConfidence, o.identifierConfidence) .append(identifier, o.identifier) .toComparison(); } }
int function(@NotNull IdentifierMatch o) { return new CompareToBuilder() .append(identifierConfidence, o.identifierConfidence) .append(identifier, o.identifier) .toComparison(); } }
/** * Standard implementation of compareTo that compares identifier * confidence, evidence confidence, and then the identifier. * * @param o the IdentifierMatch to compare to * @return the natural ordering of IdentifierMatch */
Standard implementation of compareTo that compares identifier confidence, evidence confidence, and then the identifier
compareTo
{ "repo_name": "jeremylong/DependencyCheck", "path": "core/src/main/java/org/owasp/dependencycheck/analyzer/CPEAnalyzer.java", "license": "apache-2.0", "size": 58902 }
[ "org.apache.commons.lang3.builder.CompareToBuilder", "org.jetbrains.annotations.NotNull" ]
import org.apache.commons.lang3.builder.CompareToBuilder; import org.jetbrains.annotations.NotNull;
import org.apache.commons.lang3.builder.*; import org.jetbrains.annotations.*;
[ "org.apache.commons", "org.jetbrains.annotations" ]
org.apache.commons; org.jetbrains.annotations;
1,189,114
public static boolean isSuperClassOfGlobalVar(OntClass obj, List<String> globalVars, String belAnnoProp) { NodeIterator belt; RDFNode BELTerm; String term; ExtendedIterator<OntClass> subclasses = obj.listSubClasses(); OntClass nextSubClass; for (String v : globalVars){ while (subclasses.has...
static boolean function(OntClass obj, List<String> globalVars, String belAnnoProp) { NodeIterator belt; RDFNode BELTerm; String term; ExtendedIterator<OntClass> subclasses = obj.listSubClasses(); OntClass nextSubClass; for (String v : globalVars){ while (subclasses.hasNext()){ nextSubClass = subclasses.next(); belt = n...
/** * checks if obj is a super class of some global variable * @param obj * @param globalVars * @param belAnnoProp * @return */
checks if obj is a super class of some global variable
isSuperClassOfGlobalVar
{ "repo_name": "pybel/bel2abm", "path": "BEL2ABM/src/de/fraunhofer/scai/Utils.java", "license": "apache-2.0", "size": 36742 }
[ "com.hp.hpl.jena.ontology.OntClass", "com.hp.hpl.jena.rdf.model.NodeIterator", "com.hp.hpl.jena.rdf.model.RDFNode", "com.hp.hpl.jena.util.iterator.ExtendedIterator", "java.util.List" ]
import com.hp.hpl.jena.ontology.OntClass; import com.hp.hpl.jena.rdf.model.NodeIterator; import com.hp.hpl.jena.rdf.model.RDFNode; import com.hp.hpl.jena.util.iterator.ExtendedIterator; import java.util.List;
import com.hp.hpl.jena.ontology.*; import com.hp.hpl.jena.rdf.model.*; import com.hp.hpl.jena.util.iterator.*; import java.util.*;
[ "com.hp.hpl", "java.util" ]
com.hp.hpl; java.util;
2,903,424
this.callbackContext = callbackContext; this.executeArgs = args; if (android.os.Build.VERSION.RELEASE.startsWith("1.")) { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, ContactManager.NOT_SUPPORTED_ERROR)); return true; ...
this.callbackContext = callbackContext; this.executeArgs = args; if (android.os.Build.VERSION.RELEASE.startsWith("1.")) { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, ContactManager.NOT_SUPPORTED_ERROR)); return true; } if (this.contactAccessor == null) { this.contactAccessor = new Conta...
/** * Executes the request and returns PluginResult. * * @param action The action to execute. * @param args JSONArray of arguments for the plugin. * @param callbackContext The callback context used when calling back into JavaScript. * @return True...
Executes the request and returns PluginResult
execute
{ "repo_name": "pierre-vigier/cordova-plugin-contacts", "path": "src/android/ContactManager.java", "license": "apache-2.0", "size": 10355 }
[ "org.apache.cordova.PluginResult" ]
import org.apache.cordova.PluginResult;
import org.apache.cordova.*;
[ "org.apache.cordova" ]
org.apache.cordova;
2,160,859
public List<TopicPartition> partition(List<TopicPartition> allPartitions, TopologyContext context);
List<TopicPartition> function(List<TopicPartition> allPartitions, TopologyContext context);
/** * Get the partitions for this assignment * @param allPartitions all of the partitions that the set of spouts want to subscribe to, in a strict ordering * @param context the context of the topology * @return the subset of the partitions that this spout should use. */
Get the partitions for this assignment
partition
{ "repo_name": "roshannaik/storm", "path": "external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/subscription/ManualPartitioner.java", "license": "apache-2.0", "size": 1883 }
[ "java.util.List", "org.apache.kafka.common.TopicPartition", "org.apache.storm.task.TopologyContext" ]
import java.util.List; import org.apache.kafka.common.TopicPartition; import org.apache.storm.task.TopologyContext;
import java.util.*; import org.apache.kafka.common.*; import org.apache.storm.task.*;
[ "java.util", "org.apache.kafka", "org.apache.storm" ]
java.util; org.apache.kafka; org.apache.storm;
1,911,656
public Type getDiscriminatorType();
Type function();
/** * Get the discriminator type */
Get the discriminator type
getDiscriminatorType
{ "repo_name": "raedle/univis", "path": "lib/hibernate-3.1.3/src/org/hibernate/persister/entity/Loadable.java", "license": "lgpl-2.1", "size": 2207 }
[ "org.hibernate.type.Type" ]
import org.hibernate.type.Type;
import org.hibernate.type.*;
[ "org.hibernate.type" ]
org.hibernate.type;
728,322
public static <E> Iterator<E> takeLast(int howMany, Iterator<E> from) { return new MemoryIterator<E>(from, howMany); }
static <E> Iterator<E> function(int howMany, Iterator<E> from) { return new MemoryIterator<E>(from, howMany); }
/** * Creates an iterator yielding last n elements from the source iterator. * Consuming the resulting iterator yields an IllegalArgumentException if * not enough elements can be fetched. E.g: * <code>takeLast(2, [1, 2, 3]) -> [2, 3]</code> * * @param <E> the iterator element type * @...
Creates an iterator yielding last n elements from the source iterator. Consuming the resulting iterator yields an IllegalArgumentException if not enough elements can be fetched. E.g: <code>takeLast(2, [1, 2, 3]) -> [2, 3]</code>
takeLast
{ "repo_name": "emaze/emaze-dysfunctional", "path": "src/main/java/net/emaze/dysfunctional/Filtering.java", "license": "bsd-3-clause", "size": 15590 }
[ "java.util.Iterator", "net.emaze.dysfunctional.filtering.MemoryIterator" ]
import java.util.Iterator; import net.emaze.dysfunctional.filtering.MemoryIterator;
import java.util.*; import net.emaze.dysfunctional.filtering.*;
[ "java.util", "net.emaze.dysfunctional" ]
java.util; net.emaze.dysfunctional;
137,012
@Override public Adapter createBlankTypeAdapter() { if (blankTypeItemProvider == null) { blankTypeItemProvider = new BlankTypeItemProvider(this); } return blankTypeItemProvider; } protected PWProcessTypeItemProvider pwProcessTypeItemProvider;
Adapter function() { if (blankTypeItemProvider == null) { blankTypeItemProvider = new BlankTypeItemProvider(this); } return blankTypeItemProvider; } protected PWProcessTypeItemProvider pwProcessTypeItemProvider;
/** * This creates an adapter for a {@link com.odcgroup.t24.enquiry.enquiry.BlankType}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>com.odcgroup.t24.enquiry.enquiry.BlankType</code>.
createBlankTypeAdapter
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/t24/core/com.odcgroup.t24.enquiry.model.edit/src/com/odcgroup/t24/enquiry/enquiry/provider/EnquiryItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 78683 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
311,089
public static List<RankList> readInput(String inputFile, boolean mustHaveRelDoc, boolean useSparseRepresentation) { List<RankList> samples = new ArrayList<RankList>(); // int countRL = 0; int countEntries = 0; try { String content = ""; BufferedReader in = new BufferedReader(new InputStreamRe...
static List<RankList> function(String inputFile, boolean mustHaveRelDoc, boolean useSparseRepresentation) { List<RankList> samples = new ArrayList<RankList>(); int countEntries = 0; try { String content = STRASCIISTRSTR#STRReading feature file [STR]: STR... STRSTR\rReading feature file [STR]... [Done.] STR(STR ranked l...
/** * Read a set of rankings from a single file. * * @param inputFile * @param mustHaveRelDoc * @param useSparseRepresentation * @return */
Read a set of rankings from a single file
readInput
{ "repo_name": "sisinflab/lodreclib", "path": "src/main/java/ciir/umass/edu/features/FeatureManager.java", "license": "mit", "size": 19999 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
811,589
public static <K,V> Map<K,V> singletonMap(K key, V value) { return new SingletonMap<K,V>(key, value); } private static class SingletonMap<K,V> extends AbstractMap<K,V> implements Serializable { private static final long serialVersionUID = -6979724477215052911L; private final K k; private ...
static <K,V> Map<K,V> function(K key, V value) { return new SingletonMap<K,V>(key, value); } private static class SingletonMap<K,V> extends AbstractMap<K,V> implements Serializable { private static final long serialVersionUID = -6979724477215052911L; private final K k; private final V v; SingletonMap(K key, V value) { ...
/** * Returns an immutable map, mapping only the specified key to the * specified value. The returned map is serializable. * * @param key the sole key to be stored in the returned map. * @param value the value to which the returned map maps <tt>key</tt>. * @return an immutable map contain...
Returns an immutable map, mapping only the specified key to the specified value. The returned map is serializable
singletonMap
{ "repo_name": "jgaltidor/VarJ", "path": "analyzed_libs/jdk1.6.0_06_src/java/util/Collections.java", "license": "mit", "size": 139175 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,337,785
public void setRangeAxis(ValueAxis axis) { if (axis != null) { axis.setPlot(this); } // plot is likely registered as a listener with the existing axis... ValueAxis existing = getRangeAxis(); if (existing != null) { existing.removeChangeListener(this...
void function(ValueAxis axis) { if (axis != null) { axis.setPlot(this); } ValueAxis existing = getRangeAxis(); if (existing != null) { existing.removeChangeListener(this); } this.rangeAxes.set(0, axis); if (axis != null) { axis.configure(); axis.addChangeListener(this); } fireChangeEvent(); }
/** * Sets the range axis for the plot and sends a {@link PlotChangeEvent} to * all registered listeners. * * @param axis the axis (<code>null</code> permitted). * * @see #getRangeAxis() * @see #setRangeAxis(int, ValueAxis) */
Sets the range axis for the plot and sends a <code>PlotChangeEvent</code> to all registered listeners
setRangeAxis
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/main/java/org/jfree/chart/plot/XYPlot.java", "license": "gpl-3.0", "size": 198838 }
[ "org.jfree.chart.axis.ValueAxis" ]
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.axis.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,289,410
public void setOnRefreshListener(OnRefreshListener2<T> listener);
void function(OnRefreshListener2<T> listener);
/** * Set OnRefreshListener for the Widget * * @param listener - Listener to be used when the Widget is set to Refresh */
Set OnRefreshListener for the Widget
setOnRefreshListener
{ "repo_name": "guogu82/garytool", "path": "app/src/main/java/com/gary/garytool/view/pulltorefresh/IPullToRefresh.java", "license": "apache-2.0", "size": 8266 }
[ "com.gary.garytool.view.pulltorefresh.PullToRefreshBase" ]
import com.gary.garytool.view.pulltorefresh.PullToRefreshBase;
import com.gary.garytool.view.pulltorefresh.*;
[ "com.gary.garytool" ]
com.gary.garytool;
358,147
public void setObservations(List<CassiniObservation> observations) { this.observations = observations; }
void function(List<CassiniObservation> observations) { this.observations = observations; }
/** * Sets the observations. * * @param observations * the observations to set */
Sets the observations
setObservations
{ "repo_name": "Small-Bodies-Node/ntl_archive_db_demo", "path": "import_and_persistence/src/java/main/gov/nasa/pds/processors/impl/profile/cassini/CassiniObservationInfo.java", "license": "bsd-3-clause", "size": 4392 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,281,310
@Test public void testFilter() { trackFilter.setTrackId("1"); assertEquals("Asserting filter tracks", trackOne, trackFilter.filter(tracks).get(0)); trackFilter.setTrackId("2"); assertNotEquals("Asserting filter tracks", trackOne, trackFilter.filter(tracks).get(0)); assert...
void function() { trackFilter.setTrackId("1"); assertEquals(STR, trackOne, trackFilter.filter(tracks).get(0)); trackFilter.setTrackId("2"); assertNotEquals(STR, trackOne, trackFilter.filter(tracks).get(0)); assertEquals(STR, trackTwo, trackFilter.filter(tracks).get(0)); }
/** * Test of the filter method */
Test of the filter method
testFilter
{ "repo_name": "Limmen/chinook", "path": "java_backend/chinook_rest/src/test/java/limmen/business/services/filters/TrackFilterTest.java", "license": "mit", "size": 2407 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,696,559
@Override public synchronized void unload() throws ServletException { // Nothing to do if we have never loaded the instance if (!singleThreadModel && (instance == null)) return; unloading = true; // Loaf a while if the current instance is allocated // (possi...
synchronized void function() throws ServletException { if (!singleThreadModel && (instance == null)) return; unloading = true; if (countAllocated.get() > 0) { int nRetries = 0; long delay = unloadDelay / 20; while ((nRetries < 21) && (countAllocated.get() > 0)) { if ((nRetries % 10) == 0) { log.info(sm.getString(STR, c...
/** * Unload all initialized instances of this servlet, after calling the * <code>destroy()</code> method for each instance. This can be used, * for example, prior to shutting down the entire servlet engine, or * prior to reloading all of the classes from the Loader associated with * our Loade...
Unload all initialized instances of this servlet, after calling the <code>destroy()</code> method for each instance. This can be used, for example, prior to shutting down the entire servlet engine, or prior to reloading all of the classes from the Loader associated with our Loader's repository
unload
{ "repo_name": "SourceStudyNotes/Tomcat8", "path": "src/main/java/org/apache/catalina/core/StandardWrapper.java", "license": "apache-2.0", "size": 59441 }
[ "java.io.PrintStream", "javax.servlet.Servlet", "javax.servlet.ServletException", "org.apache.catalina.Context", "org.apache.catalina.Globals", "org.apache.catalina.InstanceEvent", "org.apache.catalina.security.SecurityUtil", "org.apache.tomcat.util.ExceptionUtils", "org.apache.tomcat.util.log.Syste...
import java.io.PrintStream; import javax.servlet.Servlet; import javax.servlet.ServletException; import org.apache.catalina.Context; import org.apache.catalina.Globals; import org.apache.catalina.InstanceEvent; import org.apache.catalina.security.SecurityUtil; import org.apache.tomcat.util.ExceptionUtils; import org.ap...
import java.io.*; import javax.servlet.*; import org.apache.catalina.*; import org.apache.catalina.security.*; import org.apache.tomcat.util.*; import org.apache.tomcat.util.log.*; import org.apache.tomcat.util.modeler.*;
[ "java.io", "javax.servlet", "org.apache.catalina", "org.apache.tomcat" ]
java.io; javax.servlet; org.apache.catalina; org.apache.tomcat;
1,514,858
public TypeDescriptor<W> getWindowTypeDescriptor() { return new TypeDescriptor<W>(this) {}; } /** * {@inheritDoc}
TypeDescriptor<W> function() { return new TypeDescriptor<W>(this) {}; } /** * {@inheritDoc}
/** * Returns a {@link TypeDescriptor} capturing what is known statically about the window type of * this {@link WindowFn} instance's most-derived class. * * <p>In the normal case of a concrete {@link WindowFn} subclass with no generic type parameters * of its own (including anonymous inner classes), thi...
Returns a <code>TypeDescriptor</code> capturing what is known statically about the window type of this <code>WindowFn</code> instance's most-derived class. In the normal case of a concrete <code>WindowFn</code> subclass with no generic type parameters of its own (including anonymous inner classes), this will be a compl...
getWindowTypeDescriptor
{ "repo_name": "amitsela/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/WindowFn.java", "license": "apache-2.0", "size": 7171 }
[ "org.apache.beam.sdk.values.TypeDescriptor" ]
import org.apache.beam.sdk.values.TypeDescriptor;
import org.apache.beam.sdk.values.*;
[ "org.apache.beam" ]
org.apache.beam;
878,017
public void timeLinguist(int numRuns, int numFrames, int maxBeam) { // this test invokes the linguist using access patterns that // are similar to a real search. It allows for timing and // profiling of the linguist, independent of the search // or scoring Random random ...
void function(int numRuns, int numFrames, int maxBeam) { Random random = new Random(1000); Timer frameTimer = TimerPool.getTimer(this, STR); Timer totalTimer = TimerPool.getTimer(this, STR); System.out.println(STR + numRuns + STR + numFrames + STR + maxBeam); totalTimer.start(); for (int runs = 0; runs < numRuns; runs+...
/** * Times the lingust * * @param numRuns the number of simulated runs * @param numFrames the number of simulated frames * @param maxBeam the size of the beam */
Times the lingust
timeLinguist
{ "repo_name": "juanma2268/jumbertoTeia2600", "path": "jumbertoNetbeans7.2/src/sphinx4/edu/cmu/sphinx/linguist/util/LinguistTimer.java", "license": "gpl-2.0", "size": 4801 }
[ "edu.cmu.sphinx.linguist.SearchState", "edu.cmu.sphinx.util.Timer", "edu.cmu.sphinx.util.TimerPool", "java.util.ArrayList", "java.util.Collections", "java.util.List", "java.util.Random" ]
import edu.cmu.sphinx.linguist.SearchState; import edu.cmu.sphinx.util.Timer; import edu.cmu.sphinx.util.TimerPool; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random;
import edu.cmu.sphinx.linguist.*; import edu.cmu.sphinx.util.*; import java.util.*;
[ "edu.cmu.sphinx", "java.util" ]
edu.cmu.sphinx; java.util;
2,089,583
private Lop getMaxPoolOutputLop() throws HopsException, LopsException { if(op != ConvOp.MAX_POOLING_BACKWARD) return null; Hop inputImage = getInput().get(0); for(Hop tmpParent : inputImage.getParent()) { if(!(tmpParent instanceof ConvolutionOp)) continue; ConvolutionOp parent = (ConvolutionOp)...
Lop function() throws HopsException, LopsException { if(op != ConvOp.MAX_POOLING_BACKWARD) return null; Hop inputImage = getInput().get(0); for(Hop tmpParent : inputImage.getParent()) { if(!(tmpParent instanceof ConvolutionOp)) continue; ConvolutionOp parent = (ConvolutionOp) tmpParent; if(parent.getOp() == ConvOp.MAX_...
/** * Returns the output lop of maxpool operation with same parameters as this hop. * If corresponding output lop is not found or if this is not a max_pool_backward operation, this function returns null * * @return output lop of maxpool operation with same parameters as this hop * @throws HopsException if er...
Returns the output lop of maxpool operation with same parameters as this hop. If corresponding output lop is not found or if this is not a max_pool_backward operation, this function returns null
getMaxPoolOutputLop
{ "repo_name": "asurve/systemml", "path": "src/main/java/org/apache/sysml/hops/ConvolutionOp.java", "license": "apache-2.0", "size": 34340 }
[ "org.apache.sysml.lops.Lop", "org.apache.sysml.lops.LopsException" ]
import org.apache.sysml.lops.Lop; import org.apache.sysml.lops.LopsException;
import org.apache.sysml.lops.*;
[ "org.apache.sysml" ]
org.apache.sysml;
1,201,018
protected IFigure setupContentPane(IFigure nodeShape) { if (nodeShape.getLayoutManager() == null) { ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); layout.setSpacing(5); nodeShape.setLayoutManager(layout); } return nodeShape; // use nodeShape itself as contentPane }
IFigure function(IFigure nodeShape) { if (nodeShape.getLayoutManager() == null) { ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); layout.setSpacing(5); nodeShape.setLayoutManager(layout); } return nodeShape; }
/** * Default implementation treats passed figure as content pane. * Respects layout one may have set for generated figure. * @param nodeShape instance of generated figure class * @generated */
Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure
setupContentPane
{ "repo_name": "harsha1979/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/parts/CacheMediatorEditPart.java", "license": "apache-2.0", "size": 12522 }
[ "org.eclipse.draw2d.IFigure", "org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout" ]
import org.eclipse.draw2d.IFigure; import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.draw2d.*; import org.eclipse.gmf.runtime.draw2d.ui.figures.*;
[ "org.eclipse.draw2d", "org.eclipse.gmf" ]
org.eclipse.draw2d; org.eclipse.gmf;
2,915,811
public static void fullyDeleteOnExit(final File file) { file.deleteOnExit(); if (file.isDirectory()) { File[] files = file.listFiles(); for (File child : files) { fullyDeleteOnExit(child); } } }
static void function(final File file) { file.deleteOnExit(); if (file.isDirectory()) { File[] files = file.listFiles(); for (File child : files) { fullyDeleteOnExit(child); } } }
/** * Register all files recursively to be deleted on exit. * @param file File/directory to be deleted */
Register all files recursively to be deleted on exit
fullyDeleteOnExit
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java", "license": "gpl-3.0", "size": 48661 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,943,865
public synchronized void initScriptsFramework(String framework) { Message msg = mJSHandler.obtainMessage(); msg.obj = framework; msg.what = WXJSBridgeMsgType.INIT_FRAMEWORK; msg.setTarget(mJSHandler); msg.sendToTarget(); }
synchronized void function(String framework) { Message msg = mJSHandler.obtainMessage(); msg.obj = framework; msg.what = WXJSBridgeMsgType.INIT_FRAMEWORK; msg.setTarget(mJSHandler); msg.sendToTarget(); }
/** * Initialize JavaScript framework * @param framework String representation of the framework to be init. */
Initialize JavaScript framework
initScriptsFramework
{ "repo_name": "weexext/ucar-weex-core", "path": "platforms/android/weex-sdk16/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java", "license": "apache-2.0", "size": 59323 }
[ "android.os.Message", "com.taobao.weex.common.WXJSBridgeMsgType" ]
import android.os.Message; import com.taobao.weex.common.WXJSBridgeMsgType;
import android.os.*; import com.taobao.weex.common.*;
[ "android.os", "com.taobao.weex" ]
android.os; com.taobao.weex;
1,227,249