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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public boolean loadCache(boolean force) {
try {
// Our cache depends on the store, update it first
MountTableStore mountTable = this.getMountTableStore();
mountTable.loadCache(force);
GetMountTableEntriesRequest request =
GetMountTableEntriesRequest.newInstance("/");... | boolean function(boolean force) { try { MountTableStore mountTable = this.getMountTableStore(); mountTable.loadCache(force); GetMountTableEntriesRequest request = GetMountTableEntriesRequest.newInstance("/"); GetMountTableEntriesResponse response = mountTable.getMountTableEntries(request); List<MountTable> records = re... | /**
* Replaces the current in-memory cached of the mount table with a new
* version fetched from the data store.
*/ | Replaces the current in-memory cached of the mount table with a new version fetched from the data store | loadCache | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/MountTableResolver.java",
"license": "apache-2.0",
"size": 19009
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hdfs.server.federation.store.MountTableStore",
"org.apache.hadoop.hdfs.server.federation.store.protocol.GetMountTableEntriesRequest",
"org.apache.hadoop.hdfs.server.federation.store.protocol.GetMountTableEntriesResponse",
"org.apache.hadoop.hdfs.... | import java.io.IOException; import java.util.List; import org.apache.hadoop.hdfs.server.federation.store.MountTableStore; import org.apache.hadoop.hdfs.server.federation.store.protocol.GetMountTableEntriesRequest; import org.apache.hadoop.hdfs.server.federation.store.protocol.GetMountTableEntriesResponse; import org.ap... | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.federation.store.*; import org.apache.hadoop.hdfs.server.federation.store.protocol.*; import org.apache.hadoop.hdfs.server.federation.store.records.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,590,866 |
@Delegate
KeyApi getKeyApi(); | KeyApi getKeyApi(); | /**
* Provides synchronous access to Key features.
*/ | Provides synchronous access to Key features | getKeyApi | {
"repo_name": "hardfish/justTest",
"path": "joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApi.java",
"license": "apache-2.0",
"size": 2534
} | [
"org.jclouds.joyent.cloudapi.v6_5.features.KeyApi"
] | import org.jclouds.joyent.cloudapi.v6_5.features.KeyApi; | import org.jclouds.joyent.cloudapi.v6_5.features.*; | [
"org.jclouds.joyent"
] | org.jclouds.joyent; | 1,739,761 |
public void terminate() throws IOException {
// do nothing
} | void function() throws IOException { } | /**
* Lifecycle method to allow the LoadManager to stop any work it is doing.
*/ | Lifecycle method to allow the LoadManager to stop any work it is doing | terminate | {
"repo_name": "CodingCat/LongTermFairScheduler",
"path": "src/contrib/creditscheduler/src/java/org/apache/hadoop/mapred/LoadManager.java",
"license": "apache-2.0",
"size": 3829
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,006,401 |
public OffsetDateTime getDateProperty() {
if (this.dateProperty == null) {
return null;
}
return this.dateProperty.getDateTime();
} | OffsetDateTime function() { if (this.dateProperty == null) { return null; } return this.dateProperty.getDateTime(); } | /**
* Get the dateProperty property: The Date property.
*
* @return the dateProperty value.
*/ | Get the dateProperty property: The Date property | getDateProperty | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/PathsUpdateHeaders.java",
"license": "mit",
"size": 11889
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 2,318,066 |
public AbstractMap<String, String> get_schema(String tableName) throws MetaException, UnknownTableException, UnknownDBException {
this.incrementCounter("get_schema");
String dbName = "default";
LOG.debug("get_schema(" + dbName + "," + tableName + ")");
try {
Table t = new DB(dbName, ... | AbstractMap<String, String> function(String tableName) throws MetaException, UnknownTableException, UnknownDBException { this.incrementCounter(STR); String dbName = STR; LOG.debug(STR + dbName + "," + tableName + ")"); try { Table t = new DB(dbName, conf_).getTable(tableName, true); Properties p = t.getSchema(); HashMa... | /**
* get_schema
*
* Gets the (opaque) schema which is currently represented as a key=>value map.
*
* @param name - the name of the table
* @return the key/value of the opaque schema
* @exception MetaException if internal problem
* @exception UnknownTableException if the table do... | get_schema Gets the (opaque) schema which is currently represented as a key=>value map | get_schema | {
"repo_name": "basicthinker/Quatrain-MapReduce",
"path": "src/contrib/hive/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreServer.java",
"license": "apache-2.0",
"size": 18891
} | [
"java.util.AbstractMap",
"java.util.Enumeration",
"java.util.HashMap",
"java.util.Properties",
"org.apache.hadoop.hive.metastore.MetaStoreUtils",
"org.apache.hadoop.hive.metastore.api.MetaException",
"org.apache.hadoop.hive.metastore.api.UnknownDBException",
"org.apache.hadoop.hive.metastore.api.Unkno... | import java.util.AbstractMap; import java.util.Enumeration; import java.util.HashMap; import java.util.Properties; import org.apache.hadoop.hive.metastore.MetaStoreUtils; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.UnknownDBException; import org.apache.hadoop.h... | import java.util.*; import org.apache.hadoop.hive.metastore.*; import org.apache.hadoop.hive.metastore.api.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,149,845 |
ServiceResponse<DatetimeWrapper> getDateTime() throws ErrorException, IOException; | ServiceResponse<DatetimeWrapper> getDateTime() throws ErrorException, IOException; | /**
* Get complex types with datetime properties.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the DatetimeWrapper object wrapped in {@link ServiceResponse} if successful.
*/ | Get complex types with datetime properties | getDateTime | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodycomplex/Primitives.java",
"license": "mit",
"size": 25059
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 502,105 |
public void flushAll( ) throws ChartException
{
int options = DeferredCache.FLUSH_PLANE_SHADOW |
DeferredCache.FLUSH_PLANE |
DeferredCache.FLUSH_LINE |
DeferredCache.FLUSH_3D;
// Flush specified blocks.
flushOptions( options );
// Flush markers and labels.
flushMarkersNLinesNLabels( );
clea... | void function( ) throws ChartException { int options = DeferredCache.FLUSH_PLANE_SHADOW DeferredCache.FLUSH_PLANE DeferredCache.FLUSH_LINE DeferredCache.FLUSH_3D; flushOptions( options ); flushMarkersNLinesNLabels( ); clearDC( ); } | /**
* Flush all <code>DeferredCache</code> in the manager.
*
* @throws ChartException
*/ | Flush all <code>DeferredCache</code> in the manager | flushAll | {
"repo_name": "sguan-actuate/birt",
"path": "chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/render/DeferredCacheManager.java",
"license": "epl-1.0",
"size": 9346
} | [
"org.eclipse.birt.chart.exception.ChartException"
] | import org.eclipse.birt.chart.exception.ChartException; | import org.eclipse.birt.chart.exception.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 2,484,101 |
private static boolean isAssignOperator(int parentType) {
return Arrays.binarySearch(ASSIGN_OPERATOR_TYPES, parentType) >= 0;
}
/**
* Checks if current variable is defined in
* {@link TokenTypes#FOR_INIT for-loop init}, e.g.:
* <p>
* {@code
* for (int i = 0, j = 0; i < j; ... | static boolean function(int parentType) { return Arrays.binarySearch(ASSIGN_OPERATOR_TYPES, parentType) >= 0; } /** * Checks if current variable is defined in * {@link TokenTypes#FOR_INIT for-loop init}, e.g.: * <p> * { * for (int i = 0, j = 0; i < j; i++) { . . . } * } * </p> * {@code i, j} are defined in {@link Token... | /**
* Is Arithmetic operator.
* @param parentType token AST
* @return true is token type is in arithmetic operator
*/ | Is Arithmetic operator | isAssignOperator | {
"repo_name": "AkshitaKukreja30/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java",
"license": "lgpl-2.1",
"size": 27259
} | [
"com.puppycrawl.tools.checkstyle.api.TokenTypes",
"java.util.Arrays"
] | import com.puppycrawl.tools.checkstyle.api.TokenTypes; import java.util.Arrays; | import com.puppycrawl.tools.checkstyle.api.*; import java.util.*; | [
"com.puppycrawl.tools",
"java.util"
] | com.puppycrawl.tools; java.util; | 463,840 |
public void testUnique()
{
try
{
PersistenceManager pm = pmf.getPersistenceManager();
Transaction tx = pm.currentTransaction();
try
{
tx.begin();
Employee e = new Employee(123, "Barney", "Rubble", "barney.ru... | void function() { try { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); Employee e = new Employee(123, STR, STR, STR, (float)123.45, "1245C"); pm.makePersistent(e); tx.commit(); } catch (Exception e) { LOG.error(e); fail(STR + e.getMessage()); } finally {... | /**
* Test of the "unique" constraint creation. This uses the constraint on
* a field (column) and tries to insert non-unique values.
*/ | Test of the "unique" constraint creation. This uses the constraint on a field (column) and tries to insert non-unique values | testUnique | {
"repo_name": "datanucleus/tests",
"path": "jdo/rdbms/src/test/org/datanucleus/tests/datastore/SchemaTest.java",
"license": "apache-2.0",
"size": 108307
} | [
"javax.jdo.PersistenceManager",
"javax.jdo.Transaction",
"org.datanucleus.samples.models.company.Employee"
] | import javax.jdo.PersistenceManager; import javax.jdo.Transaction; import org.datanucleus.samples.models.company.Employee; | import javax.jdo.*; import org.datanucleus.samples.models.company.*; | [
"javax.jdo",
"org.datanucleus.samples"
] | javax.jdo; org.datanucleus.samples; | 1,470,501 |
public void openProject(final String filename) {
// TODO Sicherungsmassnahme: Bild nicht vorhanden, manuell suchen
this.firePropertyChange(DocumentPanelController.UPDATE_RECENTLY_USED,
null, filename);
this.openFileHelper(filename);
System.out.println("Digital: openPr... | void function(final String filename) { this.firePropertyChange(DocumentPanelController.UPDATE_RECENTLY_USED, null, filename); this.openFileHelper(filename); System.out.println(STR + filename); } | /**
* Opens the project with filename
*
* @param filename
* the filename
*/ | Opens the project with filename | openProject | {
"repo_name": "Diptychon/Diptychon",
"path": "src/Diptychon/src/de/diptychon/models/data/Digital.java",
"license": "gpl-3.0",
"size": 60359
} | [
"de.diptychon.controller.DocumentPanelController"
] | import de.diptychon.controller.DocumentPanelController; | import de.diptychon.controller.*; | [
"de.diptychon.controller"
] | de.diptychon.controller; | 1,782,973 |
public List<String> applicationGroupReferences() {
return this.applicationGroupReferences;
} | List<String> function() { return this.applicationGroupReferences; } | /**
* Get the applicationGroupReferences property: List of applicationGroup resource Ids.
*
* @return the applicationGroupReferences value.
*/ | Get the applicationGroupReferences property: List of applicationGroup resource Ids | applicationGroupReferences | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java",
"license": "mit",
"size": 5077
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,093,317 |
public void subtract(ResourceVector otherResourceVector) {
for (Map.Entry<String, Float> resource : otherResourceVector) {
setValue(resource.getKey(), getValue(resource.getKey()) - resource.getValue());
}
} | void function(ResourceVector otherResourceVector) { for (Map.Entry<String, Float> resource : otherResourceVector) { setValue(resource.getKey(), getValue(resource.getKey()) - resource.getValue()); } } | /**
* Subtract values for each resource defined in the given resource vector.
* @param otherResourceVector rhs resource vector of the subtraction
*/ | Subtract values for each resource defined in the given resource vector | subtract | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ResourceVector.java",
"license": "apache-2.0",
"size": 4234
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 880,303 |
public static ExtensionDescription getDefaultDescription(boolean required,
boolean repeatable) {
ExtensionDescription desc =
ExtensionDescription.getDefaultDescription(Sensitivity.class);
desc.setRequired(required);
desc.setRepeatable(repeatable);
return desc;
} | static ExtensionDescription function(boolean required, boolean repeatable) { ExtensionDescription desc = ExtensionDescription.getDefaultDescription(Sensitivity.class); desc.setRequired(required); desc.setRepeatable(repeatable); return desc; } | /**
* Returns the extension description, specifying whether it is required, and
* whether it is repeatable.
*
* @param required whether it is required
* @param repeatable whether it is repeatable
* @return extension description
*/ | Returns the extension description, specifying whether it is required, and whether it is repeatable | getDefaultDescription | {
"repo_name": "vanta/gdata-java-client",
"path": "java/src/com/google/gdata/data/contacts/Sensitivity.java",
"license": "apache-2.0",
"size": 4025
} | [
"com.google.gdata.data.ExtensionDescription"
] | import com.google.gdata.data.ExtensionDescription; | import com.google.gdata.data.*; | [
"com.google.gdata"
] | com.google.gdata; | 2,431,558 |
public Artifact createErrorPropagatingMiddleman(ActionOwner owner, String middlemanName,
String purpose, Iterable<Artifact> inputs, Root middlemanDir) {
Preconditions.checkArgument(inputs != null);
Preconditions.checkArgument(!Iterables.isEmpty(inputs));
// We must always create this middleman even ... | Artifact function(ActionOwner owner, String middlemanName, String purpose, Iterable<Artifact> inputs, Root middlemanDir) { Preconditions.checkArgument(inputs != null); Preconditions.checkArgument(!Iterables.isEmpty(inputs)); return createMiddleman(owner, middlemanName, purpose, inputs, middlemanDir, MiddlemanType.ERROR... | /**
* Creates a {@link MiddlemanType#ERROR_PROPAGATING_MIDDLEMAN error-propagating} middleman.
*
* @param owner the owner of the action that will be created. May not be null.
* @param middlemanName a unique file name for the middleman artifact in the {@code middlemanDir};
* in practice this is usu... | Creates a <code>MiddlemanType#ERROR_PROPAGATING_MIDDLEMAN error-propagating</code> middleman | createErrorPropagatingMiddleman | {
"repo_name": "rohitsaboo/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/MiddlemanFactory.java",
"license": "apache-2.0",
"size": 9135
} | [
"com.google.common.collect.Iterables",
"com.google.devtools.build.lib.actions.Action",
"com.google.devtools.build.lib.util.Preconditions"
] | import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.util.Preconditions; | import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.util.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 590,921 |
public void addFieldNodeValue(int index, VRMLNodeType node)
throws InvalidFieldException, InvalidFieldValueException; | void function(int index, VRMLNodeType node) throws InvalidFieldException, InvalidFieldValueException; | /**
* Used to set the field value where the field represents a SFNode or
* MFNode. The behavior of this call is dependent on whether the field is
* single or multiple.
*
* @param index The index of destination field to set
* @param node The node to set or add to this field
* @throws I... | Used to set the field value where the field represents a SFNode or MFNode. The behavior of this call is dependent on whether the field is single or multiple | addFieldNodeValue | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/web3d/vrml/nodes/VRMLProtoDeclare.java",
"license": "gpl-2.0",
"size": 10185
} | [
"org.web3d.vrml.lang.InvalidFieldException",
"org.web3d.vrml.lang.InvalidFieldValueException"
] | import org.web3d.vrml.lang.InvalidFieldException; import org.web3d.vrml.lang.InvalidFieldValueException; | import org.web3d.vrml.lang.*; | [
"org.web3d.vrml"
] | org.web3d.vrml; | 268,136 |
protected Expression neg(int opPos) throws TransformerException
{
return compileUnary(new Neg(), opPos);
} | Expression function(int opPos) throws TransformerException { return compileUnary(new Neg(), opPos); } | /**
* Compile a unary '-' operation.
*
* @param opPos The current position in the m_opMap array.
*
* @return reference to {@link com.sun.org.apache.xpath.internal.operations.Neg} instance.
*
* @throws TransformerException if a error occurs creating the Expression.
*/ | Compile a unary '-' operation | neg | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/org/apache/xpath/internal/compiler/Compiler.java",
"license": "apache-2.0",
"size": 39045
} | [
"com.sun.org.apache.xpath.internal.Expression",
"com.sun.org.apache.xpath.internal.operations.Neg",
"javax.xml.transform.TransformerException"
] | import com.sun.org.apache.xpath.internal.Expression; import com.sun.org.apache.xpath.internal.operations.Neg; import javax.xml.transform.TransformerException; | import com.sun.org.apache.xpath.internal.*; import com.sun.org.apache.xpath.internal.operations.*; import javax.xml.transform.*; | [
"com.sun.org",
"javax.xml"
] | com.sun.org; javax.xml; | 710,083 |
public void parse(String systemId) throws IOException, SAXException {
parse(new InputSource(systemId));
} | void function(String systemId) throws IOException, SAXException { parse(new InputSource(systemId)); } | /**
* Parse an XML document.
*
* @param systemId
* The absolute URL of the document.
* @exception java.io.IOException
* If there is a problem reading the raw content of the
* document.
* @exception SAXException
* If there is a problem processing... | Parse an XML document | parse | {
"repo_name": "webos21/xi",
"path": "java/jcl/src/java/org/xml/sax/helpers/ParserAdapter.java",
"license": "apache-2.0",
"size": 27159
} | [
"java.io.IOException",
"org.xml.sax.InputSource",
"org.xml.sax.SAXException"
] | import java.io.IOException; import org.xml.sax.InputSource; import org.xml.sax.SAXException; | import java.io.*; import org.xml.sax.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 895,951 |
public static void doAsPrivilege(final String methodName,
final Filter targetObject,
final Class<?>[] targetType,
final Object[] targetArguments)
throws java.lang.Exception{
doAsPriv... | static void function(final String methodName, final Filter targetObject, final Class<?>[] targetType, final Object[] targetArguments) throws java.lang.Exception{ doAsPrivilege( methodName, targetObject, targetType, targetArguments, null); } | /**
* Perform work as a particular <code>Subject</code>. Here the work
* will be granted to a <code>null</code> subject.
*
* @param methodName the method to apply the security restriction
* @param targetObject the <code>Filter</code> on which the method will
* be called.
* @par... | Perform work as a particular <code>Subject</code>. Here the work will be granted to a <code>null</code> subject | doAsPrivilege | {
"repo_name": "wenzhucjy/tomcat_source",
"path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/security/SecurityUtil.java",
"license": "apache-2.0",
"size": 16769
} | [
"javax.servlet.Filter"
] | import javax.servlet.Filter; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 1,704,519 |
public void createItems() {
mAdapter.clear();
int profileOffset = 0;
if (mAccountHeader != null && mAccountHeader.getAccountHeaderBuilder().mProfileImagesVisible) {
IProfile profile = mAccountHeader.getActiveProfile();
if (profile instanceof IDrawerItem) {
... | void function() { mAdapter.clear(); int profileOffset = 0; if (mAccountHeader != null && mAccountHeader.getAccountHeaderBuilder().mProfileImagesVisible) { IProfile profile = mAccountHeader.getActiveProfile(); if (profile instanceof IDrawerItem) { mAdapter.add(generateMiniDrawerItem((IDrawerItem) profile)); profileOffse... | /**
* creates the items for the MiniDrawer
*/ | creates the items for the MiniDrawer | createItems | {
"repo_name": "mychaelgo/MaterialDrawer",
"path": "library/src/main/java/com/mikepenz/materialdrawer/MiniDrawer.java",
"license": "apache-2.0",
"size": 17642
} | [
"com.mikepenz.materialdrawer.model.interfaces.IDrawerItem",
"com.mikepenz.materialdrawer.model.interfaces.IProfile"
] | import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem; import com.mikepenz.materialdrawer.model.interfaces.IProfile; | import com.mikepenz.materialdrawer.model.interfaces.*; | [
"com.mikepenz.materialdrawer"
] | com.mikepenz.materialdrawer; | 1,200,668 |
private void addQueryCommands(Options opt) {
Option query = OptionBuilder.withLongOpt(QUERY)
.hasArg()
.withDescription("Queries the disk balancer " +
"status of a given datanode.")
.create();
getQueryOptions().addOption(query);
opt.addOption(query);
// Please note... | void function(Options opt) { Option query = OptionBuilder.withLongOpt(QUERY) .hasArg() .withDescription(STR + STR) .create(); getQueryOptions().addOption(query); opt.addOption(query); Option verbose = OptionBuilder.withLongOpt(VERBOSE) .withDescription(STR + STR) .create(); getQueryOptions().addOption(verbose); } | /**
* Adds query command options.
*
* @param opt Options
*/ | Adds query command options | addQueryCommands | {
"repo_name": "szegedim/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DiskBalancerCLI.java",
"license": "apache-2.0",
"size": 14999
} | [
"org.apache.commons.cli.Option",
"org.apache.commons.cli.OptionBuilder",
"org.apache.commons.cli.Options"
] | import org.apache.commons.cli.Option; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,637,327 |
public void expireAllLocalSessions()
{
long timeNow = System.currentTimeMillis();
Session sessions[] = findSessions();
int expireDirect = 0 ;
int expireIndirect = 0 ;
if(log.isDebugEnabled()) log.debug("Start expire all sessions " + getName() + " at " + timeNow ... | void function() { long timeNow = System.currentTimeMillis(); Session sessions[] = findSessions(); int expireDirect = 0 ; int expireIndirect = 0 ; if(log.isDebugEnabled()) log.debug(STR + getName() + STR + timeNow + STR + sessions.length); for (int i = 0; i < sessions.length; i++) { if (sessions[i] instanceof DeltaSessi... | /**
* Expire all find sessions.
*/ | Expire all find sessions | expireAllLocalSessions | {
"repo_name": "mayonghui2112/helloWorld",
"path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/catalina/ha/session/DeltaManager.java",
"license": "apache-2.0",
"size": 53999
} | [
"org.apache.catalina.Session"
] | import org.apache.catalina.Session; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 472,738 |
Files.copy(Paths.get("./devwex.ini"), Paths.get("./devwex.ini_"), StandardCopyOption.REPLACE_EXISTING);
Files.copy(Paths.get("./devwex.xapi"), Paths.get("./devwex.ini"), StandardCopyOption.REPLACE_EXISTING);
Thread.sleep(250);
AbstractTestUtils.waitOutputFacadeStream(Abst... | Files.copy(Paths.get(STR), Paths.get(STR), StandardCopyOption.REPLACE_EXISTING); Files.copy(Paths.get(STR), Paths.get(STR), StandardCopyOption.REPLACE_EXISTING); Thread.sleep(250); AbstractTestUtils.waitOutputFacadeStream(AbstractSuite.outputStream); } | /**
* Preparation of the runtime environment.
* @throws Exception
*/ | Preparation of the runtime environment | initiate | {
"repo_name": "seanox/devwex-test",
"path": "test/com/seanox/devwex/ServiceTest_Module.java",
"license": "gpl-2.0",
"size": 6305
} | [
"java.nio.file.Files",
"java.nio.file.Paths",
"java.nio.file.StandardCopyOption"
] | import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 2,025,821 |
public void setOwnerRndSettings(List<Long> ids, Class klass)
{
if (ids == null || ids.size() == 0) {
UserNotifier un = TreeViewerAgent.getRegistry().getUserNotifier();
un.notifyInfo("Set settings", "Please select at least " +
"one element.");
return;
}
if (PojosUtil.isContainerClass(klass)) {... | void function(List<Long> ids, Class klass) { if (ids == null ids.size() == 0) { UserNotifier un = TreeViewerAgent.getRegistry().getUserNotifier(); un.notifyInfo(STR, STR + STR); return; } if (PojosUtil.isContainerClass(klass)) { MessageBox box = new MessageBox(getUI(), STR, RENDERINGSETTINGS_WARNING); if (box.centerMsg... | /**
* Implemented as specified by the {@link TreeViewer} interface.
* @see TreeViewer#setOwnerRndSettings(List, Class)
*/ | Implemented as specified by the <code>TreeViewer</code> interface | setOwnerRndSettings | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java",
"license": "gpl-2.0",
"size": 162421
} | [
"java.util.List",
"org.openmicroscopy.shoola.agents.treeviewer.TreeViewerAgent",
"org.openmicroscopy.shoola.env.ui.UserNotifier",
"org.openmicroscopy.shoola.util.PojosUtil",
"org.openmicroscopy.shoola.util.ui.MessageBox"
] | import java.util.List; import org.openmicroscopy.shoola.agents.treeviewer.TreeViewerAgent; import org.openmicroscopy.shoola.env.ui.UserNotifier; import org.openmicroscopy.shoola.util.PojosUtil; import org.openmicroscopy.shoola.util.ui.MessageBox; | import java.util.*; import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.env.ui.*; import org.openmicroscopy.shoola.util.*; import org.openmicroscopy.shoola.util.ui.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,650,541 |
public BigDecimal getUnsettleAmount() {
return this.unsettleAmount;
}
| BigDecimal function() { return this.unsettleAmount; } | /**
* get the unsettleAmount
* @return the unsettleAmount
*/ | get the unsettleAmount | getUnsettleAmount | {
"repo_name": "stserp/erp1",
"path": "source/src/com/baosight/sts/st/rp/domain/STRP0221.java",
"license": "apache-2.0",
"size": 20337
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 604,594 |
int updateByExampleSelective(@Param("record") BannedIps record, @Param("example") BannedIpsExample example); | int updateByExampleSelective(@Param(STR) BannedIps record, @Param(STR) BannedIpsExample example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table public.banned_ips
*
* @mbggenerated Sun Apr 10 19:05:37 CST 2016
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table public.banned_ips | updateByExampleSelective | {
"repo_name": "zjlywjh001/PhrackCTF-Platform-Personal",
"path": "src/main/java/top/phrack/ctf/models/dao/BannedIpsMapper.java",
"license": "apache-2.0",
"size": 3145
} | [
"org.apache.ibatis.annotations.Param",
"top.phrack.ctf.pojo.BannedIps",
"top.phrack.ctf.pojo.BannedIpsExample"
] | import org.apache.ibatis.annotations.Param; import top.phrack.ctf.pojo.BannedIps; import top.phrack.ctf.pojo.BannedIpsExample; | import org.apache.ibatis.annotations.*; import top.phrack.ctf.pojo.*; | [
"org.apache.ibatis",
"top.phrack.ctf"
] | org.apache.ibatis; top.phrack.ctf; | 1,963,799 |
protected JFrame getParent() {
return (JFrame) SwingUtilities.getWindowAncestor(m_projectTree);
} | JFrame function() { return (JFrame) SwingUtilities.getWindowAncestor(m_projectTree); } | /**
* Returns the parent window of the menu.
*
* @return The parent window.
*/ | Returns the parent window of the menu | getParent | {
"repo_name": "guiquanz/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Gui/MainWindow/ProjectTree/Nodes/CAbstractMenuBuilder.java",
"license": "apache-2.0",
"size": 9007
} | [
"javax.swing.JFrame",
"javax.swing.SwingUtilities"
] | import javax.swing.JFrame; import javax.swing.SwingUtilities; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,597,794 |
public static ListMemberRequest valueOf(ListMember member) {
JSONObject varsObj = null;
if(member.getVars() != null) {
varsObj = JSONObject.fromObject(member.getVars());
}
return new ListMemberRequest()
.setAddress(member.getAddress())
.setJSONVar(varsObj)
... | static ListMemberRequest function(ListMember member) { JSONObject varsObj = null; if(member.getVars() != null) { varsObj = JSONObject.fromObject(member.getVars()); } return new ListMemberRequest() .setAddress(member.getAddress()) .setJSONVar(varsObj) .setName(member.getName()) .setSubscribed(member.isSubscribed()); } | /**
* Converts a {@link ListMember} object into a {@link ListMemberRequest} instance
* @param member The list member to convert
* @return A list member request object
*/ | Converts a <code>ListMember</code> object into a <code>ListMemberRequest</code> instance | valueOf | {
"repo_name": "johnboyer/mailgun-manager",
"path": "mailgun-manager/src/main/java/com/rodaxsoft/mailgun/ListMemberRequest.java",
"license": "mpl-2.0",
"size": 3189
} | [
"net.sf.json.JSONObject"
] | import net.sf.json.JSONObject; | import net.sf.json.*; | [
"net.sf.json"
] | net.sf.json; | 1,143,398 |
public boolean setInitialConfiguration(final VotingConfiguration votingConfiguration) {
synchronized (mutex) {
final ClusterState currentState = getStateForMasterService();
if (isInitialConfigurationSet()) {
LOGGER.debug("initial configuration already set, ignoring {... | boolean function(final VotingConfiguration votingConfiguration) { synchronized (mutex) { final ClusterState currentState = getStateForMasterService(); if (isInitialConfigurationSet()) { LOGGER.debug(STR, votingConfiguration); return false; } if (getLocalNode().isMasterNode() == false) { LOGGER.debug(STR); throw new Coo... | /**
* Sets the initial configuration to the given {@link VotingConfiguration}. This method is safe to call
* more than once, as long as the argument to each call is the same.
*
* @param votingConfiguration The nodes that should form the initial configuration.
* @return whether this call success... | Sets the initial configuration to the given <code>VotingConfiguration</code>. This method is safe to call more than once, as long as the argument to each call is the same | setInitialConfiguration | {
"repo_name": "EvilMcJerkface/crate",
"path": "server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java",
"license": "apache-2.0",
"size": 72372
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.stream.Collectors",
"org.elasticsearch.cluster.ClusterState",
"org.elasticsearch.cluster.coordination.CoordinationMetadata",
"org.elasticsearch.cluster.metadata.Metadata",
"org.elasticsearch.cluster.node.DiscoveryNode"
] | import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.coordination.CoordinationMetadata; import org.elasticsearch.cluster.metadata.Metadata; import org.elasticsearch.cluster.node.DiscoveryNode; | import java.util.*; import java.util.stream.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.coordination.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.cluster.node.*; | [
"java.util",
"org.elasticsearch.cluster"
] | java.util; org.elasticsearch.cluster; | 1,063,870 |
public User storageCreate(String login, String passwd, String email) {
File userDir = getWorkingDir();
if (!userDir.exists()) {
userDir.mkdirs();
}
File userFile = new File(userDir, getFileName(login));
User user = new User(login, passwd, email);
String applicationOid = (String) Applic... | User function(String login, String passwd, String email) { File userDir = getWorkingDir(); if (!userDir.exists()) { userDir.mkdirs(); } File userFile = new File(userDir, getFileName(login)); User user = new User(login, passwd, email); String applicationOid = (String) Application.get().getObject(Application.OID); Timest... | /**
* Create a new user in the backend
*
* @param login Login name of the user
* @param passwd Credential of the user
* @param email Email adress of the user
* @return
*/ | Create a new user in the backend | storageCreate | {
"repo_name": "mikegr/snipsnap",
"path": "src/org/snipsnap/snip/storage/FileUserStorage.java",
"license": "gpl-2.0",
"size": 6096
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.sql.Timestamp",
"org.radeox.util.logging.Logger",
"org.snipsnap.app.Application",
"org.snipsnap.user.User"
] | import java.io.File; import java.io.FileOutputStream; import java.sql.Timestamp; import org.radeox.util.logging.Logger; import org.snipsnap.app.Application; import org.snipsnap.user.User; | import java.io.*; import java.sql.*; import org.radeox.util.logging.*; import org.snipsnap.app.*; import org.snipsnap.user.*; | [
"java.io",
"java.sql",
"org.radeox.util",
"org.snipsnap.app",
"org.snipsnap.user"
] | java.io; java.sql; org.radeox.util; org.snipsnap.app; org.snipsnap.user; | 16,210 |
void processPendingNotifications() {
RemovalNotification<K, V> notification;
while ((notification = removalNotificationQueue.poll()) != null) {
try {
removalListener.onRemoval(notification);
} catch (Throwable e) {
logger.log(Level.WARNING, "Exception thrown by removal listener", e... | void processPendingNotifications() { RemovalNotification<K, V> notification; while ((notification = removalNotificationQueue.poll()) != null) { try { removalListener.onRemoval(notification); } catch (Throwable e) { logger.log(Level.WARNING, STR, e); } } } | /**
* Notifies listeners that an entry has been automatically removed due to expiration, eviction, or
* eligibility for garbage collection. This should be called every time expireEntries or
* evictEntry is called (once the lock is released).
*/ | Notifies listeners that an entry has been automatically removed due to expiration, eviction, or eligibility for garbage collection. This should be called every time expireEntries or evictEntry is called (once the lock is released) | processPendingNotifications | {
"repo_name": "EdwardLee03/guava",
"path": "guava/src/com/google/common/cache/LocalCache.java",
"license": "apache-2.0",
"size": 151409
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 486,306 |
@Test
public void checkVisitation() {
IMeshPart part = new Polygon(); | void function() { IMeshPart part = new Polygon(); | /**
* <p>
* This operation checks Polygon to ensure that it can be correctly visited
* by a realization of the IMeshPartVisitor interface.
* </p>
*
*/ | This operation checks Polygon to ensure that it can be correctly visited by a realization of the IMeshPartVisitor interface. | checkVisitation | {
"repo_name": "nickstanish/ice",
"path": "org.eclipse.ice.viz.service.mesh.test/src/org/eclipse/ice/viz/service/mesh/datastructures/test/PolygonTester.java",
"license": "epl-1.0",
"size": 24182
} | [
"org.eclipse.ice.viz.service.mesh.datastructures.IMeshPart",
"org.eclipse.ice.viz.service.mesh.datastructures.Polygon"
] | import org.eclipse.ice.viz.service.mesh.datastructures.IMeshPart; import org.eclipse.ice.viz.service.mesh.datastructures.Polygon; | import org.eclipse.ice.viz.service.mesh.datastructures.*; | [
"org.eclipse.ice"
] | org.eclipse.ice; | 36,487 |
public ArrayList<Vote> getVotableVotes() {
ArrayList<Vote> list = new ArrayList<>();
for (Vote vote : listOfVotes) {
if (vote.getType() != VotingType.FIRST_CANDIDATE
&& vote.getType() != VotingType.SECOND_CANDIDATE) {
list.add(vote);
}
}
return list;
} | ArrayList<Vote> function() { ArrayList<Vote> list = new ArrayList<>(); for (Vote vote : listOfVotes) { if (vote.getType() != VotingType.FIRST_CANDIDATE && vote.getType() != VotingType.SECOND_CANDIDATE) { list.add(vote); } } return list; } | /**
* Get votes that are voteable.
* @return ArrayList of votes
*/ | Get votes that are voteable | getVotableVotes | {
"repo_name": "tuomount/Open-Realms-of-Stars",
"path": "src/main/java/org/openRealmOfStars/starMap/vote/Votes.java",
"license": "gpl-2.0",
"size": 6649
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 744,503 |
return new LayersBuilder(Arrays.asList(layers));
} | return new LayersBuilder(Arrays.asList(layers)); } | /**
* Returns a new LayersBuilder with all the provided layers included.
*/ | Returns a new LayersBuilder with all the provided layers included | with | {
"repo_name": "lstNull/Dividers",
"path": "dividers/src/main/java/com/karumi/dividers/LayersBuilder.java",
"license": "apache-2.0",
"size": 1504
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 775,598 |
void syncMaterial(Course course); | void syncMaterial(Course course); | /**
* Sincroniza el material del curso en el repositorio (tipicamente
* descarga los archivos)
*
* @param course un curso
*/ | Sincroniza el material del curso en el repositorio (tipicamente descarga los archivos) | syncMaterial | {
"repo_name": "jcodagnone/jiolsucker",
"path": "iolsucker/src/main/java/ar/com/leak/iolsucker/view/Repository.java",
"license": "apache-2.0",
"size": 4032
} | [
"ar.com.leak.iolsucker.model.Course"
] | import ar.com.leak.iolsucker.model.Course; | import ar.com.leak.iolsucker.model.*; | [
"ar.com.leak"
] | ar.com.leak; | 313,457 |
public synchronized void enable() throws KuraException {
s_logger.debug("enable WPA Supplicant");
//this.saveConfig();
SafeProcess proc = null;
try {
if (this.isEnabled()) {
this.disable();
}
// start wpa_supplicant
String wpaSupplicantCommand = this.formSupplicantCommand();
s_log... | synchronized void function() throws KuraException { s_logger.debug(STR); SafeProcess proc = null; try { if (this.isEnabled()) { this.disable(); } String wpaSupplicantCommand = this.formSupplicantCommand(); s_logger.debug(STR, wpaSupplicantCommand); proc = ProcessUtil.exec(wpaSupplicantCommand); int stat = proc.waitFor(... | /**
* Launches wpa_supplicant
*
* @throws Exception
*/ | Launches wpa_supplicant | enable | {
"repo_name": "markcullen/kura_Windows",
"path": "kura/org.eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/wifi/WpaSupplicant.java",
"license": "epl-1.0",
"size": 42247
} | [
"org.eclipse.kura.KuraException",
"org.eclipse.kura.core.linux.util.LinuxProcessUtil",
"org.eclipse.kura.core.util.ProcessUtil",
"org.eclipse.kura.core.util.SafeProcess"
] | import org.eclipse.kura.KuraException; import org.eclipse.kura.core.linux.util.LinuxProcessUtil; import org.eclipse.kura.core.util.ProcessUtil; import org.eclipse.kura.core.util.SafeProcess; | import org.eclipse.kura.*; import org.eclipse.kura.core.linux.util.*; import org.eclipse.kura.core.util.*; | [
"org.eclipse.kura"
] | org.eclipse.kura; | 2,513,717 |
public void handleStreamSelection( StreamInterface stream ) {
} | void function( StreamInterface stream ) { } | /**
* When an optional stream is selected, this method is called to handled the ETL metadata implications of that.
*
* @param stream
* The optional stream to handle.
*/ | When an optional stream is selected, this method is called to handled the ETL metadata implications of that | handleStreamSelection | {
"repo_name": "alina-ipatina/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/step/BaseStepMeta.java",
"license": "apache-2.0",
"size": 36587
} | [
"org.pentaho.di.trans.step.errorhandling.StreamInterface"
] | import org.pentaho.di.trans.step.errorhandling.StreamInterface; | import org.pentaho.di.trans.step.errorhandling.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,700,561 |
CompletableFuture<FlowRerouteResponseV2> rerouteFlowV2(final String flowId); | CompletableFuture<FlowRerouteResponseV2> rerouteFlowV2(final String flowId); | /**
* Performs rerouting of specific flow.
*
* @param flowId id of flow to be rerouted.
* @return updated flow path information with the result whether or not path was changed.
*/ | Performs rerouting of specific flow | rerouteFlowV2 | {
"repo_name": "jonvestal/open-kilda",
"path": "src-java/northbound-service/northbound/src/main/java/org/openkilda/northbound/service/FlowService.java",
"license": "apache-2.0",
"size": 8815
} | [
"java.util.concurrent.CompletableFuture",
"org.openkilda.northbound.dto.v2.flows.FlowRerouteResponseV2"
] | import java.util.concurrent.CompletableFuture; import org.openkilda.northbound.dto.v2.flows.FlowRerouteResponseV2; | import java.util.concurrent.*; import org.openkilda.northbound.dto.v2.flows.*; | [
"java.util",
"org.openkilda.northbound"
] | java.util; org.openkilda.northbound; | 2,485,701 |
@Override
public void prepareTest() {
int trainingSetSize = 100;
int inputSize = 10;
int outputSize = 5;
this.trainingSet = new DataSet(inputSize, outputSize);
for (int i = 0; i < trainingSetSize; i++) {
double input[] = new double[inputSize]... | void function() { int trainingSetSize = 100; int inputSize = 10; int outputSize = 5; this.trainingSet = new DataSet(inputSize, outputSize); for (int i = 0; i < trainingSetSize; i++) { double input[] = new double[inputSize]; for( int j=0; j<inputSize; j++) input[j] = Math.random(); double output[] = new double[outputSiz... | /**
* Benchmrk preparation consists of training set and neural networ creatiion.
* This method generates training set with 100 rows, where every row has 10 input and 5 output elements
* Neural network has two hiddden layers with 8 and 7 neurons, and runs learning rule for 2000 iterations
*/ | Benchmrk preparation consists of training set and neural networ creatiion. This method generates training set with 100 rows, where every row has 10 input and 5 output elements Neural network has two hiddden layers with 8 and 7 neurons, and runs learning rule for 2000 iterations | prepareTest | {
"repo_name": "fiidau/Y-Haplogroup-Predictor",
"path": "src/org/neuroph/util/benchmark/MyBenchmarkTask.java",
"license": "mit",
"size": 2647
} | [
"org.neuroph.core.learning.DataSet",
"org.neuroph.core.learning.DataSetRow",
"org.neuroph.nnet.MultiLayerPerceptron",
"org.neuroph.nnet.learning.MomentumBackpropagation"
] | import org.neuroph.core.learning.DataSet; import org.neuroph.core.learning.DataSetRow; import org.neuroph.nnet.MultiLayerPerceptron; import org.neuroph.nnet.learning.MomentumBackpropagation; | import org.neuroph.core.learning.*; import org.neuroph.nnet.*; import org.neuroph.nnet.learning.*; | [
"org.neuroph.core",
"org.neuroph.nnet"
] | org.neuroph.core; org.neuroph.nnet; | 768,124 |
public void hideFleet(Fleet lf) {
world.removeFleet(lf);
lastVisitedPlanet.remove(lf);
fleetTurnedBack.remove(lf);
} | void function(Fleet lf) { world.removeFleet(lf); lastVisitedPlanet.remove(lf); fleetTurnedBack.remove(lf); } | /**
* Hide a fleet.
* @param lf the fleet to hide
*/ | Hide a fleet | hideFleet | {
"repo_name": "akarnokd/open-ig",
"path": "src/hu/openig/mechanics/AITrader.java",
"license": "lgpl-3.0",
"size": 28258
} | [
"hu.openig.model.Fleet"
] | import hu.openig.model.Fleet; | import hu.openig.model.*; | [
"hu.openig.model"
] | hu.openig.model; | 360,021 |
public MonthlyReport getMonthlyReport(Survey survey); | MonthlyReport function(Survey survey); | /**
* Generate a Monthly Report.
*
* @param survey
* @return MonthlyReport
*/ | Generate a Monthly Report | getMonthlyReport | {
"repo_name": "onlyasurvey/OAS_workspace",
"path": "tags/1.0.0-SNAPSHOT/OnlyASurvey/OnlyASurveyWeb/src/main/java/com/oas/service/ReportingService.java",
"license": "agpl-3.0",
"size": 2645
} | [
"com.oas.model.Survey",
"com.oas.model.report.calendar.MonthlyReport"
] | import com.oas.model.Survey; import com.oas.model.report.calendar.MonthlyReport; | import com.oas.model.*; import com.oas.model.report.calendar.*; | [
"com.oas.model"
] | com.oas.model; | 960,193 |
@SuppressWarnings("unchecked")
public void onNumCopiesChanged( ValueChangeEvent event )
{
Object newValue = event.getNewValue();
if( newValue instanceof Integer )
{
if( newValue != null )
{
int value = (Integer) newValue;
if( value == 0 )
{
List<Object> sc... | @SuppressWarnings(STR) void function( ValueChangeEvent event ) { Object newValue = event.getNewValue(); if( newValue instanceof Integer ) { if( newValue != null ) { int value = (Integer) newValue; if( value == 0 ) { List<Object> screensSelecteds = (List<Object>) event.getComponent().getParent().getParent().getChildren(... | /**
* Listener method for the numCopies inputText valueChange event.
*
* @param event Object {@link ValueChangeEvent} with the event information.
* @author afuentes
*/ | Listener method for the numCopies inputText valueChange event | onNumCopiesChanged | {
"repo_name": "sidlors/digital-booking",
"path": "digital-booking-web/src/main/java/mx/com/cinepolis/digital/booking/web/beans/booking/SpecialEventBookingBean.java",
"license": "epl-1.0",
"size": 52069
} | [
"java.util.List",
"javax.faces.event.ValueChangeEvent"
] | import java.util.List; import javax.faces.event.ValueChangeEvent; | import java.util.*; import javax.faces.event.*; | [
"java.util",
"javax.faces"
] | java.util; javax.faces; | 628,424 |
public void run() {
if (active && mbs.isComplete()) {
// if the materials required to produce the current recipe are in
// the factory inventory
if (hasInputMaterials()) {
// if the factory has been working for less than the required
// time for the recipe
if (currentProductionTimer < currentR... | void function() { if (active && mbs.isComplete()) { if (hasInputMaterials()) { if (currentProductionTimer < currentRecipe.getProductionTime()) { if (pm.powerAvailable()) { if (getFurnace().getType() != Material.BURNING_FURNACE) { turnFurnaceOn(getFurnace()); } int consumptionIntervall = ((InputRecipe) currentRecipe) .g... | /**
* Called by the manager each update cycle
*/ | Called by the manager each update cycle | run | {
"repo_name": "BlackXnt/FactoryMod",
"path": "src/main/java/com/github/igotyou/FactoryMod/factories/FurnCraftChestFactory.java",
"license": "bsd-3-clause",
"size": 14160
} | [
"com.github.igotyou.FactoryMod",
"org.bukkit.Bukkit",
"org.bukkit.ChatColor",
"org.bukkit.Material"
] | import com.github.igotyou.FactoryMod; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; | import com.github.igotyou.*; import org.bukkit.*; | [
"com.github.igotyou",
"org.bukkit"
] | com.github.igotyou; org.bukkit; | 1,915,966 |
public bioOcelot spawnBabyAnimal(EntityAgeable par1EntityAgeable)
{
bioOcelot entityocelot = new bioOcelot(this.worldObj);
if (this.isTamed())
{
entityocelot.setOwner(this.getOwnerName());
entityocelot.setTamed(true);
entityocelot.setTameSkin(this.get... | bioOcelot function(EntityAgeable par1EntityAgeable) { bioOcelot entityocelot = new bioOcelot(this.worldObj); if (this.isTamed()) { entityocelot.setOwner(this.getOwnerName()); entityocelot.setTamed(true); entityocelot.setTameSkin(this.getTameSkin()); } return entityocelot; } | /**
* This function is used when two same-species animals in 'love mode' breed to generate the new baby animal.
*/ | This function is used when two same-species animals in 'love mode' breed to generate the new baby animal | spawnBabyAnimal | {
"repo_name": "liquidgithub/Biotech",
"path": "src/minecraft/biotech/entity/passive/bioOcelot.java",
"license": "bsd-3-clause",
"size": 12176
} | [
"net.minecraft.entity.EntityAgeable"
] | import net.minecraft.entity.EntityAgeable; | import net.minecraft.entity.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 913,641 |
public QName getItemXmlType() {
return _itemXmlType;
} | QName function() { return _itemXmlType; } | /**
* If the return type is an array, get the xml type of the items in the
* array.
*
* @return QName for the item XML type, null if not an array.
*/ | If the return type is an array, get the xml type of the items in the array | getItemXmlType | {
"repo_name": "panbasten/imeta",
"path": "imeta2.x/imeta-src/imeta/src/main/java/com/panet/imeta/trans/steps/webservices/wsdl/WsdlOpReturnType.java",
"license": "gpl-2.0",
"size": 1873
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 317,133 |
try {
Cipher cipher = getCipher(Cipher.ENCRYPT_MODE);
byte[] encryptedTextBytes = cipher.doFinal(message.getBytes("UTF-8"));
return BaseEncoding.base64().encode(encryptedTextBytes);
} catch (IllegalBlockSizeException | BadPaddingException | UnsupportedEncodingException | In... | try { Cipher cipher = getCipher(Cipher.ENCRYPT_MODE); byte[] encryptedTextBytes = cipher.doFinal(message.getBytes("UTF-8")); return BaseEncoding.base64().encode(encryptedTextBytes); } catch (IllegalBlockSizeException BadPaddingException UnsupportedEncodingException InvalidKeyException InvalidAlgorithmParameterException... | /**
* Takes message and encrypts with Key
*
* @param message String
* @return String Base64 encoded
*/ | Takes message and encrypts with Key | getEncryptedMessage | {
"repo_name": "roalva1/opencga",
"path": "opencga-server/src/main/java/encryption/AESCipher.java",
"license": "apache-2.0",
"size": 5147
} | [
"com.google.common.base.Throwables",
"com.google.common.io.BaseEncoding",
"java.io.UnsupportedEncodingException",
"java.security.InvalidAlgorithmParameterException",
"java.security.InvalidKeyException",
"javax.crypto.BadPaddingException",
"javax.crypto.Cipher",
"javax.crypto.IllegalBlockSizeException"... | import com.google.common.base.Throwables; import com.google.common.io.BaseEncoding; import java.io.UnsupportedEncodingException; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.Ill... | import com.google.common.base.*; import com.google.common.io.*; import java.io.*; import java.security.*; import javax.crypto.*; | [
"com.google.common",
"java.io",
"java.security",
"javax.crypto"
] | com.google.common; java.io; java.security; javax.crypto; | 2,260,373 |
public static List<E_ConfigKey> getByCategory(final E_ConfigCategory cat) {
final List<E_ConfigKey> result = new LinkedList<E_ConfigKey>();
for (final E_ConfigKey key : E_ConfigKey.values()) {
if (key.getCategory().equals(cat)) {
result.add(key);
}
}
return result;
}
private String m_... | static List<E_ConfigKey> function(final E_ConfigCategory cat) { final List<E_ConfigKey> result = new LinkedList<E_ConfigKey>(); for (final E_ConfigKey key : E_ConfigKey.values()) { if (key.getCategory().equals(cat)) { result.add(key); } } return result; } private String m_strDefVal; private String m_strMsgProp; private... | /**
* Gets the by category.
*
* @param cat the cat
* @return the by category
*/ | Gets the by category | getByCategory | {
"repo_name": "fraunhoferfokus/particity",
"path": "lib_data/src/main/java/de/fraunhofer/fokus/oefit/adhoc/custom/E_ConfigKey.java",
"license": "bsd-3-clause",
"size": 14577
} | [
"java.util.LinkedList",
"java.util.List"
] | import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 455,139 |
public void testUpdateLoadedWithoutPreloads() throws Exception {
AuraContext context = Aura.getContextService().startContext(Mode.PROD, Format.JSON,
Authentication.AUTHENTICATED);
assertNull(context.getPreloadedDefinitions());
Aura.getDefinitionService().updateLoaded(null);
... | void function() throws Exception { AuraContext context = Aura.getContextService().startContext(Mode.PROD, Format.JSON, Authentication.AUTHENTICATED); assertNull(context.getPreloadedDefinitions()); Aura.getDefinitionService().updateLoaded(null); assertEquals(0, context.getPreloadedDefinitions().size()); } | /**
* Preloads are empty if nothing loaded on client.
*/ | Preloads are empty if nothing loaded on client | testUpdateLoadedWithoutPreloads | {
"repo_name": "TribeMedia/aura",
"path": "aura-integration-test/src/test/java/org/auraframework/integration/test/service/DefinitionServiceImplTest.java",
"license": "apache-2.0",
"size": 42712
} | [
"org.auraframework.Aura",
"org.auraframework.system.AuraContext"
] | import org.auraframework.Aura; import org.auraframework.system.AuraContext; | import org.auraframework.*; import org.auraframework.system.*; | [
"org.auraframework",
"org.auraframework.system"
] | org.auraframework; org.auraframework.system; | 2,260,700 |
@ServiceMethod(returns = ReturnType.SINGLE)
public SelfHostedIntegrationRuntimeNodeInner get(
String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) {
return getAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) SelfHostedIntegrationRuntimeNodeInner function( String resourceGroupName, String factoryName, String integrationRuntimeName, String nodeName) { return getAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).block(); } | /**
* Gets a self-hosted integration runtime node.
*
* @param resourceGroupName The resource group name.
* @param factoryName The factory name.
* @param integrationRuntimeName The integration runtime name.
* @param nodeName The integration runtime node name.
* @throws IllegalArgumentE... | Gets a self-hosted integration runtime node | get | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/implementation/IntegrationRuntimeNodesClientImpl.java",
"license": "mit",
"size": 44878
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.datafactory.fluent.models.SelfHostedIntegrationRuntimeNodeInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.datafactory.fluent.models.SelfHostedIntegrationRuntimeNodeInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.datafactory.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 993,677 |
private int parseUTF8Char()
throws IOException
{
int ch = read();
if (ch < 0x80)
return ch;
else if ((ch & 0xe0) == 0xc0) {
int ch1 = read();
int v = ((ch & 0x1f) << 6) + (ch1 & 0x3f);
return v;
}
else if ((ch & 0xf0) == 0xe0) {
int ch1 = read();
int ch2... | int function() throws IOException { int ch = read(); if (ch < 0x80) return ch; else if ((ch & 0xe0) == 0xc0) { int ch1 = read(); int v = ((ch & 0x1f) << 6) + (ch1 & 0x3f); return v; } else if ((ch & 0xf0) == 0xe0) { int ch1 = read(); int ch2 = read(); int v = ((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f); re... | /**
* Parses a single UTF8 character.
*/ | Parses a single UTF8 character | parseUTF8Char | {
"repo_name": "roidelapluie/yajsw",
"path": "src/hessian/src/main/java/com/caucho/hessian4/io/HessianInput.java",
"license": "lgpl-2.1",
"size": 32388
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 139,861 |
@Override
public void setMouseWheelEnabled(boolean flag) {
if (flag && this.mouseWheelHandler == null) {
// use reflection to instantiate a mouseWheelHandler because to
// continue supporting JRE 1.3.1 we cannot depend on the
// MouseWheelListener interface directly
try {
Class<?> c = Class.forNam... | void function(boolean flag) { if (flag && this.mouseWheelHandler == null) { try { Class<?> c = Class.forName(STR); Constructor<?> cc = c.getConstructor(new Class[] { ChartPanel.class }); Object mwh = cc.newInstance(new Object[] { this }); this.mouseWheelHandler = mwh; } catch (ClassNotFoundException e) { } catch (Secur... | /**
* Enables or disables mouse wheel support for the panel. Note that this method does nothing when running JFreeChart
* on JRE 1.3.1, because that older version of the Java runtime does not support mouse wheel events.
*
* @param flag
* a boolean.
*
* @since 1.0.13
*/ | Enables or disables mouse wheel support for the panel. Note that this method does nothing when running JFreeChart on JRE 1.3.1, because that older version of the Java runtime does not support mouse wheel events | setMouseWheelEnabled | {
"repo_name": "aborg0/RapidMiner-Unuk",
"path": "src/com/rapidminer/gui/plotter/charts/AbstractChartPanel.java",
"license": "agpl-3.0",
"size": 82675
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method",
"org.jfree.chart.ChartPanel"
] | import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.jfree.chart.ChartPanel; | import java.lang.reflect.*; import org.jfree.chart.*; | [
"java.lang",
"org.jfree.chart"
] | java.lang; org.jfree.chart; | 808,474 |
public void checkRecursions(final CompilationTimeStamp timestamp, final IReferenceChain referenceChain) {
if (internalLogArgument == null || isErroneous) {
return;
}
internalLogArgument.checkRecursions(timestamp, referenceChain);
} | void function(final CompilationTimeStamp timestamp, final IReferenceChain referenceChain) { if (internalLogArgument == null isErroneous) { return; } internalLogArgument.checkRecursions(timestamp, referenceChain); } | /**
* Checks whether this value is defining itself in a recursive way. This
* can happen for example if a constant is using itself to determine its
* initial value.
*
* @param timestamp
* the time stamp of the actual semantic check cycle.
* @param referenceChain
* the Refe... | Checks whether this value is defining itself in a recursive way. This can happen for example if a constant is using itself to determine its initial value | checkRecursions | {
"repo_name": "alovassy/titan.EclipsePlug-ins",
"path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/LogArgument.java",
"license": "epl-1.0",
"size": 14083
} | [
"org.eclipse.titan.designer.AST",
"org.eclipse.titan.designer.parsers.CompilationTimeStamp"
] | import org.eclipse.titan.designer.AST; import org.eclipse.titan.designer.parsers.CompilationTimeStamp; | import org.eclipse.titan.designer.*; import org.eclipse.titan.designer.parsers.*; | [
"org.eclipse.titan"
] | org.eclipse.titan; | 1,846,571 |
@Test
public void testZeroAbsoluteParallelShift() {
final YieldCurve shiftedCurve = YieldCurveUtils.withParallelShift(ORIGINAL_CURVE, 0, ShiftType.ABSOLUTE);
assertEquals("ORIGINAL_WithParallelShift", shiftedCurve.getName());
assertFalse(shiftedCurve.getCurve().equals(ORIGINAL_CURVE.getCurve()));
as... | void function() { final YieldCurve shiftedCurve = YieldCurveUtils.withParallelShift(ORIGINAL_CURVE, 0, ShiftType.ABSOLUTE); assertEquals(STR, shiftedCurve.getName()); assertFalse(shiftedCurve.getCurve().equals(ORIGINAL_CURVE.getCurve())); assertTrue(shiftedCurve.getCurve() instanceof SpreadDoublesCurve); assertCurveEqu... | /**
* Tests that doing a parallel absolute shift of zero returns a different yield curve with the
* same shape.
*/ | Tests that doing a parallel absolute shift of zero returns a different yield curve with the same shape | testZeroAbsoluteParallelShift | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/test/java/com/opengamma/analytics/financial/model/interestrate/curve/YieldCurveUtilsTest.java",
"license": "apache-2.0",
"size": 27798
} | [
"com.opengamma.analytics.ShiftType",
"com.opengamma.analytics.math.curve.SpreadDoublesCurve",
"org.testng.AssertJUnit"
] | import com.opengamma.analytics.ShiftType; import com.opengamma.analytics.math.curve.SpreadDoublesCurve; import org.testng.AssertJUnit; | import com.opengamma.analytics.*; import com.opengamma.analytics.math.curve.*; import org.testng.*; | [
"com.opengamma.analytics",
"org.testng"
] | com.opengamma.analytics; org.testng; | 969,850 |
public static void setAutoSavePattern(Context context, boolean v) {
p(context)
.edit()
.putBoolean(
context.getString(R.string.alp_pkey_sys_auto_save_pattern),
v).commit();
if (!v)
setPattern(context, null);
... | static void function(Context context, boolean v) { p(context) .edit() .putBoolean( context.getString(R.string.alp_pkey_sys_auto_save_pattern), v).commit(); if (!v) setPattern(context, null); } | /**
* Sets auto-save pattern mode.
*
* @param context
* the context.
* @param v
* the auto-save mode.
*/ | Sets auto-save pattern mode | setAutoSavePattern | {
"repo_name": "rakeshdausa/Pi-Locker",
"path": "libs/pattern/code/src/group/pals/android/lib/ui/lockpattern/prefs/SecurityPrefs.java",
"license": "gpl-2.0",
"size": 4281
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 536,379 |
SqlFunction getHistogramOp(SqlAggFunction aggFunction) {
if (aggFunction == SqlStdOperatorTable.MIN) {
return SqlStdOperatorTable.HISTOGRAM_MIN;
} else if (aggFunction == SqlStdOperatorTable.MAX) {
return SqlStdOperatorTable.HISTOGRAM_MAX;
} else if (aggFunction == SqlStdOperatorTa... | SqlFunction getHistogramOp(SqlAggFunction aggFunction) { if (aggFunction == SqlStdOperatorTable.MIN) { return SqlStdOperatorTable.HISTOGRAM_MIN; } else if (aggFunction == SqlStdOperatorTable.MAX) { return SqlStdOperatorTable.HISTOGRAM_MAX; } else if (aggFunction == SqlStdOperatorTable.FIRST_VALUE) { return SqlStdOperat... | /**
* Returns the histogram operator corresponding to a given aggregate
* function.
*
* <p>For example, <code>getHistogramOp
*({@link SqlStdOperatorTable#MIN}}</code> returns
* {@link SqlStdOperatorTable#HISTOGRAM_MIN}.
*
* @param aggFunction An aggregate function
* @return ... | Returns the histogram operator corresponding to a given aggregate function. For example, <code>getHistogramOp (<code>SqlStdOperatorTable#MIN</code>}</code> returns <code>SqlStdOperatorTable#HISTOGRAM_MIN</code> | getHistogramOp | {
"repo_name": "vlsi/calcite",
"path": "core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java",
"license": "apache-2.0",
"size": 215926
} | [
"org.apache.calcite.sql.SqlAggFunction",
"org.apache.calcite.sql.SqlFunction",
"org.apache.calcite.sql.fun.SqlStdOperatorTable"
] | import org.apache.calcite.sql.SqlAggFunction; import org.apache.calcite.sql.SqlFunction; import org.apache.calcite.sql.fun.SqlStdOperatorTable; | import org.apache.calcite.sql.*; import org.apache.calcite.sql.fun.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 1,565,323 |
public Set<RelSet> getChildSets(VolcanoPlanner planner) {
Set<RelSet> childSets = new HashSet<>();
for (RelNode node : this.rels) {
if (node instanceof Converter) {
continue;
}
for (RelNode child : node.getInputs()) {
RelSet childSet = planner.equivRoot(((RelSubset) child).ge... | Set<RelSet> function(VolcanoPlanner planner) { Set<RelSet> childSets = new HashSet<>(); for (RelNode node : this.rels) { if (node instanceof Converter) { continue; } for (RelNode child : node.getInputs()) { RelSet childSet = planner.equivRoot(((RelSubset) child).getSet()); if (childSet.id != this.id) { childSets.add(ch... | /**
* Returns the child Relset for current set
*/ | Returns the child Relset for current set | getChildSets | {
"repo_name": "googleinterns/calcite",
"path": "core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java",
"license": "apache-2.0",
"size": 15656
} | [
"java.util.HashSet",
"java.util.Set",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.convert.Converter"
] | import java.util.HashSet; import java.util.Set; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.convert.Converter; | import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.convert.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 1,657,245 |
public void test_15_5254() throws Exception
{
Connection conn = openUserConnection(ALPHA);
goodStatement( conn, "create table t_5254( cycle int, minvalue int, maxvalue int )" );
goodStatement( conn, "drop table t_5254" );
} | void function() throws Exception { Connection conn = openUserConnection(ALPHA); goodStatement( conn, STR ); goodStatement( conn, STR ); } | /**
* Verify that the new sequence-related keywords are non-reserved keywords.
*/ | Verify that the new sequence-related keywords are non-reserved keywords | test_15_5254 | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SequenceTest.java",
"license": "apache-2.0",
"size": 23946
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,363,788 |
public static Logger logger(String name) {
if (NacosLogging.getInstance().isLogback()) {
return LogbackNacosLogging.getLoggerContext().getLogger(name);
}
return getLogger(name);
} | static Logger function(String name) { if (NacosLogging.getInstance().isLogback()) { return LogbackNacosLogging.getLoggerContext().getLogger(name); } return getLogger(name); } | /**
* get logger by name.
* @param name logger name
*/ | get logger by name | logger | {
"repo_name": "alibaba/nacos",
"path": "client/src/main/java/com/alibaba/nacos/client/utils/LogUtils.java",
"license": "apache-2.0",
"size": 1814
} | [
"com.alibaba.nacos.client.logging.NacosLogging",
"com.alibaba.nacos.client.logging.logback.LogbackNacosLogging",
"org.slf4j.Logger",
"org.slf4j.LoggerFactory"
] | import com.alibaba.nacos.client.logging.NacosLogging; import com.alibaba.nacos.client.logging.logback.LogbackNacosLogging; import org.slf4j.Logger; import org.slf4j.LoggerFactory; | import com.alibaba.nacos.client.logging.*; import com.alibaba.nacos.client.logging.logback.*; import org.slf4j.*; | [
"com.alibaba.nacos",
"org.slf4j"
] | com.alibaba.nacos; org.slf4j; | 2,101,433 |
LOGGER.trace("calling ls()");
AbstractFile[] children;
try {
children = folder.ls(configurableFolderFilter);
} catch (Exception e) {
LOGGER.debug("Couldn't ls children of " + folder.getAbsolutePath() + ", error: " + e.getMessage());
children = new AbstractFile[0];
}
folderPanel.setCurrentFold... | LOGGER.trace(STR); AbstractFile[] children; try { children = folder.ls(configurableFolderFilter); } catch (Exception e) { LOGGER.debug(STR + folder.getAbsolutePath() + STR + e.getMessage()); children = new AbstractFile[0]; } folderPanel.setCurrentFolder(folder, children, fileToSelect, changeLockedTab); this.currentFold... | /**
* Set the given {@link AbstractFile} as the folder presented in the {@link FolderPanel}.
* This method saves the given {@link AbstractFile}, and notify the {@link LocationListener}s that
* the location was changed to it.
*
* @param folder the {@link AbstractFile} that is going to be presen... | Set the given <code>AbstractFile</code> as the folder presented in the <code>FolderPanel</code>. This method saves the given <code>AbstractFile</code>, and notify the <code>LocationListener</code>s that the location was changed to it | setCurrentFolder | {
"repo_name": "jorgevasquezp/mucommander",
"path": "src/main/com/mucommander/ui/event/LocationManager.java",
"license": "gpl-3.0",
"size": 7036
} | [
"com.mucommander.commons.file.AbstractFile",
"com.mucommander.core.FolderChangeMonitor",
"com.mucommander.ui.main.FolderPanel"
] | import com.mucommander.commons.file.AbstractFile; import com.mucommander.core.FolderChangeMonitor; import com.mucommander.ui.main.FolderPanel; | import com.mucommander.commons.file.*; import com.mucommander.core.*; import com.mucommander.ui.main.*; | [
"com.mucommander.commons",
"com.mucommander.core",
"com.mucommander.ui"
] | com.mucommander.commons; com.mucommander.core; com.mucommander.ui; | 1,890,955 |
public DoctorSBO persistDoctor(DoctorSBO doctor); | DoctorSBO function(DoctorSBO doctor); | /**
* Persists a Doctor in the database.
*
* @param doctor
* the doctor to persist
* @return the persisted doctor object
*/ | Persists a Doctor in the database | persistDoctor | {
"repo_name": "hip4/patmon1",
"path": "src/server/src/main/java/ch/bfh/ti/sed/patmon1/server/persistence/EntityManager.java",
"license": "apache-2.0",
"size": 3603
} | [
"ch.bfh.ti.sed.patmon1.server.model.sbo.DoctorSBO"
] | import ch.bfh.ti.sed.patmon1.server.model.sbo.DoctorSBO; | import ch.bfh.ti.sed.patmon1.server.model.sbo.*; | [
"ch.bfh.ti"
] | ch.bfh.ti; | 1,879,067 |
private static void internalCancelNotification(Context context, String tag, int notificationId) {
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager nMgr = (NotificationManager) context.getSystemService(ns);
nMgr.cancel(tag, notificationId);
} | static void function(Context context, String tag, int notificationId) { String ns = Context.NOTIFICATION_SERVICE; NotificationManager nMgr = (NotificationManager) context.getSystemService(ns); nMgr.cancel(tag, notificationId); } | /**
* Cancel a specify notification given a tag and an id
*
* @param context the application context
* @param tag the notification tag
* @param notificationId the notification id
*/ | Cancel a specify notification given a tag and an id | internalCancelNotification | {
"repo_name": "massivedisaster/ADAL",
"path": "adal-utils/src/main/java/com/massivedisaster/adal/utils/NotificationUtils.java",
"license": "mit",
"size": 2847
} | [
"android.app.NotificationManager",
"android.content.Context"
] | import android.app.NotificationManager; import android.content.Context; | import android.app.*; import android.content.*; | [
"android.app",
"android.content"
] | android.app; android.content; | 1,373,948 |
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final BiddingSeasonalityAdjustmentServiceClient create(
BiddingSeasonalityAdjustmentServiceStub stub) {
return new BiddingSeasonalityAdjustmentServiceClient(stub);
}
protected BiddingSeasonalityAd... | @BetaApi(STR) static final BiddingSeasonalityAdjustmentServiceClient function( BiddingSeasonalityAdjustmentServiceStub stub) { return new BiddingSeasonalityAdjustmentServiceClient(stub); } protected BiddingSeasonalityAdjustmentServiceClient( BiddingSeasonalityAdjustmentServiceSettings settings) throws IOException { thi... | /**
* Constructs an instance of BiddingSeasonalityAdjustmentServiceClient, using the given stub for
* making calls. This is for advanced usage - prefer using
* create(BiddingSeasonalityAdjustmentServiceSettings).
*/ | Constructs an instance of BiddingSeasonalityAdjustmentServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(BiddingSeasonalityAdjustmentServiceSettings) | create | {
"repo_name": "googleads/google-ads-java",
"path": "google-ads-stubs-v9/src/main/java/com/google/ads/googleads/v9/services/BiddingSeasonalityAdjustmentServiceClient.java",
"license": "apache-2.0",
"size": 16495
} | [
"com.google.ads.googleads.v9.services.stub.BiddingSeasonalityAdjustmentServiceStub",
"com.google.ads.googleads.v9.services.stub.BiddingSeasonalityAdjustmentServiceStubSettings",
"com.google.api.core.BetaApi",
"java.io.IOException"
] | import com.google.ads.googleads.v9.services.stub.BiddingSeasonalityAdjustmentServiceStub; import com.google.ads.googleads.v9.services.stub.BiddingSeasonalityAdjustmentServiceStubSettings; import com.google.api.core.BetaApi; import java.io.IOException; | import com.google.ads.googleads.v9.services.stub.*; import com.google.api.core.*; import java.io.*; | [
"com.google.ads",
"com.google.api",
"java.io"
] | com.google.ads; com.google.api; java.io; | 1,087,275 |
boolean hasPerm(CommandSender sender, String perm) {
if (!sender.hasPermission(perm)) {
noPerms(sender);
return false;
}
return true;
} | boolean hasPerm(CommandSender sender, String perm) { if (!sender.hasPermission(perm)) { noPerms(sender); return false; } return true; } | /**
* Check if sender has permissions to do command
*
* @param sender player who did command
* @param perm permission to check
* @return true if they have permission
*/ | Check if sender has permissions to do command | hasPerm | {
"repo_name": "Ratismal/DriveBackup",
"path": "src/main/java/ratismal/drivebackup/handler/CommandHandler.java",
"license": "mit",
"size": 4767
} | [
"org.bukkit.command.CommandSender"
] | import org.bukkit.command.CommandSender; | import org.bukkit.command.*; | [
"org.bukkit.command"
] | org.bukkit.command; | 1,729,202 |
public Dimension getMaximumSize(JComponent a) {
Dimension returnValue =
((ComponentUI) (uis.elementAt(0))).getMaximumSize(a);
for (int i = 1; i < uis.size(); i++) {
((ComponentUI) (uis.elementAt(i))).getMaximumSize(a);
}
return returnValue;
} | Dimension function(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getMaximumSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getMaximumSize(a); } return returnValue; } | /**
* Invokes the <code>getMaximumSize</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/ | Invokes the <code>getMaximumSize</code> method on each UI handled by this object | getMaximumSize | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/javax/swing/plaf/multi/MultiLabelUI.java",
"license": "mit",
"size": 7408
} | [
"java.awt.Dimension",
"javax.swing.JComponent",
"javax.swing.plaf.ComponentUI"
] | import java.awt.Dimension; import javax.swing.JComponent; import javax.swing.plaf.ComponentUI; | import java.awt.*; import javax.swing.*; import javax.swing.plaf.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,222,997 |
@SuppressWarnings("unchecked")
public static boolean isUserAuthorized(HttpServletRequest request, String resource) {
boolean isAuthorized = false;
List<String> permissions = (List<String>) request.getSession().getAttribute(
CarbonConstants.UI_USER_PERMISSIONS);
if (permis... | @SuppressWarnings(STR) static boolean function(HttpServletRequest request, String resource) { boolean isAuthorized = false; List<String> permissions = (List<String>) request.getSession().getAttribute( CarbonConstants.UI_USER_PERMISSIONS); if (permissions == null) { return false; } for (String permission : permissions) ... | /**
* This method is a helper method for checking UI permissions.
*/ | This method is a helper method for checking UI permissions | isUserAuthorized | {
"repo_name": "lasinducharith/stratos",
"path": "dependencies/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUIUtil.java",
"license": "apache-2.0",
"size": 17839
} | [
"java.util.List",
"javax.servlet.http.HttpServletRequest",
"org.wso2.carbon.CarbonConstants"
] | import java.util.List; import javax.servlet.http.HttpServletRequest; import org.wso2.carbon.CarbonConstants; | import java.util.*; import javax.servlet.http.*; import org.wso2.carbon.*; | [
"java.util",
"javax.servlet",
"org.wso2.carbon"
] | java.util; javax.servlet; org.wso2.carbon; | 2,465,102 |
protected void handleKeyPressed(KeyEvent event) {
if (event.character == SWT.DEL && event.stateMask == 0) {
if (fRemoveButtonIndex != -1 && isButtonEnabled(fTree.getSelection(), fRemoveButtonIndex)) {
managedButtonPressed(fRemoveButtonIndex);
return;
}
}
fTreeAdapter.keyPressed(this, event);
}
... | void function(KeyEvent event) { if (event.character == SWT.DEL && event.stateMask == 0) { if (fRemoveButtonIndex != -1 && isButtonEnabled(fTree.getSelection(), fRemoveButtonIndex)) { managedButtonPressed(fRemoveButtonIndex); return; } } fTreeAdapter.keyPressed(this, event); } | /**
* Handles key events in the table viewer. Specifically
* when the delete key is pressed.
*/ | Handles key events in the table viewer. Specifically when the delete key is pressed | handleKeyPressed | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/wizards/dialogfields/TreeListDialogField.java",
"license": "epl-1.0",
"size": 24036
} | [
"org.eclipse.swt.events.KeyEvent"
] | import org.eclipse.swt.events.KeyEvent; | import org.eclipse.swt.events.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 883,272 |
public boolean assertFileExists(final String message, final File actual) {
return new AssertFile(actual, this).setMessage(message).exists().isPassed();
} | boolean function(final String message, final File actual) { return new AssertFile(actual, this).setMessage(message).exists().isPassed(); } | /**
* Assert file exists.
*
* @param message the message
* @param actual the actual
* @return true, if successful
*/ | Assert file exists | assertFileExists | {
"repo_name": "c3riley/Testah",
"path": "testah-junit/src/main/java/org/testah/framework/report/VerboseAsserts.java",
"license": "mit",
"size": 61978
} | [
"java.io.File",
"org.testah.framework.report.asserts.AssertFile"
] | import java.io.File; import org.testah.framework.report.asserts.AssertFile; | import java.io.*; import org.testah.framework.report.asserts.*; | [
"java.io",
"org.testah.framework"
] | java.io; org.testah.framework; | 2,726,205 |
DeadLetterJobEntity moveJobToDeadLetterJob(AbstractJobEntity job); | DeadLetterJobEntity moveJobToDeadLetterJob(AbstractJobEntity job); | /**
* Transforms an {@link AbstractJobEntity} to a {@link DeadLetterJobEntity}.
* This means that the job has been tried a configurable amount of times,
* but kept failing.
*/ | Transforms an <code>AbstractJobEntity</code> to a <code>DeadLetterJobEntity</code>. This means that the job has been tried a configurable amount of times, but kept failing | moveJobToDeadLetterJob | {
"repo_name": "motorina0/flowable-engine",
"path": "modules/flowable-engine/src/main/java/org/flowable/engine/impl/asyncexecutor/JobManager.java",
"license": "apache-2.0",
"size": 5010
} | [
"org.flowable.engine.impl.persistence.entity.AbstractJobEntity",
"org.flowable.engine.impl.persistence.entity.DeadLetterJobEntity"
] | import org.flowable.engine.impl.persistence.entity.AbstractJobEntity; import org.flowable.engine.impl.persistence.entity.DeadLetterJobEntity; | import org.flowable.engine.impl.persistence.entity.*; | [
"org.flowable.engine"
] | org.flowable.engine; | 1,774,322 |
public void glVertexAttribPointer (int indx, int size, int type, boolean normalized, int stride, Buffer ptr); | void function (int indx, int size, int type, boolean normalized, int stride, Buffer ptr); | /**
* In OpenGl core profiles (3.1+), passing a pointer to client memory is not valid.
* In 3.0 and later, use the other version of this function instead, pass a zero-based
* offset which references the buffer currently bound to GL_ARRAY_BUFFER.
*/ | In OpenGl core profiles (3.1+), passing a pointer to client memory is not valid. In 3.0 and later, use the other version of this function instead, pass a zero-based offset which references the buffer currently bound to GL_ARRAY_BUFFER | glVertexAttribPointer | {
"repo_name": "srpepperoni/libGDX",
"path": "gdx/src/com/badlogic/gdx/graphics/GL20.java",
"license": "apache-2.0",
"size": 28685
} | [
"java.nio.Buffer"
] | import java.nio.Buffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,281,135 |
CompletableFuture<Void> console(String command); | CompletableFuture<Void> console(String command); | /**
* Execute an arbitrary CLI command, printing output to the CLI console
*
* Note: to ensure a certain thread or inferior has focus for a console command, see
* {@link JdiThread#console(String)} and {@link JdiVM#console(String)}.
*
* @param command the command to execute
* @return a future that comple... | Execute an arbitrary CLI command, printing output to the CLI console Note: to ensure a certain thread or inferior has focus for a console command, see <code>JdiThread#console(String)</code> and <code>JdiVM#console(String)</code> | console | {
"repo_name": "NationalSecurityAgency/ghidra",
"path": "Ghidra/Debug/Debugger-jpda/src/main/java/ghidra/dbg/jdi/manager/JdiManager.java",
"license": "apache-2.0",
"size": 5943
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,931,624 |
private void writeData() throws Exception {
HashMap<String, String> tags = new HashMap<String, String>(1);
tags.put("host", "web01");
long timestamp = 1356998400;
Annotation annotation = new Annotation();
annotation.setStartTime(timestamp);
annotation.setTSUID("000001000001000001");
a... | void function() throws Exception { HashMap<String, String> tags = new HashMap<String, String>(1); tags.put("host", "web01"); long timestamp = 1356998400; Annotation annotation = new Annotation(); annotation.setStartTime(timestamp); annotation.setTSUID(STR); annotation.setDescription(STR); annotation.syncToStorage(tsdb,... | /**
* Store some data in MockBase for use in the unit tests. We'll put in a mix
* of all possible types so that we know they'll come out properly in the end.
* For that reason we'll use the standard OpenTSDB methods for writing data.
*/ | Store some data in MockBase for use in the unit tests. We'll put in a mix of all possible types so that we know they'll come out properly in the end. For that reason we'll use the standard OpenTSDB methods for writing data | writeData | {
"repo_name": "nickman/opentsdb",
"path": "test/tools/TestDumpSeries.java",
"license": "gpl-3.0",
"size": 18349
} | [
"java.util.HashMap",
"net.opentsdb.meta.Annotation"
] | import java.util.HashMap; import net.opentsdb.meta.Annotation; | import java.util.*; import net.opentsdb.meta.*; | [
"java.util",
"net.opentsdb.meta"
] | java.util; net.opentsdb.meta; | 2,357,946 |
public void addClusterConnection(SimpleString name,
TransportConfiguration[] tcConfigs,
ClusterConnectionConfiguration config) {
ServerLocatorImpl serverLocator = (ServerLocatorImpl) ActiveMQClient.createServerLocatorWithHA(tcConfigs);
... | void function(SimpleString name, TransportConfiguration[] tcConfigs, ClusterConnectionConfiguration config) { ServerLocatorImpl serverLocator = (ServerLocatorImpl) ActiveMQClient.createServerLocatorWithHA(tcConfigs); configAndAdd(name, serverLocator, config); } | /**
* add a locator for a cluster connection.
*
* @param name the cluster connection name
* @param tcConfigs the transport configurations to use
*/ | add a locator for a cluster connection | addClusterConnection | {
"repo_name": "wildfly/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterController.java",
"license": "apache-2.0",
"size": 17389
} | [
"org.apache.activemq.artemis.api.core.SimpleString",
"org.apache.activemq.artemis.api.core.TransportConfiguration",
"org.apache.activemq.artemis.api.core.client.ActiveMQClient",
"org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl",
"org.apache.activemq.artemis.core.config.ClusterConnectionConfig... | import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.TransportConfiguration; import org.apache.activemq.artemis.api.core.client.ActiveMQClient; import org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl; import org.apache.activemq.artemis.core.config.ClusterCo... | import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.api.core.client.*; import org.apache.activemq.artemis.core.client.impl.*; import org.apache.activemq.artemis.core.config.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 591,213 |
public IDataset getPeriod(); | IDataset function(); | /**
* Period of pulsed source
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Units:</b> NX_PERIOD
* </p>
*
* @return the value.
*/ | Period of pulsed source Type: NX_FLOAT Units: NX_PERIOD | getPeriod | {
"repo_name": "jonahkichwacoders/dawnsci",
"path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXsource.java",
"license": "epl-1.0",
"size": 7211
} | [
"org.eclipse.dawnsci.analysis.api.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.dataset.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 2,461,786 |
public
int getRestartCount()
{
return _restartCount;
}
private
class StreamGobbler
implements Runnable
{
private final InputStream in;
private boolean done = false;
private Throwable _exception;
public
StreamGobbler(
final InputStream aIn)
{
in = aIn;
... | int function() { return _restartCount; } private class StreamGobbler implements Runnable { private final InputStream in; private boolean done = false; private Throwable _exception; public StreamGobbler( final InputStream aIn) { in = aIn; } | /**
* Get the number of times a TreeTagger process was started.
*
* @return the number of times a TreeTagger process was started.
*/ | Get the number of times a TreeTagger process was started | getRestartCount | {
"repo_name": "reckart/tt4j",
"path": "src/main/java/org/annolab/tt4j/TreeTaggerWrapper.java",
"license": "apache-2.0",
"size": 31270
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 725,560 |
protected static <T extends Channel> T object(ChannelListener<T> methodList) {
JacobVPU.activeJacobThread().object(false, methodList);
return methodList.getChannel();
} | static <T extends Channel> T function(ChannelListener<T> methodList) { JacobVPU.activeJacobThread().object(false, methodList); return methodList.getChannel(); } | /**
* Object; the Java code "object(x, ChannelListener)" is equivalent to
* <code>x ? ChannelListener</code> in the process algebra.
*
* @param methodList
* method list for the communication reduction
* @see JacobThread#object
*/ | Object; the Java code "object(x, ChannelListener)" is equivalent to <code>x ? ChannelListener</code> in the process algebra | object | {
"repo_name": "TheRingbearer/HAWKS",
"path": "ode/jacob/src/main/java/org/apache/ode/jacob/JacobObject.java",
"license": "apache-2.0",
"size": 5232
} | [
"org.apache.ode.jacob.vpu.JacobVPU"
] | import org.apache.ode.jacob.vpu.JacobVPU; | import org.apache.ode.jacob.vpu.*; | [
"org.apache.ode"
] | org.apache.ode; | 1,477,510 |
public Font getTitleFont() {
return this.titleFont;
}
| Font function() { return this.titleFont; } | /**
* Returns the font selected in the panel.
*
* @return The font selected in the panel.
*/ | Returns the font selected in the panel | getTitleFont | {
"repo_name": "ilyessou/jfreechart",
"path": "source/org/jfree/chart/editor/DefaultTitleEditor.java",
"license": "lgpl-2.1",
"size": 10361
} | [
"java.awt.Font"
] | import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,737,438 |
public void addTitle(Title title) {
if (title == null) {
return;
}
if (titles == null) {
titles = new ArrayList<Title>();
}
addTypifiedProperty(titles, title);
} | void function(Title title) { if (title == null) { return; } if (titles == null) { titles = new ArrayList<Title>(); } addTypifiedProperty(titles, title); } | /**
* Adds a new title to the title list, unless it is already there.
*
* @param title the new title to add
*/ | Adds a new title to the title list, unless it is already there | addTitle | {
"repo_name": "accesstest3/AndroidFunambol",
"path": "externals/jme-sdk/pim/src/com/funambol/common/pim/model/contact/BusinessDetail.java",
"license": "agpl-3.0",
"size": 7522
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 498,318 |
public Edge getEdge(Node source, Node dest) {
Set<AbstractMap.SimpleEntry<Node, Edge>> destSet = graph.get(source);
if (destSet == null || destSet.isEmpty()) {
return null;
}
for (AbstractMap.SimpleEntry<Node, Edge> pair : destSet) {
if (pair.getKey().equals(d... | Edge function(Node source, Node dest) { Set<AbstractMap.SimpleEntry<Node, Edge>> destSet = graph.get(source); if (destSet == null destSet.isEmpty()) { return null; } for (AbstractMap.SimpleEntry<Node, Edge> pair : destSet) { if (pair.getKey().equals(dest)) { return pair.getValue(); } } return null; } | /**
* Returns the edge between the two nodes, starting at source. Note that
* there can be an edges in the other direction too, this one is never
* returned
*
* @param source
* @param dest
* @return null if there is no edge between the nodes
*/ | Returns the edge between the two nodes, starting at source. Note that there can be an edges in the other direction too, this one is never returned | getEdge | {
"repo_name": "limespace/VaadinGraphvizComponent",
"path": "vizcomponent-root/vizcomponent/src/main/java/com/vaadin/pontus/vizcomponent/model/Subgraph.java",
"license": "apache-2.0",
"size": 13215
} | [
"java.util.AbstractMap",
"java.util.Set"
] | import java.util.AbstractMap; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 490,356 |
public DateHolder setDate(final Date date)
{
if (date == null) {
return this;
}
this.calendar.setTime(date);
ensurePrecision();
return this;
} | DateHolder function(final Date date) { if (date == null) { return this; } this.calendar.setTime(date); ensurePrecision(); return this; } | /**
* Date will be set. Dependent on precision, also seconds etc. will be set to zero. Ensures the precision.
*/ | Date will be set. Dependent on precision, also seconds etc. will be set to zero. Ensures the precision | setDate | {
"repo_name": "micromata/projectforge-webapp",
"path": "src/main/java/org/projectforge/common/DateHolder.java",
"license": "gpl-3.0",
"size": 21653
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 655,281 |
@SuppressWarnings("unchecked")
public void addItemEventListener(@SuppressWarnings("rawtypes") ItemEventListener listener)
{
PacketListener conListener = new ItemEventTranslator(listener);
itemEventToListenerMap.put(listener, conListener);
con.addPacketListener(conListener, new EventContentFilter(EventEle... | @SuppressWarnings(STR) void function(@SuppressWarnings(STR) ItemEventListener listener) { PacketListener conListener = new ItemEventTranslator(listener); itemEventToListenerMap.put(listener, conListener); con.addPacketListener(conListener, new EventContentFilter(EventElementType.items.toString(), "item")); } | /**
* Register a listener for item publication events. This
* listener will get called whenever an item is published to
* this node.
*
* @param listener The handler for the event
*/ | Register a listener for item publication events. This listener will get called whenever an item is published to this node | addItemEventListener | {
"repo_name": "vito-c/Smack",
"path": "smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java",
"license": "apache-2.0",
"size": 23823
} | [
"org.jivesoftware.smack.PacketListener",
"org.jivesoftware.smackx.pubsub.listener.ItemEventListener"
] | import org.jivesoftware.smack.PacketListener; import org.jivesoftware.smackx.pubsub.listener.ItemEventListener; | import org.jivesoftware.smack.*; import org.jivesoftware.smackx.pubsub.listener.*; | [
"org.jivesoftware.smack",
"org.jivesoftware.smackx"
] | org.jivesoftware.smack; org.jivesoftware.smackx; | 2,592,279 |
public void setRateLimiter(FlinkConnectorRateLimiter kafkaRateLimiter) {
this.rateLimiter = kafkaRateLimiter;
} | void function(FlinkConnectorRateLimiter kafkaRateLimiter) { this.rateLimiter = kafkaRateLimiter; } | /**
* Set a rate limiter to ratelimit bytes read from Kafka.
* @param kafkaRateLimiter
*/ | Set a rate limiter to ratelimit bytes read from Kafka | setRateLimiter | {
"repo_name": "bowenli86/flink",
"path": "flink-connectors/flink-connector-kafka-0.10/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer010.java",
"license": "apache-2.0",
"size": 15779
} | [
"org.apache.flink.api.common.io.ratelimiting.FlinkConnectorRateLimiter"
] | import org.apache.flink.api.common.io.ratelimiting.FlinkConnectorRateLimiter; | import org.apache.flink.api.common.io.ratelimiting.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,041,410 |
protected boolean processModelModuleRequirement(ParticipantNode participantNode) throws Exception {
String namespaceUri = participantNode.getNamespace();
if (namespaceUri == null)
namespaceUri = project.getNamespace();
Namespace namespace = context.getNamespaceByUri(namespaceUri);
if (namespace == null)
... | boolean function(ParticipantNode participantNode) throws Exception { String namespaceUri = participantNode.getNamespace(); if (namespaceUri == null) namespaceUri = project.getNamespace(); Namespace namespace = context.getNamespaceByUri(namespaceUri); if (namespace == null) return false; boolean importedBlocksContainNam... | /**
* Always false for now. This results in creating NO ModelModules from ARIEL.
* ModelModules are only created from Information-blocks created in ARIES.
*/ | Always false for now. This results in creating NO ModelModules from ARIEL. ModelModules are only created from Information-blocks created in ARIES | processModelModuleRequirement | {
"repo_name": "tfisher1226/ARIES",
"path": "aries/ariel-compiler/src/main/java/org/aries/ast/AriesModelBuilder.java",
"license": "apache-2.0",
"size": 110961
} | [
"org.aries.ast.node.ParticipantNode"
] | import org.aries.ast.node.ParticipantNode; | import org.aries.ast.node.*; | [
"org.aries.ast"
] | org.aries.ast; | 2,064,770 |
public void addAttribute( QueryItem attribute )
{
this.attributes.add( attribute );
} | void function( QueryItem attribute ) { this.attributes.add( attribute ); } | /**
* Adds a query item as attribute to the parameters.
*/ | Adds a query item as attribute to the parameters | addAttribute | {
"repo_name": "kakada/dhis2",
"path": "dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceQueryParams.java",
"license": "bsd-3-clause",
"size": 18781
} | [
"org.hisp.dhis.common.QueryItem"
] | import org.hisp.dhis.common.QueryItem; | import org.hisp.dhis.common.*; | [
"org.hisp.dhis"
] | org.hisp.dhis; | 1,403,179 |
public TiStatus tiStatus() {
return this.tiStatus;
} | TiStatus function() { return this.tiStatus; } | /**
* Get the tiStatus property: TI Status of the IoT sensor.
*
* @return the tiStatus value.
*/ | Get the tiStatus property: TI Status of the IoT sensor | tiStatus | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/models/IotSensorsModelInner.java",
"license": "mit",
"size": 6234
} | [
"com.azure.resourcemanager.security.models.TiStatus"
] | import com.azure.resourcemanager.security.models.TiStatus; | import com.azure.resourcemanager.security.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,777,697 |
public static boolean testJSON()
{
boolean sentinel = true;
Movie m = new Movie(MOVIE_FILE_NAME);
m.setFileName(MOVIE_FILE_NAME);
if(!assertEquals("Wrong JSON!", EXEPECTED_JSON, m.toJSON()))
{
sentinel = false;
}
return sentinel;
} | static boolean function() { boolean sentinel = true; Movie m = new Movie(MOVIE_FILE_NAME); m.setFileName(MOVIE_FILE_NAME); if(!assertEquals(STR, EXEPECTED_JSON, m.toJSON())) { sentinel = false; } return sentinel; } | /**
* Tests to see if the JSON method returns the correct string
*
* @return boolean
*/ | Tests to see if the JSON method returns the correct string | testJSON | {
"repo_name": "RyanDawkins/glowing-spice",
"path": "test/Test_Movie.java",
"license": "apache-2.0",
"size": 1675
} | [
"com.ryanddawkins.glowing_spice.Movie"
] | import com.ryanddawkins.glowing_spice.Movie; | import com.ryanddawkins.glowing_spice.*; | [
"com.ryanddawkins.glowing_spice"
] | com.ryanddawkins.glowing_spice; | 2,157,165 |
public static PlayerSupplier playerByName(@Nonnull PlayersSupplier supplier,
@Nonnull String name) {
return new PlayerByNameSupplier(supplier, name);
} | static PlayerSupplier function(@Nonnull PlayersSupplier supplier, @Nonnull String name) { return new PlayerByNameSupplier(supplier, name); } | /**
* Gets a new {@link PlayersSupplier} which returns all players in a {@link Bukkit#getServer()}.
*
* @return entities supplier
*/ | Gets a new <code>PlayersSupplier</code> which returns all players in a <code>Bukkit#getServer()</code> | playerByName | {
"repo_name": "SupaHam/SupaCommons",
"path": "commons-bukkit/src/main/java/com/supaham/commons/bukkit/players/Players.java",
"license": "gpl-3.0",
"size": 10959
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,992,298 |
@Override
protected boolean isCreationAllowed() {
return settings.getBoolean(Keys.git.allowCreateOnPush, true);
}
| boolean function() { return settings.getBoolean(Keys.git.allowCreateOnPush, true); } | /**
* Determine if a non-existing repository can be created using this filter.
*
* @return true if the server allows repository creation on-push
*/ | Determine if a non-existing repository can be created using this filter | isCreationAllowed | {
"repo_name": "culmat/gitblit",
"path": "src/main/java/com/gitblit/servlet/GitFilter.java",
"license": "apache-2.0",
"size": 8940
} | [
"com.gitblit.Keys"
] | import com.gitblit.Keys; | import com.gitblit.*; | [
"com.gitblit"
] | com.gitblit; | 1,680,115 |
public void finished()
{
// remove all listeners
ActionListener [] actionListeners = getActionListeners();
for (int j = 0; j < actionListeners.length; j++) {
ActionListener actionListener = actionListeners[j];
removeActionListener(actionListener);
}
... | void function() { ActionListener [] actionListeners = getActionListeners(); for (int j = 0; j < actionListeners.length; j++) { ActionListener actionListener = actionListeners[j]; removeActionListener(actionListener); } List<AbstractButton> list = allButtons.get(getName()); if (list == null) return; list.remove(this); } | /**
* Called when a TopLevel (in SDI mode) is disposed. This gets rid
* of references to the tool bar button, so that memory allocated to them
* can be reclaimed.
*/ | Called when a TopLevel (in SDI mode) is disposed. This gets rid of references to the tool bar button, so that memory allocated to them can be reclaimed | finished | {
"repo_name": "imr/Electric8",
"path": "com/sun/electric/tool/user/ui/ToolBarButton.java",
"license": "gpl-3.0",
"size": 11121
} | [
"java.awt.event.ActionListener",
"java.util.List",
"javax.swing.AbstractButton"
] | import java.awt.event.ActionListener; import java.util.List; import javax.swing.AbstractButton; | import java.awt.event.*; import java.util.*; import javax.swing.*; | [
"java.awt",
"java.util",
"javax.swing"
] | java.awt; java.util; javax.swing; | 484,916 |
List<Repository> getTransitiveMemberRepositories(); | List<Repository> getTransitiveMemberRepositories(); | /**
* Returns the unmodifiable list of Transitive Repositories that are group members in this GroupRepository. This
* method differs from {@link #getMemberRepositories()} by resolving all inner groups member as well. <b>The
* resulting list won't contain any GroupRepository.</b>
*
* @return a List<Reposi... | Returns the unmodifiable list of Transitive Repositories that are group members in this GroupRepository. This method differs from <code>#getMemberRepositories()</code> by resolving all inner groups member as well. The resulting list won't contain any GroupRepository | getTransitiveMemberRepositories | {
"repo_name": "scmod/nexus-public",
"path": "components/nexus-core/src/main/java/org/sonatype/nexus/proxy/repository/GroupRepository.java",
"license": "epl-1.0",
"size": 3678
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,075,813 |
try {
XPackRestTestHelper.waitForTemplates(client(), XPackRestTestConstants.ML_POST_V660_TEMPLATES);
} catch (AssertionError e) {
throw new AssertionError("Failure in test setup: Failed to initialize ML index templates", e);
}
} | try { XPackRestTestHelper.waitForTemplates(client(), XPackRestTestConstants.ML_POST_V660_TEMPLATES); } catch (AssertionError e) { throw new AssertionError(STR, e); } } | /**
* Waits for the Machine Learning templates to be created by {@link org.elasticsearch.plugins.MetadataUpgrader}
*/ | Waits for the Machine Learning templates to be created by <code>org.elasticsearch.plugins.MetadataUpgrader</code> | waitForTemplates | {
"repo_name": "nknize/elasticsearch",
"path": "x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/UpgradeClusterClientYamlTestSuiteIT.java",
"license": "apache-2.0",
"size": 4270
} | [
"org.elasticsearch.xpack.test.rest.XPackRestTestConstants",
"org.elasticsearch.xpack.test.rest.XPackRestTestHelper"
] | import org.elasticsearch.xpack.test.rest.XPackRestTestConstants; import org.elasticsearch.xpack.test.rest.XPackRestTestHelper; | import org.elasticsearch.xpack.test.rest.*; | [
"org.elasticsearch.xpack"
] | org.elasticsearch.xpack; | 1,850,182 |
public WorkItemClassificationNode updateClassificationNode(
final WorkItemClassificationNode postedNode,
final String project,
final TreeStructureGroup structureGroup,
final String path) {
final UUID locationId = UUID.fromString("5a172953-1b41-49d3-840a-33f79c3ce89f"); /... | WorkItemClassificationNode function( final WorkItemClassificationNode postedNode, final String project, final TreeStructureGroup structureGroup, final String path) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = n... | /**
* [Preview API 3.1-preview.2]
*
* @param postedNode
*
* @param project
* Project ID or project name
* @param structureGroup
*
* @param path
*
* @return WorkItemClassificationNode
*/ | [Preview API 3.1-preview.2] | updateClassificationNode | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/workitemtracking/webapi/WorkItemTrackingHttpClientBase.java",
"license": "mit",
"size": 169431
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.TreeStructureGroup",
"com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.WorkItemClassificationNode",
"c... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.TreeStructureGroup; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.WorkItemClassificat... | import com.microsoft.alm.client.*; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 2,347,183 |
public void testExpectContinueHeader() throws InterruptedException {
final Settings settings = Settings.EMPTY;
final int contentLength = randomIntBetween(1, HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH.get(settings).bytesAsInt());
runExpectHeaderTest(settings, HttpHeaderValues.CONTI... | void function() throws InterruptedException { final Settings settings = Settings.EMPTY; final int contentLength = randomIntBetween(1, HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH.get(settings).bytesAsInt()); runExpectHeaderTest(settings, HttpHeaderValues.CONTINUE.toString(), contentLength, HttpResponseStatus.C... | /**
* Test that {@link NioHttpServerTransport} supports the "Expect: 100-continue" HTTP header
* @throws InterruptedException if the client communication with the server is interrupted
*/ | Test that <code>NioHttpServerTransport</code> supports the "Expect: 100-continue" HTTP header | testExpectContinueHeader | {
"repo_name": "coding0011/elasticsearch",
"path": "plugins/transport-nio/src/test/java/org/elasticsearch/http/nio/NioHttpServerTransportTests.java",
"license": "apache-2.0",
"size": 17724
} | [
"io.netty.handler.codec.http.HttpHeaderValues",
"io.netty.handler.codec.http.HttpResponseStatus",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.http.HttpTransportSettings"
] | import io.netty.handler.codec.http.HttpHeaderValues; import io.netty.handler.codec.http.HttpResponseStatus; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.http.HttpTransportSettings; | import io.netty.handler.codec.http.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.http.*; | [
"io.netty.handler",
"org.elasticsearch.common",
"org.elasticsearch.http"
] | io.netty.handler; org.elasticsearch.common; org.elasticsearch.http; | 82,291 |
@OnOpen
public void onWebSocketConnect(Session session) throws Exception {
this.session = session;
ThreadEntryPointNearRealTime.serverSideSocketNearRealTimes.put(Iote2eConstants.SOCKET_KEY_NRT, this);
threadIgniteSubscribeTemperature = ThreadIgniteSubscribe.startThreadSubscribe( ThreadEntryPointNearRealTime.m... | void function(Session session) throws Exception { this.session = session; ThreadEntryPointNearRealTime.serverSideSocketNearRealTimes.put(Iote2eConstants.SOCKET_KEY_NRT, this); threadIgniteSubscribeTemperature = ThreadIgniteSubscribe.startThreadSubscribe( ThreadEntryPointNearRealTime.masterConfig, Iote2eConstants.IGNITE... | /**
* On web socket connect.
*
* @param session the session
* @throws Exception the exception
*/ | On web socket connect | onWebSocketConnect | {
"repo_name": "petezybrick/iote2e",
"path": "iote2e-ws/src/main/java/com/pzybrick/iote2e/ws/nrt/ServerSideSocketNearRealTime.java",
"license": "apache-2.0",
"size": 11460
} | [
"com.pzybrick.iote2e.common.ignite.ThreadIgniteSubscribe",
"com.pzybrick.iote2e.common.utils.Iote2eConstants",
"javax.websocket.Session"
] | import com.pzybrick.iote2e.common.ignite.ThreadIgniteSubscribe; import com.pzybrick.iote2e.common.utils.Iote2eConstants; import javax.websocket.Session; | import com.pzybrick.iote2e.common.ignite.*; import com.pzybrick.iote2e.common.utils.*; import javax.websocket.*; | [
"com.pzybrick.iote2e",
"javax.websocket"
] | com.pzybrick.iote2e; javax.websocket; | 1,287,064 |
default List<Boolean> execute(List<Transmutation> data, List<Load> destinations) {
List<T> filtered = filter(destinations);
if (!filtered.isEmpty()) {
return process(data, filtered);
}
return Collections.emptyList();
} | default List<Boolean> execute(List<Transmutation> data, List<Load> destinations) { List<T> filtered = filter(destinations); if (!filtered.isEmpty()) { return process(data, filtered); } return Collections.emptyList(); } | /**
* Default processor logic that will first filter the required data then process all valid entries
*
* @return list of results or empty list when nothing was processed
*/ | Default processor logic that will first filter the required data then process all valid entries | execute | {
"repo_name": "salesforce/pyplyn",
"path": "plugin-api/src/main/java/com/salesforce/pyplyn/processor/LoadProcessor.java",
"license": "bsd-3-clause",
"size": 2705
} | [
"com.salesforce.pyplyn.model.Load",
"com.salesforce.pyplyn.model.Transmutation",
"java.util.Collections",
"java.util.List"
] | import com.salesforce.pyplyn.model.Load; import com.salesforce.pyplyn.model.Transmutation; import java.util.Collections; import java.util.List; | import com.salesforce.pyplyn.model.*; import java.util.*; | [
"com.salesforce.pyplyn",
"java.util"
] | com.salesforce.pyplyn; java.util; | 1,795,088 |
@Deprecated
public static <T> T findWidget(Element element,
Class<? extends Widget> class1) {
return WidgetUtil.findWidget(element, class1);
} | static <T> T function(Element element, Class<? extends Widget> class1) { return WidgetUtil.findWidget(element, class1); } | /**
* Helper method to find first instance of given Widget type found by
* traversing DOM upwards from given element.
*
* @deprecated As of 7.4.0, use
* {@link WidgetUtil#findWidget(Element, Class)} instead.
*
* @param element
* the element where to start s... | Helper method to find first instance of given Widget type found by traversing DOM upwards from given element | findWidget | {
"repo_name": "peterl1084/framework",
"path": "client/src/main/java/com/vaadin/client/Util.java",
"license": "apache-2.0",
"size": 42317
} | [
"com.google.gwt.dom.client.Element",
"com.google.gwt.user.client.ui.Widget"
] | import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.ui.Widget; | import com.google.gwt.dom.client.*; import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,123,030 |
public void connectAndLogin() throws IOException
{
connect();
login();
} | void function() throws IOException { connect(); login(); } | /**
* Connects and logs in using the information previously provided
*
* @throws IOException
*/ | Connects and logs in using the information previously provided | connectAndLogin | {
"repo_name": "yerich/LOLSpectateDataServer",
"path": "src/com/gvaneyck/rtmp/LoLRTMPSClient.java",
"license": "gpl-3.0",
"size": 19958
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 789,460 |
public final File getCxxTestHome()
{
return cxxTestHome;
} | final File function() { return cxxTestHome; } | /**
* Get the configured home directory for CxxTest
* @return the home directory for CxxTest
*/ | Get the configured home directory for CxxTest | getCxxTestHome | {
"repo_name": "andi12/msbuild-maven-plugin",
"path": "msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/configuration/CxxTestConfiguration.java",
"license": "apache-2.0",
"size": 7607
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,623,325 |
private void showToolbar() {
mToolbar.animate().translationY(0).setInterpolator(new DecelerateInterpolator(2));
} | void function() { mToolbar.animate().translationY(0).setInterpolator(new DecelerateInterpolator(2)); } | /**
* Show the toolbar
*/ | Show the toolbar | showToolbar | {
"repo_name": "JaisonBrooks/android_recyclerview",
"path": "app/src/main/java/com/jaisonbrooks/android/recyclerview/MainActivity.java",
"license": "apache-2.0",
"size": 3640
} | [
"android.view.animation.DecelerateInterpolator"
] | import android.view.animation.DecelerateInterpolator; | import android.view.animation.*; | [
"android.view"
] | android.view; | 393,999 |
public Object getItem(int position) {
for (ListAdapter piece : pieces) {
int size=piece.getCount();
if (position<size) {
return(piece.getItem(position));
}
position-=size;
}
return(null);
} | Object function(int position) { for (ListAdapter piece : pieces) { int size=piece.getCount(); if (position<size) { return(piece.getItem(position)); } position-=size; } return(null); } | /**
* Get the data item associated with the specified
* position in the data set.
* @param position Position of the item whose data we want
*/ | Get the data item associated with the specified position in the data set | getItem | {
"repo_name": "rostgaard/OpenARS",
"path": "openarsandroidc/src/dossee/droids/MergeAdapter.java",
"license": "gpl-2.0",
"size": 8381
} | [
"android.widget.ListAdapter"
] | import android.widget.ListAdapter; | import android.widget.*; | [
"android.widget"
] | android.widget; | 502,315 |
public Map<String, ColumnMeta> getAllColumns() {
return allColumns;
} | Map<String, ColumnMeta> function() { return allColumns; } | /**
* Gets all columns.
*
* @return the all columns
*/ | Gets all columns | getAllColumns | {
"repo_name": "seata/seata",
"path": "rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMeta.java",
"license": "apache-2.0",
"size": 5720
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,214,680 |
@Test
public void testErrorInDefaultValueInTemplate() throws Exception {
final String TASKNAME_KEY = "taskName";
final String TASKNAME_DEFAULT_VALUE = "server";
final String TASKNAME_VALUE = "test";
String templateContent =
"FROM codenvy/mytemplatetest\n"
+ "grunt $"
... | void function() throws Exception { final String TASKNAME_KEY = STR; final String TASKNAME_DEFAULT_VALUE = STR; final String TASKNAME_VALUE = "test"; String templateContent = STR + STR + TASKNAME_KEY + ":" + TASKNAME_DEFAULT_VALUE + "$\n"; String expectedContent = STR + STR; Map<String, Object> parameters = new HashMap<... | /**
* Try with invalid syntax for default Here there is the missing - after : like
* $myKey:wrongDefaultValue$
*/ | Try with invalid syntax for default Here there is the missing - after : like $myKey:wrongDefaultValue$ | testErrorInDefaultValueInTemplate | {
"repo_name": "sleshchenko/che",
"path": "infrastructures/docker/docker-client/src/test/java/org/eclipse/che/infrastructure/docker/client/DockerfileParserTest.java",
"license": "epl-1.0",
"size": 22583
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,481,471 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.